Include <array> to declare std::array<>.
[external/binutils.git] / gdb / ChangeLog
1 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2
3         * symtab.h: Include <array>.
4
5 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
6
7         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
8         (bsd_kvm_proc_cmd): Likewise.
9
10 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * tui/tui-win.c (window_name_completer): Replace VEC with
13         std::vector.
14
15 2017-11-15  Andrew Cagney  <cagney@gnu.org>
16
17         * MAINTAINERS: Remove no-longer applicable entries.
18
19 2017-11-15  Andrew Cagney  <cagney@gnu.org>
20
21         * MAINTAINERS: Move self to Past Maintainers.
22
23 2017-11-15  Yao Qi  <yao.qi@linaro.org>
24
25         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
26         * features/nios2-linux.c: Remove.
27         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
28         initialize_tdesc_nios2_linux.
29
30 2017-11-15  Yao Qi  <yao.qi@linaro.org>
31
32         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
33         M68HC11_LAST_HARD_REG + 1.
34
35 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
36
37         PR gdb/22388
38         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
39         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
40         Return TARGET_XFER_EOF if size of returned data is 0.
41
42 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
43
44         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
45         memory-map-selftests.c.
46         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
47         * memory-map.c (memory_map_start_memory): Fix computation of hi
48         address.
49         * unittests/memory-map-selftests.c: New file.
50
51 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
52
53         * ada-lang.c: Fix some typos in the general command documenting
54         how Ada expressions are being evaluated and how their result
55         is printed.
56
57 2017-11-09  Tom Tromey  <tom@tromey.com>
58
59         * psymtab.c (psymbol_hash): Do not hash string contents.
60         (psymbol_compare): Add comment.
61
62 2017-11-09  Tom Tromey  <tom@tromey.com>
63
64         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
65
66 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
67
68         * ada-exp.y (write_var_from_sym): Remove parameter
69         "orig_left_context".  Update all callers.
70
71 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
72
73         * tracepoint.h (class collection_list) <stringify>: Return
74         std::vector<std::string>.
75         (encode_actions_rsp): Change parameters to
76         std::vector<std::string> *.
77         * tracepoint.c (collection_list::stringify): Return
78         std::vector<std::string> and adjust accordingly.
79         (encode_actions_rsp): Changee parameters to
80         std::vector<std::string> and adjust accordingly.
81         * remote.c (free_actions_list),
82         free_actions_list_cleanup_wrapper): Remove.
83         (remote_download_tracepoint): Adjust to std::vector.
84
85 2017-11-08  Tom Tromey  <tom@tromey.com>
86
87         * dwarf2read.c (symbolp): Remove typedef.
88         (read_func_scope): Use std::vector.
89         (process_structure_scope): Use std::vector.
90
91 2017-11-08  Pedro Alves  <palves@redhat.com>
92
93         * ada-lang.c (ada_make_symbol_completion_list): Use
94         completion_skip_symbol.
95         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
96         (symbol_is_function_or_method(symbol*)): New.
97         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
98         completion_skip_symbol.
99         (default_collect_symbol_completion_matches_break_on): Use
100         completion_skip_symbol.  Pass down mode.
101         (collect_file_symbol_completion_matches): Pass down mode.
102         * symtab.h (symbol_is_function_or_method): New declarations.
103         (completion_skip_symbol): New template function.
104
105 2017-11-08  Pedro Alves  <palves@redhat.com>
106
107         * linespec.c (iterate_over_all_matching_symtabs): Add
108         search_domain parameter.  Pass it down to expand_symtabs_matching.
109         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
110         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
111         search_domain.
112         (add_all_symbol_names_from_pspace): Add search_domain parameter.
113         Pass it down.
114         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
115         symbols.
116         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
117         it down.
118
119 2017-11-08  Pedro Alves  <palves@redhat.com>
120
121         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
122         text_len locals and don't pass them down.
123         * symtab.c (completion_list_add_name): Remove
124         sym_text/sym_text_len parameters and adjust.
125         (completion_list_add_symbol, completion_list_add_msymbol)
126         (completion_list_objc_symbol, completion_list_add_fields)
127         (add_symtab_completions): Likewise.
128         (default_collect_symbol_completion_matches_break_on)
129         (collect_file_symbol_completion_matches): Remove sym_text_len
130         local and don't pass it down.
131         * symtab.h (completion_list_add_name): Remove
132         sym_text/sym_text_len parameters.
133
134 2017-11-08  Pedro Alves  <palves@redhat.com>
135
136         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
137         unittests/lookup_name_info-selftests.c.
138         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
139         * cp-support.c: Include "selftest.h".
140         (cp_remove_params_1): Rename from cp_remove_params.  Add
141         'require_param' parameter, and handle it.
142         (cp_remove_params): Reimplement.
143         (cp_remove_params_if_any): New.
144         (selftests::quote): New.
145         (selftests::check_remove_params): New.
146         (selftests::test_cp_remove_params): New.
147         (_initialize_cp_support): Install
148         selftests::test_cp_remove_params.
149         * cp-support.h (cp_remove_params_if_any): Declare.
150         * dwarf2read.c :Include "selftest.h".
151         (dw2_expand_symtabs_matching_symbol): Use
152         lookup_name_info::make_ignore_params.
153         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
154         (selftests::dw2_expand_symtabs_matching::string_or_null)
155         (selftests::dw2_expand_symtabs_matching::check_match)
156         (selftests::dw2_expand_symtabs_matching::test_symbols)
157         (selftests::dw2_expand_symtabs_matching::run_test): New.
158         (_initialize_dwarf2_read): Register
159         selftests::dw2_expand_symtabs_matching::run_test.
160         * psymtab.c (psym_expand_symtabs_matching): Use
161         lookup_name_info::make_ignore_params.
162         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
163         If the lookup name wants to ignore parameters, strip them.
164         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
165         code handling '('.
166         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
167         (default_collect_symbol_completion_matches_break_on): Don't try to
168         strip parameters.
169         * symtab.h (lookup_name_info::lookup_name_info): Add
170         'ignore_parameters' parameter.
171         (lookup_name_info::ignore_parameters)
172         (lookup_name_info::make_ignore_params): New methods.
173         (lookup_name_info::m_ignore_parameters): New field.
174         * unittests/lookup_name_info-selftests.c: New file.
175
176 2017-11-08  Pedro Alves  <palves@redhat.com>
177
178         * dwarf2read.c (dw2_expand_marked_cus)
179         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
180         (dw2_expand_symtabs_matching): Move further below.
181         (dw2_expand_marked_cus): Reindent.
182
183 2017-11-08  Pedro Alves  <palves@redhat.com>
184
185         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
186         (struct name_component): New.
187         (mapped_index::name_components): New field.
188         (mapped_index::symbol_name_at): New method.
189         (dwarf2_read_index): Call mapped_index ctor.
190         (dw2_map_matching_symbols): Add comment about name_components
191         table.
192         (dw2_expand_symtabs_matching): Factor part to...
193         (dw2_expand_symtabs_matching_symbol): ... this new function.
194         Build name components table, and lookup symbols in it before
195         calling the name matcher.
196         (dw2_expand_marked_cus): New, factored out from
197         dw2_expand_symtabs_matching.
198         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
199
200 2017-11-08   Pedro Alves  <palves@redhat.com>
201
202         * ada-lang.c (ada_encode): Rename to ..
203         (ada_encode_1): ... this.  Add throw_errors parameter and handle
204         it.
205         (ada_encode): Reimplement.
206         (match_name): Delete, folded into full_name.
207         (resolve_subexp): No longer pass the encoded name to
208         ada_lookup_symbol_list.
209         (should_use_wild_match): Delete.
210         (name_match_type_from_name): New.
211         (ada_lookup_simple_minsym): Use lookup_name_info and the
212         language's symbol_name_matcher_ftype.
213         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
214         (ada_add_block_renamings): Adjust to use lookup_name_info.
215         (ada_lookup_name): New.
216         (add_nonlocal_symbols, ada_add_all_symbols)
217         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
218         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
219         (ada_name_for_lookup): Delete.
220         (ada_lookup_encoded_symbol): Construct a verbatim name.
221         (wild_match): Reverse sense of return type.  Use bool.
222         (full_match): Reverse sense of return type.  Inline bits of old
223         match_name here.
224         (ada_add_block_symbols): Adjust to use lookup_name_info.
225         (symbol_completion_match): Delete, folded into...
226         (ada_lookup_name_info::matches): ... .this new method.
227         (symbol_completion_add): Delete.
228         (ada_collect_symbol_completion_matches): Add name_match_type
229         parameter.  Adjust to use lookup_name_info and
230         completion_list_add_name.
231         (get_var_value, ada_add_global_exceptions): Adjust to use
232         lookup_name_info.
233         (ada_get_symbol_name_cmp): Delete.
234         (do_wild_match, do_full_match): New functions.
235         (ada_lookup_name_info::ada_lookup_name_info): New method.
236         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
237         functions.
238         (ada_language_defn): Install ada_get_symbol_name_matcher.
239         * ada-lex.l (processId): If name starts with '<', copy it
240         verbatim.
241         * block.c (block_iter_match_step, block_iter_match_first)
242         (block_iter_match_next, block_lookup_symbol)
243         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
244         lookup_name_info.
245         * block.h (block_iter_match_first, block_iter_match_next)
246         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
247         * c-lang.c (c_language_defn, cplus_language_defn)
248         (asm_language_defn, minimal_language_defn): Adjust comments to
249         refer to la_get_symbol_name_matcher.
250         * completer.c (complete_files_symbols)
251         (collect_explicit_location_matches, symbol_completer): Pass a
252         symbol_name_match_type down.
253         * completer.h (class completion_match, completion_match_result):
254         New classes.
255         (completion_tracker::reset_completion_match_result): New method.
256         (completion_tracker::m_completion_match_result): New field.
257         * cp-support.c (make_symbol_overload_list_block): Adjust to use
258         lookup_name_info.
259         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
260         functions.
261         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
262         * d-lang.c: Adjust comments to refer to
263         la_get_symbol_name_matcher.
264         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
265         Adjust to use lookup_name_info.
266         (dict_iter_match_first, dict_iter_match_next)
267         (iter_match_first_hashed, iter_match_next_hashed)
268         (iter_match_first_linear, iter_match_next_linear): Adjust to work
269         with a lookup_name_info.
270         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
271         Likewise.
272         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
273         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
274         (gdb_index_symbol_name_matcher): New class.
275         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
276         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
277         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
278         with a symbol_name_match_type.
279         (f_language_defn): Adjust comments to refer to
280         la_get_symbol_name_matcher.
281         * go-lang.c (go_language_defn): Adjust comments to refer to
282         la_get_symbol_name_matcher.
283         * language.c (default_symbol_name_matcher)
284         (language_get_symbol_name_matcher): New functions.
285         (unknown_language_defn, auto_language_defn): Adjust comments to
286         refer to la_get_symbol_name_matcher.
287         * language.h (symbol_name_cmp_ftype): Delete.
288         (language_defn) <la_collect_symbol_completion_matches>: Add match
289         type parameter.
290         <la_get_symbol_name_cmp>: Delete field.
291         <la_get_symbol_name_matcher>: New field.
292         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
293         (default_symbol_name_matcher, language_get_symbol_name_matcher):
294         Declare.
295         * linespec.c (iterate_over_all_matching_symtabs)
296         (iterate_over_file_blocks): Adjust to use lookup_name_info.
297         (find_methods): Add language parameter, and use lookup_name_info
298         and the language's symbol_name_matcher_ftype.
299         (linespec_complete_function): Adjust.
300         (lookup_prefix_sym): Use lookup_name_info.
301         (add_all_symbol_names_from_pspace): Adjust.
302         (find_superclass_methods): Add language parameter and pass it
303         down.
304         (find_method): Pass symbol language down.
305         (find_linespec_symbols): Don't demangle or Ada encode here.
306         (search_minsyms_for_name): Add lookup_name_info parameter.
307         (add_matching_symbols_to_info): Add name_match_type parameter.
308         Use lookup_name_info.
309         * m2-lang.c (m2_language_defn): Adjust comments to refer to
310         la_get_symbol_name_matcher.
311         * minsyms.c: Include <algorithm>.
312         (add_minsym_to_demangled_hash_table): Remove table parameter and
313         add objfile parameter.  Use search_name_hash, and add language to
314         demangled languages vector.
315         (struct found_minimal_symbols): New struct.
316         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
317         New functions.
318         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
319         input names here.  Use lookup_name_info instead.  Lookup up
320         demangled names once for each language in the demangled names
321         vector.
322         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
323         demangled names once for each language in the demangled names
324         vector.
325         (build_minimal_symbol_hash_tables): Adjust.
326         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
327         lookup_name_info.
328         * objc-lang.c (objc_language_defn): Adjust comment to refer to
329         la_get_symbol_name_matcher.
330         * objfiles.h: Include <vector>.
331         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
332         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
333         la_get_symbol_name_matcher.
334         * p-lang.c (pascal_language_defn): Adjust comment to refer to
335         la_get_symbol_name_matcher.
336         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
337         (match_partial_symbol): Use symbol_name_match_type,
338         lookup_name_info and psymbol_name_matches.
339         (lookup_partial_symbol): Use lookup_name_info.
340         (map_block): Use symbol_name_match_type and lookup_name_info.
341         (psym_map_matching_symbols): Use symbol_name_match_type.
342         (psymbol_name_matches): New.
343         (recursively_search_psymtabs): Use lookup_name_info and
344         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
345         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
346         'kind' parameter to 'domain'.
347         * rust-lang.c (rust_language_defn): Adjust comment to refer to
348         la_get_symbol_name_matcher.
349         * symfile-debug.c (debug_qf_map_matching_symbols)
350         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
351         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
352         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
353         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
354         Adjust to use symbol_name_match_type.
355         <expand_symtabs_matching>: Adjust to use lookup_name_info.
356         (expand_symtabs_matching): Adjust to use lookup_name_info.
357         * symmisc.c (maintenance_expand_symtabs): Use
358         lookup_name_info::match_any ().
359         * symtab.c (symbol_matches_search_name): New.
360         (eq_symbol_entry): Adjust to use lookup_name_info and the
361         language's matcher.
362         (demangle_for_lookup_info::demangle_for_lookup_info): New.
363         (lookup_name_info::match_any): New.
364         (iterate_over_symbols, search_symbols): Use lookup_name_info.
365         (compare_symbol_name): Add language, lookup_name_info and
366         completion_match_result parameters, and use them.
367         (completion_list_add_name): Make extern.  Add language and
368         lookup_name_info parameters.  Use them.
369         (completion_list_add_symbol, completion_list_add_msymbol)
370         (completion_list_objc_symbol): Add lookup_name_info parameters and
371         adjust.  Pass down language.
372         (completion_list_add_fields): Add lookup_name_info parameters and
373         adjust.  Pass down language.
374         (add_symtab_completions): Add lookup_name_info parameters and
375         adjust.
376         (default_collect_symbol_completion_matches_break_on): Add
377         name_match_type parameter, and use it.  Use lookup_name_info.
378         (default_collect_symbol_completion_matches)
379         (collect_symbol_completion_matches): Add name_match_type
380         parameter, and pass it down.
381         (collect_symbol_completion_matches_type): Adjust.
382         (collect_file_symbol_completion_matches): Add name_match_type
383         parameter, and use lookup_name_info.
384         * symtab.h: Include <string> and "common/gdb_optional.h".
385         (enum class symbol_name_match_type): New.
386         (class ada_lookup_name_info): New.
387         (struct demangle_for_lookup_info): New.
388         (class lookup_name_info): New.
389         (symbol_name_matcher_ftype): New.
390         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
391         (symbol_matches_search_name): Declare.
392         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
393         (default_collect_symbol_completion_matches)
394         (collect_symbol_completion_matches)
395         (collect_file_symbol_completion_matches): Add name_match_type
396         parameter.
397         (iterate_over_symbols): Use lookup_name_info.
398         (completion_list_add_name): Declare.
399         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
400         (strncmp_iw_with_mode): Now extern.
401         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
402         (strncmp_iw_with_mode): Declare.
403
404 2017-11-08  Keith Seitz  <keiths@redhat.com>
405             Pedro Alves  <palves@redhat.com>
406
407         * ada-lang.c (ada_language_defn): Install
408         default_search_name_hash.
409         * buildsym.c (struct buildsym_compunit): <language>: New field.
410         (finish_block_internal): Pass language when creating dictionaries.
411         (start_buildsym_compunit, start_symtab): New language parameters.
412         Use them.
413         (restart_symtab): Pass down compilation unit's language.
414         * buildsym.h (enum language): Forward declare.
415         (start_symtab): New 'language' parameter.
416         * c-lang.c (c_language_defn, cplus_language_defn)
417         (asm_language_defn, minimal_language_defn): Install
418         default_search_name_hash.
419         * coffread.c (coff_start_symtab): Adjust.
420         * d-lang.c (d_language_defn): Install default_search_name_hash.
421         * dbxread.c (struct symloc): Add 'pst_language' field.
422         (PST_LANGUAGE): Define.
423         (start_psymtab, read_ofile_symtab): Use it.
424         (process_one_symbol): New 'language' parameter.  Pass it down.
425         * dictionary.c (struct dictionary) <language>: New field.
426         (DICT_LANGUAGE): Define.
427         (dict_create_hashed, dict_create_hashed_expandable)
428         (dict_create_linear, dict_create_linear_expandable): New parameter
429         'language'.  Set the dictionary's language.
430         (iter_match_first_hashed): Adjust to rename.
431         (insert_symbol_hashed): Assert we don't see mismatching
432         languages.  Adjust to rename.
433         (dict_hash): Rename to ...
434         (default_search_name_hash): ... this and make extern.
435         * dictionary.h (struct language_defn): Forward declare.
436         (dict_create_hashed): New parameter 'language'.
437         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
438         * f-lang.c (f_language_defn): Install default_search_name_hash.
439         * go-lang.c (go_language_defn): Install default_search_name_hash.
440         * jit.c (finalize_symtab): Pass compunit's language to dictionary
441         creation.
442         * language.c (unknown_language_defn, auto_language_defn):
443         * language.h (language_defn::la_search_name_hash): New field.
444         (default_search_name_hash): Declare.
445         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
446         * mdebugread.c (new_block): New parameter 'language'.
447         * mdebugread.c (parse_symbol): Pass symbol language to block
448         allocation.
449         (psymtab_to_symtab_1): Pass down language.
450         (new_symtab): Pass compunit's language to block allocation.
451         * objc-lang.c (objc_language_defn): Install
452         default_search_name_hash.
453         * opencl-lang.c (opencl_language_defn):
454         * p-lang.c (pascal_language_defn): Install
455         default_search_name_hash.
456         * rust-lang.c (rust_language_defn): Install
457         default_search_name_hash.
458         * stabsread.h (enum language): Forward declare.
459         (process_one_symbol): Add 'language' parameter.
460         * symtab.c (search_name_hash): New function.
461         * symtab.h (search_name_hash): Declare.
462         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
463
464 2017-11-08  Pedro Alves  <palves@redhat.com>
465
466         * cp-name-parser.y (main): Don't initialize extra_chars.
467
468 2017-11-07  Tom Tromey  <tom@tromey.com>
469
470         * event-top.h (command_handler): Constify.
471         * record-full.c (cmd_record_full_start): Update.
472         * thread.c (thread_apply_all_command): Update.
473         * printcmd.c (eval_command): Update.
474         * mi/mi-main.c (mi_execute_cli_command): Update.
475         (mi_execute_async_cli_command): Update.
476         * tui/tui-stack.c (tui_update_command): Update.
477         * cli/cli-interp.c (safe_execute_command): Constify.
478         * record.c (record_start): Update.
479         (record_start, record_stop, cmd_record_start): Update.
480         * record-btrace.c (cmd_record_btrace_bts_start): Update.
481         (cmd_record_btrace_pt_start): Update.
482         (cmd_record_btrace_start): Update.
483         (cmd_record_btrace_start): Update.
484         * reverse.c (exec_reverse_once): Update.
485         * python/python.c (execute_gdb_command): Don't copy the command.
486         * event-top.c (command_line_handler): Update.
487         (command_handler): Constify.
488         * defs.h (deprecated_call_command_hook): Constify.
489         * cli/cli-script.h (execute_user_command): Constify.
490         * cli/cli-script.c (execute_user_command): Constify.
491         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
492         (enum command_control_type): Update.
493         * main.c (catch_command_errors): Remove non-const overload.
494         (catch_command_errors_ftype): Remove.
495         * python/py-cmd.c (cmdpy_function): Constify.
496         * guile/scm-cmd.c (cmdscm_function): Constify.
497         * cli/cli-dump.c (call_dump_func): Constify.
498         * cli/cli-decode.c (do_const_cfunc): Constify.
499         (do_sfunc): Constify.
500         (cmd_func): Constify.
501         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
502         * top.h (execute_command): Constify.
503         * top.c (execute_command): Constify.
504         (execute_command_to_string): Constify.
505         (deprecated_call_command_hook): Constify.
506         * command.h (cmd_func): Constify.
507         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
508
509 2017-11-07  Tom Tromey  <tom@tromey.com>
510
511         * ada-lang.c (catch_ada_exception_command): Constify.
512         (catch_assert_command): Constify.
513         * break-catch-throw.c (catch_catch_command, catch_throw_command)
514         (catch_rethrow_command): Constify.
515         (catch_exception_command_1): Constify.
516         * breakpoint.h (add_catch_command): Constify.
517         * break-catch-syscall.c (catch_syscall_command_1): Constify.
518         (catch_syscall_split_args): Constify.
519         * break-catch-sig.c (catch_signal_command): Constify.
520         (catch_signal_split_args): Constify.
521         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
522         cmd_const_sfunc_ftype.
523         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
524         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
525         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
526         (add_setshow_string_cmd, struct cmd_list_element)
527         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
528         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
529         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
530         Constify.
531         (set_cmd_sfunc): Constify.
532         (empty_sfunc): Constify.
533         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
534         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
535         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
536         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
537         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
538         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
539         Constify.
540         (set_cmd_sfunc): Constify.
541         (cmd_sfunc_ftype): Remove.
542         * compile/compile.c (set_compile_args): Constify.
543         * infrun.c (set_disable_randomization): Constify.
544         * infcmd.c (set_args_command, set_cwd_command): Constify.
545         * breakpoint.c (set_condition_evaluation_mode): Constify.
546         (add_catch_command): Constify.
547         (catch_fork_command_1, catch_exec_command_1)
548         (catch_load_command_1, catch_unload_command_1): Constify.
549         (catch_load_or_unload): Constify.
550         * guile/scm-param.c (pascm_set_func): Constify.
551         (add_setshow_generic): Constify.
552         * python/py-param.c (get_set_value): Constify.
553         * top.h (set_verbose): Constify.
554         * tui/tui-win.c (tui_set_var_cmd): Constify.
555         * mi/mi-main.c (set_mi_async_command): Constify.
556         * cli/cli-logging.c (set_logging_overwrite)
557         (set_logging_redirect): Constify.
558         * value.c (set_max_value_size): Constify.
559         * valprint.c (set_input_radix, set_output_radix): Constify.
560         * utils.c (set_width_command, set_height_command): Constify.
561         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
562         * tracepoint.c (set_disconnected_tracing)
563         (set_circular_trace_buffer, set_trace_buffer_size)
564         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
565         * top.c (set_history_size_command, set_verbose, set_editing)
566         (set_gdb_datadir, set_history_filename): Constify.
567         * target.c (set_targetdebug, maint_set_target_async_command)
568         (maint_set_target_non_stop_command, set_target_permissions)
569         (set_write_memory_permission): Constify.
570         (open_target): Constify.
571         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
572         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
573         * symtab.c (set_symbol_cache_size_handler): Constify.
574         * symfile.c (set_ext_lang_command): Constify.
575         * symfile-debug.c (set_debug_symfile): Constify.
576         * source.c (set_directories_command): Constify.
577         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
578         * serial.c (set_parity): Constify.
579         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
580         * remote.c (set_remote_exec_file, set_remotebreak)
581         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
582         * record.c (set_record_insn_history_size)
583         (set_record_call_history_size): Constify.
584         * record-full.c (set_record_full_insn_max_num): Constify.
585         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
586         * osabi.c (set_osabi): Constify.
587         * mips-tdep.c (set_mips64_transfers_32bit_regs)
588         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
589         * maint.c (maintenance_set_profile_cmd): Constify.
590         * linux-thread-db.c (set_libthread_db_search_path): Constify.
591         * language.c (set_language_command, set_range_command)
592         (set_case_command): Constify.
593         * infrun.c (set_non_stop, set_observer_mode)
594         (set_stop_on_solib_events, set_schedlock_func)
595         (set_exec_direction_func): Constify.
596         * infcmd.c (set_inferior_tty_command): Constify.
597         * disasm.c (set_disassembler_options_sfunc): Constify.
598         * demangle.c (set_demangling_command): Constify.
599         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
600         * cris-tdep.c (set_cris_version, set_cris_mode)
601         (set_cris_dwarf2_cfi): Constify.
602         * corefile.c (set_gnutarget_command): Constify.
603         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
604         (set_target_wide_charset_sfunc): Constify.
605         * breakpoint.c (update_dprintf_commands): Constify.
606         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
607         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
608         (set_disassembly_style_sfunc): Constify.
609         * arch-utils.c (set_endian, set_architecture): Constify.
610         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
611         * agent.c (set_can_use_agent): Constify.
612
613 2017-11-07  Tom Tromey  <tom@tromey.com>
614
615         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
616         (go32_pde, go32_pte, go32_pte_for_address): Constify.
617         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
618         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
619         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
620         (parse_int_arg, show_thread_default_detach_sc_cmd)
621         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
622         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
623         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
624         (show_task_pause_cmd, set_task_detach_sc_cmd)
625         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
626         (set_noninvasive_cmd, set_thread_pause_cmd)
627         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
628         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
629         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
630         * windows-nat.c (display_selectors): Constify.
631         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
632         non-const "cfunc".
633         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
634         (cmd_cfunc_eq): Likewise.
635         (struct cmd_list_element): Likewise.
636         (do_cfunc): Remove.
637         (cli_user_command_p): Update.
638         * command.h (add_cmd): Remove non-const overload.
639         (cmd_cfunc_ftype): Remove typedef.
640         (cmd_cfunc_eq): Remove non-const overload.
641         * value.c (show_values): Constify.
642         * thread.c (thread_apply_all_command): Constify.
643         * symfile.c (load_command): Constify.
644         * source.c (directory_command): Constify.
645         * maint.c (maintenance_internal_error)
646         (maintenance_demangler_warning, maintenance_space_display)
647         (maintenance_print_architecture, maintenance_translate_address)
648         (maintenance_info_selftests, maintenance_internal_warning):
649         Constify.
650         * breakpoint.c (disable_trace_command, enable_trace_command):
651         Constify.
652         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
653         Constify.
654         (add_auto_load_safe_path): Constify.
655         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
656         * top.h (show_commands): Constify.
657         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
658         * sparc64-tdep.c (adi_examine_command): Constify.
659         (adi_assign_command): Constify.
660
661 2017-11-07  Tom Tromey  <tom@tromey.com>
662
663         * frame.h (info_locals_command, info_args_command): Constify.
664         * auto-load.h (auto_load_info_scripts): Constify.
665         * inferior.h (registers_info): Constify.
666         * copying.c: Rebuild.
667         * copying.awk: Constify generated commands.
668         * auto-load.c (auto_load_info_scripts)
669         (info_auto_load_gdb_scripts): Constify.
670         * cli/cli-decode.c (struct cmd_list_element): Take a
671         cmd_const_cfunc_ftype.
672         * command.h (add_info): Take a cmd_const_cfunc_ftype.
673         * tui/tui-win.c (tui_all_windows_info): Constify.
674         * python/py-auto-load.c (info_auto_load_python_scripts):
675         Constify.
676         * cli/cli-cmds.c (show_command): Remove non-const overload.
677         * tracepoint.c (info_tvariables_command, info_scope_command):
678         Constify.
679         (info_static_tracepoint_markers_command): Constify.
680         * thread.c (info_threads_command): Constify.
681         (print_thread_info_1): Constify.
682         * target.c (info_target_command): Constify.
683         * symtab.c (info_sources_command, info_functions_command)
684         (info_types_command): Constify.
685         (info_variables_command): Remove non-const overload.
686         * symfile.c (info_ext_lang_command): Constify.
687         * stack.c (info_frame_command, info_locals_command)
688         (info_args_command): Constify.
689         (backtrace_command): Remove non-const overload.
690         * source.c (info_source_command, info_line_command): Constify.
691         * solib.c (info_sharedlibrary_command): Constify.
692         * skip.c (info_skip_command): Constify.
693         * ser-go32.c (info_serial_command): Constify.
694         * reverse.c (info_bookmarks_command): Constify.
695         * printcmd.c (info_symbol_command, info_address_command)
696         (info_display_command): Constify.
697         * osdata.c (info_osdata_command): Constify.
698         * objc-lang.c (info_selectors_command, info_classes_command):
699         Constify.
700         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
701         * memattr.c (info_mem_command): Constify.
702         * macrocmd.c (info_macro_command, info_macros_command): Constify.
703         * linux-fork.c (info_checkpoints_command): Constify.
704         * infrun.c (info_signals_command): Constify.
705         * inflow.c (info_terminal_command): Constify.
706         * inferior.c (info_inferiors_command): Constify.
707         (print_inferior): Constify.
708         * infcmd.c (info_program_command, info_all_registers_command)
709         (info_registers_command, info_vector_command)
710         (info_float_command): Constify.
711         (registers_info): Constify.
712         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
713         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
714         Constify.
715         * f-valprint.c (info_common_command): Constify.
716         * dcache.c (info_dcache_command): Constify.
717         (dcache_info_1): Constify.
718         * darwin-nat-info.c (info_mach_tasks_command)
719         (info_mach_task_command, info_mach_ports_command)
720         (info_mach_port_command, info_mach_threads_command)
721         (info_mach_thread_command, info_mach_regions_command)
722         (info_mach_regions_recurse_command, info_mach_region_command)
723         (info_mach_exceptions_command): Constify.
724         (get_task_from_args): Constify.
725         * cp-support.c (info_vtbl_command): Constify.
726         * breakpoint.c (info_watchpoints_command)
727         (info_tracepoints_command): Constify.
728         (info_breakpoints_command): Remove non-const overload.
729         * avr-tdep.c (avr_io_reg_read_command): Constify.
730         * auxv.c (info_auxv_command): Constify.
731         * ada-tasks.c (info_tasks_command): Constify.
732         (info_task): Constify.
733         * ada-lang.c (info_exceptions_command): Constify.
734
735 2017-11-07  Tom Tromey  <tom@tromey.com>
736
737         * solib.h (no_shared_libraries): Constify.
738         * frame.h (return_command): Constify.
739         * cli/cli-cmds.h (quit_command): Constify.
740         * top.h (quit_command, execute_command): Constify.
741         * target.h (flash_erase_command): Constify.
742         * inferior.h (set_inferior_args, attach_command): Constify.
743         * tracepoint.h (start_tracing, stop_tracing): Constify.
744         * breakpoint.h (break_command, tbreak_command)
745         (hbreak_command_wrapper, thbreak_command_wrapper)
746         (rbreak_command_wrapper, watch_command_wrapper)
747         (awatch_command_wrapper, rwatch_command_wrapper)
748         (get_tracepoint_by_number): Constify.
749         * symtab.c (info_variables_command, rbreak_command)
750         (symtab_symbol_info): Constify.
751         (info_variables_command): Add non-const overload.
752         * top.c (dont_repeat_command): Constify.
753         * breakpoint.c (ignore_command, commands_command)
754         (condition_command, tbreak_command, hbreak_command)
755         (thbreak_command, clear_command, break_command)
756         (info_breakpoints_command, watch_command, rwatch_command)
757         (awatch_command, trace_command, ftrace_command, strace_command)
758         (trace_pass_command, break_range_command, dprintf_command)
759         (agent_printf_command, get_tracepoint_by_number)
760         (watch_maybe_just_location, trace_pass_command): Constify.
761         (info_breakpoints_command): Add non-const overload.
762         * tracefile.c (tsave_command): Constify.
763         * infcmd.c (attach_command, disconnect_command, signal_command)
764         (queue_signal_command, stepi_command, nexti_command)
765         (finish_command, next_command, step_command, until_command)
766         (advance_command, jump_command, continue_command, run_command)
767         (start_command, starti_command, interrupt_command)
768         (run_command_1, set_inferior_args, step_1): Constify.
769         * inferior.c (add_inferior_command, remove_inferior_command)
770         (clone_inferior_command): Constify.
771         * linux-fork.c (checkpoint_command, restart_command): Constify.
772         * windows-nat.c (signal_event_command): Constify.
773         * guile/guile.c (guile_repl_command, guile_command): Constify.
774         * printcmd.c (x_command, display_command, printf_command)
775         (output_command, set_command, call_command, print_command)
776         (eval_command): Constify.
777         (non_const_set_command): Remove.
778         (_initialize_printcmd): Update.
779         * source.c (forward_search_command, reverse_search_command):
780         Constify.
781         * jit.c (jit_reader_load_command, jit_reader_unload_command):
782         Constify.
783         * infrun.c (handle_command): Constify.
784         * memattr.c (mem_command): Constify.
785         * stack.c (return_command, up_command, up_silently_command)
786         (down_command, down_silently_command, frame_command)
787         (backtrace_command, func_command, backtrace_command_1): Constify.
788         (backtrace_command): Add non-const overload.
789         * remote-sim.c (simulator_command): Constify.
790         * exec.c (set_section_command): Constify.
791         * tracepoint.c (tdump_command, trace_variable_command)
792         (tstatus_command, tstop_command, tstart_command)
793         (end_actions_pseudocommand, while_stepping_pseudocommand)
794         (collect_pseudocommand, teval_pseudocommand, actions_command)
795         (start_tracing, stop_tracing): Constify.
796         * value.c (init_if_undefined_command): Constify.
797         * tui/tui-stack.c (tui_update_command): Constify.
798         * tui/tui-win.c (tui_refresh_all_command)
799         (tui_set_tab_width_command, tui_set_win_height_command)
800         (tui_set_focus_command, tui_scroll_forward_command)
801         (tui_scroll_backward_command, tui_scroll_left_command)
802         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
803         (tui_set_win_height): Constify.
804         * tui/tui-layout.c (tui_layout_command): Constify.
805         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
806         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
807         (proc_untrace_sysexit_cmd): Constify.
808         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
809         (threadset_test_cmd, threadlist_update_test_cmd)
810         (threadalive_test): Constify.
811         * objc-lang.c (print_object_command): Constify.
812         * command.h (add_com): Constify.
813         * cli/cli-dump.c (restore_command): Constify.
814         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
815         (help_command, complete_command, shell_command, edit_command)
816         (list_command, disassemble_command, make_command)
817         (apropos_command, alias_command): Constify.
818         * cli/cli-script.c (document_command, define_command)
819         (while_command, if_command, validate_comname): Constify.
820         * cli/cli-decode.c (struct cmd_list_element): Change type of
821         "fun".
822         * target.c (do_monitor_command, flash_erase_command): Constify.
823         * regcache.c (reg_flush_command): Constify.
824         * reverse.c (reverse_step, reverse_next, reverse_stepi)
825         (reverse_nexti, reverse_continue, reverse_finish)
826         (save_bookmark_command, goto_bookmark_command)
827         (exec_reverse_once): Constify.
828         * python/python.c (python_interactive_command, python_command):
829         Constify.
830         * typeprint.c (ptype_command, whatis_command, whatis_exp):
831         Constify.
832         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
833         * gcore.c (gcore_command): Constify.
834
835 2017-11-07  Tom Tromey  <tom@tromey.com>
836
837         * printcmd.c (x_command): Call set_repeat_arguments.
838         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
839         * top.c (repeat_arguments): New global.
840         (set_repeat_arguments): New function.
841         (execute_command): Handle repeat_arguments.
842         (show_commands): Calls set_repeat_arguments.
843         * command.h (set_repeat_arguments): Declare.
844
845 2017-11-07  Tom Tromey  <tom@tromey.com>
846
847         * stack.c (backtrace_command): Use std::string.
848         (backtrace_command_1): Make "count_exp" const.
849
850 2017-11-07  Tom Tromey  <tom@tromey.com>
851
852         * source.c (directory_switch, mod_path, add_path): Constify.
853         * defs.h (add_path, mod_path, directory_switch): Constify.
854         * mi/mi-cmd-env.c (env_mod_path): Constify.
855
856 2017-11-07  Tom Tromey  <tom@tromey.com>
857
858         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
859         (run_command_1, continue_command, step_1, jump_command)
860         (signal_command, until_command, advance_command, finish_command)
861         (attach_command): Update.
862
863 2017-11-07  Tom Tromey  <tom@tromey.com>
864
865         * command.h (set_cmd_cfunc): Don't declare.
866         * cli/cli-decode.c (set_cmd_cfunc): Now static.
867
868 2017-11-07  Tom Tromey  <tom@tromey.com>
869
870         * stack.c (select_frame_command): Constify.
871         * cli/cli-decode.c (add_com_suppress_notification): Constify.
872         * command.h (add_com_suppress_notification): Constify.
873
874 2017-11-07  Tom Tromey  <tom@tromey.com>
875
876         * breakpoint.c (stop_command): Constify.
877         * cli/cli-decode.c (struct cmd_list_element): Constify.
878         * command.h (add_abbrev_prefix_cmd): Constify.
879
880 2017-11-07  Pedro Alves  <palves@redhat.com>
881
882         * breakpoint.c (extract_bp_kind): New enum.
883         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
884         factored out from ...
885         (extract_bp_number_and_location): ... here.
886         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
887
888 2017-11-07  Pedro Alves  <palves@redhat.com>
889
890         * breakpoint.c (extract_bp_number_and_location): Change return
891         type to void.  Throw error instead of warning.
892         (enable_disable_command): Adjust.
893
894 2017-11-07  Xavier Roirand  <roirand@adacore.com>
895             Pedro Alves  <palves@redhat.com>
896
897         * breakpoint.c (map_breakpoint_number_range): New, factored out
898         from ...
899         (map_breakpoint_numbers): ... here.
900         (find_location_by_number): Change parameters from string to
901         breakpoint number and location.
902         (extract_bp_number_and_location): New function.
903         (enable_disable_bp_num_loc)
904         (enable_disable_breakpoint_location_range)
905         (enable_disable_command): New functions, factored out ...
906         (enable_command, disable_command): ... these functions, and
907         adjusted to support ranges.
908         * NEWS: Document enable/disable breakpoint location range feature.
909
910 2017-11-06  Luis Machado  <luis.machado@linaro.org>
911
912         * MAINTAINERS (Write After Approval): Update my e-mail address.
913
914 2017-11-06  Pedro Alves  <palves@redhat.com>
915
916         * gnu-nat.c (gnu_terminal_init): Delete.
917         (gnu_target): Don't install gnu_terminal_init.
918         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
919         (child_terminal_init): ... this function.
920
921 2017-11-06  Pedro Alves  <palves@redhat.com>
922
923         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
924         sgtty.h.
925         * config.in, configure: Regenerate.
926
927 2017-11-06  Pedro Alves  <palves@redhat.com>
928
929         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
930         (async_init_signals): Adjust.
931         (handle_stop_sig): Rename to ...
932         (handle_sigtstp): ... this.
933         (async_stop_sig): Rename to ...
934         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
935         SIGTSTP path.
936         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
937         instead of STOP_SIGNAL thoughout.
938         (handle_stop_sig): Rename to ...
939         (handle_sigtstp): ... this.
940         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
941
942 2017-11-06  Pedro Alves  <palves@redhat.com>
943
944         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
945         longer set flags twice in row.
946
947 2017-11-06  Pedro Alves  <palves@redhat.com>
948
949         * Makefile.in (SER_HARDWIRE): Update comment.
950         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
951         * common/gdb_termios.h: Delete file.
952         * common/job-control.c: Include termios.h and unistd.h instead of
953         gdb_termios.h.
954         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
955         check.
956         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
957         Remove sgtty code.
958         * configure.ac: No longer check for termio.h and sgtty.h.
959         * configure: Regenerate.
960         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
961         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
962         Replace PROCESS_GROUP_TYPE references with pid_t references
963         throughout.
964         (gdb_getpgrp): Delete.
965         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
966         (child_terminal_inferior): Remove comment.  Remove sgtty code.
967         (child_terminal_ours_1): Use tcgetpgrp directly instead of
968         gdb_getpgrp.  Use serial_set_tty_state instead aof
969         serial_noflush_set_tty_state.  Remove sgtty code.
970         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
971         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
972         (inferior_process_group): Now returns pid_t.
973         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
974         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
975         * ser-event.c (serial_event_ops): Update.
976         * ser-go32.c (dos_noflush_set_tty_state): Delete.
977         (dos_ops): Update.
978         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
979         * ser-pipe.c (pipe_ops): Update.
980         * ser-tcp.c (tcp_ops): Update.
981         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
982         HAVE_TERMIOS checks.
983         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
984         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
985         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
986         assume termios.
987         (hardwire_noflush_set_tty_state): Delete.
988         (hardwire_print_tty_state, hardwire_drain_output)
989         (hardwire_flush_output, hardwire_flush_input)
990         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
991         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
992         code, and assume termios.
993         (hardwire_ops): Update.
994         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
995         * serial.c (serial_noflush_set_tty_state): Delete.
996         * serial.h (serial_noflush_set_tty_state): Delete.
997         (serial_ops::noflush_set_tty_state): Delete.
998
999 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1000
1001         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1002         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1003         (COMMON_OBS): Remove doublest.o and dfp.o.
1004         Do not build target-float.c (instead of doublest.c)
1005         with -Wformat-nonliteral.
1006
1007         * doublest.c: Remove file.
1008         * doublest.h: Remove file.
1009         * dfp.c: Remove file.
1010         * dfp.h: Remove file.
1011
1012         * target-float.c: Do not include "doublest.h" and "dfp.h".
1013         (DOUBLEST): Move here from doublest.h.
1014         (enum float_kind): Likewise.
1015         (FLOATFORMAT_CHAR_BIT): Likewise.
1016         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1017         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1018         (floatformat_precision): Likewise.
1019         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1020         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1021         Likewise.
1022         (host_float_format, host_double_format, host_long_double_format):
1023         Likewise.
1024         (floatformat_to_string, floatformat_from_string): Likewise.
1025         (floatformat_to_doublest): Likewise.  Also, inline the original
1026         convert_floatformat_to_doublest.
1027         (floatformat_from_doublest): Likewise.  Also, inline the original
1028         convert_floatformat_from_doublest.
1029
1030         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1031         (MAX_DECIMAL_STRING): Move here from dfp.c.
1032         (match_endianness): Likewise.
1033         (set_decnumber_context, decimal_check_errors): Likewise.
1034         (decimal_from_number, decimal_to_number): Likewise.
1035         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1036         (decimal_from_longest, decimal_from_ulongest): Likewise.
1037         (decimal_to_longest): Likewise.
1038         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1039         (decimal_convert): Likewise.
1040
1041 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1042
1043         * doublest.c: Do not include "gdbtypes.h".
1044         (extract_typed_floating): Remove.
1045         (store_typed_floating): Remove.
1046         (convert_typed_floating): Remove.
1047         * doublest.h (struct type): Remove.
1048         (DOUBLEST_PRINT_FORMAT): Remove.
1049         (DOUBLEST_SCAN_FORMAT): Remove.
1050         (extract_typed_floating): Remove.
1051         (store_typed_floating): Remove.
1052         (convert_typed_floating): Remove.
1053
1054         * dfp.c (decimal_from_doublest): Remove.
1055         (decimal_to_doublest): Remove.
1056         * dfp.h: Do not include "doublest.h".
1057         (decimal_from_doublest): Remove.
1058         (decimal_to_doublest): Remove.
1059
1060         * value.c: Do not include "doublest.h" and "dfp.h".
1061         (value_as_double): Remove.
1062         (unpack_double): Remove.
1063         (value_from_double): Remove.
1064         (value_from_decfloat): Remove.
1065         * value.h: Do not include "doublest.h".
1066         (value_as_double): Remove.
1067         (unpack_double): Remove.
1068         (value_from_double): Remove.
1069         (value_from_decfloat): Remove.
1070
1071 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1072
1073         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1074         (i386_extract_return_value): Use target_float_convert.
1075         (i386_store_return_value): Likewise.
1076         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1077         (i387_value_to_register): Likewise.
1078         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1079         (ia64_register_to_value): Use target_float_convert.
1080         (ia64_value_to_register): Likewise.
1081         (ia64_extract_return_value): Likewise.
1082         (ia64_store_return_value): Likewise.
1083         (ia64_push_dummy_call): Likewise.
1084         * m68k-tdep.c: Include "target-float.h".
1085         (m68k_register_to_value): Use target_float_convert.
1086         (m68k_value_to_register): Likewise.
1087         (m68k_svr4_extract_return_value): Likewise.
1088         (m68k_svr4_store_return_value): Likewise.
1089         * ppc-sysv-tdep.c: Include "target-float.h".
1090         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1091         (do_ppc_sysv_return_value): Likewise.
1092         (ppc64_sysv_abi_push_freg): Likewise.
1093         (ppc64_sysv_abi_return_value_base): Likewise.
1094         * rs6000-aix-tdep.c: Include "target-float.h".
1095         (rs6000_push_dummy_call): Use target_float_convert.
1096         (rs6000_return_value): Likewise.
1097         * rs6000-lynx178-tdep.c: Include "target-float.h".
1098         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1099         (rs6000_lynx178_return_value): Likewise.
1100         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1101         (rs6000_register_to_value): Use target_float_convert.
1102         (rs6000_value_to_register): Likewise.
1103         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1104         (arm_extract_return_value): Use target_float_convert.
1105         (arm_store_return_value): Likewise.
1106         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1107         (sh_register_convert_to_virtual): Use target_float_convert.
1108         (sh_register_convert_to_raw): Likewise.
1109         * sh64-tdep.c: Include "target-float.h".
1110         (sh64_extract_return_value): Use target_float_convert.
1111         (sh64_register_convert_to_virtual): Likewise.
1112         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1113
1114 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1115
1116         * target-float.c (floatformat_to_host_double): New function.
1117         (floatformat_from_host_double): Likewise.
1118         (target_float_to_host_double): Likewise.
1119         (target_float_from_host_double): Likewise.
1120         * target-float.h (target_float_to_host_double): Add prototype.
1121         (target_float_from_host_double): Likewise.
1122
1123         * guile/scm-value.c: Include "target-float.h".
1124         (gdbscm_value_to_real): Use target_float_to_host_double.
1125         Handle integer source values via value_as_long.
1126         * guile/scm-math.c: Include "target-float.h".  Do not include
1127         "doublest.h", "dfp.h", and "expression.h".
1128         (vlscm_convert_typed_number): Use target_float_from_host_double.
1129         (vlscm_convert_number): Likewise.
1130
1131         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1132         (convert_value_from_python): Use target_float_from_host_double.
1133
1134 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1135
1136         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1137         (cast_from_fixed): Likewise.
1138         (ada_scaling_type): New function.
1139         (ada_delta): Return value instead of DOUBLEST.  Perform target
1140         arithmetic instead of host arithmetic.
1141         (scaling_factor): Rename to ...
1142         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1143         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1144         (ada_fixed_to_float): Remove.
1145         (ada_float_to_fixed): Remove.
1146         * ada-lang.h (ada_fixed_to_float): Remove.
1147         (ada_float_to_fixed): Remove.
1148         (ada_delta): Return value instead of DOUBLEST.
1149         (ada_scaling_factor): Add prototype.
1150
1151         * ada-typeprint.c: Include "target-float.h".
1152         (print_fixed_point_type): Perform target arithmetic instead of
1153         host arithmetic.
1154         * ada-valprint.c: Include "target-float.h".
1155         (ada_val_print_num): Perform target arithmetic instead of
1156         host arithmetic for fixed-point types.
1157
1158 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1159
1160         * target-float.c: Include <math.h>.
1161         (floatformat_binop): New function.
1162         (floatformat_compare): Likewise.
1163         (target_float_binop): Likewise.
1164         (target_float_compare): Likewise.
1165         * target-float.h: Include "expression.h".
1166         (target_float_binop): Add prototype.
1167         (target_float_compare): Likewise.
1168
1169         * valarith.c: Do not include "doublest.h" and "dfp.h".
1170         Include "common/byte-vector.h".
1171         (value_args_as_decimal): Remove, replace by ...
1172         (value_args_as_target_float): ... this function.  Handle both
1173         binary and decimal target floating-point formats.
1174         (scalar_binop): Handle both binary and decimal FP using
1175         value_args_as_target_float and target_float_binop.
1176         (value_equal): Handle both binary and decimal FP using
1177         value_args_as_target_float and target_float_compare.
1178         (value_less): Likewise.
1179         (value_pos): Handle all scalar types as simple copy.
1180         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1181         * dfp.c (decimal_binop): Throw error instead of internal_error
1182         when called with an unsupported operation code.
1183
1184 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1185
1186         * target-float.c (target_float_to_string): New function.
1187         (target_float_from_string): New function.
1188         * target-float.h (target_float_to_string): Add prototype.
1189         (target_float_from_string): Add prototype.
1190
1191         * valprint.c: Include "target-float.h".  Do not include
1192         "doublest.h" and "dfp.h".
1193         (print_floating): Use target_float_to_string.
1194         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1195         (printf_floating): Use target_float_to_string.
1196         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1197         (print_i387_value): Use target_float_to_string.
1198         * mips-tdep.c: Include "target-float.h".
1199         (mips_print_fp_register): Use target_float_to_string.
1200         * sh64-tdep.c: Include "target-float.h".
1201         (sh64_do_fp_register): Use target_float_to_string.
1202
1203         * parse.c: Include "target-float.h".  Do not include
1204         "doublest.h" and "dfp.h".
1205         (parse_float): Use target_float_from_string.
1206         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1207         (define_symbol): Use target_float_from_string.
1208         * gdbarch-selftests.c: Include "target-float.h".
1209         (register_to_value_test): Use target_float_from_string.
1210
1211 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1212
1213         * Makefile.c (SFILES): Add target-float.c.
1214         (HFILES_NO_SRCDIR): Add target-float.h.
1215         (COMMON_OBS): Add target-float.o.
1216         * target-float.h: New file.
1217         * target-float.c: New file.
1218
1219         * doublest.c (floatformat_classify): Fix detection of float_zero.
1220
1221         * gdbtypes.c (is_floating_type): New function.
1222         * gdbtypes.h (is_floating_type): Add prototype.
1223
1224         * value.c: Do not include "floatformat.h".
1225         (unpack_double): Use target_float_is_valid.
1226         (is_floating_value): New function.
1227         * value.h (is_floating_value): Add prototype-
1228
1229         * valarith.c: Include "target-float.h".
1230         (value_logical_not): Use target_float_is_zero.
1231
1232         * python/py-value.c: Include "target-float.h".
1233         (valpy_nonzero): Use target_float_is_zero.
1234
1235 2017-11-04  Tom Tromey  <tom@tromey.com>
1236
1237         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1238
1239 2017-11-04  Tom Tromey  <tom@tromey.com>
1240
1241         * breakpoint.c (set_momentary_breakpoint): Return
1242         breakpoint_up.
1243         (until_break_command): Update.
1244         (new_until_break_fsm): Change argument types to
1245         breakpoint_up.
1246         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1247         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1248         Remove.
1249         * infcmd.c (finish_forward): Update.
1250         * breakpoint.h (set_momentary_breakpoint)
1251         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1252         (make_cleanup_delete_breakpoint): Remove.
1253         (struct breakpoint_deleter): New.
1254         (breakpoint_up): New typedef.
1255         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1256         (insert_exception_resume_breakpoint): Update.
1257         (insert_exception_resume_from_probe): Update.
1258         (insert_longjmp_resume_breakpoint): Update.
1259         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1260         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1261         * infcall.c (call_function_by_hand_dummy): Update
1262
1263 2017-11-04  Tom Tromey  <tom@tromey.com>
1264
1265         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1266
1267 2017-11-04  Tom Tromey  <tom@tromey.com>
1268
1269         * linux-tdep.c (linux_core_info_proc_mappings): Use
1270         gdb::def_vector.
1271         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1272         "size" argument.
1273         (linux_corefile_thread): Update.
1274         (linux_make_corefile_notes): Remove unused variable.
1275
1276 2017-11-04  Tom Tromey  <tom@tromey.com>
1277
1278         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1279         gdb::byte_vector.
1280
1281 2017-11-04  Tom Tromey  <tom@tromey.com>
1282
1283         * objfiles.c (do_free_objfile_cleanup): Remove.
1284         * compile/compile-object-load.c (compile_object_load): Update.
1285         * objfiles.h (make_cleanup_free_objfile): Remove.
1286
1287 2017-11-04  Tom Tromey  <tom@tromey.com>
1288
1289         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1290         (adi_read_versions): Change "tags" to "gdb_byte *".
1291         (adi_print_versions): Likewise.
1292
1293 2017-11-04  Tom Tromey  <tom@tromey.com>
1294
1295         * breakpoint.c
1296         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1297         from start_rbreak_breakpoints.
1298         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1299         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1300         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1301         * symtab.c (do_end_rbreak_breakpoints): Remove.
1302         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1303
1304 2017-11-04  Tom Tromey  <tom@tromey.com>
1305
1306         * cp-namespace.c (reset_directive_searched): Remove.
1307         (cp_lookup_symbol_via_imports): Use scoped_restore.
1308         * cp-support.c (reset_directive_searched): Remove.
1309         (make_symbol_overload_list_using): Use scoped_restore.
1310         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1311         (reset_directive_searched): Remove.
1312
1313 2017-11-04  Tom Tromey  <tom@tromey.com>
1314
1315         * symfile.c (find_separate_debug_file_by_debuglink): Use
1316         unique_xmalloc_ptr.
1317
1318 2017-11-04  Tom Tromey  <tom@tromey.com>
1319
1320         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1321         type of "info".
1322         (compute_stack_depth): Likewise.
1323         (do_compile_dwarf_expr_to_c): Use std::vector.
1324
1325 2017-11-04  Tom Tromey  <tom@tromey.com>
1326
1327         * compile/compile-object-load.c (link_callbacks_einfo): Use
1328         std::string.
1329
1330 2017-11-04  Tom Tromey  <tom@tromey.com>
1331
1332         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1333         Use scoped_free_pendings.
1334         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1335         scoped_free_pendings.
1336         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1337         (xcoff_initial_scan): Likewise.
1338         * buildsym.c (reset_symtab_globals): Update comment.
1339         (scoped_free_pendings): Rename from really_free_pendings.
1340         (prepare_for_building): Update comment.
1341         (buildsym_init): Likewise.
1342         * buildsym.h (class scoped_free_pendings): New class.
1343         (really_free_pendings): Don't declare.
1344
1345 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1346
1347         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1348         output when converting a zero value to a special byteorder format.
1349
1350 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1351
1352         * frame.c (do_frame_register_read): Remove aspace.
1353         * jit.c (jit_frame_sniffer): Likwise.
1354         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1355         * regcache.c (regcache::regcache): Pass nullptr.
1356         (regcache_print): Caller updated.
1357         * regcache.h (regcache::regcache): Remove one constructor
1358         parameter aspace.
1359
1360 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1361
1362         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1363
1364 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1365
1366         * breakpoint.c (insert_single_step_breakpoints): Update.
1367         * frame.c (struct frame_info) <aspace>: Add const.
1368         (frame_save_as_regcache): Add const.
1369         (get_frame_address_space): Return const address_space *.
1370         * frame.h (get_frame_address_space): Update declaration.
1371         * infrun.c (struct step_over_info) <aspace>: Add const.
1372         (set_step_over_info): Make aspace const.
1373         (displaced_step_prepare_throw): Change variable const.
1374         (resume): Likewise.
1375         (proceed): Likewise.
1376         (adjust_pc_after_break): Likewise.
1377         (save_waitstatus): Likewise.
1378         (handle_signal_stop): Likewise.
1379         (keep_going_pass_signal): Likewise.
1380         * jit.c (jit_frame_sniffer): Add const.
1381         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1382         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1383         * record-full.c (record_full_wait_1): Likewise.
1384         * regcache.c (regcache::regcache): Change parameter to const.
1385         * regcache.h (regcache::regcache): Likewise.
1386         (regcache::aspace): Return const address_space *.
1387         (regcache) <m_aspace>: Add const.
1388
1389 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1390
1391         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1392         * frame.c (create_sentinel_frame): Likewise.
1393         * infrun.c (displaced_step_prepare_throw): Likewise.
1394         (resume): Likewise.
1395         (thread_still_needs_step_over_bp): Likewise.
1396         (proceed): Likewise.
1397         (do_target_wait): Likewise.
1398         (adjust_pc_after_break): Likewise.
1399         (handle_syscall_event): Likewise.
1400         (save_waitstatus): Likewise.
1401         (handle_inferior_event_1): Likewise.
1402         (handle_signal_stop): Likewise.
1403         (keep_going_pass_signal): Likewise.
1404         * linux-nat.c (status_callback): Likewise.
1405         (save_stop_reason): Likewise.
1406         (resume_stopped_resumed_lwps): Likewise.
1407         * record-full.c (record_full_exec_insn): Likewise.
1408         (record_full_wait_1): Likewise.
1409         * regcache.c (get_regcache_aspace): Remove.
1410         * regcache.h (get_regcache_aspace): Remove.
1411
1412 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1413
1414         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1415         (init_regcache_descr): Use gdbarch_num_regs.
1416         (regcache::regcache): Likewise.
1417         (regcache::get_register_status): Likewise.
1418         (regcache::assert_raw_regnum): Likewise.
1419         (regcache::cooked_read): Likewise.
1420         (regcache::cooked_read_value): Likewise.
1421         (regcache::cooked_write): Likewise.
1422         (regcache::dump): Likewise.
1423         (regcache::num_raw_registers): New method.
1424         * regcache.h (class regcache) <num_raw_registers>: New.
1425
1426 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1427
1428         * regcache.c (regcache::assert_regnum): New method.
1429         (regcache::invalidate): Call assert_regnum.
1430         (regcache::raw_update): Likewise.
1431         (regcache::raw_write): Likewise.
1432         (regcache::raw_read_part): Likewise.
1433         (regcache::raw_write_part): Likewise.
1434         (regcache::raw_supply): Likewise.
1435         (regcache::raw_supply_integer): Likewise.
1436         (regcache::raw_supply_zeroed): Likewise.
1437         (regcache::raw_collect): Likewise.
1438         (regcache::raw_collect_integer): Likewise.
1439         * regcache.h (regcache::assert_regnum): Declare.
1440
1441 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1442
1443         * regcache.c (regcache::dump): Remove code.
1444
1445 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1446
1447         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1448         Remove.
1449         <sizeof_cooked_register_status>: Remove.
1450         (init_regcache_descr): Update.
1451         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1452         (regcache::save): Likewise.
1453         (regcache::dump): Likewise.
1454
1455 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1456
1457         * ft32-tdep.c (ft32_fetch_instruction): New function.
1458         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1459
1460 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1461
1462         * cli/cli-script.c (execute_control_command): Rename to ...
1463         (execute_control_command_1): ... this.
1464         (execute_control_command): New function.
1465
1466 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1467
1468         * tracepoint.c (tfind_command): Remove const_cast.
1469
1470 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1471
1472         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1473
1474 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1475
1476         * common/common-utils.h (in_inclusive_range): New function.
1477         * arm-tdep.c (arm_record_extension_space): Use
1478         in_inclusive_range.
1479         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1480         * cris-tdep.c (cris_spec_reg_applicable): Use
1481         in_inclusive_range.
1482
1483 2017-10-30  Pedro Alves  <palves@redhat.com>
1484             Simon Marchi <simon.marchi@ericsson.com>
1485
1486         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1487         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1488
1489 2017-10-30  Pedro Alves  <palves@redhat.com>
1490
1491         * common/common-utils.c (string_appendf, string_vappendf): New
1492         functions.
1493         * common/common-utils.h (string_appendf, string_vappendf): New
1494         declarations.
1495         * unittests/common-utils-selftests.c (string_appendf_func)
1496         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1497         (string_vappendf_tests): New functions.
1498         (_initialize_common_utils_selftests): Register "string_appendf" and
1499         "string_vappendf tests".
1500
1501 2017-10-30  Pedro Alves  <palves@redhat.com>
1502
1503         * unittests/common-utils-selftests.c (format_func): New typedef.
1504         (string_printf_tests, string_vprintf_tests): Tests factored out
1505         and merged to ...
1506         (test_format_func): ... this new function.
1507         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1508         test_format_func.
1509
1510 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1511
1512         * darwin-nat.c: Remove include of gdb.h.
1513
1514 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1515
1516         * xtensa-xtregs.c: Fix formatting issues.
1517
1518 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1519
1520         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1521
1522 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1523
1524         PR python/21213
1525         * python/py-infthread.c (thpy_get_inferior): Increment reference
1526         of inferior before returning it.
1527
1528 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1529
1530         * unittests/common-utils-selftests.c (format): Add
1531         ATTRIBUTE_PRINTF.
1532
1533 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1534
1535         * xml-syscall.c (struct syscall_desc): Add constructor.
1536         <name>: Change type to std::string.
1537         (syscall_desc_up): New typedef.
1538         (syscall_desc_p): Remove typeder.
1539         (DEF_VEC_P(syscall_desc_p)): Remove.
1540         (struct syscall_group_desc): Add constructor.
1541         <name>: Change type to std::string.
1542         <syscalls>: Change type to std::vector.
1543         (syscall_group_desc_up): New typedef.
1544         (syscall_group_desc_p): Remove typedef.
1545         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1546         (struct syscalls_info) <syscalls>: Change type to std::vector of
1547         unique_ptr.
1548         <groups>: Likewise.
1549         <my_gdb_datadir>: Change type to std::string.
1550         (syscalls_info_up): New typedef.
1551         (allocate_syscalls_info): Remove.
1552         (syscalls_info_free_syscalls_desc): Remove.
1553         (syscalls_info_free_syscall_group_desc): Remove.
1554         (free_syscalls_info): Remove.
1555         (make_cleanup_free_syscalls_info): Remove.
1556         (syscall_group_create_syscall_group_desc): Adjust.
1557         (syscall_group_add_syscall): Adjust.
1558         (syscall_create_syscall_desc): Adjust.
1559         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1560         (init_syscalls_info): Adjust.
1561         (syscall_group_get_group_by_name): Adjust.
1562         (xml_get_syscall_number): Adjust.
1563         (xml_get_syscall_name): Adjust.
1564         (xml_list_of_syscalls): Adjust.
1565         (xml_list_syscalls_by_group): Adjust.
1566         (xml_list_of_groups): Adjust.
1567
1568 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1569
1570         * probe.h: Don't include gdb_vecs.h.
1571         (DEF_VEC_P (probe_p)): Remove.
1572         (find_probes_in_objfile): Return an std::vector.
1573         * probe.c (find_probes_in_objfile): Likewise.
1574         * breakpoint.c (breakpoint_objfile_data)
1575         <longjmp_probes>: Change type to std::vector.
1576         <exception_probes>: Likewise.
1577         (free_breakpoint_probes): Don't manually free vectors.
1578         (create_longjmp_master_breakpoint): Adjust.
1579         (create_exception_master_breakpoint): Adjust.
1580         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1581         parameter type, adjust.
1582         (svr4_create_solib_event_breakpoints): Adjust.
1583
1584 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1585
1586         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1587         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1588         with new.
1589         (free_breakpoint_probes): Rename to ...
1590         (free_breakpoint_objfile_data): ... this, and call delete on
1591         bp_objfile_data..
1592
1593 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1594
1595         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1596         (loaded_script_ptr): Remove typedef.
1597         (DEF_VEC_P (loaded_script_ptr)): Remove.
1598         (struct collect_matching_scripts_data): Add constructor.
1599         <scripts_p>: Change type to (pointer to) std::vector.
1600         (collect_matching_scripts_data): Adjust.
1601         (sort_scripts_by_name): Make suitable for std::sort.
1602         (print_scripts): Don't sort vector, adjust to std::vector.
1603         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1604
1605 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1606
1607         * symfile.c (filename_language): Make struct, not typedef.  Add
1608         constructor.
1609         <ext>: Change type to std::string.
1610         (DEF_VEC_O (filename_language)): Remove.
1611         (filename_language_table): Change type to std::vector.
1612         (add_filename_language): Adjust.
1613         (set_ext_lang_command): Adjust.
1614         (info_ext_lang_command): Adjust.
1615         (deduce_language_from_filename): Adjust.
1616         (class scoped_restore_filename_language_table): Remove.
1617         (test_filename_language): Use scoped_restore.
1618         (test_set_ext_lang_command): Use scoped_restore, adjust to
1619         std::vector change.
1620
1621 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1622
1623         * symfile.c: Include selftest.h.
1624         (class scoped_restore_filename_language_table): New.
1625         (test_filename_language): New test.
1626         (test_set_ext_lang_command): New test.
1627         (_initialize_symfile): Register tests.
1628
1629 2017-10-27  Keith Seitz  <keiths@redhat.com>
1630
1631         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1632         in the bp_location, falling back to find_pc_sect_function when
1633         needed.
1634         (add_location_to_breakpoint): Save sal->symbol.
1635         * breakpoint.h (struct bp_location) <symbol>: New field.
1636         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1637         * symtab.h (struct symtab_and_line) <symbol>: New field.
1638
1639 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1640
1641         PR gdb/13669
1642         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1643         to rewind obstack.
1644
1645 2017-10-26  Pedro Alves  <palves@redhat.com>
1646
1647         * remote.c (remote_async_terminal_ours_p): Delete.
1648         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1649         Remove references to 'remote_async_terminal_ours_p'.
1650
1651 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1652
1653         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1654
1655 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1656
1657         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1658         aspace const.
1659         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1660         Likewise.
1661         * breakpoint.c (bpstat_check_location): Remove cast.
1662         (breakpoint_hit_catch_fork): Make aspce const.
1663         (breakpoint_hit_catch_solib): Likewise.
1664         (breakpoint_hit_catch_exec): Likewise.
1665         (breakpoint_hit_ranged_breakpoint): Likewise.
1666         (breakpoint_hit_watchpoint): Likewise.
1667         (base_breakpoint_breakpoint_hit): Likewise.
1668         (bkpt_breakpoint_hit): Likewise.
1669         (dprintf_breakpoint_hit): Likewise.
1670         (tracepoint_breakpoint_hit): Likewise.
1671         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1672
1673 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1674
1675         * breakpoint.c (breakpoint_location_address_match): Change
1676         "struct address_space *" to "const address_space".
1677         (breakpoint_location_address_range_overlap): Likewise.
1678         (breakpoint_here_p): Likewise.
1679         (breakpoint_in_range_p): Likewise.
1680         (moribund_breakpoint_here_p): Likewise.
1681         (bp_location_inserted_here_p): Likewise.
1682         (software_breakpoint_inserted_here_p): Likewise.
1683         (hardware_breakpoint_inserted_here_p): Likewise.
1684         (hardware_watchpoint_inserted_in_range): Likewise.
1685         (bpstat_check_location): Likewise.
1686         (bpstat_stop_status): Likewise.
1687         (breakpoint_address_match): Likewise.
1688         (breakpoint_address_match_range): Likewise.
1689         (breakpoint_location_address_match): Likewise.
1690         (breakpoint_location_address_range_overlap): Likewise.
1691         (insert_single_step_breakpoint): Likewise.
1692         (breakpoint_has_location_inserted_here): Likewise.
1693         (single_step_breakpoint_inserted_here_p): Likewise.
1694         (pc_at_non_inline_function): Likewise.
1695         * breakpoint.h (bpstat_stop_status): Update declaration.
1696         (breakpoint_here_p): Likewise.
1697         (breakpoint_in_range_p): Likewise.
1698         (moribund_breakpoint_here_p): Likewise.
1699         (breakpoint_inserted_here_p): Likewise.
1700         (software_breakpoint_inserted_here_p): Likewise.
1701         (hardware_breakpoint_inserted_here_p): Likewise.
1702         (breakpoint_has_location_inserted_here): Likewise.
1703         (single_step_breakpoint_inserted_here_p): Likewise.
1704         (hardware_watchpoint_inserted_in_range): Likewise.
1705         (breakpoint_address_match): Likewise.
1706         (insert_single_step_breakpoint): Likewise.
1707         (pc_at_non_inline_function): Likewise.
1708         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1709         * record.c (record_check_stopped_by_breakpoint): Likewise.
1710         * record.h (record_check_stopped_by_breakpoint): Likewise.
1711         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1712
1713 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1714
1715         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1716         regcache->arch () instead get_regcache_arch.
1717         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1718         Likewise.
1719         (aarch64_fbsd_store_inferior_registers): Likewise.
1720         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1721         (store_gregs_to_thread): Likewise.
1722         (fetch_fpregs_from_thread): Likewise.
1723         (store_fpregs_to_thread): Likewise.
1724         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1725         (aarch64_store_return_value): Likewise.
1726         (aarch64_software_single_step): Likewise.
1727         * aix-thread.c (aix_thread_wait): Likewise.
1728         (supply_reg32): Likewise.
1729         (supply_sprs64): Likewise.
1730         (supply_sprs32): Likewise.
1731         (fill_gprs64): Likewise.
1732         (fill_gprs32): Likewise.
1733         (fill_sprs64): Likewise.
1734         (fill_sprs32): Likewise.
1735         (store_regs_user_thread): Likewise.
1736         (store_regs_kernel_thread): Likewise.
1737         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1738         (alphabsd_store_inferior_registers): Likewise.
1739         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1740         (alpha_store_return_value): Likewise.
1741         (alpha_deal_with_atomic_sequence): Likewise.
1742         (alpha_next_pc): Likewise.
1743         (alpha_software_single_step): Likewise.
1744         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1745         (amd64bsd_store_inferior_registers): Likewise.
1746         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1747         Likewise.
1748         (amd64_linux_store_inferior_registers): Likewise.
1749         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1750         (amd64_collect_native_gregset): Likewise.
1751         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1752         (amd64obsd_collect_uthread): Likewise.
1753         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1754         (amd64_collect_fpregset): Likewise.
1755         (amd64_supply_fxsave): Likewise.
1756         (amd64_supply_xsave): Likewise.
1757         (amd64_collect_fxsave): Likewise.
1758         (amd64_collect_xsave): Likewise.
1759         * arc-tdep.c (arc_write_pc): Likewise.
1760         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1761         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1762         (arm_fbsd_store_inferior_registers): Likewise.
1763         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1764         (store_vfp_regs): Likewise.
1765         (arm_linux_fetch_inferior_registers): Likewise.
1766         (arm_linux_store_inferior_registers): Likewise.
1767         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1768         (arm_linux_sigreturn_next_pc): Likewise.
1769         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1770         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1771         (fetch_register): Likewise.
1772         (store_register): Likewise.
1773         * arm-tdep.c (arm_is_thumb): Likewise.
1774         (displaced_in_arm_mode): Likewise.
1775         (bx_write_pc): Likewise.
1776         (arm_get_next_pcs_addr_bits_remove): Likewise.
1777         (arm_software_single_step): Likewise.
1778         (arm_extract_return_value): Likewise.
1779         (arm_store_return_value): Likewise.
1780         (arm_write_pc): Likewise.
1781         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1782         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1783         (bsd_uthread_store_registers): Likewise.
1784         * core-regset.c (fetch_core_registers): Likewise.
1785         * corelow.c (get_core_registers): Likewise.
1786         * cris-tdep.c (cris_store_return_value): Likewise.
1787         (cris_extract_return_value): Likewise.
1788         (find_step_target): Likewise.
1789         (find_step_target): Likewise.
1790         (cris_software_single_step): Likewise.
1791         * ctf.c (ctf_fetch_registers): Likewise.
1792         * darwin-nat.c (cancel_breakpoint): Likewise.
1793         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1794         * frv-tdep.c (frv_extract_return_value): Likewise.
1795         * ft32-tdep.c (ft32_store_return_value): Likewise.
1796         (ft32_extract_return_value): Likewise.
1797         * go32-nat.c (fetch_register): Likewise.
1798         (go32_fetch_registers): Likewise.
1799         (go32_store_registers): Likewise.
1800         (store_register): Likewise.
1801         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1802         (h8300_store_return_value): Likewise.
1803         * hppa-linux-nat.c (fetch_register): Likewise.
1804         (store_register): Likewise.
1805         (hppa_linux_fetch_inferior_registers): Likewise.
1806         (hppa_linux_store_inferior_registers): Likewise.
1807         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1808         (i386_darwin_store_inferior_registers): Likewise.
1809         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1810         (gnu_store_registers): Likewise.
1811         * i386-linux-nat.c (fetch_register): Likewise.
1812         (store_register): Likewise.
1813         (supply_gregset): Likewise.
1814         (fill_gregset): Likewise.
1815         (i386_linux_fetch_inferior_registers): Likewise.
1816         (i386_linux_store_inferior_registers): Likewise.
1817         (i386_linux_resume): Likewise.
1818         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1819         Likewise.
1820         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1821         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1822         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1823         (i386obsd_collect_uthread): Likewise.
1824         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1825         (i386_supply_gregset): Likewise.
1826         (i386_collect_gregset): Likewise.
1827         (i386_supply_fpregset): Likewise.
1828         (i386_collect_fpregset): Likewise.
1829         (i386_mpx_bd_base): Likewise.
1830         * i386-v4-nat.c (supply_fpregset): Likewise.
1831         (fill_fpregset): Likewise.
1832         * i387-tdep.c (i387_supply_fsave): Likewise.
1833         (i387_collect_fsave): Likewise.
1834         (i387_supply_fxsave): Likewise.
1835         (i387_collect_fxsave): Likewise.
1836         (i387_supply_xsave): Likewise.
1837         (i387_collect_xsave): Likewise.
1838         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1839         (ia64_linux_store_registers): Likewise.
1840         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1841         (ia64_extract_return_value): Likewise.
1842         (ia64_store_return_value): Likewise.
1843         (find_func_descr): Likewise.
1844         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1845         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1846         (inf_ptrace_store_registers): Likewise.
1847         * infrun.c (use_displaced_stepping): Likewise.
1848         (displaced_step_prepare_throw): Likewise.
1849         (resume): Likewise.
1850         (proceed): Likewise.
1851         (do_target_wait): Likewise.
1852         (adjust_pc_after_break): Likewise.
1853         (handle_inferior_event_1): Likewise.
1854         (handle_signal_stop): Likewise.
1855         (save_infcall_suspend_state): Likewise.
1856         (restore_infcall_suspend_state): Likewise.
1857         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1858         * jit.c (jit_frame_prev_register): Likewise.
1859         * linux-nat.c (save_stop_reason): Likewise.
1860         (linux_nat_wait_1): Likewise.
1861         (resume_stopped_resumed_lwps): Likewise.
1862         * linux-record.c (record_linux_sockaddr): Likewise.
1863         (record_linux_msghdr): Likewise.
1864         (record_linux_system_call): Likewise.
1865         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1866         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1867         (lm32_store_return_value): Likewise.
1868         * m32c-tdep.c (m32c_read_flg): Likewise.
1869         (m32c_pseudo_register_read): Likewise.
1870         (m32c_pseudo_register_write): Likewise.
1871         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1872         (m32r_linux_collect_gregset): Likewise.
1873         * m32r-tdep.c (m32r_store_return_value): Likewise.
1874         (m32r_extract_return_value): Likewise.
1875         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1876         (m68kbsd_collect_fpregset): Likewise.
1877         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1878         * m68k-linux-nat.c (fetch_register): Likewise.
1879         (old_fetch_inferior_registers): Likewise.
1880         (old_store_inferior_registers): Likewise.
1881         (store_regs): Likewise.
1882         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1883         (m68k_svr4_store_return_value): Likewise.
1884         * m88k-tdep.c (m88k_store_arguments): Likewise.
1885         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1886         (mi_cmd_data_write_register_values): Likewise.
1887         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1888         (mips_fbsd_store_inferior_registers): Likewise.
1889         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1890         (mips_fbsd_supply_gregs): Likewise.
1891         (mips_fbsd_collect_fpregs): Likewise.
1892         (mips_fbsd_collect_gregs): Likewise.
1893         (mips_fbsd_supply_fpregset): Likewise.
1894         (mips_fbsd_collect_fpregset): Likewise.
1895         (mips_fbsd_supply_gregset): Likewise.
1896         (mips_fbsd_collect_gregset): Likewise.
1897         * mips-linux-nat.c (supply_gregset): Likewise.
1898         (fill_gregset): Likewise.
1899         (supply_fpregset): Likewise.
1900         (fill_fpregset): Likewise.
1901         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1902         (mips_fill_gregset): Likewise.
1903         (mips_supply_fpregset): Likewise.
1904         (mips_fill_fpregset): Likewise.
1905         (mips64_supply_gregset): Likewise.
1906         (micromips_linux_sigframe_validate): Likewise.
1907         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1908         (mipsnbsd_fetch_inferior_registers): Likewise.
1909         (mipsnbsd_store_inferior_registers): Likewise.
1910         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1911         (mipsnbsd_supply_gregset): Likewise.
1912         (mipsnbsd_iterate_over_regset_sections): Likewise.
1913         (mipsnbsd_supply_reg): Likewise.
1914         (mipsnbsd_supply_fpreg): Likewise.
1915         * mips-tdep.c (mips_in_frame_stub): Likewise.
1916         (mips_dummy_id): Likewise.
1917         (is_octeon_bbit_op): Likewise.
1918         (micromips_bc1_pc): Likewise.
1919         (extended_mips16_next_pc): Likewise.
1920         (mips16_next_pc): Likewise.
1921         (deal_with_atomic_sequence): Likewise.
1922         * moxie-tdep.c (moxie_process_readu): Likewise.
1923         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1924         * nto-procfs.c (procfs_store_registers): Likewise.
1925         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1926         (ppcfbsd_store_inferior_registers): Likewise.
1927         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1928         (fetch_altivec_register): Likewise.
1929         (get_spe_registers): Likewise.
1930         (fetch_spe_register): Likewise.
1931         (fetch_altivec_registers): Likewise.
1932         (fetch_all_gp_regs): Likewise.
1933         (fetch_all_fp_regs): Likewise.
1934         (store_vsx_register): Likewise.
1935         (store_altivec_register): Likewise.
1936         (set_spe_registers): Likewise.
1937         (store_spe_register): Likewise.
1938         (store_altivec_registers): Likewise.
1939         (store_all_gp_regs): Likewise.
1940         (store_all_fp_regs): Likewise.
1941         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1942         (ppc_linux_collect_gregset): Likewise.
1943         (ppc_canonicalize_syscall): Likewise.
1944         (ppc_linux_record_signal): Likewise.
1945         (ppu2spu_prev_register): Likewise.
1946         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1947         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1948         (ppcobsd_store_registers): Likewise.
1949         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1950         Likewise.
1951         (ppc_ravenscar_generic_store_registers): Likewise.
1952         * procfs.c (procfs_fetch_registers): Likewise.
1953         (procfs_store_registers): Likewise.
1954         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1955         (ravenscar_store_registers): Likewise.
1956         (ravenscar_prepare_to_store): Likewise.
1957         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1958         * record-full.c (record_full_wait_1): Likewise.
1959         (record_full_registers_change): Likewise.
1960         (record_full_store_registers): Likewise.
1961         (record_full_core_fetch_registers): Likewise.
1962         (record_full_save): Likewise.
1963         (record_full_goto_insn): Likewise.
1964         * regcache.c (regcache_register_size): Likewise.
1965         (get_regcache_arch): Remove.
1966         (regcache_read_pc): Likewise.
1967         * regcache.h (get_regcache_arch): Remove.
1968         * remote-sim.c (gdbsim_fetch_register): Likewise.
1969         (gdbsim_store_register): Likewise.
1970         * remote.c (fetch_register_using_p): Likewise.
1971         (send_g_packet): Likewise.
1972         (remote_prepare_to_store): Likewise.
1973         (store_registers_using_G): Likewise.
1974         * reverse.c (save_bookmark_command): Likewise.
1975         (goto_bookmark_command): Likewise.
1976         * rs6000-aix-tdep.c (branch_dest): Likewise.
1977         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1978         (fetch_register): Likewise.
1979         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1980         (ppc_collect_reg): Likewise.
1981         (ppc_collect_gregset): Likewise.
1982         (ppc_collect_fpregset): Likewise.
1983         (ppc_collect_vsxregset): Likewise.
1984         (ppc_collect_vrregset): Likewise.
1985         (ppc_displaced_step_hw_singlestep): Likewise.
1986         (rs6000_pseudo_register_read): Likewise.
1987         (rs6000_pseudo_register_write): Likewise.
1988         * s390-linux-nat.c (supply_gregset): Likewise.
1989         (fill_gregset): Likewise.
1990         (s390_linux_fetch_inferior_registers): Likewise.
1991         * s390-linux-tdep.c (s390_write_pc): Likewise.
1992         (s390_software_single_step): Likewise.
1993         (s390_all_but_pc_registers_record): Likewise.
1994         (s390_linux_syscall_record): Likewise.
1995         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1996         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1997         (shnbsd_store_inferior_registers): Likewise.
1998         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1999         (sh_extract_return_value_fpu): Likewise.
2000         (sh_store_return_value_nofpu): Likewise.
2001         (sh_corefile_supply_regset): Likewise.
2002         (sh_corefile_collect_regset): Likewise.
2003         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2004         (sh64_store_return_value): Likewise.
2005         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2006         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2007         (sparc_store_inferior_registers): Likewise.
2008         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2009         (sparc_ravenscar_prepare_to_store): Likewise.
2010         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2011         (sparc_analyze_control_transfer): Likewise.
2012         (sparc_step_trap): Likewise.
2013         (sparc_software_single_step): Likewise.
2014         (sparc32_gdbarch_init): Likewise.
2015         (sparc_supply_rwindow): Likewise.
2016         (sparc_collect_rwindow): Likewise.
2017         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2018         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2019         (sparc64nbsd_collect_gregset): Likewise.
2020         (sparc64nbsd_supply_fpregset): Likewise.
2021         (sparc64nbsd_collect_fpregset): Likewise.
2022         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2023         (sparc64_supply_gregset): Likewise.
2024         (sparc64_collect_gregset): Likewise.
2025         (sparc64_supply_fpregset): Likewise.
2026         (sparc64_collect_fpregset): Likewise.
2027         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2028         * spu-tdep.c (spu_unwind_sp): Likewise.
2029         (spu2ppu_prev_register): Likewise.
2030         (spu_memory_remove_breakpoint): Likewise.
2031         * stack.c (return_command): Likewise.
2032         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2033         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2034         * tracefile.c (trace_save_ctf): Likewise.
2035         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2036         (do_windows_store_inferior_registers): Likewise.
2037         (windows_resume): Likewise.
2038         * xtensa-linux-nat.c (fill_gregset): Likewise.
2039         (supply_gregset_reg): Likewise.
2040         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2041         (xtensa_register_read_masked): Likewise.
2042         (xtensa_supply_gregset): Likewise.
2043         (xtensa_extract_return_value): Likewise.
2044         (xtensa_store_return_value): Likewise.
2045
2046 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2047
2048         * doublest.c (floatformat_from_string): New function.
2049         * doublest.h (floatformat_from_string): Add prototype.
2050
2051         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2052         (OP_FLOAT): ... this.
2053         * expression.h: Do not include "doublest.h".
2054         (union exp_element): Replace doubleconst and decfloatconst by
2055         new element floatconst.
2056         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2057         (ada_evaluate_subexp): Likewise.
2058         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2059         OP_DOUBLE and OP_DECFLOAT.
2060         * expprint.c (print_subexp_standard): Likewise.
2061         (dump_subexp_body_standard): Likewise.
2062         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2063
2064         * parse.c: Include "dfp.h".
2065         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2066         (write_exp_elt_floatcst): New function.
2067         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2068         and OP_DECFLOAT.
2069         (operator_check_standard): Likewise.
2070         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2071         Return target format buffer instead of host DOUBLEST.
2072         Use floatformat_from_string and decimal_from_string to parse
2073         either binary or decimal floating-point types.
2074         (parse_c_float): Remove.
2075         * parser-defs.h: Do not include "doublest.h".
2076         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2077         (write_exp_elt_floatcst): Add prototype.
2078         (parse_float): Update prototype.
2079         (parse_c_float): Remove.
2080
2081         * c-exp.y: Do not include "dfp.h".
2082         (typed_val_float): Use byte buffer instead of DOUBLEST.
2083         (typed_val_decfloat): Remove.
2084         (DECFLOAT): Remove.
2085         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2086         (parse_number): Update to new parse_float interface.
2087         Parse suffixes and determine type before calling parse_float.
2088         Handle decimal and binary FP types the same way.
2089
2090         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2091         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2092         (parse_number): Update to new parse_float interface.
2093         Parse suffixes and determine type before calling parse_float.
2094
2095         * f-exp.y: Replace dval by typed_val_float.
2096         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2097         (parse_number): Use parse_float instead of atof.
2098
2099         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2100         (parse_go_float): Remove.
2101         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2102         (parse_number): Call parse_float instead of parse_go_float.
2103         Parse suffixes and determine type before calling parse_float.
2104
2105         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2106         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2107         (parse_number): Update to new parse_float interface.
2108         Parse suffixes and determine type before calling parse_float.
2109
2110         * m2-exp.y: Replace dval by byte buffer val.
2111         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2112         (parse_number): Call parse_float instead of atof.
2113
2114         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2115         (lex_number): Call parse_float instead of strtod.
2116         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2117         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2118         Use write_exp_elt_floatcst.
2119         (unit_testing): Remove static variable.
2120         (rust_type): Do not check unit_testing.
2121         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2122
2123         * ada-exp.y (type_float, type_double): Remove.
2124         (typed_val_float): Use byte buffer instead of DOUBLEST.
2125         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2126         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2127
2128 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2129
2130         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2131         * arch/aarch64.h: New file.
2132
2133 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2134
2135         * dfp.h (decimal_from_string): Use const reference for argument.
2136         * dfp.c (decimal_from_string): Likewise.
2137
2138 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2139
2140         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2141         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2142         * mips-tdep.c (mips_print_fp_register): Likewise.
2143
2144 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2145
2146         * common/format.h (enum argclass): Replace decfloat_arg by
2147         dec32float_arg, dec64float_arg, and dec128float_arg.
2148         * common/format.c (parse_format_string): Update to return
2149         new decimal float argument classes.
2150
2151         * printcmd.c (printf_decfloat): Rename to ...
2152         (printf_floating): ... this.  Add argclass argument, and use it
2153         instead of parsing the format string again.  Add support for
2154         binary floating-point values, using floatformat_to_string.
2155         Convert value to the target format if it doesn't already match.
2156         (ui_printf): Call printf_floating instead of printf_decfloat,
2157         also for double_arg / long_double_arg.  Pass argclass.
2158
2159         * dfp.c (decimal_to_string): Add format string argument.
2160         * dfp.h (decimal_to_string): Likewise.
2161
2162         * doublest.c (floatformat_to_string): Add format string argument.
2163         * doublest.h (floatformat_to_string): Likewise.
2164
2165 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2166
2167         * doublest.c (floatformat_precision): New routine.
2168         (floatformat_to_string): Likewise.
2169         * doublest.c (floatformat_to_string): Add prototype.
2170
2171         * printcmd.c (print_scalar_formatted): Only call print_floating
2172         on floating-point types.
2173         * valprint.c: Do not include "floatformat.h".
2174         (generic_val_print_decfloat): Remove.
2175         (generic_val_print): Call generic_val_print_float for both
2176         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2177         (print_floating): Use floatformat_to_string.  Handle decimal float.
2178         (print_decimal_floating): Remove, merge into floatformat_to_string.
2179         * value.h (print_decimal_floating): Remove.
2180
2181         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2182
2183 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2184
2185         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2186
2187 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2188
2189         * memattr.h: Don't include vec.h.
2190         (struct mem_attrib): Initialize fields.
2191         <unknown>: New static method.
2192         (struct mem_region): Add constructors, operator<, initialize
2193         fields.
2194         * memattr.c: Include algorithm.
2195         (default_mem_attrib, unknown_mem_attrib): Remove.
2196         (user_mem_region_list): New global.
2197         (target_mem_region_list, mem_region_list): Change type to
2198         std::vector<mem_region>.
2199         (mem_use_target): Now a function.
2200         (target_mem_regions_valid): Change type to bool.
2201         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2202         (require_user_regions): Adjust.
2203         (require_target_regions): Adjust.
2204         (create_mem_region): Adjust.
2205         (lookup_mem_region): Adjust.
2206         (invalidate_target_mem_regions): Adjust.
2207         (mem_clear): Rename to...
2208         (user_mem_clear): ... this, and adjust.
2209         (mem_command): Adjust.
2210         (info_mem_command): Adjust.
2211         (mem_enable, enable_mem_command, mem_disable,
2212         disable_mem_command): Adjust.
2213         (mem_delete): Adjust.
2214         (delete_mem_command): Adjust.
2215         * memory-map.h (parse_memory_map): Return an std::vector.
2216         * memory-map.c (parse_memory_map): Likewise.
2217         (struct memory_map_parsing_data): Add constructor.
2218         <memory_map>: Point to std::vector.
2219         (memory_map_start_memory): Adjust.
2220         (memory_map_end_memory): Adjust.
2221         (memory_map_end_property): Adjust.
2222         (clear_result): Remove.
2223         * remote.c (remote_memory_map): Return an std::vector.
2224         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2225         Remove.
2226         (target_debug_print_mem_region_vector): New.
2227         * target-delegates.c: Regenerate.
2228         * target.h (mem_region_vector): New typedef.
2229         (to_memory_map): Return mem_region_vector.
2230         (target_memory_map): Return an std::vector.
2231         * target.c (target_memory_map): Return an std::vector.
2232         (flash_erase_command): Adjust.
2233
2234 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2235
2236         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2237         Change type to std::string.
2238         (memory_map_start_property): Adjust.
2239         (memory_map_end_property): Adjust.
2240
2241 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2242
2243         * infrun.h: Include common/byte-vector.h.
2244         (struct displaced_step_closure): New struct.
2245         (struct buf_displaced_step_closure): New struct.
2246         * infrun.c (displaced_step_closure::~displaced_step_closure):
2247         Provide default implementation.
2248         (displaced_step_clear): Deallocate step closure with delete.
2249         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2250         (aarch64_displaced_step_closure): ... this, extend
2251         displaced_step_closure.
2252         (aarch64_displaced_step_data) <dsc>: Change type to
2253         aarch64_displaced_step_closure.
2254         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2255         unique_ptr.
2256         (aarch64_displaced_step_fixup): Add cast for displaced step
2257         closure.
2258         * amd64-tdep.c (displaced_step_closure): Rename to ...
2259         (amd64_displaced_step_closure): ... this, extend
2260         displaced_step_closure.
2261         <insn_buf>: Change type to std::vector<gdb_byte>.
2262         <max_len>: Remove.
2263         (fixup_riprel): Change type of DSC parameter, adjust to type
2264         change of insn_buf.
2265         (fixup_displaced_copy): Change type of DSC parameter.
2266         (amd64_displaced_step_copy_insn): Instantiate
2267         amd64_displaced_step_closure.
2268         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2269         to type change of insn_buf.
2270         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2271         parameter DSC.
2272         (arm_linux_copy_svc): Likewise.
2273         (cleanup_kernel_helper_return): Likewise.
2274         (arm_catch_kernel_helper_return): Likewise.
2275         (arm_linux_displaced_step_copy_insn): Instantiate
2276         arm_displaced_step_closure.
2277         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2278         (displaced_read_reg): Change type of parameter DSC.
2279         (branch_write_pc): Likewise.
2280         (load_write_pc): Likewise.
2281         (alu_write_pc): Likewise.
2282         (displaced_write_reg): Likewise.
2283         (arm_copy_unmodified): Likewise.
2284         (thumb_copy_unmodified_32bit): Likewise.
2285         (thumb_copy_unmodified_16bit): Likewise.
2286         (cleanup_preload): Likewise.
2287         (install_preload): Likewise.
2288         (arm_copy_preload): Likewise.
2289         (thumb2_copy_preload): Likewise.
2290         (install_preload_reg): Likewise.
2291         (arm_copy_preload_reg): Likewise.
2292         (cleanup_copro_load_store): Likewise.
2293         (install_copro_load_store): Likewise.
2294         (arm_copy_copro_load_store) Likewise.
2295         (thumb2_copy_copro_load_store): Likewise.
2296         (cleanup_branch): Likewise.
2297         (install_b_bl_blx): Likewise.
2298         (arm_copy_b_bl_blx): Likewise.
2299         (thumb2_copy_b_bl_blx): Likewise.
2300         (thumb_copy_b): Likewise.
2301         (install_bx_blx_reg): Likewise.
2302         (arm_copy_bx_blx_reg): Likewise.
2303         (thumb_copy_bx_blx_reg): Likewise.
2304         (cleanup_alu_imm): Likewise.
2305         (arm_copy_alu_imm): Likewise.
2306         (thumb2_copy_alu_imm): Likewise.
2307         (cleanup_alu_reg): Likewise.
2308         (install_alu_reg): Likewise.
2309         (arm_copy_alu_reg): Likewise.
2310         (thumb_copy_alu_reg): Likewise.
2311         (cleanup_alu_shifted_reg): Likewise.
2312         (install_alu_shifted_reg): Likewise.
2313         (arm_copy_alu_shifted_reg): Likewise.
2314         (cleanup_load): Likewise.
2315         (cleanup_store): Likewise.
2316         (arm_copy_extra_ld_st): Likewise.
2317         (install_load_store): Likewise.
2318         (thumb2_copy_load_literal): Likewise.
2319         (thumb2_copy_load_reg_imm): Likewise.
2320         (arm_copy_ldr_str_ldrb_strb): Likewise.
2321         (cleanup_block_load_all): Likewise.
2322         (cleanup_block_store_pc): Likewise.
2323         (cleanup_block_load_pc): Likewise.
2324         (arm_copy_block_xfer): Likewise.
2325         (thumb2_copy_block_xfer): Likewise.
2326         (cleanup_svc): Likewise.
2327         (install_svc): Likewise.
2328         (arm_copy_svc): Likewise.
2329         (thumb_copy_svc): Likewise.
2330         (arm_copy_undef): Likewise.
2331         (thumb_32bit_copy_undef): Likewise.
2332         (arm_copy_unpred): Likewise.
2333         (arm_decode_misc_memhint_neon): Likewise.
2334         (arm_decode_unconditional): Likewise.
2335         (arm_decode_miscellaneous): Likewise.
2336         (arm_decode_dp_misc): Likewise.
2337         (arm_decode_ld_st_word_ubyte): Likewise.
2338         (arm_decode_media): Likewise.
2339         (arm_decode_b_bl_ldmstm): Likewise.
2340         (arm_decode_ext_reg_ld_st): Likewise.
2341         (thumb2_decode_dp_shift_reg): Likewise.
2342         (thumb2_decode_ext_reg_ld_st): Likewise.
2343         (arm_decode_svc_copro): Likewise.
2344         (thumb2_decode_svc_copro): Likewise.
2345         (install_pc_relative): Likewise.
2346         (thumb_copy_pc_relative_16bit): Likewise.
2347         (thumb_decode_pc_relative_16bit): Likewise.
2348         (thumb_copy_pc_relative_32bit): Likewise.
2349         (thumb_copy_16bit_ldr_literal): Likewise.
2350         (thumb_copy_cbnz_cbz): Likewise.
2351         (thumb2_copy_table_branch): Likewise.
2352         (cleanup_pop_pc_16bit_all): Likewise.
2353         (thumb_copy_pop_pc_16bit): Likewise.
2354         (thumb_process_displaced_16bit_insn): Likewise.
2355         (decode_thumb_32bit_ld_mem_hints): Likewise.
2356         (thumb_process_displaced_32bit_insn): Likewise.
2357         (thumb_process_displaced_insn): Likewise.
2358         (arm_process_displaced_insn): Likewise.
2359         (arm_displaced_init_closure): Likewise.
2360         (arm_displaced_step_fixup): Add cast for closure.
2361         * arm-tdep.h: Include infrun.h.
2362         (displaced_step_closure): Rename to ...
2363         (arm_displaced_step_closure): ... this, extend
2364         displaced_step_closure.
2365         <u::svc::copy_svc_os>: Change type of parameter DSC.
2366         <cleanup>: Likewise.
2367         (arm_process_displaced_insn): Likewise.
2368         (arm_displaced_init_closure): Likewise.
2369         (displaced_read_reg): Likewise.
2370         (displaced_write_reg): Likewise.
2371         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2372         Adjust.
2373         * i386-tdep.h: Include infrun.h.
2374         (i386_displaced_step_closure): New typedef.
2375         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2376         i386_displaced_step_closure.
2377         (i386_displaced_step_fixup): Adjust.
2378         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2379         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2380         and unique_ptr.
2381         (ppc_displaced_step_fixup): Adjust.
2382         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2383         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2384         and unique_ptr.
2385         (s390_displaced_step_fixup): Adjust.
2386
2387 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2388
2389         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2390         Remove declarations.
2391
2392 2017-10-20  Tom Tromey  <tom@tromey.com>
2393
2394         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2395         std::vector.
2396         (gdb_bfd_record_inclusion): Update.
2397         (bfdp): Remove typedef.
2398
2399 2017-10-20  Tom Tromey  <tom@tromey.com>
2400
2401         * gdb_bfd.c (gdb_bfd_ref): Use new.
2402         (struct gdb_bfd_data): Add constructor, destructor, and member
2403         initializers.
2404         (gdb_bfd_unref): Use delete.
2405
2406 2017-10-20  Tom Tromey  <tom@tromey.com>
2407
2408         * exec.c (exec_file_attach): Use new_bfd_ref.
2409         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2410         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2411         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2412         new_bfd_ref.
2413         * gdb_bfd.h (new_bfd_ref): New function.
2414
2415 2017-10-20  Pedro Alves  <palves@redhat.com>
2416
2417         * main.c (captured_command_loop): Add attribute noinline.
2418
2419 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2420
2421         * interps.c (struct interp_factory): Add constructor.
2422         (interp_factory_p): Remove typedef.
2423         (DEF_VEC_P(interp_factory_p)): Remove.
2424         (interpreter_factories): Change type to std::vector.
2425         (interp_factory_register): Adjust.
2426         (interp_lookup): Adjust.
2427         (interpreter_completer): Adjust.
2428
2429 2017-10-19  Tom Tromey  <tom@tromey.com>
2430
2431         * break-catch-syscall.c (catch_syscall_completer): Use
2432         std::string, gdb::unique_xmalloc_ptr.
2433
2434 2017-10-19  Tom Tromey  <tom@tromey.com>
2435
2436         * infcall.c (call_function_by_hand_dummy): Use std::string.
2437
2438 2017-10-19  Tom Tromey  <tom@tromey.com>
2439
2440         * mi/mi-main.c (mi_cmd_execute): Update.
2441         * top.h (prepare_execute_command): Return scoped_value_mark.
2442         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2443         Add move constructor.
2444         * top.c (prepare_execute_command): Return scoped_value_mark.
2445         (execute_command): Update.
2446
2447 2017-10-19  Pedro Alves  <palves@redhat.com>
2448
2449         * xml-support.c (xml_fetch_content_from_file): Check fread's
2450         return.
2451
2452 2017-10-19  Pedro Alves  <palves@redhat.com>
2453
2454         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2455         async.
2456         (handle_error_fd): New function.
2457         (ser_base_async): Add/delete an event loop file handler for
2458         error_fd.
2459
2460 2017-10-19  Pedro Alves  <palves@redhat.com>
2461
2462         * xml-support.c (xml_fetch_content_from_file): Don't read in
2463         chunks.  Instead use fseek to determine the file's size, and read
2464         it in one go.
2465
2466 2017-11-18  Keith Seitz  <keiths@redhat.com>
2467
2468         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2469         types.
2470         Add whitespace to front of type name.
2471
2472 2017-10-18  Keith Seitz  <keiths@redhat.com>
2473
2474         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2475         DW_AT_accessibility.
2476
2477 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2478
2479         * features/tic6x-c62x-linux.c: Remove.
2480
2481 2017-10-17  Tom Tromey  <tom@tromey.com>
2482
2483         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2484         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2485         (do_mixed_source_and_assembly): Likewise.
2486
2487 2017-10-17  Tom Tromey  <tom@tromey.com>
2488
2489         * regcache.c (regcache::xfer_part): Remove assertion.
2490
2491 2017-10-17  Pedro Alves  <palves@redhat.com>
2492
2493         * xml-support.c (xml_fetch_content_from_file): Call
2494         unique_ptr::release() instead unique_ptr::get() when passing
2495         through xrealloc.
2496
2497 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2498
2499         * regcache.c (regcache::xfer_part): Remove parameters read and
2500         write, add parameter is_raw.  All callers are updated.
2501
2502 2017-10-16  Keith Seitz  <keiths@redhat.com>
2503
2504         * c-typeprint.c (enum access_specifier): Moved here from
2505         c_type_print_base.
2506         (output_access_specifier): New function.
2507         (c_type_print_base): Consider typedefs when assessing
2508         whether access labels are needed.
2509         Use output_access_specifier as needed.
2510         Output access specifier for typedefs, if needed.
2511         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2512         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2513         fields.
2514         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2515         accessor macros.
2516
2517 2017-10-16  Tom Tromey  <tom@tromey.com>
2518
2519         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2520         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2521         * target.c (target_fileio_read_stralloc): Update.
2522         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2523         * target.h (target_fileio_read_stralloc): Return
2524         unique_xmalloc_ptr.
2525
2526 2017-10-16  Tom Tromey  <tom@tromey.com>
2527
2528         * xml-syscall.c (xml_init_syscalls_info): Update.
2529         * xml-support.c (xinclude_start_include): Update.
2530         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2531         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2532         (xml_fetch_content_from_file): Likewise.
2533         * osdata.c (get_osdata): Update.
2534         * target.h (target_read_stralloc, target_get_osdata): Return
2535         unique_xmalloc_ptr.
2536         * solib-aix.c (solib_aix_get_library_list): Update.
2537         * solib-target.c (solib_target_current_sos): Update.
2538         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2539         * xml-tdesc.c (fetch_available_features_from_target): Update.
2540         (target_fetch_description_xml): Update.
2541         (file_read_description_xml): Update.
2542         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2543         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2544         (remote_pid_to_exec_file): Update.
2545         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2546         (target_get_osdata): Likewise.
2547
2548 2017-10-16  Tom Tromey  <tom@tromey.com>
2549
2550         * remote.c (remote_register_number_and_offset): Use std::vector.
2551         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2552         (putpkt_binary): Use gdb::def_vector.
2553         (compare_sections_command): Use gdb::byte_vector.
2554
2555 2017-10-16  Tom Tromey  <tom@tromey.com>
2556
2557         * ppc-linux-nat.c (hwdebug_insert_point): Use
2558         gdb::unique_xmalloc_ptr, XDUP.
2559
2560 2017-10-16  Tom Tromey  <tom@tromey.com>
2561
2562         * probe.c (parse_probes): Use std::string.
2563         (info_probes_for_ops, enable_probes_command)
2564         (disable_probes_command): Remove cleanups.
2565
2566 2017-10-16  Tom Tromey  <tom@tromey.com>
2567
2568         * buildsym.c (block_compar): Remove.
2569         (end_symtab_get_static_block): Use std::vector.
2570
2571 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2572
2573         * memrange.h (struct mem_range): Define operator< and operator==.
2574         (mem_range_s): Remove.
2575         (DEF_VEC_O (mem_range_s)): Remove.
2576         (normalize_mem_ranges): Change parameter type to std::vector.
2577         * memrange.c (compare_mem_ranges): Remove.
2578         (normalize_mem_ranges): Change parameter type to std::vector,
2579         adjust to vector change.
2580         * exec.c (section_table_available_memory): Return vector, remove
2581         parameter.
2582         (section_table_read_available_memory): Adjust to std::vector
2583         change.
2584         * remote.c (remote_read_bytes): Adjust to std::vector
2585         change.
2586         * tracepoint.h (traceframe_available_memory): Change parameter
2587         type to std::vector.
2588         * tracepoint.c (traceframe_available_memory): Change parameter
2589         type to std::vector, adjust.
2590         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2591         std::vector change.
2592         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2593         unittests/memrange-selftests.c.
2594         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2595         * gdb/unittests/memrange-selftests.c: New file.
2596
2597 2017-10-16  Pedro Alves  <palves@redhat.com>
2598
2599         * elfread.c (probe_key_free): Rename range-for variable.
2600         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2601         (find_probe_by_pc, collect_probes): Rename range-for variable.
2602
2603 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2604
2605         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2606         * features/tic6x-c62x.c: Remove.
2607         * features/tic6x-c64x-linux.c: Remove.
2608         * features/tic6x-c64x.c: Remove.
2609         * features/tic6x-c64xp-linux.c: Remove.
2610         * features/tic6x-c64xp.c: Remove.
2611         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2612         initialize_tdesc_tic6x_*_linux functions.
2613         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2614         initialize_tdesc_tic6x_* functions.
2615
2616 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2617
2618         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2619         tic6x-c62x.
2620         * regformats/tic6x-c62x.dat: Remove.
2621         * regformats/tic6x-c64x.dat: Remove.
2622         * regformats/tic6x-c64xp.dat: Remove.
2623
2624 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2625
2626         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2627         (the !HAVE_LIBEXPAT version).
2628
2629 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2630
2631         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2632         const.
2633
2634 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2635
2636         * target.h: Include tracepoint.h.
2637         (enum trace_find_type): Move to tracepoint.h.
2638         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2639         * tracepoint.h: Don't include target.h
2640         (enum trace_find_type): Move from target.h.
2641         (parse_traceframe_info): Return a unique ptr.
2642         * tracepoint.c (current_traceframe_info): Change type to unique
2643         ptr.
2644         (free_traceframe_info): Remove.
2645         (clear_traceframe_info): Don't manually free
2646         current_traceframe_info.
2647         (free_result): Remove.
2648         (parse_traceframe_info): Return a unique ptr.
2649         (get_traceframe_info): Adjust to unique ptr.
2650         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2651         * remote.c (remote_traceframe_info): Return a unique ptr.
2652         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2653         ptr.
2654         * target-debug.h (target_debug_print_traceframe_info_up): New
2655         macro.
2656         * target-delegates.c: Regenerate.
2657
2658 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2659
2660         * memrange.h (struct mem_range): Add constructors.
2661         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2662         std::vector<mem_range>.
2663         * tracepoint.c (free_traceframe_info): Don't manually free
2664         vector.
2665         (traceframe_info_start_memory): Adjust to vector change.
2666         (traceframe_available_memory): Likewise.
2667         * tracefile-tfile.c (build_traceframe_info): Likewise.
2668         * ctf.c (ctf_traceframe_info): Likewise.
2669
2670 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2671
2672         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2673         std::vector<int>.
2674         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2675         (traceframe_info_start_tvar): Adjust to vector change.
2676         (parse_traceframe_info): Allocate with new.
2677         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2678         vector change.
2679         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2680         change.
2681         tfile_traceframe_info): Allocate with new.
2682         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2683         change.
2684
2685 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2686
2687         * tracepoint.c (traceframe_info): Rename to...
2688         (current_traceframe_info): ...this.
2689         (clear_traceframe_info): Adjust.
2690         (get_traceframe_info): Adjust.
2691
2692 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * nat/linux-osdata.c: Include algorithm.
2695         (compare_processes): Remove.
2696         (struct pid_pgid_entry): New struct.
2697         (linux_xfer_osdata_processgroups): Use std::vector instead of
2698         XNEWVEC.
2699
2700 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2701
2702         * objfiles.h: Don't include symfile.h.
2703         (struct partial_symbol): Remove forward-declaration.
2704         (struct objfile) <global_psymbols, static_psymbols>: Change type
2705         to std::vector<partial_symbol *>.
2706         * objfiles.c (objfile::objfile): Don't memset those fields.
2707         (objfile::~objfile): Don't free those fields.
2708         * psympriv.h (struct psymbol_allocation_list): Remove
2709         forward-declaration.
2710         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2711         to std::vector.
2712         (start_psymtab_common): Change parameters to std::vector.
2713         * psymtab.c: Include algorithm.
2714         (require_partial_symbols): Call shrink_to_fit.
2715         (find_pc_sect_psymbol): Adjust to vector change.
2716         (match_partial_symbol): Likewise.
2717         (lookup_partial_symbol): Likewise.
2718         (psym_relocate): Likewise.
2719         (dump_psymtab): Likewise.
2720         (recursively_search_psymtabs): Likewise.
2721         (compare_psymbols): Remove.
2722         (sort_pst_symbols): Adjust to vector change.
2723         (start_psymtab_common): Likewise.
2724         (end_psymtab_common): Likewise.
2725         (psymbol_bcache_full): De-constify return value.
2726         (add_psymbol_to_bcache): Likewise.
2727         (extend_psymbol_list): Remove.
2728         (append_psymbol_to_list): Adjust to vector change.
2729         (add_psymbol_to_list): Likewise.
2730         (init_psymbol_list): Likewise.
2731         (maintenance_info_psymtabs): Likewise.
2732         (maintenance_check_psymtabs): Likewise.
2733         * symfile.h (struct psymbol_allocation_list): Remove.
2734         * symfile.c (reread_symbols): Adjust to vector change.
2735         * dbxread.c (start_psymtab): Change type of parameters.
2736         (dbx_symfile_read): Adjust to vector change.
2737         (read_dbx_symtab): Likewise.
2738         (start_psymtab): Change type of parameters.
2739         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2740         (create_partial_symtab): Likewise.
2741         (add_partial_symbol): Likewise.
2742         (write_one_signatured_type): Likewise.
2743         (recursively_write_psymbols): Likewise.
2744         * mdebugread.c (parse_partial_symbols): Likewise.
2745         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2746         (scan_xcoff_symtab): Adjust to vector change.
2747         (xcoff_initial_scan): Likewise.
2748
2749 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2750
2751         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2752
2753 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2754
2755         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2756         Remove s390x-*-expedite, add s390x-expedite.
2757
2758 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2759
2760         * features/s390-gs-linux64.c: Regenerated.
2761         * features/s390x-gs-linux64.c: Regenerated.
2762
2763 2017-10-13  Tom Tromey  <tom@tromey.com>
2764
2765         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2766         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2767         delete.
2768         * symfile.c (symbol_file_add_with_addrs): Use new.
2769         (symbol_file_add_separate): Update comment.
2770         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2771         * jit.c (jit_object_close_impl): Use new.
2772         (jit_unregister_code): Use delete.
2773         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2774         (~objfile): Rename from free_objfile.
2775         (free_objfile_separate_debug, do_free_objfile_cleanup)
2776         (free_all_objfiles, objfile_purge_solibs): Use delete.
2777         * objfiles.h (struct objfile): Add constructor and destructor.
2778         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2779         (allocate_objfile, free_objfile): Don't declare.
2780         (struct objstats): Add initializers.
2781
2782 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2783
2784         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2785         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2786         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2787         * gdbarch.h: Regenerate.
2788         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2789         Adjust comment.
2790         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2791         (i386_displaced_step_fixup): Adjust comment.
2792         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2793
2794 2017-10-12  Tom Tromey  <tom@tromey.com>
2795
2796         * prologue-value.h (pv_area::store_would_trash): Return bool.
2797         (pv_area::find_reg): Likewise.
2798         * prologue-value.c (pv_area::store_would_trash): Return bool.
2799         (pv_area::find_reg): Likewise.
2800
2801 2017-10-12  Tom Tromey  <tom@tromey.com>
2802
2803         * s390-linux-tdep.c (s390_store, s390_load)
2804         (s390_check_for_saved, s390_analyze_prologue): Update.
2805         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2806         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2807         * prologue-value.h (class pv_area): Move from prologue-value.c.
2808         Change names of members.  Add constructor, destructor, member
2809         functions.
2810         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2811         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2812         (pv_area_fetch, pv_area_scan): Don't declare.
2813         * prologue-value.c (struct pv_area::area_entry): Now member of
2814         pv_area.
2815         (struct pv_area): Move to prologue-value.h.
2816         (pv_area::pv_area): Rename from make_pv_area.
2817         (pv_area::~pv_area): Rename from free_pv_area.
2818         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2819         (clear_entries, find_entry, overlaps, store_would_trash, store)
2820         (fetch, find_reg, scan): Now member of pv_area.
2821         Remove "area" argument.  Update.
2822         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2823         Update.
2824         * mn10300-tdep.c (push_reg, check_for_saved)
2825         (mn10300_analyze_prologue): Update.
2826         * mep-tdep.c (is_arg_spill, check_for_saved)
2827         (mep_analyze_prologue): Update.
2828         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2829         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2830         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2831         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2832         Update.
2833         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2834         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2835
2836 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2837
2838         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2839         * linux-nat.c (linux_nat_delete_thread): New variable.
2840         (lwp_free): Invoke linux_nat_delete_thread if set.
2841         (linux_nat_set_delete_thread): New function.
2842         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2843         thread delete callback.
2844         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2845         (_initialize_arm_linux_nat): Assign thread delete callback.
2846         * s390-linux-nat.c (s390_delete_thread): New function.
2847         (_initialize_s390_nat): Assign thread delete callback.
2848         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2849         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2850         function.
2851         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2852         declaration.
2853         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2854         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2855
2856 2017-10-09  Tom Tromey  <tom@tromey.com>
2857
2858         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2859         std::string.
2860         * tui/tui-layout.c (enum tui_status): Use std::string.
2861
2862 2017-10-11  Tom Tromey  <tom@tromey.com>
2863
2864         * gdbthread.h (thread_command): Constify.
2865         * inferior.h (detach_command): Constify.
2866         * top.h (set_history, show_history): Constify.
2867         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2868         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2869         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2870         * printcmd.c (set_command): Constify.
2871         (non_const_set_command): New function.
2872         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2873         * breakpoint.c (enable_command, disable_command, delete_command)
2874         (catch_command, tcatch_command, set_breakpoint_cmd)
2875         (show_breakpoint_cmd): Constify.
2876         * macrocmd.c (macro_command): Constify.
2877         * infcmd.c (unset_command, kill_command, detach_command)
2878         (info_proc_cmd): Constify.
2879         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2880         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2881         (info_auto_load_cmd): Constify.
2882         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2883         (unset_tdesc_cmd): Constify.
2884         * ada-lang.c (set_ada_command, show_ada_command)
2885         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2886         * guile/guile.c (set_guile_command, show_guile_command)
2887         (info_guile_command): Constify.
2888         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2889         Constify.
2890         * skip.c (skip_command): Constify.
2891         * compile/compile.c (_initialize_compile): Constify.
2892         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2893         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2894         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2895         (maint_btrace_pt_show_cmd): Constify.
2896         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2897         Constify.
2898         * python/python.c (user_show_python, user_set_python): Constify.
2899         * mips-tdep.c (set_mips_command, show_mips_command)
2900         (set_mipsfpu_command): Constify.
2901         * record-btrace.c (cmd_record_btrace_start)
2902         (cmd_set_record_btrace, cmd_show_record_btrace)
2903         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2904         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2905         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2906         Constify.
2907         * symfile.c (overlay_command): Constify.
2908         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2909         * cli/cli-logging.c (set_logging_command, show_logging_command):
2910         Constify.
2911         * cli/cli-dump.c (dump_command, append_command)
2912         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2913         (tekhex_dump_command, binary_dump_command)
2914         (binary_append_command): Constify.
2915         * cli/cli-decode.c (struct cmd_list_element): Change type of
2916         "fun".
2917         * cli/cli-cmds.c (info_command, show_command, set_debug)
2918         (show_debug): Constify.
2919         (show_command): Add non-const overload.
2920         * top.c (set_history, show_history): Constify.
2921         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2922         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2923         * target.c (target_command): Constify.
2924         * sparc64-tdep.c (info_adi_command): Constify.
2925         * record-full.c (cmd_record_full_start): Constify.
2926         (set_record_full_command): Constify.  Fix typo.
2927         (show_record_full_command): Constify.
2928         * thread.c (thread_command, thread_apply_command): Constify.
2929         * memattr.c (dummy_cmd): Constify.
2930         * value.c (function_command): Constify.
2931         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2932         * probe.c (info_probes_command): Constify.
2933         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2934         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2935         (show_thread_cmd, set_thread_default_cmd)
2936         (show_thread_default_cmd): Constify.
2937         (check_empty): Constify.
2938         * tracepoint.c (tfind_command): Constify.
2939         * cp-support.c (maint_cplus_command): Constify.
2940         * windows-tdep.c (info_w32_command): Constify.
2941         * record.c (cmd_record_start, set_record_command)
2942         (show_record_command, info_record_command, cmd_record_goto):
2943         Constify.
2944         * ravenscar-thread.c (set_ravenscar_command)
2945         (show_ravenscar_command): Constify.
2946         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2947         Constify.
2948         (add_internal_problem_command): Remove casts.
2949         * arc-tdep.c (maintenance_print_arc_command): Constify.
2950         * valprint.c (set_print, show_print, set_print_raw)
2951         (show_print_raw): Constify.
2952         * maint.c (maintenance_command, maintenance_info_command)
2953         (maintenance_print_command, maintenance_set_cmd)
2954         (maintenance_show_cmd, set_per_command_cmd)
2955         (show_per_command_cmd, maintenance_check_command): Constify.
2956         * language.c (set_check, show_check): Constify.
2957         * typeprint.c (show_print_type, set_print_type): Constify.
2958         * go32-nat.c (go32_info_dos_command): Constify.
2959
2960 2017-10-11  Tom Tromey  <tom@tromey.com>
2961
2962         * breakpoint.c (prepare_re_set_context): Remove.
2963         (breakpoint_re_set_one): Update.  Don't use cleanups.
2964         (breakpoint_re_set): Use scoped_restore, std::string, and
2965         scoped_restore_current_language.
2966
2967 2017-10-11  Tom Tromey  <tom@tromey.com>
2968
2969         * breakpoint.c (commands_command_1): Use std::string.
2970         (cleanup_executing_breakpoints): Remove.
2971         (bpstat_do_actions_1): Use scoped_restore.
2972         (bpstat_check_watchpoint): Use std::string.
2973         (decode_static_tracepoint_spec): Likewise.
2974         (break_range_command): Likewise.
2975         (watch_command_1): Likewise.
2976         (compare_breakpoints): Change argument types.
2977         (clear_command): Use std::vector.
2978         (cleanup_executing_breakpoints): Remove.
2979         (update_global_location_list): Use unique_xmalloc_ptr.
2980         (strace_command): Remove unused declaration.
2981
2982 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2983
2984         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2985         * NEWS: Mention new FreeBSD/arm native configuration.
2986         * configure.host: Add arm*-*-freebsd*.
2987         * configure.nat: Likewise.
2988         * arm-fbsd-nat.c: New file.
2989
2990 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2991
2992         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2993         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2994         * NEWS: Mention new FreeBSD/arm target.
2995         * configure.tgt: Add arm*-*-freebsd*.
2996         * arm-fbsd-tdep.c: New file.
2997         * arm-fbsd-tdep.h: New file.
2998
2999 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3000
3001         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3002         `gdbarch_elfcore_write_linux_prpsinfo'.
3003         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3004         method.
3005         (elf_internal_linux_prpsinfo): Remove declaration.
3006         * gdbarch.h: Regenerate.
3007         * gdbarch.c: Regenerate.
3008
3009 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3010
3011         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3012         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3013
3014 2017-10-11  Pedro Alves  <palves@redhat.com>
3015
3016         * breakpoint.c (reattach_breakpoints): Delete.
3017         * breakpoint.h (reattach_breakpoints): Delete.
3018
3019 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3020
3021         * symfile.c (registered_sym_fns): Make struct, not typedef.
3022         (DEF_VEC_O (registered_sym_fns)): Remove.
3023         (symtab_fns): Change type to std::vector.
3024         (add_symtab_fns): Adjust.
3025         (find_sym_fns): Adjust.
3026
3027 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3028
3029         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3030         * arc-tdep.h (arc_arch_is_em): New function.
3031         (arc_arch_is_hs): Likewise.
3032
3033 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3034
3035         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3036         parentheses in the declaration.
3037         (macro_lookup_inclusion): Likewise.
3038         (macro_lookup_definition): Likewise.
3039         * p-lang.h (pascal_builtin_types): Likewise.
3040         * tui/tui-data.c (tui_win_list): Likewise.
3041         * tui/tui-data.h (tui_win_list): Likewise.
3042         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3043
3044 2017-10-11  Mark Rages  <markrages@gmail.com>
3045
3046         * target-memory.c (block_boundaries): Fix for block address not
3047         aligned on block size.
3048
3049 2017-10-10  Pedro Alves <palves@redhat.com>
3050             Tom Tromey  <tom@tromey.com>
3051
3052         * breakpoint.c (struct captured_breakpoint_query_args)
3053         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3054         (print_breakpoint): New.
3055         * breakpoint.h (print_breakpoint): Declare.
3056         * common/common-exceptions.h (enum return_reason): Remove
3057         references to catch_exceptions.
3058         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3059         Delete.
3060         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3061         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3062         * gdb.h: Delete.
3063         * gdbthread.h (thread_select): Declare.
3064         * mi/mi-cmd-break.c: Don't include gdb.h.
3065         (breakpoint_notify): Use print_breakpoint.
3066         * mi/mi-cmd-catch.c: Don't include gdb.h.
3067         * mi/mi-interp.c: Don't include gdb.h.
3068         (mi_print_breakpoint_for_event): New.
3069         (mi_breakpoint_created, mi_breakpoint_modified): Use
3070         mi_print_breakpoint_for_event.
3071         * mi/mi-main.c: Don't include gdb.h.
3072         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3073         thread_select instead of gdb_thread_select.
3074         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3075         of using gdb_list_thread_ids.
3076         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3077         FILEIO_ENOSYS here.
3078         (remote_fileio_request): Use TRY/CATCH instead of
3079         catch_exceptions.
3080         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3081         (symbol_file_add_from_memory_wrapper): Delete.
3082         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3083         * thread.c: Don't include gdb.h.
3084         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3085         (thread_alive): Use thread_select.
3086         (do_captured_thread_select): Delete, parts salvaged as ...
3087         (thread_select): ... this new function.
3088         (gdb_thread_select): Delete.
3089
3090 2017-10-10  Pedro Alves  <palves@redhat.com>
3091             Tom Tromey  <tom@tromey.com>
3092
3093         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3094         and reverse logic.
3095         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3096         No longer macros.  Instead ...
3097         (enum wp_check_result): They're now values of this new
3098         enumeration.
3099         (watchpoint_check): Change return type to wp_check_result and
3100         parameter type to bpstat.
3101         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3102         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3103         catch_errors.  Reverse logic of watchpoint_check call.
3104         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3105         pointer as parameter.
3106         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3107         * common/common-exceptions.c (throw_exception_sjlj): Update
3108         comments to avoid mentioning catch_errors.
3109         * exceptions.c (catch_errors): Delete.
3110         * exceptions.h: Update comments to avoid mentioning catch_errors.
3111         (catch_errors_ftype, catch_errors): Delete.
3112         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3113         (hook_stop_stub): Delete.
3114         (restore_selected_frame): Change return type to void, and
3115         parameter type to const frame_id &.
3116         (restore_infcall_control_state): Use TRY/CATCH instead of
3117         catch_errors.
3118         * main.c (captured_command_loop): Return void and remove
3119         parameter.  Remove references to catch_errors.
3120         (captured_main): Use TRY/CATCH instead of catch_errors.
3121         * objc-lang.c (objc_submethod_helper_data)
3122         (find_objc_msgcall_submethod_helper): Delete.
3123         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3124         catch_errors.
3125         * record-full.c (record_full_message): Return void.
3126         (record_full_message_args, record_full_message_wrapper): Delete.
3127         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3128         instead of catch_errors.
3129         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3130         parameter type to int.
3131         * solib-darwin.c (open_symbol_file_object): Ditto.
3132         * solib-dsbt.c (open_symbol_file_object): Ditto.
3133         * solib-frv.c (open_symbol_file_object): Ditto.
3134         * solib-svr4.c (open_symbol_file_object): Ditto.
3135         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3136         * solib.c (update_solib_list): Use TRY/CATCH instead of
3137         catch_errors.
3138         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3139         Change type.
3140         * symmisc.c (struct print_symbol_args): Remove.
3141         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3142         (print_symbol): Change type.
3143         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3144         and remove parameters.
3145         (catch_errors): New.
3146         (get_windows_debug_event): Adjust.
3147
3148 2017-10-09  Tom Tromey  <tom@tromey.com>
3149
3150         * mi/mi-main.c (free_splay_tree): Remove.
3151         (list_available_thread_groups): Use splay_tree_up.
3152         * common/gdb_splay_tree.h: New file.
3153
3154 2017-10-09  Tom Tromey  <tom@tromey.com>
3155
3156         * mi/mi-main.c (do_nothing): Remove.
3157         (list_available_thread_groups): Update.
3158
3159 2017-10-09  Pedro Alves  <palves@redhat.com>
3160
3161         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3162         reading registers when switching context.
3163
3164 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3165
3166         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3167         (fbsd_convert_siginfo): Likewise.
3168         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3169
3170 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3171
3172         * configure.ac (try_guile_versions): Remove guile-2.2.
3173         * configure: Regenerate.
3174
3175 2017-10-09  Tom Tromey  <tom@tromey.com>
3176
3177         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3178         (COMPILE.pre): Use $(CXX).
3179
3180 2017-10-09  Pedro Alves  <palves@redhat.com>
3181
3182         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3183         Use bool.
3184         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3185         * cp-support.h (cp_remove_params): Now returns a
3186         gdb::unique_xmalloc_ptr.
3187         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3188         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3189         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3190         returning a gdb::unique_xmalloc_ptr.
3191         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3192         * stack.c (find_frame_funname): Adjust to cp_remove_params
3193         returning a gdb::unique_xmalloc_ptr.
3194
3195 2017-10-08  Tom Tromey  <tom@tromey.com>
3196
3197         * dwarf2read.c (dwarf2_get_dwz_file): Use
3198         gdb::unique_xmalloc_ptr.
3199         (find_slot_in_mapped_hash): Likewise.
3200         (dwarf2_physname): Likewise.
3201         (create_dwo_unit_in_dwp_v1): Use std::string.
3202         (create_dwo_unit_in_dwp_v2): Likewise.
3203         (lookup_dwo_cutu): Likewise.
3204         (inherit_abstract_dies): Use std::vector.
3205         (read_array_type): Likewise.
3206         (dwarf_decode_macros): Remove unused declaration.
3207         (unsigned_int_compar): Remove.
3208         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3209         (psymtabs_addrmap_cleanup): Remove.
3210
3211 2017-10-08  Tom Tromey  <tom@tromey.com>
3212
3213         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3214         * frame.h (frame_cleanup_after_sniffer): Declare.
3215         (frame_prepare_for_sniffer): Return void.
3216         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3217         type of argument.
3218         (frame_prepare_for_sniffer): Return void.
3219
3220 2017-10-08  Tom Tromey  <tom@tromey.com>
3221
3222         * utils.h (make_cleanup_value_free): Remove.
3223         * utils.c (do_value_free, struct cleanup): Remove.
3224         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3225         Use gdb_value_up.
3226         * value.h (struct value_deleter): New.
3227         (gdb_value_up): New typedef.
3228
3229 2017-10-08  Tom Tromey  <tom@tromey.com>
3230
3231         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3232         (make_cleanup_free_search_symbols): Remove.
3233         (search_symbols): Return std::vector.
3234         (symbol_search::compare_search_syms): Now member of
3235         symbol_search.  Change arguments.
3236         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3237         (symtab_symbol_info, rbreak_command): Update.
3238         * symtab.h (struct symbol_search) <next>: Remove.
3239         Add constructors.
3240         (symbol_search::operator<): New function.
3241         (symbol_search::operator==): New function.
3242         (search_symbols): Remove std::vector.
3243         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3244         (symbol_search::compare_search_syms): Declare.
3245
3246 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3247
3248         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3249         arch/aarch64-insn.o.
3250         Remove one rule.
3251         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3252
3253 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3254
3255         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3256         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3257         arch/arm-linux.o respectively.
3258         * configure.tgt: Likewise.
3259
3260 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3261
3262         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3263         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3264
3265 2017-10-06  Pedro Alves  <palves@redhat.com>
3266
3267         * windows-nat.c: Include <algorithm>.
3268
3269 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3270
3271         * configure.tgt (i386_tobjs): New variable.
3272         (amd64_tobjs): New variable.
3273         Set $cpu_obs and $os_obs.
3274
3275 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3276
3277         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3278         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3279         (clean): Remove object files and dependency files.
3280         (distclean): Remove the directory.
3281         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3282         * configure: Re-generated.
3283         * configure.tgt: Replace amd64.o with arch/amd64.o.
3284
3285 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3286
3287         PR build/22188
3288         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3289         and SETEND.
3290
3291 2017-10-05  Pedro Alves  <palves@redhat.com>
3292
3293         * linux-nat.c (linux_child_follow_fork): When following the parent
3294         and detaching the child, consult the parent thread's architecture
3295         instead of the child's.
3296
3297 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3298
3299         * ax.h: Do not include "doublest.h".
3300         (union agent_val): Remove.
3301
3302 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3303
3304         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3305         (decimal_to_string): Return std::string object.
3306         (decimal_from_string): Accept std::string object.  Return bool.
3307         (decimal_from_integral, decimal_from_doublest): Remove.
3308         (decimal_from_longest): Add prototype.
3309         (decimal_from_ulongest): Likewise.
3310         (decimal_to_longest): Likewise.
3311         (decimal_from_doublest): Likewise.
3312         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3313         (MAX_DECIMAL_STRING): Move here.
3314         (decimal_to_string): Return std::string object.
3315         (decimal_from_string): Accept std::string object.  Return bool.
3316         (decimal_from_integral): Remove, replace by ...
3317         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3318         (decimal_to_longest): New function.
3319         (decimal_from_floating): Remove, replace by ...
3320         (decimal_from_doublest): ... this new function.
3321         (decimal_to_doublest): Update to new decimal_to_string interface.
3322
3323         * value.c (unpack_long): Use decimal_to_longest.
3324         * valops.c (value_cast): Use decimal_from_doublest instead of
3325         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3326         decimal_from_integral.
3327         * valarith.c (value_args_as_decimal): Likewise.
3328         * valprint.c (print_decimal_floating): Update to new
3329         decimal_to_string interface.
3330         * printcmd.c (printf_decfloat): Likewise.
3331         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3332
3333 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3334
3335         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3336         * gdbtypes.c: Include "floatformat.h".
3337         * value.c: Likewise.
3338         * m68k-tdep.c: Likewise.
3339
3340         * findvar.c: Do not include "floatformat.h".
3341         * amd64-darwin-tdep.c: Likewise.
3342         * arm-linux-tdep.c: Likewise.
3343         * i386-darwin-tdep.c: Likewise.
3344         * i387-tdep.c: Likewise.
3345         * m68k-linux-tdep.c: Likewise.
3346         * mep-tdep.c: Likewise.
3347         * mips-tdep.c: Likewise.
3348         * nios2-tdep.c: Likewise.
3349         * s390-linux-tdep.c: Likewise.
3350         * sparc-obsd-tdep.c: Likewise.
3351         * sparc-tdep.c: Likewise.
3352         * sparc64-tdep.c: Likewise.
3353         * spu-tdep.c: Likewise.
3354         * tic6x-tdep.c: Likewise.
3355         * tilegx-tdep.c: Likewise.
3356         * vax-tdep.c: Likewise.
3357         * xstormy16-tdep.c: Likewise.
3358         * xtensa-tdep.c: Likewise.
3359
3360         * top.c: Do not include "doublest.h".
3361         * aarch64-tdep.c: Likewise.
3362         * alpha-tdep.c: Likewise.
3363         * arm-linux-tdep.c: Likewise.
3364         * m68k-linux-tdep.c: Likewise.
3365         * tilegx-tdep.c: Likewise.
3366         * xstormy16-tdep.c: Likewise.
3367
3368 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3369
3370         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3371         (mipsn32_fbsd_sigframe): Define.
3372         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3373         for FreeBSD/mipsn32.
3374
3375 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3376
3377         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3378         AT_HWCAP.
3379
3380 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3381
3382         * MAINTAINERS (Misc): Update my email address.
3383
3384 2017-10-04  Pedro Alves  <palves@redhat.com>
3385
3386         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3387         it instead of target_gdbarch.
3388         (get_remote_state, get_remote_packet_size): Adjust
3389         get_remote_arch_state calls, passing down target_gdbarch
3390         explicitly.
3391         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3392         'gdbarch' and use it instead of target_gdbarch.
3393         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3394         passing down target_gdbarch explicitly.
3395         (struct stop_reply) <arch>: New field.
3396         (remote_parse_stop_reply): Use the stopped thread's architecture,
3397         not the current inferior's.  Save the architecture in the
3398         stop_reply.
3399         (process_stop_reply): Use the stop reply's architecture.
3400         (process_g_packet, remote_fetch_registers)
3401         (remote_prepare_to_store, store_registers_using_G)
3402         (remote_store_registers): Adjust get_remote_arch_state calls,
3403         using the regcache's architecture.
3404         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3405         passing down target_gdbarch explicitly.
3406         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3407         beneath instead of calling target_gdbarch.
3408         * target.c (default_thread_architecture): Use the specified
3409         inferior's architecture, instead of the current inferior's
3410         architecture (via target_gdbarch).
3411
3412 2017-10-04  Pedro Alves  <palves@redhat.com>
3413
3414         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3415         case.
3416         (regcache_print): Handle !target_has_registers here instead.
3417
3418 2017-10-04  Pedro Alves  <palves@redhat.com>
3419
3420         * frame.c (create_test_frame): Delete.
3421         * frame.h (create_test_frame): Delete.
3422         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3423         (class regcache_test): Delete.
3424         (test_target_has_registers, test_target_has_stack)
3425         (test_target_has_memory, test_target_prepare_to_store)
3426         (test_target_store_registers): New functions.
3427         (test_target_ops): New class.
3428         (register_to_value_test): Error out if there's already a
3429         process_stratum (or higher) target pushed.  Create a fuller mock
3430         environment, with mock target_ops, inferior, address space, thread
3431         and inferior_ptid.
3432         * progspace.c (struct address_space): Move to ...
3433         * progspace.h (struct address_space): ... here.
3434         * regcache.h (regcache::~regcache, regcache::raw_write)
3435         [GDB_SELF_TEST]: No longer virtual.
3436
3437 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3438
3439         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3440
3441 2017-10-04  Pedro Alves  <palves@redhat.com>
3442
3443         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3444         out of 'between TRY and CATCH'.
3445
3446 2017-10-04  Pedro Alves  <palves@redhat.com>
3447
3448         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3449         * common/common-exceptions.h (TRY): Open an outermost scope.
3450         Expand intro comment.
3451         (CATCH): Reindent.
3452         (END_CATCH): Close the outermost scope.
3453         * completer.c (complete_line_internal): Add missing END_CATCH.
3454
3455 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3456
3457         * NEWS (Changes since GDB 8.0): Add entry about new
3458         'set-cwd-on-gdbserver' feature.
3459         (New remote packets): Add entry for QSetWorkingDir.
3460         * common/common-inferior.h (set_inferior_cwd): New prototype.
3461         * infcmd.c (set_inferior_cwd): Remove "static".
3462         (show_cwd_command): Expand text to include remote debugging.
3463         * remote.c: Add PACKET_QSetWorkingDir.
3464         (remote_protocol_features) <QSetWorkingDir>: New entry for
3465         PACKET_QSetWorkingDir.
3466         (extended_remote_set_inferior_cwd): New function.
3467         (extended_remote_create_inferior): Call
3468         "extended_remote_set_inferior_cwd".
3469         (_initialize_remote): Call "add_packet_config_cmd" for
3470         QSetWorkingDir.
3471
3472 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3473
3474         * NEWS (New commands): Mention "set/show cwd".
3475         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3476         "cd" command's help text.
3477         * common/common-inferior.h (get_inferior_cwd): New prototype.
3478         * infcmd.c (inferior_cwd_scratch): New global variable.
3479         (set_inferior_cwd): New function.
3480         (get_inferior_cwd): Likewise.
3481         (set_cwd_command): Likewise.
3482         (show_cwd_command): Likewise.
3483         (_initialize_infcmd): Add "set/show cwd" commands.
3484         * inferior.h (class inferior) <cwd>: New field.
3485         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3486         (fork_inferior): Change inferior's cwd before its execution.
3487         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3488         to CreateProcess.
3489
3490 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3491
3492         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3493         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3494         (COMMON_OBS): Add gdb_tilde_expand.o.
3495         * common/gdb_tilde_expand.c: New file.
3496         * common/gdb_tilde_expand.h: Likewise.
3497
3498 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3499
3500         * gdbarch.sh (objfile): Remove duplicate declaration.
3501         * gdbarch.h: Regenerate.
3502
3503 2017-10-03  Tom Tromey  <tom@tromey.com>
3504
3505         * utils.c (internal_vproblem): Use string_vprintf.
3506
3507 2017-10-03  Tom Tromey  <tom@tromey.com>
3508
3509         * printcmd.c (info_symbol_command): Use std::string.
3510
3511 2017-10-03  Tom Tromey  <tom@tromey.com>
3512
3513         * top.c (gdb_safe_append_history): Use std::string.
3514
3515 2017-10-03  Tom Tromey  <tom@tromey.com>
3516
3517         * event-top.c (stdin_event_handler): Update.
3518         * main.c (captured_main_1): Update.
3519         * top.h (make_delete_ui_cleanup): Remove.
3520         (struct ui): Add constructor and destructor.
3521         (new_ui, delete_ui): Remove.
3522         * top.c (make_delete_ui_cleanup): Remove.
3523         (new_ui_command): Use std::unique_ptr.
3524         (delete_ui_cleanup): Remove.
3525         (ui::ui): Rename from new_ui.  Update.
3526         (free_ui): Remove.
3527         (ui::~ui): Rename from delete_ui.  Update.
3528
3529 2017-10-03  Tom Tromey  <tom@tromey.com>
3530
3531         * symfile.c (load_progress): Use gdb::byte_vector.
3532
3533 2017-10-03  Tom Tromey  <tom@tromey.com>
3534
3535         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3536         declaration.
3537         * printcmd.c (x_command): Remove unused declaration.
3538         * symfile.c (symbol_file_command): Remove unused declaration.
3539
3540 2017-10-03  Tom Tromey  <tom@tromey.com>
3541
3542         * utils.c (internal_vproblem): Use std::string.
3543         (defaulted_query): Likewise.
3544
3545 2017-10-03  Tom Tromey  <tom@tromey.com>
3546
3547         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3548         * top.c (execute_command_to_string): Update.
3549         * utils.c (make_cleanup_restore_page_info): Remove.
3550         (do_restore_page_info_cleanup): Remove.
3551         (set_batch_flag_and_restore_page_info):
3552         New.
3553         (make_cleanup_restore_page_info): Remove.
3554         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3555         (~set_batch_flag_and_restore_page_info): New
3556         (make_cleanup_restore_uinteger): Remove.
3557         (make_cleanup_restore_integer): Remove.
3558         (struct restore_integer_closure): Remove.
3559         (restore_integer): Remove.
3560         * utils.h (struct set_batch_flag_and_restore_page_info): New
3561         class.
3562         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3563         (make_cleanup_restore_page_info): Remove.
3564         (make_cleanup_restore_uinteger) Remove.
3565         (make_cleanup_restore_integer) Remove.
3566
3567 2017-10-03  Tom Tromey  <tom@tromey.com>
3568
3569         * record-full.h (record_full_gdb_operation_disable_set): Return
3570         scoped_restore_tmpl<int>.
3571         * infrun.c (adjust_pc_after_break): Update.
3572         (handle_signal_stop): Update.
3573         * record-full.c (record_full_gdb_operation_disable_set): Return
3574         scoped_restore_tmpl<int>.
3575         (record_full_wait_1, record_full_insert_breakpoint)
3576         (record_full_remove_breakpoint, record_full_save)
3577         (record_full_goto_insn): Update.
3578
3579 2017-10-02  Tom Tromey  <tom@tromey.com>
3580
3581         PR rust/22236:
3582         * rust-lang.c (rust_val_print_str): New function.
3583         (val_print_struct): Call it.
3584         (rust_subscript): Preserve name of slice type.
3585
3586 2017-10-02  Tom Tromey  <tom@tromey.com>
3587
3588         * rust-lang.c (rust_subscript): Handle slices in
3589         EVAL_AVOID_SIDE_EFFECTS case.
3590
3591 2017-10-02  Tom Tromey  <tom@tromey.com>
3592
3593         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3594
3595 2017-10-02  Tom Tromey  <tom@tromey.com>
3596
3597         * rust-lang.h (rust_slice_type): Add "extern".
3598
3599 2017-10-02  Tom Tromey  <tom@tromey.com>
3600             Pedro Alves  <palves@redhat.com>
3601
3602         * ada-lang.h (ada_exc_info::operator<): Make const.
3603         (ada_exc_info::operator==): Make const.
3604         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3605         Make const.
3606
3607 2017-09-29  Tom Tromey  <tom@tromey.com>
3608
3609         * target.c (read_whatever_is_readable): Change type of "result".
3610         Update.
3611         (free_memory_read_result_vector): Remove.
3612         (read_memory_robust): Change return type.  Update.
3613         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3614         bin2hex, std::string.
3615         * target.h (memory_read_result_s): Remove typedef.
3616         (free_memory_read_result_vector): Remove.
3617         (read_memory_robust): Return std::vector.
3618
3619 2017-09-29  Tom Tromey  <tom@tromey.com>
3620
3621         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3622
3623 2017-09-29  Tom Tromey  <tom@tromey.com>
3624
3625         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3626         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3627         operator< and operator==.
3628         (ada_exceptions_list): Return a std::vector.
3629         * ada-lang.c (ada_exc_info::operator<): Rename from
3630         compare_ada_exception_info.
3631         (ada_exc_info::operator==): New.
3632         (sort_remove_dups_ada_exceptions_list): Change type of
3633         "exceptions".
3634         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3635         (ada_add_global_exceptions): Likewise.
3636         (ada_exceptions_list_1): Return a std::vector.
3637         (ada_exceptions_list): Likewise.
3638
3639 2017-09-29  Tom Tromey  <tom@tromey.com>
3640
3641         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3642         'std::set *'.
3643         (print_one_inferior): Update.
3644         (free_vector_of_ints): Remove.
3645         (list_available_thread_groups): Change "ids" to std::set.
3646         (mi_cmd_list_thread_groups): Update.
3647         (struct collect_cores_data) <core>: Now a std::set.
3648         (collect_cores): Update.
3649         (unique): Remove.
3650         (print_one_inferior): Update.
3651
3652 2017-09-29  Tom Tromey  <tom@tromey.com>
3653
3654         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3655         (mi_execute_async_cli_command): Likewise.
3656         (mi_cmd_trace_frame_collected): Use field_fmt.
3657
3658 2017-09-29  Tom Tromey  <tom@tromey.com>
3659
3660         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3661         gdb::byte_vector.
3662
3663 2017-09-29  Tom Tromey  <tom@tromey.com>
3664
3665         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3666
3667 2017-09-29  Tom Tromey  <tom@tromey.com>
3668
3669         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3670
3671 2017-09-29  Tom Tromey  <tom@tromey.com>
3672
3673         * varobj.h (varobj_gen_name): Return std::string.
3674         * varobj.c (varobj_gen_name): Return std::string.
3675         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3676         (mi_cmd_var_delete): Don't copy "name".
3677
3678 2017-09-29  Tom Tromey  <tom@tromey.com>
3679
3680         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3681         (mi_cmd_break_insert_1): Update.
3682
3683 2017-09-29  Tom Tromey  <tom@tromey.com>
3684
3685         * target.h (make_scoped_defer_target_commit_resume): Update.
3686         * target.c (make_scoped_defer_target_commit_resume): Rename from
3687         make_cleanup_defer_target_commit_resume.  Return a
3688         scoped_restore.
3689         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3690
3691 2017-09-29  Tom Tromey  <tom@tromey.com>
3692
3693         * main.c (captured_main_1): Remove unused declaration.
3694         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3695
3696 2017-09-29  Tom Tromey  <tom@tromey.com>
3697
3698         * symtab.c (search_symbols): Remove unused outer cleanup.
3699         (make_source_files_completion_list): Remove unused declaration.
3700
3701 2017-09-29  Tom Tromey  <tom@tromey.com>
3702
3703         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3704
3705 2017-09-29  Tom Tromey  <tom@tromey.com>
3706
3707         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3708         gdb::byte_vector.
3709
3710 2017-09-29  Tom Tromey  <tom@tromey.com>
3711
3712         * complaints.c (vcomplaint): Use std::string.
3713
3714 2017-09-29  Tom Tromey  <tom@tromey.com>
3715
3716         * tracepoint.c (trace_variable_command): Use std::string.
3717         (encode_actions_1): Remove unused declarations.
3718         (create_tsv_from_upload): Use std::string.
3719
3720 2017-09-29  Tom Tromey  <tom@tromey.com>
3721
3722         * cp-support.c (gdb_demangle): Use std::string.
3723
3724 2017-09-29  Tom Tromey  <tom@tromey.com>
3725
3726         * stack.c (parse_frame_specification): Use std::string
3727         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3728
3729 2017-09-29  Tom Tromey  <tom@tromey.com>
3730
3731         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3732
3733 2017-09-29  Tom Tromey  <tom@tromey.com>
3734
3735         * utils.c (vfprintf_maybe_filtered): Use std::string.
3736         (vfprintf_unfiltered): Likewise.
3737
3738 2017-09-29  Tom Tromey  <tom@tromey.com>
3739
3740         * event-top.c (top_level_prompt): Return std::string.
3741         (display_gdb_prompt): Update.
3742
3743 2017-09-29  Tom Tromey  <tom@tromey.com>
3744
3745         * unittests/common-utils-selftests.c (format): New function.
3746         (string_vprintf_tests): New function.
3747         (_initialize_common_utils_selftests): Register new tests.
3748         * common/common-utils.c (string_vprintf): New function.
3749         * common/common-utils.h (string_vprintf): Declare.
3750
3751 2017-09-29  Pedro Alves  <palves@redhat.com>
3752
3753         * common/rsp-low.c (unpack_varlen_hex): Constify.
3754         * common/rsp-low.h (unpack_varlen_hex): Constify.
3755         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3756         Constify.
3757         * remote.c (remote_set_permissions, read_ptid)
3758         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3759         (remote_static_tracepoint_marker_at)
3760         (remote_static_tracepoint_markers_by_strid)
3761         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3762         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3763         (parse_tracepoint_definition, parse_tsv_definition)
3764         (parse_static_tracepoint_marker_definition): Constify.
3765         * tracepoint.h (parse_static_tracepoint_marker_definition)
3766         (parse_trace_status, parse_tracepoint_status)
3767         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3768
3769 2017-09-29  Pedro Alves  <palves@redhat.com>
3770
3771         * remote.c (target_buf, target_buf_size): Delete.
3772         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3773         Use the connection's packet buffer instead.
3774         All callers adjusted.
3775         (_initialize_remote): Remove references to target_buf and
3776         target_buf_size.
3777
3778 2017-09-28  Pedro Alves  <palves@redhat.com>
3779
3780         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3781         unittests/common-utils-selftests.c.
3782         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3783         (COMMON_OBS): Remove utils-selftests.o.
3784         * utils-selftests.c: Move to ...
3785         * unittests/common-utils-selftests.c: ... here and rename self
3786         test to "string_printf".
3787
3788 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3789
3790         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3791         having NULL cus or tus.
3792
3793 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3794
3795         * arm-tdep.c: (convert_from_extended): Remove.
3796         (convert_to_extended): Likewise.
3797         (arm_extract_return_value): Use convert_typed_floating.
3798         (arm_store_return_value): Likewise.
3799
3800         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3801         * sh-tdep.c: Do not include "floatformat.h".
3802         (sh_littlebyte_bigword_type): New function.
3803         (sh_register_convert_to_virtual): Use convert_typed_floating.
3804         (sh_register_convert_to_raw): Likewise.
3805         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3806         (sh64_littlebyte_bigword_type): New function.
3807         (sh64_extract_return_value): Use convert_typed_floating.
3808         (sh64_register_convert_to_virtual): Likewise.
3809         (sh64_register_convert_to_raw): Likewise.
3810
3811 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3812
3813         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3814         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3815
3816         * gdbtypes.h (union type_specific): Make field floatformat hold
3817         just a single struct floatformat, not an array.
3818         (floatformat_from_type): Move here.
3819         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3820         changed TYPE_FLOATFORMAT definition.
3821         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3822         (recursive_dump_type): Likewise.
3823         (init_float_type): Install correct floatformat for byte order.
3824         (arch_float_type): Likewise.
3825
3826 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3827
3828         * gdbtypes.c (init_type): Change incoming argument from
3829         length-in-bytes to length-in-bits.  Assert length is a
3830         multiple of TARGET_CHAR_BITS.
3831         (arch_type, arch_flags_type): Likewise.
3832         (init_integer_type): Update call to init_type.
3833         (init_character_type): Likewise.
3834         (init_boolean_type): Likewise.
3835         (init_float_type): Likewise.
3836         (init_decfloat_type): Likewise.
3837         (init_complex_type): Likewise.
3838         (init_pointer_type): Likewise.
3839         (objfile_type): Likewise.
3840         (arch_integer_type): Update call to arch_type.
3841         (arch_character_type): Likewise.
3842         (arch_boolean_type): Likewise.
3843         (arch_float_type): Likewise.
3844         (arch_decfloat_type): Likewise.
3845         (arch_complex_type): Likewise.
3846         (arch_pointer_type): Likewise.
3847         (gdbtypes_post_init): Likewise.
3848
3849         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3850         (read_base_type): Likewise.
3851         * mdebugread.c (basic_type): Likewise.
3852         * stabsread.c (dbx_init_float_type): Likewise.
3853         (rs6000_builtin_type): Likewise.
3854         (read_range_type): Likewise.  Also, fix call to init_integer_type
3855         with erroneous length argument.
3856
3857         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3858         * d-lang.c (build_d_types): Likewise.
3859         * f-lang.c (build_fortran_types): Likewise.
3860         * go-lang.c (build_go_types): Likewise.
3861         * opencl-lang.c (build_opencl_types): Likewise.
3862         * jit.c (finalize_symtab): Likewise.
3863         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3864         (build_std_type_info_type): Likewise.
3865         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3866         update call to arch_flags_type.
3867
3868         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3869         arch_type.
3870         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3871         * windows-tdep.c (windows_get_tlb_type): Likewise.
3872
3873         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3874         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3875         * m32c-tdep.c (make_types): Likewise.
3876         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3877         (rl78_psw_type): Update call to arch_flags_type.
3878         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3879         * rx-tdep.c (rx_psw_type): Likewise.
3880         (rx_fpsw_type): Likewise.
3881         * sparc-tdep.c (sparc_psr_type): Likewise.
3882         (sparc_fsr_type): Likewise.
3883         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3884         (sparc64_ccr_type): Likewise.
3885         (sparc64_fsr_type): Likewise.
3886         (sparc64_fprs_type): Likewise.
3887
3888 2017-09-27  Tom Tromey  <tom@tromey.com>
3889
3890         * findcmd.c (find_command): Constify.
3891
3892 2017-09-27  Tom Tromey  <tom@tromey.com>
3893
3894         * ada-tasks.c (task_command_1, task_command): Constify.
3895
3896 2017-09-27  Tom Tromey  <tom@tromey.com>
3897
3898         * symtab.c (maintenance_print_symbol_cache)
3899         (maintenance_flush_symbol_cache)
3900         (maintenance_print_symbol_cache_statistics): Constify.
3901
3902 2017-09-27  Tom Tromey  <tom@tromey.com>
3903
3904         * inferior.c (detach_inferior_command, kill_inferior_command)
3905         (inferior_command): Constify.
3906
3907 2017-09-27  Tom Tromey  <tom@tromey.com>
3908
3909         * regcache.c (regcache_print, maintenance_print_registers)
3910         (maintenance_print_raw_registers)
3911         (maintenance_print_cooked_registers)
3912         (maintenance_print_register_groups)
3913         (maintenance_print_remote_registers): Constify.
3914
3915 2017-09-27  Tom Tromey  <tom@tromey.com>
3916
3917         * printcmd.c (map_display_numbers, undisplay_command)
3918         (enable_disable_display_command, enable_display_command)
3919         (disable_display_command): Constify.
3920
3921 2017-09-27  Tom Tromey  <tom@tromey.com>
3922
3923         * breakpoint.h (delete_command): Don't declare.
3924         * breakpoint.c (delete_command, enable_once_command)
3925         (enable_count_command, enable_delete_command, breakpoint_1)
3926         (maintenance_info_breakpoints, stopin_command, stopat_command)
3927         (delete_command, delete_trace_command, save_breakpoints)
3928         (save_breakpoints_command, save_tracepoints_command): Constify.
3929
3930 2017-09-27  Tom Tromey  <tom@tromey.com>
3931
3932         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3933         (skip_ws, extract_identifier, macro_define_command)
3934         (macro_undef_command, macro_list_command): Constify.
3935
3936 2017-09-27  Tom Tromey  <tom@tromey.com>
3937
3938         * infcmd.c (environment_info, set_environment_command)
3939         (unset_environment_command, path_info, info_proc_cmd_1)
3940         (info_proc_cmd_mappings, info_proc_cmd_stat)
3941         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3942         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3943
3944 2017-09-27  Tom Tromey  <tom@tromey.com>
3945
3946         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3947         Constify.
3948
3949 2017-09-27  Tom Tromey  <tom@tromey.com>
3950
3951         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3952
3953 2017-09-27  Tom Tromey  <tom@tromey.com>
3954
3955         * demangle.c (demangle_command): Constify.
3956
3957 2017-09-27  Tom Tromey  <tom@tromey.com>
3958
3959         * progspace.c (maintenance_info_program_spaces_command):
3960         Constify.
3961
3962 2017-09-27  Tom Tromey  <tom@tromey.com>
3963
3964         * compile/compile.c (check_raw_argument, compile_file_command)
3965         (compile_code_command, compile_print_command): Constify.
3966
3967 2017-09-27  Tom Tromey  <tom@tromey.com>
3968
3969         * reggroups.c (maintenance_print_reggroups): Constify.
3970
3971 2017-09-27  Tom Tromey  <tom@tromey.com>
3972
3973         * dwarf2read.c (save_gdb_index_command): Constify.
3974
3975 2017-09-27  Tom Tromey  <tom@tromey.com>
3976
3977         * stap-probe.c (info_probes_stap_command): Constify.
3978
3979 2017-09-27  Tom Tromey  <tom@tromey.com>
3980
3981         * fork-child.c (unset_exec_wrapper_command): Constify.
3982
3983 2017-09-27  Tom Tromey  <tom@tromey.com>
3984
3985         * btrace.c (get_uint, get_context_size, no_chunk)
3986         (maint_btrace_packet_history_cmd)
3987         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3988         (maint_info_btrace_cmd): Constify.
3989
3990 2017-09-27  Tom Tromey  <tom@tromey.com>
3991
3992         * reverse.c (delete_bookmark_command): Constify.
3993
3994 2017-09-27  Tom Tromey  <tom@tromey.com>
3995
3996         * remote.c (set_memory_packet_size)
3997         (set_memory_write_packet_size, show_memory_write_packet_size)
3998         (set_memory_read_packet_size, show_memory_read_packet_size)
3999         (compare_sections_command, packet_command, remote_put_command)
4000         (remote_get_command, remote_delete_command): Constify.
4001
4002 2017-09-27  Tom Tromey  <tom@tromey.com>
4003
4004         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4005         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4006         (set_mipsfpu_auto_command): Constify.
4007
4008 2017-09-27  Tom Tromey  <tom@tromey.com>
4009
4010         * cli/cli-cmds.h (cd_command): Constify.
4011         * cli/cli-cmds.c (cd_command): Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * thread.c (thread_name_command, thread_find_command): Constify.
4016
4017 2017-09-27  Tom Tromey  <tom@tromey.com>
4018
4019         * probe.c (enable_probes_command, disable_probes_command):
4020         Constify.
4021
4022 2017-09-27  Tom Tromey  <tom@tromey.com>
4023
4024         * symfile.c (symbol_file_command): Constify.
4025         * gdbcore.h (deprecated_file_changed_hook): Constify.
4026         * exec.c (deprecated_file_changed_hook, exec_file_command)
4027         (file_command): Constify.
4028         * defs.h (symbol_file_command): Constify.
4029
4030 2017-09-27  Tom Tromey  <tom@tromey.com>
4031
4032         * remote-fileio.c (set_system_call_allowed)
4033         (show_system_call_allowed): Constify.
4034
4035 2017-09-27  Tom Tromey  <tom@tromey.com>
4036
4037         * tracepoint.c (delete_trace_variable_command)
4038         (tfind_end_command, tfind_start_command, tfind_pc_command)
4039         (tfind_tracepoint_command, tfind_line_command)
4040         (tfind_range_command, tfind_outside_command): Constify.
4041
4042 2017-09-27  Tom Tromey  <tom@tromey.com>
4043
4044         * ax-gdb.c (maint_agent_printf_command, agent_command)
4045         (agent_eval_command): Constify.
4046
4047 2017-09-27  Tom Tromey  <tom@tromey.com>
4048
4049         * tracepoint.c (info_scope_command): Constify.
4050         * python/python.c (gdbpy_decode_line): Constify.
4051         * python/py-breakpoint.c (bppy_init): Constify.
4052         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4053         * location.h: (new_linespec_location)
4054         (string_to_event_location_basic, string_to_event_location):
4055         Constify.
4056         * location.c (new_linespec_location)
4057         (string_to_event_location_basic, string_to_event_location):
4058         Constify.
4059         * linespec.h (decode_line_with_current_source)
4060         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4061         * linespec.c (linespec_lex_to_end)
4062         (decode_line_with_current_source)
4063         (decode_line_with_last_displayed): Constify.
4064         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4065         Constify.
4066         * cli/cli-cmds.c (edit_command, list_command): Constify.
4067         * breakpoint.h (until_break_command, watch_command_wrapper)
4068         (awatch_command_wrapper, rwatch_command_wrapper)
4069         (init_ada_exception_breakpoint): Constify.
4070         * breakpoint.c (break_command_1, dprintf_command)
4071         (break_range_command, watch_command_wrapper)
4072         (rwatch_command_wrapper, awatch_command_wrapper)
4073         (until_break_command, init_ada_exception_breakpoint)
4074         (strace_marker_create_sals_from_location, trace_command)
4075         (ftrace_command, strace_command, struct tracepoint): Constify.
4076         * ax-gdb.c (agent_command_1): Constify.
4077         * ada-lang.c (ada_exception_sal): Constify.
4078
4079 2017-09-27  Tom Tromey  <tom@tromey.com>
4080
4081         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4082         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4083         (get_context_size, no_chunk, get_insn_history_modifiers)
4084         (cmd_record_insn_history, get_call_history_modifiers)
4085         (cmd_record_call_history): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * source.c (show_substitute_path_command)
4090         (unset_substitute_path_command, set_substitute_path_command):
4091         Constify.
4092
4093 2017-09-27  Tom Tromey  <tom@tromey.com>
4094
4095         * typeprint.c (maintenance_print_type): Constify.
4096         * maint.c (maintenance_dump_me, maintenance_demangle)
4097         (maintenance_time_display, maintenance_info_sections)
4098         (maintenance_print_statistics, maintenance_deprecate)
4099         (maintenance_undeprecate): Constify.
4100         (maintenance_do_deprecate): Constify.  Use std::string.
4101         (maintenance_selftest): Constify.
4102         * gdbtypes.h (maintenance_print_type): Constify.
4103
4104 2017-09-27  Tom Tromey  <tom@tromey.com>
4105
4106         * hppa-tdep.c (unwind_command): Constify.
4107
4108 2017-09-27  Tom Tromey  <tom@tromey.com>
4109
4110         * target-descriptions.c (unset_tdesc_filename_cmd)
4111         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4112         Constify.
4113
4114 2017-09-27  Tom Tromey  <tom@tromey.com>
4115
4116         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4117
4118 2017-09-27  Tom Tromey  <tom@tromey.com>
4119
4120         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4121
4122 2017-09-27  Tom Tromey  <tom@tromey.com>
4123
4124         * tui/tui-regs.c (tui_reg_command): Constify.
4125
4126 2017-09-27  Tom Tromey  <tom@tromey.com>
4127
4128         * skip.c (skip_file_command, skip_function_command)
4129         (skip_enable_command, skip_disable_command, skip_delete_command):
4130         Constify.
4131
4132 2017-09-27  Tom Tromey  <tom@tromey.com>
4133
4134         * record-btrace.c (cmd_record_btrace_bts_start)
4135         (cmd_record_btrace_pt_start): Constify.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * symmisc.c (maintenance_print_symbols)
4140         (maintenance_print_msymbols, maintenance_print_objfiles)
4141         (maintenance_info_symtabs, maintenance_check_symtabs)
4142         (maintenance_expand_symtabs, maintenance_info_line_tables):
4143         Constify.
4144
4145 2017-09-27  Tom Tromey  <tom@tromey.com>
4146
4147         * top.c (new_ui_command): Constify.
4148
4149 2017-09-27  Tom Tromey  <tom@tromey.com>
4150
4151         * symfile.c (add_symbol_file_command)
4152         (remove_symbol_file_command, list_overlays_command)
4153         (map_overlay_command, unmap_overlay_command)
4154         (overlay_auto_command, overlay_manual_command)
4155         (overlay_off_command, overlay_load_command): Constify.
4156
4157 2017-09-27  Tom Tromey  <tom@tromey.com>
4158
4159         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4160         (info_spu_mailbox_command, info_spu_dma_command)
4161         (info_spu_proxydma_command): Constify.
4162
4163 2017-09-27  Tom Tromey  <tom@tromey.com>
4164
4165         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4166
4167 2017-09-27  Tom Tromey  <tom@tromey.com>
4168
4169         * cli/cli-script.c (user_defined_command): Constify.
4170
4171 2017-09-27  Tom Tromey  <tom@tromey.com>
4172
4173         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4174         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4175         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4176         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4177         (dump_binary_value, append_binary_memory, append_binary_value):
4178         Constify.
4179         (struct dump_context) <func>: Constify.
4180         (add_dump_command): Update.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * cli/cli-cmds.c (show_version, show_configuration)
4185         (source_command, show_user): Constify.
4186
4187 2017-09-27  Tom Tromey  <tom@tromey.com>
4188
4189         * target.c (maintenance_print_target_stack): Constify.
4190
4191 2017-09-27  Tom Tromey  <tom@tromey.com>
4192
4193         * interps.c (interpreter_exec_cmd): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * record-full.c (cmd_record_full_restore): Constify.
4198
4199 2017-09-27  Tom Tromey  <tom@tromey.com>
4200
4201         * memattr.c (enable_mem_command, disable_mem_command)
4202         (delete_mem_command): Constify.
4203
4204 2017-09-27  Tom Tromey  <tom@tromey.com>
4205
4206         * value.c (show_convenience): Constify.
4207
4208 2017-09-27  Tom Tromey  <tom@tromey.com>
4209
4210         * gdbcore.h (core_file_command): Update.
4211         * corefile.c (core_file_command): Constify.
4212
4213 2017-09-27  Tom Tromey  <tom@tromey.com>
4214
4215         * user-regs.c (maintenance_print_user_registers): Constify.
4216
4217 2017-09-27  Tom Tromey  <tom@tromey.com>
4218
4219         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4220
4221 2017-09-27  Tom Tromey  <tom@tromey.com>
4222
4223         * cp-support.c (first_component_command): Constify.
4224
4225 2017-09-27  Tom Tromey  <tom@tromey.com>
4226
4227         * psymtab.c (maintenance_print_psymbols)
4228         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4229         Constify.
4230
4231 2017-09-27  Tom Tromey  <tom@tromey.com>
4232
4233         * windows-tdep.c (display_tib): Constify.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * linux-fork.c (delete_checkpoint_command)
4238         (detach_checkpoint_command): Constify.
4239
4240 2017-09-27  Tom Tromey  <tom@tromey.com>
4241
4242         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4243
4244 2017-09-27  Tom Tromey  <tom@tromey.com>
4245
4246         * arc-tdep.c (dump_arc_instruction_command): Constify.
4247
4248 2017-09-27  Tom Tromey  <tom@tromey.com>
4249
4250         * valprint.c (set_radix, show_radix): Constify.
4251
4252 2017-09-27  Tom Tromey  <tom@tromey.com>
4253
4254         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4255
4256 2017-09-27  Tom Tromey  <tom@tromey.com>
4257
4258         * command.h (not_just_help_class_command): Update.
4259         * cli/cli-decode.h (not_just_help_class_command): Update.
4260         * cli/cli-decode.c (not_just_help_class_command): Constify.
4261
4262 2017-09-27  Tom Tromey  <tom@tromey.com>
4263
4264         * gdb_bfd.c (maintenance_info_bfds): Constify.
4265
4266 2017-09-27  Tom Tromey  <tom@tromey.com>
4267
4268         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4269         overloads.
4270         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4271         (do_const_cfunc): New function.
4272         (cmd_cfunc_eq): New overload.
4273         (cli_user_command_p): Check do_const_cfunc.
4274         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4275         const_cfunc.
4276         * command.h (add_cmd): Add const overload and no-function
4277         overload.
4278         (set_cmd_cfunc): Add const overload.
4279         (cmd_const_cfunc_ftype): Declare.
4280         (cmd_cfunc_eq): Add const overload.
4281         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4282         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4283         overload.
4284
4285 2017-09-27  Tom Tromey  <tom@tromey.com>
4286
4287         * macroexp.c (get_next_token_for_substitution): New function.
4288         (substitute_args): Call it.  Check for __VA_OPT__.
4289
4290 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4291             Pedro Alves <palves@redhat.com>
4292
4293         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4294         producer_is_icc_lt_14.
4295         (producer_is_icc_lt_14): New function.
4296         (check_producer): Add code for checking version of ICC.
4297         (producer_is_icc): Move to producer.c.
4298         (read_structure_type): Restrict ICC workaround to ICC<14.
4299         * producer.c: Include selftest.h.
4300         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4301         New functions.
4302         * producer.h (producer_is_icc): New declaration.
4303
4304 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4305
4306         * Makefile.in (SFILES): Add producer.c.
4307         (COMMON_OBS): Add producer.o
4308         * amd64-tdep.c (producer.h): Add new include.
4309         * dwarf2read.c (producer.h): Add new include.
4310         * producer.c: New file.
4311         * producer.h: New file.
4312         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4313         producer.c.
4314         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4315         producer.h.
4316
4317 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4318
4319         * configure.ac: Search ncursesw before ncurses.
4320         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4321         * gdb_curses.h: Include <ncursesw/ncurses.h>
4322         * config.in, configure: Regenerate.
4323
4324 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4325
4326         PR gdb/22185
4327         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4328         obsolete.
4329         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4330         Remove i386sol2 support.
4331         * configure.nat <i386sol2>: Remove.
4332         <sol2-64>: Fold into ...
4333         <sol2>: ... this.
4334         Move common settings to default section.
4335         Add sol-thread.o.
4336         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4337         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4338         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4339         <i[34567]86-*-solaris*>: Remove.
4340         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4341
4342         * configure.ac: Remove wctype in libw check.
4343         (_MSE_INT_H): Don't define on Solaris 7-9.
4344         <solaris*>: Remove libthread_db.so.1 check.
4345         * configure: Regenerate.
4346         * config.in: Regenerate.
4347
4348         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4349         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4350         (gdb_ps_size_t): Remove.
4351         Use base types in users.
4352         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4353
4354         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4355
4356 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4357
4358         PR build/22206
4359         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4360         (adi_is_addr_mapped): Likewise.
4361         (PSR_ICC): Don't redefine.
4362         (PSR_IMPL): Likewise.
4363
4364 2017-09-25  Tom Tromey  <tom@tromey.com>
4365
4366         * regcache.c (regcache::dump): Use string_printf.
4367
4368 2017-09-25  Tom Tromey  <tom@tromey.com>
4369
4370         * regcache.c (class regcache_invalidator): New.
4371         (struct register_to_invalidate): Remove.
4372         (make_cleanup_regcache_invalidate): Remove.
4373         (regcache::raw_write): Use regcache_invalidator.
4374
4375 2017-09-25  Tom Tromey  <tom@tromey.com>
4376
4377         * spu-tdep.c (spu2ppu_sniffer): Update.
4378         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4379         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4380         Remove.
4381         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4382         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4383         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4384         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4385         (frame_pop): Update.
4386
4387 2017-09-25  Tom Tromey  <tom@tromey.com>
4388
4389         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4390         * regcache.h (regcache_xfree): Don't declare.
4391         * regcache.c (regcache_xfree): Remove.
4392         (do_regcache_xfree): Use delete.
4393         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4394         * linux-fork.c (free_fork): Use delete.
4395         (fork_save_infrun_state): Likewise.
4396         * jit.c (jit_dealloc_cache): Use delete.
4397         * infrun.c (discard_infcall_suspend_state): Use delete.
4398
4399 2017-09-25  Tom Tromey  <tom@tromey.com>
4400
4401         * regcache.h (regcache_xmalloc): Don't declare.
4402         (regcache_raw_set_cached_value): Update comment.
4403         * regcache.c (regcache_xmalloc): Remove.
4404         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4405         * jit.c (jit_frame_sniffer): Use new.
4406         * frame.c (frame_save_as_regcache): Use new.
4407
4408 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4409
4410         * NEWS: Advertise support for guarded-storage registers on IBM z.
4411
4412 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4413
4414         * s390-linux-nat.c (have_regset_gs): New static variable.
4415         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4416         control block and guarded-storage broadcast control regsets.
4417         (s390_read_description): Detect whether the target has
4418         guarded-storage support, return appropriate tdesc.
4419         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4420         (features/s390x-gs-linux64.c): Likewise.
4421         (struct gdbarch_tdep) <have_gs>: New field.
4422         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4423         (s390_gsbc_regset): New variables.
4424         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4425         and s390_gsbc_regset, if applicable.
4426         (s390_core_read_description): Check whether core file was from a
4427         target with guarded-storage support; include appropriate regsets.
4428         (s390_gdbarch_init): Add registers for guarded-storage support.
4429         (_initialize_s390_tdep): Initialize new target descriptions that
4430         include registers for guarded-storage support.
4431         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4432         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4433         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4434         (S390_NUM_REGS): Adjust macro definition.
4435         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4436         (tdesc_s390x_gs_linux64): New declarations.
4437
4438 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4439
4440         * features/s390-gs-linux64.xml: New file.
4441         * features/s390-gs.xml: New file.
4442         * features/s390-gsbc.xml: New file.
4443         * features/s390x-gs-linux64.xml: New file.
4444         * features/Makefile (WHICH): Add s390-gs-linux64 and
4445         s390x-gs-linux64.
4446         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4447         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4448         * features/s390-gs-linux64.c: New generated file.
4449         * features/s390x-gs-linux64.c: New file.
4450         * regformats/s390-gs-linux64.dat: New file.
4451         * regformats/s390x-gs-linux64.dat: New file.
4452
4453 2017-09-23  Tom Tromey  <tom@tromey.com>
4454
4455         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4456
4457 2017-09-22  Tom Tromey  <tom@tromey.com>
4458
4459         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4460         type to scoped_restore_tmpl.
4461         <scoped_input_handler>: Initialize m_quit_handler directly.
4462
4463 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4464
4465         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4466         (cd_command): Likewise.  Free "current_directory" before
4467         assigning to it.
4468         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4469         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4470         * top.c (gdb_dirbuf): Remove global declaration.
4471         * top.h (gdb_dirbuf): Likewise.
4472
4473 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4474
4475         * gnulib/aclocal.m4: Regenerate.
4476         * gnulib/config.in: Regenerate.
4477         * gnulib/configure: Regenerate.
4478         * gnulib/import/Makefile.am: Regenerate.
4479         * gnulib/import/Makefile.in: Regenerate.
4480         * gnulib/import/assure.h: New file.
4481         * gnulib/import/at-func.c: Likewise
4482         * gnulib/import/chdir-long.c: New file.
4483         * gnulib/import/chdir-long.h: New file.
4484         * gnulib/import/cloexec.c: New file.
4485         * gnulib/import/cloexec.h: New file.
4486         * gnulib/import/close.c: New file.
4487         * gnulib/import/closedir.c: New file.
4488         * gnulib/import/dirent-private.h: New file.
4489         * gnulib/import/dup-safer.c: New file.
4490         * gnulib/import/dup.c: New file.
4491         * gnulib/import/dup2.c: New file.
4492         * gnulib/import/error.c: New file.
4493         * gnulib/import/error.h: New file.
4494         * gnulib/import/exitfail.c: New file.
4495         * gnulib/import/exitfail.h: New file.
4496         * gnulib/import/fchdir.c: New file.
4497         * gnulib/import/fcntl.c: New file.
4498         * gnulib/import/fcntl.in.h: New file.
4499         * gnulib/import/fd-hook.c: New file.
4500         * gnulib/import/fd-hook.h: New file.
4501         * gnulib/import/fd-safer.c: New file.
4502         * gnulib/import/fdopendir.c: New file.
4503         * gnulib/import/filename.h: New file.
4504         * gnulib/import/filenamecat-lgpl.c: New file.
4505         * gnulib/import/filenamecat.h: New file.
4506         * gnulib/import/fstat.c: New file.
4507         * gnulib/import/fstatat.c: New file.
4508         * gnulib/import/getcwd-lgpl.c: New file.
4509         * gnulib/import/getcwd.c: New file.
4510         * gnulib/import/getdtablesize.c: New file.
4511         * gnulib/import/getlogin_r.c: New file.
4512         * gnulib/import/getprogname.c: New file.
4513         * gnulib/import/getprogname.h: New file.
4514         * gnulib/import/gettext.h: New file.
4515         * gnulib/import/glob-libc.h: New file.
4516         * gnulib/import/glob.c: New file.
4517         * gnulib/import/glob.in.h: New file.
4518         * gnulib/import/intprops.h: New file.
4519         * gnulib/import/m4/chdir-long.m4: New file.
4520         * gnulib/import/m4/close.m4: New file.
4521         * gnulib/import/m4/closedir.m4: New file.
4522         * gnulib/import/m4/d-ino.m4: New file.
4523         * gnulib/import/m4/d-type.m4: New file.
4524         * gnulib/import/m4/dup.m4: New file.
4525         * gnulib/import/m4/dup2.m4: New file.
4526         * gnulib/import/m4/error.m4: New file.
4527         * gnulib/import/m4/fchdir.m4: New file.
4528         * gnulib/import/m4/fcntl.m4: New file.
4529         * gnulib/import/m4/fcntl_h.m4: New file.
4530         * gnulib/import/m4/fdopendir.m4: New file.
4531         * gnulib/import/m4/filenamecat.m4: New file.
4532         * gnulib/import/m4/fstat.m4: New file.
4533         * gnulib/import/m4/fstatat.m4: New file.
4534         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4535         * gnulib/import/m4/getcwd-path-max.m4: New file.
4536         * gnulib/import/m4/getcwd.m4: New file.
4537         * gnulib/import/m4/getdtablesize.m4: New file.
4538         * gnulib/import/m4/getlogin_r.m4: New file.
4539         * gnulib/import/m4/getprogname.m4: New file.
4540         * gnulib/import/m4/glob.m4: New file.
4541         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4542         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4543         * gnulib/import/m4/mempcpy.m4: New file.
4544         * gnulib/import/m4/memrchr.m4: New file.
4545         * gnulib/import/m4/mode_t.m4: New file.
4546         * gnulib/import/m4/msvc-inval.m4: New file.
4547         * gnulib/import/m4/msvc-nothrow.m4: New file.
4548         * gnulib/import/m4/open.m4: New file.
4549         * gnulib/import/m4/openat.m4: New file.
4550         * gnulib/import/m4/opendir.m4: New file.
4551         * gnulib/import/m4/readdir.m4: New file.
4552         * gnulib/import/m4/realloc.m4: New file.
4553         * gnulib/import/m4/rewinddir.m4: New file.
4554         * gnulib/import/m4/save-cwd.m4: New file.
4555         * gnulib/import/m4/strdup.m4: New file.
4556         * gnulib/import/m4/strerror.m4: New file.
4557         * gnulib/import/m4/unistd-safer.m4: New file.
4558         * gnulib/import/mempcpy.c: New file.
4559         * gnulib/import/memrchr.c: New file.
4560         * gnulib/import/msvc-inval.c: New file.
4561         * gnulib/import/msvc-inval.h: New file.
4562         * gnulib/import/msvc-nothrow.c: New file.
4563         * gnulib/import/msvc-nothrow.h: New file.
4564         * gnulib/import/open.c: New file.
4565         * gnulib/import/openat-die.c: New file.
4566         * gnulib/import/openat-priv.h: New file.
4567         * gnulib/import/openat-proc.c: New file.
4568         * gnulib/import/openat.c: New file.
4569         * gnulib/import/openat.h: New file.
4570         * gnulib/import/opendir.c: New file.
4571         * gnulib/import/pipe-safer.c: New file.
4572         * gnulib/import/readdir.c: New file.
4573         * gnulib/import/realloc.c: New file.
4574         * gnulib/import/rewinddir.c: New file.
4575         * gnulib/import/save-cwd.c: New file.
4576         * gnulib/import/save-cwd.h: New file.
4577         * gnulib/import/strdup.c: New file.
4578         * gnulib/import/strerror-override.c: New file.
4579         * gnulib/import/strerror-override.h: New file.
4580         * gnulib/import/strerror.c: New file.
4581         * gnulib/import/unistd--.h: New file.
4582         * gnulib/import/unistd-safer.h: New file.
4583         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4584         "getcwd" and "glob".
4585         * ser-tcp.c: Undefine "close" before redefining it.
4586
4587 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4588
4589         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4590         get rid of res_val.
4591
4592 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4593
4594         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4595         <sol2,sparc>: Likewise.
4596         <sol2-64,i386>: Likewise.
4597
4598         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4599         -Wdeprecated-declarations on *-*-solaris*.
4600         * configure: Regenerate.
4601
4602         * procfs.c: Include "nat/inferior.h".
4603         (procfs_info_proc): Fix typo.
4604
4605 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4606
4607         * remote.c (vector): Include.
4608         (struct private_thread_info): Add field, thread_handle.
4609         (free_private_thread_info): Deallocate storage associated with
4610         thread handle.
4611         (get_private_info_thread): Initialize `thread_handle' field.
4612         (struct thread_item): Add field, thread_handle.
4613         (clear_threads_listing_context): Deallocate storage associated
4614         with thread handle.
4615         (start_thread): Add support for "handle" attribute.
4616         (thread_attributes): Add "handle".
4617         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4618         field.
4619         (remote_update_thread_list): Update thread_handle.
4620         (remote_thread_handle_to_thread_info): New function.
4621         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4622
4623 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4624
4625         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4626         function.
4627         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4628         * python/python-internal.h (thread_object_type): Declare.
4629
4630 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4631
4632         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4633         (target_thread_handle_to_thread_info): Declare.
4634         * target.c (target_thread_handle_to_thread_info): New function.
4635         * target-delegates.c: Regenerate.
4636         * gdbthread.h (find_thread_by_handle): Declare.
4637         * thread.c (find_thread_by_handle): New function.
4638         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4639         function.
4640         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4641
4642 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4643
4644         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4645
4646 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4647
4648         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4649
4650 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4651
4652         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4653         to gdb_target_obs.
4654
4655 2017-09-20  Tom Tromey  <tom@tromey.com>
4656
4657         * breakpoint.c (struct counted_command_line): Remove.
4658         (breakpoint_commands): Update.
4659         (alloc_counted_command_line, incref_counted_command_line)
4660         (decref_counted_command_line, do_cleanup_counted_command_line)
4661         (make_cleanup_decref_counted_command_line): Remove.
4662         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4663         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4664         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4665         (save_breakpoints): Update.
4666         * breakpoint.h (counted_command_line): Now a typedef to
4667         shared_ptr.
4668         (struct breakpoint) <commands>: Now a counted_command_line.
4669         (struct bpstats) <command>: Likewise.
4670
4671 2017-09-20  Tom Tromey  <tom@tromey.com>
4672
4673         * breakpoint.c (struct commands_info, do_map_commands_command):
4674         Remove.
4675         (commands_command_1): Update.
4676         (iterate_over_related_breakpoints): Take a function_view.
4677         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4678         (delete_command): Update.
4679         (map_breakpoint_numbers): Take a function_view.
4680         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4681         (disable_command): Update.
4682         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4683         (enable_command): Update.
4684         (struct disp_data, do_enable_breakpoint_disp)
4685         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4686         (do_map_enable_delete_breakpoint): Remove.
4687         (enable_once_command, enable_count_command, enable_delete_command)
4688         (delete_trace_variable_command): Update.
4689
4690 2017-09-20  Tom Tromey  <tom@tromey.com>
4691
4692         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4693         (bpstat_clear): Use delete.
4694         (bpstats): New constructors.
4695         (bpstat_copy, bpstat_stop_status): Use new.
4696         (dprintf_after_condition_true): Update.
4697         * breakpoint.h (bpstats::bpstats): Add constructors.
4698         (bpstats::~bpstats): Add destructor.
4699
4700 2017-09-20  Pedro Alves  <palves@redhat.com>
4701
4702         * eval.c (make_params): Delete, refactored as ...
4703         (class fake_method): ... this new type's ctor.
4704         (fake_method::~fake_method): New.
4705         (evaluate_subexp_standard): Use 'fake_method'.
4706
4707 2017-09-20  Tom Tromey  <tom@tromey.com>
4708
4709         * windows-nat.c (get_windows_debug_event, windows_wait)
4710         (do_initial_windows_stuff, windows_attach): Update.
4711         * utils.c (vwarning, internal_vproblem): Update.
4712         (ui_unregister_input_event_handler_cleanup)
4713         (prepare_to_handle_input): Remove.
4714         (class scoped_input_handler): New.
4715         (defaulted_query, prompt_for_continue): Update.
4716         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4717         Update.
4718         * top.c (undo_terminal_modifications_before_exit): Update.
4719         * target/target.h (target_terminal_init, target_terminal_inferior)
4720         (target_terminal_ours): Don't declare.
4721         (class target_terminal): New.
4722         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4723         (target_terminal_ours_for_output)
4724         (make_cleanup_restore_target_terminal): Don't declare.
4725         (target_terminal_info): Remove.
4726         * target.c (enum terminal_state, terminal_state): Remove.
4727         (target_terminal::terminal_state): Define.
4728         (target_terminal::init): Rename from target_terminal_init.
4729         (target_terminal::inferior): Rename from
4730         target_terminal_inferior.
4731         (target_terminal::ours): Rename from target_terminal_ours.
4732         (target_terminal::ours_for_output): Rename from
4733         target_terminal_ours_for_output.
4734         (target_terminal::info): New method.
4735         (cleanup_restore_target_terminal)
4736         (make_cleanup_restore_target_terminal): Remove.
4737         * solib.c (handle_solib_event): Update.
4738         * remote.c (remote_serial_quit_handler): Update.
4739         (remote_terminal_inferior, remote_wait_as): Update.
4740         * record-full.c (record_full_wait_1): Update.
4741         * nto-procfs.c (procfs_create_inferior): Update.
4742         * nat/fork-inferior.c (startup_inferior): Update.
4743         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4744         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4745         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4746         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4747         (mi_breakpoint_created, mi_breakpoint_deleted)
4748         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4749         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4750         (mi_user_selected_context_changed, report_initial_inferior):
4751         Update.
4752         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4753         (linux_nat_terminal_inferior): Update.
4754         * infrun.c (follow_fork_inferior)
4755         (handle_vfork_child_exec_or_exit, do_target_resume)
4756         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4757         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4758         Update.
4759         * inflow.c (child_terminal_init, info_terminal_command): Update.
4760         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4761         (attach_command): Update.
4762         * infcall.c (call_thread_fsm_should_stop): Update.
4763         * gnu-nat.c (gnu_attach): Update.
4764         * extension.c (struct active_ext_lang_state)
4765         (restore_active_ext_lang): Update.
4766         * exceptions.c (print_flush): Update.
4767         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4768         (struct quit_handler_cleanup_data, restore_quit_handler)
4769         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4770         Remove.
4771         * cp-support.c (gdb_demangle): Update.
4772         * breakpoint.c (update_inserted_breakpoint_locations)
4773         (insert_breakpoint_locations, handle_jit_event)
4774         (disable_breakpoints_in_unloaded_shlib): Update.
4775         * annotate.c (annotate_breakpoints_invalid)
4776         (annotate_frames_invalid): Update.
4777
4778 2017-09-20  Tom Tromey  <tom@tromey.com>
4779
4780         * main.c (catch_command_errors): Rename from
4781         catch_command_errors_const.
4782         (captured_main_1): Update.
4783
4784 2017-09-20  Pedro Alves  <palves@redhat.com>
4785
4786         * cli/cli-cmds.c (list_command): Use print_sal_location.
4787         (print_sal_location): New function.
4788         (ambiguous_line_spec): Use print_sal_location.
4789         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4790         * symtab.c (find_function_start_sal): Likewise.
4791         * symtab.h (symtab_and_line::symbol): New field.
4792
4793 2017-09-20  Pedro Alves  <palves@redhat.com>
4794
4795         * linespec.c (minsym_found): Handle non-text minsyms.
4796         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4797
4798 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4799
4800         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4801         backslash.
4802
4803 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4804
4805         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4806         vmovups instead vmovaps.
4807         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4808
4809 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4810
4811         * NEWS (Changes since GDB 8.0): Add starti.
4812         * infcmd.c (enum run_break): New.
4813         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4814         case.
4815         (run_command): Use enum run_how.
4816         (start_command): Likewise.
4817         (starti_command): New function.
4818         (RUN_ARGS_HELP): New macro.
4819         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4820         commands.  Add starti command.
4821
4822 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4823
4824         * Makefile.in (monitor.o): Remove the rule.
4825
4826 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4827
4828         * annotate.h (struct annotate_arg_emitter): Use
4829         DISABLE_COPY_AND_ASSIGN.
4830         * common/refcounted-object.h (refcounted_object): Likewise.
4831         * completer.h (struct completion_result): Likewise.
4832         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4833         * filename-seen-cache.h (filename_seen_cache): Likewise.
4834         * gdbcore.h (thread_section_name): Likewise.
4835         * gdb_regex.h (compiled_regex): Likewise.
4836         * gdbthread.h (scoped_restore_current_thread): Likewise.
4837         * inferior.h (scoped_restore_current_inferior): Likewise.
4838         * jit.c (jit_reader): Likewise.
4839         * linespec.h (struct linespec_result): Likewise.
4840         * mi/mi-parse.h (struct mi_parse): Likewise.
4841         * nat/fork-inferior.c (execv_argv): Likewise.
4842         * progspace.h (scoped_restore_current_program_space): Likewise.
4843         * python/python-internal.h (class gdbpy_enter): Likewise.
4844         * regcache.h (regcache): Likewise.
4845         * target-descriptions.c (struct tdesc_reg): Likewise.
4846         (struct tdesc_type): Likewise.
4847         (struct tdesc_feature): Likewise.
4848         * ui-out.h (ui_out_emit_type): Likewise.
4849
4850 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4851
4852         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4853         label abort_expression.
4854
4855 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4856
4857         * common/buffer.c (buffer_xml_printf): Adjust.
4858         * common/xml-utils.c (xml_escape_text): Change return type to
4859         std::string, update code accordingly.
4860         * common/xml-utils.h (xml_escape_text): Change return type to
4861         std::string.
4862         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4863         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4864         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4865         Adjust.
4866
4867 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4868
4869         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4870         (SUBDIR_UNITTESTS_OBS): Add new object file.
4871         * unittests/xml-utils-selftests.c: New file.
4872
4873 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4874
4875         * common/selftest.h (selftest): New struct/interface.
4876         (register_test): Add name parameter, add new overload.
4877         (run_tests): Add filter parameter.
4878         (for_each_selftest_ftype): New typedef.
4879         (for_each_selftest): New declaration.
4880         * common/selftest.c (tests): Change type to
4881         map<string, unique_ptr<selftest>>.
4882         (simple_selftest): New struct.
4883         (register_test): New function.
4884         (register_test): Add name parameter and use it.
4885         (run_tests): Add filter parameter and use it.  Add prints.
4886         Adjust to vector -> map change.
4887         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4888         registering selftests.
4889         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4890         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4891         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4892         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4893         * findvar.c (_initialize_findvar): Likewise.
4894         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4895         * maint.c (maintenance_selftest): Update call to run_tests.
4896         (maintenance_info_selftests): New function.
4897         (_initialize_maint_cmds): Register "maintenance info selftests"
4898         command.  Update "maintenance selftest" doc.
4899         * regcache.c (_initialize_regcache): Add names when registering
4900         selftests.
4901         * rust-exp.y (_initialize_rust_exp): Likewise.
4902         * selftest-arch.c (gdbarch_selftest): New struct.
4903         (gdbarch_tests): Remove.
4904         (register_test_foreach_arch): Add name parameter.  Call
4905         register_test.
4906         (tests_with_arch): Remove, move most content to
4907         gdbarch_selftest::operator().
4908         (_initialize_selftests_foreach_arch): Remove.
4909         * selftest-arch.h (register_test_foreach_arch): Add name
4910         parameter.
4911         (run_tests_with_arch): New declaration.
4912         * utils-selftests.c (_initialize_utils_selftests): Add names
4913         when registering selftests.
4914         * utils.c (_initialize_utils): Likewise.
4915         * unittests/array-view-selftests.c
4916         (_initialize_array_view_selftests): Likewise.
4917         * unittests/environ-selftests.c (_initialize_environ_selftests):
4918         Likewise.
4919         * unittests/function-view-selftests.c
4920         (_initialize_function_view_selftests): Likewise.
4921         * unittests/offset-type-selftests.c
4922         (_initialize_offset_type_selftests): Likewise.
4923         * unittests/optional-selftests.c
4924         (_initialize_optional_selftests): Likewise.
4925         * unittests/scoped_restore-selftests.c
4926         (_initialize_scoped_restore_selftests): Likewise.
4927         * NEWS: Document "maintenance selftest" and "maint info
4928         selftests".
4929
4930 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4931
4932         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4933         scoped_restore.
4934
4935 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * mi/mi-main.c (mi_load_progress): Make uiout variable
4938         a unique_ptr.
4939
4940 2017-09-15  Pedro Alves  <palves@redhat.com>
4941
4942         * compile/compile-c-types.c (convert_enum, convert_int)
4943         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4944
4945 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4946
4947         * dwarf2read.c (copy_string): Remove.
4948         (parse_macro_definition): Replace copy_string with savestring.
4949
4950 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4951
4952         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4953         gdb_target_obs.
4954         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4955         Likewise.
4956         (i[34567]86-*-linux*): Likewise.
4957
4958 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4959
4960         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4961         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4962         <stack>: Change type to std::vector.
4963         <stack_len, stack_allocated>: Remove.
4964         <grow_stack>: Remove.
4965         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4966         (dwarf_expr_context::~dwarf_expr_context): Remove.
4967         (dwarf_expr_context::grow_stack): Remove.
4968         (dwarf_expr_context::push): Adjust.
4969         (dwarf_expr_context::pop): Adjust.
4970         (dwarf_expr_context::fetch): Adjust.
4971         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4972         (dwarf_expr_context::stack_empty_p): Adjust.
4973         (dwarf_expr_context::execute_stack_op): Adjust.
4974
4975 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4976
4977         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4978         return type to bool.
4979         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4980
4981 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4982
4983         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4984         Change type to bool.
4985         (dwarf_stack_value) <in_stack_memory>: Likewise.
4986         (dwarf_expr_context) <push_address>: Change parameter type to
4987         bool.
4988         <fetch_in_stack_memory>: Change return type to bool.
4989         <push>: Change parameter type to bool.
4990         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4991         to bool.
4992         (dwarf_expr_context::push_address): Likewise.
4993         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4994         to bool.
4995         (dwarf_expr_context::execute_stack_op): Adjust.
4996         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4997
4998 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4999
5000         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5001         (struct dwarf_expr_context) <n_pieces>: Remove.
5002         <pieces>: Change type to std::vector.
5003         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5004         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5005         pieces.
5006         (dwarf_expr_context::add_piece): Adjust.
5007         * dwarf2loc.c (struct piece_closure): Initialize fields.
5008         <n_pieces>: Remove.
5009         <pieces>: Change type to std::vector.
5010         (allocate_piece_closure): Adjust, change parameter to
5011         std::vector rvalue and std::move it to piece_closure.
5012         (rw_pieced_value): Adjust.
5013         (check_pieced_synthetic_pointer): Adjust.
5014         (indirect_synthetic_pointer): Adjust.
5015         (coerce_pieced_ref): Adjust.
5016         (free_pieced_value_closure):  Adjust.  Use delete to free
5017         piece_closure.
5018         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5019         to allocate_piece_closure.
5020         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5021
5022 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5023
5024         * probe.h (probe_ops_cp): Remove typedef.
5025         (DEF_VEC_P (probe_ops_cp)): Remove.
5026         (all_probe_ops): Change type to std::vector.
5027         * probe.c (info_probes_for_ops): Adjust to vector change.
5028         (probe_linespec_to_ops): Likewise.
5029         (all_probe_ops): Change type to std::vector.
5030         (_initialize_probe): Adjust to vector change.
5031         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5032         * elfread.c (elf_get_probes): Likewise.
5033         * stap-probe.c (_initialize_stap_probe): Likewise.
5034
5035 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5036
5037         * probe.h (struct bound_probe): Define constructors.
5038         * probe.c (bound_probe_s): Remove typedef.
5039         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5040         (collect_probes): Change return type to std::vector, remove
5041         cleanup.
5042         (compare_probes): Return bool, change parameter type.  Change
5043         semantic to "less than".
5044         (gen_ui_out_table_header_info): Change parameter to std::vector
5045         and update.
5046         (exists_probe_with_pops): Likewise.
5047         (info_probes_for_ops): Update to std::vector change.
5048         (enable_probes_command): Likewise.
5049         (disable_probes_command): Likewise.
5050
5051 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5052
5053         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5054         vec to std::vector.
5055         * probe.c (parse_probes_in_pspace): Update.
5056         (find_probes_in_objfile): Update.
5057         (find_probe_by_pc): Update.
5058         (collect_probes): Update.
5059         (probe_any_get_probes): Update.
5060         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5061         return type to reference to std::vector.
5062         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5063         std::vector and update.
5064         (dtrace_process_dof): Likewise.
5065         (dtrace_get_probes): Likewise.
5066         * elfread.c (elf_get_probes): Change return type to std::vector,
5067         store an std::vector in bfd_data.
5068         (probe_key_free): Update to std::vector.
5069         * stap-probe.c (handle_stap_probe): Change parameter to
5070         std::vector and update.
5071         (stap_get_probes): Likewise.
5072         * symfile-debug.c (debug_sym_get_probes): Change return type to
5073         std::vector and update.
5074
5075 2017-09-11  Tom Tromey  <tom@tromey.com>
5076
5077         * breakpoint.c (program_breakpoint_here_p): Update.
5078         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5079         from make_show_memory_breakpoints_cleanup.  Return a
5080         scoped_restore_tmpl<int>.
5081         (restore_show_memory_breakpoints): Remove.
5082         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5083         * mem-break.c (memory_validate_breakpoint): Update.
5084         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5085         (ia64_memory_remove_breakpoint): Update.
5086         (ia64_breakpoint_from_pc): Update.
5087         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5088         from make_show_memory_breakpoints_cleanup.
5089
5090 2017-09-11  Tom Tromey  <tom@tromey.com>
5091
5092         * d-namespace.c (d_lookup_symbol): Use std::string.
5093         (find_symbol_in_baseclass): Likewise.
5094
5095 2017-09-11  Tom Tromey  <tom@tromey.com>
5096
5097         * ctf.c (ctf_start): Use std::string.
5098
5099 2017-09-11  Tom Tromey  <tom@tromey.com>
5100
5101         * ada-lang.c (is_known_support_routine): Update.
5102         (ada_unhandled_exception_name_addr_from_raise): Update.
5103         * guile/scm-frame.c (gdbscm_frame_name): Update.
5104         * python/py-frame.c (frapy_name): Update.
5105         (frapy_function): Update.
5106         * stack.h (find_frame_funname): Update.
5107         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5108         (print_frame): Update.
5109
5110 2017-09-11  Tom Tromey  <tom@tromey.com>
5111
5112         * findcmd.c (put_bits): Take a gdb::byte_vector.
5113         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5114         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5115         cleanups.
5116         (find_command): Update.
5117
5118 2017-09-11  Tom Tromey  <tom@tromey.com>
5119
5120         * cli/cli-script.c (class scoped_restore_hook_in): New.
5121         (clear_hook_in_cleanup): Remove.
5122         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5123         scoped_restore_hook_in.
5124
5125 2017-09-11  Tom Tromey  <tom@tromey.com>
5126
5127         * cli/cli-script.c (restore_interp): Remove.
5128         (read_command_lines): Use scoped_restore_interp.
5129         * interps.c (scoped_restore_interp::set_temp): Rename from
5130         interp_set_temp.
5131         * interps.h (class scoped_restore_interp): New.
5132         (interp_set_temp): Remove.
5133
5134 2017-09-11  Tom Tromey  <tom@tromey.com>
5135
5136         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5137         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5138         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5139         scoped_restore.
5140         (mi_cmd_break_insert_1): Update.
5141         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5142         scoped_restore.
5143
5144 2017-09-11  Tom Tromey  <tom@tromey.com>
5145
5146         * demangle.c (demangle_command): Update.
5147         * breakpoint.c (disable_command): Update.
5148         (enable_command): Update.
5149         (find_location_by_number): Make "number" const.  Use
5150         get_number_trailer.
5151         * cli/cli-utils.c (extract_arg): Return std::string.
5152         * probe.c (parse_probe_linespec): Update.  Change types.
5153         (collect_probes): Take string arguments.
5154         (parse_probe_linespec): Likewise.
5155         (info_probes_for_ops): Update.
5156         (enable_probes_command): Update.
5157         (disable_probes_command): Update.
5158         * break-catch-sig.c (catch_signal_split_args): Update.
5159         * mi/mi-parse.c (mi_parse): Update.
5160
5161 2017-09-11  Tom Tromey  <tom@tromey.com>
5162
5163         * language.h (language_enum): Make argument const.
5164         * language.c (language_enum): Make argument const.
5165
5166 2017-09-11  Tom Tromey  <tom@tromey.com>
5167
5168         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5169         as function.
5170         (skip_to_space): Rename from skip_to_space_const.
5171         * common/common-utils.c (skip_to_space): New function.
5172         (skip_to_space): Rename from skip_to_space_const.
5173         * cli/cli-utils.h (get_number): Rename from get_number_const.
5174         (extract_arg): Rename from extract_arg_const.
5175         * cli/cli-utils.c (get_number): Rename from get_number_const.
5176         (extract_arg): Rename from extract_arg_const.
5177         (number_or_range_parser::get_number): Use ::get_number.
5178         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5179         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5180         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5181         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5182         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5183         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5184         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5185         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5186
5187 2017-09-11  Tom Tromey  <tom@tromey.com>
5188
5189         * python/python.c (do_start_initialization): Use
5190         py-event-types.def to initialize types.
5191         Define all object type structures.
5192         * python/python-internal.h: Don't declare event initialization
5193         functions.
5194         * python/py-threadevent.c (thread_event_object_type): Don't
5195         define.
5196         * python/py-stopevent.c (stop_event_object_type): Don't define.
5197         * python/py-signalevent.c (signal_event_object_type): Don't
5198         declare or define.
5199         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5200         (clear_objfiles_event_object_type): Don't declare or define.
5201         * python/py-infevents.c (inferior_call_pre_event_object_type)
5202         (inferior_call_post_event_object_type)
5203         (register_changed_event_object_type)
5204         (memory_changed_event_object_type): Don't declare or define.
5205         * python/py-inferior.c (new_thread_event_object_type)
5206         (new_inferior_event_object_type)
5207         (inferior_deleted_event_object_type): Don't declare or define.
5208         * python/py-exitedevent.c (exited_event_object_type): Don't
5209         declare or define.
5210         * python/py-evts.c (gdbpy_initialize_py_events): Use
5211         py-all-events.def.
5212         * python/py-events.h (thread_event_object_type): Don't declare.
5213         (events_object): Use py-all-events.def.
5214         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5215         py-event-types.def.
5216         * python/py-event-types.def: New file.
5217         * python/py-continueevent.c (create_continue_event_object): Don't
5218         declare or define.
5219         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5220         declare or define.
5221         * python/py-all-events.def: New file.
5222
5223 2017-09-11  Tom Tromey  <tom@tromey.com>
5224
5225         * python/py-threadevent.c (create_thread_event_object): Return
5226         gdbpy_ref.
5227         * python/py-stopevent.h (create_stop_event_object)
5228         (create_breakpoint_event_object, create_signal_event_object):
5229         Update.
5230         * python/py-stopevent.c (create_stop_event_object): Return
5231         gdbpy_ref.
5232         (emit_stop_event): Update.
5233         * python/py-signalevent.c (create_signal_event_object): Return
5234         gdbpy_ref.
5235         * python/py-infevents.c (create_inferior_call_event_object):
5236         Update.
5237         * python/py-event.h (create_event_object)
5238         (create_thread_event_object): Update.
5239         * python/py-event.c (create_event_object): Return gdbpy_ref.
5240         * python/py-continueevent.c: Return gdbpy_ref.
5241         * python/py-bpevent.c (create_breakpoint_event_object): Return
5242         gdbpy_ref.
5243
5244 2017-09-11  Tom Tromey  <tom@tromey.com>
5245
5246         PR python/15622:
5247         * NEWS: Add entry.
5248         * python/python.c (do_start_initialization): Initialize new event
5249         types.
5250         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5251         (gdbpy_initialize_inferior_deleted_event)
5252         (gdbpy_initialize_new_thread_event): Declare.
5253         * python/py-threadevent.c (create_thread_event_object): Add option
5254         "thread" parameter.
5255         * python/py-inferior.c (new_thread_event_object_type)
5256         (new_inferior_event_object_type)
5257         (inferior_deleted_event_object_type): Declare.
5258         (python_new_inferior, python_inferior_deleted): New functions.
5259         (add_thread_object): Emit new_thread event.
5260         (gdbpy_initialize_inferior): Attach new functions to corresponding
5261         observers.
5262         (new_thread, new_inferior, inferior_deleted): Define new event
5263         types.
5264         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5265         registries.
5266         * python/py-events.h (events_object) <new_inferior,
5267         inferior_deleted, new_thread>: New fields.
5268         * python/py-event.h (create_thread_event_breakpoint): Add optional
5269         "thread" parameter.
5270
5271 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5272
5273         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5274         check current_ui instead.
5275         (internal_vproblem): Likewise.
5276
5277 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5278
5279         * thread.c (print_thread_info_1): Remove unnecessary calls to
5280         uiout->is_mi_like_p.
5281
5282 2017-09-09  Tom Tromey  <tom@tromey.com>
5283
5284         * namespace.h (add_using_directive): Update.
5285         * namespace.c (add_using_directive): Change type of excludes to
5286         std::vector.
5287         * dwarf2read.c (read_import_statement): Use std::vector.
5288         (read_namespace): Update.
5289         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5290
5291 2017-09-09  Tom Tromey  <tom@tromey.com>
5292
5293         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5294
5295 2017-09-09  Tom Tromey  <tom@tromey.com>
5296
5297         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5298
5299 2017-09-09  Tom Tromey  <tom@tromey.com>
5300
5301         * stack.c (func_command): Use gdb::def_vector.
5302
5303 2017-09-09  Tom Tromey  <tom@tromey.com>
5304
5305         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5306         ui_out_emit_list, ui_out_emit_tuple.
5307         (mi_cmd_var_update): Likewise.
5308
5309 2017-09-09  Tom Tromey  <tom@tromey.com>
5310
5311         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5312         ui_out_redirect_pop.
5313         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5314         ui_out_redirect_pop.
5315         * utils.c (do_ui_out_redirect_pop)
5316         (make_cleanup_ui_out_redirect_pop): Remove.
5317         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5318         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5319         * ui-out.h (ui_out_redirect_pop): New class.
5320
5321 2017-09-09  Tom Tromey  <tom@tromey.com>
5322
5323         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5324         (list_available_thread_groups, mi_cmd_list_thread_groups)
5325         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5326         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5327         Likewise.
5328
5329 2017-09-09  Tom Tromey  <tom@tromey.com>
5330
5331         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5332         ui_out_emit_tuple.
5333
5334 2017-09-09  Tom Tromey  <tom@tromey.com>
5335
5336         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5337         * stack.c (print_frame): Use ui_out_emit_tuple.
5338         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5339         (info_spu_mailbox_command, info_spu_dma_command)
5340         (info_spu_proxydma_command): Likewise.
5341         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5342         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5343         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5344         ui_out_emit_tuple.
5345         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5346
5347 2017-09-09  Tom Tromey  <tom@tromey.com>
5348
5349         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5350         (class ui_out_emit_table): Update comment.
5351         * ui-out.c (do_cleanup_table_end)
5352         (make_cleanup_ui_out_table_begin_end): Remove.
5353         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5354         (info_spu_dma_cmdlist): Likewise.
5355         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5356         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5357         ui_out_emit_table.
5358
5359 2017-09-09  Tom Tromey  <tom@tromey.com>
5360
5361         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5362         ui_out_emit_list, gdb::optional.
5363
5364 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5365
5366         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5367         prototype.
5368         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5369         prototype.
5370         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5371         prototype.
5372         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5373         * ada-exp.y: Remove _initialize_ada_exp prototype.
5374         * ada-lang.c: Remove _initialize_ada_language prototype.
5375         * ada-tasks.c: Remove _initialize_tasks prototype.
5376         * addrmap.c: Remove _initialize_addrmap prototype.
5377         * agent.c: Remove _initialize_agent prototype.
5378         * aix-thread.c: Remove _initialize_aix_thread prototype.
5379         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5380         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5381         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5382         prototype.
5383         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5384         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5385         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5386         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5387         prototype.
5388         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5389         prototype.
5390         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5391         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5392         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5393         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5394         prototype.
5395         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5396         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5397         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5398         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5399         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5400         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5401         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5402         prototype.
5403         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5404         prototype.
5405         * annotate.c: Remove _initialize_annotate prototype.
5406         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5407         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5408         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5409         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5410         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5411         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5412         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5413         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5414         prototype.
5415         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5416         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5417         * auto-load.c: Remove _initialize_auto_load prototype.
5418         * auxv.c: Remove _initialize_auxv prototype.
5419         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5420         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5421         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5422         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5423         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5424         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5425         prototype.
5426         * break-catch-throw.c: Remove _initialize_break_catch_throw
5427         prototype.
5428         * breakpoint.c: Remove _initialize_breakpoint prototype.
5429         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5430         * btrace.c: Remove _initialize_btrace prototype.
5431         * charset.c: Remove _initialize_charset prototype.
5432         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5433         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5434         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5435         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5436         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5437         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5438         * coffread.c: Remove _initialize_coffread prototype.
5439         * compile/compile.c: Remove _initialize_compile prototype.
5440         * complaints.c: Remove _initialize_complaints prototype.
5441         * completer.c: Remove _initialize_completer prototype.
5442         * copying.awk: Remove _initialize_copying prototype.
5443         * copying.c: Regenerate.
5444         * core-regset.c: Remove _initialize_core_regset prototype.
5445         * corefile.c: Remove _initialize_core prototype.
5446         * corelow.c: Remove _initialize_corelow prototype.
5447         * cp-abi.c: Remove _initialize_cp_abi prototype.
5448         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5449         * cp-support.c: Remove _initialize_cp_support prototype.
5450         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5451         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5452         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5453         * ctf.c: Remove _initialize_ctf prototype.
5454         * d-lang.c: Remove _initialize_d_language prototype.
5455         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5456         prototype.
5457         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5458         * dbxread.c: Remove _initialize_dbxread prototype.
5459         * dcache.c: Remove _initialize_dcache prototype.
5460         * demangle.c: Remove _initialize_demangler prototype.
5461         * disasm-selftests.c: Remove _initialize_disasm_selftests
5462         prototype.
5463         * disasm.c: Remove _initialize_disasm prototype.
5464         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5465         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5466         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5467         prototype.
5468         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5469         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5470         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5471         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5472         * elfread.c: Remove _initialize_elfread prototype.
5473         * exec.c: Remove _initialize_exec prototype.
5474         * extension.c: Remove _initialize_extension prototype.
5475         * f-lang.c: Remove _initialize_f_language prototype.
5476         * f-valprint.c: Remove _initialize_f_valprint prototype.
5477         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5478         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5479         * filesystem.c: Remove _initialize_filesystem prototype.
5480         * findcmd.c: Remove _initialize_mem_search prototype.
5481         * fork-child.c: Remove _initialize_fork_child prototype.
5482         * frame-base.c: Remove _initialize_frame_base prototype.
5483         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5484         * frame.c: Remove _initialize_frame prototype.
5485         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5486         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5487         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5488         * gcore.c: Remove _initialize_gcore prototype.
5489         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5490         * gdbarch.c: Regenerate.
5491         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5492         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5493         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5494         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5495         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5496         * go-lang.c: Remove _initialize_go_language prototype.
5497         * go32-nat.c: Remove _initialize_go32_nat prototype.
5498         * guile/guile.c: Remove _initialize_guile prototype.
5499         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5500         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5501         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5502         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5503         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5504         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5505         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5506         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5507         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5508         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5509         prototype.
5510         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5511         prototype.
5512         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5513         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5514         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5515         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5516         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5517         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5518         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5519         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5520         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5521         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5522         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5523         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5524         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5525         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5526         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5527         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5528         prototype.
5529         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5530         prototype.
5531         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5532         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5533         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5534         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5535         * infcall.c: Remove _initialize_infcall prototype.
5536         * infcmd.c: Remove _initialize_infcmd prototype.
5537         * inferior.c: Remove _initialize_inferiors prototype.
5538         * inflow.c: Remove _initialize_inflow prototype.
5539         * infrun.c: Remove _initialize_infrun prototype.
5540         * interps.c: Remove _initialize_interpreter prototype.
5541         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5542         * jit.c: Remove _initialize_jit prototype.
5543         * language.c: Remove _initialize_language prototype.
5544         * linux-fork.c: Remove _initialize_linux_fork prototype.
5545         * linux-nat.c: Remove _initialize_linux_nat prototype.
5546         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5547         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5548         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5549         * m2-lang.c: Remove _initialize_m2_language prototype.
5550         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5551         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5552         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5553         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5554         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5555         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5556         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5557         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5558         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5559         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5560         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5561         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5562         * machoread.c: Remove _initialize_machoread prototype.
5563         * macrocmd.c: Remove _initialize_macrocmd prototype.
5564         * macroscope.c: Remove _initialize_macroscope prototype.
5565         * maint.c: Remove _initialize_maint_cmds prototype.
5566         * mdebugread.c: Remove _initialize_mdebugread prototype.
5567         * memattr.c: Remove _initialize_mem prototype.
5568         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5569         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5570         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5571         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5572         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5573         * microblaze-linux-tdep.c: Remove
5574         _initialize_microblaze_linux_tdep prototype.
5575         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5576         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5577         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5578         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5579         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5580         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5581         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5582         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5583         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5584         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5585         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5586         prototype.
5587         * mipsread.c: Remove _initialize_mipsread prototype.
5588         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5589         prototype.
5590         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5591         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5592         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5593         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5594         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5595         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5596         prototype.
5597         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5598         * nto-procfs.c: Remove _initialize_procfs prototype.
5599         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5600         * objc-lang.c: Remove _initialize_objc_language prototype.
5601         * objfiles.c: Remove _initialize_objfiles prototype.
5602         * observer.c: Remove observer_test_first_notification_function,
5603         observer_test_second_notification_function,
5604         observer_test_third_notification_function, and
5605         _initialize_observer prototypes.
5606         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5607         * osabi.c: Remove _initialize_gdb_osabi prototype.
5608         * osdata.c: Remove _initialize_osdata prototype.
5609         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5610         * parse.c: Remove _initialize_parse prototype.
5611         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5612         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5613         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5614         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5615         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5616         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5617         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5618         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5619         * printcmd.c: Remove _initialize_printcmd prototype.
5620         * probe.c: Remove _initialize_probe prototype.
5621         * proc-api.c: Remove _initialize_proc_api prototype.
5622         * proc-events.c: Remove _initialize_proc_events prototype.
5623         * proc-service.c: Remove _initialize_proc_service prototype.
5624         * procfs.c: Remove _initialize_procfs prototype.
5625         * psymtab.c: Remove _initialize_psymtab prototype.
5626         * python/python.c: Remove _initialize_python prototype.
5627         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5628         * record-btrace.c: Remove _initialize_record_btrace prototype.
5629         * record-full.c: Remove _initialize_record_full prototype.
5630         * record.c: Remove _initialize_record prototype.
5631         * regcache.c: Remove _initialize_regcache prototype.
5632         * reggroups.c: Remove _initialize_reggroup prototype.
5633         * remote-notif.c: Remove _initialize_notif prototype.
5634         * remote-sim.c: Remove _initialize_remote_sim prototype.
5635         * remote.c: Remove _initialize_remote prototype.
5636         * reverse.c: Remove _initialize_reverse prototype.
5637         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5638         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5639         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5640         prototype.
5641         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5642         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5643         * rust-exp.y: Remove _initialize_rust_exp prototype.
5644         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5645         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5646         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5647         * score-tdep.c: Remove _initialize_score_tdep prototype.
5648         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5649         prototype.
5650         * ser-go32.c: Remove _initialize_ser_dos prototype.
5651         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5652         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5653         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5654         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5655         * serial.c: Remove _initialize_serial prototype.
5656         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5657         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5658         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5659         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5660         * skip.c: Remove _initialize_step_skip prototype.
5661         * sol-thread.c: Remove _initialize_sol_thread prototype.
5662         * solib-aix.c: Remove _initialize_solib_aix prototype.
5663         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5664         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5665         * solib-frv.c: Remove _initialize_frv_solib prototype.
5666         * solib-spu.c: Remove _initialize_spu_solib prototype.
5667         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5668         * solib-target.c: Remove _initialize_solib_target prototype.
5669         * solib.c: Remove _initialize_solib prototype.
5670         * source.c: Remove _initialize_source prototype.
5671         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5672         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5673         prototype.
5674         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5675         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5676         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5677         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5678         prototype.
5679         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5680         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5681         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5682         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5683         prototype.
5684         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5685         prototype.
5686         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5687         prototype.
5688         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5689         prototype.
5690         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5691         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5692         prototype.
5693         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5694         prototype.
5695         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5696         prototype.
5697         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5698         prototype.
5699         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5700         prototype.
5701         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5702         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5703         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5704         * stabsread.c: Remove _initialize_stabsread prototype.
5705         * stack.c: Remove _initialize_stack prototype.
5706         * stap-probe.c: Remove _initialize_stap_probe prototype.
5707         * std-regs.c: Remove _initialize_frame_reg prototype.
5708         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5709         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5710         * symfile.c: Remove _initialize_symfile prototype.
5711         * symmisc.c: Remove _initialize_symmisc prototype.
5712         * symtab.c: Remove _initialize_symtab prototype.
5713         * target-dcache.c: Remove _initialize_target_dcache prototype.
5714         * target-descriptions.c: Remove _initialize_target_descriptions
5715         prototype.
5716         * thread.c: Remove _initialize_thread prototype.
5717         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5718         prototype.
5719         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5720         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5721         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5722         prototype.
5723         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5724         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5725         * tracefile.c: Remove _initialize_tracefile prototype.
5726         * tracepoint.c: Remove _initialize_tracepoint prototype.
5727         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5728         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5729         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5730         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5731         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5732         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5733         * tui/tui.c: Remove _initialize_tui prototype.
5734         * typeprint.c: Remove _initialize_typeprint prototype.
5735         * user-regs.c: Remove _initialize_user_regs prototype.
5736         * utils.c: Remove _initialize_utils prototype.
5737         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5738         * valarith.c: Remove _initialize_valarith prototype.
5739         * valops.c: Remove _initialize_valops prototype.
5740         * valprint.c: Remove _initialize_valprint prototype.
5741         * value.c: Remove _initialize_values prototype.
5742         * varobj.c: Remove _initialize_varobj prototype.
5743         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5744         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5745         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5746         * windows-nat.c: Remove _initialize_windows_nat,
5747         _initialize_check_for_gdb_ini, and _initialize_loadable
5748         prototypes.
5749         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5750         * xcoffread.c: Remove _initialize_xcoffread prototype.
5751         * xml-support.c: Remove _initialize_xml_support prototype.
5752         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5753         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5754         prototype.
5755         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5756         prototype.
5757         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5758
5759 2017-09-08  Keith Seitz  <keiths@redhat.com>
5760
5761         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5762         field.
5763
5764 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5765
5766         * f-valprint.c (f_val_print): Remove check for one byte
5767         sized integers. Remove printing of character type.
5768
5769 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5770             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5771             Bernhard Heckel  <bernhard.heckel@intel.com>
5772
5773         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5774         to maintain proper indentation when printing pointers/refs.
5775
5776 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5777
5778         GDB 8.0.1 released.
5779
5780 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5781
5782         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5783
5784 2017-09-05  Tom Tromey  <tom@tromey.com>
5785
5786         * parse.c (funcall_chain): Now a std::vector.
5787         (start_arglist, end_arglist): Simplify.
5788         (free_funcalls): Remove.
5789         (parse_exp_in_context_1): Remove cleanup.
5790
5791 2017-09-05  Tom Tromey  <tom@tromey.com>
5792
5793         * go-exp.y (go_parse): Don't create a cleanup.
5794
5795 2017-09-05  Tom Tromey  <tom@tromey.com>
5796
5797         * d-exp.y (PrimaryExpression): Use std::string.
5798         (d_parse): Don't create a cleanup.
5799
5800 2017-09-05  Tom Tromey  <tom@tromey.com>
5801
5802         * utils.c (do_clear_parser_state): Remove.
5803         (make_cleanup_clear_parser_state): Remove.
5804         * p-exp.y (pascal_parse): Use scoped_restore.
5805         * m2-exp.y (m2_parse): Use scoped_restore.
5806         * f-exp.y (f_parse): Use scoped_restore.
5807         * d-exp.y (d_parse): Use scoped_restore.
5808         * c-exp.y (c_parse): Use scoped_restore.
5809         * ada-exp.y (ada_parse): Use scoped_restore.
5810         * utils.h (make_cleanup_clear_parser_state): Remove.
5811
5812 2017-09-06  Keith Seitz  <keiths@redhat.com>
5813
5814         * dwarf2read.c (dw2_linkage_name_attr): New function.
5815         (dw2_linkage_name): New function.
5816         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5817         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5818         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5819
5820 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5821
5822         * config/djgpp/djconfig.sh: Correct shell portability issue.
5823
5824 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5825
5826         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5827
5828 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5829
5830         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5831         * NEWS: Mention new FreeBSD/mips native configuration.
5832         * configure.host: Add aarch64*-*-freebsd*.
5833         * configure.nat: Likewise.
5834         * aarch64-fbsd-nat.c: New file.
5835
5836 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5837
5838         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5839         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5840         * NEWS: Mention new FreeBSD/aarch64 target.
5841         * configure.tgt: Add aarch64*-*-freebsd*.
5842         * aarch64-fbsd-tdep.c: New file.
5843         * aarch64-fbsd-tdep.h: New file.
5844
5845 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5846
5847         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5848
5849 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5850
5851         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5852         of TLS symbols.
5853
5854 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5855
5856         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5857         call.
5858
5859 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5860
5861         * infrun.c (follow_exec): Call add_thread after
5862         target_find_description.
5863
5864 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         * infrun.c (handle_inferior_event_1): When exec'ing, read
5867         stop_pc after follow_exec.
5868
5869 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5870
5871         * remote.c (process_g_packet): Update error message.
5872
5873 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5874
5875         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5876         targets.
5877
5878 2017-09-05  Pedro Alves  <palves@redhat.com>
5879
5880         * eval.c (eval_call, evaluate_funcall): New functions, factored
5881         out from ...
5882         (evaluate_subexp_standard): ... this.
5883
5884 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5885
5886         * amd64-tdep.c (amd64_target_description): Create target
5887         descriptions.
5888         (_initialize_amd64_tdep): Don't call functions
5889         initialize_tdesc_amd64_*.  Add self tests.
5890         * arch/amd64.c (amd64_create_target_description): Add parameter
5891         is_linux.  Call set_tdesc_osabi if is_linux is true.
5892         * arch/amd64.h (amd64_create_target_description): Update the
5893         declaration.
5894         * arch/i386.c (i386_create_target_description): Add parameter
5895         is_linux.  Call set_tdesc_osabi if is_linux is true.
5896         * arch/i386.h (i386_create_target_description): Update
5897         declaration.
5898         * configure.tgt: Add i386.o to gdb_target_obs.
5899         * features/Makefile (XMLTOC): Remove i386/*.xml.
5900         * features/i386/amd64-avx-avx512.c: Remove.
5901         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5902         * features/i386/amd64-avx-mpx.c: Remove.
5903         * features/i386/amd64-avx.c: Remove.
5904         * features/i386/amd64-mpx.c: Remove.
5905         * features/i386/amd64.c: Remove.
5906         * features/i386/i386-avx-avx512.c: Remove.
5907         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5908         * features/i386/i386-avx-mpx.c: Remove.
5909         * features/i386/i386-avx.c: Remove.
5910         * features/i386/i386-mmx.c: Remove.
5911         * features/i386/i386-mpx.c: Remove.
5912         * features/i386/i386.c: Remove.
5913         * i386-tdep.c: Don't include features/i386/i386*.c., include
5914         target-descriptions.h and arch/i386.h.
5915         (i386_target_description): Create target descriptions.
5916         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5917         functions.  Do self tests.
5918
5919 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5920
5921         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5922         * features/i386/amd64-avx-avx512-linux.c: Removed.
5923         * features/i386/amd64-avx-linux.c: Removed.
5924         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5925         * features/i386/amd64-avx-mpx-linux.c: Removed.
5926         * features/i386/amd64-linux.c: Removed.
5927         * features/i386/amd64-mpx-linux.c: Removed.
5928         * features/i386/x32-avx-avx512-linux.c: Removed.
5929         * features/i386/x32-avx-linux.c: Removed.
5930         * features/i386/x32-linux.c: Removed.
5931
5932 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5933
5934         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5935         features/i386/*.c.
5936         (amd64_linux_read_description): Call
5937         amd64_create_target_description.
5938         * arch/amd64.c: New file.
5939         * arch/amd64.h: New file.
5940         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5941         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5942
5943 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5944
5945         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5946         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5947         (amd64_linux_read_description): Create target descriptions.
5948         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5949         functions.  Add unit tests.
5950         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5951         x32-core.xml.
5952         * features/i386/64bit-avx.c: Generated.
5953         * features/i386/64bit-avx512.c: Generated.
5954         * features/i386/64bit-core.c: Generated.
5955         * features/i386/64bit-linux.c: Generated.
5956         * features/i386/64bit-mpx.c: Generated.
5957         * features/i386/64bit-pkeys.c: Generated.
5958         * features/i386/64bit-segments.c: Generated.
5959         * features/i386/64bit-sse.c: Generated.
5960         * features/i386/x32-core.c: Generated.
5961         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5962         c files for amd64-linux and x32-linux.
5963
5964 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5965
5966         * amd64-linux-tdep.c (amd64_linux_read_description): New
5967         function.
5968         (amd64_linux_core_read_description): Call
5969         amd64_linux_read_description.
5970         (amd64_linux_init_abi): Likewise.
5971         (amd64_x32_linux_init_abi): Likewise.
5972         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5973         * x86-linux-nat.c (x86_linux_read_description): Call
5974         amd64_linux_read_description.
5975
5976 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5977
5978         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5979         comments.
5980
5981 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5982
5983         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5984         * features/i386/i386-avx-avx512-linux.c: Remove.
5985         * features/i386/i386-avx-linux.c: Remove.
5986         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5987         * features/i386/i386-avx-mpx-linux.c: Remove.
5988         * features/i386/i386-linux.c: Remove.
5989         * features/i386/i386-mmx-linux.c: Remove.
5990         * features/i386/i386-mpx-linux.c: Remove.
5991
5992 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5993
5994         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5995         (SFILES): Add arch/i386.c.
5996         (HFILES_NO_SRCDIR): Add arch/i386.h.
5997         * arch/i386.c: New file.
5998         * arch/i386.h: New file.
5999         * arch/tdesc.h (allocate_target_description): Declare.
6000         (set_tdesc_architecture): Declare.
6001         (set_tdesc_osabi): Declare.
6002         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6003         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6004         include arch/i386.h.
6005         (i386_linux_read_description): Remove code and call
6006         i386_create_target_description.
6007         (set_tdesc_architecture): New function.
6008         (set_tdesc_osabi): New function.
6009         * target-descriptions.h (allocate_target_description): Remove.
6010
6011 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6012
6013         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6014         * target-descriptions.c (tdesc_create_feature): Likewise, and
6015         adjust code.
6016         * features/i386/32bit-avx.c: Re-generated.
6017         * features/i386/32bit-avx512.c: Re-generated.
6018         * features/i386/32bit-core.c: Re-generated.
6019         * features/i386/32bit-linux.c: Re-generated.
6020         * features/i386/32bit-mpx.c: Re-generated.
6021         * features/i386/32bit-pkeys.c: Re-generated.
6022         * features/i386/32bit-sse.c: Re-generated.
6023
6024 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6025
6026         * regformats/regdef.h (struct reg): Override operator == and !=.
6027
6028 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6029
6030         * arch/tdesc.h: New file.
6031         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6032         * target-descriptions.c: Update comments.
6033         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6034         declarations.
6035         * features/i386/32bit-avx.c: Re-generated.
6036         * features/i386/32bit-avx512.c: Re-generated.
6037         * features/i386/32bit-core.c: Re-generated.
6038         * features/i386/32bit-linux.c: Re-generated.
6039         * features/i386/32bit-mpx.c: Re-generated.
6040         * features/i386/32bit-pkeys.c: Re-generated.
6041         * features/i386/32bit-sse.c: Re-generated.
6042
6043 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6044
6045         * regformats/regdat.sh: Update generated code.
6046
6047 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6048
6049         * regformats/regdat.sh: Adjust code order.
6050
6051 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6052
6053         * expprint.c (dump_subexp_body_standard): Use constant format
6054         string in fprintf_filtered call.
6055
6056 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6057
6058         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6059         NetBSD/i386.
6060         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6061
6062 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6063
6064         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6065
6066 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6067
6068         * bsd-kvm.o: Define _KMEMUSER.
6069         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6070         * configure: Regenerate.
6071
6072 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6073
6074         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6075         * i386-fbsd-nat.c: Likewise.
6076
6077 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6078
6079         * unittests/array-view-selftests.c: Add include of <array>.
6080
6081 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6082
6083         * spu-tdep.c (flush_ea_cache): Add missing argument to
6084         call_function_by_hand.
6085
6086 2017-09-04  Pedro Alves  <palves@redhat.com>
6087
6088         * NEWS (Safer support for debugging with no debug info): New.
6089
6090 2017-09-04  Pedro Alves  <palves@redhat.com>
6091
6092         * c-exp.y (function_method, function_method_void): Add current
6093         instance flags to TYPE_INSTANCE.
6094         * dwarf2read.c (check_modifier): New.
6095         (compute_delayed_physnames): Assert that only C++ adds delayed
6096         physnames.  Mark fn_fields as const/volatile depending on
6097         physname.
6098         * eval.c (make_params): New type_instance_flags parameter.  Use
6099         it as the new type's instance flags.
6100         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6101         flags element and pass it to make_params.
6102         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6103         instance flags element.
6104         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6105         * gdbtypes.h: Include "enum-flags.h".
6106         (type_instance_flags): New enum-flags type.
6107         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6108         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6109         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6110         (follow_type_instance_flags): New function.
6111         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6112         * parser-defs.h (follow_type_instance_flags): Declare.
6113         * valops.c (value_struct_elt_for_reference): const/volatile must
6114         match too.
6115
6116 2017-09-04  Pedro Alves  <palves@redhat.com>
6117
6118         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6119         function/method scopes; lookup the nested name as a function local
6120         static variable.
6121
6122 2017-09-04  Pedro Alves  <palves@redhat.com>
6123
6124         (%type <voidval>): Add function_method.
6125         * c-exp.y (exp): New production for calls with no arguments.
6126         (function_method, function_method_void_or_typelist): New
6127         productions.
6128         (exp): New production for "method()::static_var".
6129         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6130         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6131         Handle OP_FUNC_STATIC_VAR.
6132         * parse.c (operator_length_standard):
6133         Handle OP_FUNC_STATIC_VAR.
6134
6135 2017-09-04  Pedro Alves  <palves@redhat.com>
6136
6137         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6138         handling.
6139         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6140         Ditto.
6141         * parse.c (operator_length_standard, operator_check_standard):
6142         Ditto.
6143         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6144
6145 2017-09-04  Pedro Alves  <palves@redhat.com>
6146
6147         * ax-gdb.c: Include "typeprint.h".
6148         (gen_expr_for_cast): New function.
6149         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6150         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6151         type is unknown.
6152         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6153         nodebug_data_symbol.
6154         * eval.c: Include "typeprint.h".
6155         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6156         Error out if symbol has unknown type.
6157         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6158         evaluate_subexp_for_cast.
6159         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6160         OP_VAR_MSYM_VALUE.
6161         (evaluate_subexp_for_cast): New function.
6162         * gdbtypes.c (init_nodebug_var_type): New function.
6163         (objfile_type): Use it to initialize types of variables with no
6164         debug info.
6165         * typeprint.c (error_unknown_type): New.
6166         * typeprint.h (error_unknown_type): New declaration.
6167         * compile/compile-c-types.c (convert_type_basic): Handle
6168         TYPE_CODE_ERROR; warn and fallback to int for variables with
6169         unknown type.
6170
6171 2017-09-04  Pedro Alves  <palves@redhat.com>
6172
6173         * eval.c (evaluate_var_value): New function, factored out from ...
6174         (evaluate_subexp_standard): ... here.
6175
6176 2017-09-04  Pedro Alves  <palves@redhat.com>
6177
6178         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6179         Remove useless assignments to 'op'.
6180
6181 2017-09-04  Pedro Alves  <palves@redhat.com>
6182
6183         * eval.c (eval_skip_value): New function.
6184         (evaluate_subexp_standard): Use it.
6185
6186 2017-09-04  Pedro Alves  <palves@redhat.com>
6187
6188         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6189         function name from symbol/minsym and pass it to
6190         error_call_unknown_return_type.
6191
6192 2017-09-04  Pedro Alves  <palves@redhat.com>
6193
6194         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6195         * ax-gdb.c (gen_msym_var_ref): New function.
6196         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6197         * eval.c (evaluate_var_msym_value): New function.
6198         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6199         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6200         to call_function_by_hand.
6201         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6202         Handle OP_VAR_MSYM_VALUE.
6203         (union exp_element) <msymbol>: New field.
6204         * minsyms.h (struct type): Forward declare.
6205         (find_minsym_type_and_address): Declare.
6206         * parse.c (write_exp_elt_msym): New function.
6207         (write_exp_msymbol): Delete, refactored as ...
6208         (find_minsym_type_and_address): ... this new function.
6209         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6210         (operator_length_standard, operator_check_standard): Handle
6211         OP_VAR_MSYM_VALUE.
6212         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6213
6214 2017-09-04  Pedro Alves  <palves@redhat.com>
6215
6216         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6217         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6218         unknown.
6219         * ada-typeprint.c (print_func_type): Handle functions with unknown
6220         return type.
6221         * c-typeprint.c (c_type_print_base): Handle functions and methods
6222         with unknown return type.
6223         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6224         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6225         * compile/compile-c-types.c: Include "objfiles.h".
6226         (convert_func): For functions with unknown return type, warn and
6227         default to int.
6228         * compile/compile-object-run.c (compile_object_run): Adjust call
6229         to call_function_by_hand_dummy.
6230         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6231         call_function_by_hand.
6232         * eval.c (evaluate_subexp_standard): Adjust calls to
6233         call_function_by_hand.  Handle functions and methods with unknown
6234         return type.  Pass expect_type to call_function_by_hand.
6235         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6236         return type.
6237         * gcore.c (call_target_sbrk): Adjust call to
6238         call_function_by_hand.
6239         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6240         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6241         an integer address type instead of nodebug.
6242         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6243         call_function_by_hand.
6244         * infcall.c (error_call_unknown_return_type): New function.
6245         (call_function_by_hand): New "default_return_type" parameter.
6246         Pass it down.
6247         (call_function_by_hand_dummy): New "default_return_type"
6248         parameter.  Use it instead of defaulting to int.  If there's no
6249         default and the return type is unknown, throw an error.  If
6250         there's a default return type, and the called function has no
6251         debug info, then assume the function is prototyped.
6252         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6253         New "default_return_type" parameter.
6254         (error_call_unknown_return_type): New declaration.
6255         * linux-fork.c (call_lseek): Cast return type of lseek.
6256         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6257         call_function_by_hand.
6258         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6259         calls to call_function_by_hand.
6260         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6261         return type.
6262         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6263         (value_nsstring, print_object_command): Adjust calls to
6264         call_function_by_hand.
6265         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6266         functions with unknown return type.
6267         (pascal_type_print_func_varspec_suffix): New function.
6268         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6269         TYPE_CODE_METHOD>: Use it.
6270         * python/py-value.c (valpy_call): Adjust call to
6271         call_function_by_hand.
6272         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6273         call_function_by_hand.
6274         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6275         call_function_by_hand.
6276         * valops.c (value_allocate_space_in_inferior): Adjust call to
6277         call_function_by_hand.
6278         * typeprint.c (type_print_unknown_return_type): New function.
6279         * typeprint.h (type_print_unknown_return_type): New declaration.
6280
6281 2017-09-04  Pedro Alves  <palves@redhat.com>
6282
6283         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6284         types with more than one parameter as prototyped.
6285
6286 2017-09-04  Pedro Alves  <palves@redhat.com>
6287
6288         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6289         (disassemble_command): Use gdb_disassembly_flags instead of bare
6290         int.
6291         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6292         (dump_insns, do_mixed_source_and_assembly_deprecated)
6293         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6294         Use gdb_disassembly_flags instead of bare int.
6295         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6296         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6297         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6298         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6299         (enum gdb_disassembly_flag): ... values of this new enumeration.
6300         (gdb_disassembly_flags): Define.
6301         (gdb_disassembly)
6302         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6303         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6304         gdb_disassembly_flags instead of bare int.
6305         * record-btrace.c (btrace_insn_history)
6306         (record_btrace_insn_history, record_btrace_insn_history_range)
6307         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6308         instead of bare int.
6309         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6310         Use gdb_disassembly_flags instead of bare int.
6311         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6312         Define.
6313         * target-delegates.c: Regenerate.
6314         * target.c (target_insn_history, target_insn_history_from)
6315         (target_insn_history_range): Use gdb_disassembly_flags instead of
6316         bare int.
6317         * target.h: Include "disasm.h".
6318         (struct target_ops) <to_insn_history, to_insn_history_from,
6319         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6320         int.
6321         (target_insn_history, target_insn_history_from)
6322         (target_insn_history_range): Use gdb_disassembly_flags instead of
6323         bare int.
6324
6325 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6326
6327         * cli/cli-script.c (build_command_line): For if/while commands,
6328         check whether args is empty.
6329
6330 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6331
6332         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6333         (enum command_control_type): Likewise.
6334         (struct command_line): Likewise.
6335         (free_command_lines): Likewise.
6336         (struct command_lines_deleter): Likewise.
6337         (command_line_up): Likewise.
6338         (read_command_lines): Likewise.
6339         (read_command_lines_1): Likewise.
6340         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6341         (enum command_control_type): Likewise.
6342         (struct command_line): Likewise.
6343         (free_command_lines): Likewise.
6344         (struct command_lines_deleter): Likewise.
6345         (command_line_up): Likewise.
6346         (read_command_lines): Likewise.
6347         (read_command_lines_1): Likewise.
6348         * breakpoint.h: Include cli/cli-script.h.
6349         * extension-priv.h: Likewise.
6350         * gdbcmd.h: Likewise.
6351
6352 2017-09-04  Pedro Alves  <palves@redhat.com>
6353
6354         * ada-lang.c (is_known_support_routine): Move sal declaration to
6355         where it is initialized.
6356         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6357         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6358         (clear_command, update_static_tracepoint): Remove init_sal
6359         references.  Move declarations closer to initializations.
6360         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6361         initializations.
6362         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6363         references.  Move sal declarations closer to initializations.
6364         * frame.c (find_frame_sal): Return a symtab_and_line via function
6365         return instead of output parameter.  Remove init_sal references.
6366         * frame.h (find_frame_sal): Return a symtab_and_line via function
6367         return instead of output parameter.
6368         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6369         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6370         instead of memset.
6371         (gdbscm_find_pc_line): Remove init_sal reference.
6372         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6373         references.  Move declarations closer to initializations.
6374         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6375         initializations.
6376         (finish_backward): Remove init_sal references.  Move declarations
6377         closer to initializations.
6378         * infrun.c (process_event_stop_test, handle_step_into_function)
6379         (insert_hp_step_resume_breakpoint_at_frame)
6380         (insert_step_resume_breakpoint_at_caller): Likewise.
6381         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6382         (symbol_to_sal): Likewise.
6383         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6384         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6385         to its initialization.
6386         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6387         init_sal references.  Move declarations closer to initializations.
6388         * source.c (get_current_source_symtab_and_line): Remove brace
6389         initialization.
6390         (set_current_source_symtab_and_line): Now takes the sal by const
6391         reference.  Remove brace initialization.
6392         (line_info): Remove init_sal reference.
6393         * source.h (set_current_source_symtab_and_line): Now takes a
6394         symtab_and_line via const reference.
6395         * stack.c (set_current_sal_from_frame): Adjust.
6396         (print_frame_info): Adjust.
6397         (get_last_displayed_sal): Return the sal via function return
6398         instead of via output parameter.  Simplify.
6399         (frame_info): Adjust.
6400         * stack.h (get_last_displayed_sal): Return the sal via function
6401         return instead of via output parameter.
6402         * symtab.c (init_sal): Delete.
6403         (find_pc_sect_line): Remove init_sal references.  Move
6404         declarations closer to initializations.
6405         (find_function_start_sal): Remove init_sal references.  Move
6406         declarations closer to initializations.
6407         * symtab.h (struct symtab_and_line): In-class initialize all
6408         fields.
6409         * tracepoint.c (set_traceframe_context)
6410         (print_one_static_tracepoint_marker): Remove init_sal references.
6411         Move declarations closer to initializations.
6412         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6413         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6414         declarations closer to initializations.
6415         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6416         init_sal references.  Adjust.
6417
6418 2017-09-04  Pedro Alves  <palves@redhat.com>
6419
6420         * ax-gdb.c (agent_command_1): Use range-for.
6421         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6422         * breakpoint.c: Include "common/array-view.h".
6423         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6424         parameter from struct symtabs_and_lines to
6425         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6426         (breakpoint_sals_to_pc): Change sals parameter from struct
6427         symtabs_and_lines to std::vector reference.
6428         (check_fast_tracepoint_sals): Change sals parameter from struct
6429         symtabs_and_lines to std::array_view.  Use range-for.
6430         (decode_static_tracepoint_spec): Return a std::vector instead of
6431         symtabs_and_lines.  Update.
6432         (create_breakpoint): Update.
6433         (break_range_command, until_break_command, clear_command): Update.
6434         (base_breakpoint_decode_location, bkpt_decode_location)
6435         (bkpt_probe_create_sals_from_location)
6436         (bkpt_probe_decode_location, tracepoint_decode_location)
6437         (tracepoint_probe_decode_location)
6438         (strace_marker_create_sals_from_location): Return a std::vector
6439         instead of symtabs_and_lines.
6440         (strace_marker_create_breakpoints_sal): Update.
6441         (strace_marker_decode_location): Return a std::vector instead of
6442         symtabs_and_lines.  Update.
6443         (update_breakpoint_locations): Change struct symtabs_and_lines
6444         parameters to gdb::array_view.  Adjust.
6445         (location_to_sals): Return a std::vector instead of
6446         symtabs_and_lines.  Update.
6447         (breakpoint_re_set_default): Use std::vector instead of struct
6448         symtabs_and_lines.
6449         (decode_location_default): Return a std::vector instead of
6450         symtabs_and_lines.  Update.
6451         * breakpoint.h: Include "common/array-view.h".
6452         (struct breakpoint_ops) <decode_location>: Now returns a
6453         std::vector instead of returning a symtabs_and_lines via output
6454         parameter.
6455         (update_breakpoint_locations): Change sals parameters to use
6456         gdb::array_view.
6457         * cli/cli-cmds.c (edit_command, list_command): Update to use
6458         std::vector and gdb::array_view.
6459         (ambiguous_line_spec): Adjust to use gdb::array_view and
6460         range-for.
6461         (compare_symtabs): Rename to ...
6462         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6463         const reference and adjust.
6464         (filter_sals): Rewrite using std::vector and standard algorithms.
6465         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6466         (jump_command): Update to use std::vector.
6467         * linespec.c (struct linespec_state) <canonical_names>: Update
6468         comment.
6469         (add_sal_to_sals_basic): Delete.
6470         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6471         (decode_line_2, create_sals_line_offset)
6472         (convert_address_location_to_sals, convert_linespec_to_sals)
6473         (convert_explicit_location_to_sals, parse_linespec)
6474         (event_location_to_sals, decode_line_full, decode_line_1)
6475         (decode_line_with_current_source)
6476         (decode_line_with_last_displayed, decode_objc)
6477         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6478         (linespec_result::~linespec_result): Adjust to use std::vector
6479         instead of symtabs_and_lines.
6480         * linespec.h (linespec_sals::sals): Now a std::vector.
6481         (struct linespec_result): Use std::vector, bool, and in-class
6482         initialization.
6483         (decode_line_1, decode_line_with_current_source)
6484         (decode_line_with_last_displayed): Return std::vector.
6485         * macrocmd.c (info_macros_command): Use std::vector.
6486         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6487         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6488         std::vector.
6489         * probe.h (parse_probes): Return a std::vector.
6490         * python/python.c (gdbpy_decode_line): Use std::vector and
6491         gdb::array_view.
6492         * source.c (select_source_symtab, line_info): Use std::vector.
6493         * stack.c (func_command): Use std::vector.
6494         * symtab.h (struct symtabs_and_lines): Delete.
6495         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6496
6497 2017-09-04  Pedro Alves  <palves@redhat.com>
6498
6499         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6500         unittests/array-view-selftests.c.
6501         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6502         * common/array-view.h: New file.
6503         * unittests/array-view-selftests.c: New file.
6504
6505 2017-09-04  Pedro Alves  <palves@redhat.com>
6506
6507         * cli/cli-cmds.c (edit_command): Pass message to
6508         ambiguous_line_spec.
6509         (list_command): Pass message to ambiguous_line_spec.  Say
6510         "first"/"last" instead of "start" and "end" to be consistent with
6511         the manual.
6512         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6513         them to print formatted message.
6514
6515 2017-09-04  Pedro Alves  <palves@redhat.com>
6516
6517         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6518         ftrace_update_insns by reference instead of pointer.
6519
6520 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6521
6522         * i386-go32-tdep.c: Include x86-xstate.h.
6523         (i386_go32_init_abi): Call i386_target_description.
6524         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6525         if xcr0 is X86_XSTATE_X87_MASK.
6526         * i386-tdep.h (tdesc_i386): Remove the declaration.
6527         (tdesc_i386_mmx): Likewise.
6528
6529 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6530
6531         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6532         X86_XSTATE_SSE_MASK instead of 0.
6533
6534 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6535
6536         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6537         i386_target_description.
6538         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6539         i386_target_description.
6540         * i386-tdep.c (i386_gdbarch_init): Likewise.
6541
6542 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6543
6544         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6545         (x86_darwin_init_abi_64): Call amd64_target_description.
6546         * amd64-dicos-tdep.c: Likewise.
6547         * amd64-fbsd-nat.c: Likewise.
6548         * amd64-fbsd-tdep.c: Likewise.
6549         * amd64-nbsd-tdep.c: Likewise.
6550         * amd64-obsd-tdep.c: Likewise.
6551         * amd64-sol2-tdep.c: Likewise.
6552         * amd64-windows-tdep.c: Likewise.
6553         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6554
6555 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6556
6557         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6558         (btrace_function) <insn>: Change type to use std::vector.
6559         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6560         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6561         ftrace_update_insns, ftrace_compute_global_level_offset,
6562         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6563         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6564         change to std::vector.
6565         (ftrace_update_insns): Adjust to change to std::vector, change
6566         type of INSN parameter.
6567         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6568         * record-btrace.c (btrace_call_history_insn_range,
6569         btrace_compute_src_line_range,
6570         record_btrace_frame_prev_register): Adjust to change to
6571         std::vector.
6572         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6573         to change to std::vector.
6574
6575 2017-09-03  Tom Tromey  <tom@tromey.com>
6576
6577         * corefile.c (reopen_exec_file): Use std::string.
6578
6579 2017-09-03  Tom Tromey  <tom@tromey.com>
6580
6581         * compile/compile.c (compile_register_name_mangled): Return
6582         std::string.
6583         * compile/compile-loc2c.c (pushf_register_address): Update.
6584         (pushf_register): Update.
6585         * compile/compile-c-types.c (convert_array): Update.
6586         * compile/compile-c-symbols.c (generate_vla_size): Update.
6587         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6588         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6589         (convert_one_symbol): Update.
6590         (generate_c_for_for_one_variable): Update.
6591         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6592         std::string.
6593         (generate_register_struct): Update.
6594         * compile/compile-internal.h (c_get_range_decl_name): Return a
6595         std::string.
6596         (compile_register_name_mangled): Return std::string.
6597
6598 2017-09-03  Tom Tromey  <tom@tromey.com>
6599
6600         * utils.c (perror_string): Return a std::string.
6601         (throw_perror_with_name, perror_warning_with_name): Update.
6602
6603 2017-09-03  Tom Tromey  <tom@tromey.com>
6604
6605         * demangle.c (demangle_command): Use std::string,
6606         unique_xmalloc_ptr.
6607
6608 2017-09-03  Tom Tromey  <tom@tromey.com>
6609
6610         * cli/cli-setshow.c (do_set_command): Use std::string.
6611
6612 2017-09-03  Tom Tromey  <tom@tromey.com>
6613
6614         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6615
6616 2017-09-03  Tom Tromey  <tom@tromey.com>
6617
6618         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6619
6620 2017-09-03  Tom Tromey  <tom@tromey.com>
6621
6622         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6623         gdb::unique_xmalloc_ptr.
6624
6625 2017-09-03  Tom Tromey  <tom@tromey.com>
6626
6627         * thread.c (print_thread_info_1): Use string_printf.
6628         (thread_apply_command, thread_apply_all_command): Use
6629         std::string.
6630
6631 2017-09-03  Tom Tromey  <tom@tromey.com>
6632
6633         * valprint.c (val_print_string): Update.
6634         * gdbcore.h (memory_error_message): Return std::string.
6635         * corefile.c (memory_error_message): Return std::string.
6636         (memory_error): Update.
6637         * breakpoint.c (insert_bp_location): Update.
6638
6639 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6640
6641         * target/waitstatus.h (target_waitstatus_to_string): Change
6642         return type to std::string.
6643         * target/waitstatus.c (target_waitstatus_to_string): Return
6644         std::string.
6645         * target.h (target_waitstatus_to_string): Remove declaration.
6646         * infrun.c (resume, clear_proceed_status_thread,
6647         print_target_wait_results, do_target_wait, save_waitstatus,
6648         stop_all_threads): Adjust.
6649         * record-btrace.c (record_btrace_wait): Adjust.
6650         * target-debug.h
6651         (target_debug_print_struct_target_waitstatus_p): Adjust.
6652
6653 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6654
6655         PR gdb/22046
6656         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6657         detection.
6658
6659 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6660
6661         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6662         for setting/unsetting environment variables on the remote target.
6663         (New remote packets): Add entries for QEnvironmentHexEncoded,
6664         QEnvironmentUnset and QEnvironmentReset.
6665         * common/environ.c (gdb_environ::operator=): Extend method to
6666         handle m_user_set_env_list and m_user_unset_env_list.
6667         (gdb_environ::clear): Likewise.
6668         (match_var_in_string): Change type of first parameter from 'char
6669         *' to 'const char *'.
6670         (gdb_environ::set): Extend method to handle
6671         m_user_set_env_list and m_user_unset_env_list.
6672         (gdb_environ::unset): Likewise.
6673         (gdb_environ::clear_user_set_env): New method.
6674         (gdb_environ::user_set_envp): Likewise.
6675         (gdb_environ::user_unset_envp): Likewise.
6676         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6677         m_user_unset_env_list on move constructor/assignment.
6678         (unset): Add new default parameter 'update_unset_list = true'.
6679         (clear_user_set_env): New method.
6680         (user_set_envp): Likewise.
6681         (user_unset_envp): Likewise.
6682         (m_user_set_env_list): New std::set.
6683         (m_user_unset_env_list): Likewise.
6684         * common/rsp-low.c (hex2str): New function.
6685         (bin2hex): New overload for bin2hex function.
6686         * common/rsp-low.c (hex2str): New prototype.
6687         (str2hex): New overload prototype.
6688         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6689         QEnvironmentUnset and QEnvironmentReset.
6690         (remote_protocol_features): Add QEnvironmentHexEncoded,
6691         QEnvironmentUnset and QEnvironmentReset packets.
6692         (send_environment_packet): New function.
6693         (extended_remote_environment_support): Likewise.
6694         (extended_remote_create_inferior): Call
6695         extended_remote_environment_support.
6696         (_initialize_remote): Add QEnvironmentHexEncoded,
6697         QEnvironmentUnset and QEnvironmentReset packet configs.
6698         * unittests/environ-selftests.c (gdb_selftest_env_var):
6699         New variable.
6700         (test_vector_initialization): New function.
6701         (test_init_from_host_environ): Likewise.
6702         (test_reinit_from_host_environ): Likewise.
6703         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6704         Likewise.
6705         (test_unset_set_empty_vector): Likewise.
6706         (test_vector_clear): Likewise.
6707         (test_std_move): Likewise.
6708         (test_move_constructor):
6709         (test_self_move): Likewise.
6710         (test_set_unset_reset): Likewise.
6711         (run_tests): Rewrite in terms of the functions above.
6712
6713 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6714
6715         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6716         (adi_available): Use a temp variable of type CORE_ADDR as argument
6717         3 when calling target_auxv_search.
6718         (adi_normalize_address): Use masks and xor operators to calculate
6719         normalized address.
6720         (adi_read_versions, adi_write_versions, adi_print_versions)
6721         (do_examine, do_assign): Use paddress.
6722
6723 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6724
6725         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6726         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6727         out of loop and add supply of FIR.
6728         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6729         add collect of FIR.
6730
6731 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6732
6733         PR gdb/21827
6734         * cli/cli-script.c (define_command): Don't convert command name
6735         to lower case.
6736
6737 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6738
6739         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6740         Update all callers accordingly. Remove all code blocks handling
6741         the case where DISPP is not NULL.
6742
6743 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6744
6745         PR symtab/22003
6746         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6747         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6748         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6749
6750 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6751
6752         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6753         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6754         (read_comp_units_from_section): New parameter abbrev_section, use
6755         read_and_check_comp_unit_head, allocate signatured_type if needed.
6756         (create_all_comp_units): Update read_comp_units_from_section caller.
6757
6758 2017-08-23  Pedro Alves  <palves@redhat.com>
6759
6760         PR remote/21852
6761         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6762         to null_ptid and switch to thread without reading the registers
6763         after adding the inferior.
6764
6765 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6766
6767         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6768         compile-gcc.
6769         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6770         (compile_to_object): Implement compile_gcc.
6771         (_initialize_compile): Install "set compile-gcc".  Initialize
6772         compile_gcc.
6773
6774 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6775
6776         * compile/compile.c (compile_to_object): Conditionally call
6777         set_verbose.  Conditionally call compile or compile_v0.
6778
6779 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6780
6781         * sparc64-tdep.h: (adi_normalize_address): New export.
6782         * sparc-nat.h: (open_adi_tag_fd): New export.
6783         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6784         * sparc64-linux-tdep.c:
6785         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6786         (sparc64_linux_handle_segmentation_fault): New function.
6787         (sparc64_linux_init_abi): Register
6788         sparc64_linux_handle_segmentation_fault
6789         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6790         (sparc64_addr_bits_remove): New function.
6791         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6792         (MAX_PROC_NAME_SIZE): New macro.
6793         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6794         (sparc64adilist): New variable.
6795         (adi_proc_list): New variable.
6796         (find_adi_info): New function.
6797         (add_adi_info): New function.
6798         (get_adi_info_proc): New function.
6799         (get_adi_info): New function.
6800         (info_adi_command): New function.
6801         (read_maps_entry): New function.
6802         (adi_available): New function.
6803         (adi_normalize_address): New function.
6804         (adi_align_address): New function.
6805         (adi_convert_byte_count): New function.
6806         (adi_tag_fd): New function.
6807         (adi_is_addr_mapped): New function.
6808         (adi_read_versions): New function.
6809         (adi_write_versions): New function.
6810         (adi_print_versions): New function.
6811         (do_examine): New function.
6812         (do_assign): New function.
6813         (adi_examine_command): New function.
6814         (adi_assign_command): New function.
6815         (_initialize_sparc64_adi_tdep): New function.
6816
6817 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6818
6819         * breakpoint.c (breakpoints_info): Rename to ...
6820         (info_breakpoints_command): ... this.
6821         (watchpoints_info): Rename to ...
6822         (info_watchpoints_command): ... this.
6823         (tracepoints_info): Rename to ...
6824         (info_tracepoints_command): ... this.
6825         (_initialize_breakpoint): Adjust.
6826         * dcache.c (dcache_info): Rename to ...
6827         (info_display_command): ... this.
6828         (_initialize_dcache): Adjust.
6829         * frame.h (args_info): Rename to ...
6830         (info_args_command): ... this.
6831         (locals_info): Rename to ...
6832         (info_locals_command): ... this.
6833         * infcmd.c (nofp_registers_info): Rename to ...
6834         (info_registers_command): ... this.
6835         (float_info): Rename to ...
6836         (info_float_command): ... this.
6837         (program_info): Rename to ...
6838         (info_program_command): ... this.
6839         (all_registers_info): Rename to ...
6840         (info_all_registers_command): ... this.
6841         (vector_info): Rename to ...
6842         (info_vector_command): ... this.
6843         (float_info): Rename to ...
6844         (info_float_command): ... this.
6845         (_initialize_infcmd): Adjust.
6846         * inferior.h (term_info): Rename to ...
6847         (info_terminal_command): ... this.
6848         * inflow.c (term_info): Rename to ...
6849         (info_terminal_command): ... this.
6850         (_initialize_inflow): Adjust.
6851         * infrun.c (signals_info): Rename to ...
6852         (info_signals_command): ... this.
6853         (_initialize_infrun): Adjust.
6854         * objc-lang.c (classes_info): Rename to ...
6855         (info_classes_command): ... this.
6856         (selectors_info): Rename to ...
6857         (info_selectors_command): ... this.
6858         (_initialize_objc_language): Adjust.
6859         * printcmd.c (sym_info): Rename to ...
6860         (info_symbol_command): ... this.
6861         (address_info): Rename to ...
6862         (info_address_command): ... this.
6863         (display_info): Rename to ...
6864         (info_display_command): ... this.
6865         (_initialize_printcmd): Adjust.
6866         * reverse.c (bookmarks_info): Rename to ...
6867         (info_breakpoints_command): ... this.
6868         (_initialize_reverse): Adjust.
6869         * ser-go32.c (dos_info): Rename to ...
6870         (info_serial_command): ... this.
6871         (_initialize_ser_dos): Adjust.
6872         * skip.c (skip_info): Rename to ...
6873         (info_skip_command): ... this.
6874         (_initialize_step_skip): Adjust.
6875         * source.c (line_info): Rename to ...
6876         (info_line_command): ... this.
6877         (source_info): Rename to ...
6878         (info_source_command)
6879         * stack.c (frame_info): Rename to ...
6880         (info_frame_command): ... this.
6881         (locals_info): Rename to ...
6882         (info_locals_command): ... this.
6883         (args_info): Rename to ...
6884         (info_args_command): ... this.
6885         (_initialize_stack): Adjust.
6886         * symtab.c (sources_info): Rename to ...
6887         (info_sources_command): ... this.
6888         (variables_info): Rename to ...
6889         (info_variables_command): ... this.
6890         (functions_info): Rename to ...
6891         (info_functions_command): ... this.
6892         (types_info): Rename to ...
6893         (info_types_command): ... this.
6894         (_initialize_symtab): Adjust.
6895         * target.c (target_info): Rename to ...
6896         (info_target_command): ... this.
6897         (initialize_targets): Adjust.
6898         * tracepoint.c (tvariables_info): Rename to ...
6899         (info_tvariables_command): ... this.
6900         (scope_info): Rename to ...
6901         (info_scope_command): ... this.
6902         (trace_dump_actions): Adjust.
6903         (_initialize_tracepoint): Adjust.
6904
6905 2017-08-22  Tom Tromey  <tom@tromey.com>
6906
6907         * breakpoint.h (install_breakpoint): Update.
6908         * breakpoint.c (add_solib_catchpoint): Update.
6909         (install_breakpoint): Change argument to a std::unique_ptr.
6910         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6911         (create_breakpoint_sal, create_breakpoint): Update.
6912         (watch_command_1, catch_exec_command_1)
6913         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6914         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6915         Return the breakpoint.
6916         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6917         (new_single_step_breakpoint): Update.
6918         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6919         std::unique_ptr.
6920         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6921         std::unique_ptr.
6922         * break-catch-sig.c (create_signal_catchpoint): Use
6923         std::unique_ptr.
6924         * ada-lang.c (create_ada_exception_catchpoint): Use
6925         std::unique_ptr.
6926
6927 2017-08-22  Tom Tromey  <tom@tromey.com>
6928
6929         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6930
6931 2017-08-22  Tom Tromey  <tom@tromey.com>
6932
6933         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6934         (lookup_partial_symbol): Update.
6935
6936 2017-08-22  Tom Tromey  <tom@tromey.com>
6937
6938         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6939         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6940         (find_and_open_source, symtab_to_fullname): Update.
6941         * psymtab.c (psymtab_to_fullname): Update.
6942
6943 2017-08-22  Tom Tromey  <tom@tromey.com>
6944
6945         * exec.c (exec_file_attach): Update.
6946         * linux-thread-db.c (try_thread_db_load): Update.
6947         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6948         * utils.c (gdb_realpath): Change return type.
6949         (gdb_realpath_keepfile): Update.
6950         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6951         (_initialize_utils): Register the new self test.
6952         * source.c (openp): Update.
6953         (find_and_open_source): Update.
6954         * nto-tdep.c (nto_find_and_open_solib): Update.
6955         * main.c (set_gdb_data_directory): Update.
6956         (captured_main_1): Update.
6957         * dwarf2read.c (dwarf2_get_dwz_file): Update
6958         (dw2_map_symbol_filenames): Update.
6959         * auto-load.c (auto_load_safe_path_vec_update): Update.
6960         (filename_is_in_auto_load_safe_path_vec): Change type of
6961         "filename_realp".
6962         (auto_load_objfile_script): Update.
6963         (file_is_auto_load_safe): Update.  Use std::string.
6964         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6965
6966 2017-08-22  Tom Tromey  <tom@tromey.com>
6967
6968         * utils.c (gdb_realpath_keepfile): Return a
6969         gdb::unique_xmalloc_ptr.
6970         * exec.c (exec_file_attach): Update.
6971         * utils.h (gdb_realpath_keepfile): Return a
6972         gdb::unique_xmalloc_ptr.
6973
6974 2017-08-22  Tom Tromey  <tom@tromey.com>
6975
6976         * compile/compile.c (compile_file_command): Use
6977         gdb::unique_xmalloc_ptr, std::string.
6978         * utils.c (gdb_abspath): Change return type.
6979         * source.c (openp): Update.
6980         * objfiles.c (allocate_objfile): Update.
6981         * main.c (set_gdb_data_directory): Update.
6982         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6983
6984 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6985
6986         * cli-cmds.c (list_commands): List actual code around more than
6987         one location.
6988
6989 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6990
6991         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6992
6993 2017-08-21  Pedro Alves  <palves@redhat.com>
6994
6995         PR gdb/19487
6996         * c-exp.y (variable production): Handle function aliases.
6997         * minsyms.c (msymbol_is_text): New function.
6998         * minsyms.h (msymbol_is_text): Declare.
6999         * symtab.c (find_function_alias_target): New function.
7000         * symtab.h (find_function_alias_target): Declare.
7001
7002 2017-08-21  Pedro Alves  <palves@redhat.com>
7003
7004         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7005         typedefs.
7006         * typeprint.c (whatis_exp): If handling "whatis", and expression
7007         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7008         typedefs here.
7009         * valops.c (value_cast): Save "to" type before resolving
7010         stubs/typedefs.  Use that type as resulting value's type.
7011
7012 2017-08-18  Tom Tromey  <tom@tromey.com>
7013             Pedro Alves  <palves@redhat.com>
7014
7015         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7016         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7017         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7018         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7019         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7020         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7021         (linux_get_siginfo_data): Add "thread" argument.  Use
7022         scoped_restore.
7023         * linux-nat.c (linux_child_follow_fork)
7024         (check_stopped_by_watchpoint): Use scoped_restore.
7025         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7026         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7027         (restore_inferior_ptid, save_inferior_ptid): Remove.
7028         * btrace.c (btrace_fetch): Use scoped_restore.
7029         * bsd-uthread.c (bsd_uthread_fetch_registers)
7030         (bsd_uthread_store_registers): Use scoped_restore.
7031         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7032         scoped_restore.
7033         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7034         (aix_thread_xfer_partial): Use scoped_restore.
7035         * inferior.h (save_inferior_ptid): Remove.
7036
7037 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7038
7039         PR tdep/21818
7040         * arm-tdep.c (gdb_print_insn_arm): Mark
7041         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7042
7043 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7044
7045         * NEWS: Mention GDBserver's new option "--selftest".
7046         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7047         * selftest.c: Move it to common/selftest.c.
7048         * selftest.h: Move it to common/selftest.h.
7049         * selftest-arch.c (reset): New function.
7050         (tests_with_arch): Call reset.
7051
7052 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7053
7054         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7055         instead of exception_fprintf and printf_filtered.
7056
7057 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7058
7059         * selftest.c (register_self_test): Rename it to
7060         selftests::register_test.
7061         (run_self_tests): selftest::run_tests.
7062         * selftest.h: Update declarations.
7063         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7064         selftests::register_test_foreach_arch.
7065         * selftest-arch.h: Update declaration.
7066         * aarch64-tdep.c: Update.
7067         * arm-tdep.c: Likewise.
7068         * disasm-selftests.c: Likewise.
7069         * dwarf2loc.c: Likewise.
7070         * dwarf2-frame.c: Likewise.
7071         * findvar.c: Likewise.
7072         * gdbarch-selftests.c: Likewise.
7073         * maint.c (maintenance_selftest): Likewise.
7074         * regcache.c: Likewise.
7075         * rust-exp.y: Likewise.
7076         * selftest-arch.c: Likewise.
7077         * unittests/environ-selftests.c: Likewise.
7078         * unittests/function-view-selftests.c: Likewise.
7079         * unittests/offset-type-selftests.c: Likewise.
7080         * unittests/optional-selftests.c: Likewise.
7081         * unittests/scoped_restore-selftests.c: Likewise.
7082         * utils-selftests.c: Likewise.
7083
7084 2017-08-17  Pedro Alves  <palves@redhat.com>
7085
7086         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7087         local.
7088
7089 2017-08-17  Pedro Alves  <palves@redhat.com>
7090
7091         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7092         field.
7093         (reset_die_in_process): Delete, replaced by ...
7094         (process_die_scope): ... this new class.  Make it responsible for
7095         freeing cu->line_header too.
7096         (process_die): Use process_die_scope.
7097         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7098         cu->line_header_die_owner.  Don't release the line header if it's
7099         owned by the CU.
7100         (setup_type_unit_groups): Make the CU/DIE own the line header.
7101         Don't release the line header here.
7102
7103 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7104
7105         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7106
7107 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7108
7109         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7110         Single-Key mode
7111
7112 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7113
7114         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7115         mode command list.
7116
7117 2017-08-15  Stafford Horne  <shorne@gmail.com>
7118
7119         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7120
7121 2017-08-15  Stafford Horne  <shorne@gmail.com>
7122
7123         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7124
7125 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7126
7127         PR gdb/21954
7128         * infcmd.c (unset_environment_command): Use the 'clear' method on
7129         the environment instead of resetting it.
7130
7131 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7132
7133         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7134         platforms.
7135
7136 2017-08-14  Tom Tromey  <tom@tromey.com>
7137
7138         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7139         (print_binary_chars): Likewise.
7140         (BITS_IN_BYTES): Remove.
7141
7142 2017-08-14  Tom Tromey  <tom@tromey.com>
7143
7144         PR gdb/21675
7145         * valprint.c (LOW_ZERO): Change value to 034.
7146         (print_octal_chars): Add static_asserts for octal constants.
7147         * printcmd.c (print_scalar_formatted): Add 'd' case.
7148
7149 2017-08-11  Tom Tromey  <tom@tromey.com>
7150
7151         * symfile.c (add_symbol_file_command): Use std::vector.
7152
7153 2017-08-14  Tom Tromey  <tom@tromey.com>
7154
7155         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7156         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7157         std::move.
7158         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7159
7160 2017-08-11  Pedro Alves  <palves@redhat.com>
7161
7162         * infrun.c (process_event_stop_test): Adjust
7163         function_name_is_marked_for_skip call.
7164         * skip.c: Include <list>.
7165         (skiplist_entry): Make it a class with private fields, and
7166         getters/setters.
7167         (skiplist_entry_chain): Delete.
7168         (skiplist_entries): New.
7169         (skiplist_entry_count): Delete.
7170         (highest_skiplist_entry_num): New.
7171         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7172         (add_skiplist_entry): Delete.
7173         (skiplist_entry::skiplist_entry): New.
7174         (skiplist_entry::add_entry): New.
7175         (skip_file_command, skip_function): Adjust.
7176         (compile_skip_regexp): Delete.
7177         (skip_command): Don't compile regexp here.  Adjust to use
7178         skiplist_entry::add_entry.
7179         (skip_info): Adjust to use range-for and getters.
7180         (skip_enable_command, skip_disable_command): Adjust to use
7181         range-for and setters.
7182         (skip_delete_command): Adjust to use std::list.
7183         (add_skiplist_entry): Delete.
7184         (skip_file_p): Delete, refactored as ...
7185         (skiplist_entry::do_skip_file_p): ... this new method.
7186         (skip_gfile_p): Delete, refactored as ...
7187         (skiplist_entry::do_gskip_file_p): ... this new method.
7188         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7189         (skiplist_entry::skip_function_p): ... this new method.
7190         (function_name_is_marked_for_skip): Now returns bool, and takes
7191         the function sal by const reference.  Adjust to use range-for and
7192         skiplist_entry methods.
7193         (_initialize_step_skip): Remove references to
7194         skiplist_entry_chain, skiplist_entry_count.
7195         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7196         takes the function sal by const reference.
7197
7198 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7199
7200         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7201         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7202         (dwarf2_frame_cache):
7203         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7204         RETURN_MASK_ALL and set *this_case to NULL.
7205         * frame-unwind.h: Update comments.
7206
7207 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7208
7209         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7210         (dwarf2_frame_state_copy_regs): Remove.
7211         (dwarf2_frame_state_free_regs): Remove.
7212         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7213         (dwarf2_restore_rule): Call method .alloc_regs instead of
7214         dwarf2_frame_state_alloc_regs.
7215         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7216         constructor.  Call std::move.
7217         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7218         (dwarf2_frame_cache): Likewise.
7219
7220         [GDB_SELF_TEST]: Include selftest.h and
7221         selftest-arch.h.
7222         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7223         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7224         execute_cfa_program_test.
7225
7226         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7227         copy ctor, assignment operator, move assignment.
7228         <alloc_regs>: New method.
7229         <swap>: New method.
7230         (struct dwarf2_frame_state): Delete dtor.
7231         (dwarf2_frame_state_alloc_regs): Remove declaration.
7232         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7233         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7234
7235 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7236
7237         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7238         (dwarf2_frame_state::dwarf2_frame_state): New.
7239         (dwarf2_frame_state::~dwarf2_frame_state): New.
7240         (dwarf2_fetch_cfa_info): Update.
7241         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7242         rather than a pointer.  Update code.
7243         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7244         dtor.
7245         <data_align, code_align, retaddr_column>: Change them to const.
7246         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7247         to bool.
7248
7249 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7250
7251         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7252         <loc.exp>: New field.
7253         * dwarf2-frame.c (execute_cfa_program): Update.
7254         (dwarf2_frame_prev_register): Update.
7255
7256 2017-08-10  Pedro Alves  <palves@redhat.com>
7257
7258         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7259
7260 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7261
7262         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7263         (fbsd_pending_children): Use std::list.
7264         (fbsd_remember_child): Likewise.
7265         (fbsd_is_child_pending): Likewise.
7266         (fbsd_pending_vfork_done): Use std::forward_list.
7267         (fbsd_add_vfork_done): Likewise.
7268         (fbsd_is_vfork_done_pending): Likewise.
7269         (fbsd_next_vfork_done): Likewise.
7270
7271 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7272
7273         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7274         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7275         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7276         for `mapfilename'.
7277         (fbsd_xfer_partial): Use gdb::byte_vector.
7278         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7279
7280 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7281
7282         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7283         "filestuff.h".
7284         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7285
7286 2017-08-09  Tom Tromey  <tom@tromey.com>
7287
7288         * skip.c (skiplist_entry): New constructor.
7289         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7290         (skiplist_entry::file_is_glob): Now bool.
7291         (skiplist_entry::file, skiplist_entry::function): Now
7292         std::string.
7293         (make_skip_entry): Return a unique_ptr.  Use new.
7294         (free_skiplist_entry, free_skiplist_entry_cleanup)
7295         (make_free_skiplist_entry_cleanup): Remove.
7296         (skip_command, skip_disable_command, add_skiplist_entry)
7297         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7298         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7299         (function_name_is_marked_for_skip): Update.
7300         (skip_delete_command): Update.  Use delete.
7301
7302 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7303
7304         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7305         (aarch64_linux_core_read_description): New function.
7306         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7307
7308 2017-08-09  Pedro Alves  <palves@redhat.com>
7309
7310         * cp-name-parser.y (cp_comp_to_string): Return a
7311         gdb::unique_xmalloc_ptr<char>.
7312         * cp-support.c (replace_typedefs_qualified_name)
7313         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7314         (cp_canonicalize_string_full): Use op= instead of explicit
7315         convertion.
7316         (cp_class_name_from_physname, method_name_from_physname)
7317         (cp_func_name, cp_remove_params): Adjust to use
7318         gdb::unique_xmalloc_ptr<char>.
7319         * cp-support.h (cp_comp_to_string): Return a
7320         gdb::unique_xmalloc_ptr<char>.
7321         * python/py-type.c (typy_lookup_type): Adjust to use
7322         gdb::unique_xmalloc_ptr<char>.
7323
7324 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7325
7326         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7327
7328 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7329             Yao Qi  <yao.qi@linaro.org>
7330
7331         * cp-support.c (cp_canonicalize_string_full): Use
7332         gdb::unique_xmalloc_ptr<char>.
7333         (cp_canonicalize_string): Likewise.
7334
7335 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7336
7337         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7338         * regformats/i386/amd64-avx-avx512.dat: Remove.
7339         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7340         * regformats/i386/amd64-avx-mpx.dat:Remove.
7341         * regformats/i386/amd64-avx.dat: Remove.
7342         * regformats/i386/amd64-mpx.dat: Remove.
7343         * regformats/i386/i386-avx-avx512.dat: Remove.
7344         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7345         * regformats/i386/i386-avx-mpx.dat: Remove.
7346         * regformats/i386/i386-mmx.dat: Remove.
7347         * regformats/i386/i386-mpx.dat: Remove.
7348
7349 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7350
7351         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7352         * amd64-tdep.c: Don't include features/i386/x32*.c.
7353         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7354         functions.
7355         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7356         and i386/x32-avx-avx512.
7357         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7358         and i386/x32.xml.
7359         * features/i386/x32-avx-avx512.c: Removed.
7360         * features/i386/x32-avx-avx512.xml: Removed.
7361         * features/i386/x32-avx.c: Removed.
7362         * features/i386/x32-avx.xml: Removed.
7363         * features/i386/x32.c: Removed.
7364         * features/i386/x32.xml: Removed.
7365         * regformats/i386/x32-avx-avx512.dat: Removed.
7366         * regformats/i386/x32-avx.dat: Removed.
7367         * regformats/i386/x32.dat: Removed.
7368
7369 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7370
7371         PR breakpoints/21886
7372         * mem-break.c (default_memory_insert_breakpoint): Use
7373         `->placed_address' rather than `->reqstd_address' for the
7374         breakpoint location.
7375
7376 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7377
7378         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7379         assertions.
7380
7381 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7382
7383         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7384         a union of `tdep_info', `tdesc_data' and `id'.
7385         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7386         rather than `info.tdep_info'.
7387         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7388         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7389         * i386-tdep.c (i386_gdbarch_init): Likewise.
7390         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7391         * mips-tdep.c (mips_gdbarch_init): Likewise.
7392         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7393         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7394         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7395         `info.tdep_info'.
7396         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7397         `info.tdep_info'.
7398         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7399         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7400         `info.tdep_info'.
7401         * spu-tdep.c (spu_gdbarch_init): Likewise.
7402         * gdbarch.h: Regenerate.
7403
7404 2017-08-07  Leszek Swirski  <leszeks@google.com>
7405
7406         PR symtab/20899
7407         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7408
7409 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7410
7411         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7412         (gdbsim_open): Rename gdb_argv args object to argv.
7413
7414 2017-08-05  Tom Tromey  <tom@tromey.com>
7415
7416         * compile/compile-object-load.c (compile_object_load): Use
7417         gdb::unique_xmalloc_ptr.
7418         * cli/cli-dump.c (scan_filename): Rename from
7419         scan_filename_with_cleanup.  Change return type.
7420         (scan_expression): Rename from scan_expression_with_cleanup.
7421         Change return type.
7422         (dump_memory_to_file, dump_value_to_file, restore_command):
7423         Use gdb::unique_xmalloc_ptr.  Update.
7424         * cli/cli-cmds.c (find_and_open_script): Use
7425         gdb::unique_xmalloc_ptr.
7426         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7427         * symmisc.c (maintenance_print_symbols)
7428         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7429         * symfile.c (symfile_bfd_open, generic_load)
7430         (add_symbol_file_command, remove_symbol_file_command): Use
7431         gdb::unique_xmalloc_ptr.
7432         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7433         * psymtab.c (maintenance_print_psymbols): Use
7434         gdb::unique_xmalloc_ptr.
7435         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7436         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7437         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7438         (reload_shared_libraries_1): Likewise.
7439
7440 2017-08-05  Tom Tromey  <tom@tromey.com>
7441
7442         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7443         (rust_op_vector, rust_set_vector): New typedefs.
7444         (current_parser): New global.
7445         (work_obstack): Change to pointer type.  Update all users.
7446         (rust_ast, pstate): Remove globals.
7447         (struct rust_parser): New.
7448         (%union) <params, field_inits>: Change type.
7449         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7450         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7451         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7452         (convert_params_to_types, convert_params_to_expression): Change
7453         type of "params".
7454         (ast_string): Change type of "fields".
7455         (rust_parse): Make a rust_parser.  Remove cleanups.
7456         (rust_lex_tests): Make and install an auto_obstack.
7457
7458 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7459
7460         * configure.srv (ipa_x32_linux_regobj): New.
7461         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7462         instead of X86_TDESC_AVX512.
7463         (initialize_low_tracepoint): Call
7464         init_registers_x32_avx_avx512_linux.
7465
7466 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7467
7468         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7469
7470 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7471
7472         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7473
7474 2017-08-03  Tom Tromey  <tom@tromey.com>
7475
7476         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7477         Remove.
7478         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7479
7480 2017-08-03  Tom Tromey  <tom@tromey.com>
7481
7482         * python/py-param.c (compute_enum_values): Use gdb_argv.
7483
7484 2017-08-03  Tom Tromey  <tom@tromey.com>
7485
7486         * utils.h (struct gdb_argv_deleter): New.
7487         (gdb_argv): New class.
7488         * utils.c (gdb_argv::reset): New method.
7489         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7490         * tracefile.c (tsave_command): Use gdb_argv.
7491         * top.c (new_ui_command): Use gdb_argv.
7492         * symmisc.c (maintenance_print_symbols)
7493         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7494         * symfile.c (symbol_file_command, generic_load)
7495         (remove_symbol_file_command): Use gdb_argv.
7496         * stack.c (backtrace_command): Use gdb_argv.
7497         * source.c (add_path, show_substitute_path_command)
7498         (unset_substitute_path_command, set_substitute_path_command):
7499         Use gdb_argv.
7500         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7501         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7502         * remote.c (extended_remote_run, remote_put_command)
7503         (remote_get_command, remote_delete_command): Use gdb_argv.
7504         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7505         (gdbsim_open): Use gdb_argv.
7506         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7507         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7508         * procfs.c (procfs_info_proc): Use gdb_argv.
7509         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7510         * infrun.c (handle_command): Use gdb_argv.
7511         * inferior.c (add_inferior_command, clone_inferior_command):
7512         Use gdb_argv.
7513         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7514         * exec.c (exec_file_command): Use gdb_argv.
7515         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7516         * compile/compile.c (build_argc_argv): Use gdb_argv.
7517
7518 2017-08-03  Tom Tromey  <tom@tromey.com>
7519
7520         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7521
7522 2017-08-03  Tom Tromey  <tom@tromey.com>
7523
7524         * python/python.c (compute_python_string): Return std::string.
7525         (gdbpy_eval_from_control_command): Update.
7526         (do_start_initialization): Use std::string.
7527         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7528         xstrprintf.
7529         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7530         xstrprintf.
7531
7532 2017-08-03  Tom Tromey  <tom@tromey.com>
7533
7534         * top.h (do_restore_instream_cleanup): Remove.
7535         * top.c (do_restore_instream_cleanup): Remove.
7536         (read_command_file): Use scoped_restore.
7537         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7538
7539 2017-08-03  Tom Tromey  <tom@tromey.com>
7540
7541         * cli/cli-script.c (execute_user_command)
7542         (execute_control_command): Use scoped_restore.
7543
7544 2017-08-03  Tom Tromey  <tom@tromey.com>
7545
7546         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7547         (execute_user_command): Remove user_call_depth; use
7548         user_args_stack's size instead.
7549
7550 2017-08-03  Tom Tromey  <tom@tromey.com>
7551
7552         * top.h (in_user_command): Remove.
7553         * top.c (in_user_command): Remove.
7554         * cli/cli-script.c (do_restore_user_call_depth)
7555         (execute_user_command): Update.
7556
7557 2017-08-03  Tom Tromey  <tom@tromey.com>
7558
7559         * valops.c (search_struct_method): Use gdb::byte_vector.
7560         * valarith.c (value_concat): Use std::vector.
7561         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7562         (simple_search_memory): Likewise.
7563         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7564         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7565         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7566         * elfread.c (elf_rel_plt_read): Use std::string.
7567         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7568         * cli/cli-dump.c (restore_section_callback): Use
7569         gdb::byte_vector.
7570
7571 2017-08-03  Tom Tromey  <tom@tromey.com>
7572
7573         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7574
7575 2017-08-03  Tom Tromey  <tom@tromey.com>
7576
7577         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7578         (tui_register_format): Use scoped_restore.
7579
7580 2017-08-03  Tom Tromey  <tom@tromey.com>
7581
7582         * reverse.c (exec_direction_default): Remove.
7583         (exec_reverse_once): Use scoped_restore.
7584         * remote.c (restore_remote_timeout): Remove.
7585         (remote_flash_erase, remote_flash_write, remote_flash_done)
7586         (readchar, remote_serial_write): Use scoped_restore.
7587         * cli/cli-script.c (struct source_cleanup_lines_args)
7588         (source_cleanup_lines): Remove.
7589         (script_from_file): Use scoped_restore.
7590         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7591         (source_command): Use scoped_restore.
7592
7593 2017-08-03  Tom Tromey  <tom@tromey.com>
7594
7595         * utils.h (make_cleanup_free_so): Remove.
7596         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7597         * solist.h (struct so_deleter): New.
7598         (so_list_up): New typedef.
7599         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7600
7601 2017-08-03  Tom Tromey  <tom@tromey.com>
7602
7603         * utils.h (make_cleanup_restore_current_language): Remove.
7604         * utils.c (do_restore_current_language)
7605         (make_cleanup_restore_current_language): Remove.
7606         * parse.c (parse_exp_in_context_1)
7607         (parse_expression_with_language): Use
7608         scoped_restore_current_language.
7609         * mi/mi-main.c (mi_cmd_execute): Use
7610         scoped_restore_current_language.
7611         * language.h (scoped_restore_current_language): New class.
7612
7613 2017-08-03  Tom Tromey  <tom@tromey.com>
7614
7615         * compile/compile.c (cleanup_unlink_file): Remove.
7616         (compile_to_object): Use gdb::unlinker.
7617         (eval_compile_command): Likewise.
7618
7619 2017-08-03  Tom Tromey  <tom@tromey.com>
7620
7621         * utils.h (make_cleanup_fclose): Remove.
7622         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7623
7624 2017-08-03  Tom Tromey  <tom@tromey.com>
7625
7626         * top.c (open_terminal_stream): Return gdb_file_up.
7627         (new_ui_command): Update.
7628
7629 2017-08-03  Tom Tromey  <tom@tromey.com>
7630
7631         * source.c (print_source_lines_base, forward_search_command)
7632         (reverse_search_command): Use gdb_file_up.
7633
7634 2017-08-03  Tom Tromey  <tom@tromey.com>
7635
7636         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7637
7638 2017-08-03  Tom Tromey  <tom@tromey.com>
7639
7640         * cli/cli-cmds.c (find_and_open_script): Change return type.
7641         Remove "streamp" and "full_path" parameters.
7642         (source_script_with_search): Update.
7643         * auto-load.c (source_script_file): Update.
7644         * cli/cli-cmds.h (find_and_open_script): Change type.
7645         (open_script): New struct.
7646
7647 2017-08-03  Tom Tromey  <tom@tromey.com>
7648
7649         * xml-support.c (xml_fetch_content_from_file): Update.
7650         * ui-file.c (stdio_file::open): Update.
7651         * tracefile-tfile.c (tfile_start): Update.
7652         * remote.c (remote_file_put, remote_file_get): Update.
7653         * nat/linux-procfs.c (linux_proc_get_int)
7654         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7655         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7656         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7657         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7658         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7659         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7660         * linux-nat.c (linux_proc_pending_signals): Update.
7661         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7662         (file_closer): Remove.
7663         * compile/compile.c (compile_to_object): Update.
7664         * common/filestuff.h (struct gdb_file_deleter): New.
7665         (gdb_file_up): New typedef.
7666         (gdb_fopen_cloexec): Change return type.
7667         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7668         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7669         (dump_binary_file, restore_binary_file): Update.
7670         * auto-load.c (auto_load_objfile_script_1): Update.
7671
7672 2017-08-03  Tom Tromey  <tom@tromey.com>
7673
7674         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7675         (info_static_tracepoint_markers_command): Likewise.
7676         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7677         * skip.c (skip_info): Use ui_out_emit_table.
7678         * progspace.c (print_program_space): Use ui_out_emit_table.
7679         * osdata.c (info_osdata): Use ui_out_emit_table.
7680         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7681         ui_out_emit_table.
7682         * linux-thread-db.c (info_auto_load_libthread_db): Use
7683         ui_out_emit_table.
7684         * inferior.c (print_inferior): Use ui_out_emit_table.
7685         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7686         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7687         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7688         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7689         * ui-out.h (class ui_out_emit_table): New.
7690
7691 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7692
7693         * mips-tdep.c (mips_fpu_type_str): New function.
7694         (mips_dump_tdep): Call it.
7695
7696 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7697
7698         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7699         `->mips_fpu_type'.
7700
7701 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7702
7703         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7704
7705 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7706
7707         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7708
7709 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7710
7711         * cli/cli-cmds.c (maintenancechecklist): New variable.
7712         * gdbcmd.h (maintenancechecklist): Declare it.
7713         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7714         Call i386_linux_read_description with different masks.
7715         * maint.c (maintenance_check_command): New function.
7716         (_initialize_maint_cmds): Call add_prefix_cmd.
7717         * target-descriptions.c (tdesc_reg): override operator != and ==.
7718         (tdesc_type): Likewise.
7719         (tdesc_feature): Likewise.
7720         (target_desc): Likewise.
7721         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7722         (maintenance_check_xml_descriptions): New function.
7723         (_initialize_target_descriptions) Add command "xml-descriptions".
7724         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7725
7726 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7727
7728         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7729         Include features/i386/32bit-*.c.
7730         (i386_linux_read_description): Generate target description if it
7731         doesn't exist.
7732         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7733         functions.
7734         * features/i386/32bit-linux.c: Re-generated.
7735         * features/i386/32bit-sse.c: Likewise.
7736         * target-descriptions.c (print_c_feature::visit): Print code to
7737         set register number if needed.
7738         (print_c_feature) <m_next_regnum>: New field.
7739
7740 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7741
7742         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7743         (FEATURE_XMLFILES): New.
7744         (FEATURE_CFILES): New.
7745         New rules.
7746         (clean-cfiles): Remove generated c files.
7747         * features/i386/32bit-avx.c: Generated.
7748         * features/i386/32bit-avx512.c: Generated.
7749         * features/i386/32bit-core.c: Generated.
7750         * features/i386/32bit-linux.c: Generated.
7751         * features/i386/32bit-mpx.c: Generated.
7752         * features/i386/32bit-pkeys.c: Generated.
7753         * features/i386/32bit-sse.c: Generated.
7754         * target-descriptions.c: Include algorithm.
7755         (tdesc_element_visitor): Add method visit_end.
7756         (print_c_tdesc): Implement visit_end.
7757         (print_c_tdesc:: m_filename_after_features): Move it to
7758         protected.
7759         (print_c_feature): New class.
7760         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7761         name starts with "i386/32bit-".
7762
7763 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7764
7765         * target-descriptions.c (tdesc_element_visitor): New class.
7766         (tdesc_element): New class.
7767         (tdesc_reg): Inherit from tdesc_element.
7768         (tdesc_reg::accept): New function.
7769         (tdesc_type): Inherit from tdesc_element.
7770         (tdesc_type::accept): New function.
7771         (tdesc_feature): Inherit from tdesc_element.
7772         (tdesc_feature::accept): New function.
7773         (target_desc): Inherit from tdesc_element.
7774         (target_desc::target_desc): New.
7775         (target_desc::~target_desc): New.
7776         (target_desc::accept): New.
7777         (allocate_target_description): Use new.
7778         (free_target_description): Use delete.
7779         (print_c_tdesc): New class.
7780         (maint_print_c_tdesc_cmd): Adjust.
7781
7782         * features/aarch64.c: Re-generated.
7783         * features/arc-arcompact.c: Re-generated.
7784         * features/arc-v2.c: Re-generated.
7785         * features/arm/arm-with-iwmmxt.c: Re-generated.
7786         * features/arm/arm-with-m.c: Re-generated.
7787         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7788         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7789         * features/arm/arm-with-neon.c: Re-generated.
7790         * features/arm/arm-with-vfpv2.c: Re-generated.
7791         * features/arm/arm-with-vfpv3.c: Re-generated.
7792         * features/i386/amd64-avx-avx512.c: Re-generated.
7793         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7794         * features/i386/amd64-avx.c: Re-generated.
7795         * features/i386/amd64-avx-linux.c: Re-generated.
7796         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7797         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7798         * features/i386/amd64-avx-mpx.c: Re-generated.
7799         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7800         * features/i386/amd64.c: Re-generated.
7801         * features/i386/amd64-linux.c: Re-generated.
7802         * features/i386/amd64-mpx.c: Re-generated.
7803         * features/i386/amd64-mpx-linux.c: Re-generated.
7804         * features/i386/i386-avx-avx512.c: Re-generated.
7805         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7806         * features/i386/i386-avx.c: Re-generated.
7807         * features/i386/i386-avx-linux.c: Re-generated.
7808         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7809         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7810         * features/i386/i386-avx-mpx.c: Re-generated.
7811         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7812         * features/i386/i386.c: Re-generated.
7813         * features/i386/i386-linux.c: Re-generated.
7814         * features/i386/i386-mmx.c: Re-generated.
7815         * features/i386/i386-mmx-linux.c: Re-generated.
7816         * features/i386/i386-mpx.c: Re-generated.
7817         * features/i386/i386-mpx-linux.c: Re-generated.
7818         * features/i386/x32-avx-avx512.c: Re-generated.
7819         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7820         * features/i386/x32-avx.c: Re-generated.
7821         * features/i386/x32-avx-linux.c: Re-generated.
7822         * features/i386/x32.c: Re-generated.
7823         * features/i386/x32-linux.c: Re-generated.
7824         * features/microblaze.c: Re-generated.
7825         * features/microblaze-with-stack-protect.c: Re-generated.
7826         * features/mips64-dsp-linux.c: Re-generated.
7827         * features/mips64-linux.c: Re-generated.
7828         * features/mips-dsp-linux.c: Re-generated.
7829         * features/mips-linux.c: Re-generated.
7830         * features/nds32.c: Re-generated.
7831         * features/nios2.c: Re-generated.
7832         * features/nios2-linux.c: Re-generated.
7833         * features/rs6000/powerpc-32.c: Re-generated.
7834         * features/rs6000/powerpc-32l.c: Re-generated.
7835         * features/rs6000/powerpc-403.c: Re-generated.
7836         * features/rs6000/powerpc-403gc.c : Re-generated.
7837         * features/rs6000/powerpc-405.c: Re-generated.
7838         * features/rs6000/powerpc-505.c: Re-generated.
7839         * features/rs6000/powerpc-601.c: Re-generated.
7840         * features/rs6000/powerpc-602.c: Re-generated.
7841         * features/rs6000/powerpc-603.c: Re-generated.
7842         * features/rs6000/powerpc-604.c: Re-generated.
7843         * features/rs6000/powerpc-64.c: Re-generated.
7844         * features/rs6000/powerpc-64l.c: Re-generated.
7845         * features/rs6000/powerpc-7400.c: Re-generated.
7846         * features/rs6000/powerpc-750.c: Re-generated.
7847         * features/rs6000/powerpc-860.c: Re-generated.
7848         * features/rs6000/powerpc-altivec32.c: Re-generated.
7849         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7850         * features/rs6000/powerpc-altivec64.c: Re-generated.
7851         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7852         * features/rs6000/powerpc-cell32l.c: Re-generated.
7853         * features/rs6000/powerpc-cell64l.c: Re-generated.
7854         * features/rs6000/powerpc-e500.c: Re-generated.
7855         * features/rs6000/powerpc-e500l.c: Re-generated.
7856         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7857         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7858         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7859         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7860         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7861         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7862         * features/rs6000/powerpc-vsx32.c: Re-generated.
7863         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7864         * features/rs6000/powerpc-vsx64.c: Re-generated.
7865         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7866         * features/rs6000/rs6000.c: Re-generated.
7867         * features/s390-linux32.c: Re-generated.
7868         * features/s390-linux32v1.c: Re-generated.
7869         * features/s390-linux32v2.c: Re-generated.
7870         * features/s390-linux64.c: Re-generated.
7871         * features/s390-linux64v1.c: Re-generated.
7872         * features/s390-linux64v2.c: Re-generated.
7873         * features/s390-te-linux64.c: Re-generated.
7874         * features/s390-tevx-linux64.c: Re-generated.
7875         * features/s390-vx-linux64.c: Re-generated.
7876         * features/s390x-linux64.c: Re-generated.
7877         * features/s390x-linux64v1.c: Re-generated.
7878         * features/s390x-linux64v2.c: Re-generated.
7879         * features/s390x-te-linux64.c: Re-generated.
7880         * features/s390x-tevx-linux64.c: Re-generated.
7881         * features/s390x-vx-linux64.c: Re-generated.
7882         * features/sparc/sparc32-solaris.c: Re-generated.
7883         * features/sparc/sparc64-solaris.c: Re-generated.
7884         * features/tic6x-c62x.c: Re-generated.
7885         * features/tic6x-c62x-linux.c: Re-generated.
7886         * features/tic6x-c64x.c: Re-generated.
7887         * features/tic6x-c64x-linux.c: Re-generated.
7888         * features/tic6x-c64xp.c: Re-generated.
7889         * features/tic6x-c64xp-linux.c: Re-generated.
7890
7891 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7892
7893         * i386-linux-tdep.c (i386_linux_read_description): New function.
7894         (i386_linux_core_read_description): Call
7895         i386_linux_read_description.
7896         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7897         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7898         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7899         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7900         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7901         * x86-linux-nat.c (x86_linux_read_description): Call
7902         i386_linux_read_description.
7903
7904 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7905
7906         * NEWS: Mention it.
7907         * features/Makefile (%.c: %.xml): Pass the xml file name to
7908         command "maint print c-tdesc".
7909         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7910         name from 'arg'.
7911
7912 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7913
7914         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7915         in-class initialization.
7916         (tdesc_create_feature): Call new instead of XCNEW.
7917         (free_target_description): Ue delete.
7918
7919 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7920
7921         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7922
7923 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7924
7925         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7926         constant.
7927         (amd64_x32_init_abi): Likewise.
7928         * amd64-tdep.h (amd64_init_abi): Update declaration.
7929         (amd64_x32_init_abi): Likewise.
7930
7931 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7932
7933         PR tdep/21717
7934         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7935         condition for FPSCR.
7936         (arm_linux_store_inferior_registers): Likewise.
7937
7938 2017-07-22  Tom Tromey  <tom@tromey.com>
7939
7940         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7941         <syscalls_counts>: Now a std::vector.
7942         (get_catch_syscall_inferior_data): Use "new".
7943         (catch_syscall_inferior_data_cleanup): Use "delete".
7944         (insert_catch_syscall, remove_catch_syscall)
7945         (clear_syscall_counts): Update.
7946
7947 2017-07-22  Tom Tromey  <tom@tromey.com>
7948
7949         * break-catch-syscall.c (syscall_catchpoint)
7950         <syscalls_to_be_caught>: Now a std::vector<int>
7951         (~syscall_catchpoint): Remove.
7952         (insert_catch_syscall, remove_catch_syscall)
7953         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7954         (print_mention_catch_syscall, print_recreate_catch_syscall):
7955         Update.
7956         (create_syscall_event_catchpoint): Change type of "filter"
7957         parameter.
7958         (catch_syscall_split_args): Return a std::vector.
7959         (catch_syscall_command_1, catching_syscall_number_1): Update.
7960
7961 2017-07-22  Tom Tromey  <tom@tromey.com>
7962
7963         * break-catch-throw.c (struct exception_catchpoint)
7964         <exception_rx>: Now a std::string.
7965         (~exception_catchpoint): Remove.
7966         (print_one_detail_exception_catchpoint): Update.
7967         (handle_gnu_v3_exceptions): Change type of except_rx.
7968         (extract_exception_regexp): Return a std::string.
7969         (catch_exception_command_1): Update.
7970
7971 2017-07-22  Tom Tromey  <tom@tromey.com>
7972
7973         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7974         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7975         std::vector.
7976         <catch_all>: Now a bool.
7977         (~signal_catchpoint): Remove.
7978         (signal_catchpoint_insert_location)
7979         (signal_catchpoint_remove_location)
7980         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7981         (signal_catchpoint_print_mention)
7982         (signal_catchpoint_print_recreate)
7983         (signal_catchpoint_explains_signal): Update.
7984         (create_signal_catchpoint): Change type of "filter" and
7985         "catch_all".
7986         (catch_signal_split_args): Return a std::vector.  Change type of
7987         "catch_all".
7988         (catch_signal_command): Update.
7989
7990 2017-07-20  Pedro Alves  <palves@redhat.com>
7991
7992         * ada-lang.c (ada_language_defn): Make extern.
7993         (_initialize_ada_language): Remove add_language call.
7994         * c-lang.c (c_language_defn, cplus_language_defn)
7995         (asm_language_defn, minimal_language_defn): Make extern.
7996         (_initialize_c_language): Delete.
7997         * completer.c (compare_cstrings): Delete, moved to utils.h.
7998         * d-lang.c (d_language_defn): Make extern.
7999         (_initialize_d_language): Remove add_language calls.
8000         * defs.h (enum language): Add comment.
8001         * f-lang.c (f_language_defn): Make extern.
8002         (_initialize_f_language): Remove add_language call.
8003         * go-lang.c (go_language_defn): Make extern.
8004         (_initialize_go_language): Remove add_language call.
8005         * language.c: Include <algorithm>.
8006         (languages): Redefine as const array.
8007         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8008         (set_language_command): Handle "local".  Use for-range loop.
8009         (set_language): Remove loop.
8010         (language_enum): Rewrite.
8011         (language_def, language_str): Remove loops.
8012         (add_language): Delete.
8013         (add_set_language_command): New, based on add_languages.
8014         (skip_language_trampoline): Adjust.
8015         (local_language_defn): Delete.
8016         (language_gdbarch_post_init): Adjust.
8017         (_initialize_language): Remove add_language calls.  Call
8018         add_set_language_command.
8019         * language.h (add_language): Delete.
8020         (auto_language_defn)
8021         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8022         (asm_language_defn, c_language_defn, cplus_language_defn)
8023         (d_language_defn, f_language_defn, go_language_defn)
8024         (m2_language_defn, objc_language_defn, opencl_language_defn)
8025         (pascal_language_defn, rust_language_defn): Declare.
8026         * m2-lang.c (m2_language_defn): Make extern.
8027         (_initialize_m2_language): Remove add_language call.
8028         * objc-lang.c (objc_language_defn): Make extern.
8029         (_initialize_objc_language): Remove add_language call.
8030         * opencl-lang.c (opencl_language_defn): Make extern.
8031         (_initialize_opencl_language): Remove add_language call.
8032         * p-lang.c (pascal_language_defn): Make extern.
8033         (_initialize_pascal_language): Delete.
8034         * rust-lang.c (rust_language_defn): Make extern.
8035         (_initialize_rust_language): Delete.
8036         * utils.h (compare_cstrings): New static inline function.
8037
8038 2017-07-20  Pedro Alves  <palves@redhat.com>
8039
8040         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8041         (get_var_value): Constify parameters.
8042         (get_int_var_value): Change prototype.
8043         (to_fixed_range_type): Adjust.
8044         * ada-lang.h (get_int_var_value): Change prototype.
8045
8046 2017-07-20  Pedro Alves  <palves@redhat.com>
8047
8048         * dwarf2read.c (dw2_lookup_symbol): Use
8049         SYMBOL_MATCHES_SEARCH_NAME.
8050         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8051
8052 2017-07-20  Pedro Alves  <palves@redhat.com>
8053
8054         * block.c (block_iter_name_step, block_iter_name_first)
8055         (block_iter_name_next): Delete.
8056         (block_lookup_symbol_primary): Adjust to use
8057         dict_iter_match_first/dict_iter_match_next.
8058         * block.h (block_iter_name_first, block_iter_name_next): Delete
8059         declarations.
8060         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8061         dict_iter_match_first/dict_iter_match_next.
8062
8063 2017-07-20  Pedro Alves  <palves@redhat.com>
8064
8065         * cp-support.c (cp_find_first_component_aux): Add missing case for
8066         end of string.
8067
8068 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8069
8070         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8071         of dwo_cu's dwo_file.
8072
8073 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8074
8075         * remote.c (store_registers_using_G): Remove one line comment.
8076
8077 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8078
8079         * regcache.c (regcache_cpy): Simplify it.
8080         (regcache::cpy_no_passthrough): Remove it.
8081         * regcache.h (cpy_no_passthrough): Remove it.
8082         (regcache_dup, regcache_cpy): Update comments.
8083
8084 2017-07-18  Pedro Alves  <palves@redhat.com>
8085
8086         * remote-sim.c (sim_command_completer): Adjust to work with a
8087         completion_tracker instead of a VEC.
8088
8089 2017-07-17  Pedro Alves  <palves@redhat.com>
8090
8091         * completer.c (complete_source_filenames): New function.
8092         (complete_address_and_linespec_locations): New function.
8093         (location_completer): Use complete_address_and_linespec_locations.
8094         (completion_tracker::build_completion_result): Honor the tracker's
8095         request to suppress append.
8096         * completer.h (completion_tracker::suppress_append_ws)
8097         (completion_tracker::set_suppress_append_ws): New methods.
8098         (completion_tracker::m_suppress_append_ws): New field.
8099         (complete_source_filenames): New declaration.
8100         * linespec.c (linespec_complete_what): New.
8101         (struct ls_parser) <complete_what, completion_word,
8102         completion_quote_char, completion_quote_end, completion_tracker>:
8103         New fields.
8104         (string_find_incomplete_keyword_at_end): New.
8105         (linespec_lexer_lex_string): Record quote char.  If in completion
8106         mode, don't throw.
8107         (linespec_lexer_consume_token): Advance the completion word point.
8108         (linespec_lexer_peek_token): Save/restore completion info.
8109         (save_stream_and_consume_token): New.
8110         (set_completion_after_number): New.
8111         (linespec_parse_basic): Set what to complete next depending on
8112         token.  Handle function and label completions specially.
8113         (parse_linespec): Disable objc shortcut in completion mode.  Set
8114         what to complete next depending on token type.  Skip keyword if in
8115         completion mode.
8116         (complete_linespec_component, linespec_complete): New.
8117         * linespec.h (linespec_complete): Declare.
8118
8119 2017-07-17  Pedro Alves  <palves@redhat.com>
8120
8121         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8122         Handle 'operator<' / 'operator<<'.
8123
8124 2017-07-17  Pedro Alves  <palves@redhat.com>
8125
8126         * completer.c (collect_explicit_location_matches): Handle
8127         MATCH_LABEL.
8128         (convert_explicit_location_to_linespec): New, factored out from
8129         ...
8130         (convert_explicit_location_to_sals): ... this.
8131         (complete_label): New.
8132         (linespec_complete_label, find_label_symbols_in_block): New.
8133         (find_label_symbols): Add completion_mode parameter and adjust to
8134         call find_label_symbols_in_block.
8135         * linespec.h (linespec_complete_label): Declare.
8136
8137 2017-07-17  Pedro Alves  <palves@redhat.com>
8138
8139         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8140         complete_symbol_mode parameter.
8141         * cli/cli-cmds.c (complete_command): Get the completion result out
8142         of the handle_brkchars tracker if used a custom word point.
8143         * completer.c: Include "linespec.h".
8144         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8145         (advance_to_expression_complete_word_point): New.
8146         (completion_tracker::completes_to_completion_word): New.
8147         (complete_files_symbols): Pass down
8148         complete_symbol_mode::EXPRESSION.
8149         (explicit_options, probe_options): New.
8150         (collect_explicit_location_matches): Complete on the
8151         explictit_loc->foo instead of word.  Use
8152         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8153         keyword and options completions.
8154         (backup_text_ptr): Delete.
8155         (skip_keyword): New.
8156         (complete_explicit_location): Remove 'word' parameter.  Add
8157         language, quoted_arg_start and quoted_arg_end parameters.
8158         Rewrite, parsing left to right.
8159         (location_completer): Rewrite.
8160         (location_completer_handle_brkchars): New function.
8161         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8162         (enum complete_line_internal_reason): Adjust comments.
8163         (completion_tracker::discard_completions): New.
8164         (completer_handle_brkchars_func_for_completer): Handle
8165         location_completer.
8166         (gdb_custom_word_point_brkchars)
8167         (gdb_org_rl_basic_quote_characters): New.
8168         (gdb_completion_word_break_characters_throw)
8169         (completion_find_completion_word): Handle trackers that use a
8170         custom word point.
8171         (completion_tracker::advance_custom_word_point_by): New.
8172         (completion_tracker::build_completion_result): Don't rely on
8173         readline appending the quote char.
8174         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8175         use a custom word point.
8176         (gdb_rl_attempted_completion_function): Restore
8177         rl_basic_quote_characters.
8178         * completer.h (class completion_tracker): Extend intro comment.
8179         (completion_tracker::set_quote_char)
8180         (completion_tracker::quote_char)
8181         (completion_tracker::set_use_custom_word_point)
8182         (completion_tracker::use_custom_word_point)
8183         (completion_tracker::custom_word_point)
8184         (completion_tracker::set_custom_word_point)
8185         (completion_tracker::advance_custom_word_point_by)
8186         (completion_tracker::completes_to_completion_word)
8187         (completion_tracker::discard_completions): New methods.
8188         (completion_tracker::m_quote_char)
8189         (completion_tracker::m_use_custom_word_point)
8190         (completion_tracker::m_custom_word_point): New fields.
8191         (advance_to_expression_complete_word_point): Declare.
8192         * f-lang.c (f_collect_symbol_completion_matches): Add
8193         complete_symbol_mode parameter.
8194         * language.h (struct language_defn)
8195         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8196         parameter.
8197         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8198         (linespec_complete_function): New function.
8199         (linespec_lexer_lex_keyword): Adjust.
8200         * linespec.h (linespec_keywords, linespec_complete_function): New
8201         declarations.
8202         * location.c (find_end_quote): New function.
8203         (explicit_location_lex_one): Add explicit_completion_info
8204         parameter.  Save quoting info.  Don't throw if being called for
8205         completion.  Don't handle Ada operators here.
8206         (is_cp_operator, skip_op_false_positives, first_of)
8207         (explicit_location_lex_one_function): New function.
8208         (string_to_explicit_location): Replace 'dont_throw' parameter with
8209         an explicit_completion_info pointer parameter.  Handle it.  Don't
8210         use explicit_location_lex_one to lex function names.  Use
8211         explicit_location_lex_one_function instead.
8212         * location.h (struct explicit_completion_info): New.
8213         (string_to_explicit_location): Replace 'dont_throw' parameter with
8214         an explicit_completion_info pointer parameter.
8215         * symtab.c (default_collect_symbol_completion_matches_break_on):
8216         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8217         (default_collect_symbol_completion_matches)
8218         (collect_symbol_completion_matches): Add complete_symbol_mode
8219         parameter.
8220         (collect_symbol_completion_matches_type): Pass down
8221         complete_symbol_mode::EXPRESSION.
8222         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8223         parameter.  Handle LINESPEC mode.
8224         * symtab.h (complete_symbol_mode): New.
8225         (default_collect_symbol_completion_matches_break_on)
8226         (default_collect_symbol_completion_matches)
8227         (collect_symbol_completion_matches)
8228         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8229         parameter.
8230
8231 2017-07-17  Pedro Alves  <palves@redhat.com>
8232
8233         * utils.c (enum class strncmp_iw_mode): New.
8234         (strcmp_iw): Rename to ...
8235         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8236         parameters.  Handle them.
8237         (strncmp_iw): New.
8238         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8239         * utils.h (strncmp_iw): Declare.
8240         (strcmp_iw): Move describing comments here.
8241
8242 2017-07-17  Pedro Alves  <palves@redhat.com>
8243
8244         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8245         CP_OPERATOR_STR.
8246         * c-typeprint.c (is_type_conversion_operator): Use
8247         CP_OPERATOR_STR.
8248         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8249         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8250         CP_OPERATOR_LEN.
8251         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8252         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8253         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8254         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8255         CP_OPERATOR_STR.
8256         * location.c: Include "cp-support.h".
8257         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8258         CP_OPERATOR_STR.
8259         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8260         CP_OPERATOR_LEN.
8261
8262 2017-07-17  Pedro Alves  <palves@redhat.com>
8263
8264         * cli/cli-cmds.c (complete_command): Use a completion tracker
8265         along with completion_find_completion_word for handle_brkchars
8266         phase.
8267         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8268         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8269         (struct gdb_rl_completion_word_info): New.
8270         (gdb_rl_find_completion_word): New.
8271         (completion_find_completion_word): New.
8272         * completer.h (completion_find_completion_word): Declare.
8273
8274 2017-07-17  Pedro Alves  <palves@redhat.com>
8275
8276         * ada-lang.c (symbol_completion_match): Adjust comments.
8277         (symbol_completion_add): Replace vector parameter with
8278         completion_tracker parameter.  Use it.
8279         (ada_make_symbol_completion_list): Rename to...
8280         (ada_collect_symbol_completion_matches): ... this.  Add
8281         completion_tracker parameter and use it.
8282         (ada_language_defn): Adjust.
8283         * break-catch-syscall.c (catch_syscall_completer): Adjust
8284         prototype and work with completion_tracker instead of VEC.
8285         * breakpoint.c (condition_completer): Adjust prototype and work
8286         with completion_tracker instead of VEC.
8287         * c-lang.c (c_language_defn, cplus_language_defn)
8288         (asm_language_defn, minimal_language_defn): Adjust to renames.
8289         * cli/cli-cmds.c (complete_command): Rework using
8290         completion_tracker.  Catch exceptions when completing.
8291         * cli/cli-decode.c (integer_unlimited_completer)
8292         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8293         with completion_tracker instead of VEC.
8294         * command.h (struct completion_tracker): Forward declare.
8295         (completer_ftype, completer_handle_brkchars_ftype): Change
8296         types.
8297         (complete_on_cmdlist, complete_on_enum): Adjust.
8298         * completer.c: Include <algorithm>.
8299         (struct gdb_completer_state): New.
8300         (current_completion): New global.
8301         (readline_line_completion_function): Delete.
8302         (noop_completer, filename_completer)
8303         (filename_completer_handle_brkchars, complete_files_symbols)
8304         (linespec_location_completer): Adjust to work with a
8305         completion_tracker instead of a VEC.
8306         (string_or_empty): New.
8307         (collect_explicit_location_matches): Adjust to work with a
8308         completion_tracker instead of a VEC.
8309         (explicit_location_completer): Rename to ...
8310         (complete_explicit_location): ... this and adjust to work with a
8311         completion_tracker instead of a VEC.
8312         (location_completer): Adjust to work with a completion_tracker
8313         instead of a VEC.
8314         (add_struct_fields): Adjust to work with a completion_list instead
8315         of VEC.
8316         (expression_completer): Rename to ...
8317         (complete_expression): ... this and adjust to work with a
8318         completion_tracker instead of a VEC.  Use complete_files_symbols.
8319         (expression_completer): Reimplement on top of complete_expression.
8320         (symbol_completer): Adjust to work with a completion_tracker
8321         instead of a VEC.
8322         (enum complete_line_internal_reason): Add describing comments.
8323         (complete_line_internal_normal_command): Adjust to work with a
8324         completion_tracker instead of a VEC.
8325         (complete_line_internal): Rename to ...
8326         (complete_line_internal_1): ... this and adjust to work with a
8327         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8328         handle_brkchars phase.
8329         (new_completion_tracker): Delete.
8330         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8331         complete_line_internal_1.
8332         (free_completion_tracker): Delete.
8333         (INITIAL_COMPLETION_HTAB_SIZE): New.
8334         (completion_tracker::completion_tracker)
8335         (completion_tracker::~completion_tracker): New.
8336         (maybe_add_completion): Delete.
8337         (completion_tracker::maybe_add_completion)
8338         (completion_tracker::add_completion)
8339         (completion_tracker::add_completions): New.
8340         (throw_max_completions_reached_error): Delete.
8341         (complete_line): Adjust to work with a completion_tracker instead
8342         of a VEC.  Don't create a completion_tracker_t or check for max
8343         completions here.
8344         (command_completer, command_completer_handle_brkchars)
8345         (signal_completer, reg_or_group_completer_1)
8346         (reg_or_group_completer, default_completer_handle_brkchars):
8347         Adjust to work with a completion_tracker.
8348         (gdb_completion_word_break_characters_throw): New.
8349         (gdb_completion_word_break_characters): Reimplement.
8350         (line_completion_function): Delete.
8351         (completion_tracker::recompute_lowest_common_denominator)
8352         (expand_preserving_ws)
8353         (completion_tracker::build_completion_result)
8354         (completion_result::completion_result)
8355         (completion_result::completion_result)
8356         (completion_result::~completion_result)
8357         (completion_result::completion_result)
8358         (completion_result::release_match_list, compare_cstrings)
8359         (completion_result::sort_match_list)
8360         (completion_result::reset_match_list)
8361         (gdb_rl_attempted_completion_function_throw)
8362         (gdb_rl_attempted_completion_function): New.
8363         * completer.h (completion_list, struct completion_result)
8364         (class completion_tracker): New.
8365         (complete_line): Add completion_tracker parameter.
8366         (readline_line_completion_function): Delete.
8367         (gdb_rl_attempted_completion_function): New.
8368         (noop_completer, filename_completer, expression_completer)
8369         (location_completer, symbol_completer, command_completer)
8370         (signal_completer, reg_or_group_completer): Update prototypes.
8371         (completion_tracker_t, new_completion_tracker)
8372         (make_cleanup_free_completion_tracker): Delete.
8373         (enum maybe_add_completion_enum): Delete.
8374         (maybe_add_completion): Delete.
8375         (throw_max_completions_reached_error): Delete.
8376         * corefile.c (complete_set_gnutarget): Adjust to work with a
8377         completion_tracker instead of a VEC.
8378         * cp-abi.c (cp_abi_completer): Adjust to work with a
8379         completion_tracker instead of a VEC.
8380         * d-lang.c (d_language_defn): Adjust.
8381         * disasm.c (disassembler_options_completer): Adjust to work with a
8382         completion_tracker instead of a VEC.
8383         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8384         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8385         with a completion_tracker instead of a VEC.
8386         (f_language_defn): Adjust.
8387         * go-lang.c (go_language_defn): Adjust.
8388         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8389         Adjust to work with a completion_tracker instead of a VEC.
8390         * infrun.c (handle_completer): Likewise.
8391         * interps.c (interpreter_completer): Likewise.
8392         * interps.h (interpreter_completer): Likewise.
8393         * language.c (unknown_language_defn, auto_language_defn)
8394         (local_language_defn): Adjust.
8395         * language.h (language_defn::la_make_symbol_completion_list):
8396         Rename to ...
8397         (language_defn::la_collect_symbol_completion_matches): ... this
8398         and adjust to work with a completion_tracker instead of a VEC.
8399         * m2-lang.c (m2_language_defn): Adjust.
8400         * objc-lang.c (objc_language_defn): Adjust.
8401         * opencl-lang.c (opencl_language_defn): Adjust.
8402         * p-lang.c (pascal_language_defn): Adjust.
8403         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8404         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8405         with a completion_tracker.
8406         * rust-lang.c (rust_language_defn): Adjust.
8407         * symtab.c (free_completion_list, do_free_completion_list)
8408         (return_val, completion_tracker): Delete.
8409         (completion_list_add_name, completion_list_add_symbol)
8410         (completion_list_add_msymbol, completion_list_objc_symbol)
8411         (completion_list_add_fields, add_symtab_completions): Add
8412         completion_tracker parameter and use it.
8413         (default_make_symbol_completion_list_break_on_1): Rename to...
8414         (default_collect_symbol_completion_matches_break_on): ... this.
8415         Add completion_tracker parameter and use it instead of allocating
8416         a completion tracker here.
8417         (default_make_symbol_completion_list_break_on): Delete old
8418         implementation.
8419         (default_make_symbol_completion_list): Delete.
8420         (default_collect_symbol_completion_matches): New.
8421         (make_symbol_completion_list): Delete.
8422         (collect_symbol_completion_matches): New.
8423         (make_symbol_completion_type): Rename to ...
8424         (collect_symbol_completion_matches_type): ... this.  Add
8425         completion_tracker parameter and use it instead of VEC.
8426         (make_file_symbol_completion_list_1): Rename to...
8427         (collect_file_symbol_completion_matches): ... this.  Add
8428         completion_tracker parameter and use it instead of VEC.
8429         (make_file_symbol_completion_list): Delete.
8430         (add_filename_to_list): Use completion_list instead of a VEC.
8431         (add_partial_filename_data::list): Now a completion_list.
8432         (make_source_files_completion_list): Work with a completion_list
8433         instead of a VEC.
8434         * symtab.h: Include "completer.h".
8435         (default_make_symbol_completion_list_break_on)
8436         (default_make_symbol_completion_list, make_symbol_completion_list)
8437         (make_symbol_completion_type, make_file_symbol_completion_list)
8438         (make_source_files_completion_list): Delete.
8439         (default_collect_symbol_completion_matches_break_on)
8440         (default_collect_symbol_completion_matches)
8441         (collect_symbol_completion_matches)
8442         (collect_symbol_completion_matches_type)
8443         (collect_file_symbol_completion_matches)
8444         (make_source_files_completion_list): New.
8445         * top.c (init_main): Don't install a rl_completion_entry_function
8446         hook.  Install a rl_attempted_completion_function hook instead.
8447         * tui/tui-layout.c (layout_completer): Adjust to work with a
8448         completion_tracker.
8449         * tui/tui-regs.c (tui_reggroup_completer):
8450         * tui/tui-win.c (window_name_completer, focus_completer)
8451         (winheight_completer): Adjust to work with a completion_tracker.
8452         * value.c: Include "completer.h".
8453         (complete_internalvar): Adjust to work with a completion_tracker.
8454         * value.h (complete_internalvar): Likewise.
8455
8456 2017-07-17  Pedro Alves  <palves@redhat.com>
8457
8458         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8459         renames.
8460         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8461         comments to completer_ftype's declaration.
8462         <completer_handle_brkchars>: Change type to
8463         completer_handle_brkchars_ftype.
8464         * command.h (completer_ftype): Add describing comment and give
8465         names to parameters.
8466         (completer_ftype_void): Rename to ...
8467         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8468         (set_cmd_completer_handle_brkchars): Adjust.
8469         * completer.c (filename_completer_handle_brkchars): New function.
8470         (complete_line_internal_normal_command): New function, factored
8471         out from ...
8472         (complete_line_internal): ... here.
8473         (command_completer_handle_brkchars)
8474         (default_completer_handle_brkchars)
8475         (completer_handle_brkchars_func_for_completer): New functions.
8476         * completer.h (set_gdb_completion_word_break_characters): Delete
8477         declaration.
8478         (completer_handle_brkchars_func_for_completer): New declaration.
8479         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8480         completer_handle_brkchars_func_for_completer.
8481
8482 2017-07-17  Pedro Alves  <palves@redhat.com>
8483
8484         * completer.c (symbol_completer): New function, based on
8485         make_symbol_completion_list_fn.
8486         * completer.h (symbol_completer): New declaration.
8487         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8488         * python/py-cmd.c (completers): Adjust.
8489         * symtab.c (make_symbol_completion_list_fn): Delete.
8490         * symtab.h (make_symbol_completion_list_fn): Delete.
8491         * cli/cli-decode.c (add_cmd): Adjust.
8492
8493 2017-07-17  Pedro Alves  <palves@redhat.com>
8494
8495         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8496         * dwarf2read.c: Include "filename-seen-cache.h".
8497         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8498         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8499         * filename-seen-cache.c: New file.
8500         * filename-seen-cache.h: New file.
8501         * symtab.c: Include "filename-seen-cache.h".
8502         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8503         (create_filename_seen_cache, clear_filename_seen_cache)
8504         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8505         to filename-seen-cache.h/filename-seen-cache.c.
8506         (output_source_filename, sources_info)
8507         (maybe_add_partial_symtab_filename)
8508         (make_source_files_completion_list): Adjust to use
8509         filename_seen_cache.
8510
8511 2017-07-17  Pedro Alves  <palves@redhat.com>
8512
8513         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8514         fields.
8515         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8516         dwarf2_debug_sections*)): New.
8517         (dwarf2_per_objfile::dwarf2_per_objfile(const
8518         dwarf2_per_objfile&)): Declare as deleted.
8519         (dwarf2_per_objfile::operator=): Declare as deleted.
8520         (dwarf2_per_objfile::dwarf2_per_objfile)
8521         (dwarf2_per_objfile::~dwarf2_per_objfile)
8522         (dwarf2_per_objfile::free_cached_comp_units): New.
8523         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8524         ctor.  Call dwarf2_per_objfile's ctor manually.
8525         (dwarf2_locate_sections): Deleted/refactored as ...
8526         (dwarf2_per_objfile::locate_sections): ... this new method.
8527         (free_cached_comp_units): Defer to
8528         dwarf2_per_objfile::free_cached_comp_units.
8529         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8530
8531 2017-07-14  Tom Tromey  <tom@tromey.com>
8532
8533         PR rust/21764:
8534         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8535         parameter.
8536         <UNOP_SIZEOF>: Split into separate case.
8537         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8538
8539 2017-07-14  Tom Tromey  <tom@tromey.com>
8540
8541         PR rust/21763:
8542         * symtab.c (symbol_matches_domain): Add language_rust to special
8543         case.
8544         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8545         treat LOC_TYPEDEF symbols as variables.
8546
8547 2017-07-14  Pedro Alves  <palves@redhat.com>
8548
8549         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8550         symtabs matching all symtabs with SRCFILE as file name instead of
8551         only considering the first hit, with lookup_symtab.
8552
8553 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8554
8555         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8556         operator_name parameters.
8557         (gen_expr): Update function call.
8558
8559 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8560
8561         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8562         parameter.
8563         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8564         Likewise.
8565         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8566         parameter, use agent_expr::gdbarch instead, update function
8567         calls.
8568         (locexpr_tracepoint_var_ref): Likewise.
8569         (loclist_tracepoint_var_ref): Likewise.
8570         * ax-gdb.c (gen_trace_static_fields): Likewise.
8571         (gen_traced_pop): Likewise.
8572         (gen_frame_args_address): Likewise.
8573         (gen_frame_locals_address): Likewise.
8574         (gen_var_ref): Likewise.
8575         (gen_struct_ref_recursive): Likewise.
8576         (gen_static_field): Likewise.
8577         (gen_maybe_namespace_elt): Likewise.
8578         (gen_expr): Likewise.
8579         (gen_trace_for_var): Likewise.
8580         (gen_trace_for_expr): Likewise.
8581         (gen_trace_for_return_address): Likewise.
8582
8583 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8584
8585         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8586         parameter.
8587         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8588
8589 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8590
8591         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8592         from ax, update calls.
8593         (gen_usual_arithmetic): Likewise.
8594         (gen_integral_promotions): Likewise.
8595         (gen_bitfield_ref): Likewise.
8596         (gen_primitive_field): Likewise.
8597         (gen_struct_ref_recursive): Likewise.
8598         (gen_struct_ref): Likewise.
8599         (gen_maybe_namespace_elt): Likewise.
8600         (gen_struct_elt_for_reference): Likewise.
8601         (gen_namespace_elt): Likewise.
8602         (gen_aggregate_elt_ref): Likewise.
8603         (gen_expr): Get gdbarch from ax, update calls.
8604         (gen_expr_binop_rest): Likewise.
8605
8606 2017-07-13  Pedro Alves  <palves@redhat.com>
8607
8608         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8609         as default tdesc.
8610         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8611         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8612         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8613         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8614         tdep.
8615         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8616         Get final tdesc from the tdep.
8617         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8618         default tdesc.
8619         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8620         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8621         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8622         Use it as default tdesc.
8623         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8624         down to amd_init_abi.  No longer handle fallback tdesc here.
8625         * amd64-tdep.h (tdesc_x32): Declare.
8626         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8627         parameter.
8628         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8629         as default tdesc.
8630
8631 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8632
8633         * s390-linux-tdep.c (s390_process_record): Add support for
8634         instructions new in arch12.
8635
8636 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8637
8638         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8639         PT_GETFSBASE and PT_GETGSBASE.
8640         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8641         PT_SETGSBASE.
8642
8643 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8644
8645         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8646         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8647         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8648         those rules.
8649         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8650         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8651         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8652         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8653         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8654         * features/i386/amd64.xml: Add 64bit-segments.xml.
8655         * features/i386/amd64-avx-avx512.c: Regenerated.
8656         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8657         * features/i386/amd64-avx-mpx.c: Regenerated.
8658         * features/i386/amd64-avx.c: Regenerated.
8659         * features/i386/amd64-mpx.c: Regenerated.
8660         * features/i386/amd64.c: Regenerated.
8661         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8662         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8663         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8664         * regformats/i386/amd64-avx.dat: Regenerated.
8665         * regformats/i386/amd64-mpx.dat: Regenerated.
8666         * regformats/i386/amd64.dat: Regenerated.
8667
8668 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8669
8670         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8671         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8672
8673 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8674
8675         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8676         unsetenv.
8677         * gnulib/aclocal.m4: Regenerate.
8678         * gnulib/config.in: Regenerate.
8679         * gnulib/configure: Regenerate.
8680         * gnulib/import/Makefile.am: Regenerate.
8681         * gnulib/import/Makefile.in: Regenerate.
8682         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8683         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8684         * gnulib/import/m4/environ.m4: New file.
8685         * gnulib/import/m4/setenv.m4: New file.
8686         * gnulib/import/setenv.c: New file.
8687         * gnulib/import/unsetenv.c: New file.
8688
8689 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8690
8691         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8692         address when op is DW_OP_addr.
8693
8694 2017-07-09  Tom Tromey  <tom@tromey.com>
8695
8696         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8697         check and apply to outer type.
8698
8699 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8700
8701         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8702         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8703         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8704         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8705
8706 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8707
8708         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8709
8710 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8711
8712         * corelow.c (get_core_siginfo): Remove.
8713         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8714         instead of get_core_siginfo.
8715         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8716         * gdbarch.h: Re-generate.
8717         * gdbarch.c: Re-generate.
8718         * linux-tdep.c (linux_core_xfer_siginfo): New.
8719         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8720
8721 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8722
8723         * corelow.c (thread_section_name): Move to ...
8724         * gdbcore.h (thread_section_name): ... here.
8725
8726 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8727
8728         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8729         (struct siginfo32): New.
8730         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8731         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8732         via ptrace(PT_LWPINFO).
8733
8734 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8735
8736         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8737         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8738         (fbsd_get_siginfo_type): New.
8739         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8740         (_initialize_fbsd_tdep): New.
8741
8742 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8743
8744         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8745         a singular dwo_unit*) to support multiple CUs in the same way that
8746         multiple TUs are supported.
8747         (create_cus_hash_table): Replace create_dwo_cu with a function for
8748         parsing multiple CUs from a DWO file.
8749         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8750         create_dwo_cu.
8751         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8752         htab_find, rather than comparing the signature to a singleton CU in
8753         the dwo_file.
8754
8755 2017-07-06  Pedro Alves  <palves@redhat.com>
8756
8757         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8758
8759 2017-07-04  Pedro Alves  <palves@redhat.com>
8760
8761         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8762         * gdbtypes.h (TYPE_STATIC): Delete.
8763         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8764         is_synchronized, is_native>: Delete.
8765         <dummy>: Bump.
8766         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8767         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8768         (TYPE_FN_FIELD_ABSTRACT): Delete.
8769
8770 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8771
8772         * buffer.h (buffer_finish): Fix spelling mistakes.
8773
8774 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8775
8776         * .dir-locals.el: Automatically switch to C-style comments in
8777         versions of Emacs that support the feature.
8778
8779 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8780             Pedro Alves  <palves@redhat.com>
8781
8782         PR cli/21688
8783         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8784         (process_next_line): New variable 'inline_cmd'.
8785         Adjust 'if' clauses for "python", "compile" and "guile" to use
8786         'command_name_equals' and check for '!inline_cmd'.
8787
8788 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8789
8790         PR cli/21688
8791         * cli/cli-script.c (command_name_equals_not_inline): New function.
8792         (process_next_line): Adjust 'if' clauses for "python", "compile"
8793         and "guile" to use command_name_equals_not_inline.
8794
8795 2017-06-29  Pedro Alves  <palves@redhat.com>
8796
8797         * completer.c (expression_completer): Call
8798         linespec_location_completer instead of location_completer.
8799
8800 2017-06-29  Pedro Alves  <palves@redhat.com>
8801
8802         * completer.c (expression_completer): Remove code that recomputes
8803         'text' from 'word'.
8804
8805 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8806
8807         * regformats/regdat.sh: Generate code with
8808         "ifndef IN_PROCESS_AGENT".
8809
8810 2017-06-28  Pedro Alves  <palves@redhat.com>
8811
8812         * command.h: Include "common/scoped_restore.h".
8813
8814 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8815
8816         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8817         instead of obstack_grow.
8818
8819 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8820
8821         PR gdb/21337
8822         * symfile.c (reread_symbols): Call objfiles_changed just before
8823         read_symbols.
8824
8825 2017-06-27  Pedro Alves  <palves@redhat.com>
8826
8827         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8828         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8829         (completion_list_add_symbol, completion_list_add_msymbol):
8830         ... these new functions.
8831         (add_symtab_completions)
8832         (default_make_symbol_completion_list_break_on_1): Adjust.
8833
8834 2017-06-27  Pedro Alves  <palves@redhat.com>
8835
8836         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8837         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8838         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8839         dtor.
8840         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8841         'storage_obstack' field an auto_obstack.  In-class initialize all
8842         non-bitfield fields.  Make minsyms_read bool.
8843         * symfile.c (read_symbols): Adjust.
8844
8845 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8846
8847         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8848         (gdbsim_store_register): Likewise.
8849
8850 2017-06-27  Pedro Alves  <palves@redhat.com>
8851
8852         * c-exp.y (name_obstack): Now an auto_obstack.
8853         (yylex): Use auto_obstack::clear.
8854         (c_parse): Use auto_obstack::clear instead of reinitializing and
8855         freeing the obstack.
8856         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8857         * d-exp.y (name_obstack): Now an auto_obstack.
8858         (yylex): Use auto_obstack::clear.
8859         (d_parse): Use auto_obstack::clear instead of reinitializing and
8860         freeing the obstack.
8861         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8862         auto_obstack.
8863         * dwarf2read.c (create_addrmap_from_index)
8864         (dwarf2_build_psymtabs_hard)
8865         (update_enumeration_type_from_children): Likewise.
8866         * gdb_obstack.h (auto_obstack): New type.
8867         * go-exp.y (name_obstack): Now an auto_obstack.
8868         (build_packaged_name): Use auto_obstack::clear.
8869         (go_parse): Use auto_obstack::clear instead of reinitializing and
8870         freeing the obstack.
8871         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8872         auto_obstack.
8873         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8874         * rust-exp.y (work_obstack): Now an auto_obstack.
8875         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8876         reinitializing and freeing the obstack.
8877         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8878         (host_char_to_target): Use auto_obstack.
8879         * utils.h (make_cleanup_obstack_free): Delete declaration.
8880         * valprint.c (generic_emit_char, generic_printstr): Use
8881         auto_obstack.
8882
8883 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8884
8885         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8886         thread.
8887         (darwin_init_thread_list): Don't update dummy thread.
8888         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8889
8890 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8891
8892         * record-full.c (netorder16): Remove.
8893
8894 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8895
8896         * common/diagnostics.h: Define macros for GCC.
8897         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8898         * common/vec.h: Include diagnostics.h.
8899         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8900         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8901         warning.
8902
8903 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8904
8905         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8906         New macro.
8907         * ada-lex.l: Ignore deprecated register warnings.
8908
8909 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8910
8911         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8912         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8913
8914 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8915
8916         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8917         its own line.
8918
8919 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8920
8921         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8922
8923 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8924
8925         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8926         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8927         (xtensa_register_read_masked): Likewise.
8928
8929 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8930
8931         * common/environ.c (gdb_environ::unset): Update comment.
8932
8933 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8934
8935         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8936         registers.
8937
8938 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8939
8940         * record-full.c (record_full_exec_insn): Use byte_vector.
8941
8942 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8943
8944         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8945         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8946
8947 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8948
8949         * remote.c (cached_reg): Move from here...
8950         * regcache.h (cached_reg): ...to here.
8951         * python/py-unwind.c (struct reg_info): Remove.
8952         (cached_frame_info): Use cached_reg_t.
8953         (pyuw_prev_register): Likewise.
8954         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8955         (pyuw_dealloc_cache): Free all registers.
8956
8957 2017-06-22  Pedro Alves  <palves@redhat.com>
8958             Simon Marchi  <simon.marchi@ericsson.com>
8959
8960         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8961         warning.
8962         * common/diagnostics.h: New file.
8963
8964 2017-06-22  Pedro Alves  <palves@redhat.com>
8965
8966         * common/agent.h: Add include guards.
8967
8968 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8969
8970         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8971         talk about addressable units instead of bytes.
8972
8973 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8974
8975         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8976         of '::const_iterator'.
8977
8978 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8979
8980         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8981         'unittests/environ-selftests.c'.
8982         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8983         * charset.c (find_charset_names): Declare object 'iconv_env'.
8984         Update code to use 'iconv_env' object.  Remove call to
8985         'free_environ'.
8986         * common/environ.c: Include <utility>.
8987         (make_environ): Delete function.
8988         (free_environ): Delete function.
8989         (gdb_environ::clear): New function.
8990         (gdb_environ::operator=): New function.
8991         (gdb_environ::get): Likewise.
8992         (environ_vector): Delete function.
8993         (set_in_environ): Delete function.
8994         (gdb_environ::set): New function.
8995         (unset_in_environ): Delete function.
8996         (gdb_environ::unset): New function.
8997         (gdb_environ::envp): Likewise.
8998         * common/environ.h: Include <vector>.
8999         (struct gdb_environ): Delete; transform into...
9000         (class gdb_environ): ... this class.
9001         (free_environ): Delete prototype.
9002         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9003         environ_vector): Likewise.
9004         * infcmd.c (run_command_1): Update code to call
9005         'envp' from 'gdb_environ' class.
9006         (environment_info): Update code to call methods from 'gdb_environ'
9007         class.
9008         (unset_environment_command): Likewise.
9009         (path_info): Likewise.
9010         (path_command): Likewise.
9011         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9012         (inferior::inferior): Initialize 'environment' using the host's
9013         information.
9014         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9015         Include "environ.h".
9016         (class inferior) <environment>: Change type from 'struct
9017         gdb_environ' to 'gdb_environ'.
9018         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9019         methods from 'gdb_environ' class.
9020         * solib.c (solib_find_1): Likewise
9021         * unittests/environ-selftests.c: New file.
9022
9023 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9024
9025         * features/i386/i386-linux.xml: Exchange the order of including
9026         32bit-linux.xml and 32bit-sse.xml.
9027         * features/i386/i386-linux.c: Regenerated.
9028
9029 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9030
9031         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9032         Delete copy ctor and assignment operator.
9033         (tdesc_type): Likewise.
9034         (tdesc_feature): Likewise.
9035         (tdesc_free_reg): Remove.
9036         (tdesc_create_reg): Use new.
9037         (tdesc_free_type): Remove.
9038         (tdesc_create_vector): Use new.
9039         (tdesc_create_union): Likewise.
9040         (tdesc_create_flags): Likewise.
9041         (tdesc_create_enum): Likewise.
9042         (tdesc_free_feature): Delete.
9043         (free_target_description): Use delete.
9044
9045 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9046
9047         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9048         registers.
9049
9050 2017-06-19  Pedro Alves  <palves@redhat.com>
9051
9052         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9053         after gdb::unlinker.
9054
9055 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9056
9057         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9058         gdb_environ to access an environment variable.
9059
9060 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9061
9062         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9063         gdb_byte*.
9064
9065 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9066
9067         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9068
9069 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9070
9071         * configure: Re-generate.
9072         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9073
9074 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9075
9076         * configure: Re-generate.
9077         * warning.m4: Pass -Werror to compiler when checking for
9078         supported warning flags.
9079
9080 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9081
9082         * Makefile.in (COMPILE.pre): Add "-x c++".
9083
9084 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9085             Pedro Alves  <palves@redhat.com>
9086             Yao Qi  <yao.qi@linaro.org>
9087
9088         * defs.h (RequireLongest): New.
9089         (extract_integer): Declare function template.
9090         (extract_signed_integer): Remove the declaration, but define it
9091         static inline.
9092         (extract_unsigned_integer): Likewise.
9093         (store_integer): Declare function template.
9094         (store_signed_integer): Remove the declaration, but define it
9095         static inline.
9096         (store_unsigned_integer): Likewise.
9097         * findvar.c (extract_integer): New function template.
9098         (extract_signed_integer): Remove.
9099         (extract_unsigned_integer): Remove.
9100         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9101         instantiations.
9102         (store_integer): New function template.
9103         (store_signed_integer): Remove.
9104         (store_unsigned_integer): Remove.
9105         (store_integer): Explicit instantiations.
9106         * regcache.c (regcache_raw_read_signed): Update.
9107         (regcache::raw_read): New function.
9108         (regcache::raw_read_signed): Remove.
9109         (regcache::raw_read_unsigned): Remove.
9110         (regcache_raw_read_unsigned): Update.
9111         (regcache_raw_write_unsigned): Update.
9112         (regcache::raw_write_signed): Remove.
9113         (regcache::raw_write): New function.
9114         (regcache_cooked_read_signed): Update.
9115         (regcache::raw_write_unsigned): Remove.
9116         (regcache::cooked_read_signed): Remove.
9117         (regcache_cooked_read_unsigned): Update.
9118         (regcache::cooked_read_unsigned): Remove.
9119         (regcache_cooked_write_signed): Update.
9120         (regcache_cooked_write_unsigned): Update.
9121         * regcache.h (regcache) <raw_read_signed>: Remove.
9122         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9123         <raw_read, raw_write>: New.
9124         <cooked_read_signed, cooked_write_signed>: Remove.
9125         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9126         <cooked_read, cooked_write>: New.
9127         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9128         (sh64_pseudo_register_write): Update.
9129
9130 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9131
9132         * arc-tdep.c (arc_disassembler_options): New variable.
9133         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9134         of default_print_insn.
9135         (arc_delayed_print_insn): Set info->section when needed,
9136         use default_print_insn to retrieve a disassembler.
9137
9138 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9139
9140         PR gdb/21574
9141         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9142         to mention $SHELL and startup-with-shell.
9143
9144 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9145
9146         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9147
9148 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9149
9150         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9151         default_print_insn instead of print_insn_aarch64.
9152         * arm-tdep.c (gdb_print_insn_arm): Call
9153         default_print_insn instead of print_insn_big_arm
9154         and print_insn_little_arm.
9155         * i386-tdep.c (i386_print_insn): Call default_print_insn
9156         instead of print_insn_i386.
9157         * ia64-tdep.c (ia64_print_insn): Call
9158         default_print_insn instead of print_insn_ia64.
9159         * mips-tdep.c (gdb_print_insn_mips): Call
9160         default_print_insn instead of print_insn_big_mips
9161         and print_insn_little_mips.
9162         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9163         instead of print_insn_spu.
9164
9165 2017-06-14  Pedro Alves  <palves@redhat.com>
9166
9167         * ada-lang.c: Include "common/byte-vector.h".
9168         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9169         * charset.c (wchar_iterator::iterate): Resize the vector instead
9170         of reserving it.
9171         * common/byte-vector.h: Include "common/def-vector.h".
9172         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9173         * cli/cli-dump.c: Include "common/byte-vector.h".
9174         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9175         * common/byte-vector.h: New file.
9176         * common/def-vector.h: New file.
9177         * common/default-init-alloc.h: New file.
9178         * dwarf2loc.c: Include "common/byte-vector.h".
9179         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9180         instead of reserving it.
9181         * dwarf2read.c: Include "common/byte-vector.h".
9182         (data_buf::m_vec): Now a gdb::byte_vector.
9183         * gdb_regex.c: Include "common/def-vector.h".
9184         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9185         * mi/mi-main.c: Include "common/byte-vector.h".
9186         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9187         * printcmd.c: Include "common/byte-vector.h".
9188         (print_scalar_formatted): Use gdb::byte_vector.
9189         * valprint.c: Include "common/byte-vector.h".
9190         (maybe_negate_by_bytes, print_decimal_chars): Use
9191         gdb::byte_vector.
9192
9193 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9194
9195         * darwin-nat.c: Include "nat/fork-inferior.h".
9196
9197 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9198
9199         * configure.nat: Factor out Darwin bits that are not
9200         architecture-specific.  Add fork-inferior.o.
9201
9202 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         * configure.nat: Factor out AIX bits that are not
9205         architecture-specific.  Add fork-inferior.o.
9206
9207 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9208
9209         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9210         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9211         wrappers that just call rw_pieced_value.
9212
9213 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9214
9215         * dwarf2loc.c (write_pieced_value): When writing the data for a
9216         memory piece, use write_memory_with_notification instead of
9217         write_memory.
9218
9219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9220
9221         * valops.c (read_value_memory): Change embedded_offset to
9222         represent a bit offset instead of a byte offset.
9223         * value.h (read_value_memory): Adjust comment.
9224
9225 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9226
9227         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9228         dest_offset_bits and source_offset_bits.
9229         (write_pieced_value): Likewise.
9230
9231 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9232
9233         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9234         given by DW_OP_bit_piece.
9235         (write_pieced_value): Likewise.
9236
9237 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9238
9239         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9240         some other preparations to the places where sufficient information
9241         is available.
9242         (write_pieced_value): Likewise.
9243
9244 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9245
9246         * dwarf2loc.c (bits_to_bytes): New function.
9247         (read_pieced_value): Fix offset calculations for register pieces
9248         on big-endian targets.
9249         (write_pieced_value): Likewise.
9250
9251 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9252
9253         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9254         (write_pieced_value): Likewise.
9255
9256 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9257
9258         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9259         transfer the source value's least significant bits, instead of its
9260         lowest-addressed ones.  Rename type_len to max_offset.
9261         (read_pieced_value): Mirror above changes to write_pieced_value as
9262         applicable.
9263
9264 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9267         truncate full bytes from dest_offset_bits before using it as an
9268         offset into the buffer.
9269
9270 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9271
9272         * dwarf2loc.c (write_pieced_value): Include transfer size in
9273         byte-wise check.
9274
9275 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9276
9277         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9278         calculation of this_size.
9279
9280 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9281
9282         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9283         when targeting a bit-field.
9284         (write_pieced_value): Likewise.
9285
9286 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9287
9288         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9289         (allocate_piece_closure): Drop addr_size parameter.
9290         (dwarf2_evaluate_loc_desc_full): Adjust call to
9291         allocate_piece_closure.
9292
9293 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9294
9295         PR gdb/21226
9296         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9297         the LSB end, independent of endianness.
9298
9299 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9300
9301         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9302         size capping.
9303
9304 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9305
9306         * mips-linux-nat.c: Move include features/mips*-linux.c to
9307         mips-linux-tdep.c.
9308         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9309         to mips-linux-tdep.c.
9310         * mips-linux-tdep.c: Include features/mips*-linux.c
9311         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9312         functions.
9313         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9314         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9315         (tdesc_mips64_dsp_linux): Declare.
9316
9317 2017-06-12  Tom Tromey  <tom@tromey.com>
9318
9319         * valprint.h (val_print_type_code_int): Remove.
9320         * valprint.c (generic_val_print_int): Always call
9321         val_print_scalar_formatted.
9322         (val_print_type_code_int): Remove.
9323         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9324         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9325         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9326         * ada-valprint.c (ada_val_print_num): Use
9327         val_print_scalar_formatted.
9328
9329 2017-06-12  Tom Tromey  <tom@tromey.com>
9330
9331         * printcmd.c (print_scalar_formatted): Unify the two switches.
9332         Don't convert scalars to LONGEST.
9333
9334 2017-06-12  Tom Tromey  <tom@tromey.com>
9335
9336         PR exp/16225:
9337         * valprint.h (print_decimal_chars): Update.
9338         * valprint.c (maybe_negate_by_bytes): New function.
9339         (print_decimal_chars): Add "is_signed" argument.
9340         * printcmd.c (print_scalar_formatted): Update.
9341
9342 2017-06-12  Tom Tromey  <tom@tromey.com>
9343
9344         PR exp/16225:
9345         * valprint.h (print_binary_chars, print_hex_chars): Update.
9346         * valprint.c (val_print_type_code_int): Update.
9347         (print_binary_chars): Add "zero_pad" argument.
9348         (emit_octal_digit): New function.
9349         (print_octal_chars): Don't zero-pad.
9350         (print_decimal_chars): Likewise.
9351         (print_hex_chars): Add "zero_pad" argument.
9352         * sh64-tdep.c (sh64_do_fp_register): Update.
9353         * regcache.c (regcache::dump): Update.
9354         * printcmd.c (print_scalar_formatted): Update.
9355         * infcmd.c (default_print_one_register_info): Update.
9356
9357 2017-06-12  Pedro Alves  <palves@redhat.com>
9358             Alan Hayward  <alan.hayward@arm.com>
9359
9360         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9361         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9362         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9363         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9364         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9365
9366 2017-06-12  Pedro Alves  <palves@redhat.com>
9367
9368         * dwarf2read.c (mapped_symtab::data): Now a vector of
9369         symtab_index_entry instead of vector of
9370         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9371         whether an element's name is NULL instead of checking whether the
9372         element itself is NULL.
9373         (find_slot): Change return type.  Adjust.
9374         (hash_expand, , add_index_entry, uniquify_cu_indices)
9375         (write_hash_table): Adjust.
9376
9377 2017-06-12  Pedro Alves  <palves@redhat.com>
9378
9379         * dwarf2read.c (recursively_count_psymbols): New function.
9380         (write_psymtabs_to_index): Call it to compute number of psyms and
9381         pass estimate size of psyms_seen to unordered_set's ctor.
9382
9383 2017-06-12  Pedro Alves  <palves@redhat.com>
9384
9385         * dwarf2read.c (write_hash_table): Check if key already exists
9386         before emplacing.
9387
9388 2017-06-12  Pedro Alves  <palves@redhat.com>
9389
9390         * dwarf2read.c (data_buf::append_space): Rename to...
9391         (data_buf::grow): ... this, and make private.  Adjust all callers.
9392         (data_buf::append_uint): New method.
9393         (add_address_entry, write_one_signatured_type)
9394         (write_psymtabs_to_index): Use it.
9395
9396 2017-06-12  Pedro Alves  <palves@redhat.com>
9397
9398         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9399         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9400         (data_buf::file_write): Call ::fwrite directly.
9401
9402 2017-06-12  Pedro Alves  <palves@redhat.com>
9403
9404         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9405         std::vector::erase.
9406
9407 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9408
9409         Code cleanup: C++ify .gdb_index producer.
9410         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9411         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9412         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9413         (create_strtab, add_string): Remove.
9414         (file_write, data_buf): New.
9415         (struct symtab_index_entry): Use std::vector for cu_indices.
9416         (struct mapped_symtab): Use std::vector for data.
9417         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9418         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9419         Remove.
9420         (find_slot): Change return type.  Update it to the new data structures.
9421         (hash_expand, add_index_entry): Update it to the new data structures.
9422         (offset_type_compare): Remove.
9423         (uniquify_cu_indices): Update it to the new data structures.
9424         (c_str_view, c_str_view_hasher, vector_hasher): New.
9425         (add_indices_to_cpool): Remove.
9426         (write_hash_table): Update it to the new data structures.
9427         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9428         (eq_psymtab_cu_index): Remove.
9429         (psym_index_map): New typedef.
9430         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9431         reference and std::unordered_map for cu_index_htab.
9432         (add_address_entry, add_address_entry_worker, write_address_map)
9433         (write_psymbols): Update it to the new data structures.
9434         (write_obstack): Remove.
9435         (struct signatured_type_index_data): Change types_list to a data_buf
9436         reference and psyms_seen to a std::unordered_set reference.
9437         (write_one_signatured_type, recursively_write_psymbols)
9438         (write_psymtabs_to_index): Update it to the new data structures.
9439
9440 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9441
9442         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9443         separate-debug-file commands.
9444         * symfile.h (separate_debug_file_debug): New global.
9445         * symfile.c (separate_debug_file_debug): New global.
9446         (separate_debug_file_exists, find_separate_debug_file): Add
9447         debug output.
9448         (_initialize_symfile): Add "set debug separate-debug-file"
9449         command.
9450         * build-id.c (build_id_to_debug_bfd,
9451         find_separate_debug_file_by_buildid): Add debug output.
9452
9453 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9454
9455         * gdbarch.sh (displaced_step_free_closure): Remove.
9456         * gdbarch.h, gdbarch.c: Re-generate.
9457         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9458         displaced_step_free_closure.
9459         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9460         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9461         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9462         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9463         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9464         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9465         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9466         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9467         * infrun.c (displaced_step_clear): Call xfree instead of
9468         gdbarch_displaced_step_free_closure.
9469
9470 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9471
9472         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9473         NULL".
9474
9475 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9476
9477         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9478         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9479         (mn10300_push_dummy_call): Likewise.
9480
9481 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9482
9483         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9484
9485 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9486
9487         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9488
9489 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9490
9491         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9492         able to start inferiors using a shell.
9493         (New remote packets): Announce new packet "QStartupWithShell".
9494         * remote.c: Add PACKET_QStartupWithShell.
9495         (extended_remote_create_inferior): Handle new
9496         PACKET_QStartupWithShell.
9497         (remote_protocol_features) <QStartupWithShell>: New entry for
9498         PACKET_QStartupWithShell.
9499         (_initialize_remote): Call "add_packet_config_cmd" for
9500         QStartupShell.
9501
9502 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9503             Pedro Alves  <palves@redhat.com>
9504
9505         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9506         and "nat/fork-inferior.h".
9507         * common/common-inferior.h: New file, with contents from
9508         "gdb/inferior.h".
9509         * commom/common-utils.c: Include "common-utils.h".
9510         (stringify_argv): New function.
9511         * common/common-utils.h (stringify_argv): New prototype.
9512         * configure.nat: Add "fork-inferior.o" as a dependency for
9513         "*linux*", "fbsd*" and "nbsd*" hosts.
9514         * corefile.c (get_exec_file): Update comment.
9515         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9516         instead of "startup_inferior".
9517         (darwin_create_inferior): Call "add_thread_silent" after
9518         "fork_inferior".
9519         * fork-child.c: Cleanup unnecessary includes.
9520         (SHELL_FILE): Move to "common/common-fork-child.c".
9521         (environ): Likewise.
9522         (exec_wrapper): Initialize.
9523         (get_exec_wrapper): New function.
9524         (breakup_args): Move to "common/common-fork-child.c"; rename to
9525         "breakup_args_for_exec".
9526         (escape_bang_in_quoted_argument): Move to
9527         "common/common-fork-child.c".
9528         (saved_ui): New variable.
9529         (prefork_hook): New function.
9530         (postfork_hook): Likewise.
9531         (postfork_child_hook): Likewise.
9532         (gdb_startup_inferior): Likewise.
9533         (fork_inferior): Move to "common/common-fork-child.c".  Update
9534         function to support gdbserver.
9535         (startup_inferior): Likewise.
9536         * gdbcore.h (get_exec_file): Remove declaration.
9537         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9538         instead of "startup_inferior".  Call "add_thread_silent" after
9539         "fork_inferior".
9540         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9541         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9542         instead of "startup_inferior".  Call "add_thread_silent" after
9543         "fork_inferior".
9544         * inferior.h: Include "common-inferior.h".
9545         (trace_start_error): Move to "common/common-utils.h".
9546         (trace_start_error_with_name): Likewise.
9547         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9548         (startup_inferior): Likewise.
9549         (gdb_startup_inferior): New prototype.
9550         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9551         * nat/fork-inferior.h: New file.
9552         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9553         instead of "startup_inferior".  Call "add_thread_silent" after
9554         "fork_inferior".
9555         * target.h (target_terminal_init): Move prototype to
9556         "target/target.h".
9557         (target_terminal_inferior): Likewise.
9558         (target_terminal_ours): Likewise.
9559         * target/target.h (target_terminal_init): New prototype, moved
9560         from "target.h".
9561         (target_terminal_inferior): Likewise.
9562         (target_terminal_ours): Likewise.
9563         * utils.c (gdb_flush_out_err): New function.
9564
9565 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9566
9567         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9568         * common/common-gdbthread.h: New file, with parts from
9569         "gdb/gdbthread.h".
9570         * gdbthread.h: Include "common-gdbthread.h".
9571         (switch_to_thread): Moved to "common/common-gdbthread.h".
9572
9573 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9574
9575         * Makefile.in (SFILES): Add "common/job-control.c".
9576         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9577         (COMMON_OBS): Add "job-control.o".
9578         * common/job-control.c: New file, with contents from
9579         "gdb/inflow.c".
9580         * common/job-control.h: New file, with contents from "terminal.h".
9581         * fork-child.c: Include "job-control.h".
9582         * inflow.c: Include "job-control.h".
9583         (gdb_setpgid): Move to "common/common-inflow.c".
9584         (_initialize_inflow): Move setting of "job_control" to
9585         "handle_job_control".
9586         * terminal.h (job_control): Moved to "common/common-terminal.h".
9587         (gdb_setpgid): Likewise.
9588         * top.c: Include "job_control.h".
9589         * utils.c: Likewise.
9590         (job_control): Moved to "job-control.c".
9591
9592 2017-06-07  Pedro Alves  <palves@redhat.com>
9593
9594         * Makefile.in (SFILES): Add gdb_regex.c.
9595         (COMMON_OBS): Add gdb_regex.o.
9596         * ada-lang.c (ada_add_standard_exceptions)
9597         (ada_add_exceptions_from_frame, name_matches_regex)
9598         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9599         parameter type to compiled_regex.  Adjust.
9600         (ada_exceptions_list): Use compiled_regex.
9601         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9602         std::unique_ptr<compiled_regex>.
9603         (exception_catchpoint::~exception_catchpoint): Remove regfree
9604         call.
9605         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9606         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9607         * breakpoint.c (solib_catchpoint::compiled): Now a
9608         std::unique_ptr<compiled_regex>.
9609         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9610         (check_status_catch_solib): Adjust to use compiled_regex.
9611         (add_solib_catchpoint): Adjust to use compiled_regex.
9612         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9613         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9614         compiled_regex reference.  Adjust to use it.
9615         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9616         declaration.  Include "gdb_regex.h".
9617         (apropos_cmd): Change regex parameter to compiled_regex reference.
9618         * gdb_regex.c: New file.
9619         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9620         declarations.
9621         (class compiled_regex): New.
9622         * linux-tdep.c: Include "common/gdb_optional.h".
9623         (struct mapping_regexes): New, factored out from
9624         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9625         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9626         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9627         * probe.c: Include "common/gdb_optional.h".
9628         (collect_probes): Use compiled_regex and gdb::optional and remove
9629         cleanups.
9630         * skip.c: Include "common/gdb_optional.h".
9631         (skiplist_entry::compiled_function_regexp): Now a
9632         gdb::optional<compiled_regex>.
9633         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9634         (free_skiplist_entry): Remove regfree call.
9635         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9636         compiled_regex and gdb::optional.
9637         * symtab.c: Include "common/gdb_optional.h".
9638         (search_symbols): Use compiled_regex and gdb::optional.
9639         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9640         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9641         to gdb_regex.c.
9642
9643 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9644
9645         * regcache.c (regcache::save): Avoid buffer use.
9646         (regcache::dump): Likewise.
9647
9648 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9649
9650         * sh-tdep.c (sh_pseudo_register_read): Remove
9651         MAX_REGISTER_SIZE.
9652         (sh_pseudo_register_write): Likewise.
9653         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9654         (sh64_pseudo_register_write): Likewise
9655
9656 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9657
9658         * aarch64-tdep.c (aarch64_store_return_value): Use
9659         V_REGISTER_SIZE.
9660         (aarch64_pseudo_read_value): Likewise.
9661         (aarch64_pseudo_write): Likewise.
9662
9663 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9664
9665         * regformats/regdef.h (set_register_cache): Remove the
9666         declaration.
9667
9668 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9669
9670         * frame.c (frame_unwind_register_signed): Use
9671         frame_unwind_register_value.
9672
9673 2017-06-06  Pedro Alves  <palves@redhat.com>
9674
9675         PR breakpoints/21553
9676         * breakpoint.c (create_breakpoints_sal_default)
9677         (init_breakpoint_sal, create_breakpoint_sal): Use
9678         gdb::unique_xmalloc_ptr for string parameters.
9679         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9680         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9681         (base_breakpoint_create_breakpoints_sal)
9682         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9683         (strace_marker_create_breakpoints_sal)
9684         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9685         string parameters.
9686         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9687         gdb::unique_xmalloc_ptr for string parameters.
9688         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9689         parameters.
9690
9691 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9692
9693         * alpha-tdep.c (alpha_register_to_value): Use
9694         get_frame_register_value.
9695         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9696
9697 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9698
9699         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9700         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9701         (ia64_value_to_register): Likewise.
9702         (ia64_extract_return_value): Likewise.
9703         (ia64_store_return_value): Likewise.
9704         (ia64_push_dummy_call): Likewise.
9705
9706 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9707
9708         GDB 8.0 released.
9709
9710 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9711
9712         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9713
9714 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9715
9716         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9717         parameter.
9718         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9719
9720 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9721
9722         * event-loop.c (poll_timers): Unallocate timer using delete
9723         instead of xfree.
9724
9725 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9726
9727         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9728         (struct breakpoint) <~breakpoint>: New.
9729         (struct watchpoint): Inherit from breakpoint.
9730         <~watchpoint>: New.
9731         <base>: Remove.
9732         (struct tracepoint): Inherit from breakpoint.
9733         <base>: Remove.
9734         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9735         (struct longjmp_breakpoint): Inherit from breakpoint.
9736         <~longjmp_breakpoint>: New.
9737         <base>: Remove.
9738         (new_breakpoint_from_type): Remove casts.
9739         (watchpoint_in_thread_scope): Remove reference to base field.
9740         (watchpoint_del_at_next_stop): Likewise.
9741         (update_watchpoint): Likewise.
9742         (watchpoint_check): Likewise.
9743         (bpstat_check_watchpoint): Likewise.
9744         (set_longjmp_breakpoint): Likewise.
9745         (struct fork_catchpoint): Inherit from breakpoint.
9746         <base>: Remove.
9747         (struct solib_catchpoint): Inherit from breakpoint.
9748         <~solib_catchpoint>: New.
9749         <base>: Remove.
9750         (dtor_catch_solib): Change to ...
9751         (solib_catchpoint::~solib_catchpoint): ... this.
9752         (breakpoint_hit_catch_solib): Remove reference to base field.
9753         (add_solib_catchpoint): Likewise.
9754         (create_fork_vfork_event_catchpoint): Likewise.
9755         (struct exec_catchpoint): Inherit from breakpoint.
9756         <~exec_catchpoint>: New.
9757         <base>: Remove.
9758         (dtor_catch_exec): Change to ...
9759         (exec_catchpoint::~exec_catchpoint): ... this.
9760         (dtor_watchpoint): Change to ...
9761         (watchpoint::~watchpoint): ... this.
9762         (watch_command_1): Remove reference to base field.
9763         (catch_exec_command_1): Likewise.
9764         (base_breakpoint_dtor): Change to ...
9765         (breakpoint::~breakpoint): ... this.
9766         (base_breakpoint_ops): Remove dtor field value.
9767         (longjmp_bkpt_dtor): Change to ...
9768         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9769         (strace_marker_create_breakpoints_sal): Remove reference to base
9770         field.
9771         (delete_breakpoint): Don't manually call breakpoint destructor.
9772         (create_tracepoint_from_upload): Remove reference to base field.
9773         (trace_pass_set_count): Likewise.
9774         (initialize_breakpoint_ops): Don't initialize
9775         momentary_breakpoint_ops, don't set dtors.
9776         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9777         <~ada_catchpoint>: New.
9778         <base>: Remove.
9779         (create_excep_cond_exprs): Remove reference to base field.
9780         (dtor_exception): Change to ...
9781         (ada_catchpoint::~ada_catchpoint): ... this.
9782         (dtor_catch_exception): Remove.
9783         (dtor_catch_exception_unhandled): Remove.
9784         (dtor_catch_assert): Remove.
9785         (create_ada_exception_catchpoint): Remove reference to base
9786         field.
9787         (initialize_ada_catchpoint_ops): Don't set dtors.
9788         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9789         breakpoint.
9790         <~signal_catchpoint>: New.
9791         <base>: Remove.
9792         (signal_catchpoint_dtor): Change to ...
9793         (signal_catchpoint::~signal_catchpoint): ... this.
9794         (create_signal_catchpoint): Remove reference to base field.
9795         (initialize_signal_catchpoint_ops): Don't set dtor.
9796         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9797         from breakpoint.
9798         <~syscall_catchpoint>: New.
9799         <base>: Remove.
9800         (dtor_catch_syscall): Change to ...
9801         (syscall_catchpoint::~syscall_catchpoint): ... this.
9802         (create_syscall_event_catchpoint): Remove reference to base
9803         field.
9804         (initialize_syscall_catchpoint_ops): Don't set dtor.
9805         * break-catch-throw.c (struct exception_catchpoint): Inherit
9806         from breakpoint.
9807         <~exception_catchpoint>: New.
9808         <base>: Remove.
9809         (dtor_exception_catchpoint): Change to ...
9810         (exception_catchpoint::~exception_catchpoint): ... this.
9811         (handle_gnu_v3_exceptions): Remove reference to base field.
9812         (initialize_throw_catchpoint_ops): Don't set dtor.
9813         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9814         field.
9815         * remote.c (remote_get_tracepoint_status): Likewise.
9816         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9817         * tracefile.c (tracefile_fetch_registers): Likewise.
9818         * tracepoint.c (actions_command): Likewise.
9819         (validate_actionline): Likewise.
9820         (tfind_1): Likewise.
9821         (get_traceframe_location): Likewise.
9822         (find_matching_tracepoint_location): Likewise.
9823         (parse_tracepoint_status): Likewise.
9824         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9825
9826 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9827
9828         * breakpoint.c (struct longjmp_breakpoint): New struct.
9829         (is_tracepoint_type): Change return type to bool.
9830         (is_longjmp_type): New function.
9831         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9832         (set_raw_breakpoint_without_location): Use
9833         new_breakpoint_from_type.
9834         (set_raw_breakpoint): Likewise.
9835
9836 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9837
9838         * breakpoint.c (new_breakpoint_from_type): New function.
9839         (create_breakpoint_sal): Use new_breakpoint_from_type and
9840         unique_ptr.
9841         (create_breakpoint): Likewise.
9842
9843 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9844
9845         * memattr.c (mem_info_command): Rename to ...
9846         (info_mem_command): ... this.
9847         (mem_enable_command): Rename to ...
9848         (enable_mem_command): ... this.
9849         (mem_disable_command): Rename to ...
9850         (disable_mem_command): ... this.
9851         (mem_delete_command): Rename to ...
9852         (delete_mem_command): ... this.
9853         (_initialize_mem): Adjust function names.
9854
9855 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9856
9857         * btrace.c (handle_pt_insn_events): New.
9858         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9859         STATUS.  Split into this and ...
9860         (handle_pt_insn_event_flags): ... this.
9861
9862 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9863
9864         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9865         and struct pt_insn.resynced.
9866         * configure: Regenerated.
9867         * config.in: Regenerated.
9868
9869 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9870
9871         * btrace.c (ftrace_find_call_by_number): New function.
9872         (ftrace_new_function): Store objects, not pointers.
9873         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9874         ftrace_new_gap, ftrace_update_function,
9875         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9876         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9877         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9878         btrace_ends_with_single_insn, btrace_call_get): Account for
9879         btrace_thread_info::functions now storing objects.
9880         * btrace.h (struct btrace_thread_info): Add constructor.
9881         (struct btrace_thread_info) <functions>: Make std::vector.
9882         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9883         Initialize with default values.
9884         * record-btrace.c (record_btrace_frame_sniffer): Account for
9885         btrace_thread_info::functions now storing objects.
9886
9887 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9888
9889         * btrace.c: Remove typedef bfun_s.
9890         (ftrace_new_gap): Directly add gaps to the list of gaps.
9891         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9892         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9893         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9894         instead of gdb VEC.
9895
9896 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9897
9898         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9899         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9900         with btrace_thread_info::next_segment and
9901         btrace_thread_info::prev_segment.
9902         * btrace.h: Remove struct btrace_func_link.
9903         (struct btrace_function): Replace pair of function segment pointers
9904         with pair of indices.
9905         * python/py-record-btrace.c (btpy_call_prev_sibling,
9906         btpy_call_next_sibling): Replace references to
9907         btrace_thread_info::segment with btrace_thread_info::next_segment and
9908         btrace_thread_info::prev_segment.
9909         * record-btrace.c (record_btrace_frame_this_id): Use
9910         btrace_find_call_by_number.
9911
9912 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9913
9914         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9915         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9916         btrace_insn_next, btrace_insn_prev): Remove references to
9917         btrace_thread_info::flow.
9918         * btrace.h (struct btrace_function): Remove FLOW.
9919
9920 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9921
9922         * btrace.c (ftrace_find_call_by_number): New function.
9923         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9924         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9925         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9926         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9927         index.
9928         * btrace.h (struct btrace_function): Turn UP into an index.
9929         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9930         as an index.
9931         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9932         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9933         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9934
9935 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9936
9937         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9938         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9939         ftrace_update_function, ftrace_compute_global_level_offset,
9940         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9941         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9942         btrace_insn_end, btrace_is_empty): Remove references to
9943         btrace_thread_info::begin and btrace_thread_info::end.
9944         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9945         (struct btrace_thread_info) <functions>: Adjust comment.
9946         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9947         btrace_thread_info::begin.
9948
9949 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9950
9951         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9952         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9953         ftrace_update_function): Remove arguments that implicitly were always
9954         BTINFO->END.
9955         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9956         Don't pass BTINFO->END.
9957
9958 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9959
9960         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9961         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9962         btrace_find_insn_by_number): Replace function segment pointer with
9963         index.
9964         (btrace_insn_cmp): Simplify.
9965         * btrace.h: (struct btrace_insn_iterator) Rename index to
9966         insn_index.  Replace function segment pointer with index into function
9967         segment vector.
9968         * record-btrace.c (record_btrace_call_history): Replace function
9969         segment pointer use with index.
9970         (record_btrace_frame_sniffer): Retrieve function call segment through
9971         vector.
9972         (record_btrace_set_replay): Remove defunc't safety check.
9973
9974 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9975
9976         * btrace.c (btrace_ends_with_single_insn): New function.
9977         (btrace_call_get, btrace_call_number, btrace_call_begin,
9978         btrace_call_end, btrace_call_next, btrace_call_prev,
9979         btrace_find_call_by_number): Use index into call segment vector
9980         instead of pointer.
9981         (btrace_call_cmp): Simplify.
9982         * btrace.h (struct btrace_call_iterator): Replace function call segment
9983         pointer with index into vector.
9984         * record-btrace.c (record_btrace_call_history): Use index instead of
9985         pointer.
9986
9987 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9988
9989         * btrace.c (btrace_insn_begin, btrace_insn_end,
9990         btrace_find_insn_by_number): Add btinfo to iterator.
9991         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9992
9993 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9994
9995         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9996         and save pointers directly.
9997         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9998         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9999         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10000         changed signature of functions.
10001         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10002         (btrace_fetch): Remove code that adds btrace_function pointers to
10003         vector of btrace_functions.
10004         (btrace_clear): Simplify freeing vector of btrace_functions.
10005
10006 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10007
10008         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10009         Replace VEC_* with std::vector functions.
10010         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10011         (struct btrace_thread_info)<functions>: Change type to std::vector.
10012
10013 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10014
10015         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10016         "Removed targets and native configurations" up.  Merge duplicate
10017         "New commands" sub-sections.  Add "New options" sub-sections.
10018
10019 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10020
10021         * defs.h (copy_integer_to_size): New declaration.
10022         * findvar.c (copy_integer_to_size): New function.
10023         (do_cint_test): New selftest function.
10024         (copy_integer_to_size_test): Likewise.
10025         (_initialize_findvar): Likewise.
10026         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10027         (mips_fbsd_collect_reg): Use raw_collect_integer.
10028         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10029         (mips64_fill_gregset): Use raw_collect_integer
10030         (mips64_fill_fpregset): Use raw_supply_integer.
10031         * regcache.c (regcache::raw_supply_integer): New function.
10032         (regcache::raw_collect_integer): Likewise.
10033         * regcache.h: (regcache::raw_supply_integer): New declaration.
10034         (regcache::raw_collect_integer): Likewise.
10035
10036 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10037
10038         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10039         (COMMON_OBS): Add gdbarch-selftests.o.
10040         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10041         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10042         * gdbarch-selftests.c: New file.
10043         * regcache.h (regcache) <~regcache>: Mark it virtual if
10044         GDB_SELF_TEST.
10045         <raw_write>: Likewise.
10046
10047 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10048
10049         * regcache.c (current_regcache): Change it to
10050         regcache::current_regcache.
10051         (regcache_observer_target_changed): Update.
10052         (regcache_thread_ptid_changed): Make it a regcache static
10053         method.
10054         (regcache_thread_ptid_changed): Update.
10055         (class regcache_access): New.
10056         (current_regcache_test): Update.
10057         (_initialize_regcache): Update.
10058         * regcache.h: Include forward_list.
10059         (regcache): Declare regcache_thread_ptid_changed and declare
10060         registers_changed_ptid as friend.
10061
10062 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10063
10064         * i387-tdep.c (i387_register_to_value): Use register_size
10065         instead of TYPE_LENGTH.
10066         * m68k-tdep.c (m68k_register_to_value): Likewise.
10067
10068 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10069
10070         * i387-tdep.c (i387_convert_register_p): Return false if type
10071         code isn't TYPE_CODE_FLT.
10072
10073 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10074
10075         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10076         length is 4.
10077         (alpha_register_to_value): Remove type length check.
10078         (alpha_value_to_register): Likewise.
10079
10080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10081
10082         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10083         TYPE_CODE_FLT.
10084
10085 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10086
10087         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10088         TYPE_CODE_FLT or not.
10089
10090 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10091
10092         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10093         * avr-tdep.c (avr_gdbarch_init): Likewise.
10094         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10095         * cris-tdep.c (cris_gdbarch_init): Likewise.
10096         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10097         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10098         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10099         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10100         * mep-tdep.c (mep_gdbarch_init): Likewise.
10101         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10102         * mips-tdep.c (mips_gdbarch_init): Likewise.
10103         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10104         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10105         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10106         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10107         * v850-tdep.c (v850_gdbarch_init): Likewise.
10108
10109 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10110
10111         * selftest-arch.c (tests_with_arch): Call registers_changed
10112         and reinit_frame_cache.
10113         * selftest.c (run_self_tests): Likewise.
10114
10115 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10116
10117         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10118         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10119
10120 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10121
10122         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10123         set_gdbarch_print_insn.
10124
10125 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10126
10127         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10128         set_gdbarch_print_insn.
10129
10130 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10131
10132         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10133         set_gdbarch_print_insn.
10134         * arc-tdep.c (arc_gdbarch_init): Likewise.
10135         * arch-utils.c: include dis-asm.h.
10136         (default_print_insn): New function.
10137         * arch-utils.h (default_print_insn): Declare.
10138         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10139         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10140         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10141         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10142         * frv-tdep.c (frv_gdbarch_init): Likewise.
10143         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10144         * gdbarch.sh (print_insn): Use default_print_insn.
10145         * gdbarch.c: Regenerated.
10146         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10147         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10148         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10149         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10150         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10151         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10152         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10153         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10154         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10155         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10156         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10157         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10158         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10159         * mt-tdep.c (mt_gdbarch_init): Likewise.
10160         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10161         * nios2-tdep.c (nios2_print_insn): Remove.
10162         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10163         * rx-tdep.c (rx_gdbarch_init): Likewise.
10164         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10165         * score-tdep.c (score_print_insn): Remove.
10166         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10167         * sh-tdep.c (sh_gdbarch_init): Likewise.
10168         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10169         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10170         * tic6x-tdep.c (tic6x_print_insn): Remove.
10171         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10172         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10173         * v850-tdep.c (v850_gdbarch_init): Likewise.
10174         * vax-tdep.c (vax_gdbarch_init): Likewise.
10175         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10176         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10177
10178 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10179
10180         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10181         (MIPS_FP0_REGNUM): Remove.
10182         (MIPS_FSR_REGNUM): Remove.
10183         (mips_fbsd_supply_fpregs): Use mips_regnum.
10184         (mips_fbsd_supply_gregs): Likewise.
10185         (mips_fbsd_collect_fpregs): Likewise.
10186         (mips_fbsd_collect_gregs): Likewise.
10187
10188 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10189
10190         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10191         (getpfpregs_supplies): New function.
10192         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10193         getfpregs_supplies.
10194         (mips_fbsd_store_inferior_registers): Likewise.
10195
10196 2017-05-22  Pedro Alves <palves@redhat.com>
10197
10198         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10199         maintainer.
10200
10201 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10202
10203         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10204         (store_register): Likewise.
10205         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10206         (get_decimal_float_return_value): Likewise.
10207         (do_ppc_sysv_return_value): Likewise.
10208         (ppc64_sysv_abi_push_integer): Likewise.
10209         (ppc64_sysv_abi_push_freg): Likewise.
10210         (ppc64_sysv_abi_return_value_base): Likewise.
10211         (ppc64_sysv_abi_return_value): Likewise.
10212         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10213         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10214         * rs6000-nat.c: Likewise.
10215         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10216         (rs6000_value_to_register): Likewise.
10217         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10218
10219 2017-05-21  Tom Tromey  <tom@tromey.com>
10220
10221         PR rust/21466:
10222         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10223         arrays as "[T]", not "[T; ]".
10224
10225 2017-05-19  Tom Tromey  <tom@tromey.com>
10226
10227         PR rust/21484:
10228         * rust-lang.c (exp_descriptor_rust): New function.
10229         (rust_language_defn): Use it.
10230         * p-lang.c (pascal_language_defn): Update.
10231         * opencl-lang.c (opencl_language_defn): Update.
10232         * objc-lang.c (objc_language_defn): Update.
10233         * m2-lang.c (m2_language_defn): Update.
10234         * language.h (struct language_defn)
10235         <la_watch_location_expression>: New member.
10236         * language.c (unknown_language_defn, auto_language_defn)
10237         (local_language_defn): Update.
10238         * go-lang.c (go_language_defn): Update.
10239         * f-lang.c (f_language_defn): Update.
10240         * d-lang.c (d_language_defn): Update.
10241         * c-lang.h (c_watch_location_expression): Declare.
10242         * c-lang.c (c_watch_location_expression): New function.
10243         (c_language_defn, cplus_language_defn, asm_language_defn)
10244         (minimal_language_defn): Use it.
10245         * breakpoint.c (watch_command_1): Call
10246         la_watch_location_expression.
10247         * ada-lang.c (ada_language_defn): Update.
10248
10249 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10250
10251         PR tui/21482
10252         * gdb_curses.h (NOMACROS): Define.
10253         (NCURSES_NOMACROS): Define.
10254
10255 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10256
10257         PR tui/21482
10258         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10259         arg to char *.
10260         * tui/tui-wingeneral.c (box_win): Likewise.
10261         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10262         (tui_show_source_line): Likewise.
10263         (tui_show_exec_info_content): Likewise.
10264
10265 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10266
10267         * sparc-tdep.c (sparc_structure_return_p)
10268         (sparc_arg_on_registers_p): New functions.
10269         (sparc32_store_arguments): Use them.
10270         * sparc64-tdep.c (sparc64_16_byte_align_p)
10271         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10272         Handle TYPE_CODE_ARRAY.
10273
10274 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10275
10276         * cli/cli-decode.c (add_alias_cmd): New function.
10277         * command.h (add_alias_cmd): Declare.
10278         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10279         instead call add_alias_cmd.
10280
10281 2017-05-17  Pedro Alves  <palves@redhat.com>
10282
10283         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10284         (nat_makefile_frag): ... this.  All references updated.
10285         * configure.ac: Likewise.
10286         * configure.nat: Likewise.  Enhance comments.
10287         * configure: Regenerate.
10288
10289 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10290
10291         * procfs.c (procfs_create_inferior): Change prototype to match
10292         definition.
10293
10294 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10295
10296         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10297         C++ compiler warning.
10298
10299 2017-05-12  Tom Tromey  <tom@tromey.com>
10300
10301         PR rust/21483:
10302         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10303         recurse, just call value_struct_elt directly.
10304
10305 2017-05-12  Tom Tromey  <tom@tromey.com>
10306
10307         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10308         OP_RUST_ARRAY>: Fix.
10309
10310 2017-05-12  Tom Tromey  <tom@tromey.com>
10311
10312         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10313
10314 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10315
10316         * regcache.c: Include <forward_list>.
10317         (struct regcache_list): Remove.
10318         (current_regcache): Update.
10319         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10320         (regcache_thread_ptid_changed): Likewise.
10321         (registers_changed_ptid): Likewise.
10322         (current_regcache_size): Likewise.
10323
10324 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10325
10326         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10327         (current_regcache_size): New function.
10328         (current_regcache_test): New function.
10329         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10330
10331 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10332
10333         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10334         (print_gp_register_row): Use get_frame_register_value.
10335
10336 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10337
10338         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10339         (mips_supply_fpregset): Likewise.
10340         (mips64_supply_gregset): Likewise.
10341
10342 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10343
10344         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10345         regcache->raw_supply_zeroed.
10346
10347 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10348
10349         * configure.nat: Rearrange 'case' statements to match
10350         host before cpu.
10351
10352 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10353
10354         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10355         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10356         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10357         "@nat_extra_makefile_frag@".
10358         (Makefile): Remove dependency on "@frags@".
10359         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10360         (data-directory/Makefile): Likewise.
10361         * config/aarch64/linux.mh: Deleted; moved contents to
10362         "gdb/configure.nat".
10363         * config/alpha/alpha-linux.mh: Likewise.
10364         * config/alpha/nbsd.mh: Likewise.
10365         * config/arm/linux.mh: Likewise.
10366         * config/arm/nbsdelf.mh: Likewise.
10367         * config/i386/cygwin.mh: Likewise.
10368         * config/i386/cygwin64.mh: Likewise.
10369         * config/i386/darwin.mh: Likewise.
10370         * config/i386/fbsd.mh: Likewise.
10371         * config/i386/fbsd64.mh: Likewise.
10372         * config/i386/go32.mh: Likewise.
10373         * config/i386/i386gnu.mh: Likewise.
10374         * config/i386/i386sol2.mh: Likewise.
10375         * config/i386/linux.mh: Likewise.
10376         * config/i386/linux64.mh: Likewise.
10377         * config/i386/mingw.mh: Likewise.
10378         * config/i386/mingw64.mh: Likewise.
10379         * config/i386/nbsd64.mh: Likewise.
10380         * config/i386/nbsdelf.mh: Likewise.
10381         * config/i386/nto.mh: Likewise.
10382         * config/i386/obsd.mh: Likewise.
10383         * config/i386/obsd64.mh: Likewise.
10384         * config/i386/sol2-64.mh: Likewise.
10385         * config/ia64/linux.mh: Likewise.
10386         * config/m32r/linux.mh: Likewise.
10387         * config/m68k/linux.mh: Likewise.
10388         * config/m68k/nbsdelf.mh: Likewise.
10389         * config/m68k/obsd.mh: Likewise.
10390         * config/m88k/obsd.mh: Likewise.
10391         * config/mips/fbsd.mh: Likewise.
10392         * config/mips/linux.mh: Likewise.
10393         * config/mips/nbsd.mh: Likewise.
10394         * config/mips/obsd64.mh: Likewise.
10395         * config/pa/linux.mh: Likewise.
10396         * config/pa/nbsd.mh: Likewise.
10397         * config/pa/obsd.mh: Likewise.
10398         * config/powerpc/aix.mh: Likewise.
10399         * config/powerpc/fbsd.mh: Likewise.
10400         * config/powerpc/linux.mh: Likewise.
10401         * config/powerpc/nbsd.mh: Likewise.
10402         * config/powerpc/obsd.mh: Likewise.
10403         * config/powerpc/ppc64-linux.mh: Likewise.
10404         * config/powerpc/spu-linux.mh: Likewise.
10405         * config/s390/linux.mh: Likewise.
10406         * config/sh/nbsd.mh: Likewise.
10407         * config/sparc/fbsd.mh: Likewise.
10408         * config/sparc/linux.mh: Likewise.
10409         * config/sparc/linux64.mh: Likewise.
10410         * config/sparc/nbsd64.mh: Likewise.
10411         * config/sparc/nbsdelf.mh: Likewise.
10412         * config/sparc/obsd64.mh: Likewise.
10413         * config/sparc/sol2.mh: Likewise.
10414         * config/tilegx/linux.mh: Likewise.
10415         * config/vax/nbsdelf.mh: Likewise.
10416         * config/vax/obsd.mh: Likewise.
10417         * config/xtensa/linux.mh: Likewise.
10418         * config/i386/i386gnu.mn: New file, with excerpts from
10419         "config/i386/i386gnu.mh".
10420         * configure: Regenerate.
10421         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10422         *.mh files under "gdb/config".
10423         * configure.nat: New file, with contents from the
10424         "gdb/config/*/*.mh" files.
10425
10426 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10427
10428         * btrace.c (btrace_clear): Free insn vector.
10429
10430 2017-05-05  Pedro Alves  <palves@redhat.com>
10431
10432         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10433         * configure: Regenerate.
10434
10435 2017-05-04  Pedro Alves  <palves@redhat.com>
10436
10437         * Makefile.in (SFILES): Add progspace-and-thread.c.
10438         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10439         (COMMON_OBS): Add progspace-and-thread.o.
10440         * breakpoint.c: Include "progspace-and-thread.h".
10441         (update_inserted_breakpoint_locations)
10442         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10443         Use scoped_restore_current_pspace_and_thread.
10444         (create_std_terminate_master_breakpoint): Use
10445         scoped_restore_current_program_space.
10446         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10447         (print_breakpoint_location): Use
10448         scoped_restore_current_program_space.
10449         (bp_loc_is_permanent): Use
10450         scoped_restore_current_pspace_and_thread.
10451         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10452         (download_tracepoint_locations): Use
10453         scoped_restore_current_pspace_and_thread.
10454         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10455         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10456         (enum step_over_calls_kind): Moved from inferior.h.
10457         (class scoped_restore_current_thread): New class.
10458         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10459         declaration.
10460         (scoped_restore_current_thread): New class.
10461         * infcmd.c: Include "common/gdb_optional.h".
10462         (continue_1, proceed_after_attach): Use
10463         scoped_restore_current_thread.
10464         (notice_new_inferior): Use scoped_restore_current_thread.
10465         * inferior.c: Include "progspace-and-thread.h".
10466         (restore_inferior, save_current_inferior): Delete.
10467         (add_inferior_command, clone_inferior_command): Use
10468         scoped_restore_current_pspace_and_thread.
10469         * inferior.h (scoped_restore_current_inferior): New class.
10470         * infrun.c: Include "progspace-and-thread.h" and
10471         "common/gdb_optional.h".
10472         (follow_fork_inferior): Use
10473         scoped_restore_current_pspace_and_thread.
10474         (scoped_restore_exited_inferior): New class.
10475         (handle_vfork_child_exec_or_exit): Use
10476         scoped_restore_exited_inferior,
10477         scoped_restore_current_pspace_and_thread,
10478         scoped_restore_current_thread and scoped_restore.
10479         (fetch_inferior_event): Use scoped_restore_current_thread.
10480         * linespec.c (decode_line_full, decode_line_1): Use
10481         scoped_restore_current_program_space.
10482         * mi/mi-main.c: Include "progspace-and-thread.h".
10483         (exec_continue): Use scoped_restore_current_thread.
10484         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10485         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10486         * proc-service.c (ps_pglobal_lookup): Use
10487         scoped_restore_current_program_space.
10488         * progspace-and-thread.c: New file.
10489         * progspace-and-thread.h: New file.
10490         * progspace.c (release_program_space, clone_program_space): Use
10491         scoped_restore_current_program_space.
10492         (restore_program_space, save_current_program_space)
10493         (save_current_space_and_thread): Delete.
10494         (switch_to_program_space_and_thread): Moved to
10495         progspace-and-thread.c.
10496         * progspace.h (save_current_program_space)
10497         (save_current_space_and_thread): Delete declarations.
10498         (scoped_restore_current_program_space): New class.
10499         * remote.c (remote_btrace_maybe_reopen): Use
10500         scoped_restore_current_thread.
10501         * symtab.c: Include "progspace-and-thread.h".
10502         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10503         * thread.c (print_thread_info_1): Use
10504         scoped_restore_current_thread.
10505         (struct current_thread_cleanup): Delete.
10506         (do_restore_current_thread_cleanup)
10507         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10508         (scoped_restore_current_thread::~scoped_restore_current_thread):
10509         ... this new dtor.
10510         (make_cleanup_restore_current_thread): Rename/convert to ...
10511         (scoped_restore_current_thread::scoped_restore_current_thread):
10512         ... this new ctor.
10513         (thread_apply_all_command): Use scoped_restore_current_thread.
10514         (thread_apply_command): Use scoped_restore_current_thread.
10515         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10516         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10517
10518 2017-05-04  Pedro Alves  <palves@redhat.com>
10519
10520         * thread.c (make_cleanup_restore_current_thread): Move
10521         find_thread_ptid call before the is_stopped call.  Assert that the
10522         thread is found.  Replace is_stopped call by checking the thread's
10523         state directly.  Remove unnecessary NULL-thread check.
10524
10525 2017-05-04  Pedro Alves  <palves@redhat.com>
10526
10527         * corelow.c (thread_section_name): New class.
10528         (get_core_register_section, get_core_siginfo): Use it.
10529
10530 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10531
10532         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10533         (get_core_register_section): Remove xfree of NULL pointer.
10534
10535 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10536
10537         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10538         * regcache.c (regcache::raw_supply_zeroed): New function.
10539         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10540
10541 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10542
10543         * gdbarch.sh: Remove commented out definition of
10544         TARGET_CHAR_BIT.
10545         * gdbarch.h: Re-generate.
10546
10547 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10548
10549         * configure: Regenerate.
10550
10551 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10552
10553         * solib-target.c (solib_target_relocate_section_addresses):
10554         Remove num_section_bases, num_bases, segment_bases variables.
10555
10556 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10557
10558         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10559
10560 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10561
10562         * solib-target.c: Include <vector>
10563         (struct lm_info_target) <~lm_info_target>: Remove.
10564         <segment_bases, section_bases>: Change type to
10565         std::vector<CORE_ADDR>.
10566         (library_list_start_segment, library_list_start_section,
10567         library_list_end_library,
10568         solib_target_relocate_section_addresses): Adjust.
10569
10570 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10571
10572         * gdbarch.sh (software_single_step): Change return type to
10573         std::vector<CORE_ADDR>.
10574         * gdbarch.c, gdbarch.h: Re-generate.
10575         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10576         Adjust.
10577         (arm_deal_with_atomic_sequence_raw): Adjust.
10578         (thumb_get_next_pcs_raw): Adjust.
10579         (arm_get_next_pcs_raw): Adjust.
10580         (arm_get_next_pcs): Adjust.
10581         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10582         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10583         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10584         (alpha_software_single_step): Adjust.
10585         * alpha-tdep.h (alpha_software_single_step): Adjust.
10586         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10587         * arm-tdep.c (arm_software_single_step): Adjust.
10588         (arm_breakpoint_kind_from_current_state): Adjust.
10589         * arm-tdep.h (arm_software_single_step): Adjust.
10590         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10591         * cris-tdep.c (cris_software_single_step): Adjust.
10592         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10593         (micromips_deal_with_atomic_sequence): Adjust.
10594         (deal_with_atomic_sequence): Adjust.
10595         (mips_software_single_step): Adjust.
10596         * mips-tdep.h (mips_software_single_step): Adjust.
10597         * moxie-tdep.c (moxie_software_single_step): Adjust.
10598         * nios2-tdep.c (nios2_software_single_step): Adjust.
10599         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10600         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10601         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10602         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10603         * sparc-tdep.c (sparc_software_single_step): Adjust.
10604         * spu-tdep.c (spu_software_single_step): Adjust.
10605         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10606
10607 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10608
10609         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10610         * gdbarch.h: Re-generate.
10611
10612 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10613
10614         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10615         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10616         * python/py-instruction.c, python/py-instruction.h: New file.
10617         * python/py-record.c: Add py-instruction.h include.
10618         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10619         gdb.RecordInstruction.
10620         * python/python-internal.h: Add gdbpy_initialize_instruction
10621         declaration.
10622         * python/python.c (do_start_initialization): Add
10623         gdbpy_initialize_instruction.
10624
10625 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10626
10627         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10628         Remove.
10629         (btrace_func_from_recpy_func): New function.
10630         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10631         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10632         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10633         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10634         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10635         Also, use new helper functions.
10636         (btpy_list_item): Use new helper functions.
10637         (recpy_bt_function_call_history): Use new type name.
10638         (btpy_call_getset): Remove.
10639         (gdbpy_initialize_btrace): Remove code to initialize
10640         gdb.BtraceFunctionCall.
10641         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10642         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10643         recpy_bt_func_prev, recpy_bt_func_next): New export.
10644         * python/py-record.c (recpy_func_type): New static object.
10645         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10646         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10647         recpy_func_next): New function.
10648         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10649         (recpy_func_getset): New static object.
10650         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10651         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10652
10653 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10654
10655         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10656         (btpy_object, btpy_insn_type, btpy_new): Remove.
10657         (btpy_list_object): Use gdb.RecordInstruction type instead of
10658         gdb.BtraceInstruction type.
10659         (btrace_insn_from_recpy_insn): New function.
10660         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10661         btpy_new.
10662         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10663         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10664         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10665         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10666         instead of btpy_object.
10667         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10668         btpy_insn_data, btpy_insn_decode): Rename to ...
10669         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10670         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10671         recpy_bt_insn_decode): This.  Also, use new helper functions.
10672         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10673         recpy_insn_type.
10674         (btpy_insn_getset): Remove.
10675         (gdbpy_initialize_btrace): Remove code to initialize
10676         gdb.BtraceInstruction.  Use recpy_element_object.
10677         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10678         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10679         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10680         * python/py-record.c (recpy_insn_type): New static object.
10681         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10682         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10683         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10684         New function.
10685         (recpy_insn_getset): New static object.
10686         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10687         * python/py-record.h (recpy_element_object): New typedef.
10688         (recpy_insn_type, recpy_insn_new): New export.
10689
10690 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10691
10692         * py-record-btrace.c (btpy_insn_new): Removed.
10693         (btpy_insn_or_gap_new): New function.
10694         (btpy_insn_error): Removed.
10695         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10696         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10697         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10698         btpy_insn_or_gap_new instead of btpy_insn_new.
10699         (btpy_insn_getset): Remove btpy_insn_error.
10700         * py-record.c (recpy_gap_type): New static object.
10701         (recpy_gap_object): New typedef.
10702         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10703         recpy_gap_reason_string): New function.
10704         (recpy_gap_getset): New static object.
10705         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10706         * py-record.h (recpy_gap_new): New export.
10707
10708 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10709
10710         * python/py-record.c (recpy_ptid): Remove.
10711         (recpy_record_getset): Remove recpy_ptid.
10712
10713 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10714
10715         * btrace.c (btrace_fetch): Set inferior_ptid.
10716         * python/py-record-btrace.c: Add "py-record.h" include.
10717         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10718         recpy_bt_end, recpy_bt_instruction_history,
10719         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10720         in gdb.Record object instead of current ptid.
10721         * python/py-record.c: Include new "py-record.h" file.
10722         (recpy_record_object): Moved to py-record.h.
10723         * python/py-record.h: New file.
10724
10725 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10726
10727         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10728         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10729         indentation.
10730
10731 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10732
10733         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10734         the past maintainers section.
10735
10736 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10737
10738         * infcmd.c (get_return_value): Use regcache ctor, and remove
10739         cleanup.
10740
10741 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10742             Pedro Alves  <palves@redhat.com>
10743
10744         * regcache.c (regcache::regcache): New tag dispatch ctor.
10745         (do_cooked_read): Moved above.
10746         (regcache_dup): Use the tag dispatch ctor..
10747         * regcache.h (regcache): Declare ctor, delete copy ctor and
10748         assignment operator, remove friend regcache_dup.
10749
10750 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10751
10752         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10753         call method save instead of regcache_cpy.
10754         * regcache.h (struct regcache): Make regcache_dup a friend.
10755
10756 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10757
10758         * regcache.c (struct regcache): Move to regcache.h
10759         (regcache::arch): New method.
10760         (regcache_get_ptid): Update.
10761         (get_regcache_arch): Call arch method.
10762         (get_regcache_aspace): Call method aspace.
10763         (register_buffer): Change it to method.
10764         (regcache_save): Change it to regcache::save.
10765         (regcache_restore): Likewise.
10766         (regcache_cpy_no_passthrough): Remove the declaration.
10767         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10768         (regcache_cpy_no_passthrough): Change it to method
10769         cpy_no_passthrough.
10770         (regcache_register_status): Change it to method
10771         get_register_status.
10772         (regcache_invalidate): Change it to method invalidate.
10773         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10774         (regcache_raw_update): Change it to method raw_update.
10775         (regcache_raw_read): Likewise.
10776         (regcache_raw_read_signed): Likewise.
10777         (regcache_raw_read_unsigned): Likewise.
10778         (regcache_raw_write_signed): Likewise.
10779         (regcache_raw_write_unsigned): Likewise.
10780         (regcache_cooked_read): Likewise.
10781         (regcache_cooked_read_value): Likewise.
10782         (regcache_cooked_read_signed): Likewise.
10783         (regcache_cooked_read_unsigned): Likewise.
10784         (regcache_cooked_write_signed): Likewise.
10785         (regcache_cooked_write_unsigned): Likewise.
10786         (regcache_raw_set_cached_value): Likewise.
10787         (regcache_raw_write): Likewise.
10788         (regcache_cooked_write): Likewise.
10789         (regcache_xfer_part): Likewise.
10790         (regcache_raw_read_part): Likewise.
10791         (regcache_raw_write_part): Likewise.
10792         (regcache_cooked_read_part): Likewise.
10793         (regcache_cooked_write_part): Likewise.
10794         (regcache_raw_supply): Likewise.
10795         (regcache_raw_collect): Likewise.
10796         (regcache_transfer_regset): Likewise.
10797         (regcache_supply_regset): Likewise.
10798         (regcache_collect_regset): Likewise.
10799         (regcache_debug_print_register): Likewise.
10800         (enum regcache_dump_what): Move it to regcache.h.
10801         (regcache_dump): Change it to method dump.
10802         * regcache.h (enum regcache_dump_what): New.
10803         (class regcache): New.
10804         * target.c (target_fetch_registers): Call method
10805         debug_print_register.
10806         (target_store_registers): Likewise.
10807
10808 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10809
10810         * windows-nat.c (struct lm_info_windows): Initialize field.
10811         (windows_make_so): Allocate lm_info_windows with new.
10812         (windows_free_so): Free lm_info_windows with delete.
10813
10814 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10815
10816         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10817         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10818         cleanup.
10819         (darwin_free_so): Free lm_info_darwin with delete.
10820
10821 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10822
10823         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10824         <l_addr_p>: Change type to bool.
10825         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10826         (svr4_free_so): Free lm_info_svr4 with delete.
10827         (svr4_copy_library_list): Replace memcpy with call to copy
10828         constructor.
10829         (library_list_start_library, svr4_default_sos): Allocate
10830         lm_info_svr4 with new.
10831
10832 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10833
10834         * solib-target.c (struct lm_info_target): Add destructor,
10835         initialize fields.
10836         <name>: Change type to std::string.
10837         (library_list_start_library): Allocate lm_info_target with new.
10838         (solib_target_free_library_list): Free lm_info_target with
10839         delete.
10840         (solib_target_current_sos): Adapt to std::string.
10841         (solib_target_free_so): Free lm_info_target with delete.
10842
10843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10844
10845         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10846         fields.
10847         (frv_current_sos): Allocate lm_info_frv with new.
10848         (frv_relocate_main_executable): Free lm_info_frv with delete,
10849         allocate with new.
10850         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10851
10852 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10853
10854         * solib-frv.c (struct lm_info_frv): Fix indentation.
10855
10856 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10857
10858         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10859         map field.
10860         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10861         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10862         and allocate with new.
10863         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10864
10865 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10866
10867         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10868         <filename, member_name>: Change type to std::string.
10869         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10870         (library_list_start_library): Allocate lm_info_aix with new.
10871         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10872         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10873         with copy constructor.
10874
10875 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10876
10877         * solist.h (struct lm_info): Remove.
10878         (struct lm_info_base): New class.
10879         (struct so_list) <lm_info>: Change type to lm_info_base *.
10880         * nto-tdep.c (struct lm_info): Remove.
10881         (lm_addr): Adjust.
10882         * solib-aix.c (struct lm_info): Rename to ...
10883         (struct lm_info_aix): ... this.  Extend lm_info_base.
10884         (lm_info_p): Rename to ...
10885         (lm_info_aix_p): ... this, and adjust.
10886         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10887         solib_aix_parse_libraries, library_list_start_library,
10888         solib_aix_free_library_list, solib_aix_parse_libraries,
10889         solib_aix_get_library_list,
10890         solib_aix_relocate_section_addresses, solib_aix_free_so,
10891         solib_aix_get_section_offsets,
10892         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10893         Adjust.
10894         (struct solib_aix_inferior_data) <library_list>: Adjust.
10895         * solib-darwin.c (struct lm_info): Rename to ...
10896         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10897         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10898         * solib-dsbt.c (struct lm_info): Rename to ...
10899         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10900         (struct dsbt_info) <main_executable_lm_info): Adjust.
10901         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10902         dsbt_relocate_section_addresses): Adjust.
10903         * solib-frv.c (struct lm_info): Rename to ...
10904         (struct lm_info_frv): ... this.  Extend lm_info_base.
10905         (main_executable_lm_info): Adjust.
10906         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10907         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10908         find_canonical_descriptor_in_load_object,
10909         frv_fdpic_find_canonical_descriptor): Adjust.
10910         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10911         to lm_info_svr4.
10912         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10913         svr4_clear_so, svr4_copy_library_list,
10914         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10915         svr4_current_sos, svr4_fetch_objfile_link_map,
10916         solist_update_incremental): Adjust.
10917         * solib-svr4.h (struct lm_info_svr4): Move here from
10918         solib-svr4.c.
10919         * solib-target.c (struct lm_info): Rename to ...
10920         (struct lm_info_target): ... this.  Extend lm_info_base.
10921         (lm_info_p): Rename to ...
10922         (lm_info_target_p): ... this.
10923         (solib_target_parse_libraries, library_list_start_segment,
10924         library_list_start_section, library_list_start_library,
10925         library_list_end_library, solib_target_free_library_list,
10926         solib_target_current_sos, solib_target_free_so,
10927         solib_target_relocate_section_addresses): Adjust.
10928         * windows-nat.c (struct lm_info): Rename to ...
10929         (struct lm_info_windows): ... this.  Extend lm_info_base.
10930         (windows_make_so, handle_load_dll, handle_unload_dll,
10931         windows_xfer_shared_libraries): Adjust.
10932
10933 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10934
10935         * solib-darwin.c (struct darwin_so_list): Remove.
10936         (darwin_current_sos): Allocate an so_list object instead of a
10937         darwin_so_list, separately allocate an lm_info object.
10938         (darwin_free_so): Free lm_info.
10939
10940 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10941
10942         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10943         with fprintf_filtered.
10944
10945 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10946
10947         * regcache.c (regcache::regcache): New function.
10948         (regcache::~regcache): New function.
10949         (regcache_xmalloc_1): Remove.
10950         (regcache_xmalloc): Call new regcache.
10951         (regcache_xfree): Call delete regcache.
10952         (get_thread_arch_aspace_regcache): Call new regcache.
10953
10954 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10955
10956         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10957         lwp instead of ptid_get_lwp.
10958
10959 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10960
10961         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10962         lwp_info instead of getting from inferior_ptid.
10963
10964 2017-04-27  Keith Seitz  <keiths@redhat.com>
10965
10966         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10967         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10968         (CV_CONVERSION_BADNESS): Define.
10969         (rank_one_type): Remove overly restrictive rvalue reference
10970         rank checks.
10971         Add cv-qualifier checks and subranks for type equality.
10972         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10973         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10974         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10975
10976 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10977
10978         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10979         count when creating the object.
10980
10981 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10982             Ulrich Weigand  <uweigand@de.ibm.com>
10983
10984         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10985         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10986         is used in AIX.
10987         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10988         (process_xcoff_symbol): Likewise.
10989         (scan_xcoff_symtab): Likewise.
10990
10991 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10992
10993         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10994         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10995         (ia64_access_reg): Use get_frame_register_unsigned.
10996         (ia64_access_rse_reg): Likewise.
10997         (ia64_libunwind_frame_prev_register): Likewise.
10998
10999 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11000
11001         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11002         * gdbarch.c: Regenerated.
11003         * gdbarch.h: Regenerated.
11004         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11005         visibility external.
11006         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11007         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11008         (enum cfa_how_kind): Move to ...
11009         (struct dwarf2_frame_state_reg_info): Likewise.
11010         (struct dwarf2_frame_state): Likewise.
11011         * dwarf2-frame.h: ... here.
11012         (dwarf2_frame_state_alloc_regs): New declaration.
11013         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11014         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11015
11016 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11017
11018         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11019         regcache_raw_read_unsigned.
11020         (xtensa_pseudo_register_write): Likewise.
11021
11022 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11023
11024         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11025         (nds32_pseudo_register_write): Likewise.
11026
11027 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11028
11029         * regcache.c (struct regcache) <readonly_p>: Change its type
11030         to bool.
11031         (regcache_xmalloc_1): Update parameter type and callers update.
11032
11033 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11034
11035         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11036         set_gdbarch_wchar_bit.
11037         * arm-tdep.c (arm_gdbarch_init): Likewise.
11038
11039 2017-04-25  Pedro Alves  <palves@redhat.com>
11040
11041         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11042         (BothAreRelocatable, memcopy, memmove): Don't define.
11043         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11044         macros.
11045
11046 2017-04-25  Pedro Alves  <palves@redhat.com>
11047
11048         * common/common-defs.h: Include "common/poison.h".
11049         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11050         and adjust.
11051         * common/poison.h: New file.
11052         * common/traits.h: Include <type_traits>.
11053         (Not, Or, Requires): New, moved from common/function-view.h.
11054
11055 2017-04-25  Pedro Alves  <palves@redhat.com>
11056
11057         * breakpoint.h (struct breakpoint): In-class initialize all
11058         fields.  Make boolean fields "bool".
11059         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11060         memset call and initializations no longer necessary.
11061
11062 2017-04-25  Pedro Alves  <palves@redhat.com>
11063
11064         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11065         reference.
11066         (pt_btrace_insn): New function.
11067         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11068
11069 2017-04-25  Pedro Alves  <palves@redhat.com>
11070
11071         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11072         "base" field and inherit from "bp_location" instead.  Add
11073         non-default ctor.
11074         (allocate_location_exception): Use new non-default ctor.
11075         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11076         (init_bp_location): Convert to ...
11077         (bp_location::bp_location): ... this new ctor, and remove memset
11078         call.
11079         (base_breakpoint_allocate_location): Use the new non-default ctor.
11080         * breakpoint.h (bp_location): Now a class.  Declare default and
11081         non-default ctors.  In-class initialize all members.
11082         (init_bp_location): Remove declaration.
11083
11084 2017-04-25  Pedro Alves  <palves@redhat.com>
11085
11086         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11087         assignment operator.
11088
11089 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11090
11091         * doublest.c (convert_doublest_to_floatformat): Call
11092         floatformat_totalsize_bytes.
11093
11094 2017-04-22  Tom Tromey  <tom@tromey.com>
11095
11096         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11097         ui_out_emit_list.
11098         * stack.c (print_frame): Use ui_out_emit_list.
11099         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11100         ui_out_emit_list.
11101         * mi/mi-main.c (print_one_inferior)
11102         (mi_cmd_data_list_register_names)
11103         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11104         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11105         ui_out_emit_list.
11106         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11107         (mi_output_solib_attribs): Use ui_out_emit_list,
11108         ui_out_emit_tuple.
11109         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11110         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11111         (mi_cmd_stack_list_args, list_args_or_locals): Use
11112         ui_out_emit_list.
11113         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11114         * breakpoint.c (print_solib_event, output_thread_groups): Use
11115         ui_out_emit_list.
11116
11117 2017-04-22  Tom Tromey  <tom@tromey.com>
11118
11119         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11120         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11121         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11122
11123 2017-04-22  Tom Tromey  <tom@tromey.com>
11124
11125         * tracepoint.c (tvariables_info_1)
11126         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11127
11128 2017-04-22  Tom Tromey  <tom@tromey.com>
11129
11130         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11131         annotate_arg_emitter.
11132         * breakpoint.c (print_mention_watchpoint)
11133         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11134         * annotate.h (struct annotate_arg_emitter): New.
11135
11136 2017-04-22  Tom Tromey  <tom@tromey.com>
11137
11138         * record-btrace.c (record_btrace_insn_history)
11139         (record_btrace_insn_history_range, record_btrace_call_history)
11140         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11141         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11142         ui_out_emit_tuple.
11143         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11144         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11145         * skip.c (skip_info): Use ui_out_emit_tuple.
11146         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11147         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11148         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11149         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11150         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11151         ui_out_emit_tuple.
11152         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11153         (output_register, mi_cmd_data_read_memory)
11154         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11155         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11156         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11157         Use ui_out_emit_tuple.
11158         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11159         ui_out_emit_tuple.
11160         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11161         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11162         * linux-thread-db.c (info_auto_load_libthread_db): Use
11163         ui_out_emit_tuple.
11164         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11165         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11166         * disasm.c (do_mixed_source_and_assembly_deprecated)
11167         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11168         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11169         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11170         * breakpoint.c (print_one_breakpoint_location)
11171         (print_one_breakpoint): Use ui_out_emit_tuple.
11172         * auto-load.c (print_script, info_auto_load_cmd): Use
11173         ui_out_emit_tuple.
11174         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11175
11176 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11177
11178         * thread.c (print_thread_info_1): Remove dead code.
11179
11180 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11181
11182         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11183         GDB_SELF_TEST.
11184         * arm-tdep.c (selftests::arm_record_test): Likewise.
11185
11186 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11187
11188         * regcache.c (regcache_restore): Remove argument 2.  Replace
11189         argument 3 with regcache.  Get register status from
11190         src->register_status and get register contents from
11191         register_buffer (src, regnum).
11192         (regcache_cpy): Update.
11193
11194 2017-04-19  Pedro Alves  <palves@redhat.com>
11195
11196         * gdbthread.h (thread): Add missing closing parenthesis in
11197         comment.
11198
11199 2017-04-19  Pedro Alves  <palves@redhat.com>
11200
11201         * common/refcounted-object.h: New file.
11202         * gdbthread.h: Include "common/refcounted-object.h".
11203         (thread_info): Inherit from refcounted_object and add comments.
11204         (thread_info::incref, thread_info::decref)
11205         (thread_info::m_refcount): Delete.
11206         (thread_info::deletable): Use the refcounted_object::refcount()
11207         method.
11208         * inferior.c (current_inferior_): Add comment.
11209         (set_current_inferior): Increment/decrement refcounts.
11210         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11211         not-deletable instead of comparing with the current inferior.
11212         (initialize_inferiors): Increment the initial inferior's refcount.
11213         * inferior.h (struct inferior): Forward declare.
11214         Include "common/refcounted-object.h".
11215         (current_inferior, set_current_inferior): Move declaration to
11216         before struct inferior's definition, and fix comment.
11217         (inferior): Inherit from refcounted_object.  Add comments.
11218         * thread.c (switch_to_thread_no_regs): Reference the thread's
11219         inferior pointer directly instead of doing a ptid lookup.
11220         (switch_to_no_thread): New function.
11221         (switch_to_thread(thread_info *)): New function, factored out
11222         from ...
11223         (switch_to_thread(ptid_t)): ... this.
11224         (restore_current_thread): Delete.
11225         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11226         fields, and add 'inf' field.
11227         (do_restore_current_thread_cleanup): Check whether old->inf is
11228         alive instead of looking up an inferior by ptid.  Use
11229         switch_to_thread and switch_to_no_thread.
11230         (restore_current_thread_cleanup_dtor): Use old->inf directly
11231         instead of lookup up an inferior by id.  Decref the inferior.
11232         Don't restore 'removable'.
11233         (make_cleanup_restore_current_thread): Same the inferior pointer
11234         in old, instead of the inferior number.  Incref the inferior.
11235         Don't save/clear 'removable'.
11236
11237 2017-04-19  Pedro Alves  <palves@redhat.com>
11238
11239         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11240         unittests/scoped_restore-selftests.c.
11241         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11242         * common/scoped_restore.h (scoped_restore_base): Make "class".
11243         (scoped_restore_base::release): New public method.
11244         (scoped_restore_base::scoped_restore_base): New protected ctor.
11245         (scoped_restore_base::m_saved_var): New protected field.
11246         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11247         scoped_restore_base base class instead of m_saved_var directly.
11248         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11249         (scoped_restore_tmpl::scoped_restore_tmpl(const
11250         scoped_restore_tmpl<T>&)): Likewise.
11251         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11252         method.
11253         (scoped_restore_tmpl::saved_var): New method.
11254         (scoped_restore_tmpl::m_saved_var): Delete.
11255         * inferior.h (inferior::detaching): Now a bool.
11256         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11257         cleanup.
11258         * unittests/scoped_restore-selftests.c: New file.
11259
11260 2017-04-19  Pedro Alves  <palves@redhat.com>
11261
11262         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11263         Re-sort in alphabetic order.
11264
11265 2017-04-18  Pedro Alves  <palves@redhat.com>
11266
11267         * xml-support.c (obstack_xml_printf): Delete.
11268         * xml-support.h (obstack_xml_printf): Delete.
11269
11270 2017-04-18  Pedro Alves  <palves@redhat.com>
11271
11272         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11273         vdebug, verror, body_text, start_element, end_element, name,
11274         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11275         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11276         is_xinclude>: Make private and add m_ prefix.
11277         (gdb_xml_parser::body_text): New method, based on ...
11278         (gdb_xml_body_text): ... this.  Adjust.
11279         (gdb_xml_parser::vdebug): New method, based on ...
11280         (gdb_xml_debug): ... this.  Adjust.
11281         (gdb_xml_parser::verror): New method, based on ...
11282         (gdb_xml_error): ... this.  Adjust.
11283         (gdb_xml_parser::start_element): New method, based on ...
11284         (gdb_xml_start_element): ... this.  Adjust.
11285         (gdb_xml_start_element_wrapper): Defer to
11286         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11287         (gdb_xml_parser::end_element): New method, based on ...
11288         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11289         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11290         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11291         (gdb_xml_parser::use_dtd): New method, based on ...
11292         (gdb_xml_use_dtd): ... this.  Adjust.
11293         (gdb_xml_parser::parse): New method, based on ...
11294         (gdb_xml_parse): ... this.  Adjust.
11295         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11296         (xinclude_start_include): Adjust to call the parser's name method.
11297         (xml_xinclude_default, xml_xinclude_start_doctype)
11298         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11299         method.
11300         (xml_process_xincludes): Adjust to call parser methods.
11301         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11302         declarations.
11303
11304 2017-04-18  Pedro Alves  <palves@redhat.com>
11305
11306         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11307         gdb::optional<std::string>.
11308         * xml-support.c: Include <string>.
11309         (scope_level::scope_level(scope_level &&))
11310         (scope_level::~scope_level): Delete.
11311         (scope_level::body): Now a std::string.
11312         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11313         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11314         parameter.
11315         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11316         (xinclude_parsing_data::output): Now a std::string reference.
11317         (xinclude_start_include): Adjust.
11318         (xml_xinclude_default): Adjust.
11319         (xml_process_xincludes): Add 'output' parameter, and return bool.
11320         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11321         and return bool.
11322         * xml-tdesc.c: Include <unordered_map> and <string>.
11323         (tdesc_xml_cache): Delete.
11324         (tdesc_xml_cache_s): Delete.
11325         (xml_cache): Now an std::unordered_map.
11326         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11327         (target_fetch_description_xml): Change return type to
11328         gdb::optional<std::string>, and adjust.
11329         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11330         (target_fetch_description_xml): Change return type to
11331         gdb::optional<std::string>.
11332
11333 2017-04-18  Pedro Alves  <palves@redhat.com>
11334
11335         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11336         unittests/optional-selftests.c.
11337         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11338         * unittests/optional-selftests.c: New file.
11339         * unittests/optional/assignment/1.cc: New file.
11340         * unittests/optional/assignment/2.cc: New file.
11341         * unittests/optional/assignment/3.cc: New file.
11342         * unittests/optional/assignment/4.cc: New file.
11343         * unittests/optional/assignment/5.cc: New file.
11344         * unittests/optional/assignment/6.cc: New file.
11345         * unittests/optional/assignment/7.cc: New file.
11346         * unittests/optional/cons/copy.cc: New file.
11347         * unittests/optional/cons/default.cc: New file.
11348         * unittests/optional/cons/move.cc: New file.
11349         * unittests/optional/cons/value.cc: New file.
11350         * unittests/optional/in_place.cc: New file.
11351         * unittests/optional/observers/1.cc: New file.
11352         * unittests/optional/observers/2.cc: New file.
11353
11354 2017-04-18  Pedro Alves  <palves@redhat.com>
11355
11356         * common/gdb_optional.h: Include common/traits.h.
11357         (in_place_t): New type.
11358         (in_place): New constexpr variable.
11359         (optional::optional): Remove member initialization of
11360         m_instantiated.
11361         (optional::optional(in_place_t...)): New constructor.
11362         (optional::~optional): Use reset.
11363         (optional::optional(const optional&)): New.
11364         (optional::optional(const optional&&)): New.
11365         (optional::optional(T &)): New.
11366         (optional::optional(T &&)): New.
11367         (operator::operator=(const optional &)): New.
11368         (operator::operator=(optional &&)): New.
11369         (operator::operator= (const T &))
11370         (operator::operator= (T &&))
11371         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11372         (operator::reset): New.
11373         (operator::m_instantiated):: Add in-class initializer.
11374         * common/traits.h: Include <type_traits>.
11375         (struct And): New types.
11376
11377 2017-04-18  Pedro Alves  <palves@redhat.com>
11378
11379         * xml-support.c: Include <vector>.
11380         (scope_level::scope_level(const gdb_xml_element *))
11381         (scope_level::scope_level(scope_level&&)): New.
11382         (scope_level::~scope_level): New.
11383         (scope_level_s): Delete.
11384         (gdb_xml_parser::scopes): Now a std::vector.
11385         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11386         Use std::vector.
11387         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11388         scope cleanup code.
11389         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11390         of the scopes member.  Use std::vector::emplace_back.
11391
11392 2017-04-18  Pedro Alves  <palves@redhat.com>
11393
11394         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11395         a bool.
11396         (gdb_xml_end_element): Change type of first parameter.
11397         (gdb_xml_cleanup): Rename to ...
11398         (gdb_xml_parser::~gdb_xml_parser): ... this.
11399         (gdb_xml_create_parser_and_cleanup): Delete with ...
11400         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11401         to this new ctor.
11402         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11403         using gdb_xml_create_parser_and_cleanup.
11404         (xinclude_parsing_data): Add ctor/dtor.
11405         (xml_xinclude_cleanup): Delete.
11406         (xml_process_xincludes): Create a local xinclude_parsing_data
11407         instead of heap-allocating one.  Create a local gdb_xml_parser
11408         instead of heap-allocating one with
11409         gdb_xml_create_parser_and_cleanup.
11410
11411 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11412
11413         PR threads/20743
11414         * fbsd-nat.c (resume_one_thread_cb): Remove.
11415         (resume_all_threads_cb): Remove.
11416         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11417         iterate_over_threads.
11418
11419 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11420
11421         * NEWS: Create a new section for the next release branch.
11422         Rename the section of the current branch, now that it has
11423         been cut.
11424
11425 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11426
11427         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11428         * version.in: Bump version to 8.0.50.DATE-git.
11429
11430 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11431
11432         PR gdb/21385
11433         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11434         independently of the host, and fix build breakage on Cygwin.
11435
11436 2017-04-13  Pedro Alves  <palves@redhat.com>
11437
11438         * inferior.c (free_inferior): Convert to ...
11439         (inferior::~inferior): ... this dtor.
11440         (inferior::inferior): New ctor, factored out from ...
11441         (add_inferior_silent): ... here.  Allocate the inferior with a new
11442         expression.
11443         (delete_inferior): Call delete instead of free_inferior.
11444         * inferior.h (gdb_environ, continuation): Forward declare.
11445         (inferior): Now a class.  Add in-class initialization to all
11446         members.  Make boolean fields bool, except 'detaching'.
11447         (inferior::inferior): New explicit ctor.
11448         (inferior::~inferior): New.
11449
11450 2017-04-13  Pedro Alves  <palves@redhat.com>
11451
11452         * inferior.c (init_inferior_list): Delete.
11453         * inferior.h (init_inferior_list): Delete.
11454
11455 2017-04-13  Pedro Alves  <palves@redhat.com>
11456
11457         PR threads/13217
11458         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11459         (top level): Call it twice, with different thread sets.
11460
11461 2017-04-13  Pedro Alves  <palves@redhat.com>
11462
11463         * thread.c: Include <algorithm>.
11464         (thread_array_cleanup): Delete.
11465         (scoped_inc_dec_ref): New class.
11466         (live_threads_count): New function.
11467         (set_thread_refcount): Delete.
11468         (tp_array_compar_ascending): Now a bool.
11469         (tp_array_compar): Convert to a std::sort comparison function.
11470         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11471         and live_threads_count.
11472
11473 2017-04-13  Pedro Alves  <palves@redhat.com>
11474
11475         * infrun.c (follow_fork_inferior): Also switch the current
11476         inferior.
11477
11478 2017-04-13  Pedro Alves  <palves@redhat.com>
11479
11480         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11481         before calling create_internal_breakpoint.
11482
11483 2017-04-13  Pedro Alves  <palves@redhat.com>
11484
11485         * fork-child.c (execv_argv): New class.
11486         (breakup_args): Refactored as ...
11487         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11488         Copy arguments to storage and replace separators with NULL
11489         terminators in place.
11490         (escape_bang_in_quoted_argument): Adjust to return bool.
11491         (execv_argv::execv_argv): New ctor.
11492         (execv_argv::init_for_shell): New method, factored out from
11493         fork_inferior.  Don't strdup strings into the vector.
11494         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11495         Remove free_vector_argv call.
11496
11497 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11498
11499         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11500         tdep->rx_psw_type.
11501
11502 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11503
11504         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11505         * rx-tdep.c (rx_gdbarch_init): Likewise.
11506
11507 2017-04-13  Pedro Alves  <palves@redhat.com>
11508
11509         * breakpoint.h (struct breakpoint): Reindent.
11510
11511 2017-04-13  Pedro Alves  <palves@redhat.com>
11512
11513         * breakpoint.c (bp_location): Rename to ...
11514         (bp_locations): ... this.  All references updated.
11515         (bp_location_count): Rename to ...
11516         (bp_locations_count): ... this.  All references updated.
11517         (bp_location_placed_address_before_address_max): Rename to ...
11518         (bp_locations_placed_address_before_address_max): ... this.  All
11519         references updated.
11520         (bp_location_shadow_len_after_address_max): Rename to ...
11521         (bp_locations_shadow_len_after_address_max): ... this.  All
11522         references updated.
11523         (bp_location_compare_addrs): Rename to ...
11524         (bp_locations_compare_addrs): ... this.  All references updated.
11525         (bp_location_compare):Rename to ...
11526         (bp_locations_compare): ... this.  All references updated.
11527         (bp_location_target_extensions_update): Rename to ...
11528         (bp_locations_target_extensions_update): ... this.  All references
11529         updated.
11530
11531 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11532
11533         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11534         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11535         'sgtty.h'.
11536         * common/gdb_termios.h: New file, with parts of "terminal.h".
11537         * inflow.c: Include "gdb_termios.h".
11538         * ser-unix.c: Include "gdb_termios.h".
11539         * terminal.h: Move terminal-related defines to
11540         "common/gdb_termios.h".
11541
11542 2017-04-12  Tom Tromey  <tom@tromey.com>
11543
11544         * probe.c (parse_probes): Update.
11545         * location.h (delete_event_location): Don't declare.
11546         (event_location_deleter::operator()): Update.
11547         * location.c (event_location_deleter::operator()): Rename from
11548         delete_event_location.
11549         * linespec.h (linespec_result) <location>: Change type to
11550         event_location_up.
11551         * linespec.c (canonicalize_linespec, event_location_to_sals)
11552         (decode_objc): Update.
11553         (linespec_result): Don't call delete_event_location.
11554         * breakpoint.c (create_breakpoints_sal)
11555         (bkpt_probe_create_sals_from_location)
11556         (strace_marker_create_sals_from_location): Update.
11557
11558 2017-04-12  Tom Tromey  <tom@tromey.com>
11559
11560         * linespec.h (struct linespec_result): Add constructor and
11561         destructor.
11562         (init_linespec_result, destroy_linespec_result)
11563         (make_cleanup_destroy_linespec_result): Don't declare.
11564         * linespec.c (init_linespec_result): Remove.
11565         (linespec_result::~linespec_result): Rename from
11566         destroy_linespec_result.  Update.
11567         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11568         Remove.
11569         * breakpoint.c (create_breakpoint, break_range_command)
11570         (decode_location_default): Update.
11571         * ax-gdb.c (agent_command_1): Update.
11572
11573 2017-04-12  Tom Tromey  <tom@tromey.com>
11574
11575         * remote.c (remote_download_tracepoint): Update.
11576         * python/py-breakpoint.c (bppy_get_location): Update.
11577         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11578         (gdbscm_breakpoint_location): Update.
11579         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11580         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11581         Change type to event_location_up.
11582         * breakpoint.c (create_overlay_event_breakpoint)
11583         (create_longjmp_master_breakpoint)
11584         (create_std_terminate_master_breakpoint)
11585         (create_exception_master_breakpoint)
11586         (breakpoint_event_location_empty_p, print_breakpoint_location)
11587         (print_one_breakpoint_location, create_thread_event_breakpoint)
11588         (init_breakpoint_sal, create_breakpoint)
11589         (print_recreate_ranged_breakpoint, break_range_command)
11590         (init_ada_exception_breakpoint, say_where): Update.
11591         (base_breakpoint_dtor): Don't call delete_event_location.
11592         (bkpt_print_recreate, tracepoint_print_recreate)
11593         (dprintf_print_recreate, update_static_tracepoint)
11594         (breakpoint_re_set_default): Update.
11595
11596 2017-04-12  Tom Tromey  <tom@tromey.com>
11597
11598         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11599         type of "to_do".  Update.
11600         (compute_stack_depth): Use std::vector.
11601
11602 2017-04-12  Tom Tromey  <tom@tromey.com>
11603
11604         * printcmd.c (find_instruction_backward): Use std::vector.
11605
11606 2017-04-12  Tom Tromey  <tom@tromey.com>
11607
11608         * symfile.c (objfilep): Remove typedef.
11609         (reread_symbols): Use a std::vector.
11610
11611 2017-04-12  Tom Tromey  <tom@tromey.com>
11612
11613         * mi/mi-main.c (exec_direction_forward): Remove.
11614         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11615         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11616         scoped_restore.
11617         * guile/guile.c (guile_repl_command, guile_command)
11618         (gdbscm_execute_gdb_command): Use scoped_restore.
11619         * go-exp.y (go_parse): Use scoped_restore.
11620         * d-exp.y (d_parse): Use scoped_restore.
11621         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11622         * c-exp.y (c_parse): Use scoped_restore.
11623
11624 2017-04-12  Tom Tromey  <tom@tromey.com>
11625
11626         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11627         (mi_parse): Update return type.
11628         (mi_parse_free): Remove.
11629         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11630         (mi_parse::~mi_parse): Rename from mi_parse_free.
11631         (mi_parse_cleanup): Remove.
11632         (mi_parse): Return a unique_ptr.  Use new.
11633         * mi/mi-main.c (mi_execute_command): Update.
11634
11635 2017-04-12  Tom Tromey  <tom@tromey.com>
11636
11637         * location.c (explicit_location_lex_one): Return a
11638         unique_xmalloc_ptr.
11639         (string_to_explicit_location): Update.  Remove cleanups.
11640
11641 2017-04-12  Tom Tromey  <tom@tromey.com>
11642
11643         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11644         (compare_value_and_voffset): Change type.  Update.
11645         (compute_vtable_size): Change type of "offset_vec".
11646         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11647         (gnuv3_get_typeid): Remove extraneous declaration.
11648
11649 2017-04-12  Tom Tromey  <tom@tromey.com>
11650
11651         * charset.h (wchar_iterator): Fix comment.
11652
11653 2017-04-12  Tom Tromey  <tom@tromey.com>
11654
11655         * charset.c (iconv_wrapper): New class.
11656         (cleanup_iconv): Remove.
11657         (convert_between_encodings): Use it.
11658
11659 2017-04-12  Tom Tromey  <tom@tromey.com>
11660
11661         * symfile.h (increment_reading_symtab): Update type.
11662         * symfile.c (decrement_reading_symtab): Remove.
11663         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11664         * psymtab.c (psymtab_to_symtab): Update.
11665         * dwarf2read.c (dw2_instantiate_symtab): Update.
11666
11667 2017-04-12  Tom Tromey  <tom@tromey.com>
11668
11669         * jit.c (struct jit_reader): Declare separately.  Add constructor
11670         and destructor.  Change type of "handle".
11671         (loaded_jit_reader): Define separately.
11672         (jit_reader_load): Update.  New "new".
11673         (jit_reader_unload_command): Use "delete".
11674         * gdb-dlfcn.h (struct dlclose_deleter): New.
11675         (gdb_dlhandle_up): New typedef.
11676         (gdb_dlopen, gdb_dlsym): Update types.
11677         (gdb_dlclose): Remove.
11678         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11679         (gdb_dlsym): Change type of "handle".
11680         (make_cleanup_dlclose): Remove.
11681         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11682         * compile/compile-c-support.c (load_libcc): Update.
11683
11684 2017-04-12  Tom Tromey  <tom@tromey.com>
11685
11686         * symtab.h (find_pcs_for_symtab_line): Change return type.
11687         * symtab.c (find_pcs_for_symtab_line): Change return type.
11688         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11689         type of "vec".  Update.
11690         (ltpy_get_pcs_for_line): Update.
11691         * linespec.c (decode_digits_ordinary): Update.
11692
11693 2017-04-12  Tom Tromey  <tom@tromey.com>
11694
11695         * tracepoint.c (actions_command): Update.
11696         * python/python.c (python_command, python_interactive_command):
11697         Update.
11698         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11699         * guile/guile.c (guile_command): Update.
11700         * defs.h (read_command_lines, read_command_lines_1): Return
11701         command_line_up.
11702         (command_lines_deleter): New struct.
11703         (command_line_up): New typedef.
11704         * compile/compile.c (compile_code_command)
11705         (compile_print_command): Update.
11706         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11707         command_line_up.
11708         (make_cleanup_free_command_lines): Remove.
11709         * cli/cli-script.c (get_command_line, read_command_lines_1)
11710         (copy_command_lines): Return command_line_up.
11711         (while_command, if_command, read_command_lines, define_command)
11712         (document_command): Update.
11713         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11714         Remove.
11715         * breakpoint.h (breakpoint_set_commands): Change type of
11716         "commands".
11717         * breakpoint.c (breakpoint_set_commands): Change type of
11718         "commands".  Update.
11719         (do_map_commands_command, update_dprintf_command_list)
11720         (create_tracepoint_from_upload): Update.
11721
11722 2017-04-12  Tom Tromey  <tom@tromey.com>
11723
11724         * tracepoint.c (scope_info): Update.
11725         * spu-tdep.c (spu_catch_start): Update.
11726         * python/python.c (gdbpy_decode_line): Update.
11727         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11728         * python/py-breakpoint.c (bppy_init): Update.
11729         * probe.c (parse_probes): Update.
11730         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11731         * location.h (event_location_deleter): New struct.
11732         (event_location_up): New typedef.
11733         (new_linespec_location, new_address_location, new_probe_location)
11734         (new_explicit_location, copy_event_location)
11735         (string_to_event_location, string_to_event_location_basic)
11736         (string_to_explicit_location): Update return type.
11737         (make_cleanup_delete_event_location): Remove.
11738         * location.c (new_linespec_location, new_address_location)
11739         (new_probe_location, new_explicit_location, copy_event_location):
11740         Return event_location_up.
11741         (delete_event_location_cleanup)
11742         (make_cleanup_delete_event_location): Remove.
11743         (string_to_explicit_location, string_to_event_location_basic)
11744         (string_to_event_location): Return event_location_up.
11745         * linespec.c (canonicalize_linespec, event_location_to_sals)
11746         (decode_line_with_current_source)
11747         (decode_line_with_last_displayed, decode_objc): Update.
11748         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11749         * completer.c (location_completer): Update.
11750         * cli/cli-cmds.c (edit_command, list_command): Update.
11751         * breakpoint.c (create_overlay_event_breakpoint)
11752         (create_longjmp_master_breakpoint)
11753         (create_std_terminate_master_breakpoint)
11754         (create_exception_master_breakpoint)
11755         (create_thread_event_breakpoint): Update.
11756         (init_breakpoint_sal): Update.  Remove some dead code.
11757         (create_breakpoint_sal): Change type of "location".  Update.
11758         (create_breakpoints_sal, create_breakpoint, break_command_1)
11759         (dprintf_command, break_range_command, until_break_command)
11760         (init_ada_exception_breakpoint)
11761         (strace_marker_create_sals_from_location)
11762         (update_static_tracepoint, trace_command, ftrace_command)
11763         (strace_command, create_tracepoint_from_upload): Update.
11764         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11765         * ax-gdb.c (agent_command_1): Update.
11766
11767 2017-04-12  Pedro Alves  <palves@redhat.com>
11768
11769         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11770         * configure.tgt: Handle i[34567]86-*-go32* and
11771         i[34567]86-*-msdosdjgpp*.
11772         * i386-tdep.c (i386_svr4_reg_to_regnum):
11773         Make extern.
11774         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11775         i386-go32-tdep.c.
11776         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11777         * i386-go32-tdep.c: New file.
11778         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11779         declarations.
11780
11781 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11782
11783         * aix-thread.c (pd_status2str): Change return type to const char *.
11784
11785 2017-04-12  Pedro Alves  <palves@redhat.com>
11786
11787         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11788         calls to set_gdbarch_gnu_triplet_regexp.
11789
11790 2017-04-12  Pedro Alves  <palves@redhat.com>
11791
11792         PR gdb/21323
11793         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11794         New enum value.
11795         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11796         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11797         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11798         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11799         * gdbarch.h, gdbarch.c: Regenerate.
11800         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11801         gdbarch_wchar_bit and gdbarch_wchar_signed.
11802         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11803         * arm-tdep.c (arm_gdbarch_init): Likewise.
11804         * avr-tdep.c (avr_gdbarch_init): Likewise.
11805         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11806         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11807         * i386-tdep.c (i386_go32_init_abi): Likewise.
11808         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11809         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11810         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11811         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11812         * sh-tdep.c (sh_gdbarch_init): Likewise.
11813         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11814         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11815         * windows-tdep.c (windows_init_abi): Likewise.
11816         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11817
11818 2017-04-12  Pedro Alves  <palves@redhat.com>
11819
11820         PR c++/21323
11821         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11822         cplus_primitive_type_char32_t>: New enum values.
11823         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11824         and cplus_primitive_type_char32_t.
11825         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11826         32, use the archtecture's built-in type for char16_t and char32_t,
11827         respectively.  Otherwise, fallback to init_integer_type as before,
11828         but make the type unsigned, and issue a complaint.
11829         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11830
11831 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11832
11833         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11834         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11835
11836 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11837
11838         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11839         'const char *'.
11840
11841 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11842
11843         * common/common-utils.c (free_vector_argv): New function.
11844         * common/common-utils.h: Include <vector>.
11845         (free_vector_argv): New prototype.
11846         * darwin-nat.c (darwin_create_inferior): Rewrite function
11847         prototype in order to constify "exec_file" and accept a
11848         "std::string" for "allargs".
11849         * fork-child.c: Include <vector>.
11850         (breakup_args): Rewrite function, using C++.
11851         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11852         and accept "std::string" for "allargs".  Update the code to
11853         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11854         and "execvp".
11855         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11856         order to constify "exec_file" and accept a "std::string" for
11857         "allargs".
11858         * go32-nat.c (go32_create_inferior): Likewise.
11859         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11860         * infcmd.c (run_command_1): Constify "exec_file".  Use
11861         "std::string" for inferior arguments.
11862         * inferior.h (fork_inferior): Update prototype.
11863         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11864         prototype in order to constify "exec_file" and accept a
11865         "std::string" for "allargs".
11866         * nto-procfs.c (procfs_create_inferior): Likewise.
11867         * procfs.c (procfs_create_inferior): Likewise.
11868         * remote-sim.c (gdbsim_create_inferior): Likewise.
11869         * remote.c (extended_remote_run): Update code to accept
11870         "std::string" as argument.
11871         (extended_remote_create_inferior): Rewrite function prototype in
11872         order to constify "exec_file" and accept a "std::string" for
11873         "allargs".
11874         * rs6000-nat.c (super_create_inferior): Likewise.
11875         (rs6000_create_inferior): Likewise.
11876         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11877         * windows-nat.c (windows_create_inferior): Likewise.
11878
11879 2017-04-11  Pedro Alves  <palves@redhat.com>
11880
11881         * thread.c: Fix whitespace throughout.
11882
11883 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11884
11885         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11886
11887 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11888
11889         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11890
11891 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11892
11893         PR gdb/21364
11894         * osdata.c (info_osdata): Check if 'type' is an empty string
11895         instead of NULL.
11896
11897 2017-04-10  Pedro Alves  <palves@redhat.com>
11898
11899         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11900         (ptid_to_global_thread_id, in_thread_list)
11901         (do_captured_list_thread_ids, set_resumed, set_running)
11902         (set_executing, set_stop_requested, finish_thread_state)
11903         (validate_registers_access, can_access_registers_ptid)
11904         (print_thread_info_1, switch_to_thread)
11905         (do_restore_current_thread_cleanup)
11906         (make_cleanup_restore_current_thread, thread_command)
11907         (thread_name_command): Use operator== instead of ptid_equal.
11908
11909 2017-04-10  Pedro Alves  <palves@redhat.com>
11910
11911         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11912         (current_thread_cleanup_chain): Delete.
11913         (restore_current_thread_cleanup_dtor)
11914         (make_cleanup_restore_current_thread): Remove references to
11915         current_thread_cleanup_chain.
11916
11917 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11918
11919         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11920         REG_UNKNOWN.
11921
11922 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11923
11924         PR gdb/19942
11925         * gdbthread.h (thread_info::deletable): New method.
11926         (thread_info::incref): New method.
11927         (thread_info::decref): New method.
11928         (thread_info::refcount): Move it to private.
11929         * infrun.c (save_stop_context): Call inc_refcount.
11930         (release_stop_context_cleanup): Likewise.
11931         * thread.c (set_thread_exited): New function.
11932         (init_thread_list): Delete "tp" only it is deletable, otherwise
11933         call set_thread_exited.
11934         (delete_thread_1): Call set_thread_exited.
11935         (current_thread_cleanup) <inferior_pid>: Remove.
11936         <thread>: New field.
11937         (restore_current_thread_ptid_changed): Removed.
11938         (do_restore_current_thread_cleanup): Adjust.
11939         (restore_current_thread_cleanup_dtor): Don't call
11940         find_thread_ptid.
11941         (set_thread_refcount): Use dec_refcount.
11942         (make_cleanup_restore_current_thread): Adjust.
11943         (thread_apply_all_command): Call inc_refcount.
11944         (_initialize_thread): Don't call
11945         observer_attach_thread_ptid_changed.
11946
11947 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11948
11949         * thread.c (delete_thread_1): Hoist code on marking thread as
11950         exited.
11951
11952 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11953
11954         * windows-nat.c (windows_detach): Initialize ptid with
11955         minus_one_ptid.
11956
11957 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11958
11959         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11960
11961 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11962
11963         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11964         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11965         (bfin_pseudo_register_write): Likewise
11966
11967 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11968
11969         * common/ptid.h (struct ptid): Change to...
11970         (class ptid_t): ... this.
11971         <ptid_t>: New constructors.
11972         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11973         matches>: New methods.
11974         <make_null, make_minus_one>: New static methods.
11975         <pid>: Rename to...
11976         <m_pid>: ...this.
11977         <lwp>: Rename to...
11978         <m_lwp>: ...this.
11979         <tid>: Rename to...
11980         <m_tid>: ...this.
11981         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11982         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11983         as references, move comment to class ptid_t.
11984         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11985         ptid_t static methods.
11986         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11987         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11988         Take ptid arguments as references, implement using ptid_t methods.
11989         * unittests/ptid-selftests.c: New file.
11990         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11991         unittests/ptid-selftests.c.
11992         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11993
11994 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11995
11996         * python/python.c (python_run_simple_file): Cast mode literal to
11997         non-const char pointer as expected by PyFile_FromString.
11998
11999 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12000
12001         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12002         minus_one_ptid and null_ptid.
12003
12004 2017-04-05  Pedro Alves  <palves@redhat.com>
12005
12006         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12007         * configure: Regenerate.
12008
12009 2017-04-05  Pedro Alves  <palves@redhat.com>
12010
12011         * ada-exp.y (yyerror): Constify.
12012         * ada-lang.c (bound_name, get_selections)
12013         (ada_variant_discrim_type)
12014         (ada_variant_discrim_name, ada_value_struct_elt)
12015         (ada_lookup_struct_elt_type, is_unchecked_variant)
12016         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12017         (catch_ada_exception_command_split)
12018         (catch_ada_assert_command_split, catch_assert_command)
12019         (ada_op_name): Constify.
12020         * ada-lang.h (ada_yyerror, get_selections)
12021         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12022         * arc-tdep.c (arc_print_frame_cache): Constify.
12023         * arm-tdep.c (arm_skip_stub): Constify.
12024         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12025         (gen_aggregate_elt_ref): Constify.
12026         * bcache.c (print_bcache_statistics): Constify.
12027         * bcache.h (print_bcache_statistics): Constify.
12028         * break-catch-throw.c (catch_exception_command_1):
12029         * breakpoint.c (struct ep_type_description::description):
12030         Constify.
12031         (add_solib_catchpoint): Constify.
12032         (catch_fork_command_1): Add cast.
12033         (add_catch_command): Constify.
12034         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12035         Constify.
12036         * bsd-uthread.c (bsd_uthread_state): Constify.
12037         * buildsym.c (patch_subfile_names): Constify.
12038         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12039         Constify.
12040         * c-exp.y (yyerror): Constify.
12041         (token::oper): Constify.
12042         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12043         * c-varobj.c (cplus_describe_child): Constify.
12044         * charset.c (find_charset_names): Add cast.
12045         (find_charset_names): Constify array and add const_cast.
12046         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12047         (edit_command): Constify.
12048         * cli/cli-decode.c (lookup_cmd): Constify.
12049         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12050         Constify.
12051         (struct dump_context): Constify.
12052         (add_dump_command, restore_command): Constify.
12053         * cli/cli-script.c (get_command_line): Constify.
12054         * cli/cli-script.h (get_command_line): Constify.
12055         * cli/cli-utils.c (check_for_argument): Constify.
12056         * cli/cli-utils.h (check_for_argument): Constify.
12057         * coff-pe-read.c (struct read_pe_section_data): Constify.
12058         * command.h (lookup_cmd): Constify.
12059         * common/print-utils.c (decimal2str): Constify.
12060         * completer.c (gdb_print_filename): Constify.
12061         * corefile.c (set_gnutarget): Constify.
12062         * cp-name-parser.y (yyerror): Constify.
12063         * cp-valprint.c (cp_print_class_member): Constify.
12064         * cris-tdep.c (cris_register_name, crisv32_register_name):
12065         Constify.
12066         * d-exp.y (yyerror): Constify.
12067         (struct token::oper): Constify.
12068         * d-lang.h (d_yyerror): Constify.
12069         * dbxread.c (struct header_file_location::name): Constify.
12070         (add_old_header_file, add_new_header_file, last_function_name)
12071         (dbx_next_symbol_text, add_bincl_to_list)
12072         (find_corresponding_bincl_psymtab, set_namestring)
12073         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12074         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12075         * defs.h (command_line_input, print_address_symbolic)
12076         (deprecated_readline_begin_hook): Constify.
12077         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12078         Constify.
12079         * event-top.c (handle_line_of_input): Constify and add cast.
12080         * exceptions.c (catch_errors): Constify.
12081         * exceptions.h (catch_errors): Constify.
12082         * expprint.c (print_subexp_standard, op_string, op_name)
12083         (op_name_standard, dump_raw_expression, dump_raw_expression):
12084         * expression.h (op_name, op_string, dump_raw_expression):
12085         Constify.
12086         * f-exp.y (yyerror): Constify.
12087         (struct token::oper): Constify.
12088         (struct f77_boolean_val::name): Constify.
12089         * f-lang.c (f_word_break_characters): Constify.
12090         * f-lang.h (f_yyerror): Constify.
12091         * fork-child.c (fork_inferior): Add cast.
12092         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12093         (new_variant): Constify.
12094         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12095         * gdbarch.c: Regenerate.
12096         * gdbcore.h (set_gnutarget): Constify.
12097         * go-exp.y (yyerror): Constify.
12098         (token::oper): Constify.
12099         * go-lang.h (go_yyerror): Constify.
12100         * go32-nat.c (go32_sysinfo): Constify.
12101         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12102         * guile/scm-cmd.c (cmdscm_function): Constify.
12103         * guile/scm-param.c (pascm_param_value): Constify.
12104         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12105         (h8300sx_register_name): Constify.
12106         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12107         Constify.
12108         * ia64-tdep.c (ia64_register_names): Constify.
12109         * infcmd.c (construct_inferior_arguments): Constify.
12110         (path_command, attach_post_wait): Constify.
12111         * language.c (show_range_command, show_case_command)
12112         (unk_lang_error): Constify.
12113         * language.h (language_defn::la_error)
12114         (language_defn::la_name_of_this): Constify.
12115         * linespec.c (decode_line_2): Constify.
12116         * linux-thread-db.c (thread_db_err_str): Constify.
12117         * lm32-tdep.c (lm32_register_name): Constify.
12118         * m2-exp.y (yyerror): Constify.
12119         * m2-lang.h (m2_yyerror): Constify.
12120         * m32r-tdep.c (m32r_register_names): Constify and make static.
12121         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12122         * m88k-tdep.c (m88k_register_name): Constify.
12123         * macroexp.c (appendmem): Constify.
12124         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12125         (upgrade_type, parse_external, parse_partial_symbols)
12126         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12127         (new_symbol): Constify.
12128         * memattr.c (mem_info_command): Constify.
12129         * mep-tdep.c (register_name_from_keyword): Constify.
12130         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12131         Constify.
12132         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12133         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12134         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12135         cast.
12136         (mi_execute_async_cli_command): Constify.
12137         * mips-tdep.c (mips_register_name): Constify.
12138         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12139         (am33_register_name, am33_2_register_name)
12140         * moxie-tdep.c (moxie_register_names): Constify.
12141         * nat/linux-osdata.c (osdata_type): Constify fields.
12142         * nto-tdep.c (nto_parse_redirection): Constify.
12143         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12144         (lookup_child_selector): Constify.
12145         (objc_methcall::name): Constify.
12146         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12147         (lookup_struct_typedef): Constify.
12148         * objfiles.c (pc_in_section): Constify.
12149         * objfiles.h (pc_in_section): Constify.
12150         * p-exp.y (struct token::oper): Constify.
12151         (yyerror): Constify.
12152         * p-lang.h (pascal_yyerror): Constify.
12153         * parser-defs.h (op_name_standard): Constify.
12154         (op_print::string): Constify.
12155         (exp_descriptor::op_name): Constify.
12156         * printcmd.c (print_address_symbolic): Constify.
12157         * psymtab.c (print_partial_symbols): Constify.
12158         * python/py-breakpoint.c (stop_func): Constify.
12159         (bppy_get_expression): Constify.
12160         * python/py-cmd.c (cmdpy_completer::name): Constify.
12161         (cmdpy_function): Constify.
12162         * python/py-event.c (evpy_add_attribute)
12163         (gdbpy_initialize_event_generic): Constify.
12164         * python/py-event.h (evpy_add_attribute)
12165         (gdbpy_initialize_event_generic): Constify.
12166         * python/py-evts.c (add_new_registry): Constify.
12167         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12168         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12169         * python/py-inferior.c (get_buffer): Add cast.
12170         * python/py-param.c (parm_constant::name): Constify.
12171         * python/py-unwind.c (fprint_frame_id): Constify.
12172         * python/python.c (gdbpy_parameter_value): Constify.
12173         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12174         * remote.c (memory_packet_config::name): Constify.
12175         (show_packet_config_cmd, remote_write_bytes)
12176         (remote_buffer_add_string):
12177         * reverse.c (exec_reverse_once): Constify.
12178         * rs6000-tdep.c (variant::name, variant::description): Constify.
12179         * rust-exp.y (rustyyerror): Constify.
12180         * rust-lang.c (rust_op_name): Constify.
12181         * rust-lang.h (rustyyerror): Constify.
12182         * serial.h (serial_ops::name): Constify.
12183         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12184         (sh_sh3e_register_name, sh_sh2e_register_name)
12185         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12186         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12187         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12188         (sh_sh4al_dsp_register_name): Constify.
12189         * sh64-tdep.c (sh64_register_name): Constify.
12190         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12191         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12192         * stabsread.c (patch_block_stabs, read_type_number)
12193         (ref_map::stabs, ref_add, process_reference)
12194         (symbol_reference_defined, define_symbol, define_symbol)
12195         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12196         (read_one_struct_field, read_struct_fields, read_baseclasses)
12197         (read_tilde_fields, read_struct_type, read_array_type)
12198         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12199         (read_huge_number, read_range_type, read_args, common_block_start)
12200         (find_name_end): Constify.
12201         * stabsread.h (common_block_start, define_symbol)
12202         (process_one_symbol, symbol_reference_defined, ref_add):
12203         * symfile.c (get_section_index, add_symbol_file_command):
12204         * symfile.h (get_section_index): Constify.
12205         * target-descriptions.c (tdesc_type::name): Constify.
12206         (tdesc_free_type): Add cast.
12207         * target.c (find_default_run_target):
12208         (add_deprecated_target_alias, find_default_run_target)
12209         (target_announce_detach): Constify.
12210         (do_option): Constify.
12211         * target.h (add_deprecated_target_alias): Constify.
12212         * thread.c (print_thread_info_1): Constify.
12213         * top.c (deprecated_readline_begin_hook, command_line_input):
12214         Constify.
12215         (init_main): Add casts.
12216         * top.h (handle_line_of_input): Constify.
12217         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12218         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12219         (tfind_command): Rename to ...
12220         (tfind_command_1): ... this and constify.
12221         (tfind_command): New function.
12222         (tfind_end_command, tfind_start_command): Adjust.
12223         (encode_source_string): Constify.
12224         * tracepoint.h (encode_source_string): Constify.
12225         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12226         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12227         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12228         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12229         * tui/tui-win.c (parse_scrolling_args): Constify.
12230         * tui/tui-windata.c (tui_erase_data_content): Constify.
12231         * tui/tui-windata.h (tui_erase_data_content): Constify.
12232         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12233         * tui/tui.c (tui_enable): Add cast.
12234         * utils.c (defaulted_query): Constify.
12235         (init_page_info): Add cast.
12236         (puts_debug, subset_compare): Constify.
12237         * utils.h (subset_compare): Constify.
12238         * varobj.c (varobj_format_string): Constify.
12239         * varobj.h (varobj_format_string): Constify.
12240         * vax-tdep.c (vax_register_name): Constify.
12241         * windows-nat.c (windows_detach): Constify.
12242         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12243         * xml-support.c (gdb_xml_end_element): Constify.
12244         * xml-tdesc.c (tdesc_start_reg): Constify.
12245         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12246         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12247         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12248
12249 2017-04-05  Pedro Alves  <palves@redhat.com>
12250
12251         * proc-api.c (struct trans): Constify.
12252         (procfs_note): Constify.
12253         * proc-events.c (struct trans, syscall_table):
12254         * proc-flags.c (struct trans): Constify.
12255         * proc-utils.h (procfs_note): Constify.
12256         * proc-why.c (struct trans): Constify.
12257         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12258         (procfs_detach): Constify.
12259         * sol-thread.c (struct string_map): Constify.
12260         (td_err_string, td_state_string): Constify.
12261
12262 2017-04-05  Pedro Alves  <palves@redhat.com>
12263
12264         * proc-api.c (procfs_filename): Don't initialize
12265         procfs_filename.
12266         (prepare_to_trace): Assume procfs_filename is non-NULL.
12267         (_initialize_proc_api): Give procfs_filename a default value here.
12268
12269 2017-04-05  Pedro Alves  <palves@redhat.com>
12270
12271         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12272         'cond_string' parameter.
12273         (extract_exception_regexp): Constify 'string' parameter.
12274         (catch_exception_command_1): Constify.
12275         * breakpoint.c (init_catchpoint)
12276         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12277         parameter.
12278         (ep_parse_optional_if_clause, catch_fork_command_1)
12279         (catch_exec_command_1): Constify.
12280         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12281         parameter.
12282         (ep_parse_optional_if_clause): Constify.
12283         * cli/cli-utils.c (remove_trailing_whitespace)
12284         (check_for_argument): Constify.
12285         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12286         non-const overload.
12287         (check_for_argument): Likewise.
12288
12289 2017-04-05  Pedro Alves  <palves@redhat.com>
12290
12291         * event-top.c (command_line_handler): Add cast to execute_command
12292         call.
12293         * record-btrace.c (cmd_record_btrace_bts_start)
12294         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12295         (cmd_record_btrace_start): Add cast to execute_command call.
12296         * record-full.c (record_full_goto_insn):
12297         * record.c (record_start, record_stop): Add cast to
12298         execute_command_to_string calls.
12299         (cmd_record_start): Add cast to execute_command calls.
12300
12301 2017-04-05  Pedro Alves  <palves@redhat.com>
12302
12303         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12304         static inline function.
12305         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12306         array and use gdb_PyArg_ParseTupleAndKeywords.
12307         * python/py-cmd.c (cmdpy_init): Likewise.
12308         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12309         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12310         (infpy_search_memory): Likewise.
12311         * python/py-objfile.c (objfpy_add_separate_debug_file)
12312         (gdbpy_lookup_objfile): Likewise.
12313         * python/py-symbol.c (gdbpy_lookup_symbol)
12314         (gdbpy_lookup_global_symbol): Likewise.
12315         * python/py-type.c (gdbpy_lookup_type): Likewise.
12316         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12317         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12318         Likewise.
12319
12320 2017-04-05  Pedro Alves  <palves@redhat.com>
12321
12322         * python/python-internal.h (gdb_PyGetSetDef): New type.
12323         * python/py-block.c (block_object_getset)
12324         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12325         * python/py-event.c (event_object_getset)
12326         (finish_breakpoint_object_getset): Likewise.
12327         * python/py-inferior.c (inferior_object_getset): Likewise.
12328         * python/py-infthread.c (thread_object_getset): Likewise.
12329         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12330         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12331         * python/py-objfile.c (objfile_getset): Likewise.
12332         * python/py-progspace.c (pspace_getset): Likewise.
12333         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12334         Likewise.
12335         * python/py-record.c (recpy_record_getset): Likewise.
12336         * python/py-symbol.c (symbol_object_getset): Likewise.
12337         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12338         Likewise.
12339         * python/py-type.c (type_object_getset, field_object_getset):
12340         Likewise.
12341         * python/py-value.c (value_object_getset): Likewise.
12342
12343 2017-04-05  Pedro Alves  <palves@redhat.com>
12344
12345         * python/python-internal.h (gdb_PyObject_CallMethod)
12346         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12347         New functions.
12348         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12349         (PySys_GetObject, PySys_SetPath): New macros.
12350
12351 2017-04-05  Pedro Alves  <palves@redhat.com>
12352
12353         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12354         info_osdata_command.
12355         * osdata.c (info_osdata_command): Rename to ...
12356         (info_osdata): ... this.  Constify 'type' parameter, and remove
12357         the 'from_tty' parameter.  Accept NULL TYPE.
12358         (info_osdata_command): New function.
12359         * osdata.h (info_osdata_command): Remove declaration.
12360         (info_osdata): New declaration.
12361
12362 2017-04-05  Pedro Alves  <palves@redhat.com>
12363
12364         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12365         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12366         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12367         parameter.
12368         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12369         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12370         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12371         parameter.
12372         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12373         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12374         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12375         (mi_cmd_file_list_exec_source_files)
12376         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12377         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12378         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12379         parameter.
12380         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12381         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12382         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12383         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12384         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12385         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12386         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12387         'command' parameter.
12388         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12389         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12390         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12391         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12392         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12393         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12394         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12395         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12396         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12397         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12398         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12399         parameter.
12400         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12401         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12402         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12403         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12404         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12405         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12406         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12407         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12408         (mi_cmd_data_list_changed_registers)
12409         (mi_cmd_data_write_register_values)
12410         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12411         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12412         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12413         (mi_cmd_list_features, mi_cmd_list_target_features)
12414         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12415         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12416         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12417         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12418         (mi_cmd_trace_frame_collected): Constify 'command'
12419         parameter.
12420         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12421         'command' parameter.
12422
12423 2017-04-05  Pedro Alves  <palves@redhat.com>
12424
12425         * ada-lang.c (ada_completer_word_break_characters): Now a const
12426         array.
12427         (ada_get_gdb_completer_word_break_characters): Constify.
12428         * completer.c (gdb_completer_command_word_break_characters)
12429         (gdb_completer_file_name_break_characters)
12430         (gdb_completer_quote_characters): Now const arrays.
12431         (get_gdb_completer_quote_characters): Constify.
12432         (set_rl_completer_word_break_characters): New function.
12433         (set_gdb_completion_word_break_characters)
12434         (complete_line_internal): Use it.
12435         * completer.h (get_gdb_completer_quote_characters): Constify.
12436         (set_rl_completer_word_break_characters): Declare.
12437         * f-lang.c (f_word_break_characters): Constify.
12438         * language.c (default_word_break_characters): Constify.
12439         * language.h (language_defn::la_word_break_characters): Constify.
12440         (default_word_break_characters): Constify.
12441         * top.c (init_main): Use set_rl_completer_word_break_characters.
12442
12443 2017-04-05  Pedro Alves  <palves@redhat.com>
12444
12445         * aix-thread.c (aix_thread_pid_to_str)
12446         (aix_thread_extra_thread_info): Constify.
12447         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12448         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12449         (bsd_uthread_pid_to_str): Constify.
12450         * corelow.c (core_pid_to_str): Constify.
12451         * darwin-nat.c (darwin_pid_to_str): Constify.
12452         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12453         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12454         Constify.
12455         * gnu-nat.c (gnu_pid_to_str): Constify.
12456         * go32-nat.c (go32_pid_to_str): Constify.
12457         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12458         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12459         * inferior.c (inferior_pid_to_str): Constify.
12460         * linux-nat.c (linux_nat_pid_to_str): Constify.
12461         * linux-tdep.c (linux_core_pid_to_str): Constify.
12462         * linux-thread-db.c (thread_db_pid_to_str)
12463         (thread_db_extra_thread_info): Constify.
12464         * nto-tdep.c (nto_extra_thread_info): Constify.
12465         * nto-tdep.h (nto_extra_thread_info): Constify.
12466         * obsd-nat.c (obsd_pid_to_str): Constify.
12467         * procfs.c (procfs_pid_to_str): Constify.
12468         * ravenscar-thread.c (ravenscar_extra_thread_info)
12469         (ravenscar_pid_to_str): Constify.
12470         * remote-sim.c (gdbsim_pid_to_str): Constify.
12471         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12472         Constify.
12473         * sol-thread.c (solaris_pid_to_str): Constify.
12474         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12475         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12476         * target.c (default_pid_to_str, target_pid_to_str)
12477         (normal_pid_to_str, default_pid_to_str): Constify.
12478         * target.h (target_ops::to_pid_to_str)
12479         (target_ops::to_extra_thread_info): Constify.
12480         (target_pid_to_str, normal_pid_to_str): Constify.
12481         * windows-nat.c (windows_pid_to_str): Constify.
12482         * gdbarch.sh (core_pid_to_str): Constify.
12483         * target-delegates.c: Regenerate.
12484         * gdbarch.h, gdbarch.c: Regenerate.
12485
12486 2017-04-05  Pedro Alves  <palves@redhat.com>
12487
12488         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12489         the memory of the temporary warning_pre_print override.
12490         * utils.c (warning_pre_print): Constify.
12491         * utils.h (warning_pre_print): Constify.
12492
12493 2017-04-05  Pedro Alves  <palves@redhat.com>
12494
12495         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12496         (shell_command): New function.
12497         (make_command): Use std::string.
12498         (init_cli_cmds): Register shell_command instead of shell_escape.
12499
12500 2017-04-05  Pedro Alves  <palves@redhat.com>
12501
12502         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12503         * tracepoint.c (default_collect): Don't initialize.
12504
12505 2017-04-05  Pedro Alves  <palves@redhat.com>
12506
12507         * macroexp.c (macro_buffer::shared): Now a bool.
12508         (init_buffer): Update.
12509         (init_shared_buffer): Constify 'addr' parameter.
12510         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12511         casts.
12512
12513 2017-04-05  Pedro Alves  <palves@redhat.com>
12514
12515         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12516         * disasm.c (set_disassembler_options): Constify local.
12517         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12518
12519 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12520
12521         PR gdb/21352
12522         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12523         option.
12524
12525 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12526
12527         * frame.c (frame_unwind_register_unsigned): Call
12528         frame_unwind_register_value.
12529
12530 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12531
12532         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12533         Use gdb_test_multiple, and don't match anchor.
12534
12535 2017-04-05  Pedro Alves  <palves@redhat.com>
12536
12537         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12538         (Write After Approval): Remove Simon Marchi.
12539
12540 2017-04-05  Pedro Alves  <palves@redhat.com>
12541
12542         * common/gdb_optional.h (optional::optional): Make constexpr and
12543         initialize m_dummy.
12544
12545 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12546
12547         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12548         (amd64fbsd_jmp_buf_reg_offset): Remove.
12549         (amd64fbsd_supply_uthread): Remove function.
12550         (amd64fbsd_collect_uthread): Remove function.
12551         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12552         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12553         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12554         (fbsd-nat.c): Update comment.
12555         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12556         (i386fbsd_jmp_buf_reg_offset): Remove.
12557         (i386fbsd_supply_uthread): Remove function.
12558         (i386fbsd_collect_uthread): Remove function.
12559         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12560
12561 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12562
12563         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12564         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12565         * NEWS: Mention that support for FreeBSD/alpha was removed.
12566         * alpha-fbsd-tdep.c: Delete file.
12567         * config/alpha/fbsd.mh: Delete file.
12568         * configure.host: Delete alpha*-*-freebsd* and
12569         alpha*-*-kfreebsd*-gnu.
12570         * configure.tgt: Delete alpha*-*-freebsd* and
12571         alpha*-*-kfreebsd*-gnu.
12572
12573 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12574
12575         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12576         amd64bsd_store_inferior_registers): Use ptid from regcache.
12577
12578 2017-04-04  Pedro Alves  <palves@redhat.com>
12579
12580         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12581         data fields, make them private and add "m_" prefixes.
12582         (lnp_state_machine::lnp_state_machine): New ctor.
12583         (record_line, check_line_address, handle_set_discriminator)
12584         (handle_set_address, handle_advance_pc, handle_special_opcode)
12585         (handle_advance_line, handle_set_file, handle_negate_stmt)
12586         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12587         (end_sequence, advance_line): New methods.
12588         (m_gdbarch, m_record_lines_p): New fields.
12589         (lnp_reader_state): Delete.
12590         (dwarf_record_line): Rename to ...
12591         (lnp_state_machine::record_line): ... adjust.
12592         (init_lnp_state_machine): Delete.
12593         (lnp_state_machine::lnp_state_machine): New.
12594         (check_line_address): Rename to ...
12595         (lnp_state_machine::check_line_address): This.
12596         (dwarf_decode_lines_1): Remove reference to "reader_state".
12597         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12598         State machine internal state manipulation moved to
12599         lnp_state_machine methods.
12600
12601 2017-04-04  Pedro Alves  <palves@redhat.com>
12602
12603         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12604         unittests/offset-type-selftests.c.
12605         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12606         * common/offset-type.h: New file.
12607         * common/preprocessor.h: New file.
12608         * common/traits.h: New file.
12609         * common/valid-expr.h: New file.
12610         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12611         sect_offset and cu_offset strong typedefs throughout.
12612         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12613         typedefs throughout.
12614         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12615         sect_offset and cu_offset strong typedefs throughout.
12616         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12617         typedefs throughout.
12618         * gdbtypes.h: Include "common/offset-type.h".
12619         (cu_offset): Now an offset type (strong typedef) instead of a
12620         struct.
12621         (sect_offset): Likewise.
12622         (union call_site_parameter_u): Rename "param_offset" field to
12623         "param_cu_off".
12624         * unittests/offset-type-selftests.c: New file.
12625
12626 2017-04-04  Pedro Alves  <palves@redhat.com>
12627
12628         * common/underlying.h: New file.
12629         * dwarf2read.c: Include "common/gdb_optional.h" and
12630         "common/underlying.h".
12631         (dir_index, file_name_index): New types.
12632         (file_entry): Use them.
12633         (file_entry::include): Use to_underlying.
12634         (line_header::add_file_name): Use dir_index.
12635         (read_formatted_entries): Use gdb::optional.  Read form before
12636         writting to file_entry.
12637         (dwarf_decode_line_header): Use dir_index.
12638         (lnp_state_machine::current_file): Use to_underlying.
12639         (lnp_state_machine::file): Change type to file_name_index.
12640         (dwarf_record_line): Use to_underlying.
12641         (init_lnp_state_machine): Use file_name_index.
12642         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12643
12644 2017-04-04  Pedro Alves  <palves@redhat.com>
12645
12646         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12647         operator bool, has_value and get methods.
12648
12649 2017-04-04  Pedro Alves  <palves@redhat.com>
12650
12651         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12652         fields.
12653         (line_header): Initialize all data fields.  Change type of
12654         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12655         Change type of include_dirs to std::vector<const char *>.  Remove
12656         num_include_dirs, include_dirs_size.  Change type of file_names to
12657         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12658         (line_header::line_header): New.
12659         (line_header::add_include_dir, line_header::add_file_name): New
12660         methods.
12661         (line_header::include_dir_at): Remove NULL check.
12662         (line_header::file_name_at): Add const overload.
12663         (line_header_up): New unique_ptr typedef.
12664         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12665         std::vector.  Remove free_line_header call.
12666         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12667         free_line_header call.
12668         (free_cu_line_header): Delete.
12669         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12670         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12671         Adjust to use std::vector.
12672         (free_line_header): Delete.
12673         (free_line_header_voidp): Use delete.
12674         (add_include_dir): Replace with ...
12675         (line_header::add_include_dir): ... this method.  Use std::vector.
12676         (add_file_name): Replace with ...
12677         (line_header::add_file_name): ... this method.  Use std::vector.
12678         (add_include_dir_stub): Delete.
12679         (read_formatted_entries): Remove memset.
12680         (dwarf_decode_line_header): Return a line_header_up instead of a
12681         raw pointer.  Remove cleanup handling.  Pass lambdas to
12682         read_formatted_entries.  Adjust to use line_header methods.
12683         (dwarf_decode_lines_1): Adjust to use line_header methods.
12684         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12685         use std::vector.
12686
12687 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12688
12689         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12690         instead of struct ptid.
12691
12692 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12693
12694         * frame.c (get_frame_register_bytes): Unwind using value.
12695         (put_frame_register_bytes): Likewise.
12696
12697 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12698
12699         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12700         aggregate-like.
12701
12702 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12703
12704         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12705
12706 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12707
12708         * gdbthread.h (struct thread_info): Declare constructor and
12709         destructor.  Add some in-class member initializers.
12710         * thread.c (free_thread): Remove.
12711         (init_thread_list): Call delete instead of free_thread.
12712         (new_thread): Call thread_info constructor.
12713         (thread_info::thread_info): New function.
12714         (thread_info::~thread_info): New function.
12715         (delete_thread_1): Call delete instead of free_thread.
12716         (make_cleanup_restore_current_thread): Move tp and frame to
12717         inner block.
12718
12719 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12720
12721         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12722         (arc_skip_prologue): Likewise.
12723         (arc_make_frame_cache): Likewise.
12724         (arc_pv_get_operand): New function.
12725         (arc_is_in_prologue): Likewise.
12726         (arc_analyze_prologue): Likewise.
12727         (arc_print_frame_cache): Likewise.
12728         (MAX_PROLOGUE_LENGTH): New constant.
12729
12730 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12731
12732         * configure.tgt: Add arc-insn.o.
12733         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12734         (dump_arc_instruction_command): New function.
12735         (arc_fprintf_disasm): Likewise.
12736         (arc_disassemble_info): Likewise.
12737         (arc_insn_get_operand_value): Likewise.
12738         (arc_insn_get_operand_value_signed): Likewise.
12739         (arc_insn_get_memory_base_reg): Likewise.
12740         (arc_insn_get_memory_offset): Likewise.
12741         (arc_insn_get_branch_target): Likewise.
12742         (arc_insn_dump): Likewise.
12743         (arc_insn_get_linear_next_pc): Likewise.
12744         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12745         (arc_disassemble_info): Likewise.
12746         (arc_insn_get_branch_target): Likewise.
12747         (arc_insn_get_linear_next_pc): Likewise.
12748         * NEWS: Mention new "maint print arc arc-instruction".
12749
12750 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12751
12752         * arc-tdep (maintenance_print_arc_list): New variable.
12753         (maintenance_print_arc_command): New function.
12754
12755 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12756
12757         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12758         Add "limm" and "reserved".
12759         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12760         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12761         * arc-tdep.h (arc_regnum): Likewise.
12762
12763 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12764
12765         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12766         for THREADPTR register.
12767         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12768         register.
12769         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12770         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12771         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12772
12773 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12774
12775         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12776         registers above gdbarch_num_regs (gdbarch) as privileged in
12777         call0 ABI.
12778
12779 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12780
12781         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12782         for a single specified register or for all registers in
12783         a0_base..a0_base + C0_NREGS range.
12784         (supply_gregset_reg): Call regcache_raw_supply for a single
12785         specified register or for all registers in a0_base..a0_base +
12786         C0_NREGS range.
12787
12788 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12789
12790         * arch/xtensa.h (C0_NREGS): Add definition.
12791         * xtensa-tdep.c (C0_NREGS): Remove definition.
12792
12793 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12794
12795         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12796         Drop xtensa_default_isa initialization.
12797         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12798
12799 2017-03-27  Pedro Alves  <palves@redhat.com>
12800
12801         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12802         (file_entry::include_dir): New method.
12803         (line_header::include_dir_at, line_header::file_name_at): New
12804         methods.
12805         (setup_type_unit_groups, setup_type_unit_groups)
12806         (psymtab_include_file_name): Simplify using the new methods.
12807         (lnp_state_machine) <the_line_header>: New field.
12808         <file>: Add comment.
12809         (lnp_state_machine::current_file): New method.
12810         (dwarf_record_line): Simplify using the new methods.
12811         (init_lnp_state_machine): Initialize the "the_line_header" field.
12812         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12813         Simplify using the new methods.
12814
12815 2017-03-27  Pedro Alves  <palves@redhat.com>
12816
12817         * cp-name-parser.y (make_empty): Delete.
12818         (demangler_special, nested_name, ptr_operator, array_indicator)
12819         (direct_declarator, declarator_1): Use fill_comp instead of
12820         make_empty.
12821
12822 2017-03-27  Pedro Alves  <palves@redhat.com>
12823
12824         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12825         to ATTRIBUTE_PRINTF.
12826         * solib-target.c (library_list_start_list): Print "string" not
12827         "version".
12828         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12829         gdb_xml_error call.
12830
12831 2017-03-27  Pedro Alves  <palves@redhat.com>
12832
12833         * dwarf2read.c (struct file_and_directory): New.
12834         (dwarf2_get_dwz_file): Adjust to use std::string.
12835         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12836         (find_file_and_directory): Adjust to return a file_and_directory
12837         object.
12838         (read_file_scope): Adjust to use file_and_directory.  Remove
12839         make_cleanup/do_cleanups calls.
12840         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12841         make_cleanup/do_cleanups calls.
12842         * python/python.c (do_start_initialization): Adjust to ldirname
12843         returning a std::string.
12844         * utils.c (ldirname): Now returns a std::string.
12845         * utils.h (ldirname): Change return type to std::string.
12846         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12847         returning a std::string.
12848         * xml-tdesc.c (file_read_description_xml): Likewise.
12849
12850 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12851
12852         * regcache.c (regcache_debug_print_register): New function.
12853         * regcache.h (regcache_debug_print_register): New declaration.
12854         * target.c (debug_print_register): Remove.
12855         (target_fetch_registers): Call regcache_debug_print_register.
12856         (target_store_registers): Likewise.
12857
12858 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12859
12860         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12861         reference beyond the 'lh->include_dirs' array before accessing to
12862         it.
12863         (psymtab_include_file_name): Likewise.
12864         (dwarf_decode_lines_1): Likewise.
12865         (dwarf_decode_lines): Likewise.
12866         (file_file_name): Likewise.
12867
12868 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12869
12870         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12871         inferior_ptid.
12872         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12873         ps_lsetfpregs): Likewise.
12874         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12875         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12876         ps_lsetfpregs): Likewise.
12877         * target.c (target_fetch_registers, target_store_registers):
12878         Remove asserts.
12879
12880 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12881
12882         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12883
12884 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12885
12886         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12887         (_initialize_aarch64_tdep): Register it.
12888         (aarch64_record_load_store): Handle PRFM instruction.
12889         (aarch64_process_record_test): New function.
12890
12891 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12892
12893         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12894         indentation.
12895
12896 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12897
12898         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12899
12900 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12901
12902         python/python.c (do_start_initialization): Fix memory leak.
12903
12904 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12905
12906         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12907         using get_ptrace_pid.
12908         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12909         inferior_ptid.
12910         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12911         inferior_ptid instead of pid.
12912
12913 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12914
12915         * aarch64-tdep.c: Wrap locally used classes in anonymous
12916         namespace.
12917         * arm-tdep.c: Likewise.
12918         * linespec.c: Likewise.
12919         * ui-out.c: Likewise.
12920
12921 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12922
12923         PR gdb/19637
12924         * python/lib/gdb/printer/bound_registers.py: Import sys.
12925
12926 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12927
12928         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12929         windows_thread_info parameter and use it instead of
12930         current_thread.
12931         (windows_fetch_inferior_registers): Don't set current_thread,
12932         pass the thread to do_windows_fetch_inferior_registers.  Use
12933         ptid from regcache instead of inferior_ptid.
12934         (do_windows_store_inferior_registers): Add windows_thread_info
12935         parameter and use it instead of current_thread.
12936         (windows_store_inferior_registers): Don't set current_thread,
12937         pass the thread to do_windows_store_inferior_registers.  Use
12938         ptid from regcache instead of inferior_ptid.
12939
12940 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12941
12942         * ser-mingw.c (ser_windows_raw): Remove reference to
12943         struct serial::current_timeout.
12944
12945 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12946
12947         PR tdep/20928
12948         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12949         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12950         (sparc64_fsr_type): Fix %fsr decoding.
12951
12952 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12953
12954         * python/py-record-btrace.c (btpy_insn_data): Change return type
12955         for Python 2.
12956
12957 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12958
12959         * spu-linux-nat.c (spu_fetch_inferior_registers,
12960         spu_store_inferior_registers): Use ptid from regcache, set and
12961         restore inferior_ptid.
12962         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12963         Likewise.
12964
12965 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12966
12967         * i386-linux-nat.c (fetch_register, store_register,
12968         i386_linux_fetch_inferior_registers,
12969         i386_linux_store_inferior_registers): Use ptid from regcache.
12970         * ia64-linux-nat.c (ia64_linux_fetch_register,
12971         ia64_linux_store_register): Likewise.
12972         * inf-ptrace.c (inf_ptrace_fetch_register,
12973         inf_ptrace_store_register): Likewise.
12974         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12975         m32r_linux_store_inferior_registers): Likewise.
12976         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12977         m68kbsd_store_inferior_registers): Likewise.
12978         * m68k-linux-nat.c (fetch_register, store_register,
12979         m68k_linux_fetch_inferior_registers,
12980         m68k_linux_store_inferior_registers): Likewise.
12981         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12982         m88kbsd_store_inferior_registers): Likewise.
12983         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12984         mips_fbsd_store_inferior_registers): Likewise.
12985         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12986         mips64_linux_regsets_store_registers): Likewise.
12987         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12988         mipsnbsd_store_inferior_registers): Likewise.
12989         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12990         mips64obsd_store_inferior_registers): Likewise.
12991         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12992         Likewise.
12993         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12994         ppcfbsd_store_inferior_registers): Likewise.
12995         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12996         ppc_linux_store_inferior_registers): Likewise.
12997         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12998         ppcnbsd_store_inferior_registers): Likewise.
12999         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13000         ppcobsd_store_registers): Likewise.
13001         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13002         Likewise.
13003         * ravenscar-thread.c (ravenscar_fetch_registers,
13004         ravenscar_store_registers, ravenscar_prepare_to_store):
13005         Likewise.
13006         * record-btrace.c (record_btrace_fetch_registers,
13007         record_btrace_store_registers, record_btrace_prepare_to_store):
13008         Likewise.
13009         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13010         Lookup inferior using ptid from regcache, instead of
13011         current_inferior.
13012         * remote.c (remote_fetch_registers, remote_store_registers): Use
13013         ptid from regcache.
13014         * rs6000-nat.c (fetch_register, store_register): Likewise.
13015         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13016         s390_linux_store_inferior_registers): Likewise.
13017         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13018         shnbsd_store_inferior_registers): Likewise.
13019         * sol-thread.c (sol_thread_fetch_registers,
13020         sol_thread_store_registers): Likewise.
13021         * sparc-nat.c (sparc_fetch_inferior_registers,
13022         sparc_store_inferior_registers): Likewise.
13023         * tilegx-linux-nat.c (fetch_inferior_registers,
13024         store_inferior_registers): Likewise.
13025         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13026         vaxbsd_store_inferior_registers): Likewise.
13027         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13028         store_xtregs): Likewise.
13029
13030 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13031
13032         PR gdb/14441
13033         * NEWS: Mention support for rvalue references in GDB and python.
13034         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13035         supports both lvalue and rvalue references.
13036
13037 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13038
13039         PR gdb/14441
13040         * gdbtypes.c (rank_one_type): Implement overloading
13041         resolution rules regarding rvalue references.
13042
13043 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13044
13045         PR gdb/14441
13046         * aarch64-tdep.c (aarch64_type_align)
13047         (aarch64_extract_return_value, aarch64_store_return_value): Change
13048         lvalue reference type checks to general reference type checks.
13049         * amd64-tdep.c (amd64_classify): Likewise.
13050         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13051         Likewise.
13052         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13053         (arm_store_return_value): Likewise.
13054         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13055         * c-typeprint.c (c_print_type): Likewise.
13056         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13057         (cplus_number_of_children, cplus_describe_child): Likewise.
13058         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13059         * completer.c (expression_completer): Likewise.
13060         * cp-support.c (make_symbol_overload_list_adl_namespace):
13061         Likewise.
13062         * darwin-nat-info.c (info_mach_region_command): Likewise.
13063         * dwarf2loc.c (entry_data_value_coerce_ref)
13064         (value_of_dwarf_reg_entry): Likewise.
13065         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13066         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13067         Likewise.
13068         * findvar.c (extract_typed_address, store_typed_address):
13069         Likewise.
13070         * gdbtypes.c (rank_one_type): Likewise.
13071         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13072         * infcall.c (value_arg_coerce): Likewise.
13073         * language.c (pointer_type): Likewise.
13074         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13075         Likewise.
13076         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13077         * mn10300-tdep.c (mn10300_type_align): Likewise.
13078         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13079         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13080         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13081         Likewise.
13082         * printcmd.c (print_formatted, x_command): Likewise.
13083         * python/py-type.c (typy_get_composite, typy_template_argument):
13084         Likewise.
13085         * python/py-value.c (valpy_referenced_value)
13086         (valpy_get_dynamic_type, value_has_field): Likewise.
13087         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13088         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13089         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13090         * spu-tdep.c (spu_scalar_value_p): Likewise.
13091         * symtab.c (lookup_symbol_aux): Likewise.
13092         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13093         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13094         Likewise.
13095         * valops.c (value_cast_pointers, value_cast)
13096         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13097         (value_struct_elt, value_struct_elt_bitpos)
13098         (value_find_oload_method_list, find_overload_match)
13099         (value_rtti_indirect_type): Likewise.
13100         * valprint.c (val_print_scalar_type_p, generic_val_print):
13101         Likewise.
13102         * value.c (value_actual_type, value_as_address, unpack_long)
13103         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13104         (coerce_ref): Likewise.
13105         * varobj.c (varobj_get_value_type): Likewise.
13106
13107 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13108
13109         PR gdb/14441
13110         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13111         table of constants.
13112         * python/lib/gdb/command/explore.py: Support exploring values
13113         of rvalue reference types.
13114         * python/lib/gdb/types.py: Implement get_basic_type() for
13115         rvalue reference types.
13116         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13117         constant.
13118         * python/py-value.c (valpy_getitem): Add an rvalue reference
13119         check.
13120         (valpy_reference_value): Add new parameter "refcode".
13121         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13122         New wrappers for valpy_reference_value().
13123         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13124         (gdbpy_invoke_xmethod): Likewise.
13125
13126 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13127
13128         PR gdb/14441
13129         * dwarf2read.c (process_die, read_type_die_1): Handle the
13130         DW_TAG_rvalue_reference_type DIE.
13131         (read_tag_reference_type): Add new parameter "refcode".
13132
13133 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13134
13135         PR gdb/14441
13136         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13137         (c_type_print_modifier, c_type_print_varspec_suffix)
13138         (c_type_print_base): Support printing rvalue reference types.
13139         * c-valprint.c (c_val_print, c_value_print): Support printing
13140         rvalue reference values.
13141
13142 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13143
13144         PR gdb/14441
13145         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13146         typename.
13147         * cp-support.c (replace_typedefs): Handle
13148         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13149         * python/py-type.c (typy_lookup_type): Likewise.
13150
13151 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13152
13153         PR gdb/14441
13154         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13155         * parse.c (insert_type): Change assert statement.
13156         (follow_types): Handle rvalue reference types.
13157         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13158         constant.
13159
13160 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13161
13162         PR gdb/14441
13163         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13164         value_ref() interface.
13165         * c-valprint.c (c_value_print): Likewise.
13166         * infcall.c (value_arg_coerce): Likewise.
13167         * python/py-value.c (valpy_reference_value): Likewise.
13168         * valops.c (value_cast, value_reinterpret_cast)
13169         (value_dynamic_cast, typecmp): Likewise.
13170         (value_ref): Parameterize by kind of return value reference type.
13171         * value.h (value_ref): Add new parameter "refcode".
13172
13173 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13174
13175         PR gdb/14441
13176         * dwarf2read.c (read_tag_reference_type): Use
13177         lookup_lvalue_reference_type() instead of lookup_reference_type().
13178         * eval.c (evaluate_subexp_standard): Likewise.
13179         * f-exp.y: Likewise.
13180         * gdbtypes.c (make_reference_type, lookup_reference_type):
13181         Generalize with rvalue reference types.
13182         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13183         convenience wrappers for lookup_reference_type().
13184         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13185         reference kind parameter.
13186         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13187         wrappers for lookup_reference_type().
13188         * guile/scm-type.c (gdbscm_type_reference): Use
13189         lookup_lvalue_reference_type() instead of lookup_reference_type().
13190         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13191         * parse.c (follow_types): Likewise.
13192         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13193         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13194         Likewise.
13195         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13196         (gdbpy_invoke_xmethod): Likewise.
13197         * stabsread.c: Provide extra argument to make_reference_type()
13198         call.
13199         * valops.c (value_ref, value_rtti_indirect_type): Use
13200         lookup_lvalue_reference_type() instead of lookup_reference_type().
13201
13202 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13203
13204         PR gdb/14441
13205         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13206         (TYPE_IS_REFERENCE): New macro.
13207         (struct type): Add rvalue_reference_type field.
13208         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13209
13210 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13211
13212         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13213         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13214         New function definition.
13215         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13216         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13217         New function declaration.
13218         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13219         * mi/mi-interp.h: New file.
13220         * solib.c (info_sharedlibrary_command): Replace for loop with
13221         ALL_SO_LIBS macro
13222         * solib.h (update_solib_list): New function declaration.
13223         (so_list_head): Move macro.
13224         * solist.h (ALL_SO_LIBS): New macro.
13225
13226 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13227
13228         * infcmd.c (post_create_inferior): Remove unused argument in
13229         call to solib_add.
13230         * remote.c (remote_start_remote): Likewise.
13231         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13232         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13233         (enable_break): Likewise.
13234         * solib.c (update_solib_list): Remove unused target argument
13235         and its documentation.
13236         (solib_add): Remove unused target argument.  Remove unused
13237         argument in call to update_solib_list.
13238         (info_sharedlibrary_command): Remove unused argument in call
13239         to update_solib_list.
13240         (sharedlibrary_command): Remove unused argument in call to
13241         solib_add.
13242         (handle_solib_event): Likewise.
13243         (reload_shared_libraries): Likewise.
13244         * solib.h (solib_add): Remove unused target argument.
13245
13246 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13247
13248         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13249         (s390_displaced_step_fixup): Cover relative branches with the
13250         default fixup handling.  This fixes lack of support for some
13251         relative branch instructions.
13252
13253 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13254
13255         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13256         ptid from regcache.
13257
13258 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13259
13260         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13261         i386_darwin_store_inferior_registers): Use ptid from regcache.
13262
13263 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13264
13265         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13266         i386bsd_store_inferior_registers): Use ptid from regcache.
13267
13268 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13269
13270         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13271         hppaobsd_store_registers): Use ptid from regcache.
13272
13273 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13274
13275         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13276         hppanbsd_store_registers): Use ptid from regcache.
13277
13278 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13279
13280         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13281         from regcache.  Use get_ptrace_pid.
13282
13283 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13284
13285         * corelow.c (get_core_register_section): Use ptid from regcache,
13286         update doc.
13287
13288 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13289
13290         * bsd-uthread.c (bsd_uthread_fetch_registers,
13291         bsd_uthread_store_registers): Use ptid from regcache, set and
13292         restore inferior_ptid.
13293
13294 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13295
13296         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13297         fetch_fp_regs, store_register, store_regs, store_fp_register,
13298         store_fp_regs): Use ptid from regcache.
13299
13300 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13301
13302         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13303         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13304         store_vfp_regs): Use ptid from regcache.
13305
13306 2017-03-17  Pedro Alves  <palves@redhat.com>
13307
13308         PR remote/21188
13309         * ser-base.c (ser_base_wait_for): Add comment.
13310         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13311         version.
13312         * ser-unix.c (hardwire_raw): Remove reference to
13313         scb->current_timeout.
13314         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13315         (hardwire_ops): Install ser_base_readchar instead of
13316         hardwire_readchar.
13317         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13318         Remove fields.
13319
13320 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13321
13322         PR gdb/19637
13323         * python/lib/gdb/printer/bound_registers.py: Add support for
13324         Python 3.
13325
13326 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13327
13328         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13329         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13330         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13331         byte_offset to subobj_byte_offset.  Fix the handling of
13332         DWARF_VALUE_STACK on big-endian targets when coming via an
13333         implicit pointer.
13334         (dwarf2_evaluate_loc_desc): Adjust call to
13335         dwarf2_evaluate_loc_desc_full.
13336         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13337         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13338
13339 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13340
13341         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13342         and REVSH instructions.
13343
13344 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13345
13346         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13347         (arm_record_test): Declare.
13348         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13349         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13350         align with the manual.
13351         (thumb_record_misc): Adjust the code order to align with the
13352         manual.
13353         (thumb2_record_decode_insn_handler): Fix instruction matching.
13354         (instruction_reader_thumb): New class.
13355         (arm_record_test): New function.
13356
13357 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13358
13359         * arm-tdep.c (abstract_memory_reader): New class.
13360         (instruction_reader): New class.
13361         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13362         (decode_insn): Likewise.
13363
13364 2017-03-16  Doug Evans  <dje@google.com>
13365
13366         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13367         member.  Change type of TYPE member to SCM.  All uses updated.
13368         (lsscm_make_lazy_string_smob): Add assert.
13369         (lsscm_make_lazy_string): Flag bad length values.
13370         (lsscm_elt_type): New function.
13371         (gdbscm_lazy_string_to_value): Rewrite to use
13372         lsscm_safe_lazy_string_to_value.
13373         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13374         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13375         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13376         in incoming type.
13377         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13378         * guile/scm-type.c (tyscm_scm_to_type): New function.
13379
13380 2017-03-15  Doug Evans  <dje@google.com>
13381
13382         PR python/17728, python/18439, python/18779
13383         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13384         member.  Change type of TYPE member to PyObject *.  All uses updated.
13385         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13386         (gdbpy_create_lazy_string_object): Flag bad length values.
13387         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13388         Handle typedefs in incoming type.
13389         (stpy_lazy_string_elt_type): New function.
13390         (gdbpy_extract_lazy_string): Call it.
13391         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13392         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13393         typedefs in incoming type.
13394
13395 2017-03-16  Doug Evans  <dje@google.com>
13396
13397         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13398         * guile/scm-type.c (tyscm_scm_to_type): New function.
13399
13400 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13401
13402         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13403         "ULONGEST" for "skip".
13404
13405 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13406
13407         PR gdb/21220
13408         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13409         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13410         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13411         over ptrace peek/poke until end of buffer or error.
13412
13413 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13414
13415         * parse.c (length_of_subexp): Make static.
13416         * parser-defs.h (length_of_subexp): Remove.
13417
13418 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13419
13420         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13421         as well.
13422
13423 2017-03-14  Pedro Alves  <palves@redhat.com>
13424
13425         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13426         (main): Use std::unique_ptr.  Remove calls to
13427         cp_demangled_name_parse_free.
13428
13429 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13430
13431         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13432         alphabsd_store_inferior_registers): Use regcache->ptid instead
13433         of inferior_ptid.
13434
13435 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13436
13437         * aix-thread.c (aix_thread_fetch_registers,
13438         aix_thread_store_registers): Use regcache->ptid instead of
13439         inferior_ptid.
13440
13441 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13442
13443         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13444         store_gregs_to_thread, fetch_fpregs_from_thread,
13445         store_fpregs_to_thread): Use regcache->ptid instead of
13446         inferior_ptid.
13447
13448 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13449
13450         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13451         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13452         instead of inferior_ptid.
13453
13454 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13455
13456         * target.c (target_fetch_registers, target_store_registers): Add
13457         assert.
13458
13459 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13460
13461         * regcache.h (regcache_get_ptid): New function.
13462         * regcache.c (regcache_get_ptid): New function.
13463
13464 2017-03-13  Mark Wielaard  <mark@klomp.org>
13465
13466         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13467
13468 2017-03-10  Keith Seitz  <keiths@redhat.com>
13469
13470         PR c++/8218
13471         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13472
13473 2017-03-08  Pedro Alves  <palves@redhat.com>
13474
13475         PR gdb/18360
13476         * infrun.c (start_step_over, do_target_resume, resume)
13477         (restart_threads): Assert we're not resuming a thread that is
13478         meant to be stopped.
13479         (infrun_thread_stop_requested_callback): Delete.
13480         (infrun_thread_stop_requested): If the thread is internally
13481         stopped, queue a pending stop event and clear the thread's
13482         inline-frame state.
13483         (handle_stop_requested): New function.
13484         (handle_syscall_event, handle_inferior_event_1): Use
13485         handle_stop_requested.
13486         (handle_stop_requested): New function.
13487         (handle_signal_stop): Set the thread's stop_signal here instead of
13488         at caller.
13489         (finish_step_over): Clear step over info unconditionally.
13490         (handle_signal_stop): If the user had interrupted the event
13491         thread, consider the stop a random signal.
13492         (handle_signal_stop) <signal arrived while stepping over
13493         breakpoint>: Don't restart threads here.
13494         (stop_waiting): Don't clear step-over info here.
13495
13496 2017-03-08  Pedro Alves  <palves@redhat.com>
13497
13498         PR 21206
13499         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13500         goes to argument 2, not 1.
13501
13502 2017-03-08  Pedro Alves  <palves@redhat.com>
13503
13504         PR cli/21218
13505         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13506         display_gdb_prompt.
13507         (command_line_input): Add comment.
13508
13509 2017-03-08  Pedro Alves  <palves@redhat.com>
13510
13511         PR tui/21216
13512         * tui/tui-file.c (tui_file::write): New.
13513         * tui/tui-file.h (tui_file): Override "write".
13514         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13515         factored out from ...
13516         (tui_puts): ... here.
13517         (tui_putc): Use them.
13518         (tui_write): New function.
13519         * tui/tui-io.h (tui_write): Declare.
13520
13521 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13522
13523         * Makefile.in (SFILES): Replace "environ.c" with
13524         "common/environ.c".
13525         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13526         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13527         to...
13528         * common/environ.c: ... here.
13529         * environ.h: Moved to...
13530         * common/environ.h: ... here.
13531
13532 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13533
13534         * gdbarch.sh (pstring_ptr): New static function.
13535         (gdbarch_disassembler_options): Use it.
13536         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13537         not valid_disassembler_option->name.
13538         * gdbarch.c: Regenerate.
13539
13540 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13541
13542         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13543
13544 2017-03-07  Pedro Alves  <palves@redhat.com>
13545
13546         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13547
13548 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13549
13550         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13551         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13552         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13553         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13554
13555 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13556
13557         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13558
13559 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13560
13561         * remote.c (remote_add_target_side_commands): Use range-based
13562         for loop.
13563
13564 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13565
13566         PR gdb/21165
13567         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13568         value is lazy.
13569         * valprint.c (common_val_print): Likewise.
13570
13571 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13572
13573         * NEWS: Mention new set/show disassembler-options commands.
13574         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13575         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13576         (prospective_options): New static variable.
13577         (gdb_disassembler::gdb_disassembler): Initialize
13578         m_di.disassembler_options.
13579         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13580         (get_disassembler_options): New function.
13581         (set_disassembler_options): Likewise.
13582         (set_disassembler_options_sfunc): Likewise.
13583         (show_disassembler_options_sfunc): Likewise.
13584         (disassembler_options_completer): Likewise.
13585         (_initialize_disasm): Likewise.
13586         * disasm.h (get_disassembler_options): New prototype.
13587         (set_disassembler_options): Likewise.
13588         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13589         (gdbarch_verify_disassembler_options): Likewise.
13590         * gdbarch.c: Regenerate.
13591         * gdbarch.h: Likewise.
13592         * arm-tdep.c (num_disassembly_options): Delete.
13593         (set_disassembly_style): Likewise.
13594         (arm_disassembler_options): New static variable.
13595         (set_disassembly_style_sfunc): Convert short style name into long
13596         option name.  Call set_disassembler_options.
13597         (show_disassembly_style_sfunc): New function.
13598         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13599         set_gdbarch_verify_disassembler_options.
13600         (_initialize_arm_tdep): Delete regnames variable and update callers.
13601         (arm_disassembler_options): Initialize.
13602         (disasm_options): New variable.
13603         (num_disassembly_options): Rename from this...
13604         (num_disassembly_styles): ...to this.  Compute by scanning through
13605         disasm_options.
13606         (valid_disassembly_styles): Initialize using disasm_options.
13607         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13608         set_arm_regname_option.
13609         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13610         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13611         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13612         set_gdbarch_verify_disassembler_options.
13613         * s390-tdep.c (s390_disassembler_options): New static variable.
13614         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13615         set_gdbarch_verify_disassembler_options.
13616
13617 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13618
13619         * remote.c (remote_add_target_side_condition): Remove "struct"
13620         keyword from range-based for loop.
13621
13622 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13623
13624         * remote.c (remote_add_target_side_condition): Use range-based
13625         for loop.  Update comment.
13626
13627 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13628
13629         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13630
13631 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13632
13633         * regcache.c (regcache_raw_update): New function.
13634         (regcache_raw_read): Move code to regcache_raw_update.
13635         * regcache.h (regcache_raw_update): New declaration.
13636         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13637
13638 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13639
13640         * dwarf2read.c (create_debug_type_hash_table): Initialize
13641         header.signature and header.type_offset_in_tu.
13642
13643 2017-02-24  Pedro Alves  <palves@redhat.com>
13644
13645         * symtab.c (make_file_symbol_completion_list_1): Use
13646         add_symtab_completions.
13647
13648 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13649
13650         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13651
13652 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13653
13654         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13655         I386_MAX_REGISTER_SIZE.
13656         (i386_pseudo_register_write): Likewise.
13657         (i386_process_record): Likewise.
13658         * i387-tdep.c (i387_supply_xsave): Likewise.
13659         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13660         (store_register): Likewise.
13661
13662 2017-02-23  Pedro Alves  <palves@redhat.com>
13663
13664         * ada-lang.c: Include "common/function-view.h".
13665         (ada_iterate_over_symbols): Adjust to use function_view as
13666         callback type.
13667         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13668         (ada_make_symbol_completion_list): Use a lambda.
13669         (ada_exc_search_name_matches): Delete.
13670         (name_matches_regex): New.
13671         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13672         * compile/compile-c-support.c: Include "common/function-view.h".
13673         (print_one_macro): Change prototype to accept a ui_file pointer.
13674         (write_macro_definitions): Use a lambda.
13675         * dwarf2read.c: Include "common/function-view.h".
13676         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13677         (dw2_expand_symtabs_matching): Adjust to use function_view as
13678         callback type.
13679         * language.h: Include "common/function-view.h".
13680         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13681         function_view as callback type.
13682         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13683         * linespec.c: Include "common/function-view.h".
13684         (collect_info::add_symbol): New method.
13685         (struct symbol_and_data_callback, iterate_inline_only, struct
13686         symbol_matcher_data, iterate_name_matcher): Delete.
13687         (iterate_over_all_matching_symtabs): Adjust to use function_view
13688         as callback type and lambdas.
13689         (iterate_over_file_blocks): Adjust to use function_view as
13690         callback type.
13691         (decode_compound_collector): Now a class with private fields.
13692         (decode_compound_collector::release_symbols): New method.
13693         (collect_one_symbol): Rename to...
13694         (decode_compound_collector::operator()): ... this and adjust.
13695         (lookup_prefix_sym): decode_compound_collector construction bits
13696         move to decode_compound_collector ctor.  Pass the
13697         decode_compound_collector object directly as callback.  Remove
13698         cleanups and use decode_compound_collector::release_symbols
13699         instead.
13700         (symtab_collector): Now a class with private fields.
13701         (symtab_collector::release_symtabs): New method.
13702         (add_symtabs_to_list): Rename to...
13703         (symtab_collector::operator()): ... this and adjust.
13704         (collect_symtabs_from_filename): symtab_collector construction
13705         bits move to symtab_collector ctor.  Pass the symtab_collector
13706         object directly as callback.  Remove cleanups and use
13707         symtab_collector::release_symtabs instead.
13708         (collect_symbols): Delete.
13709         (add_matching_symbols_to_info): Use lambdas.
13710         * macrocmd.c (print_macro_callback): Delete.
13711         (info_macro_command): Use a lambda.
13712         (info_macros_command): Pass print_macro_definition as callable
13713         directly.
13714         (print_one_macro): Remove 'ignore' parameter.
13715         (macro_list_command): Adjust.
13716         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13717         (macro_for_each_data::user_data): Delete field.
13718         (foreach_macro): Adjust to call the function_view.
13719         (macro_for_each): Adjust to use function_view as callback type.
13720         (foreach_macro_in_scope): Adjust to call the function_view.
13721         (macro_for_each_in_scope): Adjust to use function_view as callback
13722         type.
13723         * macrotab.h: Include "common/function-view.h".
13724         (macro_callback_fn): Declare a prototype instead of a pointer.
13725         Remove "user_data" parameter.
13726         (macro_for_each, macro_for_each_in_scope): Adjust to use
13727         function_view as callback type.
13728         * psymtab.c (partial_map_expand_apply)
13729         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13730         Adjust to use function_view as callback type and to return bool.
13731         (psym_expand_symtabs_matching): Adjust to use function_view as
13732         callback types.
13733         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13734         to use function_view as callback type and to return bool.
13735         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13736         callback types.
13737         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13738         as callback types.
13739         * symfile.h: Include "common/function-view.h".
13740         (expand_symtabs_file_matcher_ftype)
13741         (expand_symtabs_symbol_matcher_ftype)
13742         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13743         return bool.
13744         (quick_symbol_functions::map_symtabs_matching_filename)
13745         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13746         function_view as callback type and return bool.
13747         (expand_symtabs_matching): Adjust to use function_view as callback
13748         type.
13749         (maintenance_expand_name_matcher)
13750         (maintenance_expand_file_matcher): Delete.
13751         (maintenance_expand_symtabs): Use lambdas.
13752         * symtab.c (iterate_over_some_symtabs): Adjust to use
13753         function_view as callback types and return bool.
13754         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13755         of a cleanup.
13756         (lookup_symtab_callback): Delete.
13757         (lookup_symtab): Use a lambda.
13758         (iterate_over_symbols): Adjust to use function_view as callback
13759         type.
13760         (struct search_symbols_data, search_symbols_file_matches)
13761         (search_symbols_name_matches): Delete.
13762         (search_symbols): Use a pair of lambdas.
13763         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13764         (symtab_expansion_callback): Delete.
13765         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13766         * symtab.h: Include "common/function-view.h".
13767         (iterate_over_some_symtabs): Adjust to use function_view as
13768         callback type and return bool.
13769         (iterate_over_symtabs): Adjust to use function_view as callback
13770         type.
13771         (symbol_found_callback_ftype): Remove 'data' parameter and return
13772         bool.
13773         (iterate_over_symbols): Adjust to use function_view as callback
13774         type.
13775
13776 2017-02-23  Pedro Alves  <palves@redhat.com>
13777
13778         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13779         (%.o) <unittests/%.c>: New pattern.
13780         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13781         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13782         * common/function-view.h: New file.
13783         * unittests/function-view-selftests.c: New file.
13784         * configure: Regenerate.
13785
13786 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13787
13788         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13789         inferior_ptid.
13790         * go32-nat.c (go32_thread_alive): Likewise.
13791
13792 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13793
13794         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13795         delete.
13796
13797 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13798
13799         * varobj.c (varobj_clear_saved_item): Use delete instead of
13800         xfree.
13801         (update_dynamic_varobj_children): Likewise.
13802
13803 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13804
13805         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13806
13807 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13808
13809         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13810         m_enum_value to 0 in default constructor.
13811
13812 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13813
13814         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13815         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13816         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13817         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13818         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13819         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13820         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13821         IS_STORE_CONDITIONAL_INSN.
13822
13823 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13824
13825         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13826
13827 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13828
13829         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13830
13831 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13832
13833         * dwarf2read.c (skip_one_die, read_attribute_value)
13834         (dwarf2_const_value_attr, dump_die_shallow)
13835         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13836         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13837
13838 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13839
13840         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13841         (dwarf_parse_macro_header): Accept DWARF version 5.
13842         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13843
13844 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13845
13846         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13847         DW_AT_GNU_*.
13848         * common/common-exceptions.h (enum errors): Likewise.
13849         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13850         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13851         (dwarf_expr_context::execute_stack_op): Likewise.
13852         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13853         Likewise.
13854         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13855         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13856         (show_entry_values_debug, call_site_to_target_addr)
13857         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13858         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13859         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13860         (value_of_dwarf_block_entry, indirect_pieced_value)
13861         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13862         (disassemble_dwarf_expression): Likewise.
13863         * dwarf2read.c (process_die, inherit_abstract_dies)
13864         (read_call_site_scope): Likewise.
13865         * gdbtypes.h (struct func_type, struct call_site_parameter)
13866         (struct call_site): Likewise.
13867         * stack.c (read_frame_arg): Likewise.
13868         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13869
13870 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13871
13872         * defs.h (read_unsigned_leb128): New declaration.
13873         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13874         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13875         (dwarf2_find_location_expression): Call also
13876         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13877         * dwarf2loc.h (dwarf2_version): New declaration.
13878         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13879         rnglists.
13880         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13881         .debug_rnglists.
13882         (struct dwop_section_names): Add loclists_dwo.
13883         (dwop_section_names): Add .debug_loclists.dwo.
13884         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13885         (struct dwarf2_per_cu_data): Add dwarf_version.
13886         (struct dwo_sections): Add loclists.
13887         (struct attr_abbrev): Add implicit_const.
13888         (read_indirect_line_string): New declaration.
13889         (read_unsigned_leb128): Delete declaration.
13890         (rcuh_kind): New definition.
13891         (read_and_check_comp_unit_head): Change parameter
13892         is_debug_types_section to section_kind.
13893         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13894         (read_comp_unit_head): Change parameter abfd to section, add parameter
13895         section_kind.  Handle DWARF-5.
13896         (error_check_comp_unit_head): Accept also DWARF version 5.
13897         (read_and_check_comp_unit_head): Change parameter
13898         is_debug_types_section to section_kind.
13899         (read_and_check_type_unit_head): Delete function.
13900         (read_abbrev_offset): Handle DWARF-5.
13901         (create_debug_type_hash_table): Add parameter section_kind.  Process
13902         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13903         comp_unit_head.
13904         (create_debug_types_hash_table): Update create_debug_type_hash_table
13905         caller.
13906         (create_all_type_units): Call create_debug_type_hash_table.
13907         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13908         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13909         caller.
13910         (skip_one_die): Handle DW_FORM_implicit_const.
13911         (dwarf2_rnglists_process): New function.
13912         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13913         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13914         (read_attribute_value): Handle DW_FORM_implicit_const,
13915         DW_FORM_line_strp.
13916         (read_attribute): Handle DW_FORM_implicit_const.
13917         (read_indirect_string_at_offset_from): New function from
13918         read_indirect_string_at_offset.
13919         (read_indirect_string_at_offset): Call
13920         read_indirect_string_at_offset_from.
13921         (read_indirect_line_string_at_offset): New function.
13922         (read_indirect_string): New function comment.
13923         (read_indirect_line_string): New function.
13924         (read_unsigned_leb128): Make it global.
13925         (dwarf2_string_attr): Handle DWARF-5.
13926         (add_include_dir_stub, read_formatted_entries): New functions.
13927         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13928         Handle DWARF-5.
13929         (per_cu_header_read_in): Update read_comp_unit_head caller.
13930         (dwarf2_version): New function.
13931         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13932         rnglists.
13933         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13934         fields.
13935
13936 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13937
13938         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13939
13940 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13941
13942         * dwarf2read.c (dwarf2_ranges_process): New function from
13943         dwarf2_ranges_read.
13944         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13945         dwarf2_ranges_process.
13946
13947 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13948
13949         * dwarf2read.c (create_debug_type_hash_table): New function from
13950         create_debug_types_hash_table.
13951         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13952         (create_all_type_units, open_and_init_dwo_file): Update
13953         create_debug_types_hash_table callers.
13954
13955 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13956
13957         PR gdb/16188
13958         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13959         refer to 'ap', not 'args'.
13960
13961 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13962             Pedro Alves  <palves@redhat.com>
13963
13964         PR gdb/16188
13965         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13966         calls succeeded.
13967         * fork-child.c (trace_start_error): New function.
13968         (trace_start_error_with_name): Likewise.
13969         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13970         * inf-ptrace.c (inf_ptrace_me): Likewise.
13971         * inferior.h (trace_start_error): New prototype.
13972         (trace_start_error_with_name): Likewise.
13973
13974 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13975
13976         PR gdb/21164
13977         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13978         NULL before using it.
13979         * symmisc.c (maintenance_print_symbols): Likewise.
13980         (maintenance_print_msymbols): Likewise.
13981
13982 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13983
13984         * NEWS: Add record Python bindings entry.
13985
13986 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13987
13988         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13989         py-record-full.o.
13990         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13991         * python/py-record-btrace.c, python/py-record-btrace.h,
13992         python/py-record-full.c, python/py-record-full.h: New file.
13993         * python/py-record.c: Add include for py-record-btrace.h and
13994         py-record-full.h.
13995         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13996         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13997         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13998         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13999         New definition.
14000         (gdbpy_initialize_btrace): New export.
14001         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14002
14003 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14004
14005         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14006         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14007         * python/py-record.c: New file.
14008         * python/python-internal.h (gdbpy_start_recording,
14009         gdbpy_current_recording, gdpy_stop_recording,
14010         gdbpy_initialize_record): New export.
14011         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14012         (python_GdbMethods): Add gdbpy_start_recording,
14013         gdbpy_current_recording and gdbpy_stop_recording.
14014
14015 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14016
14017         * record-btrace.c (record_btrace_record_method): New function.
14018         (init_record_btrace_ops): Initialize to_record_method.
14019         * record-full.c (record_full_record_method): New function.
14020         (init_record_full_ops, init_record_full_core_ops): Add
14021         record_full_record_method.
14022         * record.h (enum record_method): New enum.
14023         * target-debug.h (target_debug_print_enum_record_method: New define.
14024         * target-delegates.c: Regenerate.
14025         * target.c (target_record_method): New function.
14026         * target.h: Include record.h.
14027         (struct target_ops) <to_record_method>: New field.
14028         (target_record_method): New export.
14029
14030 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14031
14032         * record.h (record_start, record_stop): New export.
14033         * record.c (record_start, record_stop): New function.
14034
14035 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14036
14037         * btrace.c (btrace_fetch): Copy function call segments pointer
14038         into a vector.
14039         (btrace_clear): Clear the vector.
14040         (btrace_find_insn_by_number): Use binary search to find the correct
14041         function call segment.
14042         * btrace.h (brace_fun_p): New typedef.
14043         (struct btrace_thread_info) <functions>: New field.
14044
14045 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14046
14047         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14048         * btrace.c (btrace_decode_error): ... here.  New function.
14049         * btrace.h (btrace_decode_error): New export.
14050
14051 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14052
14053         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14054         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14055         btrace_find_insn_by_number): Remove special case for gaps.
14056         * btrace.h (btrace_insn_get_error): New export.
14057         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14058         * record-btrace.c (btrace_insn_history): Print number for gaps.
14059         (record_btrace_info, record_btrace_goto): Handle gaps.
14060
14061 2017-02-14  Tom Tromey  <tom@tromey.com>
14062
14063         PR python/13598:
14064         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14065         event.
14066         * python/py-evts.c (gdbpy_initialize_py_events): Add
14067         before_prompt registry.
14068         * python/py-events.h (events_object) <before_prompt>: New field.
14069
14070 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14071
14072         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14073
14074 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14075
14076         * symfile (_initialize_symfile): Add usage text to the load command's
14077         help text.
14078
14079 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14080
14081         * utils.c (defaulted_query): Don't query on secondary UIs.
14082
14083 2017-02-10  Tom Tromey  <tom@tromey.com>
14084
14085         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14086
14087 2017-02-10  Tom Tromey  <tom@tromey.com>
14088
14089         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14090         "cleanup" local.
14091         * python/py-type.c (typy_legacy_template_argument): Remove
14092         unnecessary "cleanup" local.
14093
14094 2017-02-10  Tom Tromey  <tom@tromey.com>
14095
14096         * python/python.c (do_start_initialization): New function, from
14097         _initialize_python.
14098         (_initialize_python): Call do_start_initialization.
14099         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14100         goto.
14101
14102 2017-02-10  Tom Tromey  <tom@tromey.com>
14103
14104         * python/py-prettyprint.c (pretty_print_one_value): Use
14105         gdbpy_ref.
14106
14107 2017-02-10  Tom Tromey  <tom@tromey.com>
14108
14109         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14110         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14111         gdbpy_ref.
14112         * python/py-type.c (field_new): Use gdbpy_ref.
14113         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14114         gdbpy_ref.
14115         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14116         (py_free_pspace): Likewise.
14117         (pspace_to_pspace_object): Likewise.
14118         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14119         (py_free_objfile): Likewise.
14120         (objfile_to_objfile_object): Likewise.
14121         * python/py-inferior.c (delete_thread_object): Use
14122         gdbpy_ref.
14123         (infpy_read_memory): Likewise.
14124         (py_free_inferior): Likewise.
14125         * python/py-evtregistry.c (create_eventregistry_object): Use
14126         gdbpy_ref.
14127         * python/py-event.c (create_event_object): Use gdbpy_ref.
14128
14129 2017-02-10  Tom Tromey  <tom@tromey.com>
14130
14131         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14132         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14133         used.
14134         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14135         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14136         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14137         python/py-framefilter.c, python/py-function.c,
14138         python/py-inferior.c, python/py-infevents.c,
14139         python/py-linetable.c, python/py-newobjfileevent.c,
14140         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14141         python/py-signalevent.c, python/py-stopevent.c,
14142         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14143         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14144         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14145         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14146
14147 2017-02-10  Tom Tromey  <tom@tromey.com>
14148
14149         * ui-out.h (ui_out_emit_type): New class.
14150         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14151         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14152         and ui_out_emit_tuple.
14153         (enumerate_locals): Likewise.
14154         (py_mi_print_variables, py_print_locals, py_print_args): Use
14155         ui_out_emit_list.
14156         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14157         ui_out_emit_list.
14158         * common/gdb_optional.h: New file.
14159
14160 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14161
14162         * MAINTAINERS (Write After Approval): Update my e-mail address.
14163
14164 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14165
14166         PR gdb/21122
14167         * breakpoint.c (_initialize_breakpoint): Update the help description
14168         of the 'commands' command to indicate that it takes a list argument.
14169
14170 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14171
14172         * interps.c (current_interp_set_logging): Remove "return".
14173
14174 2017-02-09  Gary Benson  <gbenson@redhat.com>
14175
14176         * symtab.c (add_symtab_completions): Prevent NULL pointer
14177         dereference.
14178
14179 2017-02-08  Pedro Alves  <palves@redhat.com>
14180
14181         * interps.c (interp::interp): Remove reference to quiet_p.
14182         (interp_set): Make static.  Remove dead "Switching to" output
14183         code.
14184         (interp_quiet_p, interp_set_quiet): Delete.
14185         (interpreter_exec_cmd): Don't set the interpreter quiet.
14186         * interps.h (interp_quiet_p): Make static.
14187         (class interp) <quiet_p>: Remove field
14188
14189 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14190
14191         * cli/cli-decode.c (find_command_name_length): Make it extern.
14192         * cli/cli-decode.h (find_command_name_length): Declare.
14193         * cli/cli-script.c (command_name_equals, line_first_arg):
14194         New functions.
14195         (process_next_line): Use cli-decode to parse command names.
14196         (build_command_line): Make args a constant pointer.
14197
14198 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14199
14200         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14201         Remove case-insensitive search.
14202
14203 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14204
14205         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14206         at the end of the line.  Avoids an ARI warning.
14207
14208 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14209
14210         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14211         rdseed instructions.
14212         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14213
14214 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14215
14216         PR tdep/20936
14217         Provide and use sparc32 and sparc64 target description XML files.
14218         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14219         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14220         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14221         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14222         * features/sparc/sparc32-solaris.xml: New file.
14223         * features/sparc/sparc64-solaris.xml: New file.
14224         * features/sparc/sparc32-solaris.c: Generated.
14225         * features/sparc/sparc64-solaris.c: Generated.
14226         * sparc-tdep.h: Account for differences in target descriptions.
14227         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14228         (sparc32_register_type): Use target provided registers.
14229         (validate_tdesc_registers): New function.
14230         (sparc32_gdbarch_init): Use tdesc_has_registers.
14231         Set pseudoregister functions.
14232         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14233         (sparc64_register_type): Use target provided registers.
14234         (sparc64_init_abi): Set pseudoregister functions.
14235
14236 2017-02-03  Tom Tromey  <tom@tromey.com>
14237
14238         PR rust/21097:
14239         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14240         with a single member.
14241
14242 2017-02-03  Pedro Alves  <palves@redhat.com>
14243
14244         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14245         (cli_interp_base::~cli_interp_base): New.
14246         (cli_interp): New struct.
14247         (as_cli_interp): Cast the interp itself to cli_interp.
14248         (cli_interpreter_pre_command_loop): Rename to ...
14249         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14250         parameter.
14251         (cli_interpreter_init): Rename to ...
14252         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14253         boolean.  Make extern.
14254         (cli_interpreter_resume): Rename to ...
14255         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14256         extern.
14257         (cli_interpreter_suspend): Rename to ...
14258         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14259         extern.
14260         (cli_interpreter_exec): Rename to ...
14261         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14262         extern.
14263         (cli_interpreter_supports_command_editing): Rename to ...
14264         (cli_interp_base::supports_command_editing): ... this.  Remove
14265         'interp' parameter.  Make extern.
14266         (cli_ui_out): Rename to ...
14267         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14268         Make extern.
14269         (cli_set_logging): Rename to ...
14270         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14271         parameter.  Make extern.
14272         (cli_interp_procs): Delete.
14273         (cli_interp_factory): Adjust to use "new".
14274         * cli/cli-interp.h: Include "interps.h".
14275         (struct cli_interp_base): New struct.
14276         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14277         (interp_new): Delete.
14278         (interp::interp, interp::~interp): New.
14279         (interp_set): Use bool, and return void.  Assume the interpreter
14280         has suspend, init and resume methods, and that the all return
14281         void.
14282         (set_top_level_interpreter): interp_set returns void.
14283         (interp_ui_out): Adapt.
14284         (current_interp_set_logging): Adapt.
14285         (interp_data): Delete.
14286         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14287         (interp_exec): Adapt.
14288         (top_level_interpreter_data): Delete.
14289         * interps.h (interp_init_ftype, interp_resume_ftype)
14290         (interp_suspend_ftype, interp_exec_ftype)
14291         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14292         (class interp): New.
14293         (interp_new): Delete.
14294         (interp_set): Now returns void.  Use bool.
14295         (interp_data, top_level_interpreter_data): Delete.
14296         * mi/mi-common.h: Include interps.h.
14297         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14298         init, resume, suspect, exec, interp_ui_out, set_logging and
14299         pre_command_loop methods.
14300         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14301         (mi_interpreter_init): Rename to ...
14302         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14303         bool, return void and make extern.  Adjust.
14304         (mi_interpreter_resume): ... Rename to ...
14305         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14306         return void and make extern.  Adjust.
14307         (mi_interpreter_suspend): ... Rename to ...
14308         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14309         return void and make extern.  Adjust.
14310         (mi_interpreter_exec): ... Rename to ...
14311         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14312         extern.  Adjust.
14313         (mi_interpreter_pre_command_loop): ... Rename to ...
14314         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14315         parameter and make extern.
14316         (mi_on_normal_stop_1): Adjust.
14317         (mi_ui_out): Rename to ...
14318         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14319         parameter and make extern.  Adjust.
14320         (mi_set_logging): Rename to ...
14321         (mi_interp::set_logging): ... this.  Remove the 'interp'
14322         parameter and make extern.  Adjust.
14323         (mi_interp_procs): Delete.
14324         (mi_interp_factory): Adjust to use 'new'.
14325         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14326         (mi_print_exception, mi_execute_command, mi_load_progress):
14327         Adjust.
14328         * tui/tui-interp.c (tui_interp): New class.
14329         (as_tui_interp): Return a tui_interp pointer.
14330         (tui_on_normal_stop, tui_on_signal_received)
14331         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14332         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14333         to use interp::interp_ui_out.
14334         (tui_init): Rename to ...
14335         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14336         bool, return void and make extern.  Adjust.
14337         (tui_resume): Rename to ...
14338         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14339         return void and make extern.  Adjust.
14340         (tui_suspend): Rename to ...
14341         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14342         return void and make extern.  Adjust.
14343         (tui_ui_out): Rename to ...
14344         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14345         parameter, and make extern.  Adjust.
14346         (tui_exec): Rename to ...
14347         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14348         make extern.
14349         (tui_interp_procs): Delete.
14350         (tui_interp_factory): Use "new".
14351
14352 2017-02-02  Tom Tromey  <tom@tromey.com>
14353
14354         * rust-exp.y (ends_raw_string, space_then_number)
14355         (rust_identifier_start_p): Return bool.
14356         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14357         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14358         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14359         (rust_chartype_p): Return bool.
14360         (val_print_struct, rust_print_struct_def, rust_print_type):
14361         Update.
14362         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14363         Return bool.
14364
14365 2017-02-02  Tom Tromey  <tom@tromey.com>
14366
14367         * rust-lang.c: Reindent.
14368
14369 2017-02-02  Tom Tromey  <tom@tromey.com>
14370
14371         * rust-lang.h (rust_crate_for_block): Update.
14372         * rust-lang.c (rust_crate_for_block): Return std::string.
14373         (rust_get_disr_info): Use std:;string, not
14374         gdb::unique_xmalloc_ptr.
14375         * rust-exp.y (crate_name): Update.
14376
14377 2017-02-02  Pedro Alves  <palves@redhat.com>
14378
14379         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14380         field out of gdb_disassembler_test and make it static.
14381
14382 2017-02-02  Pedro Alves  <palves@redhat.com>
14383
14384         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14385         mi1_interp and mi_interp fields.
14386
14387 2017-02-02  Pedro Alves  <palves@redhat.com>
14388
14389         * cli/cli-interp.c (struct saved_output_files, saved_output):
14390         Moved from cli/cli-logging.c.
14391         (cli_set_logging): New function.
14392         (cli_interp_procs): Install cli_set_logging.
14393         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14394         Declare.
14395         * cli/cli-logging.c (struct saved_output_files, saved_output):
14396         Moved to cli/cli-interp.c.
14397         (pop_output_files): Don't save outputs here.
14398         (make_logging_output): New function.
14399         (handle_redirections): Don't build tee nor save previous outputs
14400         here.
14401         * interps.c (current_interp_set_logging): Change prototype.
14402         Assume there's always a set_logging_proc method installed.
14403         * interps.h (interp_set_logging_ftype): Change prototype.
14404         (current_interp_set_logging): Change prototype and adjust comment.
14405         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14406         use make_logging_output.
14407         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14408 2017-02-02  Pedro Alves  <palves@redhat.com>
14409
14410         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14411         from ...
14412         (set_logging_overwrite): ... here.
14413         (logging_no_redirect_file): Delete.
14414         (set_logging_redirect): Don't handle redirection on the fly.
14415         Instead warn that "logging off" / "logging on" is necessary.
14416         (pop_output_files): Delete references to logging_no_redirect_file.
14417         (show_logging_command): Always speak in terms of what will happen
14418         once logging is reenabled.
14419
14420 2017-02-02  Pedro Alves  <palves@redhat.com>
14421
14422         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14423
14424 2017-02-02  Pedro Alves  <palves@redhat.com>
14425
14426         * disasm.c (gdb_pretty_print_insn): Rename to ...
14427         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14428         Remove gdbarch parameter.  Adapt to clear the object's buffers
14429         instead of allocating new buffers, and to print using the object's
14430         gdb_disassembler instead of calling gdb_print_insn.
14431         (dump_insns): Use gdb_pretty_print_disassembler.
14432         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14433         (gdb_pretty_print_disassembler): New class.
14434         * record-btrace.c (btrace_insn_history): Use
14435         gdb_pretty_print_disassembler.
14436
14437 2017-02-02  Pedro Alves  <palves@redhat.com>
14438
14439         * ada-lang.c (type_as_string): Use string_file.
14440         * ada-valprint.c (ada_print_floating): Use string_file.
14441         * ada-varobj.c (ada_varobj_scalar_image)
14442         (ada_varobj_get_value_image): Use string_file.
14443         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14444         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14445         * breakpoint.c (update_inserted_breakpoint_locations)
14446         (insert_breakpoint_locations, reattach_breakpoints)
14447         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14448         (print_it_watchpoint): Use string_file.
14449         (save_breakpoints): Use stdio_file.
14450         * c-exp.y (oper): Use string_file.
14451         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14452         tee_file.
14453         (pop_output_files): Use delete.
14454         (handle_redirections): Use stdio_file and tee_file.
14455         * cli/cli-setshow.c (do_show_command): Use string_file.
14456         * compile/compile-c-support.c (c_compute_program): Use
14457         string_file.
14458         * compile/compile-c-symbols.c (generate_vla_size): Take a
14459         'string_file &' instead of a 'ui_file *'.
14460         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14461         of a 'ui_file *'.  Use string_file.
14462         (generate_c_for_variable_locations): Take a 'string_file &'
14463         instead of a 'ui_file *'.
14464         * compile/compile-internal.h (generate_c_for_for_one_variable):
14465         Take a 'string_file &' instead of a 'ui_file *'.
14466         * compile/compile-loc2c.c (push, pushf, unary, binary)
14467         (print_label, pushf_register_address, pushf_register)
14468         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14469         'ui_file *'.  Adjust.
14470         * compile/compile.c (compile_to_object): Use string_file.
14471         * compile/compile.h (compile_dwarf_expr_to_c)
14472         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14473         'ui_file *'.
14474         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14475         (replace_typedefs_qualified_name): Use string_file and
14476         obstack_copy0.
14477         * disasm.c (gdb_pretty_print_insn): Use string_file.
14478         (gdb_disassembly): Adjust reference the null_stream global.
14479         (do_ui_file_delete): Delete.
14480         (gdb_insn_length): Use null_stream.
14481         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14482         * dwarf2loc.c (dwarf2_compile_property_to_c)
14483         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14484         'string_file &' instead of a 'ui_file *'.
14485         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14486         * dwarf2read.c (do_ui_file_peek_last): Delete.
14487         (dwarf2_compute_name): Use string_file.
14488         * event-top.c (gdb_setup_readline): Use stdio_file.
14489         * gdbarch.sh (verify_gdbarch): Use string_file.
14490         * gdbtypes.c (safe_parse_type): Use null_stream.
14491         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14492         string_file.
14493         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14494         'string_file *' instead of a 'ui_file *'.
14495         (gdbscm_arch_disassemble): Use string_file.
14496         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14497         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14498         inherits from ui_file.
14499         (ioscm_file_port_delete, ioscm_file_port_rewind)
14500         (ioscm_file_port_put): Delete.
14501         (ioscm_file_port_write): Rename to ...
14502         (ioscm_file_port::write): ... this.  Remove file_port_magic
14503         checks.
14504         (ioscm_file_port_new): Delete.
14505         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14506         ui_file_up.
14507         * guile/scm-type.c (tyscm_type_name): Use string_file.
14508         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14509         Use string_file.
14510         * infcmd.c (print_return_value_1): Use string_file.
14511         * infrun.c (print_target_wait_results): Use string_file.
14512         * language.c (add_language): Use string_file.
14513         * location.c (explicit_to_string_internal): Use string_file.
14514         * main.c (captured_main_1): Use null_file.
14515         * maint.c (maintenance_print_architecture): Use stdio_file.
14516         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14517         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14518         event_channel>: Change type to mi_console_file pointer.
14519         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14520         (mi_console_file_delete): Delete.
14521         (struct mi_console_file): Delete.
14522         (mi_console_file_magic): Delete.
14523         (mi_console_file_new): Delete.
14524         (mi_console_file::mi_console_file): New.
14525         (mi_console_file_delete): Delete.
14526         (mi_console_file_fputs): Delete.
14527         (mi_console_file::write): New.
14528         (mi_console_raw_packet): Delete.
14529         (mi_console_file::flush): New.
14530         (mi_console_file_flush): Delete.
14531         (mi_console_set_raw): Rename to ...
14532         (mi_console_file::set_raw): ... this.
14533         * mi/mi-console.h (class mi_console_file): New class.
14534         (mi_console_file_new, mi_console_set_raw): Delete.
14535         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14536         (mi_set_logging): Use delete and tee_file.  Adjust.
14537         * mi/mi-main.c (output_register): Use string_file.
14538         (mi_cmd_data_evaluate_expression): Use string_file.
14539         (mi_cmd_data_read_memory): Use string_file.
14540         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14541         * mi/mi-out.c (mi_ui_out::main_stream): New.
14542         (mi_ui_out::rewind): Use main_stream and
14543         string_file.
14544         (mi_ui_out::put): Use main_stream and string_file.
14545         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14546         Allocate a 'string_file' instead.
14547         (mi_out_new): Don't allocate a mem_fileopen stream here.
14548         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14549         (mi_ui_out::main_stream): Declare method.
14550         * printcmd.c (eval_command): Use string_file.
14551         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14552         * python/py-arch.c (archpy_disassemble): Use string_file.
14553         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14554         * python/py-frame.c (frapy_str): Use string_file.
14555         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14556         Use string_file.
14557         * python/py-type.c (typy_str): Use string_file.
14558         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14559         * python/py-value.c (valpy_str): Use string_file.
14560         * record-btrace.c (btrace_insn_history): Use string_file.
14561         * regcache.c (regcache_print): Use stdio_file.
14562         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14563         * remote.c (escape_buffer): Use string_file.
14564         * rust-lang.c (rust_get_disr_info): Use string_file.
14565         * serial.c (serial_open_ops_1): Use stdio_file.
14566         (do_serial_close): Use delete.
14567         * stack.c (print_frame_arg): Use string_file.
14568         (print_frame_args): Remove local mem_fileopen stream, not used.
14569         (print_frame): Use string_file.
14570         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14571         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14572         Take a 'string_file *' instead of a 'ui_file *'.
14573         * top.c (new_ui): Use stdio_file and stderr_file.
14574         (free_ui): Use delete.
14575         (execute_command_to_string): Use string_file.
14576         (quit_confirm): Use string_file.
14577         * tracepoint.c (collection_list::append_exp): Use string_file.
14578         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14579         * tui/tui-file.c: Don't include "ui-file.h".
14580         (enum streamtype, struct tui_stream): Delete.
14581         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14582         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14583         (tui_file::tui_file): New method.
14584         (tui_file_fputs): Delete.
14585         (tui_file_get_strbuf): Delete.
14586         (tui_file::puts): New method.
14587         (tui_file_adjust_strbuf): Delete.
14588         (tui_file_flush): Delete.
14589         (tui_file::flush): New method.
14590         * tui/tui-file.h: Tweak intro comment.
14591         Include ui-file.h.
14592         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14593         (tui_file_adjust_strbuf): Delete declarations.
14594         (class tui_file): New class.
14595         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14596         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14597         (tui_register_format): Use string_stream.
14598         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14599         (tui_get_function_from_frame): Use string_file.
14600         * typeprint.c (type_to_string): Use string_file.
14601         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14602         (null_stream): New global.
14603         (ui_file_delete): Delete.
14604         (ui_file::ui_file): New.
14605         (null_file_isatty): Delete.
14606         (ui_file::~ui_file): New.
14607         (null_file_rewind): Delete.
14608         (ui_file::printf): New.
14609         (null_file_put): Delete.
14610         (null_file_flush): Delete.
14611         (ui_file::putstr): New.
14612         (null_file_write): Delete.
14613         (ui_file::putstrn): New.
14614         (null_file_read): Delete.
14615         (ui_file::putc): New.
14616         (null_file_fputs): Delete.
14617         (null_file_write_async_safe): Delete.
14618         (ui_file::vprintf): New.
14619         (null_file_delete): Delete.
14620         (null_file::write): New.
14621         (null_file_fseek): Delete.
14622         (null_file::puts): New.
14623         (ui_file_data): Delete.
14624         (null_file::write_async_safe): New.
14625         (gdb_flush, ui_file_isatty): Adjust.
14626         (ui_file_put, ui_file_rewind): Delete.
14627         (ui_file_write): Adjust.
14628         (ui_file_write_for_put): Delete.
14629         (ui_file_write_async_safe, ui_file_read): Adjust.
14630         (ui_file_fseek): Delete.
14631         (fputs_unfiltered): Adjust.
14632         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14633         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14634         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14635         (set_ui_file_data): Delete.
14636         (string_file::~string_file, string_file::write)
14637         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14638         (do_ui_file_as_string, ui_file_as_string): Delete.
14639         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14640         (struct mem_file): Delete.
14641         (mem_file_new): Delete.
14642         (stdio_file::stdio_file): New.
14643         (mem_file_delete): Delete.
14644         (stdio_file::stdio_file): New.
14645         (mem_fileopen): Delete.
14646         (stdio_file::~stdio_file): New.
14647         (mem_file_rewind): Delete.
14648         (stdio_file::set_stream): New.
14649         (mem_file_put): Delete.
14650         (stdio_file::open): New.
14651         (mem_file_write): Delete.
14652         (stdio_file_magic, struct stdio_file): Delete.
14653         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14654         (stdio_file::flush): New.
14655         (stdio_file_read): Rename to ...
14656         (stdio_file::read): ... this.  Adjust.
14657         (stdio_file_write): Rename to ...
14658         (stdio_file::write): ... this.  Adjust.
14659         (stdio_file_write_async_safe): Rename to ...
14660         (stdio_file::write_async_safe) ... this.  Adjust.
14661         (stdio_file_fputs): Rename to ...
14662         (stdio_file::puts) ... this.  Adjust.
14663         (stdio_file_isatty): Delete.
14664         (stdio_file_fseek): Delete.
14665         (stdio_file::isatty): New.
14666         (stderr_file_write): Rename to ...
14667         (stderr_file::write) ... this.  Adjust.
14668         (stderr_file_fputs): Rename to ...
14669         (stderr_file::puts) ... this.  Adjust.
14670         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14671         (stderr_file::stderr_file): New.
14672         (tee_file_magic): Delete.
14673         (struct tee_file): Delete.
14674         (tee_file::tee_file): New.
14675         (tee_file_new): Delete.
14676         (tee_file::~tee_file): New.
14677         (tee_file_delete): Delete.
14678         (tee_file_flush): Rename to ...
14679         (tee_file::flush): ... this.  Adjust.
14680         (tee_file_write): Rename to ...
14681         (tee_file::write): ... this.  Adjust.
14682         (tee_file::write_async_safe): New.
14683         (tee_file_fputs): Rename to ...
14684         (tee_file::puts): ... this.  Adjust.
14685         (tee_file_isatty): Rename to ...
14686         (tee_file::isatty): ... this.  Adjust.
14687         * ui-file.h (struct obstack, struct ui_file): Don't
14688         forward-declare.
14689         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14690         (ui_file_write_ftype)
14691         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14692         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14693         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14694         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14695         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14696         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14697         (set_ui_file_fseek): Delete.
14698         (ui_file_data, ui_file_delete, ui_file_rewind)
14699         (struct ui_file): New.
14700         (ui_file_up): New.
14701         (class null_file): New.
14702         (null_stream): Declare.
14703         (ui_file_write_for_put, ui_file_put): Delete.
14704         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14705         Delete.
14706         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14707         (gdb_fopen, tee_file_new): Delete.
14708         (struct string_file): New.
14709         (struct stdio_file): New.
14710         (stdio_file_up): New.
14711         (struct stderr_file): New.
14712         (class tee_file): New.
14713         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14714         of a 'ui_file *'.  Adjust.
14715         * ui-out.h (class ui_out) <field_stream>: Likewise.
14716         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14717         (null_stream): Delete.
14718         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14719         Adjust.
14720         * utils.h (struct ui_file): Delete forward declaration..
14721         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14722         (error_stream): Take a 'string_file &' instead of a
14723         'ui_file *'.
14724         * varobj.c (varobj_value_get_print_value): Use string_file.
14725         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14726         * gdbarch.c: Regenerate.
14727
14728 2017-02-02  Pedro Alves  <palves@redhat.com>
14729
14730         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14731         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14732         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14733         Adjust to call gdb_print_insn instead of
14734         gdb_disassembler::print_insn.
14735         (dump_insns, do_mixed_source_and_assembly_deprecated)
14736         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14737         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14738         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14739         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14740         declaration.
14741         (gdb_pretty_print_insn): Re-add declaration.
14742         * record-btrace.c (btrace_insn_history): Don't allocate a
14743         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14744
14745 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14746
14747         * disasm.h (gdb_disassembly): Remove file_string parameter.
14748         * disasm.c (gdb_disassembly): Likewise.
14749         * cli/cli-cmds.c (print_disassembly): Adapt.
14750         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14751         * stack.c (do_gdb_disassembly): Likewise.
14752
14753 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14754
14755         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14756         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14757         targets.  And if the implicit value is longer than needed, extract
14758         the first bytes instead of the "least significant" ones.
14759
14760 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14761
14762         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14763         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14764         (btrace_fetch): Assert can_access_registers_ptid.
14765         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14766         validate_registers_access.
14767
14768 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14769
14770         * gdbthread.h (can_access_registers_ptid): New.
14771         * thread.c (can_access_registers_ptid): New.
14772
14773 2017-02-01  Pedro Alves  <palves@redhat.com>
14774
14775         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14776
14777 2017-01-31  Pedro Alves  <palves@redhat.com>
14778
14779         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14780         Fix typos.
14781
14782 2017-01-31  Pedro Alves  <palves@redhat.com>
14783
14784         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14785         not used.
14786
14787 2017-01-31  Pedro Alves  <palves@redhat.com>
14788
14789         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14790
14791 2017-01-31  Pedro Alves  <palves@redhat.com>
14792
14793         * common/scoped_restore.h
14794         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14795         change the value's parameter type to T2.
14796         (make_scoped_restore): Likewise.
14797
14798 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14799             Richard Henderson  <rth@redhat.com>
14800
14801         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14802         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14803         GS_BASE for older kernels.
14804         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14805         GS_BASE for older kernels.
14806         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14807         and GS_BASE to the offset table.
14808         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14809         system register group.
14810         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14811         for older kernels.
14812         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14813         amd64 ABI.
14814         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14815         AMD64_GSBASE_REGNUM.
14816         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14817         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14818         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14819         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14820         i386/64bit-segments.xml in those rules.
14821         * features/i386/64bit-segments.xml: New file.
14822         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14823         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14824         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14825         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14826         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14827         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14828         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14829         * features/i386/amd64-avx-linux.c: Regenerated.
14830         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14831         * features/i386/amd64-avx-mpx.c: Regenerated.
14832         * features/i386/amd64-avx512-linux.c: Regenerated.
14833         * features/i386/amd64-linux.c: Regenerated.
14834         * features/i386/amd64-mpx-linux.c: Regenerated.
14835         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14836         * features/i386/i386-avx-mpx.c: Regenerated.
14837         * features/i386/x32-avx-linux.c: Regenerated.
14838         * features/i386/x32-avx512-linux.c: Regenerated.
14839         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14840         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14841         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14842         * regformats/i386/amd64-linux.dat: Regenerated.
14843         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14844         * regformats/i386/x32-avx-linux.dat: Regenerated.
14845         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14846         * regformats/i386/x32-linux.dat: Regenerated.
14847
14848 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14849
14850         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14851         Set to AMD64_NUM_REGS.
14852
14853 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14854
14855         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14856         that checks validity of a register number.
14857
14858 2017-01-27  Kees Cook  <keescook@google.com>
14859
14860         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14861         fetch_fpregs if target has fpa registers.
14862         (arm_linux_store_inferior_registers): Call store_fpregs if target
14863         has fpa registers.
14864
14865 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14866
14867         * cris-tdep.c (cris_gdbarch_init): Remove check for
14868         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14869
14870 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14871
14872         * corelow.c (get_core_register_section): Check for regset
14873         existence before checking for REGSET_VARIABLE_SIZE.
14874
14875 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14876             Pedro Alves  <palves@redhat.com>
14877
14878         PR gdb/20939
14879         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14880         call memory_error, save memaddr instead.
14881         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14882         negative, cal memory_error.
14883         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14884
14885 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14886
14887         * disasm-selftests.c (memory_error_test): New function.
14888         (_initialize_disasm_selftests): Register memory_error_test.
14889
14890 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14891
14892         * Makefile.in (SFILES): Add disasm-selftests.c and
14893         selftest-arch.c.
14894         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14895         * disasm-selftests.c: New file.
14896         * selftest-arch.c: New file.
14897         * selftest-arch.h: New file.
14898
14899 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14900
14901         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14902         to bfd_arch_mep.  Don't return 0 if section is not
14903         found.  Call print_insn_mep.
14904
14905 2017-01-26  Pedro Alves  <palves@redhat.com>
14906             Yao Qi  <yao.qi@linaro.org>
14907
14908         * arm-tdep.c: Include "disasm.h".
14909         (gdb_print_insn_arm): Update code to get gdbarch.
14910         * disasm.c (dis_asm_read_memory): Change it to
14911         gdb_disassembler::dis_asm_read_memory.
14912         (dis_asm_memory_error): Likewise.
14913         (dis_asm_print_address): Likewise.
14914         (gdb_pretty_print_insn): Change it to
14915         gdb_disassembler::pretty_print_insn.
14916         (dump_insns): Add one argument gdb_disassemlber.  All
14917         callers updated.
14918         (do_mixed_source_and_assembly_deprecated): Likewise.
14919         (do_mixed_source_and_assembly): Likewise.
14920         (do_assembly_only): Likewise.
14921         (gdb_disassembler::gdb_disassembler): New.
14922         (gdb_disassembler::print_insn): New.
14923         * disasm.h (class gdb_disassembler): New.
14924         (gdb_pretty_print_insn): Remove declaration.
14925         (gdb_disassemble_info): Likewise.
14926         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14927         (gdbscm_disasm_read_memory_worker): Update.
14928         (gdbscm_disasm_read_memory): Update.
14929         (gdbscm_disasm_memory_error): Remove.
14930         (gdbscm_disasm_print_address): Remove.
14931         (gdbscm_disassembler::gdbscm_disassembler): New.
14932         (gdbscm_print_insn_from_port): Update.
14933         * mips-tdep.c: Include disasm.h.
14934         (gdb_print_insn_mips): Update code to get gdbarch.
14935         * record-btrace.c (btrace_insn_history): Update.
14936         * spu-tdep.c: Include disasm.h.
14937         (struct spu_dis_asm_data): Remove.
14938         (struct spu_dis_asm_info): New.
14939         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14940         SPU id.
14941         (gdb_print_insn_spu): Cast disassemble_info to
14942         spu_dis_asm_info.
14943
14944 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14945
14946         * disasm.c (do_ui_file_delete): Delete.
14947         (gdb_insn_length): Move code creating stream to ...
14948         * utils.c (null_stream): ... here.  New function.
14949         * utils.h (null_stream): Declare.
14950
14951 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14952
14953         * python/py-inferior.c (find_thread_object): Return directly
14954         from the loop.  Remove "found" variable.
14955
14956 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14957
14958         GDB 7.12.1 released.
14959
14960 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14961
14962         * python/py-function.c (fnpy_call): Reorder declarations to have
14963         the gdbpy_enter object declared first.
14964         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14965
14966 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14967
14968         PR python/21068
14969         * python/python-internal.h (PyMem_RawMalloc): Define for
14970         Python < 3.4.
14971         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14972         PyMem_RawMalloc instead of PyMem_Malloc.
14973
14974 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14975             Luis Machado  <lgustavo@codesourcery.com>
14976
14977         * NEWS (New commands): Mention flash-erase.
14978         (New MI commands): Mention target-flash-erase.
14979         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14980         command.
14981         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14982         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14983         * target.c (flash_erase_command): New function.
14984         (initialize_targets): Add new flash-erase command.
14985         * target.h (flash_erase_command): New declaration.
14986
14987 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14988
14989         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14990         HAVE_SYS_PROCFS_H is defined.
14991
14992 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14993
14994         * remote.c (struct cached_reg): Change data into a pointer.
14995         * (stop_reply_dtr): Free data pointers before deleting vector.
14996         (process_stop_reply): Likewise.
14997         (remote_parse_stop_reply): Allocate space for data
14998
14999 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15000
15001         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15002         MAX_REGISTER_SIZE.
15003         (amd64_pseudo_register_read_value): Likewise.
15004         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15005         (store_register_using_P): Likewise.
15006         * regcache.c (regcache_xfer_part): Likewise.
15007
15008 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15009
15010         Split real and pseudo registers.
15011         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15012         (sparc32_pseudo_regnum): New enum.
15013         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15014         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15015         (SPARC32_CP0_REGISTERS): New macro.
15016         (sparc32_pseudo_register_name): New function.
15017         (sparc32_register_name): Use sparc32_pseudo_register_name.
15018         (sparc32_pseudo_register_type): New function.
15019         (sparc32_register_type): Use sparc32_pseudo_register_type.
15020         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15021         pseudo register numbers.
15022         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15023         (SPARC64_CP0_REGISTERS): New macro.
15024         (sparc64_pseudo_register_name): New function.
15025         (sparc64_register_name): Use sparc64_pseudo_register_name.
15026         (sparc64_pseudo_register_type): New function.
15027         (sparc64_register_type): Use sparc64_pseudo_register_type.
15028         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15029         pseudo register numbers.
15030         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15031         sparc64_store_arguments): Handle pseudo register numbers.
15032
15033 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15034
15035         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15036         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15037         output.
15038         (getpkt_or_notif_sane_1): Likewise.
15039
15040 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15041
15042         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15043         of CC.  Pass "-x c++-header" instead of "-x c".
15044
15045 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15046
15047         * remote.c (remote_can_async_p): Update comment.
15048
15049 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15050
15051         * linux-nat.c (linux_nat_can_async_p): Update comment.
15052
15053 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15054
15055         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15056
15057 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15058
15059         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15060
15061 2017-01-10  Tom Tromey  <tom@tromey.com>
15062
15063         * python/py-type.c (typy_legacy_template_argument): Update.
15064         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15065         ~demangle_parse_info): Declare new members.
15066         (cp_demangled_name_to_comp): Return unique_ptr.
15067         (cp_demangled_name_parse_free)
15068         (make_cleanup_cp_demangled_name_parse_free)
15069         (cp_new_demangle_parse_info): Remove.
15070         * cp-support.c (do_demangled_name_parse_free_cleanup)
15071         (make_cleanup_cp_demangled_name_parse_free): Remove.
15072         (inspect_type, cp_canonicalize_string_full)
15073         (cp_canonicalize_string): Update.
15074         (mangled_name_to_comp): Change return type.
15075         (cp_class_name_from_physname, method_name_from_physname)
15076         (cp_func_name, cp_remove_params): Update.
15077         * cp-name-parser.y (demangle_parse_info): New constructor, from
15078         cp_new_demangle_parse_info.
15079         (~demangle_parse_info): New destructor, from
15080         cp_demangled_name_parse_free.
15081         (cp_merge_demangle_parse_infos): Update.
15082         (cp_demangled_name_to_comp): Change return type.
15083
15084 2017-01-10  Tom Tromey  <tom@tromey.com>
15085
15086         * top.c (prevent_dont_repeat): Change return type.
15087         * python/python.c (execute_gdb_command): Use std::string.
15088         Update.
15089         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15090         * command.h (prevent_dont_repeat): Change return type.
15091         * breakpoint.c (bpstat_do_actions_1): Update.
15092
15093 2017-01-10  Tom Tromey  <tom@tromey.com>
15094
15095         * value.h (scoped_value_mark::~scoped_value_mark): Call
15096         free_to_mark.
15097         (scoped_value_mark::free_to_mark): New method.
15098         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15099         scoped_value_mark.
15100
15101 2017-01-10  Tom Tromey  <tom@tromey.com>
15102
15103         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15104         (valpy_reference_value, valpy_const_value, valpy_get_address)
15105         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15106         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15107         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15108         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15109         scoped_value_mark.
15110         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15111         * value.h (scoped_value_mark): New class.
15112
15113 2017-01-10  Tom Tromey  <tom@tromey.com>
15114
15115         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15116         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15117         * psymtab.c (discard_psymtabs_upto): Remove.
15118         (make_cleanup_discard_psymtabs): Remove.
15119         (struct psymtab_state): Remove.
15120
15121 2017-01-10  Tom Tromey  <tom@tromey.com>
15122
15123         * record-full.c (record_full_save_cleanups): Remove.
15124         (record_full_save): Use gdb::unlinker.
15125         * gcore.c (do_bfd_delete_cleanup): Remove.
15126         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15127         cleanups.
15128         * dwarf2read.c (unlink_if_set): Remove.
15129         (write_psymtabs_to_index): Use gdb::unlinker.
15130         * common/gdb_unlinker.h: New file.
15131
15132 2017-01-10  Tom Tromey  <tom@tromey.com>
15133
15134         * windows-tdep.c (windows_xfer_shared_library): Update.
15135         * windows-nat.c (windows_make_so): Update.
15136         * utils.h (make_cleanup_bfd_unref): Remove.
15137         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15138         * symfile.h (symfile_bfd_open)
15139         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15140         * symfile.c (read_symbols, symbol_file_add)
15141         (separate_debug_file_exists): Update.
15142         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15143         (generic_load, reread_symbols): Update.
15144         * symfile-mem.c (symbol_file_add_from_memory): Update.
15145         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15146         (spu_symbol_file_add_from_memory): Update.
15147         * solist.h (struct target_so_ops) <bfd_open>: Return
15148         gdb_bfd_ref_ptr.
15149         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15150         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15151         gdb_bfd_ref_ptr.
15152         (solib_map_sections, reload_shared_libraries_1): Update.
15153         * solib-svr4.c (enable_break): Update.
15154         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15155         * solib-frv.c (enable_break2): Update.
15156         * solib-dsbt.c (enable_break): Update.
15157         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15158         gdb_bfd_ref_ptr.
15159         (darwin_solib_get_all_image_info_addr_at_init): Update.
15160         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15161         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15162         * record-full.c (record_full_save): Update.
15163         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15164         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15165         * minidebug.c (find_separate_debug_file_in_section): Return
15166         gdb_bfd_ref_ptr.
15167         * machoread.c (macho_add_oso_symfile): Change abfd to
15168         gdb_bfd_ref_ptr.
15169         (macho_symfile_read_all_oso): Update.
15170         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15171         (macho_symfile_read): Update.
15172         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15173         (jit_bfd_try_read_symtab): Update.
15174         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15175         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15176         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15177         gdb_bfd_ref_ptr.
15178         (gdb_bfd_ref_policy): New struct.
15179         (gdb_bfd_ref_ptr): New typedef.
15180         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15181         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15182         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15183         gdb_bfd_ref_ptr.
15184         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15185         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15186         (gcore_command): Update.
15187         * exec.c (exec_file_attach): Update.
15188         * elfread.c (elf_symfile_read): Update.
15189         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15190         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15191         (open_and_init_dwo_file): Update.
15192         (open_dwp_file): Return gdb_bfd_ref_ptr.
15193         (open_and_init_dwp_file): Update.
15194         * corelow.c (core_open): Update.
15195         * compile/compile-object-load.c (compile_object_load): Update.
15196         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15197         * coffread.c (coff_symfile_read): Update.
15198         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15199         gdb_bfd_ref_ptr.  Rename.
15200         (dump_bfd_file, restore_command): Update.
15201         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15202         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15203         (find_separate_debug_file_by_buildid): Update.
15204
15205 2017-01-10  Tom Tromey  <tom@tromey.com>
15206
15207         * common/gdb_ref_ptr.h: New file.
15208         * python/py-ref.h (struct gdbpy_ref_policy): New.
15209         (gdbpy_ref): Now a typedef.
15210
15211 2017-01-10  Tom Tromey  <tom@tromey.com>
15212
15213         * utils.h (make_cleanup_htab_delete): Don't declare.
15214         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15215         Remove.
15216         * linespec.c (decode_compound_collector): Add constructor,
15217         destructor.
15218         (lookup_prefix_sym): Remove cleanup.
15219         (symtab_collector): Add constructor, destructor.
15220         (collect_symtabs_from_filename): Remove cleanup.
15221         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15222         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15223         Use htab_up.
15224         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15225         * dwarf2read.c (dw2_expand_symtabs_matching)
15226         (dw2_map_symbol_filenames, dwarf_decode_macros)
15227         (write_psymtabs_to_index): Use htab_up.
15228         * dwarf2loc.c (func_verify_no_selftailcall)
15229         (call_site_find_chain_1, func_verify_no_selftailcall)
15230         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15231         std::vector, gdb::unique_xmalloc_ptr.
15232         (call_sitep): Remove typedef.
15233         (dwarf2_locexpr_baton_eval): Remove unused variable.
15234
15235 2017-01-10  Tom Tromey  <tom@tromey.com>
15236
15237         * python/python-internal.h (make_cleanup_py_decref)
15238         (make_cleanup_py_xdecref): Don't declare.
15239         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15240         (py_xdecref, make_cleanup_py_xdecref): Remove.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15245         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15246
15247 2017-01-10  Tom Tromey  <tom@tromey.com>
15248
15249         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15250
15251 2017-01-10  Tom Tromey  <tom@tromey.com>
15252
15253         * python/py-utils.c (unicode_to_encoded_string)
15254         (python_string_to_target_string)
15255         (python_string_to_target_python_string)
15256         (python_string_to_host_string, gdbpy_obj_to_string)
15257         (get_addr_from_python): Use gdbpy_ref.
15258
15259 2017-01-10  Tom Tromey  <tom@tromey.com>
15260
15261         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15262         gdbpy_ref.
15263
15264 2017-01-10  Tom Tromey  <tom@tromey.com>
15265
15266         * python/python.c (eval_python_command, gdbpy_decode_line)
15267         (gdbpy_run_events, gdbpy_start_type_printers)
15268         (gdbpy_apply_type_printers): Use gdbpy_ref.
15269
15270 2017-01-10  Tom Tromey  <tom@tromey.com>
15271
15272         * python/py-param.c (get_doc_string, compute_enum_values): Use
15273         gdbpy_ref.
15274
15275 2017-01-10  Tom Tromey  <tom@tromey.com>
15276
15277         * python/py-inferior.c (find_thread_object, build_inferior_list):
15278         Use gdbpy_ref.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15283
15284 2017-01-10  Tom Tromey  <tom@tromey.com>
15285
15286         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15287         gdbpy_ref.
15288
15289 2017-01-10  Tom Tromey  <tom@tromey.com>
15290
15291         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15292         extra incref.
15293         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15294         Use gdbpy_ref.
15295
15296 2017-01-10  Tom Tromey  <tom@tromey.com>
15297
15298         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15299         gdbpy_ref.
15300
15301 2017-01-10  Tom Tromey  <tom@tromey.com>
15302
15303         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15304         decref results of PyArg_ParseTupleAndKeywords.
15305
15306 2017-01-10  Tom Tromey  <tom@tromey.com>
15307
15308         * python/python.c (python_run_simple_file): Use
15309         unique_xmalloc_ptr, gdbpy_ref.
15310
15311 2017-01-10  Tom Tromey  <tom@tromey.com>
15312
15313         * python/py-prettyprint.c (print_stack_unless_memory_error)
15314         (print_string_repr, print_children): Use gdbpy_ref.
15315         (dummy_python_frame): New class.
15316         (dummy_python_frame::dummy_python_frame): Rename from
15317         push_dummy_python_frame.
15318         (py_restore_tstate): Remove.
15319
15320 2017-01-10  Tom Tromey  <tom@tromey.com>
15321
15322         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15323
15324 2017-01-10  Tom Tromey  <tom@tromey.com>
15325
15326         * python/python.c (ensure_python_env, restore_python_env):
15327         Remove.
15328         * python/python-internal.h (ensure_python_env): Don't declare.
15329         * varobj.h (varobj_ensure_python_env): Don't declare.
15330         * varobj.c (varobj_ensure_python_env): Remove.
15331
15332 2017-01-10  Tom Tromey  <tom@tromey.com>
15333
15334         * varobj.c (varobj_value_get_print_value): Use
15335         gdbpy_enter_varobj.
15336
15337 2017-01-10  Tom Tromey  <tom@tromey.com>
15338
15339         * python/py-prettyprint.c (print_string_repr, print_children):
15340         Update.
15341         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15342         of "encoding".
15343         * varobj.c (varobj_value_get_print_value): Update.
15344         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15345
15346 2017-01-10  Tom Tromey  <tom@tromey.com>
15347
15348         * varobj.c (varobj_get_display_hint)
15349         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15350         (varobj_set_visualizer, free_variable): Use
15351         gdbpy_enter_varobj.
15352
15353 2017-01-10  Tom Tromey  <tom@tromey.com>
15354
15355         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15356         (do_finish_initialization): New function.  Use gdbpy_ref.
15357         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15358         do_finish_initialization.
15359
15360 2017-01-10  Tom Tromey  <tom@tromey.com>
15361
15362         * python/py-param.c (get_set_value, get_show_value): Use
15363         gdbpy_enter, gdbpy_ref.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15372
15373 2017-01-10  Tom Tromey  <tom@tromey.com>
15374
15375         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15376         Use gdbpy_enter_varobj.
15377
15378 2017-01-10  Tom Tromey  <tom@tromey.com>
15379
15380         * varobj.c (gdbpy_enter_varobj): New constructor.
15381         * python/python-internal.h (gdbpy_enter_varobj): New class.
15382         * python/py-varobj.c (py_varobj_get_iterator): Use
15383         gdbpy_enter_varobj.
15384
15385 2017-01-10  Tom Tromey  <tom@tromey.com>
15386
15387         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15388         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15389         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15390         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15391         unique_xmalloc_ptr.
15392         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15393
15394 2017-01-10  Tom Tromey  <tom@tromey.com>
15395
15396         * python/py-xmethods.c (invoke_match_method): Use
15397         gdbpy_ref.
15398
15399 2017-01-10  Tom Tromey  <tom@tromey.com>
15400
15401         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15402         gdbpy_enter, gdbpy_ref.
15403
15404 2017-01-10  Tom Tromey  <tom@tromey.com>
15405
15406         * python/python.c (python_interactive_command): Use gdbpy_enter.
15407
15408 2017-01-10  Tom Tromey  <tom@tromey.com>
15409
15410         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15411         gdbpy_ref.
15412
15413 2017-01-10  Tom Tromey  <tom@tromey.com>
15414
15415         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15416         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * utils.h (htab_deleter): New struct.
15421         (htab_up): New typedef.
15422         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15423         gdbpy_enter, gdbpy_ref, htab_up.
15424
15425 2017-01-10  Tom Tromey  <tom@tromey.com>
15426
15427         * python/py-unwind.c (pending_frame_invalidate): Remove.
15428         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15433         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15438
15439 2017-01-10  Tom Tromey  <tom@tromey.com>
15440
15441         * python/python.c (gdbpy_eval_from_control_command)
15442         (gdbpy_source_script, gdbpy_run_events)
15443         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15444         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15445         gdbpy_enter.
15446
15447 2017-01-10  Tom Tromey  <tom@tromey.com>
15448
15449         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15450
15451 2017-01-10  Tom Tromey  <tom@tromey.com>
15452
15453         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15454
15455 2017-01-10  Tom Tromey  <tom@tromey.com>
15456
15457         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15458         (python_on_inferior_call_pre, python_on_inferior_call_post)
15459         (python_on_memory_change, python_on_register_change)
15460         (python_inferior_exit, python_new_objfile, add_thread_object)
15461         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15462
15463 2017-01-10  Tom Tromey  <tom@tromey.com>
15464
15465         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15466         (bpfinishpy_handle_exit): Use gdbpy_enter.
15467
15468 2017-01-10  Tom Tromey  <tom@tromey.com>
15469
15470         * python/py-cmd.c (cmdpy_destroyer)
15471         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15472         gdbpy_enter.
15473
15474 2017-01-10  Tom Tromey  <tom@tromey.com>
15475
15476         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15477         gdbpy_enter.
15478         (gdbpy_breakpoint_has_cond): Likewise.
15479
15480 2017-01-10  Tom Tromey  <tom@tromey.com>
15481
15482         * python/python.c (gdbpy_enter): New constructor.
15483         (~gdbpy_enter): New destructor.
15484         (restore_python_env, ensure_python_env): Rewrite.
15485         * python/python-internal.h (gdbpy_enter): New class.
15486
15487 2017-01-10  Tom Tromey  <tom@tromey.com>
15488
15489         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/py-value.c (value_has_field, get_field_flag)
15494         (get_field_type, valpy_getitem, convert_value_from_python): Use
15495         gdbpy_ref.
15496
15497 2017-01-10  Tom Tromey  <tom@tromey.com>
15498
15499         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15500         gdbpy_ref.
15501
15502 2017-01-10  Tom Tromey  <tom@tromey.com>
15503
15504         * python/py-prettyprint.c (search_pp_list)
15505         (find_pretty_printer_from_objfiles)
15506         (find_pretty_printer_from_progspace)
15507         (find_pretty_printer_from_gdb, find_pretty_printer)
15508         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15509         gdbpy_ref.
15510
15511 2017-01-10  Tom Tromey  <tom@tromey.com>
15512
15513         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15514
15515 2017-01-10  Tom Tromey  <tom@tromey.com>
15516
15517         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15518         (ltpy_get_all_source_lines): Use gdbpy_ref.
15519
15520 2017-01-10  Tom Tromey  <tom@tromey.com>
15521
15522         * python/py-framefilter.c (extract_sym, extract_value)
15523         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15524         gdbpy_ref.
15525
15526 2017-01-10  Tom Tromey  <tom@tromey.com>
15527
15528         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15533
15534 2017-01-10  Tom Tromey  <tom@tromey.com>
15535
15536         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15537         gdbpy_ref.
15538
15539 2017-01-10  Tom Tromey  <tom@tromey.com>
15540
15541         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15542
15543 2017-01-10  Tom Tromey  <tom@tromey.com>
15544
15545         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15546         (typy_range): Use gdbpy_ref.
15547
15548 2017-01-10  Tom Tromey  <tom@tromey.com>
15549
15550         * python/py-threadevent.c (create_thread_event_object): Use
15551         gdbpy_ref.
15552         * python/py-stopevent.c (create_stop_event_object): Simplify.
15553         (emit_stop_event): Use gdbpy_ref.
15554         * python/py-signalevent.c (create_signal_event_object): Use
15555         gdbpy_ref.
15556         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15557         (emit_new_objfile_event, create_clear_objfiles_event_object)
15558         (emit_clear_objfiles_event): Use gdbpy_ref.
15559         * python/py-infevents.c (create_inferior_call_event_object)
15560         (create_register_changed_event_object)
15561         (create_memory_changed_event_object, emit_inferior_call_event)
15562         (emit_memory_changed_event, emit_register_changed_event): Use
15563         gdbpy_ref.
15564         * python/py-exitedevent.c (create_exited_event_object)
15565         (emit_exited_event): Use gdbpy_ref.
15566         * python/py-event.h (evpy_emit_event): Remove
15567         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15568         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15569         * python/py-continueevent.c (emit_continue_event): Use
15570         gdbpy_ref.
15571         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15572         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15573         gdbpy_ref.
15574         * python/py-bpevent.c (create_breakpoint_event_object): Use
15575         gdbpy_ref.
15576
15577 2017-01-10  Tom Tromey  <tom@tromey.com>
15578
15579         * python/py-ref.h: New file.
15580
15581 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15582
15583         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15584         void.
15585         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15586         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15587         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15588         * ui-out.c (ui_out::redirect): Likewise.
15589         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15590         * cli/cli-logging.c (set_logging_redirect): Update call site of
15591         ui_out::redirect.
15592         (handle_redirections): Likewise.
15593         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15594         * top.c (execute_command_to_string): Likewise.
15595         * utils.c (do_ui_out_redirect_pop): Likewise.
15596
15597 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15598
15599         * stack.c (_initialize_stack): Update "frame" command help message.
15600
15601 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15602
15603         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15604
15605 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15606
15607         * x86-linux-nat.h: Include gdb_proc_service.h.
15608
15609 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15610
15611         * ser-base.h: Include serial.h.
15612
15613 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15614
15615         * ppc-linux-tdep.h: Include ppc-tdep.h.
15616
15617 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15618
15619         * nat/amd64-linux-siginfo.h: Include signal.h.
15620
15621 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15622
15623         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15624
15625 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15626
15627         * mi/mi-parse.h: Include mi-cmds.h.
15628
15629 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15630
15631         * inf-loop.c: Don't include "target.h".
15632         * inf-loop.h: Include it here.
15633
15634 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15635
15636         * dfp.h: Include "dboulest.h" and "expression.h".
15637
15638 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15639
15640         * ax-gdb.h: Include "ax.h".
15641
15642 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15643
15644         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15645         with nat/gdb_ptrace.h.
15646
15647 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15648
15649         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15650         new line.
15651         (mips64_fbsd_sigframe_init): Likewise.
15652
15653 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15654
15655         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15656         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15657
15658 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15659
15660         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15661         * NEWS: Mention new FreeBSD/mips native configuration.
15662         * config/mips/fbsd.mh: New file.
15663         * configure.host: Add mips*-*-freebsd*.
15664         * mips-fbsd-nat.c: New file.
15665
15666 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15667
15668         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15669         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15670         * NEWS: Mention new FreeBSD/mips target.
15671         * configure.tgt: Add mips*-*-freebsd*.
15672         * mips-fbsd-tdep.c: New file.
15673         * mips-fbsd-tdep.h: New file.
15674
15675 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15676
15677         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15678         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15679
15680 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15681
15682         Update copyright year range in all GDB files.
15683
15684 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15685
15686         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15687
15688 For older changes see ChangeLog-2016.
15689 \f
15690 Local Variables:
15691 mode: change-log
15692 left-margin: 8
15693 fill-column: 74
15694 version-control: never
15695 coding: utf-8
15696 End: