Make output_thread_groups take an std::vector<int>
[external/binutils.git] / gdb / ChangeLog
1 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * breakpoint.c (output_thread_groups): Take an std::vector.
4         (print_one_breakpoint_location): Adjust.
5
6 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
7
8         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
9         (ada_evaluate_subexp_for_cast): New function.
10         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
11         ada_evaluate_subexp_for_cast.
12         (ada_evaluate_subexp) <nosideret>: Replace code by call to
13         eval_skip_value.
14         * eval.c (evaluate_var_value): Make non-static.
15         (evaluate_var_msym_value, eval_skip_value): Likewise.
16         * value.h (evaluate_var_value, evaluate_var_msym_value)
17         (eval_skip_value): Declare.
18
19 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
20
21         * ada-lang.c (ada_value_cast): Remove parameter "noside".
22         Update all callers.
23
24 2017-11-16  Pedro Alves  <palves@redhat.com>
25
26         * python/py-unwind.c (pyuw_sniffer): Translate
27         PyExc_KeyboardInterrupt to a GDB Quit exception.
28
29 2017-11-16  Pedro Alves  <palves@redhat.com>
30
31         * infrun.c (resume_cleanups): Delete.
32         (resume): No longer install a resume_cleanups cleanup nor call
33         QUIT.
34         (proceed): Pass the terminal to the inferior.
35         (keep_going_pass_signal): No longer install a resume_cleanups
36         cleanup.
37
38 2017-11-16  Pedro Alves  <palves@redhat.com>
39
40         * inf-loop.c (inferior_event_handler): Don't swallow the exception
41         if the prompt is blocked.
42
43 2017-11-16  Pedro Alves  <palves@redhat.com>
44
45         * breakpoint.c (insert_bp_location): Replace bp_err and
46         bp_err_message locals by a gdb_exception local.
47
48 2017-11-16  Pedro Alves  <palves@redhat.com>
49
50         * inflow.c (scoped_ignore_sigttou): New class.
51         (child_terminal_ours_1, new_tty): Use it.
52
53 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
54
55         * target-float.c (decimal_from_number): Add byte_order argument and
56         call match_endianness.  Error if unknown floating-point type.
57         (decimal_to_number): Add byte_order argument and call match_endianness.
58         (decimal_from_longest): Update call.  Do not call match_endianness.
59         (decimal_from_ulongest): Likewise.
60         (decimal_binop): Likewise.
61         (decimal_is_zero): Likewise.
62         (decimal_compare): Likewise.
63         (decimal_convert): Likewise.
64
65 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
66
67         * python/python.c (gdbpy_rbreak): New function.
68         * NEWS: Document Python rbreak feature.
69
70 2017-11-16  Yao Qi  <yao.qi@linaro.org>
71
72         * features/tic6x-c62x.xml: Remove.
73         * features/tic6x-c64x.xml: Remove.
74         * features/tic6x-c64xp.xml: Remove.
75
76 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
77
78         * symtab.h: Include <array>.
79
80 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
81
82         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
83         (bsd_kvm_proc_cmd): Likewise.
84
85 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
86
87         * tui/tui-win.c (window_name_completer): Replace VEC with
88         std::vector.
89
90 2017-11-15  Andrew Cagney  <cagney@gnu.org>
91
92         * MAINTAINERS: Remove no-longer applicable entries.
93
94 2017-11-15  Andrew Cagney  <cagney@gnu.org>
95
96         * MAINTAINERS: Move self to Past Maintainers.
97
98 2017-11-15  Yao Qi  <yao.qi@linaro.org>
99
100         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
101         * features/nios2-linux.c: Remove.
102         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
103         initialize_tdesc_nios2_linux.
104
105 2017-11-15  Yao Qi  <yao.qi@linaro.org>
106
107         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
108         M68HC11_LAST_HARD_REG + 1.
109
110 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
111
112         PR gdb/22388
113         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
114         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
115         Return TARGET_XFER_EOF if size of returned data is 0.
116
117 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
118
119         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
120         memory-map-selftests.c.
121         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
122         * memory-map.c (memory_map_start_memory): Fix computation of hi
123         address.
124         * unittests/memory-map-selftests.c: New file.
125
126 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
127
128         * ada-lang.c: Fix some typos in the general command documenting
129         how Ada expressions are being evaluated and how their result
130         is printed.
131
132 2017-11-09  Tom Tromey  <tom@tromey.com>
133
134         * psymtab.c (psymbol_hash): Do not hash string contents.
135         (psymbol_compare): Add comment.
136
137 2017-11-09  Tom Tromey  <tom@tromey.com>
138
139         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
140
141 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
142
143         * ada-exp.y (write_var_from_sym): Remove parameter
144         "orig_left_context".  Update all callers.
145
146 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
147
148         * tracepoint.h (class collection_list) <stringify>: Return
149         std::vector<std::string>.
150         (encode_actions_rsp): Change parameters to
151         std::vector<std::string> *.
152         * tracepoint.c (collection_list::stringify): Return
153         std::vector<std::string> and adjust accordingly.
154         (encode_actions_rsp): Changee parameters to
155         std::vector<std::string> and adjust accordingly.
156         * remote.c (free_actions_list),
157         free_actions_list_cleanup_wrapper): Remove.
158         (remote_download_tracepoint): Adjust to std::vector.
159
160 2017-11-08  Tom Tromey  <tom@tromey.com>
161
162         * dwarf2read.c (symbolp): Remove typedef.
163         (read_func_scope): Use std::vector.
164         (process_structure_scope): Use std::vector.
165
166 2017-11-08  Pedro Alves  <palves@redhat.com>
167
168         * ada-lang.c (ada_make_symbol_completion_list): Use
169         completion_skip_symbol.
170         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
171         (symbol_is_function_or_method(symbol*)): New.
172         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
173         completion_skip_symbol.
174         (default_collect_symbol_completion_matches_break_on): Use
175         completion_skip_symbol.  Pass down mode.
176         (collect_file_symbol_completion_matches): Pass down mode.
177         * symtab.h (symbol_is_function_or_method): New declarations.
178         (completion_skip_symbol): New template function.
179
180 2017-11-08  Pedro Alves  <palves@redhat.com>
181
182         * linespec.c (iterate_over_all_matching_symtabs): Add
183         search_domain parameter.  Pass it down to expand_symtabs_matching.
184         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
185         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
186         search_domain.
187         (add_all_symbol_names_from_pspace): Add search_domain parameter.
188         Pass it down.
189         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
190         symbols.
191         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
192         it down.
193
194 2017-11-08  Pedro Alves  <palves@redhat.com>
195
196         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
197         text_len locals and don't pass them down.
198         * symtab.c (completion_list_add_name): Remove
199         sym_text/sym_text_len parameters and adjust.
200         (completion_list_add_symbol, completion_list_add_msymbol)
201         (completion_list_objc_symbol, completion_list_add_fields)
202         (add_symtab_completions): Likewise.
203         (default_collect_symbol_completion_matches_break_on)
204         (collect_file_symbol_completion_matches): Remove sym_text_len
205         local and don't pass it down.
206         * symtab.h (completion_list_add_name): Remove
207         sym_text/sym_text_len parameters.
208
209 2017-11-08  Pedro Alves  <palves@redhat.com>
210
211         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
212         unittests/lookup_name_info-selftests.c.
213         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
214         * cp-support.c: Include "selftest.h".
215         (cp_remove_params_1): Rename from cp_remove_params.  Add
216         'require_param' parameter, and handle it.
217         (cp_remove_params): Reimplement.
218         (cp_remove_params_if_any): New.
219         (selftests::quote): New.
220         (selftests::check_remove_params): New.
221         (selftests::test_cp_remove_params): New.
222         (_initialize_cp_support): Install
223         selftests::test_cp_remove_params.
224         * cp-support.h (cp_remove_params_if_any): Declare.
225         * dwarf2read.c :Include "selftest.h".
226         (dw2_expand_symtabs_matching_symbol): Use
227         lookup_name_info::make_ignore_params.
228         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
229         (selftests::dw2_expand_symtabs_matching::string_or_null)
230         (selftests::dw2_expand_symtabs_matching::check_match)
231         (selftests::dw2_expand_symtabs_matching::test_symbols)
232         (selftests::dw2_expand_symtabs_matching::run_test): New.
233         (_initialize_dwarf2_read): Register
234         selftests::dw2_expand_symtabs_matching::run_test.
235         * psymtab.c (psym_expand_symtabs_matching): Use
236         lookup_name_info::make_ignore_params.
237         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
238         If the lookup name wants to ignore parameters, strip them.
239         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
240         code handling '('.
241         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
242         (default_collect_symbol_completion_matches_break_on): Don't try to
243         strip parameters.
244         * symtab.h (lookup_name_info::lookup_name_info): Add
245         'ignore_parameters' parameter.
246         (lookup_name_info::ignore_parameters)
247         (lookup_name_info::make_ignore_params): New methods.
248         (lookup_name_info::m_ignore_parameters): New field.
249         * unittests/lookup_name_info-selftests.c: New file.
250
251 2017-11-08  Pedro Alves  <palves@redhat.com>
252
253         * dwarf2read.c (dw2_expand_marked_cus)
254         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
255         (dw2_expand_symtabs_matching): Move further below.
256         (dw2_expand_marked_cus): Reindent.
257
258 2017-11-08  Pedro Alves  <palves@redhat.com>
259
260         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
261         (struct name_component): New.
262         (mapped_index::name_components): New field.
263         (mapped_index::symbol_name_at): New method.
264         (dwarf2_read_index): Call mapped_index ctor.
265         (dw2_map_matching_symbols): Add comment about name_components
266         table.
267         (dw2_expand_symtabs_matching): Factor part to...
268         (dw2_expand_symtabs_matching_symbol): ... this new function.
269         Build name components table, and lookup symbols in it before
270         calling the name matcher.
271         (dw2_expand_marked_cus): New, factored out from
272         dw2_expand_symtabs_matching.
273         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
274
275 2017-11-08   Pedro Alves  <palves@redhat.com>
276
277         * ada-lang.c (ada_encode): Rename to ..
278         (ada_encode_1): ... this.  Add throw_errors parameter and handle
279         it.
280         (ada_encode): Reimplement.
281         (match_name): Delete, folded into full_name.
282         (resolve_subexp): No longer pass the encoded name to
283         ada_lookup_symbol_list.
284         (should_use_wild_match): Delete.
285         (name_match_type_from_name): New.
286         (ada_lookup_simple_minsym): Use lookup_name_info and the
287         language's symbol_name_matcher_ftype.
288         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
289         (ada_add_block_renamings): Adjust to use lookup_name_info.
290         (ada_lookup_name): New.
291         (add_nonlocal_symbols, ada_add_all_symbols)
292         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
293         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
294         (ada_name_for_lookup): Delete.
295         (ada_lookup_encoded_symbol): Construct a verbatim name.
296         (wild_match): Reverse sense of return type.  Use bool.
297         (full_match): Reverse sense of return type.  Inline bits of old
298         match_name here.
299         (ada_add_block_symbols): Adjust to use lookup_name_info.
300         (symbol_completion_match): Delete, folded into...
301         (ada_lookup_name_info::matches): ... .this new method.
302         (symbol_completion_add): Delete.
303         (ada_collect_symbol_completion_matches): Add name_match_type
304         parameter.  Adjust to use lookup_name_info and
305         completion_list_add_name.
306         (get_var_value, ada_add_global_exceptions): Adjust to use
307         lookup_name_info.
308         (ada_get_symbol_name_cmp): Delete.
309         (do_wild_match, do_full_match): New functions.
310         (ada_lookup_name_info::ada_lookup_name_info): New method.
311         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
312         functions.
313         (ada_language_defn): Install ada_get_symbol_name_matcher.
314         * ada-lex.l (processId): If name starts with '<', copy it
315         verbatim.
316         * block.c (block_iter_match_step, block_iter_match_first)
317         (block_iter_match_next, block_lookup_symbol)
318         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
319         lookup_name_info.
320         * block.h (block_iter_match_first, block_iter_match_next)
321         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
322         * c-lang.c (c_language_defn, cplus_language_defn)
323         (asm_language_defn, minimal_language_defn): Adjust comments to
324         refer to la_get_symbol_name_matcher.
325         * completer.c (complete_files_symbols)
326         (collect_explicit_location_matches, symbol_completer): Pass a
327         symbol_name_match_type down.
328         * completer.h (class completion_match, completion_match_result):
329         New classes.
330         (completion_tracker::reset_completion_match_result): New method.
331         (completion_tracker::m_completion_match_result): New field.
332         * cp-support.c (make_symbol_overload_list_block): Adjust to use
333         lookup_name_info.
334         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
335         functions.
336         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
337         * d-lang.c: Adjust comments to refer to
338         la_get_symbol_name_matcher.
339         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
340         Adjust to use lookup_name_info.
341         (dict_iter_match_first, dict_iter_match_next)
342         (iter_match_first_hashed, iter_match_next_hashed)
343         (iter_match_first_linear, iter_match_next_linear): Adjust to work
344         with a lookup_name_info.
345         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
346         Likewise.
347         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
348         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
349         (gdb_index_symbol_name_matcher): New class.
350         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
351         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
352         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
353         with a symbol_name_match_type.
354         (f_language_defn): Adjust comments to refer to
355         la_get_symbol_name_matcher.
356         * go-lang.c (go_language_defn): Adjust comments to refer to
357         la_get_symbol_name_matcher.
358         * language.c (default_symbol_name_matcher)
359         (language_get_symbol_name_matcher): New functions.
360         (unknown_language_defn, auto_language_defn): Adjust comments to
361         refer to la_get_symbol_name_matcher.
362         * language.h (symbol_name_cmp_ftype): Delete.
363         (language_defn) <la_collect_symbol_completion_matches>: Add match
364         type parameter.
365         <la_get_symbol_name_cmp>: Delete field.
366         <la_get_symbol_name_matcher>: New field.
367         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
368         (default_symbol_name_matcher, language_get_symbol_name_matcher):
369         Declare.
370         * linespec.c (iterate_over_all_matching_symtabs)
371         (iterate_over_file_blocks): Adjust to use lookup_name_info.
372         (find_methods): Add language parameter, and use lookup_name_info
373         and the language's symbol_name_matcher_ftype.
374         (linespec_complete_function): Adjust.
375         (lookup_prefix_sym): Use lookup_name_info.
376         (add_all_symbol_names_from_pspace): Adjust.
377         (find_superclass_methods): Add language parameter and pass it
378         down.
379         (find_method): Pass symbol language down.
380         (find_linespec_symbols): Don't demangle or Ada encode here.
381         (search_minsyms_for_name): Add lookup_name_info parameter.
382         (add_matching_symbols_to_info): Add name_match_type parameter.
383         Use lookup_name_info.
384         * m2-lang.c (m2_language_defn): Adjust comments to refer to
385         la_get_symbol_name_matcher.
386         * minsyms.c: Include <algorithm>.
387         (add_minsym_to_demangled_hash_table): Remove table parameter and
388         add objfile parameter.  Use search_name_hash, and add language to
389         demangled languages vector.
390         (struct found_minimal_symbols): New struct.
391         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
392         New functions.
393         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
394         input names here.  Use lookup_name_info instead.  Lookup up
395         demangled names once for each language in the demangled names
396         vector.
397         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
398         demangled names once for each language in the demangled names
399         vector.
400         (build_minimal_symbol_hash_tables): Adjust.
401         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
402         lookup_name_info.
403         * objc-lang.c (objc_language_defn): Adjust comment to refer to
404         la_get_symbol_name_matcher.
405         * objfiles.h: Include <vector>.
406         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
407         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
408         la_get_symbol_name_matcher.
409         * p-lang.c (pascal_language_defn): Adjust comment to refer to
410         la_get_symbol_name_matcher.
411         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
412         (match_partial_symbol): Use symbol_name_match_type,
413         lookup_name_info and psymbol_name_matches.
414         (lookup_partial_symbol): Use lookup_name_info.
415         (map_block): Use symbol_name_match_type and lookup_name_info.
416         (psym_map_matching_symbols): Use symbol_name_match_type.
417         (psymbol_name_matches): New.
418         (recursively_search_psymtabs): Use lookup_name_info and
419         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
420         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
421         'kind' parameter to 'domain'.
422         * rust-lang.c (rust_language_defn): Adjust comment to refer to
423         la_get_symbol_name_matcher.
424         * symfile-debug.c (debug_qf_map_matching_symbols)
425         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
426         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
427         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
428         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
429         Adjust to use symbol_name_match_type.
430         <expand_symtabs_matching>: Adjust to use lookup_name_info.
431         (expand_symtabs_matching): Adjust to use lookup_name_info.
432         * symmisc.c (maintenance_expand_symtabs): Use
433         lookup_name_info::match_any ().
434         * symtab.c (symbol_matches_search_name): New.
435         (eq_symbol_entry): Adjust to use lookup_name_info and the
436         language's matcher.
437         (demangle_for_lookup_info::demangle_for_lookup_info): New.
438         (lookup_name_info::match_any): New.
439         (iterate_over_symbols, search_symbols): Use lookup_name_info.
440         (compare_symbol_name): Add language, lookup_name_info and
441         completion_match_result parameters, and use them.
442         (completion_list_add_name): Make extern.  Add language and
443         lookup_name_info parameters.  Use them.
444         (completion_list_add_symbol, completion_list_add_msymbol)
445         (completion_list_objc_symbol): Add lookup_name_info parameters and
446         adjust.  Pass down language.
447         (completion_list_add_fields): Add lookup_name_info parameters and
448         adjust.  Pass down language.
449         (add_symtab_completions): Add lookup_name_info parameters and
450         adjust.
451         (default_collect_symbol_completion_matches_break_on): Add
452         name_match_type parameter, and use it.  Use lookup_name_info.
453         (default_collect_symbol_completion_matches)
454         (collect_symbol_completion_matches): Add name_match_type
455         parameter, and pass it down.
456         (collect_symbol_completion_matches_type): Adjust.
457         (collect_file_symbol_completion_matches): Add name_match_type
458         parameter, and use lookup_name_info.
459         * symtab.h: Include <string> and "common/gdb_optional.h".
460         (enum class symbol_name_match_type): New.
461         (class ada_lookup_name_info): New.
462         (struct demangle_for_lookup_info): New.
463         (class lookup_name_info): New.
464         (symbol_name_matcher_ftype): New.
465         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
466         (symbol_matches_search_name): Declare.
467         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
468         (default_collect_symbol_completion_matches)
469         (collect_symbol_completion_matches)
470         (collect_file_symbol_completion_matches): Add name_match_type
471         parameter.
472         (iterate_over_symbols): Use lookup_name_info.
473         (completion_list_add_name): Declare.
474         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
475         (strncmp_iw_with_mode): Now extern.
476         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
477         (strncmp_iw_with_mode): Declare.
478
479 2017-11-08  Keith Seitz  <keiths@redhat.com>
480             Pedro Alves  <palves@redhat.com>
481
482         * ada-lang.c (ada_language_defn): Install
483         default_search_name_hash.
484         * buildsym.c (struct buildsym_compunit): <language>: New field.
485         (finish_block_internal): Pass language when creating dictionaries.
486         (start_buildsym_compunit, start_symtab): New language parameters.
487         Use them.
488         (restart_symtab): Pass down compilation unit's language.
489         * buildsym.h (enum language): Forward declare.
490         (start_symtab): New 'language' parameter.
491         * c-lang.c (c_language_defn, cplus_language_defn)
492         (asm_language_defn, minimal_language_defn): Install
493         default_search_name_hash.
494         * coffread.c (coff_start_symtab): Adjust.
495         * d-lang.c (d_language_defn): Install default_search_name_hash.
496         * dbxread.c (struct symloc): Add 'pst_language' field.
497         (PST_LANGUAGE): Define.
498         (start_psymtab, read_ofile_symtab): Use it.
499         (process_one_symbol): New 'language' parameter.  Pass it down.
500         * dictionary.c (struct dictionary) <language>: New field.
501         (DICT_LANGUAGE): Define.
502         (dict_create_hashed, dict_create_hashed_expandable)
503         (dict_create_linear, dict_create_linear_expandable): New parameter
504         'language'.  Set the dictionary's language.
505         (iter_match_first_hashed): Adjust to rename.
506         (insert_symbol_hashed): Assert we don't see mismatching
507         languages.  Adjust to rename.
508         (dict_hash): Rename to ...
509         (default_search_name_hash): ... this and make extern.
510         * dictionary.h (struct language_defn): Forward declare.
511         (dict_create_hashed): New parameter 'language'.
512         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
513         * f-lang.c (f_language_defn): Install default_search_name_hash.
514         * go-lang.c (go_language_defn): Install default_search_name_hash.
515         * jit.c (finalize_symtab): Pass compunit's language to dictionary
516         creation.
517         * language.c (unknown_language_defn, auto_language_defn):
518         * language.h (language_defn::la_search_name_hash): New field.
519         (default_search_name_hash): Declare.
520         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
521         * mdebugread.c (new_block): New parameter 'language'.
522         * mdebugread.c (parse_symbol): Pass symbol language to block
523         allocation.
524         (psymtab_to_symtab_1): Pass down language.
525         (new_symtab): Pass compunit's language to block allocation.
526         * objc-lang.c (objc_language_defn): Install
527         default_search_name_hash.
528         * opencl-lang.c (opencl_language_defn):
529         * p-lang.c (pascal_language_defn): Install
530         default_search_name_hash.
531         * rust-lang.c (rust_language_defn): Install
532         default_search_name_hash.
533         * stabsread.h (enum language): Forward declare.
534         (process_one_symbol): Add 'language' parameter.
535         * symtab.c (search_name_hash): New function.
536         * symtab.h (search_name_hash): Declare.
537         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
538
539 2017-11-08  Pedro Alves  <palves@redhat.com>
540
541         * cp-name-parser.y (main): Don't initialize extra_chars.
542
543 2017-11-07  Tom Tromey  <tom@tromey.com>
544
545         * event-top.h (command_handler): Constify.
546         * record-full.c (cmd_record_full_start): Update.
547         * thread.c (thread_apply_all_command): Update.
548         * printcmd.c (eval_command): Update.
549         * mi/mi-main.c (mi_execute_cli_command): Update.
550         (mi_execute_async_cli_command): Update.
551         * tui/tui-stack.c (tui_update_command): Update.
552         * cli/cli-interp.c (safe_execute_command): Constify.
553         * record.c (record_start): Update.
554         (record_start, record_stop, cmd_record_start): Update.
555         * record-btrace.c (cmd_record_btrace_bts_start): Update.
556         (cmd_record_btrace_pt_start): Update.
557         (cmd_record_btrace_start): Update.
558         (cmd_record_btrace_start): Update.
559         * reverse.c (exec_reverse_once): Update.
560         * python/python.c (execute_gdb_command): Don't copy the command.
561         * event-top.c (command_line_handler): Update.
562         (command_handler): Constify.
563         * defs.h (deprecated_call_command_hook): Constify.
564         * cli/cli-script.h (execute_user_command): Constify.
565         * cli/cli-script.c (execute_user_command): Constify.
566         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
567         (enum command_control_type): Update.
568         * main.c (catch_command_errors): Remove non-const overload.
569         (catch_command_errors_ftype): Remove.
570         * python/py-cmd.c (cmdpy_function): Constify.
571         * guile/scm-cmd.c (cmdscm_function): Constify.
572         * cli/cli-dump.c (call_dump_func): Constify.
573         * cli/cli-decode.c (do_const_cfunc): Constify.
574         (do_sfunc): Constify.
575         (cmd_func): Constify.
576         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
577         * top.h (execute_command): Constify.
578         * top.c (execute_command): Constify.
579         (execute_command_to_string): Constify.
580         (deprecated_call_command_hook): Constify.
581         * command.h (cmd_func): Constify.
582         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
583
584 2017-11-07  Tom Tromey  <tom@tromey.com>
585
586         * ada-lang.c (catch_ada_exception_command): Constify.
587         (catch_assert_command): Constify.
588         * break-catch-throw.c (catch_catch_command, catch_throw_command)
589         (catch_rethrow_command): Constify.
590         (catch_exception_command_1): Constify.
591         * breakpoint.h (add_catch_command): Constify.
592         * break-catch-syscall.c (catch_syscall_command_1): Constify.
593         (catch_syscall_split_args): Constify.
594         * break-catch-sig.c (catch_signal_command): Constify.
595         (catch_signal_split_args): Constify.
596         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
597         cmd_const_sfunc_ftype.
598         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
599         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
600         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
601         (add_setshow_string_cmd, struct cmd_list_element)
602         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
603         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
604         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
605         Constify.
606         (set_cmd_sfunc): Constify.
607         (empty_sfunc): Constify.
608         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
609         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
610         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
611         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
612         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
613         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
614         Constify.
615         (set_cmd_sfunc): Constify.
616         (cmd_sfunc_ftype): Remove.
617         * compile/compile.c (set_compile_args): Constify.
618         * infrun.c (set_disable_randomization): Constify.
619         * infcmd.c (set_args_command, set_cwd_command): Constify.
620         * breakpoint.c (set_condition_evaluation_mode): Constify.
621         (add_catch_command): Constify.
622         (catch_fork_command_1, catch_exec_command_1)
623         (catch_load_command_1, catch_unload_command_1): Constify.
624         (catch_load_or_unload): Constify.
625         * guile/scm-param.c (pascm_set_func): Constify.
626         (add_setshow_generic): Constify.
627         * python/py-param.c (get_set_value): Constify.
628         * top.h (set_verbose): Constify.
629         * tui/tui-win.c (tui_set_var_cmd): Constify.
630         * mi/mi-main.c (set_mi_async_command): Constify.
631         * cli/cli-logging.c (set_logging_overwrite)
632         (set_logging_redirect): Constify.
633         * value.c (set_max_value_size): Constify.
634         * valprint.c (set_input_radix, set_output_radix): Constify.
635         * utils.c (set_width_command, set_height_command): Constify.
636         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
637         * tracepoint.c (set_disconnected_tracing)
638         (set_circular_trace_buffer, set_trace_buffer_size)
639         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
640         * top.c (set_history_size_command, set_verbose, set_editing)
641         (set_gdb_datadir, set_history_filename): Constify.
642         * target.c (set_targetdebug, maint_set_target_async_command)
643         (maint_set_target_non_stop_command, set_target_permissions)
644         (set_write_memory_permission): Constify.
645         (open_target): Constify.
646         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
647         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
648         * symtab.c (set_symbol_cache_size_handler): Constify.
649         * symfile.c (set_ext_lang_command): Constify.
650         * symfile-debug.c (set_debug_symfile): Constify.
651         * source.c (set_directories_command): Constify.
652         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
653         * serial.c (set_parity): Constify.
654         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
655         * remote.c (set_remote_exec_file, set_remotebreak)
656         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
657         * record.c (set_record_insn_history_size)
658         (set_record_call_history_size): Constify.
659         * record-full.c (set_record_full_insn_max_num): Constify.
660         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
661         * osabi.c (set_osabi): Constify.
662         * mips-tdep.c (set_mips64_transfers_32bit_regs)
663         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
664         * maint.c (maintenance_set_profile_cmd): Constify.
665         * linux-thread-db.c (set_libthread_db_search_path): Constify.
666         * language.c (set_language_command, set_range_command)
667         (set_case_command): Constify.
668         * infrun.c (set_non_stop, set_observer_mode)
669         (set_stop_on_solib_events, set_schedlock_func)
670         (set_exec_direction_func): Constify.
671         * infcmd.c (set_inferior_tty_command): Constify.
672         * disasm.c (set_disassembler_options_sfunc): Constify.
673         * demangle.c (set_demangling_command): Constify.
674         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
675         * cris-tdep.c (set_cris_version, set_cris_mode)
676         (set_cris_dwarf2_cfi): Constify.
677         * corefile.c (set_gnutarget_command): Constify.
678         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
679         (set_target_wide_charset_sfunc): Constify.
680         * breakpoint.c (update_dprintf_commands): Constify.
681         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
682         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
683         (set_disassembly_style_sfunc): Constify.
684         * arch-utils.c (set_endian, set_architecture): Constify.
685         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
686         * agent.c (set_can_use_agent): Constify.
687
688 2017-11-07  Tom Tromey  <tom@tromey.com>
689
690         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
691         (go32_pde, go32_pte, go32_pte_for_address): Constify.
692         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
693         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
694         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
695         (parse_int_arg, show_thread_default_detach_sc_cmd)
696         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
697         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
698         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
699         (show_task_pause_cmd, set_task_detach_sc_cmd)
700         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
701         (set_noninvasive_cmd, set_thread_pause_cmd)
702         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
703         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
704         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
705         * windows-nat.c (display_selectors): Constify.
706         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
707         non-const "cfunc".
708         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
709         (cmd_cfunc_eq): Likewise.
710         (struct cmd_list_element): Likewise.
711         (do_cfunc): Remove.
712         (cli_user_command_p): Update.
713         * command.h (add_cmd): Remove non-const overload.
714         (cmd_cfunc_ftype): Remove typedef.
715         (cmd_cfunc_eq): Remove non-const overload.
716         * value.c (show_values): Constify.
717         * thread.c (thread_apply_all_command): Constify.
718         * symfile.c (load_command): Constify.
719         * source.c (directory_command): Constify.
720         * maint.c (maintenance_internal_error)
721         (maintenance_demangler_warning, maintenance_space_display)
722         (maintenance_print_architecture, maintenance_translate_address)
723         (maintenance_info_selftests, maintenance_internal_warning):
724         Constify.
725         * breakpoint.c (disable_trace_command, enable_trace_command):
726         Constify.
727         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
728         Constify.
729         (add_auto_load_safe_path): Constify.
730         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
731         * top.h (show_commands): Constify.
732         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
733         * sparc64-tdep.c (adi_examine_command): Constify.
734         (adi_assign_command): Constify.
735
736 2017-11-07  Tom Tromey  <tom@tromey.com>
737
738         * frame.h (info_locals_command, info_args_command): Constify.
739         * auto-load.h (auto_load_info_scripts): Constify.
740         * inferior.h (registers_info): Constify.
741         * copying.c: Rebuild.
742         * copying.awk: Constify generated commands.
743         * auto-load.c (auto_load_info_scripts)
744         (info_auto_load_gdb_scripts): Constify.
745         * cli/cli-decode.c (struct cmd_list_element): Take a
746         cmd_const_cfunc_ftype.
747         * command.h (add_info): Take a cmd_const_cfunc_ftype.
748         * tui/tui-win.c (tui_all_windows_info): Constify.
749         * python/py-auto-load.c (info_auto_load_python_scripts):
750         Constify.
751         * cli/cli-cmds.c (show_command): Remove non-const overload.
752         * tracepoint.c (info_tvariables_command, info_scope_command):
753         Constify.
754         (info_static_tracepoint_markers_command): Constify.
755         * thread.c (info_threads_command): Constify.
756         (print_thread_info_1): Constify.
757         * target.c (info_target_command): Constify.
758         * symtab.c (info_sources_command, info_functions_command)
759         (info_types_command): Constify.
760         (info_variables_command): Remove non-const overload.
761         * symfile.c (info_ext_lang_command): Constify.
762         * stack.c (info_frame_command, info_locals_command)
763         (info_args_command): Constify.
764         (backtrace_command): Remove non-const overload.
765         * source.c (info_source_command, info_line_command): Constify.
766         * solib.c (info_sharedlibrary_command): Constify.
767         * skip.c (info_skip_command): Constify.
768         * ser-go32.c (info_serial_command): Constify.
769         * reverse.c (info_bookmarks_command): Constify.
770         * printcmd.c (info_symbol_command, info_address_command)
771         (info_display_command): Constify.
772         * osdata.c (info_osdata_command): Constify.
773         * objc-lang.c (info_selectors_command, info_classes_command):
774         Constify.
775         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
776         * memattr.c (info_mem_command): Constify.
777         * macrocmd.c (info_macro_command, info_macros_command): Constify.
778         * linux-fork.c (info_checkpoints_command): Constify.
779         * infrun.c (info_signals_command): Constify.
780         * inflow.c (info_terminal_command): Constify.
781         * inferior.c (info_inferiors_command): Constify.
782         (print_inferior): Constify.
783         * infcmd.c (info_program_command, info_all_registers_command)
784         (info_registers_command, info_vector_command)
785         (info_float_command): Constify.
786         (registers_info): Constify.
787         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
788         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
789         Constify.
790         * f-valprint.c (info_common_command): Constify.
791         * dcache.c (info_dcache_command): Constify.
792         (dcache_info_1): Constify.
793         * darwin-nat-info.c (info_mach_tasks_command)
794         (info_mach_task_command, info_mach_ports_command)
795         (info_mach_port_command, info_mach_threads_command)
796         (info_mach_thread_command, info_mach_regions_command)
797         (info_mach_regions_recurse_command, info_mach_region_command)
798         (info_mach_exceptions_command): Constify.
799         (get_task_from_args): Constify.
800         * cp-support.c (info_vtbl_command): Constify.
801         * breakpoint.c (info_watchpoints_command)
802         (info_tracepoints_command): Constify.
803         (info_breakpoints_command): Remove non-const overload.
804         * avr-tdep.c (avr_io_reg_read_command): Constify.
805         * auxv.c (info_auxv_command): Constify.
806         * ada-tasks.c (info_tasks_command): Constify.
807         (info_task): Constify.
808         * ada-lang.c (info_exceptions_command): Constify.
809
810 2017-11-07  Tom Tromey  <tom@tromey.com>
811
812         * solib.h (no_shared_libraries): Constify.
813         * frame.h (return_command): Constify.
814         * cli/cli-cmds.h (quit_command): Constify.
815         * top.h (quit_command, execute_command): Constify.
816         * target.h (flash_erase_command): Constify.
817         * inferior.h (set_inferior_args, attach_command): Constify.
818         * tracepoint.h (start_tracing, stop_tracing): Constify.
819         * breakpoint.h (break_command, tbreak_command)
820         (hbreak_command_wrapper, thbreak_command_wrapper)
821         (rbreak_command_wrapper, watch_command_wrapper)
822         (awatch_command_wrapper, rwatch_command_wrapper)
823         (get_tracepoint_by_number): Constify.
824         * symtab.c (info_variables_command, rbreak_command)
825         (symtab_symbol_info): Constify.
826         (info_variables_command): Add non-const overload.
827         * top.c (dont_repeat_command): Constify.
828         * breakpoint.c (ignore_command, commands_command)
829         (condition_command, tbreak_command, hbreak_command)
830         (thbreak_command, clear_command, break_command)
831         (info_breakpoints_command, watch_command, rwatch_command)
832         (awatch_command, trace_command, ftrace_command, strace_command)
833         (trace_pass_command, break_range_command, dprintf_command)
834         (agent_printf_command, get_tracepoint_by_number)
835         (watch_maybe_just_location, trace_pass_command): Constify.
836         (info_breakpoints_command): Add non-const overload.
837         * tracefile.c (tsave_command): Constify.
838         * infcmd.c (attach_command, disconnect_command, signal_command)
839         (queue_signal_command, stepi_command, nexti_command)
840         (finish_command, next_command, step_command, until_command)
841         (advance_command, jump_command, continue_command, run_command)
842         (start_command, starti_command, interrupt_command)
843         (run_command_1, set_inferior_args, step_1): Constify.
844         * inferior.c (add_inferior_command, remove_inferior_command)
845         (clone_inferior_command): Constify.
846         * linux-fork.c (checkpoint_command, restart_command): Constify.
847         * windows-nat.c (signal_event_command): Constify.
848         * guile/guile.c (guile_repl_command, guile_command): Constify.
849         * printcmd.c (x_command, display_command, printf_command)
850         (output_command, set_command, call_command, print_command)
851         (eval_command): Constify.
852         (non_const_set_command): Remove.
853         (_initialize_printcmd): Update.
854         * source.c (forward_search_command, reverse_search_command):
855         Constify.
856         * jit.c (jit_reader_load_command, jit_reader_unload_command):
857         Constify.
858         * infrun.c (handle_command): Constify.
859         * memattr.c (mem_command): Constify.
860         * stack.c (return_command, up_command, up_silently_command)
861         (down_command, down_silently_command, frame_command)
862         (backtrace_command, func_command, backtrace_command_1): Constify.
863         (backtrace_command): Add non-const overload.
864         * remote-sim.c (simulator_command): Constify.
865         * exec.c (set_section_command): Constify.
866         * tracepoint.c (tdump_command, trace_variable_command)
867         (tstatus_command, tstop_command, tstart_command)
868         (end_actions_pseudocommand, while_stepping_pseudocommand)
869         (collect_pseudocommand, teval_pseudocommand, actions_command)
870         (start_tracing, stop_tracing): Constify.
871         * value.c (init_if_undefined_command): Constify.
872         * tui/tui-stack.c (tui_update_command): Constify.
873         * tui/tui-win.c (tui_refresh_all_command)
874         (tui_set_tab_width_command, tui_set_win_height_command)
875         (tui_set_focus_command, tui_scroll_forward_command)
876         (tui_scroll_backward_command, tui_scroll_left_command)
877         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
878         (tui_set_win_height): Constify.
879         * tui/tui-layout.c (tui_layout_command): Constify.
880         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
881         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
882         (proc_untrace_sysexit_cmd): Constify.
883         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
884         (threadset_test_cmd, threadlist_update_test_cmd)
885         (threadalive_test): Constify.
886         * objc-lang.c (print_object_command): Constify.
887         * command.h (add_com): Constify.
888         * cli/cli-dump.c (restore_command): Constify.
889         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
890         (help_command, complete_command, shell_command, edit_command)
891         (list_command, disassemble_command, make_command)
892         (apropos_command, alias_command): Constify.
893         * cli/cli-script.c (document_command, define_command)
894         (while_command, if_command, validate_comname): Constify.
895         * cli/cli-decode.c (struct cmd_list_element): Change type of
896         "fun".
897         * target.c (do_monitor_command, flash_erase_command): Constify.
898         * regcache.c (reg_flush_command): Constify.
899         * reverse.c (reverse_step, reverse_next, reverse_stepi)
900         (reverse_nexti, reverse_continue, reverse_finish)
901         (save_bookmark_command, goto_bookmark_command)
902         (exec_reverse_once): Constify.
903         * python/python.c (python_interactive_command, python_command):
904         Constify.
905         * typeprint.c (ptype_command, whatis_command, whatis_exp):
906         Constify.
907         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
908         * gcore.c (gcore_command): Constify.
909
910 2017-11-07  Tom Tromey  <tom@tromey.com>
911
912         * printcmd.c (x_command): Call set_repeat_arguments.
913         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
914         * top.c (repeat_arguments): New global.
915         (set_repeat_arguments): New function.
916         (execute_command): Handle repeat_arguments.
917         (show_commands): Calls set_repeat_arguments.
918         * command.h (set_repeat_arguments): Declare.
919
920 2017-11-07  Tom Tromey  <tom@tromey.com>
921
922         * stack.c (backtrace_command): Use std::string.
923         (backtrace_command_1): Make "count_exp" const.
924
925 2017-11-07  Tom Tromey  <tom@tromey.com>
926
927         * source.c (directory_switch, mod_path, add_path): Constify.
928         * defs.h (add_path, mod_path, directory_switch): Constify.
929         * mi/mi-cmd-env.c (env_mod_path): Constify.
930
931 2017-11-07  Tom Tromey  <tom@tromey.com>
932
933         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
934         (run_command_1, continue_command, step_1, jump_command)
935         (signal_command, until_command, advance_command, finish_command)
936         (attach_command): Update.
937
938 2017-11-07  Tom Tromey  <tom@tromey.com>
939
940         * command.h (set_cmd_cfunc): Don't declare.
941         * cli/cli-decode.c (set_cmd_cfunc): Now static.
942
943 2017-11-07  Tom Tromey  <tom@tromey.com>
944
945         * stack.c (select_frame_command): Constify.
946         * cli/cli-decode.c (add_com_suppress_notification): Constify.
947         * command.h (add_com_suppress_notification): Constify.
948
949 2017-11-07  Tom Tromey  <tom@tromey.com>
950
951         * breakpoint.c (stop_command): Constify.
952         * cli/cli-decode.c (struct cmd_list_element): Constify.
953         * command.h (add_abbrev_prefix_cmd): Constify.
954
955 2017-11-07  Pedro Alves  <palves@redhat.com>
956
957         * breakpoint.c (extract_bp_kind): New enum.
958         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
959         factored out from ...
960         (extract_bp_number_and_location): ... here.
961         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
962
963 2017-11-07  Pedro Alves  <palves@redhat.com>
964
965         * breakpoint.c (extract_bp_number_and_location): Change return
966         type to void.  Throw error instead of warning.
967         (enable_disable_command): Adjust.
968
969 2017-11-07  Xavier Roirand  <roirand@adacore.com>
970             Pedro Alves  <palves@redhat.com>
971
972         * breakpoint.c (map_breakpoint_number_range): New, factored out
973         from ...
974         (map_breakpoint_numbers): ... here.
975         (find_location_by_number): Change parameters from string to
976         breakpoint number and location.
977         (extract_bp_number_and_location): New function.
978         (enable_disable_bp_num_loc)
979         (enable_disable_breakpoint_location_range)
980         (enable_disable_command): New functions, factored out ...
981         (enable_command, disable_command): ... these functions, and
982         adjusted to support ranges.
983         * NEWS: Document enable/disable breakpoint location range feature.
984
985 2017-11-06  Luis Machado  <luis.machado@linaro.org>
986
987         * MAINTAINERS (Write After Approval): Update my e-mail address.
988
989 2017-11-06  Pedro Alves  <palves@redhat.com>
990
991         * gnu-nat.c (gnu_terminal_init): Delete.
992         (gnu_target): Don't install gnu_terminal_init.
993         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
994         (child_terminal_init): ... this function.
995
996 2017-11-06  Pedro Alves  <palves@redhat.com>
997
998         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
999         sgtty.h.
1000         * config.in, configure: Regenerate.
1001
1002 2017-11-06  Pedro Alves  <palves@redhat.com>
1003
1004         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1005         (async_init_signals): Adjust.
1006         (handle_stop_sig): Rename to ...
1007         (handle_sigtstp): ... this.
1008         (async_stop_sig): Rename to ...
1009         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1010         SIGTSTP path.
1011         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1012         instead of STOP_SIGNAL thoughout.
1013         (handle_stop_sig): Rename to ...
1014         (handle_sigtstp): ... this.
1015         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1016
1017 2017-11-06  Pedro Alves  <palves@redhat.com>
1018
1019         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1020         longer set flags twice in row.
1021
1022 2017-11-06  Pedro Alves  <palves@redhat.com>
1023
1024         * Makefile.in (SER_HARDWIRE): Update comment.
1025         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1026         * common/gdb_termios.h: Delete file.
1027         * common/job-control.c: Include termios.h and unistd.h instead of
1028         gdb_termios.h.
1029         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1030         check.
1031         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1032         Remove sgtty code.
1033         * configure.ac: No longer check for termio.h and sgtty.h.
1034         * configure: Regenerate.
1035         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1036         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1037         Replace PROCESS_GROUP_TYPE references with pid_t references
1038         throughout.
1039         (gdb_getpgrp): Delete.
1040         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1041         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1042         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1043         gdb_getpgrp.  Use serial_set_tty_state instead aof
1044         serial_noflush_set_tty_state.  Remove sgtty code.
1045         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1046         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1047         (inferior_process_group): Now returns pid_t.
1048         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1049         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1050         * ser-event.c (serial_event_ops): Update.
1051         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1052         (dos_ops): Update.
1053         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1054         * ser-pipe.c (pipe_ops): Update.
1055         * ser-tcp.c (tcp_ops): Update.
1056         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1057         HAVE_TERMIOS checks.
1058         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1059         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1060         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1061         assume termios.
1062         (hardwire_noflush_set_tty_state): Delete.
1063         (hardwire_print_tty_state, hardwire_drain_output)
1064         (hardwire_flush_output, hardwire_flush_input)
1065         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1066         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1067         code, and assume termios.
1068         (hardwire_ops): Update.
1069         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1070         * serial.c (serial_noflush_set_tty_state): Delete.
1071         * serial.h (serial_noflush_set_tty_state): Delete.
1072         (serial_ops::noflush_set_tty_state): Delete.
1073
1074 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1075
1076         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1077         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1078         (COMMON_OBS): Remove doublest.o and dfp.o.
1079         Do not build target-float.c (instead of doublest.c)
1080         with -Wformat-nonliteral.
1081
1082         * doublest.c: Remove file.
1083         * doublest.h: Remove file.
1084         * dfp.c: Remove file.
1085         * dfp.h: Remove file.
1086
1087         * target-float.c: Do not include "doublest.h" and "dfp.h".
1088         (DOUBLEST): Move here from doublest.h.
1089         (enum float_kind): Likewise.
1090         (FLOATFORMAT_CHAR_BIT): Likewise.
1091         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1092         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1093         (floatformat_precision): Likewise.
1094         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1095         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1096         Likewise.
1097         (host_float_format, host_double_format, host_long_double_format):
1098         Likewise.
1099         (floatformat_to_string, floatformat_from_string): Likewise.
1100         (floatformat_to_doublest): Likewise.  Also, inline the original
1101         convert_floatformat_to_doublest.
1102         (floatformat_from_doublest): Likewise.  Also, inline the original
1103         convert_floatformat_from_doublest.
1104
1105         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1106         (MAX_DECIMAL_STRING): Move here from dfp.c.
1107         (match_endianness): Likewise.
1108         (set_decnumber_context, decimal_check_errors): Likewise.
1109         (decimal_from_number, decimal_to_number): Likewise.
1110         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1111         (decimal_from_longest, decimal_from_ulongest): Likewise.
1112         (decimal_to_longest): Likewise.
1113         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1114         (decimal_convert): Likewise.
1115
1116 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1117
1118         * doublest.c: Do not include "gdbtypes.h".
1119         (extract_typed_floating): Remove.
1120         (store_typed_floating): Remove.
1121         (convert_typed_floating): Remove.
1122         * doublest.h (struct type): Remove.
1123         (DOUBLEST_PRINT_FORMAT): Remove.
1124         (DOUBLEST_SCAN_FORMAT): Remove.
1125         (extract_typed_floating): Remove.
1126         (store_typed_floating): Remove.
1127         (convert_typed_floating): Remove.
1128
1129         * dfp.c (decimal_from_doublest): Remove.
1130         (decimal_to_doublest): Remove.
1131         * dfp.h: Do not include "doublest.h".
1132         (decimal_from_doublest): Remove.
1133         (decimal_to_doublest): Remove.
1134
1135         * value.c: Do not include "doublest.h" and "dfp.h".
1136         (value_as_double): Remove.
1137         (unpack_double): Remove.
1138         (value_from_double): Remove.
1139         (value_from_decfloat): Remove.
1140         * value.h: Do not include "doublest.h".
1141         (value_as_double): Remove.
1142         (unpack_double): Remove.
1143         (value_from_double): Remove.
1144         (value_from_decfloat): Remove.
1145
1146 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1147
1148         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1149         (i386_extract_return_value): Use target_float_convert.
1150         (i386_store_return_value): Likewise.
1151         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1152         (i387_value_to_register): Likewise.
1153         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1154         (ia64_register_to_value): Use target_float_convert.
1155         (ia64_value_to_register): Likewise.
1156         (ia64_extract_return_value): Likewise.
1157         (ia64_store_return_value): Likewise.
1158         (ia64_push_dummy_call): Likewise.
1159         * m68k-tdep.c: Include "target-float.h".
1160         (m68k_register_to_value): Use target_float_convert.
1161         (m68k_value_to_register): Likewise.
1162         (m68k_svr4_extract_return_value): Likewise.
1163         (m68k_svr4_store_return_value): Likewise.
1164         * ppc-sysv-tdep.c: Include "target-float.h".
1165         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1166         (do_ppc_sysv_return_value): Likewise.
1167         (ppc64_sysv_abi_push_freg): Likewise.
1168         (ppc64_sysv_abi_return_value_base): Likewise.
1169         * rs6000-aix-tdep.c: Include "target-float.h".
1170         (rs6000_push_dummy_call): Use target_float_convert.
1171         (rs6000_return_value): Likewise.
1172         * rs6000-lynx178-tdep.c: Include "target-float.h".
1173         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1174         (rs6000_lynx178_return_value): Likewise.
1175         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1176         (rs6000_register_to_value): Use target_float_convert.
1177         (rs6000_value_to_register): Likewise.
1178         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1179         (arm_extract_return_value): Use target_float_convert.
1180         (arm_store_return_value): Likewise.
1181         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1182         (sh_register_convert_to_virtual): Use target_float_convert.
1183         (sh_register_convert_to_raw): Likewise.
1184         * sh64-tdep.c: Include "target-float.h".
1185         (sh64_extract_return_value): Use target_float_convert.
1186         (sh64_register_convert_to_virtual): Likewise.
1187         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1188
1189 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1190
1191         * target-float.c (floatformat_to_host_double): New function.
1192         (floatformat_from_host_double): Likewise.
1193         (target_float_to_host_double): Likewise.
1194         (target_float_from_host_double): Likewise.
1195         * target-float.h (target_float_to_host_double): Add prototype.
1196         (target_float_from_host_double): Likewise.
1197
1198         * guile/scm-value.c: Include "target-float.h".
1199         (gdbscm_value_to_real): Use target_float_to_host_double.
1200         Handle integer source values via value_as_long.
1201         * guile/scm-math.c: Include "target-float.h".  Do not include
1202         "doublest.h", "dfp.h", and "expression.h".
1203         (vlscm_convert_typed_number): Use target_float_from_host_double.
1204         (vlscm_convert_number): Likewise.
1205
1206         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1207         (convert_value_from_python): Use target_float_from_host_double.
1208
1209 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1210
1211         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1212         (cast_from_fixed): Likewise.
1213         (ada_scaling_type): New function.
1214         (ada_delta): Return value instead of DOUBLEST.  Perform target
1215         arithmetic instead of host arithmetic.
1216         (scaling_factor): Rename to ...
1217         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1218         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1219         (ada_fixed_to_float): Remove.
1220         (ada_float_to_fixed): Remove.
1221         * ada-lang.h (ada_fixed_to_float): Remove.
1222         (ada_float_to_fixed): Remove.
1223         (ada_delta): Return value instead of DOUBLEST.
1224         (ada_scaling_factor): Add prototype.
1225
1226         * ada-typeprint.c: Include "target-float.h".
1227         (print_fixed_point_type): Perform target arithmetic instead of
1228         host arithmetic.
1229         * ada-valprint.c: Include "target-float.h".
1230         (ada_val_print_num): Perform target arithmetic instead of
1231         host arithmetic for fixed-point types.
1232
1233 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1234
1235         * target-float.c: Include <math.h>.
1236         (floatformat_binop): New function.
1237         (floatformat_compare): Likewise.
1238         (target_float_binop): Likewise.
1239         (target_float_compare): Likewise.
1240         * target-float.h: Include "expression.h".
1241         (target_float_binop): Add prototype.
1242         (target_float_compare): Likewise.
1243
1244         * valarith.c: Do not include "doublest.h" and "dfp.h".
1245         Include "common/byte-vector.h".
1246         (value_args_as_decimal): Remove, replace by ...
1247         (value_args_as_target_float): ... this function.  Handle both
1248         binary and decimal target floating-point formats.
1249         (scalar_binop): Handle both binary and decimal FP using
1250         value_args_as_target_float and target_float_binop.
1251         (value_equal): Handle both binary and decimal FP using
1252         value_args_as_target_float and target_float_compare.
1253         (value_less): Likewise.
1254         (value_pos): Handle all scalar types as simple copy.
1255         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1256         * dfp.c (decimal_binop): Throw error instead of internal_error
1257         when called with an unsupported operation code.
1258
1259 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1260
1261         * target-float.c (target_float_to_string): New function.
1262         (target_float_from_string): New function.
1263         * target-float.h (target_float_to_string): Add prototype.
1264         (target_float_from_string): Add prototype.
1265
1266         * valprint.c: Include "target-float.h".  Do not include
1267         "doublest.h" and "dfp.h".
1268         (print_floating): Use target_float_to_string.
1269         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1270         (printf_floating): Use target_float_to_string.
1271         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1272         (print_i387_value): Use target_float_to_string.
1273         * mips-tdep.c: Include "target-float.h".
1274         (mips_print_fp_register): Use target_float_to_string.
1275         * sh64-tdep.c: Include "target-float.h".
1276         (sh64_do_fp_register): Use target_float_to_string.
1277
1278         * parse.c: Include "target-float.h".  Do not include
1279         "doublest.h" and "dfp.h".
1280         (parse_float): Use target_float_from_string.
1281         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1282         (define_symbol): Use target_float_from_string.
1283         * gdbarch-selftests.c: Include "target-float.h".
1284         (register_to_value_test): Use target_float_from_string.
1285
1286 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1287
1288         * Makefile.c (SFILES): Add target-float.c.
1289         (HFILES_NO_SRCDIR): Add target-float.h.
1290         (COMMON_OBS): Add target-float.o.
1291         * target-float.h: New file.
1292         * target-float.c: New file.
1293
1294         * doublest.c (floatformat_classify): Fix detection of float_zero.
1295
1296         * gdbtypes.c (is_floating_type): New function.
1297         * gdbtypes.h (is_floating_type): Add prototype.
1298
1299         * value.c: Do not include "floatformat.h".
1300         (unpack_double): Use target_float_is_valid.
1301         (is_floating_value): New function.
1302         * value.h (is_floating_value): Add prototype-
1303
1304         * valarith.c: Include "target-float.h".
1305         (value_logical_not): Use target_float_is_zero.
1306
1307         * python/py-value.c: Include "target-float.h".
1308         (valpy_nonzero): Use target_float_is_zero.
1309
1310 2017-11-04  Tom Tromey  <tom@tromey.com>
1311
1312         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1313
1314 2017-11-04  Tom Tromey  <tom@tromey.com>
1315
1316         * breakpoint.c (set_momentary_breakpoint): Return
1317         breakpoint_up.
1318         (until_break_command): Update.
1319         (new_until_break_fsm): Change argument types to
1320         breakpoint_up.
1321         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1322         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1323         Remove.
1324         * infcmd.c (finish_forward): Update.
1325         * breakpoint.h (set_momentary_breakpoint)
1326         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1327         (make_cleanup_delete_breakpoint): Remove.
1328         (struct breakpoint_deleter): New.
1329         (breakpoint_up): New typedef.
1330         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1331         (insert_exception_resume_breakpoint): Update.
1332         (insert_exception_resume_from_probe): Update.
1333         (insert_longjmp_resume_breakpoint): Update.
1334         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1335         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1336         * infcall.c (call_function_by_hand_dummy): Update
1337
1338 2017-11-04  Tom Tromey  <tom@tromey.com>
1339
1340         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1341
1342 2017-11-04  Tom Tromey  <tom@tromey.com>
1343
1344         * linux-tdep.c (linux_core_info_proc_mappings): Use
1345         gdb::def_vector.
1346         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1347         "size" argument.
1348         (linux_corefile_thread): Update.
1349         (linux_make_corefile_notes): Remove unused variable.
1350
1351 2017-11-04  Tom Tromey  <tom@tromey.com>
1352
1353         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1354         gdb::byte_vector.
1355
1356 2017-11-04  Tom Tromey  <tom@tromey.com>
1357
1358         * objfiles.c (do_free_objfile_cleanup): Remove.
1359         * compile/compile-object-load.c (compile_object_load): Update.
1360         * objfiles.h (make_cleanup_free_objfile): Remove.
1361
1362 2017-11-04  Tom Tromey  <tom@tromey.com>
1363
1364         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1365         (adi_read_versions): Change "tags" to "gdb_byte *".
1366         (adi_print_versions): Likewise.
1367
1368 2017-11-04  Tom Tromey  <tom@tromey.com>
1369
1370         * breakpoint.c
1371         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1372         from start_rbreak_breakpoints.
1373         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1374         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1375         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1376         * symtab.c (do_end_rbreak_breakpoints): Remove.
1377         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1378
1379 2017-11-04  Tom Tromey  <tom@tromey.com>
1380
1381         * cp-namespace.c (reset_directive_searched): Remove.
1382         (cp_lookup_symbol_via_imports): Use scoped_restore.
1383         * cp-support.c (reset_directive_searched): Remove.
1384         (make_symbol_overload_list_using): Use scoped_restore.
1385         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1386         (reset_directive_searched): Remove.
1387
1388 2017-11-04  Tom Tromey  <tom@tromey.com>
1389
1390         * symfile.c (find_separate_debug_file_by_debuglink): Use
1391         unique_xmalloc_ptr.
1392
1393 2017-11-04  Tom Tromey  <tom@tromey.com>
1394
1395         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1396         type of "info".
1397         (compute_stack_depth): Likewise.
1398         (do_compile_dwarf_expr_to_c): Use std::vector.
1399
1400 2017-11-04  Tom Tromey  <tom@tromey.com>
1401
1402         * compile/compile-object-load.c (link_callbacks_einfo): Use
1403         std::string.
1404
1405 2017-11-04  Tom Tromey  <tom@tromey.com>
1406
1407         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1408         Use scoped_free_pendings.
1409         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1410         scoped_free_pendings.
1411         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1412         (xcoff_initial_scan): Likewise.
1413         * buildsym.c (reset_symtab_globals): Update comment.
1414         (scoped_free_pendings): Rename from really_free_pendings.
1415         (prepare_for_building): Update comment.
1416         (buildsym_init): Likewise.
1417         * buildsym.h (class scoped_free_pendings): New class.
1418         (really_free_pendings): Don't declare.
1419
1420 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1421
1422         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1423         output when converting a zero value to a special byteorder format.
1424
1425 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1426
1427         * frame.c (do_frame_register_read): Remove aspace.
1428         * jit.c (jit_frame_sniffer): Likwise.
1429         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1430         * regcache.c (regcache::regcache): Pass nullptr.
1431         (regcache_print): Caller updated.
1432         * regcache.h (regcache::regcache): Remove one constructor
1433         parameter aspace.
1434
1435 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1436
1437         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1438
1439 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1440
1441         * breakpoint.c (insert_single_step_breakpoints): Update.
1442         * frame.c (struct frame_info) <aspace>: Add const.
1443         (frame_save_as_regcache): Add const.
1444         (get_frame_address_space): Return const address_space *.
1445         * frame.h (get_frame_address_space): Update declaration.
1446         * infrun.c (struct step_over_info) <aspace>: Add const.
1447         (set_step_over_info): Make aspace const.
1448         (displaced_step_prepare_throw): Change variable const.
1449         (resume): Likewise.
1450         (proceed): Likewise.
1451         (adjust_pc_after_break): Likewise.
1452         (save_waitstatus): Likewise.
1453         (handle_signal_stop): Likewise.
1454         (keep_going_pass_signal): Likewise.
1455         * jit.c (jit_frame_sniffer): Add const.
1456         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1457         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1458         * record-full.c (record_full_wait_1): Likewise.
1459         * regcache.c (regcache::regcache): Change parameter to const.
1460         * regcache.h (regcache::regcache): Likewise.
1461         (regcache::aspace): Return const address_space *.
1462         (regcache) <m_aspace>: Add const.
1463
1464 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1465
1466         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1467         * frame.c (create_sentinel_frame): Likewise.
1468         * infrun.c (displaced_step_prepare_throw): Likewise.
1469         (resume): Likewise.
1470         (thread_still_needs_step_over_bp): Likewise.
1471         (proceed): Likewise.
1472         (do_target_wait): Likewise.
1473         (adjust_pc_after_break): Likewise.
1474         (handle_syscall_event): Likewise.
1475         (save_waitstatus): Likewise.
1476         (handle_inferior_event_1): Likewise.
1477         (handle_signal_stop): Likewise.
1478         (keep_going_pass_signal): Likewise.
1479         * linux-nat.c (status_callback): Likewise.
1480         (save_stop_reason): Likewise.
1481         (resume_stopped_resumed_lwps): Likewise.
1482         * record-full.c (record_full_exec_insn): Likewise.
1483         (record_full_wait_1): Likewise.
1484         * regcache.c (get_regcache_aspace): Remove.
1485         * regcache.h (get_regcache_aspace): Remove.
1486
1487 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1488
1489         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1490         (init_regcache_descr): Use gdbarch_num_regs.
1491         (regcache::regcache): Likewise.
1492         (regcache::get_register_status): Likewise.
1493         (regcache::assert_raw_regnum): Likewise.
1494         (regcache::cooked_read): Likewise.
1495         (regcache::cooked_read_value): Likewise.
1496         (regcache::cooked_write): Likewise.
1497         (regcache::dump): Likewise.
1498         (regcache::num_raw_registers): New method.
1499         * regcache.h (class regcache) <num_raw_registers>: New.
1500
1501 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1502
1503         * regcache.c (regcache::assert_regnum): New method.
1504         (regcache::invalidate): Call assert_regnum.
1505         (regcache::raw_update): Likewise.
1506         (regcache::raw_write): Likewise.
1507         (regcache::raw_read_part): Likewise.
1508         (regcache::raw_write_part): Likewise.
1509         (regcache::raw_supply): Likewise.
1510         (regcache::raw_supply_integer): Likewise.
1511         (regcache::raw_supply_zeroed): Likewise.
1512         (regcache::raw_collect): Likewise.
1513         (regcache::raw_collect_integer): Likewise.
1514         * regcache.h (regcache::assert_regnum): Declare.
1515
1516 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1517
1518         * regcache.c (regcache::dump): Remove code.
1519
1520 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1521
1522         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1523         Remove.
1524         <sizeof_cooked_register_status>: Remove.
1525         (init_regcache_descr): Update.
1526         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1527         (regcache::save): Likewise.
1528         (regcache::dump): Likewise.
1529
1530 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1531
1532         * ft32-tdep.c (ft32_fetch_instruction): New function.
1533         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1534
1535 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1536
1537         * cli/cli-script.c (execute_control_command): Rename to ...
1538         (execute_control_command_1): ... this.
1539         (execute_control_command): New function.
1540
1541 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1542
1543         * tracepoint.c (tfind_command): Remove const_cast.
1544
1545 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1546
1547         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1548
1549 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1550
1551         * common/common-utils.h (in_inclusive_range): New function.
1552         * arm-tdep.c (arm_record_extension_space): Use
1553         in_inclusive_range.
1554         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1555         * cris-tdep.c (cris_spec_reg_applicable): Use
1556         in_inclusive_range.
1557
1558 2017-10-30  Pedro Alves  <palves@redhat.com>
1559             Simon Marchi <simon.marchi@ericsson.com>
1560
1561         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1562         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1563
1564 2017-10-30  Pedro Alves  <palves@redhat.com>
1565
1566         * common/common-utils.c (string_appendf, string_vappendf): New
1567         functions.
1568         * common/common-utils.h (string_appendf, string_vappendf): New
1569         declarations.
1570         * unittests/common-utils-selftests.c (string_appendf_func)
1571         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1572         (string_vappendf_tests): New functions.
1573         (_initialize_common_utils_selftests): Register "string_appendf" and
1574         "string_vappendf tests".
1575
1576 2017-10-30  Pedro Alves  <palves@redhat.com>
1577
1578         * unittests/common-utils-selftests.c (format_func): New typedef.
1579         (string_printf_tests, string_vprintf_tests): Tests factored out
1580         and merged to ...
1581         (test_format_func): ... this new function.
1582         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1583         test_format_func.
1584
1585 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1586
1587         * darwin-nat.c: Remove include of gdb.h.
1588
1589 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1590
1591         * xtensa-xtregs.c: Fix formatting issues.
1592
1593 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1594
1595         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1596
1597 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1598
1599         PR python/21213
1600         * python/py-infthread.c (thpy_get_inferior): Increment reference
1601         of inferior before returning it.
1602
1603 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1604
1605         * unittests/common-utils-selftests.c (format): Add
1606         ATTRIBUTE_PRINTF.
1607
1608 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1609
1610         * xml-syscall.c (struct syscall_desc): Add constructor.
1611         <name>: Change type to std::string.
1612         (syscall_desc_up): New typedef.
1613         (syscall_desc_p): Remove typeder.
1614         (DEF_VEC_P(syscall_desc_p)): Remove.
1615         (struct syscall_group_desc): Add constructor.
1616         <name>: Change type to std::string.
1617         <syscalls>: Change type to std::vector.
1618         (syscall_group_desc_up): New typedef.
1619         (syscall_group_desc_p): Remove typedef.
1620         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1621         (struct syscalls_info) <syscalls>: Change type to std::vector of
1622         unique_ptr.
1623         <groups>: Likewise.
1624         <my_gdb_datadir>: Change type to std::string.
1625         (syscalls_info_up): New typedef.
1626         (allocate_syscalls_info): Remove.
1627         (syscalls_info_free_syscalls_desc): Remove.
1628         (syscalls_info_free_syscall_group_desc): Remove.
1629         (free_syscalls_info): Remove.
1630         (make_cleanup_free_syscalls_info): Remove.
1631         (syscall_group_create_syscall_group_desc): Adjust.
1632         (syscall_group_add_syscall): Adjust.
1633         (syscall_create_syscall_desc): Adjust.
1634         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1635         (init_syscalls_info): Adjust.
1636         (syscall_group_get_group_by_name): Adjust.
1637         (xml_get_syscall_number): Adjust.
1638         (xml_get_syscall_name): Adjust.
1639         (xml_list_of_syscalls): Adjust.
1640         (xml_list_syscalls_by_group): Adjust.
1641         (xml_list_of_groups): Adjust.
1642
1643 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1644
1645         * probe.h: Don't include gdb_vecs.h.
1646         (DEF_VEC_P (probe_p)): Remove.
1647         (find_probes_in_objfile): Return an std::vector.
1648         * probe.c (find_probes_in_objfile): Likewise.
1649         * breakpoint.c (breakpoint_objfile_data)
1650         <longjmp_probes>: Change type to std::vector.
1651         <exception_probes>: Likewise.
1652         (free_breakpoint_probes): Don't manually free vectors.
1653         (create_longjmp_master_breakpoint): Adjust.
1654         (create_exception_master_breakpoint): Adjust.
1655         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1656         parameter type, adjust.
1657         (svr4_create_solib_event_breakpoints): Adjust.
1658
1659 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1662         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1663         with new.
1664         (free_breakpoint_probes): Rename to ...
1665         (free_breakpoint_objfile_data): ... this, and call delete on
1666         bp_objfile_data..
1667
1668 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1669
1670         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1671         (loaded_script_ptr): Remove typedef.
1672         (DEF_VEC_P (loaded_script_ptr)): Remove.
1673         (struct collect_matching_scripts_data): Add constructor.
1674         <scripts_p>: Change type to (pointer to) std::vector.
1675         (collect_matching_scripts_data): Adjust.
1676         (sort_scripts_by_name): Make suitable for std::sort.
1677         (print_scripts): Don't sort vector, adjust to std::vector.
1678         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1679
1680 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1681
1682         * symfile.c (filename_language): Make struct, not typedef.  Add
1683         constructor.
1684         <ext>: Change type to std::string.
1685         (DEF_VEC_O (filename_language)): Remove.
1686         (filename_language_table): Change type to std::vector.
1687         (add_filename_language): Adjust.
1688         (set_ext_lang_command): Adjust.
1689         (info_ext_lang_command): Adjust.
1690         (deduce_language_from_filename): Adjust.
1691         (class scoped_restore_filename_language_table): Remove.
1692         (test_filename_language): Use scoped_restore.
1693         (test_set_ext_lang_command): Use scoped_restore, adjust to
1694         std::vector change.
1695
1696 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1697
1698         * symfile.c: Include selftest.h.
1699         (class scoped_restore_filename_language_table): New.
1700         (test_filename_language): New test.
1701         (test_set_ext_lang_command): New test.
1702         (_initialize_symfile): Register tests.
1703
1704 2017-10-27  Keith Seitz  <keiths@redhat.com>
1705
1706         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1707         in the bp_location, falling back to find_pc_sect_function when
1708         needed.
1709         (add_location_to_breakpoint): Save sal->symbol.
1710         * breakpoint.h (struct bp_location) <symbol>: New field.
1711         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1712         * symtab.h (struct symtab_and_line) <symbol>: New field.
1713
1714 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1715
1716         PR gdb/13669
1717         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1718         to rewind obstack.
1719
1720 2017-10-26  Pedro Alves  <palves@redhat.com>
1721
1722         * remote.c (remote_async_terminal_ours_p): Delete.
1723         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1724         Remove references to 'remote_async_terminal_ours_p'.
1725
1726 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1727
1728         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1729
1730 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1731
1732         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1733         aspace const.
1734         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1735         Likewise.
1736         * breakpoint.c (bpstat_check_location): Remove cast.
1737         (breakpoint_hit_catch_fork): Make aspce const.
1738         (breakpoint_hit_catch_solib): Likewise.
1739         (breakpoint_hit_catch_exec): Likewise.
1740         (breakpoint_hit_ranged_breakpoint): Likewise.
1741         (breakpoint_hit_watchpoint): Likewise.
1742         (base_breakpoint_breakpoint_hit): Likewise.
1743         (bkpt_breakpoint_hit): Likewise.
1744         (dprintf_breakpoint_hit): Likewise.
1745         (tracepoint_breakpoint_hit): Likewise.
1746         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1747
1748 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1749
1750         * breakpoint.c (breakpoint_location_address_match): Change
1751         "struct address_space *" to "const address_space".
1752         (breakpoint_location_address_range_overlap): Likewise.
1753         (breakpoint_here_p): Likewise.
1754         (breakpoint_in_range_p): Likewise.
1755         (moribund_breakpoint_here_p): Likewise.
1756         (bp_location_inserted_here_p): Likewise.
1757         (software_breakpoint_inserted_here_p): Likewise.
1758         (hardware_breakpoint_inserted_here_p): Likewise.
1759         (hardware_watchpoint_inserted_in_range): Likewise.
1760         (bpstat_check_location): Likewise.
1761         (bpstat_stop_status): Likewise.
1762         (breakpoint_address_match): Likewise.
1763         (breakpoint_address_match_range): Likewise.
1764         (breakpoint_location_address_match): Likewise.
1765         (breakpoint_location_address_range_overlap): Likewise.
1766         (insert_single_step_breakpoint): Likewise.
1767         (breakpoint_has_location_inserted_here): Likewise.
1768         (single_step_breakpoint_inserted_here_p): Likewise.
1769         (pc_at_non_inline_function): Likewise.
1770         * breakpoint.h (bpstat_stop_status): Update declaration.
1771         (breakpoint_here_p): Likewise.
1772         (breakpoint_in_range_p): Likewise.
1773         (moribund_breakpoint_here_p): Likewise.
1774         (breakpoint_inserted_here_p): Likewise.
1775         (software_breakpoint_inserted_here_p): Likewise.
1776         (hardware_breakpoint_inserted_here_p): Likewise.
1777         (breakpoint_has_location_inserted_here): Likewise.
1778         (single_step_breakpoint_inserted_here_p): Likewise.
1779         (hardware_watchpoint_inserted_in_range): Likewise.
1780         (breakpoint_address_match): Likewise.
1781         (insert_single_step_breakpoint): Likewise.
1782         (pc_at_non_inline_function): Likewise.
1783         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1784         * record.c (record_check_stopped_by_breakpoint): Likewise.
1785         * record.h (record_check_stopped_by_breakpoint): Likewise.
1786         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1787
1788 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1789
1790         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1791         regcache->arch () instead get_regcache_arch.
1792         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1793         Likewise.
1794         (aarch64_fbsd_store_inferior_registers): Likewise.
1795         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1796         (store_gregs_to_thread): Likewise.
1797         (fetch_fpregs_from_thread): Likewise.
1798         (store_fpregs_to_thread): Likewise.
1799         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1800         (aarch64_store_return_value): Likewise.
1801         (aarch64_software_single_step): Likewise.
1802         * aix-thread.c (aix_thread_wait): Likewise.
1803         (supply_reg32): Likewise.
1804         (supply_sprs64): Likewise.
1805         (supply_sprs32): Likewise.
1806         (fill_gprs64): Likewise.
1807         (fill_gprs32): Likewise.
1808         (fill_sprs64): Likewise.
1809         (fill_sprs32): Likewise.
1810         (store_regs_user_thread): Likewise.
1811         (store_regs_kernel_thread): Likewise.
1812         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1813         (alphabsd_store_inferior_registers): Likewise.
1814         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1815         (alpha_store_return_value): Likewise.
1816         (alpha_deal_with_atomic_sequence): Likewise.
1817         (alpha_next_pc): Likewise.
1818         (alpha_software_single_step): Likewise.
1819         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1820         (amd64bsd_store_inferior_registers): Likewise.
1821         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1822         Likewise.
1823         (amd64_linux_store_inferior_registers): Likewise.
1824         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1825         (amd64_collect_native_gregset): Likewise.
1826         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1827         (amd64obsd_collect_uthread): Likewise.
1828         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1829         (amd64_collect_fpregset): Likewise.
1830         (amd64_supply_fxsave): Likewise.
1831         (amd64_supply_xsave): Likewise.
1832         (amd64_collect_fxsave): Likewise.
1833         (amd64_collect_xsave): Likewise.
1834         * arc-tdep.c (arc_write_pc): Likewise.
1835         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1836         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1837         (arm_fbsd_store_inferior_registers): Likewise.
1838         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1839         (store_vfp_regs): Likewise.
1840         (arm_linux_fetch_inferior_registers): Likewise.
1841         (arm_linux_store_inferior_registers): Likewise.
1842         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1843         (arm_linux_sigreturn_next_pc): Likewise.
1844         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1845         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1846         (fetch_register): Likewise.
1847         (store_register): Likewise.
1848         * arm-tdep.c (arm_is_thumb): Likewise.
1849         (displaced_in_arm_mode): Likewise.
1850         (bx_write_pc): Likewise.
1851         (arm_get_next_pcs_addr_bits_remove): Likewise.
1852         (arm_software_single_step): Likewise.
1853         (arm_extract_return_value): Likewise.
1854         (arm_store_return_value): Likewise.
1855         (arm_write_pc): Likewise.
1856         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1857         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1858         (bsd_uthread_store_registers): Likewise.
1859         * core-regset.c (fetch_core_registers): Likewise.
1860         * corelow.c (get_core_registers): Likewise.
1861         * cris-tdep.c (cris_store_return_value): Likewise.
1862         (cris_extract_return_value): Likewise.
1863         (find_step_target): Likewise.
1864         (find_step_target): Likewise.
1865         (cris_software_single_step): Likewise.
1866         * ctf.c (ctf_fetch_registers): Likewise.
1867         * darwin-nat.c (cancel_breakpoint): Likewise.
1868         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1869         * frv-tdep.c (frv_extract_return_value): Likewise.
1870         * ft32-tdep.c (ft32_store_return_value): Likewise.
1871         (ft32_extract_return_value): Likewise.
1872         * go32-nat.c (fetch_register): Likewise.
1873         (go32_fetch_registers): Likewise.
1874         (go32_store_registers): Likewise.
1875         (store_register): Likewise.
1876         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1877         (h8300_store_return_value): Likewise.
1878         * hppa-linux-nat.c (fetch_register): Likewise.
1879         (store_register): Likewise.
1880         (hppa_linux_fetch_inferior_registers): Likewise.
1881         (hppa_linux_store_inferior_registers): Likewise.
1882         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1883         (i386_darwin_store_inferior_registers): Likewise.
1884         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1885         (gnu_store_registers): Likewise.
1886         * i386-linux-nat.c (fetch_register): Likewise.
1887         (store_register): Likewise.
1888         (supply_gregset): Likewise.
1889         (fill_gregset): Likewise.
1890         (i386_linux_fetch_inferior_registers): Likewise.
1891         (i386_linux_store_inferior_registers): Likewise.
1892         (i386_linux_resume): Likewise.
1893         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1894         Likewise.
1895         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1896         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1897         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1898         (i386obsd_collect_uthread): Likewise.
1899         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1900         (i386_supply_gregset): Likewise.
1901         (i386_collect_gregset): Likewise.
1902         (i386_supply_fpregset): Likewise.
1903         (i386_collect_fpregset): Likewise.
1904         (i386_mpx_bd_base): Likewise.
1905         * i386-v4-nat.c (supply_fpregset): Likewise.
1906         (fill_fpregset): Likewise.
1907         * i387-tdep.c (i387_supply_fsave): Likewise.
1908         (i387_collect_fsave): Likewise.
1909         (i387_supply_fxsave): Likewise.
1910         (i387_collect_fxsave): Likewise.
1911         (i387_supply_xsave): Likewise.
1912         (i387_collect_xsave): Likewise.
1913         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1914         (ia64_linux_store_registers): Likewise.
1915         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1916         (ia64_extract_return_value): Likewise.
1917         (ia64_store_return_value): Likewise.
1918         (find_func_descr): Likewise.
1919         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1920         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1921         (inf_ptrace_store_registers): Likewise.
1922         * infrun.c (use_displaced_stepping): Likewise.
1923         (displaced_step_prepare_throw): Likewise.
1924         (resume): Likewise.
1925         (proceed): Likewise.
1926         (do_target_wait): Likewise.
1927         (adjust_pc_after_break): Likewise.
1928         (handle_inferior_event_1): Likewise.
1929         (handle_signal_stop): Likewise.
1930         (save_infcall_suspend_state): Likewise.
1931         (restore_infcall_suspend_state): Likewise.
1932         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1933         * jit.c (jit_frame_prev_register): Likewise.
1934         * linux-nat.c (save_stop_reason): Likewise.
1935         (linux_nat_wait_1): Likewise.
1936         (resume_stopped_resumed_lwps): Likewise.
1937         * linux-record.c (record_linux_sockaddr): Likewise.
1938         (record_linux_msghdr): Likewise.
1939         (record_linux_system_call): Likewise.
1940         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1941         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1942         (lm32_store_return_value): Likewise.
1943         * m32c-tdep.c (m32c_read_flg): Likewise.
1944         (m32c_pseudo_register_read): Likewise.
1945         (m32c_pseudo_register_write): Likewise.
1946         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1947         (m32r_linux_collect_gregset): Likewise.
1948         * m32r-tdep.c (m32r_store_return_value): Likewise.
1949         (m32r_extract_return_value): Likewise.
1950         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1951         (m68kbsd_collect_fpregset): Likewise.
1952         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1953         * m68k-linux-nat.c (fetch_register): Likewise.
1954         (old_fetch_inferior_registers): Likewise.
1955         (old_store_inferior_registers): Likewise.
1956         (store_regs): Likewise.
1957         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1958         (m68k_svr4_store_return_value): Likewise.
1959         * m88k-tdep.c (m88k_store_arguments): Likewise.
1960         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1961         (mi_cmd_data_write_register_values): Likewise.
1962         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1963         (mips_fbsd_store_inferior_registers): Likewise.
1964         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1965         (mips_fbsd_supply_gregs): Likewise.
1966         (mips_fbsd_collect_fpregs): Likewise.
1967         (mips_fbsd_collect_gregs): Likewise.
1968         (mips_fbsd_supply_fpregset): Likewise.
1969         (mips_fbsd_collect_fpregset): Likewise.
1970         (mips_fbsd_supply_gregset): Likewise.
1971         (mips_fbsd_collect_gregset): Likewise.
1972         * mips-linux-nat.c (supply_gregset): Likewise.
1973         (fill_gregset): Likewise.
1974         (supply_fpregset): Likewise.
1975         (fill_fpregset): Likewise.
1976         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1977         (mips_fill_gregset): Likewise.
1978         (mips_supply_fpregset): Likewise.
1979         (mips_fill_fpregset): Likewise.
1980         (mips64_supply_gregset): Likewise.
1981         (micromips_linux_sigframe_validate): Likewise.
1982         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1983         (mipsnbsd_fetch_inferior_registers): Likewise.
1984         (mipsnbsd_store_inferior_registers): Likewise.
1985         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1986         (mipsnbsd_supply_gregset): Likewise.
1987         (mipsnbsd_iterate_over_regset_sections): Likewise.
1988         (mipsnbsd_supply_reg): Likewise.
1989         (mipsnbsd_supply_fpreg): Likewise.
1990         * mips-tdep.c (mips_in_frame_stub): Likewise.
1991         (mips_dummy_id): Likewise.
1992         (is_octeon_bbit_op): Likewise.
1993         (micromips_bc1_pc): Likewise.
1994         (extended_mips16_next_pc): Likewise.
1995         (mips16_next_pc): Likewise.
1996         (deal_with_atomic_sequence): Likewise.
1997         * moxie-tdep.c (moxie_process_readu): Likewise.
1998         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1999         * nto-procfs.c (procfs_store_registers): Likewise.
2000         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2001         (ppcfbsd_store_inferior_registers): Likewise.
2002         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2003         (fetch_altivec_register): Likewise.
2004         (get_spe_registers): Likewise.
2005         (fetch_spe_register): Likewise.
2006         (fetch_altivec_registers): Likewise.
2007         (fetch_all_gp_regs): Likewise.
2008         (fetch_all_fp_regs): Likewise.
2009         (store_vsx_register): Likewise.
2010         (store_altivec_register): Likewise.
2011         (set_spe_registers): Likewise.
2012         (store_spe_register): Likewise.
2013         (store_altivec_registers): Likewise.
2014         (store_all_gp_regs): Likewise.
2015         (store_all_fp_regs): Likewise.
2016         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2017         (ppc_linux_collect_gregset): Likewise.
2018         (ppc_canonicalize_syscall): Likewise.
2019         (ppc_linux_record_signal): Likewise.
2020         (ppu2spu_prev_register): Likewise.
2021         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2022         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2023         (ppcobsd_store_registers): Likewise.
2024         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2025         Likewise.
2026         (ppc_ravenscar_generic_store_registers): Likewise.
2027         * procfs.c (procfs_fetch_registers): Likewise.
2028         (procfs_store_registers): Likewise.
2029         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2030         (ravenscar_store_registers): Likewise.
2031         (ravenscar_prepare_to_store): Likewise.
2032         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2033         * record-full.c (record_full_wait_1): Likewise.
2034         (record_full_registers_change): Likewise.
2035         (record_full_store_registers): Likewise.
2036         (record_full_core_fetch_registers): Likewise.
2037         (record_full_save): Likewise.
2038         (record_full_goto_insn): Likewise.
2039         * regcache.c (regcache_register_size): Likewise.
2040         (get_regcache_arch): Remove.
2041         (regcache_read_pc): Likewise.
2042         * regcache.h (get_regcache_arch): Remove.
2043         * remote-sim.c (gdbsim_fetch_register): Likewise.
2044         (gdbsim_store_register): Likewise.
2045         * remote.c (fetch_register_using_p): Likewise.
2046         (send_g_packet): Likewise.
2047         (remote_prepare_to_store): Likewise.
2048         (store_registers_using_G): Likewise.
2049         * reverse.c (save_bookmark_command): Likewise.
2050         (goto_bookmark_command): Likewise.
2051         * rs6000-aix-tdep.c (branch_dest): Likewise.
2052         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2053         (fetch_register): Likewise.
2054         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2055         (ppc_collect_reg): Likewise.
2056         (ppc_collect_gregset): Likewise.
2057         (ppc_collect_fpregset): Likewise.
2058         (ppc_collect_vsxregset): Likewise.
2059         (ppc_collect_vrregset): Likewise.
2060         (ppc_displaced_step_hw_singlestep): Likewise.
2061         (rs6000_pseudo_register_read): Likewise.
2062         (rs6000_pseudo_register_write): Likewise.
2063         * s390-linux-nat.c (supply_gregset): Likewise.
2064         (fill_gregset): Likewise.
2065         (s390_linux_fetch_inferior_registers): Likewise.
2066         * s390-linux-tdep.c (s390_write_pc): Likewise.
2067         (s390_software_single_step): Likewise.
2068         (s390_all_but_pc_registers_record): Likewise.
2069         (s390_linux_syscall_record): Likewise.
2070         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2071         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2072         (shnbsd_store_inferior_registers): Likewise.
2073         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2074         (sh_extract_return_value_fpu): Likewise.
2075         (sh_store_return_value_nofpu): Likewise.
2076         (sh_corefile_supply_regset): Likewise.
2077         (sh_corefile_collect_regset): Likewise.
2078         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2079         (sh64_store_return_value): Likewise.
2080         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2081         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2082         (sparc_store_inferior_registers): Likewise.
2083         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2084         (sparc_ravenscar_prepare_to_store): Likewise.
2085         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2086         (sparc_analyze_control_transfer): Likewise.
2087         (sparc_step_trap): Likewise.
2088         (sparc_software_single_step): Likewise.
2089         (sparc32_gdbarch_init): Likewise.
2090         (sparc_supply_rwindow): Likewise.
2091         (sparc_collect_rwindow): Likewise.
2092         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2093         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2094         (sparc64nbsd_collect_gregset): Likewise.
2095         (sparc64nbsd_supply_fpregset): Likewise.
2096         (sparc64nbsd_collect_fpregset): Likewise.
2097         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2098         (sparc64_supply_gregset): Likewise.
2099         (sparc64_collect_gregset): Likewise.
2100         (sparc64_supply_fpregset): Likewise.
2101         (sparc64_collect_fpregset): Likewise.
2102         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2103         * spu-tdep.c (spu_unwind_sp): Likewise.
2104         (spu2ppu_prev_register): Likewise.
2105         (spu_memory_remove_breakpoint): Likewise.
2106         * stack.c (return_command): Likewise.
2107         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2108         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2109         * tracefile.c (trace_save_ctf): Likewise.
2110         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2111         (do_windows_store_inferior_registers): Likewise.
2112         (windows_resume): Likewise.
2113         * xtensa-linux-nat.c (fill_gregset): Likewise.
2114         (supply_gregset_reg): Likewise.
2115         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2116         (xtensa_register_read_masked): Likewise.
2117         (xtensa_supply_gregset): Likewise.
2118         (xtensa_extract_return_value): Likewise.
2119         (xtensa_store_return_value): Likewise.
2120
2121 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2122
2123         * doublest.c (floatformat_from_string): New function.
2124         * doublest.h (floatformat_from_string): Add prototype.
2125
2126         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2127         (OP_FLOAT): ... this.
2128         * expression.h: Do not include "doublest.h".
2129         (union exp_element): Replace doubleconst and decfloatconst by
2130         new element floatconst.
2131         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2132         (ada_evaluate_subexp): Likewise.
2133         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2134         OP_DOUBLE and OP_DECFLOAT.
2135         * expprint.c (print_subexp_standard): Likewise.
2136         (dump_subexp_body_standard): Likewise.
2137         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2138
2139         * parse.c: Include "dfp.h".
2140         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2141         (write_exp_elt_floatcst): New function.
2142         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2143         and OP_DECFLOAT.
2144         (operator_check_standard): Likewise.
2145         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2146         Return target format buffer instead of host DOUBLEST.
2147         Use floatformat_from_string and decimal_from_string to parse
2148         either binary or decimal floating-point types.
2149         (parse_c_float): Remove.
2150         * parser-defs.h: Do not include "doublest.h".
2151         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2152         (write_exp_elt_floatcst): Add prototype.
2153         (parse_float): Update prototype.
2154         (parse_c_float): Remove.
2155
2156         * c-exp.y: Do not include "dfp.h".
2157         (typed_val_float): Use byte buffer instead of DOUBLEST.
2158         (typed_val_decfloat): Remove.
2159         (DECFLOAT): Remove.
2160         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2161         (parse_number): Update to new parse_float interface.
2162         Parse suffixes and determine type before calling parse_float.
2163         Handle decimal and binary FP types the same way.
2164
2165         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2166         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2167         (parse_number): Update to new parse_float interface.
2168         Parse suffixes and determine type before calling parse_float.
2169
2170         * f-exp.y: Replace dval by typed_val_float.
2171         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2172         (parse_number): Use parse_float instead of atof.
2173
2174         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2175         (parse_go_float): Remove.
2176         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2177         (parse_number): Call parse_float instead of parse_go_float.
2178         Parse suffixes and determine type before calling parse_float.
2179
2180         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2181         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2182         (parse_number): Update to new parse_float interface.
2183         Parse suffixes and determine type before calling parse_float.
2184
2185         * m2-exp.y: Replace dval by byte buffer val.
2186         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2187         (parse_number): Call parse_float instead of atof.
2188
2189         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2190         (lex_number): Call parse_float instead of strtod.
2191         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2192         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2193         Use write_exp_elt_floatcst.
2194         (unit_testing): Remove static variable.
2195         (rust_type): Do not check unit_testing.
2196         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2197
2198         * ada-exp.y (type_float, type_double): Remove.
2199         (typed_val_float): Use byte buffer instead of DOUBLEST.
2200         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2201         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2202
2203 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2204
2205         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2206         * arch/aarch64.h: New file.
2207
2208 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2209
2210         * dfp.h (decimal_from_string): Use const reference for argument.
2211         * dfp.c (decimal_from_string): Likewise.
2212
2213 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2214
2215         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2216         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2217         * mips-tdep.c (mips_print_fp_register): Likewise.
2218
2219 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2220
2221         * common/format.h (enum argclass): Replace decfloat_arg by
2222         dec32float_arg, dec64float_arg, and dec128float_arg.
2223         * common/format.c (parse_format_string): Update to return
2224         new decimal float argument classes.
2225
2226         * printcmd.c (printf_decfloat): Rename to ...
2227         (printf_floating): ... this.  Add argclass argument, and use it
2228         instead of parsing the format string again.  Add support for
2229         binary floating-point values, using floatformat_to_string.
2230         Convert value to the target format if it doesn't already match.
2231         (ui_printf): Call printf_floating instead of printf_decfloat,
2232         also for double_arg / long_double_arg.  Pass argclass.
2233
2234         * dfp.c (decimal_to_string): Add format string argument.
2235         * dfp.h (decimal_to_string): Likewise.
2236
2237         * doublest.c (floatformat_to_string): Add format string argument.
2238         * doublest.h (floatformat_to_string): Likewise.
2239
2240 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2241
2242         * doublest.c (floatformat_precision): New routine.
2243         (floatformat_to_string): Likewise.
2244         * doublest.c (floatformat_to_string): Add prototype.
2245
2246         * printcmd.c (print_scalar_formatted): Only call print_floating
2247         on floating-point types.
2248         * valprint.c: Do not include "floatformat.h".
2249         (generic_val_print_decfloat): Remove.
2250         (generic_val_print): Call generic_val_print_float for both
2251         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2252         (print_floating): Use floatformat_to_string.  Handle decimal float.
2253         (print_decimal_floating): Remove, merge into floatformat_to_string.
2254         * value.h (print_decimal_floating): Remove.
2255
2256         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2257
2258 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2259
2260         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2261
2262 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2263
2264         * memattr.h: Don't include vec.h.
2265         (struct mem_attrib): Initialize fields.
2266         <unknown>: New static method.
2267         (struct mem_region): Add constructors, operator<, initialize
2268         fields.
2269         * memattr.c: Include algorithm.
2270         (default_mem_attrib, unknown_mem_attrib): Remove.
2271         (user_mem_region_list): New global.
2272         (target_mem_region_list, mem_region_list): Change type to
2273         std::vector<mem_region>.
2274         (mem_use_target): Now a function.
2275         (target_mem_regions_valid): Change type to bool.
2276         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2277         (require_user_regions): Adjust.
2278         (require_target_regions): Adjust.
2279         (create_mem_region): Adjust.
2280         (lookup_mem_region): Adjust.
2281         (invalidate_target_mem_regions): Adjust.
2282         (mem_clear): Rename to...
2283         (user_mem_clear): ... this, and adjust.
2284         (mem_command): Adjust.
2285         (info_mem_command): Adjust.
2286         (mem_enable, enable_mem_command, mem_disable,
2287         disable_mem_command): Adjust.
2288         (mem_delete): Adjust.
2289         (delete_mem_command): Adjust.
2290         * memory-map.h (parse_memory_map): Return an std::vector.
2291         * memory-map.c (parse_memory_map): Likewise.
2292         (struct memory_map_parsing_data): Add constructor.
2293         <memory_map>: Point to std::vector.
2294         (memory_map_start_memory): Adjust.
2295         (memory_map_end_memory): Adjust.
2296         (memory_map_end_property): Adjust.
2297         (clear_result): Remove.
2298         * remote.c (remote_memory_map): Return an std::vector.
2299         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2300         Remove.
2301         (target_debug_print_mem_region_vector): New.
2302         * target-delegates.c: Regenerate.
2303         * target.h (mem_region_vector): New typedef.
2304         (to_memory_map): Return mem_region_vector.
2305         (target_memory_map): Return an std::vector.
2306         * target.c (target_memory_map): Return an std::vector.
2307         (flash_erase_command): Adjust.
2308
2309 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2310
2311         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2312         Change type to std::string.
2313         (memory_map_start_property): Adjust.
2314         (memory_map_end_property): Adjust.
2315
2316 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2317
2318         * infrun.h: Include common/byte-vector.h.
2319         (struct displaced_step_closure): New struct.
2320         (struct buf_displaced_step_closure): New struct.
2321         * infrun.c (displaced_step_closure::~displaced_step_closure):
2322         Provide default implementation.
2323         (displaced_step_clear): Deallocate step closure with delete.
2324         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2325         (aarch64_displaced_step_closure): ... this, extend
2326         displaced_step_closure.
2327         (aarch64_displaced_step_data) <dsc>: Change type to
2328         aarch64_displaced_step_closure.
2329         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2330         unique_ptr.
2331         (aarch64_displaced_step_fixup): Add cast for displaced step
2332         closure.
2333         * amd64-tdep.c (displaced_step_closure): Rename to ...
2334         (amd64_displaced_step_closure): ... this, extend
2335         displaced_step_closure.
2336         <insn_buf>: Change type to std::vector<gdb_byte>.
2337         <max_len>: Remove.
2338         (fixup_riprel): Change type of DSC parameter, adjust to type
2339         change of insn_buf.
2340         (fixup_displaced_copy): Change type of DSC parameter.
2341         (amd64_displaced_step_copy_insn): Instantiate
2342         amd64_displaced_step_closure.
2343         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2344         to type change of insn_buf.
2345         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2346         parameter DSC.
2347         (arm_linux_copy_svc): Likewise.
2348         (cleanup_kernel_helper_return): Likewise.
2349         (arm_catch_kernel_helper_return): Likewise.
2350         (arm_linux_displaced_step_copy_insn): Instantiate
2351         arm_displaced_step_closure.
2352         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2353         (displaced_read_reg): Change type of parameter DSC.
2354         (branch_write_pc): Likewise.
2355         (load_write_pc): Likewise.
2356         (alu_write_pc): Likewise.
2357         (displaced_write_reg): Likewise.
2358         (arm_copy_unmodified): Likewise.
2359         (thumb_copy_unmodified_32bit): Likewise.
2360         (thumb_copy_unmodified_16bit): Likewise.
2361         (cleanup_preload): Likewise.
2362         (install_preload): Likewise.
2363         (arm_copy_preload): Likewise.
2364         (thumb2_copy_preload): Likewise.
2365         (install_preload_reg): Likewise.
2366         (arm_copy_preload_reg): Likewise.
2367         (cleanup_copro_load_store): Likewise.
2368         (install_copro_load_store): Likewise.
2369         (arm_copy_copro_load_store) Likewise.
2370         (thumb2_copy_copro_load_store): Likewise.
2371         (cleanup_branch): Likewise.
2372         (install_b_bl_blx): Likewise.
2373         (arm_copy_b_bl_blx): Likewise.
2374         (thumb2_copy_b_bl_blx): Likewise.
2375         (thumb_copy_b): Likewise.
2376         (install_bx_blx_reg): Likewise.
2377         (arm_copy_bx_blx_reg): Likewise.
2378         (thumb_copy_bx_blx_reg): Likewise.
2379         (cleanup_alu_imm): Likewise.
2380         (arm_copy_alu_imm): Likewise.
2381         (thumb2_copy_alu_imm): Likewise.
2382         (cleanup_alu_reg): Likewise.
2383         (install_alu_reg): Likewise.
2384         (arm_copy_alu_reg): Likewise.
2385         (thumb_copy_alu_reg): Likewise.
2386         (cleanup_alu_shifted_reg): Likewise.
2387         (install_alu_shifted_reg): Likewise.
2388         (arm_copy_alu_shifted_reg): Likewise.
2389         (cleanup_load): Likewise.
2390         (cleanup_store): Likewise.
2391         (arm_copy_extra_ld_st): Likewise.
2392         (install_load_store): Likewise.
2393         (thumb2_copy_load_literal): Likewise.
2394         (thumb2_copy_load_reg_imm): Likewise.
2395         (arm_copy_ldr_str_ldrb_strb): Likewise.
2396         (cleanup_block_load_all): Likewise.
2397         (cleanup_block_store_pc): Likewise.
2398         (cleanup_block_load_pc): Likewise.
2399         (arm_copy_block_xfer): Likewise.
2400         (thumb2_copy_block_xfer): Likewise.
2401         (cleanup_svc): Likewise.
2402         (install_svc): Likewise.
2403         (arm_copy_svc): Likewise.
2404         (thumb_copy_svc): Likewise.
2405         (arm_copy_undef): Likewise.
2406         (thumb_32bit_copy_undef): Likewise.
2407         (arm_copy_unpred): Likewise.
2408         (arm_decode_misc_memhint_neon): Likewise.
2409         (arm_decode_unconditional): Likewise.
2410         (arm_decode_miscellaneous): Likewise.
2411         (arm_decode_dp_misc): Likewise.
2412         (arm_decode_ld_st_word_ubyte): Likewise.
2413         (arm_decode_media): Likewise.
2414         (arm_decode_b_bl_ldmstm): Likewise.
2415         (arm_decode_ext_reg_ld_st): Likewise.
2416         (thumb2_decode_dp_shift_reg): Likewise.
2417         (thumb2_decode_ext_reg_ld_st): Likewise.
2418         (arm_decode_svc_copro): Likewise.
2419         (thumb2_decode_svc_copro): Likewise.
2420         (install_pc_relative): Likewise.
2421         (thumb_copy_pc_relative_16bit): Likewise.
2422         (thumb_decode_pc_relative_16bit): Likewise.
2423         (thumb_copy_pc_relative_32bit): Likewise.
2424         (thumb_copy_16bit_ldr_literal): Likewise.
2425         (thumb_copy_cbnz_cbz): Likewise.
2426         (thumb2_copy_table_branch): Likewise.
2427         (cleanup_pop_pc_16bit_all): Likewise.
2428         (thumb_copy_pop_pc_16bit): Likewise.
2429         (thumb_process_displaced_16bit_insn): Likewise.
2430         (decode_thumb_32bit_ld_mem_hints): Likewise.
2431         (thumb_process_displaced_32bit_insn): Likewise.
2432         (thumb_process_displaced_insn): Likewise.
2433         (arm_process_displaced_insn): Likewise.
2434         (arm_displaced_init_closure): Likewise.
2435         (arm_displaced_step_fixup): Add cast for closure.
2436         * arm-tdep.h: Include infrun.h.
2437         (displaced_step_closure): Rename to ...
2438         (arm_displaced_step_closure): ... this, extend
2439         displaced_step_closure.
2440         <u::svc::copy_svc_os>: Change type of parameter DSC.
2441         <cleanup>: Likewise.
2442         (arm_process_displaced_insn): Likewise.
2443         (arm_displaced_init_closure): Likewise.
2444         (displaced_read_reg): Likewise.
2445         (displaced_write_reg): Likewise.
2446         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2447         Adjust.
2448         * i386-tdep.h: Include infrun.h.
2449         (i386_displaced_step_closure): New typedef.
2450         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2451         i386_displaced_step_closure.
2452         (i386_displaced_step_fixup): Adjust.
2453         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2454         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2455         and unique_ptr.
2456         (ppc_displaced_step_fixup): Adjust.
2457         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2458         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2459         and unique_ptr.
2460         (s390_displaced_step_fixup): Adjust.
2461
2462 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2463
2464         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2465         Remove declarations.
2466
2467 2017-10-20  Tom Tromey  <tom@tromey.com>
2468
2469         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2470         std::vector.
2471         (gdb_bfd_record_inclusion): Update.
2472         (bfdp): Remove typedef.
2473
2474 2017-10-20  Tom Tromey  <tom@tromey.com>
2475
2476         * gdb_bfd.c (gdb_bfd_ref): Use new.
2477         (struct gdb_bfd_data): Add constructor, destructor, and member
2478         initializers.
2479         (gdb_bfd_unref): Use delete.
2480
2481 2017-10-20  Tom Tromey  <tom@tromey.com>
2482
2483         * exec.c (exec_file_attach): Use new_bfd_ref.
2484         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2485         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2486         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2487         new_bfd_ref.
2488         * gdb_bfd.h (new_bfd_ref): New function.
2489
2490 2017-10-20  Pedro Alves  <palves@redhat.com>
2491
2492         * main.c (captured_command_loop): Add attribute noinline.
2493
2494 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2495
2496         * interps.c (struct interp_factory): Add constructor.
2497         (interp_factory_p): Remove typedef.
2498         (DEF_VEC_P(interp_factory_p)): Remove.
2499         (interpreter_factories): Change type to std::vector.
2500         (interp_factory_register): Adjust.
2501         (interp_lookup): Adjust.
2502         (interpreter_completer): Adjust.
2503
2504 2017-10-19  Tom Tromey  <tom@tromey.com>
2505
2506         * break-catch-syscall.c (catch_syscall_completer): Use
2507         std::string, gdb::unique_xmalloc_ptr.
2508
2509 2017-10-19  Tom Tromey  <tom@tromey.com>
2510
2511         * infcall.c (call_function_by_hand_dummy): Use std::string.
2512
2513 2017-10-19  Tom Tromey  <tom@tromey.com>
2514
2515         * mi/mi-main.c (mi_cmd_execute): Update.
2516         * top.h (prepare_execute_command): Return scoped_value_mark.
2517         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2518         Add move constructor.
2519         * top.c (prepare_execute_command): Return scoped_value_mark.
2520         (execute_command): Update.
2521
2522 2017-10-19  Pedro Alves  <palves@redhat.com>
2523
2524         * xml-support.c (xml_fetch_content_from_file): Check fread's
2525         return.
2526
2527 2017-10-19  Pedro Alves  <palves@redhat.com>
2528
2529         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2530         async.
2531         (handle_error_fd): New function.
2532         (ser_base_async): Add/delete an event loop file handler for
2533         error_fd.
2534
2535 2017-10-19  Pedro Alves  <palves@redhat.com>
2536
2537         * xml-support.c (xml_fetch_content_from_file): Don't read in
2538         chunks.  Instead use fseek to determine the file's size, and read
2539         it in one go.
2540
2541 2017-11-18  Keith Seitz  <keiths@redhat.com>
2542
2543         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2544         types.
2545         Add whitespace to front of type name.
2546
2547 2017-10-18  Keith Seitz  <keiths@redhat.com>
2548
2549         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2550         DW_AT_accessibility.
2551
2552 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2553
2554         * features/tic6x-c62x-linux.c: Remove.
2555
2556 2017-10-17  Tom Tromey  <tom@tromey.com>
2557
2558         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2559         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2560         (do_mixed_source_and_assembly): Likewise.
2561
2562 2017-10-17  Tom Tromey  <tom@tromey.com>
2563
2564         * regcache.c (regcache::xfer_part): Remove assertion.
2565
2566 2017-10-17  Pedro Alves  <palves@redhat.com>
2567
2568         * xml-support.c (xml_fetch_content_from_file): Call
2569         unique_ptr::release() instead unique_ptr::get() when passing
2570         through xrealloc.
2571
2572 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2573
2574         * regcache.c (regcache::xfer_part): Remove parameters read and
2575         write, add parameter is_raw.  All callers are updated.
2576
2577 2017-10-16  Keith Seitz  <keiths@redhat.com>
2578
2579         * c-typeprint.c (enum access_specifier): Moved here from
2580         c_type_print_base.
2581         (output_access_specifier): New function.
2582         (c_type_print_base): Consider typedefs when assessing
2583         whether access labels are needed.
2584         Use output_access_specifier as needed.
2585         Output access specifier for typedefs, if needed.
2586         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2587         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2588         fields.
2589         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2590         accessor macros.
2591
2592 2017-10-16  Tom Tromey  <tom@tromey.com>
2593
2594         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2595         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2596         * target.c (target_fileio_read_stralloc): Update.
2597         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2598         * target.h (target_fileio_read_stralloc): Return
2599         unique_xmalloc_ptr.
2600
2601 2017-10-16  Tom Tromey  <tom@tromey.com>
2602
2603         * xml-syscall.c (xml_init_syscalls_info): Update.
2604         * xml-support.c (xinclude_start_include): Update.
2605         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2606         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2607         (xml_fetch_content_from_file): Likewise.
2608         * osdata.c (get_osdata): Update.
2609         * target.h (target_read_stralloc, target_get_osdata): Return
2610         unique_xmalloc_ptr.
2611         * solib-aix.c (solib_aix_get_library_list): Update.
2612         * solib-target.c (solib_target_current_sos): Update.
2613         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2614         * xml-tdesc.c (fetch_available_features_from_target): Update.
2615         (target_fetch_description_xml): Update.
2616         (file_read_description_xml): Update.
2617         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2618         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2619         (remote_pid_to_exec_file): Update.
2620         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2621         (target_get_osdata): Likewise.
2622
2623 2017-10-16  Tom Tromey  <tom@tromey.com>
2624
2625         * remote.c (remote_register_number_and_offset): Use std::vector.
2626         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2627         (putpkt_binary): Use gdb::def_vector.
2628         (compare_sections_command): Use gdb::byte_vector.
2629
2630 2017-10-16  Tom Tromey  <tom@tromey.com>
2631
2632         * ppc-linux-nat.c (hwdebug_insert_point): Use
2633         gdb::unique_xmalloc_ptr, XDUP.
2634
2635 2017-10-16  Tom Tromey  <tom@tromey.com>
2636
2637         * probe.c (parse_probes): Use std::string.
2638         (info_probes_for_ops, enable_probes_command)
2639         (disable_probes_command): Remove cleanups.
2640
2641 2017-10-16  Tom Tromey  <tom@tromey.com>
2642
2643         * buildsym.c (block_compar): Remove.
2644         (end_symtab_get_static_block): Use std::vector.
2645
2646 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2647
2648         * memrange.h (struct mem_range): Define operator< and operator==.
2649         (mem_range_s): Remove.
2650         (DEF_VEC_O (mem_range_s)): Remove.
2651         (normalize_mem_ranges): Change parameter type to std::vector.
2652         * memrange.c (compare_mem_ranges): Remove.
2653         (normalize_mem_ranges): Change parameter type to std::vector,
2654         adjust to vector change.
2655         * exec.c (section_table_available_memory): Return vector, remove
2656         parameter.
2657         (section_table_read_available_memory): Adjust to std::vector
2658         change.
2659         * remote.c (remote_read_bytes): Adjust to std::vector
2660         change.
2661         * tracepoint.h (traceframe_available_memory): Change parameter
2662         type to std::vector.
2663         * tracepoint.c (traceframe_available_memory): Change parameter
2664         type to std::vector, adjust.
2665         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2666         std::vector change.
2667         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2668         unittests/memrange-selftests.c.
2669         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2670         * gdb/unittests/memrange-selftests.c: New file.
2671
2672 2017-10-16  Pedro Alves  <palves@redhat.com>
2673
2674         * elfread.c (probe_key_free): Rename range-for variable.
2675         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2676         (find_probe_by_pc, collect_probes): Rename range-for variable.
2677
2678 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2679
2680         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2681         * features/tic6x-c62x.c: Remove.
2682         * features/tic6x-c64x-linux.c: Remove.
2683         * features/tic6x-c64x.c: Remove.
2684         * features/tic6x-c64xp-linux.c: Remove.
2685         * features/tic6x-c64xp.c: Remove.
2686         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2687         initialize_tdesc_tic6x_*_linux functions.
2688         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2689         initialize_tdesc_tic6x_* functions.
2690
2691 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2692
2693         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2694         tic6x-c62x.
2695         * regformats/tic6x-c62x.dat: Remove.
2696         * regformats/tic6x-c64x.dat: Remove.
2697         * regformats/tic6x-c64xp.dat: Remove.
2698
2699 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2700
2701         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2702         (the !HAVE_LIBEXPAT version).
2703
2704 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2705
2706         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2707         const.
2708
2709 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2710
2711         * target.h: Include tracepoint.h.
2712         (enum trace_find_type): Move to tracepoint.h.
2713         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2714         * tracepoint.h: Don't include target.h
2715         (enum trace_find_type): Move from target.h.
2716         (parse_traceframe_info): Return a unique ptr.
2717         * tracepoint.c (current_traceframe_info): Change type to unique
2718         ptr.
2719         (free_traceframe_info): Remove.
2720         (clear_traceframe_info): Don't manually free
2721         current_traceframe_info.
2722         (free_result): Remove.
2723         (parse_traceframe_info): Return a unique ptr.
2724         (get_traceframe_info): Adjust to unique ptr.
2725         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2726         * remote.c (remote_traceframe_info): Return a unique ptr.
2727         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2728         ptr.
2729         * target-debug.h (target_debug_print_traceframe_info_up): New
2730         macro.
2731         * target-delegates.c: Regenerate.
2732
2733 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2734
2735         * memrange.h (struct mem_range): Add constructors.
2736         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2737         std::vector<mem_range>.
2738         * tracepoint.c (free_traceframe_info): Don't manually free
2739         vector.
2740         (traceframe_info_start_memory): Adjust to vector change.
2741         (traceframe_available_memory): Likewise.
2742         * tracefile-tfile.c (build_traceframe_info): Likewise.
2743         * ctf.c (ctf_traceframe_info): Likewise.
2744
2745 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2746
2747         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2748         std::vector<int>.
2749         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2750         (traceframe_info_start_tvar): Adjust to vector change.
2751         (parse_traceframe_info): Allocate with new.
2752         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2753         vector change.
2754         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2755         change.
2756         tfile_traceframe_info): Allocate with new.
2757         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2758         change.
2759
2760 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2761
2762         * tracepoint.c (traceframe_info): Rename to...
2763         (current_traceframe_info): ...this.
2764         (clear_traceframe_info): Adjust.
2765         (get_traceframe_info): Adjust.
2766
2767 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2768
2769         * nat/linux-osdata.c: Include algorithm.
2770         (compare_processes): Remove.
2771         (struct pid_pgid_entry): New struct.
2772         (linux_xfer_osdata_processgroups): Use std::vector instead of
2773         XNEWVEC.
2774
2775 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2776
2777         * objfiles.h: Don't include symfile.h.
2778         (struct partial_symbol): Remove forward-declaration.
2779         (struct objfile) <global_psymbols, static_psymbols>: Change type
2780         to std::vector<partial_symbol *>.
2781         * objfiles.c (objfile::objfile): Don't memset those fields.
2782         (objfile::~objfile): Don't free those fields.
2783         * psympriv.h (struct psymbol_allocation_list): Remove
2784         forward-declaration.
2785         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2786         to std::vector.
2787         (start_psymtab_common): Change parameters to std::vector.
2788         * psymtab.c: Include algorithm.
2789         (require_partial_symbols): Call shrink_to_fit.
2790         (find_pc_sect_psymbol): Adjust to vector change.
2791         (match_partial_symbol): Likewise.
2792         (lookup_partial_symbol): Likewise.
2793         (psym_relocate): Likewise.
2794         (dump_psymtab): Likewise.
2795         (recursively_search_psymtabs): Likewise.
2796         (compare_psymbols): Remove.
2797         (sort_pst_symbols): Adjust to vector change.
2798         (start_psymtab_common): Likewise.
2799         (end_psymtab_common): Likewise.
2800         (psymbol_bcache_full): De-constify return value.
2801         (add_psymbol_to_bcache): Likewise.
2802         (extend_psymbol_list): Remove.
2803         (append_psymbol_to_list): Adjust to vector change.
2804         (add_psymbol_to_list): Likewise.
2805         (init_psymbol_list): Likewise.
2806         (maintenance_info_psymtabs): Likewise.
2807         (maintenance_check_psymtabs): Likewise.
2808         * symfile.h (struct psymbol_allocation_list): Remove.
2809         * symfile.c (reread_symbols): Adjust to vector change.
2810         * dbxread.c (start_psymtab): Change type of parameters.
2811         (dbx_symfile_read): Adjust to vector change.
2812         (read_dbx_symtab): Likewise.
2813         (start_psymtab): Change type of parameters.
2814         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2815         (create_partial_symtab): Likewise.
2816         (add_partial_symbol): Likewise.
2817         (write_one_signatured_type): Likewise.
2818         (recursively_write_psymbols): Likewise.
2819         * mdebugread.c (parse_partial_symbols): Likewise.
2820         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2821         (scan_xcoff_symtab): Adjust to vector change.
2822         (xcoff_initial_scan): Likewise.
2823
2824 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2825
2826         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2827
2828 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2829
2830         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2831         Remove s390x-*-expedite, add s390x-expedite.
2832
2833 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2834
2835         * features/s390-gs-linux64.c: Regenerated.
2836         * features/s390x-gs-linux64.c: Regenerated.
2837
2838 2017-10-13  Tom Tromey  <tom@tromey.com>
2839
2840         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2841         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2842         delete.
2843         * symfile.c (symbol_file_add_with_addrs): Use new.
2844         (symbol_file_add_separate): Update comment.
2845         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2846         * jit.c (jit_object_close_impl): Use new.
2847         (jit_unregister_code): Use delete.
2848         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2849         (~objfile): Rename from free_objfile.
2850         (free_objfile_separate_debug, do_free_objfile_cleanup)
2851         (free_all_objfiles, objfile_purge_solibs): Use delete.
2852         * objfiles.h (struct objfile): Add constructor and destructor.
2853         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2854         (allocate_objfile, free_objfile): Don't declare.
2855         (struct objstats): Add initializers.
2856
2857 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2858
2859         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2860         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2861         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2862         * gdbarch.h: Regenerate.
2863         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2864         Adjust comment.
2865         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2866         (i386_displaced_step_fixup): Adjust comment.
2867         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2868
2869 2017-10-12  Tom Tromey  <tom@tromey.com>
2870
2871         * prologue-value.h (pv_area::store_would_trash): Return bool.
2872         (pv_area::find_reg): Likewise.
2873         * prologue-value.c (pv_area::store_would_trash): Return bool.
2874         (pv_area::find_reg): Likewise.
2875
2876 2017-10-12  Tom Tromey  <tom@tromey.com>
2877
2878         * s390-linux-tdep.c (s390_store, s390_load)
2879         (s390_check_for_saved, s390_analyze_prologue): Update.
2880         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2881         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2882         * prologue-value.h (class pv_area): Move from prologue-value.c.
2883         Change names of members.  Add constructor, destructor, member
2884         functions.
2885         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2886         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2887         (pv_area_fetch, pv_area_scan): Don't declare.
2888         * prologue-value.c (struct pv_area::area_entry): Now member of
2889         pv_area.
2890         (struct pv_area): Move to prologue-value.h.
2891         (pv_area::pv_area): Rename from make_pv_area.
2892         (pv_area::~pv_area): Rename from free_pv_area.
2893         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2894         (clear_entries, find_entry, overlaps, store_would_trash, store)
2895         (fetch, find_reg, scan): Now member of pv_area.
2896         Remove "area" argument.  Update.
2897         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2898         Update.
2899         * mn10300-tdep.c (push_reg, check_for_saved)
2900         (mn10300_analyze_prologue): Update.
2901         * mep-tdep.c (is_arg_spill, check_for_saved)
2902         (mep_analyze_prologue): Update.
2903         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2904         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2905         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2906         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2907         Update.
2908         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2909         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2910
2911 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2912
2913         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2914         * linux-nat.c (linux_nat_delete_thread): New variable.
2915         (lwp_free): Invoke linux_nat_delete_thread if set.
2916         (linux_nat_set_delete_thread): New function.
2917         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2918         thread delete callback.
2919         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2920         (_initialize_arm_linux_nat): Assign thread delete callback.
2921         * s390-linux-nat.c (s390_delete_thread): New function.
2922         (_initialize_s390_nat): Assign thread delete callback.
2923         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2924         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2925         function.
2926         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2927         declaration.
2928         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2929         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2930
2931 2017-10-09  Tom Tromey  <tom@tromey.com>
2932
2933         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2934         std::string.
2935         * tui/tui-layout.c (enum tui_status): Use std::string.
2936
2937 2017-10-11  Tom Tromey  <tom@tromey.com>
2938
2939         * gdbthread.h (thread_command): Constify.
2940         * inferior.h (detach_command): Constify.
2941         * top.h (set_history, show_history): Constify.
2942         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2943         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2944         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2945         * printcmd.c (set_command): Constify.
2946         (non_const_set_command): New function.
2947         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2948         * breakpoint.c (enable_command, disable_command, delete_command)
2949         (catch_command, tcatch_command, set_breakpoint_cmd)
2950         (show_breakpoint_cmd): Constify.
2951         * macrocmd.c (macro_command): Constify.
2952         * infcmd.c (unset_command, kill_command, detach_command)
2953         (info_proc_cmd): Constify.
2954         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2955         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2956         (info_auto_load_cmd): Constify.
2957         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2958         (unset_tdesc_cmd): Constify.
2959         * ada-lang.c (set_ada_command, show_ada_command)
2960         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2961         * guile/guile.c (set_guile_command, show_guile_command)
2962         (info_guile_command): Constify.
2963         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2964         Constify.
2965         * skip.c (skip_command): Constify.
2966         * compile/compile.c (_initialize_compile): Constify.
2967         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2968         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2969         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2970         (maint_btrace_pt_show_cmd): Constify.
2971         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2972         Constify.
2973         * python/python.c (user_show_python, user_set_python): Constify.
2974         * mips-tdep.c (set_mips_command, show_mips_command)
2975         (set_mipsfpu_command): Constify.
2976         * record-btrace.c (cmd_record_btrace_start)
2977         (cmd_set_record_btrace, cmd_show_record_btrace)
2978         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2979         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2980         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2981         Constify.
2982         * symfile.c (overlay_command): Constify.
2983         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2984         * cli/cli-logging.c (set_logging_command, show_logging_command):
2985         Constify.
2986         * cli/cli-dump.c (dump_command, append_command)
2987         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2988         (tekhex_dump_command, binary_dump_command)
2989         (binary_append_command): Constify.
2990         * cli/cli-decode.c (struct cmd_list_element): Change type of
2991         "fun".
2992         * cli/cli-cmds.c (info_command, show_command, set_debug)
2993         (show_debug): Constify.
2994         (show_command): Add non-const overload.
2995         * top.c (set_history, show_history): Constify.
2996         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2997         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2998         * target.c (target_command): Constify.
2999         * sparc64-tdep.c (info_adi_command): Constify.
3000         * record-full.c (cmd_record_full_start): Constify.
3001         (set_record_full_command): Constify.  Fix typo.
3002         (show_record_full_command): Constify.
3003         * thread.c (thread_command, thread_apply_command): Constify.
3004         * memattr.c (dummy_cmd): Constify.
3005         * value.c (function_command): Constify.
3006         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3007         * probe.c (info_probes_command): Constify.
3008         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3009         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3010         (show_thread_cmd, set_thread_default_cmd)
3011         (show_thread_default_cmd): Constify.
3012         (check_empty): Constify.
3013         * tracepoint.c (tfind_command): Constify.
3014         * cp-support.c (maint_cplus_command): Constify.
3015         * windows-tdep.c (info_w32_command): Constify.
3016         * record.c (cmd_record_start, set_record_command)
3017         (show_record_command, info_record_command, cmd_record_goto):
3018         Constify.
3019         * ravenscar-thread.c (set_ravenscar_command)
3020         (show_ravenscar_command): Constify.
3021         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3022         Constify.
3023         (add_internal_problem_command): Remove casts.
3024         * arc-tdep.c (maintenance_print_arc_command): Constify.
3025         * valprint.c (set_print, show_print, set_print_raw)
3026         (show_print_raw): Constify.
3027         * maint.c (maintenance_command, maintenance_info_command)
3028         (maintenance_print_command, maintenance_set_cmd)
3029         (maintenance_show_cmd, set_per_command_cmd)
3030         (show_per_command_cmd, maintenance_check_command): Constify.
3031         * language.c (set_check, show_check): Constify.
3032         * typeprint.c (show_print_type, set_print_type): Constify.
3033         * go32-nat.c (go32_info_dos_command): Constify.
3034
3035 2017-10-11  Tom Tromey  <tom@tromey.com>
3036
3037         * breakpoint.c (prepare_re_set_context): Remove.
3038         (breakpoint_re_set_one): Update.  Don't use cleanups.
3039         (breakpoint_re_set): Use scoped_restore, std::string, and
3040         scoped_restore_current_language.
3041
3042 2017-10-11  Tom Tromey  <tom@tromey.com>
3043
3044         * breakpoint.c (commands_command_1): Use std::string.
3045         (cleanup_executing_breakpoints): Remove.
3046         (bpstat_do_actions_1): Use scoped_restore.
3047         (bpstat_check_watchpoint): Use std::string.
3048         (decode_static_tracepoint_spec): Likewise.
3049         (break_range_command): Likewise.
3050         (watch_command_1): Likewise.
3051         (compare_breakpoints): Change argument types.
3052         (clear_command): Use std::vector.
3053         (cleanup_executing_breakpoints): Remove.
3054         (update_global_location_list): Use unique_xmalloc_ptr.
3055         (strace_command): Remove unused declaration.
3056
3057 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3058
3059         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3060         * NEWS: Mention new FreeBSD/arm native configuration.
3061         * configure.host: Add arm*-*-freebsd*.
3062         * configure.nat: Likewise.
3063         * arm-fbsd-nat.c: New file.
3064
3065 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3066
3067         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3068         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3069         * NEWS: Mention new FreeBSD/arm target.
3070         * configure.tgt: Add arm*-*-freebsd*.
3071         * arm-fbsd-tdep.c: New file.
3072         * arm-fbsd-tdep.h: New file.
3073
3074 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3075
3076         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3077         `gdbarch_elfcore_write_linux_prpsinfo'.
3078         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3079         method.
3080         (elf_internal_linux_prpsinfo): Remove declaration.
3081         * gdbarch.h: Regenerate.
3082         * gdbarch.c: Regenerate.
3083
3084 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3085
3086         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3087         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3088
3089 2017-10-11  Pedro Alves  <palves@redhat.com>
3090
3091         * breakpoint.c (reattach_breakpoints): Delete.
3092         * breakpoint.h (reattach_breakpoints): Delete.
3093
3094 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3095
3096         * symfile.c (registered_sym_fns): Make struct, not typedef.
3097         (DEF_VEC_O (registered_sym_fns)): Remove.
3098         (symtab_fns): Change type to std::vector.
3099         (add_symtab_fns): Adjust.
3100         (find_sym_fns): Adjust.
3101
3102 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3103
3104         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3105         * arc-tdep.h (arc_arch_is_em): New function.
3106         (arc_arch_is_hs): Likewise.
3107
3108 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3109
3110         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3111         parentheses in the declaration.
3112         (macro_lookup_inclusion): Likewise.
3113         (macro_lookup_definition): Likewise.
3114         * p-lang.h (pascal_builtin_types): Likewise.
3115         * tui/tui-data.c (tui_win_list): Likewise.
3116         * tui/tui-data.h (tui_win_list): Likewise.
3117         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3118
3119 2017-10-11  Mark Rages  <markrages@gmail.com>
3120
3121         * target-memory.c (block_boundaries): Fix for block address not
3122         aligned on block size.
3123
3124 2017-10-10  Pedro Alves <palves@redhat.com>
3125             Tom Tromey  <tom@tromey.com>
3126
3127         * breakpoint.c (struct captured_breakpoint_query_args)
3128         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3129         (print_breakpoint): New.
3130         * breakpoint.h (print_breakpoint): Declare.
3131         * common/common-exceptions.h (enum return_reason): Remove
3132         references to catch_exceptions.
3133         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3134         Delete.
3135         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3136         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3137         * gdb.h: Delete.
3138         * gdbthread.h (thread_select): Declare.
3139         * mi/mi-cmd-break.c: Don't include gdb.h.
3140         (breakpoint_notify): Use print_breakpoint.
3141         * mi/mi-cmd-catch.c: Don't include gdb.h.
3142         * mi/mi-interp.c: Don't include gdb.h.
3143         (mi_print_breakpoint_for_event): New.
3144         (mi_breakpoint_created, mi_breakpoint_modified): Use
3145         mi_print_breakpoint_for_event.
3146         * mi/mi-main.c: Don't include gdb.h.
3147         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3148         thread_select instead of gdb_thread_select.
3149         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3150         of using gdb_list_thread_ids.
3151         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3152         FILEIO_ENOSYS here.
3153         (remote_fileio_request): Use TRY/CATCH instead of
3154         catch_exceptions.
3155         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3156         (symbol_file_add_from_memory_wrapper): Delete.
3157         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3158         * thread.c: Don't include gdb.h.
3159         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3160         (thread_alive): Use thread_select.
3161         (do_captured_thread_select): Delete, parts salvaged as ...
3162         (thread_select): ... this new function.
3163         (gdb_thread_select): Delete.
3164
3165 2017-10-10  Pedro Alves  <palves@redhat.com>
3166             Tom Tromey  <tom@tromey.com>
3167
3168         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3169         and reverse logic.
3170         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3171         No longer macros.  Instead ...
3172         (enum wp_check_result): They're now values of this new
3173         enumeration.
3174         (watchpoint_check): Change return type to wp_check_result and
3175         parameter type to bpstat.
3176         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3177         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3178         catch_errors.  Reverse logic of watchpoint_check call.
3179         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3180         pointer as parameter.
3181         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3182         * common/common-exceptions.c (throw_exception_sjlj): Update
3183         comments to avoid mentioning catch_errors.
3184         * exceptions.c (catch_errors): Delete.
3185         * exceptions.h: Update comments to avoid mentioning catch_errors.
3186         (catch_errors_ftype, catch_errors): Delete.
3187         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3188         (hook_stop_stub): Delete.
3189         (restore_selected_frame): Change return type to void, and
3190         parameter type to const frame_id &.
3191         (restore_infcall_control_state): Use TRY/CATCH instead of
3192         catch_errors.
3193         * main.c (captured_command_loop): Return void and remove
3194         parameter.  Remove references to catch_errors.
3195         (captured_main): Use TRY/CATCH instead of catch_errors.
3196         * objc-lang.c (objc_submethod_helper_data)
3197         (find_objc_msgcall_submethod_helper): Delete.
3198         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3199         catch_errors.
3200         * record-full.c (record_full_message): Return void.
3201         (record_full_message_args, record_full_message_wrapper): Delete.
3202         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3203         instead of catch_errors.
3204         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3205         parameter type to int.
3206         * solib-darwin.c (open_symbol_file_object): Ditto.
3207         * solib-dsbt.c (open_symbol_file_object): Ditto.
3208         * solib-frv.c (open_symbol_file_object): Ditto.
3209         * solib-svr4.c (open_symbol_file_object): Ditto.
3210         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3211         * solib.c (update_solib_list): Use TRY/CATCH instead of
3212         catch_errors.
3213         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3214         Change type.
3215         * symmisc.c (struct print_symbol_args): Remove.
3216         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3217         (print_symbol): Change type.
3218         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3219         and remove parameters.
3220         (catch_errors): New.
3221         (get_windows_debug_event): Adjust.
3222
3223 2017-10-09  Tom Tromey  <tom@tromey.com>
3224
3225         * mi/mi-main.c (free_splay_tree): Remove.
3226         (list_available_thread_groups): Use splay_tree_up.
3227         * common/gdb_splay_tree.h: New file.
3228
3229 2017-10-09  Tom Tromey  <tom@tromey.com>
3230
3231         * mi/mi-main.c (do_nothing): Remove.
3232         (list_available_thread_groups): Update.
3233
3234 2017-10-09  Pedro Alves  <palves@redhat.com>
3235
3236         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3237         reading registers when switching context.
3238
3239 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3240
3241         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3242         (fbsd_convert_siginfo): Likewise.
3243         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3244
3245 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3246
3247         * configure.ac (try_guile_versions): Remove guile-2.2.
3248         * configure: Regenerate.
3249
3250 2017-10-09  Tom Tromey  <tom@tromey.com>
3251
3252         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3253         (COMPILE.pre): Use $(CXX).
3254
3255 2017-10-09  Pedro Alves  <palves@redhat.com>
3256
3257         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3258         Use bool.
3259         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3260         * cp-support.h (cp_remove_params): Now returns a
3261         gdb::unique_xmalloc_ptr.
3262         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3263         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3264         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3265         returning a gdb::unique_xmalloc_ptr.
3266         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3267         * stack.c (find_frame_funname): Adjust to cp_remove_params
3268         returning a gdb::unique_xmalloc_ptr.
3269
3270 2017-10-08  Tom Tromey  <tom@tromey.com>
3271
3272         * dwarf2read.c (dwarf2_get_dwz_file): Use
3273         gdb::unique_xmalloc_ptr.
3274         (find_slot_in_mapped_hash): Likewise.
3275         (dwarf2_physname): Likewise.
3276         (create_dwo_unit_in_dwp_v1): Use std::string.
3277         (create_dwo_unit_in_dwp_v2): Likewise.
3278         (lookup_dwo_cutu): Likewise.
3279         (inherit_abstract_dies): Use std::vector.
3280         (read_array_type): Likewise.
3281         (dwarf_decode_macros): Remove unused declaration.
3282         (unsigned_int_compar): Remove.
3283         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3284         (psymtabs_addrmap_cleanup): Remove.
3285
3286 2017-10-08  Tom Tromey  <tom@tromey.com>
3287
3288         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3289         * frame.h (frame_cleanup_after_sniffer): Declare.
3290         (frame_prepare_for_sniffer): Return void.
3291         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3292         type of argument.
3293         (frame_prepare_for_sniffer): Return void.
3294
3295 2017-10-08  Tom Tromey  <tom@tromey.com>
3296
3297         * utils.h (make_cleanup_value_free): Remove.
3298         * utils.c (do_value_free, struct cleanup): Remove.
3299         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3300         Use gdb_value_up.
3301         * value.h (struct value_deleter): New.
3302         (gdb_value_up): New typedef.
3303
3304 2017-10-08  Tom Tromey  <tom@tromey.com>
3305
3306         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3307         (make_cleanup_free_search_symbols): Remove.
3308         (search_symbols): Return std::vector.
3309         (symbol_search::compare_search_syms): Now member of
3310         symbol_search.  Change arguments.
3311         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3312         (symtab_symbol_info, rbreak_command): Update.
3313         * symtab.h (struct symbol_search) <next>: Remove.
3314         Add constructors.
3315         (symbol_search::operator<): New function.
3316         (symbol_search::operator==): New function.
3317         (search_symbols): Remove std::vector.
3318         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3319         (symbol_search::compare_search_syms): Declare.
3320
3321 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3322
3323         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3324         arch/aarch64-insn.o.
3325         Remove one rule.
3326         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3327
3328 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3329
3330         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3331         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3332         arch/arm-linux.o respectively.
3333         * configure.tgt: Likewise.
3334
3335 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3336
3337         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3338         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3339
3340 2017-10-06  Pedro Alves  <palves@redhat.com>
3341
3342         * windows-nat.c: Include <algorithm>.
3343
3344 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3345
3346         * configure.tgt (i386_tobjs): New variable.
3347         (amd64_tobjs): New variable.
3348         Set $cpu_obs and $os_obs.
3349
3350 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3351
3352         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3353         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3354         (clean): Remove object files and dependency files.
3355         (distclean): Remove the directory.
3356         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3357         * configure: Re-generated.
3358         * configure.tgt: Replace amd64.o with arch/amd64.o.
3359
3360 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3361
3362         PR build/22188
3363         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3364         and SETEND.
3365
3366 2017-10-05  Pedro Alves  <palves@redhat.com>
3367
3368         * linux-nat.c (linux_child_follow_fork): When following the parent
3369         and detaching the child, consult the parent thread's architecture
3370         instead of the child's.
3371
3372 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3373
3374         * ax.h: Do not include "doublest.h".
3375         (union agent_val): Remove.
3376
3377 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3378
3379         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3380         (decimal_to_string): Return std::string object.
3381         (decimal_from_string): Accept std::string object.  Return bool.
3382         (decimal_from_integral, decimal_from_doublest): Remove.
3383         (decimal_from_longest): Add prototype.
3384         (decimal_from_ulongest): Likewise.
3385         (decimal_to_longest): Likewise.
3386         (decimal_from_doublest): Likewise.
3387         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3388         (MAX_DECIMAL_STRING): Move here.
3389         (decimal_to_string): Return std::string object.
3390         (decimal_from_string): Accept std::string object.  Return bool.
3391         (decimal_from_integral): Remove, replace by ...
3392         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3393         (decimal_to_longest): New function.
3394         (decimal_from_floating): Remove, replace by ...
3395         (decimal_from_doublest): ... this new function.
3396         (decimal_to_doublest): Update to new decimal_to_string interface.
3397
3398         * value.c (unpack_long): Use decimal_to_longest.
3399         * valops.c (value_cast): Use decimal_from_doublest instead of
3400         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3401         decimal_from_integral.
3402         * valarith.c (value_args_as_decimal): Likewise.
3403         * valprint.c (print_decimal_floating): Update to new
3404         decimal_to_string interface.
3405         * printcmd.c (printf_decfloat): Likewise.
3406         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3407
3408 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3409
3410         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3411         * gdbtypes.c: Include "floatformat.h".
3412         * value.c: Likewise.
3413         * m68k-tdep.c: Likewise.
3414
3415         * findvar.c: Do not include "floatformat.h".
3416         * amd64-darwin-tdep.c: Likewise.
3417         * arm-linux-tdep.c: Likewise.
3418         * i386-darwin-tdep.c: Likewise.
3419         * i387-tdep.c: Likewise.
3420         * m68k-linux-tdep.c: Likewise.
3421         * mep-tdep.c: Likewise.
3422         * mips-tdep.c: Likewise.
3423         * nios2-tdep.c: Likewise.
3424         * s390-linux-tdep.c: Likewise.
3425         * sparc-obsd-tdep.c: Likewise.
3426         * sparc-tdep.c: Likewise.
3427         * sparc64-tdep.c: Likewise.
3428         * spu-tdep.c: Likewise.
3429         * tic6x-tdep.c: Likewise.
3430         * tilegx-tdep.c: Likewise.
3431         * vax-tdep.c: Likewise.
3432         * xstormy16-tdep.c: Likewise.
3433         * xtensa-tdep.c: Likewise.
3434
3435         * top.c: Do not include "doublest.h".
3436         * aarch64-tdep.c: Likewise.
3437         * alpha-tdep.c: Likewise.
3438         * arm-linux-tdep.c: Likewise.
3439         * m68k-linux-tdep.c: Likewise.
3440         * tilegx-tdep.c: Likewise.
3441         * xstormy16-tdep.c: Likewise.
3442
3443 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3444
3445         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3446         (mipsn32_fbsd_sigframe): Define.
3447         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3448         for FreeBSD/mipsn32.
3449
3450 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3451
3452         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3453         AT_HWCAP.
3454
3455 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3456
3457         * MAINTAINERS (Misc): Update my email address.
3458
3459 2017-10-04  Pedro Alves  <palves@redhat.com>
3460
3461         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3462         it instead of target_gdbarch.
3463         (get_remote_state, get_remote_packet_size): Adjust
3464         get_remote_arch_state calls, passing down target_gdbarch
3465         explicitly.
3466         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3467         'gdbarch' and use it instead of target_gdbarch.
3468         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3469         passing down target_gdbarch explicitly.
3470         (struct stop_reply) <arch>: New field.
3471         (remote_parse_stop_reply): Use the stopped thread's architecture,
3472         not the current inferior's.  Save the architecture in the
3473         stop_reply.
3474         (process_stop_reply): Use the stop reply's architecture.
3475         (process_g_packet, remote_fetch_registers)
3476         (remote_prepare_to_store, store_registers_using_G)
3477         (remote_store_registers): Adjust get_remote_arch_state calls,
3478         using the regcache's architecture.
3479         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3480         passing down target_gdbarch explicitly.
3481         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3482         beneath instead of calling target_gdbarch.
3483         * target.c (default_thread_architecture): Use the specified
3484         inferior's architecture, instead of the current inferior's
3485         architecture (via target_gdbarch).
3486
3487 2017-10-04  Pedro Alves  <palves@redhat.com>
3488
3489         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3490         case.
3491         (regcache_print): Handle !target_has_registers here instead.
3492
3493 2017-10-04  Pedro Alves  <palves@redhat.com>
3494
3495         * frame.c (create_test_frame): Delete.
3496         * frame.h (create_test_frame): Delete.
3497         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3498         (class regcache_test): Delete.
3499         (test_target_has_registers, test_target_has_stack)
3500         (test_target_has_memory, test_target_prepare_to_store)
3501         (test_target_store_registers): New functions.
3502         (test_target_ops): New class.
3503         (register_to_value_test): Error out if there's already a
3504         process_stratum (or higher) target pushed.  Create a fuller mock
3505         environment, with mock target_ops, inferior, address space, thread
3506         and inferior_ptid.
3507         * progspace.c (struct address_space): Move to ...
3508         * progspace.h (struct address_space): ... here.
3509         * regcache.h (regcache::~regcache, regcache::raw_write)
3510         [GDB_SELF_TEST]: No longer virtual.
3511
3512 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3513
3514         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3515
3516 2017-10-04  Pedro Alves  <palves@redhat.com>
3517
3518         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3519         out of 'between TRY and CATCH'.
3520
3521 2017-10-04  Pedro Alves  <palves@redhat.com>
3522
3523         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3524         * common/common-exceptions.h (TRY): Open an outermost scope.
3525         Expand intro comment.
3526         (CATCH): Reindent.
3527         (END_CATCH): Close the outermost scope.
3528         * completer.c (complete_line_internal): Add missing END_CATCH.
3529
3530 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3531
3532         * NEWS (Changes since GDB 8.0): Add entry about new
3533         'set-cwd-on-gdbserver' feature.
3534         (New remote packets): Add entry for QSetWorkingDir.
3535         * common/common-inferior.h (set_inferior_cwd): New prototype.
3536         * infcmd.c (set_inferior_cwd): Remove "static".
3537         (show_cwd_command): Expand text to include remote debugging.
3538         * remote.c: Add PACKET_QSetWorkingDir.
3539         (remote_protocol_features) <QSetWorkingDir>: New entry for
3540         PACKET_QSetWorkingDir.
3541         (extended_remote_set_inferior_cwd): New function.
3542         (extended_remote_create_inferior): Call
3543         "extended_remote_set_inferior_cwd".
3544         (_initialize_remote): Call "add_packet_config_cmd" for
3545         QSetWorkingDir.
3546
3547 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3548
3549         * NEWS (New commands): Mention "set/show cwd".
3550         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3551         "cd" command's help text.
3552         * common/common-inferior.h (get_inferior_cwd): New prototype.
3553         * infcmd.c (inferior_cwd_scratch): New global variable.
3554         (set_inferior_cwd): New function.
3555         (get_inferior_cwd): Likewise.
3556         (set_cwd_command): Likewise.
3557         (show_cwd_command): Likewise.
3558         (_initialize_infcmd): Add "set/show cwd" commands.
3559         * inferior.h (class inferior) <cwd>: New field.
3560         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3561         (fork_inferior): Change inferior's cwd before its execution.
3562         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3563         to CreateProcess.
3564
3565 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3566
3567         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3568         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3569         (COMMON_OBS): Add gdb_tilde_expand.o.
3570         * common/gdb_tilde_expand.c: New file.
3571         * common/gdb_tilde_expand.h: Likewise.
3572
3573 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3574
3575         * gdbarch.sh (objfile): Remove duplicate declaration.
3576         * gdbarch.h: Regenerate.
3577
3578 2017-10-03  Tom Tromey  <tom@tromey.com>
3579
3580         * utils.c (internal_vproblem): Use string_vprintf.
3581
3582 2017-10-03  Tom Tromey  <tom@tromey.com>
3583
3584         * printcmd.c (info_symbol_command): Use std::string.
3585
3586 2017-10-03  Tom Tromey  <tom@tromey.com>
3587
3588         * top.c (gdb_safe_append_history): Use std::string.
3589
3590 2017-10-03  Tom Tromey  <tom@tromey.com>
3591
3592         * event-top.c (stdin_event_handler): Update.
3593         * main.c (captured_main_1): Update.
3594         * top.h (make_delete_ui_cleanup): Remove.
3595         (struct ui): Add constructor and destructor.
3596         (new_ui, delete_ui): Remove.
3597         * top.c (make_delete_ui_cleanup): Remove.
3598         (new_ui_command): Use std::unique_ptr.
3599         (delete_ui_cleanup): Remove.
3600         (ui::ui): Rename from new_ui.  Update.
3601         (free_ui): Remove.
3602         (ui::~ui): Rename from delete_ui.  Update.
3603
3604 2017-10-03  Tom Tromey  <tom@tromey.com>
3605
3606         * symfile.c (load_progress): Use gdb::byte_vector.
3607
3608 2017-10-03  Tom Tromey  <tom@tromey.com>
3609
3610         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3611         declaration.
3612         * printcmd.c (x_command): Remove unused declaration.
3613         * symfile.c (symbol_file_command): Remove unused declaration.
3614
3615 2017-10-03  Tom Tromey  <tom@tromey.com>
3616
3617         * utils.c (internal_vproblem): Use std::string.
3618         (defaulted_query): Likewise.
3619
3620 2017-10-03  Tom Tromey  <tom@tromey.com>
3621
3622         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3623         * top.c (execute_command_to_string): Update.
3624         * utils.c (make_cleanup_restore_page_info): Remove.
3625         (do_restore_page_info_cleanup): Remove.
3626         (set_batch_flag_and_restore_page_info):
3627         New.
3628         (make_cleanup_restore_page_info): Remove.
3629         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3630         (~set_batch_flag_and_restore_page_info): New
3631         (make_cleanup_restore_uinteger): Remove.
3632         (make_cleanup_restore_integer): Remove.
3633         (struct restore_integer_closure): Remove.
3634         (restore_integer): Remove.
3635         * utils.h (struct set_batch_flag_and_restore_page_info): New
3636         class.
3637         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3638         (make_cleanup_restore_page_info): Remove.
3639         (make_cleanup_restore_uinteger) Remove.
3640         (make_cleanup_restore_integer) Remove.
3641
3642 2017-10-03  Tom Tromey  <tom@tromey.com>
3643
3644         * record-full.h (record_full_gdb_operation_disable_set): Return
3645         scoped_restore_tmpl<int>.
3646         * infrun.c (adjust_pc_after_break): Update.
3647         (handle_signal_stop): Update.
3648         * record-full.c (record_full_gdb_operation_disable_set): Return
3649         scoped_restore_tmpl<int>.
3650         (record_full_wait_1, record_full_insert_breakpoint)
3651         (record_full_remove_breakpoint, record_full_save)
3652         (record_full_goto_insn): Update.
3653
3654 2017-10-02  Tom Tromey  <tom@tromey.com>
3655
3656         PR rust/22236:
3657         * rust-lang.c (rust_val_print_str): New function.
3658         (val_print_struct): Call it.
3659         (rust_subscript): Preserve name of slice type.
3660
3661 2017-10-02  Tom Tromey  <tom@tromey.com>
3662
3663         * rust-lang.c (rust_subscript): Handle slices in
3664         EVAL_AVOID_SIDE_EFFECTS case.
3665
3666 2017-10-02  Tom Tromey  <tom@tromey.com>
3667
3668         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3669
3670 2017-10-02  Tom Tromey  <tom@tromey.com>
3671
3672         * rust-lang.h (rust_slice_type): Add "extern".
3673
3674 2017-10-02  Tom Tromey  <tom@tromey.com>
3675             Pedro Alves  <palves@redhat.com>
3676
3677         * ada-lang.h (ada_exc_info::operator<): Make const.
3678         (ada_exc_info::operator==): Make const.
3679         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3680         Make const.
3681
3682 2017-09-29  Tom Tromey  <tom@tromey.com>
3683
3684         * target.c (read_whatever_is_readable): Change type of "result".
3685         Update.
3686         (free_memory_read_result_vector): Remove.
3687         (read_memory_robust): Change return type.  Update.
3688         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3689         bin2hex, std::string.
3690         * target.h (memory_read_result_s): Remove typedef.
3691         (free_memory_read_result_vector): Remove.
3692         (read_memory_robust): Return std::vector.
3693
3694 2017-09-29  Tom Tromey  <tom@tromey.com>
3695
3696         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3697
3698 2017-09-29  Tom Tromey  <tom@tromey.com>
3699
3700         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3701         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3702         operator< and operator==.
3703         (ada_exceptions_list): Return a std::vector.
3704         * ada-lang.c (ada_exc_info::operator<): Rename from
3705         compare_ada_exception_info.
3706         (ada_exc_info::operator==): New.
3707         (sort_remove_dups_ada_exceptions_list): Change type of
3708         "exceptions".
3709         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3710         (ada_add_global_exceptions): Likewise.
3711         (ada_exceptions_list_1): Return a std::vector.
3712         (ada_exceptions_list): Likewise.
3713
3714 2017-09-29  Tom Tromey  <tom@tromey.com>
3715
3716         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3717         'std::set *'.
3718         (print_one_inferior): Update.
3719         (free_vector_of_ints): Remove.
3720         (list_available_thread_groups): Change "ids" to std::set.
3721         (mi_cmd_list_thread_groups): Update.
3722         (struct collect_cores_data) <core>: Now a std::set.
3723         (collect_cores): Update.
3724         (unique): Remove.
3725         (print_one_inferior): Update.
3726
3727 2017-09-29  Tom Tromey  <tom@tromey.com>
3728
3729         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3730         (mi_execute_async_cli_command): Likewise.
3731         (mi_cmd_trace_frame_collected): Use field_fmt.
3732
3733 2017-09-29  Tom Tromey  <tom@tromey.com>
3734
3735         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3736         gdb::byte_vector.
3737
3738 2017-09-29  Tom Tromey  <tom@tromey.com>
3739
3740         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3741
3742 2017-09-29  Tom Tromey  <tom@tromey.com>
3743
3744         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3745
3746 2017-09-29  Tom Tromey  <tom@tromey.com>
3747
3748         * varobj.h (varobj_gen_name): Return std::string.
3749         * varobj.c (varobj_gen_name): Return std::string.
3750         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3751         (mi_cmd_var_delete): Don't copy "name".
3752
3753 2017-09-29  Tom Tromey  <tom@tromey.com>
3754
3755         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3756         (mi_cmd_break_insert_1): Update.
3757
3758 2017-09-29  Tom Tromey  <tom@tromey.com>
3759
3760         * target.h (make_scoped_defer_target_commit_resume): Update.
3761         * target.c (make_scoped_defer_target_commit_resume): Rename from
3762         make_cleanup_defer_target_commit_resume.  Return a
3763         scoped_restore.
3764         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3765
3766 2017-09-29  Tom Tromey  <tom@tromey.com>
3767
3768         * main.c (captured_main_1): Remove unused declaration.
3769         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3770
3771 2017-09-29  Tom Tromey  <tom@tromey.com>
3772
3773         * symtab.c (search_symbols): Remove unused outer cleanup.
3774         (make_source_files_completion_list): Remove unused declaration.
3775
3776 2017-09-29  Tom Tromey  <tom@tromey.com>
3777
3778         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3779
3780 2017-09-29  Tom Tromey  <tom@tromey.com>
3781
3782         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3783         gdb::byte_vector.
3784
3785 2017-09-29  Tom Tromey  <tom@tromey.com>
3786
3787         * complaints.c (vcomplaint): Use std::string.
3788
3789 2017-09-29  Tom Tromey  <tom@tromey.com>
3790
3791         * tracepoint.c (trace_variable_command): Use std::string.
3792         (encode_actions_1): Remove unused declarations.
3793         (create_tsv_from_upload): Use std::string.
3794
3795 2017-09-29  Tom Tromey  <tom@tromey.com>
3796
3797         * cp-support.c (gdb_demangle): Use std::string.
3798
3799 2017-09-29  Tom Tromey  <tom@tromey.com>
3800
3801         * stack.c (parse_frame_specification): Use std::string
3802         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3803
3804 2017-09-29  Tom Tromey  <tom@tromey.com>
3805
3806         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3807
3808 2017-09-29  Tom Tromey  <tom@tromey.com>
3809
3810         * utils.c (vfprintf_maybe_filtered): Use std::string.
3811         (vfprintf_unfiltered): Likewise.
3812
3813 2017-09-29  Tom Tromey  <tom@tromey.com>
3814
3815         * event-top.c (top_level_prompt): Return std::string.
3816         (display_gdb_prompt): Update.
3817
3818 2017-09-29  Tom Tromey  <tom@tromey.com>
3819
3820         * unittests/common-utils-selftests.c (format): New function.
3821         (string_vprintf_tests): New function.
3822         (_initialize_common_utils_selftests): Register new tests.
3823         * common/common-utils.c (string_vprintf): New function.
3824         * common/common-utils.h (string_vprintf): Declare.
3825
3826 2017-09-29  Pedro Alves  <palves@redhat.com>
3827
3828         * common/rsp-low.c (unpack_varlen_hex): Constify.
3829         * common/rsp-low.h (unpack_varlen_hex): Constify.
3830         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3831         Constify.
3832         * remote.c (remote_set_permissions, read_ptid)
3833         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3834         (remote_static_tracepoint_marker_at)
3835         (remote_static_tracepoint_markers_by_strid)
3836         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3837         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3838         (parse_tracepoint_definition, parse_tsv_definition)
3839         (parse_static_tracepoint_marker_definition): Constify.
3840         * tracepoint.h (parse_static_tracepoint_marker_definition)
3841         (parse_trace_status, parse_tracepoint_status)
3842         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3843
3844 2017-09-29  Pedro Alves  <palves@redhat.com>
3845
3846         * remote.c (target_buf, target_buf_size): Delete.
3847         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3848         Use the connection's packet buffer instead.
3849         All callers adjusted.
3850         (_initialize_remote): Remove references to target_buf and
3851         target_buf_size.
3852
3853 2017-09-28  Pedro Alves  <palves@redhat.com>
3854
3855         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3856         unittests/common-utils-selftests.c.
3857         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3858         (COMMON_OBS): Remove utils-selftests.o.
3859         * utils-selftests.c: Move to ...
3860         * unittests/common-utils-selftests.c: ... here and rename self
3861         test to "string_printf".
3862
3863 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3864
3865         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3866         having NULL cus or tus.
3867
3868 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3869
3870         * arm-tdep.c: (convert_from_extended): Remove.
3871         (convert_to_extended): Likewise.
3872         (arm_extract_return_value): Use convert_typed_floating.
3873         (arm_store_return_value): Likewise.
3874
3875         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3876         * sh-tdep.c: Do not include "floatformat.h".
3877         (sh_littlebyte_bigword_type): New function.
3878         (sh_register_convert_to_virtual): Use convert_typed_floating.
3879         (sh_register_convert_to_raw): Likewise.
3880         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3881         (sh64_littlebyte_bigword_type): New function.
3882         (sh64_extract_return_value): Use convert_typed_floating.
3883         (sh64_register_convert_to_virtual): Likewise.
3884         (sh64_register_convert_to_raw): Likewise.
3885
3886 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3887
3888         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3889         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3890
3891         * gdbtypes.h (union type_specific): Make field floatformat hold
3892         just a single struct floatformat, not an array.
3893         (floatformat_from_type): Move here.
3894         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3895         changed TYPE_FLOATFORMAT definition.
3896         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3897         (recursive_dump_type): Likewise.
3898         (init_float_type): Install correct floatformat for byte order.
3899         (arch_float_type): Likewise.
3900
3901 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3902
3903         * gdbtypes.c (init_type): Change incoming argument from
3904         length-in-bytes to length-in-bits.  Assert length is a
3905         multiple of TARGET_CHAR_BITS.
3906         (arch_type, arch_flags_type): Likewise.
3907         (init_integer_type): Update call to init_type.
3908         (init_character_type): Likewise.
3909         (init_boolean_type): Likewise.
3910         (init_float_type): Likewise.
3911         (init_decfloat_type): Likewise.
3912         (init_complex_type): Likewise.
3913         (init_pointer_type): Likewise.
3914         (objfile_type): Likewise.
3915         (arch_integer_type): Update call to arch_type.
3916         (arch_character_type): Likewise.
3917         (arch_boolean_type): Likewise.
3918         (arch_float_type): Likewise.
3919         (arch_decfloat_type): Likewise.
3920         (arch_complex_type): Likewise.
3921         (arch_pointer_type): Likewise.
3922         (gdbtypes_post_init): Likewise.
3923
3924         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3925         (read_base_type): Likewise.
3926         * mdebugread.c (basic_type): Likewise.
3927         * stabsread.c (dbx_init_float_type): Likewise.
3928         (rs6000_builtin_type): Likewise.
3929         (read_range_type): Likewise.  Also, fix call to init_integer_type
3930         with erroneous length argument.
3931
3932         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3933         * d-lang.c (build_d_types): Likewise.
3934         * f-lang.c (build_fortran_types): Likewise.
3935         * go-lang.c (build_go_types): Likewise.
3936         * opencl-lang.c (build_opencl_types): Likewise.
3937         * jit.c (finalize_symtab): Likewise.
3938         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3939         (build_std_type_info_type): Likewise.
3940         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3941         update call to arch_flags_type.
3942
3943         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3944         arch_type.
3945         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3946         * windows-tdep.c (windows_get_tlb_type): Likewise.
3947
3948         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3949         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3950         * m32c-tdep.c (make_types): Likewise.
3951         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3952         (rl78_psw_type): Update call to arch_flags_type.
3953         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3954         * rx-tdep.c (rx_psw_type): Likewise.
3955         (rx_fpsw_type): Likewise.
3956         * sparc-tdep.c (sparc_psr_type): Likewise.
3957         (sparc_fsr_type): Likewise.
3958         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3959         (sparc64_ccr_type): Likewise.
3960         (sparc64_fsr_type): Likewise.
3961         (sparc64_fprs_type): Likewise.
3962
3963 2017-09-27  Tom Tromey  <tom@tromey.com>
3964
3965         * findcmd.c (find_command): Constify.
3966
3967 2017-09-27  Tom Tromey  <tom@tromey.com>
3968
3969         * ada-tasks.c (task_command_1, task_command): Constify.
3970
3971 2017-09-27  Tom Tromey  <tom@tromey.com>
3972
3973         * symtab.c (maintenance_print_symbol_cache)
3974         (maintenance_flush_symbol_cache)
3975         (maintenance_print_symbol_cache_statistics): Constify.
3976
3977 2017-09-27  Tom Tromey  <tom@tromey.com>
3978
3979         * inferior.c (detach_inferior_command, kill_inferior_command)
3980         (inferior_command): Constify.
3981
3982 2017-09-27  Tom Tromey  <tom@tromey.com>
3983
3984         * regcache.c (regcache_print, maintenance_print_registers)
3985         (maintenance_print_raw_registers)
3986         (maintenance_print_cooked_registers)
3987         (maintenance_print_register_groups)
3988         (maintenance_print_remote_registers): Constify.
3989
3990 2017-09-27  Tom Tromey  <tom@tromey.com>
3991
3992         * printcmd.c (map_display_numbers, undisplay_command)
3993         (enable_disable_display_command, enable_display_command)
3994         (disable_display_command): Constify.
3995
3996 2017-09-27  Tom Tromey  <tom@tromey.com>
3997
3998         * breakpoint.h (delete_command): Don't declare.
3999         * breakpoint.c (delete_command, enable_once_command)
4000         (enable_count_command, enable_delete_command, breakpoint_1)
4001         (maintenance_info_breakpoints, stopin_command, stopat_command)
4002         (delete_command, delete_trace_command, save_breakpoints)
4003         (save_breakpoints_command, save_tracepoints_command): Constify.
4004
4005 2017-09-27  Tom Tromey  <tom@tromey.com>
4006
4007         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4008         (skip_ws, extract_identifier, macro_define_command)
4009         (macro_undef_command, macro_list_command): Constify.
4010
4011 2017-09-27  Tom Tromey  <tom@tromey.com>
4012
4013         * infcmd.c (environment_info, set_environment_command)
4014         (unset_environment_command, path_info, info_proc_cmd_1)
4015         (info_proc_cmd_mappings, info_proc_cmd_stat)
4016         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4017         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4018
4019 2017-09-27  Tom Tromey  <tom@tromey.com>
4020
4021         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4022         Constify.
4023
4024 2017-09-27  Tom Tromey  <tom@tromey.com>
4025
4026         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4027
4028 2017-09-27  Tom Tromey  <tom@tromey.com>
4029
4030         * demangle.c (demangle_command): Constify.
4031
4032 2017-09-27  Tom Tromey  <tom@tromey.com>
4033
4034         * progspace.c (maintenance_info_program_spaces_command):
4035         Constify.
4036
4037 2017-09-27  Tom Tromey  <tom@tromey.com>
4038
4039         * compile/compile.c (check_raw_argument, compile_file_command)
4040         (compile_code_command, compile_print_command): Constify.
4041
4042 2017-09-27  Tom Tromey  <tom@tromey.com>
4043
4044         * reggroups.c (maintenance_print_reggroups): Constify.
4045
4046 2017-09-27  Tom Tromey  <tom@tromey.com>
4047
4048         * dwarf2read.c (save_gdb_index_command): Constify.
4049
4050 2017-09-27  Tom Tromey  <tom@tromey.com>
4051
4052         * stap-probe.c (info_probes_stap_command): Constify.
4053
4054 2017-09-27  Tom Tromey  <tom@tromey.com>
4055
4056         * fork-child.c (unset_exec_wrapper_command): Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * btrace.c (get_uint, get_context_size, no_chunk)
4061         (maint_btrace_packet_history_cmd)
4062         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4063         (maint_info_btrace_cmd): Constify.
4064
4065 2017-09-27  Tom Tromey  <tom@tromey.com>
4066
4067         * reverse.c (delete_bookmark_command): Constify.
4068
4069 2017-09-27  Tom Tromey  <tom@tromey.com>
4070
4071         * remote.c (set_memory_packet_size)
4072         (set_memory_write_packet_size, show_memory_write_packet_size)
4073         (set_memory_read_packet_size, show_memory_read_packet_size)
4074         (compare_sections_command, packet_command, remote_put_command)
4075         (remote_get_command, remote_delete_command): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4080         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4081         (set_mipsfpu_auto_command): Constify.
4082
4083 2017-09-27  Tom Tromey  <tom@tromey.com>
4084
4085         * cli/cli-cmds.h (cd_command): Constify.
4086         * cli/cli-cmds.c (cd_command): Constify.
4087
4088 2017-09-27  Tom Tromey  <tom@tromey.com>
4089
4090         * thread.c (thread_name_command, thread_find_command): Constify.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * probe.c (enable_probes_command, disable_probes_command):
4095         Constify.
4096
4097 2017-09-27  Tom Tromey  <tom@tromey.com>
4098
4099         * symfile.c (symbol_file_command): Constify.
4100         * gdbcore.h (deprecated_file_changed_hook): Constify.
4101         * exec.c (deprecated_file_changed_hook, exec_file_command)
4102         (file_command): Constify.
4103         * defs.h (symbol_file_command): Constify.
4104
4105 2017-09-27  Tom Tromey  <tom@tromey.com>
4106
4107         * remote-fileio.c (set_system_call_allowed)
4108         (show_system_call_allowed): Constify.
4109
4110 2017-09-27  Tom Tromey  <tom@tromey.com>
4111
4112         * tracepoint.c (delete_trace_variable_command)
4113         (tfind_end_command, tfind_start_command, tfind_pc_command)
4114         (tfind_tracepoint_command, tfind_line_command)
4115         (tfind_range_command, tfind_outside_command): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * ax-gdb.c (maint_agent_printf_command, agent_command)
4120         (agent_eval_command): Constify.
4121
4122 2017-09-27  Tom Tromey  <tom@tromey.com>
4123
4124         * tracepoint.c (info_scope_command): Constify.
4125         * python/python.c (gdbpy_decode_line): Constify.
4126         * python/py-breakpoint.c (bppy_init): Constify.
4127         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4128         * location.h: (new_linespec_location)
4129         (string_to_event_location_basic, string_to_event_location):
4130         Constify.
4131         * location.c (new_linespec_location)
4132         (string_to_event_location_basic, string_to_event_location):
4133         Constify.
4134         * linespec.h (decode_line_with_current_source)
4135         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4136         * linespec.c (linespec_lex_to_end)
4137         (decode_line_with_current_source)
4138         (decode_line_with_last_displayed): Constify.
4139         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4140         Constify.
4141         * cli/cli-cmds.c (edit_command, list_command): Constify.
4142         * breakpoint.h (until_break_command, watch_command_wrapper)
4143         (awatch_command_wrapper, rwatch_command_wrapper)
4144         (init_ada_exception_breakpoint): Constify.
4145         * breakpoint.c (break_command_1, dprintf_command)
4146         (break_range_command, watch_command_wrapper)
4147         (rwatch_command_wrapper, awatch_command_wrapper)
4148         (until_break_command, init_ada_exception_breakpoint)
4149         (strace_marker_create_sals_from_location, trace_command)
4150         (ftrace_command, strace_command, struct tracepoint): Constify.
4151         * ax-gdb.c (agent_command_1): Constify.
4152         * ada-lang.c (ada_exception_sal): Constify.
4153
4154 2017-09-27  Tom Tromey  <tom@tromey.com>
4155
4156         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4157         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4158         (get_context_size, no_chunk, get_insn_history_modifiers)
4159         (cmd_record_insn_history, get_call_history_modifiers)
4160         (cmd_record_call_history): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * source.c (show_substitute_path_command)
4165         (unset_substitute_path_command, set_substitute_path_command):
4166         Constify.
4167
4168 2017-09-27  Tom Tromey  <tom@tromey.com>
4169
4170         * typeprint.c (maintenance_print_type): Constify.
4171         * maint.c (maintenance_dump_me, maintenance_demangle)
4172         (maintenance_time_display, maintenance_info_sections)
4173         (maintenance_print_statistics, maintenance_deprecate)
4174         (maintenance_undeprecate): Constify.
4175         (maintenance_do_deprecate): Constify.  Use std::string.
4176         (maintenance_selftest): Constify.
4177         * gdbtypes.h (maintenance_print_type): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * hppa-tdep.c (unwind_command): Constify.
4182
4183 2017-09-27  Tom Tromey  <tom@tromey.com>
4184
4185         * target-descriptions.c (unset_tdesc_filename_cmd)
4186         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4187         Constify.
4188
4189 2017-09-27  Tom Tromey  <tom@tromey.com>
4190
4191         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4192
4193 2017-09-27  Tom Tromey  <tom@tromey.com>
4194
4195         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4196
4197 2017-09-27  Tom Tromey  <tom@tromey.com>
4198
4199         * tui/tui-regs.c (tui_reg_command): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * skip.c (skip_file_command, skip_function_command)
4204         (skip_enable_command, skip_disable_command, skip_delete_command):
4205         Constify.
4206
4207 2017-09-27  Tom Tromey  <tom@tromey.com>
4208
4209         * record-btrace.c (cmd_record_btrace_bts_start)
4210         (cmd_record_btrace_pt_start): Constify.
4211
4212 2017-09-27  Tom Tromey  <tom@tromey.com>
4213
4214         * symmisc.c (maintenance_print_symbols)
4215         (maintenance_print_msymbols, maintenance_print_objfiles)
4216         (maintenance_info_symtabs, maintenance_check_symtabs)
4217         (maintenance_expand_symtabs, maintenance_info_line_tables):
4218         Constify.
4219
4220 2017-09-27  Tom Tromey  <tom@tromey.com>
4221
4222         * top.c (new_ui_command): Constify.
4223
4224 2017-09-27  Tom Tromey  <tom@tromey.com>
4225
4226         * symfile.c (add_symbol_file_command)
4227         (remove_symbol_file_command, list_overlays_command)
4228         (map_overlay_command, unmap_overlay_command)
4229         (overlay_auto_command, overlay_manual_command)
4230         (overlay_off_command, overlay_load_command): Constify.
4231
4232 2017-09-27  Tom Tromey  <tom@tromey.com>
4233
4234         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4235         (info_spu_mailbox_command, info_spu_dma_command)
4236         (info_spu_proxydma_command): Constify.
4237
4238 2017-09-27  Tom Tromey  <tom@tromey.com>
4239
4240         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4241
4242 2017-09-27  Tom Tromey  <tom@tromey.com>
4243
4244         * cli/cli-script.c (user_defined_command): Constify.
4245
4246 2017-09-27  Tom Tromey  <tom@tromey.com>
4247
4248         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4249         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4250         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4251         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4252         (dump_binary_value, append_binary_memory, append_binary_value):
4253         Constify.
4254         (struct dump_context) <func>: Constify.
4255         (add_dump_command): Update.
4256
4257 2017-09-27  Tom Tromey  <tom@tromey.com>
4258
4259         * cli/cli-cmds.c (show_version, show_configuration)
4260         (source_command, show_user): Constify.
4261
4262 2017-09-27  Tom Tromey  <tom@tromey.com>
4263
4264         * target.c (maintenance_print_target_stack): Constify.
4265
4266 2017-09-27  Tom Tromey  <tom@tromey.com>
4267
4268         * interps.c (interpreter_exec_cmd): Constify.
4269
4270 2017-09-27  Tom Tromey  <tom@tromey.com>
4271
4272         * record-full.c (cmd_record_full_restore): Constify.
4273
4274 2017-09-27  Tom Tromey  <tom@tromey.com>
4275
4276         * memattr.c (enable_mem_command, disable_mem_command)
4277         (delete_mem_command): Constify.
4278
4279 2017-09-27  Tom Tromey  <tom@tromey.com>
4280
4281         * value.c (show_convenience): Constify.
4282
4283 2017-09-27  Tom Tromey  <tom@tromey.com>
4284
4285         * gdbcore.h (core_file_command): Update.
4286         * corefile.c (core_file_command): Constify.
4287
4288 2017-09-27  Tom Tromey  <tom@tromey.com>
4289
4290         * user-regs.c (maintenance_print_user_registers): Constify.
4291
4292 2017-09-27  Tom Tromey  <tom@tromey.com>
4293
4294         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4295
4296 2017-09-27  Tom Tromey  <tom@tromey.com>
4297
4298         * cp-support.c (first_component_command): Constify.
4299
4300 2017-09-27  Tom Tromey  <tom@tromey.com>
4301
4302         * psymtab.c (maintenance_print_psymbols)
4303         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4304         Constify.
4305
4306 2017-09-27  Tom Tromey  <tom@tromey.com>
4307
4308         * windows-tdep.c (display_tib): Constify.
4309
4310 2017-09-27  Tom Tromey  <tom@tromey.com>
4311
4312         * linux-fork.c (delete_checkpoint_command)
4313         (detach_checkpoint_command): Constify.
4314
4315 2017-09-27  Tom Tromey  <tom@tromey.com>
4316
4317         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4318
4319 2017-09-27  Tom Tromey  <tom@tromey.com>
4320
4321         * arc-tdep.c (dump_arc_instruction_command): Constify.
4322
4323 2017-09-27  Tom Tromey  <tom@tromey.com>
4324
4325         * valprint.c (set_radix, show_radix): Constify.
4326
4327 2017-09-27  Tom Tromey  <tom@tromey.com>
4328
4329         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4330
4331 2017-09-27  Tom Tromey  <tom@tromey.com>
4332
4333         * command.h (not_just_help_class_command): Update.
4334         * cli/cli-decode.h (not_just_help_class_command): Update.
4335         * cli/cli-decode.c (not_just_help_class_command): Constify.
4336
4337 2017-09-27  Tom Tromey  <tom@tromey.com>
4338
4339         * gdb_bfd.c (maintenance_info_bfds): Constify.
4340
4341 2017-09-27  Tom Tromey  <tom@tromey.com>
4342
4343         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4344         overloads.
4345         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4346         (do_const_cfunc): New function.
4347         (cmd_cfunc_eq): New overload.
4348         (cli_user_command_p): Check do_const_cfunc.
4349         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4350         const_cfunc.
4351         * command.h (add_cmd): Add const overload and no-function
4352         overload.
4353         (set_cmd_cfunc): Add const overload.
4354         (cmd_const_cfunc_ftype): Declare.
4355         (cmd_cfunc_eq): Add const overload.
4356         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4357         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4358         overload.
4359
4360 2017-09-27  Tom Tromey  <tom@tromey.com>
4361
4362         * macroexp.c (get_next_token_for_substitution): New function.
4363         (substitute_args): Call it.  Check for __VA_OPT__.
4364
4365 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4366             Pedro Alves <palves@redhat.com>
4367
4368         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4369         producer_is_icc_lt_14.
4370         (producer_is_icc_lt_14): New function.
4371         (check_producer): Add code for checking version of ICC.
4372         (producer_is_icc): Move to producer.c.
4373         (read_structure_type): Restrict ICC workaround to ICC<14.
4374         * producer.c: Include selftest.h.
4375         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4376         New functions.
4377         * producer.h (producer_is_icc): New declaration.
4378
4379 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4380
4381         * Makefile.in (SFILES): Add producer.c.
4382         (COMMON_OBS): Add producer.o
4383         * amd64-tdep.c (producer.h): Add new include.
4384         * dwarf2read.c (producer.h): Add new include.
4385         * producer.c: New file.
4386         * producer.h: New file.
4387         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4388         producer.c.
4389         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4390         producer.h.
4391
4392 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4393
4394         * configure.ac: Search ncursesw before ncurses.
4395         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4396         * gdb_curses.h: Include <ncursesw/ncurses.h>
4397         * config.in, configure: Regenerate.
4398
4399 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4400
4401         PR gdb/22185
4402         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4403         obsolete.
4404         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4405         Remove i386sol2 support.
4406         * configure.nat <i386sol2>: Remove.
4407         <sol2-64>: Fold into ...
4408         <sol2>: ... this.
4409         Move common settings to default section.
4410         Add sol-thread.o.
4411         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4412         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4413         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4414         <i[34567]86-*-solaris*>: Remove.
4415         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4416
4417         * configure.ac: Remove wctype in libw check.
4418         (_MSE_INT_H): Don't define on Solaris 7-9.
4419         <solaris*>: Remove libthread_db.so.1 check.
4420         * configure: Regenerate.
4421         * config.in: Regenerate.
4422
4423         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4424         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4425         (gdb_ps_size_t): Remove.
4426         Use base types in users.
4427         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4428
4429         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4430
4431 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4432
4433         PR build/22206
4434         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4435         (adi_is_addr_mapped): Likewise.
4436         (PSR_ICC): Don't redefine.
4437         (PSR_IMPL): Likewise.
4438
4439 2017-09-25  Tom Tromey  <tom@tromey.com>
4440
4441         * regcache.c (regcache::dump): Use string_printf.
4442
4443 2017-09-25  Tom Tromey  <tom@tromey.com>
4444
4445         * regcache.c (class regcache_invalidator): New.
4446         (struct register_to_invalidate): Remove.
4447         (make_cleanup_regcache_invalidate): Remove.
4448         (regcache::raw_write): Use regcache_invalidator.
4449
4450 2017-09-25  Tom Tromey  <tom@tromey.com>
4451
4452         * spu-tdep.c (spu2ppu_sniffer): Update.
4453         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4454         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4455         Remove.
4456         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4457         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4458         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4459         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4460         (frame_pop): Update.
4461
4462 2017-09-25  Tom Tromey  <tom@tromey.com>
4463
4464         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4465         * regcache.h (regcache_xfree): Don't declare.
4466         * regcache.c (regcache_xfree): Remove.
4467         (do_regcache_xfree): Use delete.
4468         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4469         * linux-fork.c (free_fork): Use delete.
4470         (fork_save_infrun_state): Likewise.
4471         * jit.c (jit_dealloc_cache): Use delete.
4472         * infrun.c (discard_infcall_suspend_state): Use delete.
4473
4474 2017-09-25  Tom Tromey  <tom@tromey.com>
4475
4476         * regcache.h (regcache_xmalloc): Don't declare.
4477         (regcache_raw_set_cached_value): Update comment.
4478         * regcache.c (regcache_xmalloc): Remove.
4479         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4480         * jit.c (jit_frame_sniffer): Use new.
4481         * frame.c (frame_save_as_regcache): Use new.
4482
4483 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4484
4485         * NEWS: Advertise support for guarded-storage registers on IBM z.
4486
4487 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4488
4489         * s390-linux-nat.c (have_regset_gs): New static variable.
4490         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4491         control block and guarded-storage broadcast control regsets.
4492         (s390_read_description): Detect whether the target has
4493         guarded-storage support, return appropriate tdesc.
4494         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4495         (features/s390x-gs-linux64.c): Likewise.
4496         (struct gdbarch_tdep) <have_gs>: New field.
4497         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4498         (s390_gsbc_regset): New variables.
4499         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4500         and s390_gsbc_regset, if applicable.
4501         (s390_core_read_description): Check whether core file was from a
4502         target with guarded-storage support; include appropriate regsets.
4503         (s390_gdbarch_init): Add registers for guarded-storage support.
4504         (_initialize_s390_tdep): Initialize new target descriptions that
4505         include registers for guarded-storage support.
4506         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4507         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4508         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4509         (S390_NUM_REGS): Adjust macro definition.
4510         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4511         (tdesc_s390x_gs_linux64): New declarations.
4512
4513 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4514
4515         * features/s390-gs-linux64.xml: New file.
4516         * features/s390-gs.xml: New file.
4517         * features/s390-gsbc.xml: New file.
4518         * features/s390x-gs-linux64.xml: New file.
4519         * features/Makefile (WHICH): Add s390-gs-linux64 and
4520         s390x-gs-linux64.
4521         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4522         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4523         * features/s390-gs-linux64.c: New generated file.
4524         * features/s390x-gs-linux64.c: New file.
4525         * regformats/s390-gs-linux64.dat: New file.
4526         * regformats/s390x-gs-linux64.dat: New file.
4527
4528 2017-09-23  Tom Tromey  <tom@tromey.com>
4529
4530         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4531
4532 2017-09-22  Tom Tromey  <tom@tromey.com>
4533
4534         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4535         type to scoped_restore_tmpl.
4536         <scoped_input_handler>: Initialize m_quit_handler directly.
4537
4538 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4539
4540         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4541         (cd_command): Likewise.  Free "current_directory" before
4542         assigning to it.
4543         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4544         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4545         * top.c (gdb_dirbuf): Remove global declaration.
4546         * top.h (gdb_dirbuf): Likewise.
4547
4548 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4549
4550         * gnulib/aclocal.m4: Regenerate.
4551         * gnulib/config.in: Regenerate.
4552         * gnulib/configure: Regenerate.
4553         * gnulib/import/Makefile.am: Regenerate.
4554         * gnulib/import/Makefile.in: Regenerate.
4555         * gnulib/import/assure.h: New file.
4556         * gnulib/import/at-func.c: Likewise
4557         * gnulib/import/chdir-long.c: New file.
4558         * gnulib/import/chdir-long.h: New file.
4559         * gnulib/import/cloexec.c: New file.
4560         * gnulib/import/cloexec.h: New file.
4561         * gnulib/import/close.c: New file.
4562         * gnulib/import/closedir.c: New file.
4563         * gnulib/import/dirent-private.h: New file.
4564         * gnulib/import/dup-safer.c: New file.
4565         * gnulib/import/dup.c: New file.
4566         * gnulib/import/dup2.c: New file.
4567         * gnulib/import/error.c: New file.
4568         * gnulib/import/error.h: New file.
4569         * gnulib/import/exitfail.c: New file.
4570         * gnulib/import/exitfail.h: New file.
4571         * gnulib/import/fchdir.c: New file.
4572         * gnulib/import/fcntl.c: New file.
4573         * gnulib/import/fcntl.in.h: New file.
4574         * gnulib/import/fd-hook.c: New file.
4575         * gnulib/import/fd-hook.h: New file.
4576         * gnulib/import/fd-safer.c: New file.
4577         * gnulib/import/fdopendir.c: New file.
4578         * gnulib/import/filename.h: New file.
4579         * gnulib/import/filenamecat-lgpl.c: New file.
4580         * gnulib/import/filenamecat.h: New file.
4581         * gnulib/import/fstat.c: New file.
4582         * gnulib/import/fstatat.c: New file.
4583         * gnulib/import/getcwd-lgpl.c: New file.
4584         * gnulib/import/getcwd.c: New file.
4585         * gnulib/import/getdtablesize.c: New file.
4586         * gnulib/import/getlogin_r.c: New file.
4587         * gnulib/import/getprogname.c: New file.
4588         * gnulib/import/getprogname.h: New file.
4589         * gnulib/import/gettext.h: New file.
4590         * gnulib/import/glob-libc.h: New file.
4591         * gnulib/import/glob.c: New file.
4592         * gnulib/import/glob.in.h: New file.
4593         * gnulib/import/intprops.h: New file.
4594         * gnulib/import/m4/chdir-long.m4: New file.
4595         * gnulib/import/m4/close.m4: New file.
4596         * gnulib/import/m4/closedir.m4: New file.
4597         * gnulib/import/m4/d-ino.m4: New file.
4598         * gnulib/import/m4/d-type.m4: New file.
4599         * gnulib/import/m4/dup.m4: New file.
4600         * gnulib/import/m4/dup2.m4: New file.
4601         * gnulib/import/m4/error.m4: New file.
4602         * gnulib/import/m4/fchdir.m4: New file.
4603         * gnulib/import/m4/fcntl.m4: New file.
4604         * gnulib/import/m4/fcntl_h.m4: New file.
4605         * gnulib/import/m4/fdopendir.m4: New file.
4606         * gnulib/import/m4/filenamecat.m4: New file.
4607         * gnulib/import/m4/fstat.m4: New file.
4608         * gnulib/import/m4/fstatat.m4: New file.
4609         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4610         * gnulib/import/m4/getcwd-path-max.m4: New file.
4611         * gnulib/import/m4/getcwd.m4: New file.
4612         * gnulib/import/m4/getdtablesize.m4: New file.
4613         * gnulib/import/m4/getlogin_r.m4: New file.
4614         * gnulib/import/m4/getprogname.m4: New file.
4615         * gnulib/import/m4/glob.m4: New file.
4616         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4617         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4618         * gnulib/import/m4/mempcpy.m4: New file.
4619         * gnulib/import/m4/memrchr.m4: New file.
4620         * gnulib/import/m4/mode_t.m4: New file.
4621         * gnulib/import/m4/msvc-inval.m4: New file.
4622         * gnulib/import/m4/msvc-nothrow.m4: New file.
4623         * gnulib/import/m4/open.m4: New file.
4624         * gnulib/import/m4/openat.m4: New file.
4625         * gnulib/import/m4/opendir.m4: New file.
4626         * gnulib/import/m4/readdir.m4: New file.
4627         * gnulib/import/m4/realloc.m4: New file.
4628         * gnulib/import/m4/rewinddir.m4: New file.
4629         * gnulib/import/m4/save-cwd.m4: New file.
4630         * gnulib/import/m4/strdup.m4: New file.
4631         * gnulib/import/m4/strerror.m4: New file.
4632         * gnulib/import/m4/unistd-safer.m4: New file.
4633         * gnulib/import/mempcpy.c: New file.
4634         * gnulib/import/memrchr.c: New file.
4635         * gnulib/import/msvc-inval.c: New file.
4636         * gnulib/import/msvc-inval.h: New file.
4637         * gnulib/import/msvc-nothrow.c: New file.
4638         * gnulib/import/msvc-nothrow.h: New file.
4639         * gnulib/import/open.c: New file.
4640         * gnulib/import/openat-die.c: New file.
4641         * gnulib/import/openat-priv.h: New file.
4642         * gnulib/import/openat-proc.c: New file.
4643         * gnulib/import/openat.c: New file.
4644         * gnulib/import/openat.h: New file.
4645         * gnulib/import/opendir.c: New file.
4646         * gnulib/import/pipe-safer.c: New file.
4647         * gnulib/import/readdir.c: New file.
4648         * gnulib/import/realloc.c: New file.
4649         * gnulib/import/rewinddir.c: New file.
4650         * gnulib/import/save-cwd.c: New file.
4651         * gnulib/import/save-cwd.h: New file.
4652         * gnulib/import/strdup.c: New file.
4653         * gnulib/import/strerror-override.c: New file.
4654         * gnulib/import/strerror-override.h: New file.
4655         * gnulib/import/strerror.c: New file.
4656         * gnulib/import/unistd--.h: New file.
4657         * gnulib/import/unistd-safer.h: New file.
4658         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4659         "getcwd" and "glob".
4660         * ser-tcp.c: Undefine "close" before redefining it.
4661
4662 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4663
4664         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4665         get rid of res_val.
4666
4667 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4668
4669         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4670         <sol2,sparc>: Likewise.
4671         <sol2-64,i386>: Likewise.
4672
4673         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4674         -Wdeprecated-declarations on *-*-solaris*.
4675         * configure: Regenerate.
4676
4677         * procfs.c: Include "nat/inferior.h".
4678         (procfs_info_proc): Fix typo.
4679
4680 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4681
4682         * remote.c (vector): Include.
4683         (struct private_thread_info): Add field, thread_handle.
4684         (free_private_thread_info): Deallocate storage associated with
4685         thread handle.
4686         (get_private_info_thread): Initialize `thread_handle' field.
4687         (struct thread_item): Add field, thread_handle.
4688         (clear_threads_listing_context): Deallocate storage associated
4689         with thread handle.
4690         (start_thread): Add support for "handle" attribute.
4691         (thread_attributes): Add "handle".
4692         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4693         field.
4694         (remote_update_thread_list): Update thread_handle.
4695         (remote_thread_handle_to_thread_info): New function.
4696         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4697
4698 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4699
4700         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4701         function.
4702         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4703         * python/python-internal.h (thread_object_type): Declare.
4704
4705 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4706
4707         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4708         (target_thread_handle_to_thread_info): Declare.
4709         * target.c (target_thread_handle_to_thread_info): New function.
4710         * target-delegates.c: Regenerate.
4711         * gdbthread.h (find_thread_by_handle): Declare.
4712         * thread.c (find_thread_by_handle): New function.
4713         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4714         function.
4715         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4716
4717 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4718
4719         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4720
4721 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4722
4723         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4724
4725 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4726
4727         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4728         to gdb_target_obs.
4729
4730 2017-09-20  Tom Tromey  <tom@tromey.com>
4731
4732         * breakpoint.c (struct counted_command_line): Remove.
4733         (breakpoint_commands): Update.
4734         (alloc_counted_command_line, incref_counted_command_line)
4735         (decref_counted_command_line, do_cleanup_counted_command_line)
4736         (make_cleanup_decref_counted_command_line): Remove.
4737         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4738         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4739         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4740         (save_breakpoints): Update.
4741         * breakpoint.h (counted_command_line): Now a typedef to
4742         shared_ptr.
4743         (struct breakpoint) <commands>: Now a counted_command_line.
4744         (struct bpstats) <command>: Likewise.
4745
4746 2017-09-20  Tom Tromey  <tom@tromey.com>
4747
4748         * breakpoint.c (struct commands_info, do_map_commands_command):
4749         Remove.
4750         (commands_command_1): Update.
4751         (iterate_over_related_breakpoints): Take a function_view.
4752         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4753         (delete_command): Update.
4754         (map_breakpoint_numbers): Take a function_view.
4755         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4756         (disable_command): Update.
4757         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4758         (enable_command): Update.
4759         (struct disp_data, do_enable_breakpoint_disp)
4760         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4761         (do_map_enable_delete_breakpoint): Remove.
4762         (enable_once_command, enable_count_command, enable_delete_command)
4763         (delete_trace_variable_command): Update.
4764
4765 2017-09-20  Tom Tromey  <tom@tromey.com>
4766
4767         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4768         (bpstat_clear): Use delete.
4769         (bpstats): New constructors.
4770         (bpstat_copy, bpstat_stop_status): Use new.
4771         (dprintf_after_condition_true): Update.
4772         * breakpoint.h (bpstats::bpstats): Add constructors.
4773         (bpstats::~bpstats): Add destructor.
4774
4775 2017-09-20  Pedro Alves  <palves@redhat.com>
4776
4777         * eval.c (make_params): Delete, refactored as ...
4778         (class fake_method): ... this new type's ctor.
4779         (fake_method::~fake_method): New.
4780         (evaluate_subexp_standard): Use 'fake_method'.
4781
4782 2017-09-20  Tom Tromey  <tom@tromey.com>
4783
4784         * windows-nat.c (get_windows_debug_event, windows_wait)
4785         (do_initial_windows_stuff, windows_attach): Update.
4786         * utils.c (vwarning, internal_vproblem): Update.
4787         (ui_unregister_input_event_handler_cleanup)
4788         (prepare_to_handle_input): Remove.
4789         (class scoped_input_handler): New.
4790         (defaulted_query, prompt_for_continue): Update.
4791         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4792         Update.
4793         * top.c (undo_terminal_modifications_before_exit): Update.
4794         * target/target.h (target_terminal_init, target_terminal_inferior)
4795         (target_terminal_ours): Don't declare.
4796         (class target_terminal): New.
4797         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4798         (target_terminal_ours_for_output)
4799         (make_cleanup_restore_target_terminal): Don't declare.
4800         (target_terminal_info): Remove.
4801         * target.c (enum terminal_state, terminal_state): Remove.
4802         (target_terminal::terminal_state): Define.
4803         (target_terminal::init): Rename from target_terminal_init.
4804         (target_terminal::inferior): Rename from
4805         target_terminal_inferior.
4806         (target_terminal::ours): Rename from target_terminal_ours.
4807         (target_terminal::ours_for_output): Rename from
4808         target_terminal_ours_for_output.
4809         (target_terminal::info): New method.
4810         (cleanup_restore_target_terminal)
4811         (make_cleanup_restore_target_terminal): Remove.
4812         * solib.c (handle_solib_event): Update.
4813         * remote.c (remote_serial_quit_handler): Update.
4814         (remote_terminal_inferior, remote_wait_as): Update.
4815         * record-full.c (record_full_wait_1): Update.
4816         * nto-procfs.c (procfs_create_inferior): Update.
4817         * nat/fork-inferior.c (startup_inferior): Update.
4818         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4819         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4820         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4821         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4822         (mi_breakpoint_created, mi_breakpoint_deleted)
4823         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4824         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4825         (mi_user_selected_context_changed, report_initial_inferior):
4826         Update.
4827         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4828         (linux_nat_terminal_inferior): Update.
4829         * infrun.c (follow_fork_inferior)
4830         (handle_vfork_child_exec_or_exit, do_target_resume)
4831         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4832         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4833         Update.
4834         * inflow.c (child_terminal_init, info_terminal_command): Update.
4835         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4836         (attach_command): Update.
4837         * infcall.c (call_thread_fsm_should_stop): Update.
4838         * gnu-nat.c (gnu_attach): Update.
4839         * extension.c (struct active_ext_lang_state)
4840         (restore_active_ext_lang): Update.
4841         * exceptions.c (print_flush): Update.
4842         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4843         (struct quit_handler_cleanup_data, restore_quit_handler)
4844         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4845         Remove.
4846         * cp-support.c (gdb_demangle): Update.
4847         * breakpoint.c (update_inserted_breakpoint_locations)
4848         (insert_breakpoint_locations, handle_jit_event)
4849         (disable_breakpoints_in_unloaded_shlib): Update.
4850         * annotate.c (annotate_breakpoints_invalid)
4851         (annotate_frames_invalid): Update.
4852
4853 2017-09-20  Tom Tromey  <tom@tromey.com>
4854
4855         * main.c (catch_command_errors): Rename from
4856         catch_command_errors_const.
4857         (captured_main_1): Update.
4858
4859 2017-09-20  Pedro Alves  <palves@redhat.com>
4860
4861         * cli/cli-cmds.c (list_command): Use print_sal_location.
4862         (print_sal_location): New function.
4863         (ambiguous_line_spec): Use print_sal_location.
4864         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4865         * symtab.c (find_function_start_sal): Likewise.
4866         * symtab.h (symtab_and_line::symbol): New field.
4867
4868 2017-09-20  Pedro Alves  <palves@redhat.com>
4869
4870         * linespec.c (minsym_found): Handle non-text minsyms.
4871         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4872
4873 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4874
4875         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4876         backslash.
4877
4878 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4879
4880         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4881         vmovups instead vmovaps.
4882         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4883
4884 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4885
4886         * NEWS (Changes since GDB 8.0): Add starti.
4887         * infcmd.c (enum run_break): New.
4888         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4889         case.
4890         (run_command): Use enum run_how.
4891         (start_command): Likewise.
4892         (starti_command): New function.
4893         (RUN_ARGS_HELP): New macro.
4894         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4895         commands.  Add starti command.
4896
4897 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4898
4899         * Makefile.in (monitor.o): Remove the rule.
4900
4901 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4902
4903         * annotate.h (struct annotate_arg_emitter): Use
4904         DISABLE_COPY_AND_ASSIGN.
4905         * common/refcounted-object.h (refcounted_object): Likewise.
4906         * completer.h (struct completion_result): Likewise.
4907         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4908         * filename-seen-cache.h (filename_seen_cache): Likewise.
4909         * gdbcore.h (thread_section_name): Likewise.
4910         * gdb_regex.h (compiled_regex): Likewise.
4911         * gdbthread.h (scoped_restore_current_thread): Likewise.
4912         * inferior.h (scoped_restore_current_inferior): Likewise.
4913         * jit.c (jit_reader): Likewise.
4914         * linespec.h (struct linespec_result): Likewise.
4915         * mi/mi-parse.h (struct mi_parse): Likewise.
4916         * nat/fork-inferior.c (execv_argv): Likewise.
4917         * progspace.h (scoped_restore_current_program_space): Likewise.
4918         * python/python-internal.h (class gdbpy_enter): Likewise.
4919         * regcache.h (regcache): Likewise.
4920         * target-descriptions.c (struct tdesc_reg): Likewise.
4921         (struct tdesc_type): Likewise.
4922         (struct tdesc_feature): Likewise.
4923         * ui-out.h (ui_out_emit_type): Likewise.
4924
4925 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4926
4927         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4928         label abort_expression.
4929
4930 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4931
4932         * common/buffer.c (buffer_xml_printf): Adjust.
4933         * common/xml-utils.c (xml_escape_text): Change return type to
4934         std::string, update code accordingly.
4935         * common/xml-utils.h (xml_escape_text): Change return type to
4936         std::string.
4937         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4938         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4939         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4940         Adjust.
4941
4942 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4943
4944         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4945         (SUBDIR_UNITTESTS_OBS): Add new object file.
4946         * unittests/xml-utils-selftests.c: New file.
4947
4948 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4949
4950         * common/selftest.h (selftest): New struct/interface.
4951         (register_test): Add name parameter, add new overload.
4952         (run_tests): Add filter parameter.
4953         (for_each_selftest_ftype): New typedef.
4954         (for_each_selftest): New declaration.
4955         * common/selftest.c (tests): Change type to
4956         map<string, unique_ptr<selftest>>.
4957         (simple_selftest): New struct.
4958         (register_test): New function.
4959         (register_test): Add name parameter and use it.
4960         (run_tests): Add filter parameter and use it.  Add prints.
4961         Adjust to vector -> map change.
4962         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4963         registering selftests.
4964         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4965         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4966         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4967         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4968         * findvar.c (_initialize_findvar): Likewise.
4969         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4970         * maint.c (maintenance_selftest): Update call to run_tests.
4971         (maintenance_info_selftests): New function.
4972         (_initialize_maint_cmds): Register "maintenance info selftests"
4973         command.  Update "maintenance selftest" doc.
4974         * regcache.c (_initialize_regcache): Add names when registering
4975         selftests.
4976         * rust-exp.y (_initialize_rust_exp): Likewise.
4977         * selftest-arch.c (gdbarch_selftest): New struct.
4978         (gdbarch_tests): Remove.
4979         (register_test_foreach_arch): Add name parameter.  Call
4980         register_test.
4981         (tests_with_arch): Remove, move most content to
4982         gdbarch_selftest::operator().
4983         (_initialize_selftests_foreach_arch): Remove.
4984         * selftest-arch.h (register_test_foreach_arch): Add name
4985         parameter.
4986         (run_tests_with_arch): New declaration.
4987         * utils-selftests.c (_initialize_utils_selftests): Add names
4988         when registering selftests.
4989         * utils.c (_initialize_utils): Likewise.
4990         * unittests/array-view-selftests.c
4991         (_initialize_array_view_selftests): Likewise.
4992         * unittests/environ-selftests.c (_initialize_environ_selftests):
4993         Likewise.
4994         * unittests/function-view-selftests.c
4995         (_initialize_function_view_selftests): Likewise.
4996         * unittests/offset-type-selftests.c
4997         (_initialize_offset_type_selftests): Likewise.
4998         * unittests/optional-selftests.c
4999         (_initialize_optional_selftests): Likewise.
5000         * unittests/scoped_restore-selftests.c
5001         (_initialize_scoped_restore_selftests): Likewise.
5002         * NEWS: Document "maintenance selftest" and "maint info
5003         selftests".
5004
5005 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5006
5007         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5008         scoped_restore.
5009
5010 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5011
5012         * mi/mi-main.c (mi_load_progress): Make uiout variable
5013         a unique_ptr.
5014
5015 2017-09-15  Pedro Alves  <palves@redhat.com>
5016
5017         * compile/compile-c-types.c (convert_enum, convert_int)
5018         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5019
5020 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5021
5022         * dwarf2read.c (copy_string): Remove.
5023         (parse_macro_definition): Replace copy_string with savestring.
5024
5025 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5026
5027         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5028         gdb_target_obs.
5029         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5030         Likewise.
5031         (i[34567]86-*-linux*): Likewise.
5032
5033 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5034
5035         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5036         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5037         <stack>: Change type to std::vector.
5038         <stack_len, stack_allocated>: Remove.
5039         <grow_stack>: Remove.
5040         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5041         (dwarf_expr_context::~dwarf_expr_context): Remove.
5042         (dwarf_expr_context::grow_stack): Remove.
5043         (dwarf_expr_context::push): Adjust.
5044         (dwarf_expr_context::pop): Adjust.
5045         (dwarf_expr_context::fetch): Adjust.
5046         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5047         (dwarf_expr_context::stack_empty_p): Adjust.
5048         (dwarf_expr_context::execute_stack_op): Adjust.
5049
5050 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5051
5052         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5053         return type to bool.
5054         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5055
5056 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5057
5058         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5059         Change type to bool.
5060         (dwarf_stack_value) <in_stack_memory>: Likewise.
5061         (dwarf_expr_context) <push_address>: Change parameter type to
5062         bool.
5063         <fetch_in_stack_memory>: Change return type to bool.
5064         <push>: Change parameter type to bool.
5065         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5066         to bool.
5067         (dwarf_expr_context::push_address): Likewise.
5068         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5069         to bool.
5070         (dwarf_expr_context::execute_stack_op): Adjust.
5071         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5072
5073 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5074
5075         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5076         (struct dwarf_expr_context) <n_pieces>: Remove.
5077         <pieces>: Change type to std::vector.
5078         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5079         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5080         pieces.
5081         (dwarf_expr_context::add_piece): Adjust.
5082         * dwarf2loc.c (struct piece_closure): Initialize fields.
5083         <n_pieces>: Remove.
5084         <pieces>: Change type to std::vector.
5085         (allocate_piece_closure): Adjust, change parameter to
5086         std::vector rvalue and std::move it to piece_closure.
5087         (rw_pieced_value): Adjust.
5088         (check_pieced_synthetic_pointer): Adjust.
5089         (indirect_synthetic_pointer): Adjust.
5090         (coerce_pieced_ref): Adjust.
5091         (free_pieced_value_closure):  Adjust.  Use delete to free
5092         piece_closure.
5093         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5094         to allocate_piece_closure.
5095         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5096
5097 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5098
5099         * probe.h (probe_ops_cp): Remove typedef.
5100         (DEF_VEC_P (probe_ops_cp)): Remove.
5101         (all_probe_ops): Change type to std::vector.
5102         * probe.c (info_probes_for_ops): Adjust to vector change.
5103         (probe_linespec_to_ops): Likewise.
5104         (all_probe_ops): Change type to std::vector.
5105         (_initialize_probe): Adjust to vector change.
5106         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5107         * elfread.c (elf_get_probes): Likewise.
5108         * stap-probe.c (_initialize_stap_probe): Likewise.
5109
5110 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5111
5112         * probe.h (struct bound_probe): Define constructors.
5113         * probe.c (bound_probe_s): Remove typedef.
5114         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5115         (collect_probes): Change return type to std::vector, remove
5116         cleanup.
5117         (compare_probes): Return bool, change parameter type.  Change
5118         semantic to "less than".
5119         (gen_ui_out_table_header_info): Change parameter to std::vector
5120         and update.
5121         (exists_probe_with_pops): Likewise.
5122         (info_probes_for_ops): Update to std::vector change.
5123         (enable_probes_command): Likewise.
5124         (disable_probes_command): Likewise.
5125
5126 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5127
5128         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5129         vec to std::vector.
5130         * probe.c (parse_probes_in_pspace): Update.
5131         (find_probes_in_objfile): Update.
5132         (find_probe_by_pc): Update.
5133         (collect_probes): Update.
5134         (probe_any_get_probes): Update.
5135         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5136         return type to reference to std::vector.
5137         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5138         std::vector and update.
5139         (dtrace_process_dof): Likewise.
5140         (dtrace_get_probes): Likewise.
5141         * elfread.c (elf_get_probes): Change return type to std::vector,
5142         store an std::vector in bfd_data.
5143         (probe_key_free): Update to std::vector.
5144         * stap-probe.c (handle_stap_probe): Change parameter to
5145         std::vector and update.
5146         (stap_get_probes): Likewise.
5147         * symfile-debug.c (debug_sym_get_probes): Change return type to
5148         std::vector and update.
5149
5150 2017-09-11  Tom Tromey  <tom@tromey.com>
5151
5152         * breakpoint.c (program_breakpoint_here_p): Update.
5153         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5154         from make_show_memory_breakpoints_cleanup.  Return a
5155         scoped_restore_tmpl<int>.
5156         (restore_show_memory_breakpoints): Remove.
5157         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5158         * mem-break.c (memory_validate_breakpoint): Update.
5159         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5160         (ia64_memory_remove_breakpoint): Update.
5161         (ia64_breakpoint_from_pc): Update.
5162         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5163         from make_show_memory_breakpoints_cleanup.
5164
5165 2017-09-11  Tom Tromey  <tom@tromey.com>
5166
5167         * d-namespace.c (d_lookup_symbol): Use std::string.
5168         (find_symbol_in_baseclass): Likewise.
5169
5170 2017-09-11  Tom Tromey  <tom@tromey.com>
5171
5172         * ctf.c (ctf_start): Use std::string.
5173
5174 2017-09-11  Tom Tromey  <tom@tromey.com>
5175
5176         * ada-lang.c (is_known_support_routine): Update.
5177         (ada_unhandled_exception_name_addr_from_raise): Update.
5178         * guile/scm-frame.c (gdbscm_frame_name): Update.
5179         * python/py-frame.c (frapy_name): Update.
5180         (frapy_function): Update.
5181         * stack.h (find_frame_funname): Update.
5182         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5183         (print_frame): Update.
5184
5185 2017-09-11  Tom Tromey  <tom@tromey.com>
5186
5187         * findcmd.c (put_bits): Take a gdb::byte_vector.
5188         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5189         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5190         cleanups.
5191         (find_command): Update.
5192
5193 2017-09-11  Tom Tromey  <tom@tromey.com>
5194
5195         * cli/cli-script.c (class scoped_restore_hook_in): New.
5196         (clear_hook_in_cleanup): Remove.
5197         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5198         scoped_restore_hook_in.
5199
5200 2017-09-11  Tom Tromey  <tom@tromey.com>
5201
5202         * cli/cli-script.c (restore_interp): Remove.
5203         (read_command_lines): Use scoped_restore_interp.
5204         * interps.c (scoped_restore_interp::set_temp): Rename from
5205         interp_set_temp.
5206         * interps.h (class scoped_restore_interp): New.
5207         (interp_set_temp): Remove.
5208
5209 2017-09-11  Tom Tromey  <tom@tromey.com>
5210
5211         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5212         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5213         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5214         scoped_restore.
5215         (mi_cmd_break_insert_1): Update.
5216         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5217         scoped_restore.
5218
5219 2017-09-11  Tom Tromey  <tom@tromey.com>
5220
5221         * demangle.c (demangle_command): Update.
5222         * breakpoint.c (disable_command): Update.
5223         (enable_command): Update.
5224         (find_location_by_number): Make "number" const.  Use
5225         get_number_trailer.
5226         * cli/cli-utils.c (extract_arg): Return std::string.
5227         * probe.c (parse_probe_linespec): Update.  Change types.
5228         (collect_probes): Take string arguments.
5229         (parse_probe_linespec): Likewise.
5230         (info_probes_for_ops): Update.
5231         (enable_probes_command): Update.
5232         (disable_probes_command): Update.
5233         * break-catch-sig.c (catch_signal_split_args): Update.
5234         * mi/mi-parse.c (mi_parse): Update.
5235
5236 2017-09-11  Tom Tromey  <tom@tromey.com>
5237
5238         * language.h (language_enum): Make argument const.
5239         * language.c (language_enum): Make argument const.
5240
5241 2017-09-11  Tom Tromey  <tom@tromey.com>
5242
5243         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5244         as function.
5245         (skip_to_space): Rename from skip_to_space_const.
5246         * common/common-utils.c (skip_to_space): New function.
5247         (skip_to_space): Rename from skip_to_space_const.
5248         * cli/cli-utils.h (get_number): Rename from get_number_const.
5249         (extract_arg): Rename from extract_arg_const.
5250         * cli/cli-utils.c (get_number): Rename from get_number_const.
5251         (extract_arg): Rename from extract_arg_const.
5252         (number_or_range_parser::get_number): Use ::get_number.
5253         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5254         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5255         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5256         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5257         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5258         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5259         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5260         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5261
5262 2017-09-11  Tom Tromey  <tom@tromey.com>
5263
5264         * python/python.c (do_start_initialization): Use
5265         py-event-types.def to initialize types.
5266         Define all object type structures.
5267         * python/python-internal.h: Don't declare event initialization
5268         functions.
5269         * python/py-threadevent.c (thread_event_object_type): Don't
5270         define.
5271         * python/py-stopevent.c (stop_event_object_type): Don't define.
5272         * python/py-signalevent.c (signal_event_object_type): Don't
5273         declare or define.
5274         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5275         (clear_objfiles_event_object_type): Don't declare or define.
5276         * python/py-infevents.c (inferior_call_pre_event_object_type)
5277         (inferior_call_post_event_object_type)
5278         (register_changed_event_object_type)
5279         (memory_changed_event_object_type): Don't declare or define.
5280         * python/py-inferior.c (new_thread_event_object_type)
5281         (new_inferior_event_object_type)
5282         (inferior_deleted_event_object_type): Don't declare or define.
5283         * python/py-exitedevent.c (exited_event_object_type): Don't
5284         declare or define.
5285         * python/py-evts.c (gdbpy_initialize_py_events): Use
5286         py-all-events.def.
5287         * python/py-events.h (thread_event_object_type): Don't declare.
5288         (events_object): Use py-all-events.def.
5289         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5290         py-event-types.def.
5291         * python/py-event-types.def: New file.
5292         * python/py-continueevent.c (create_continue_event_object): Don't
5293         declare or define.
5294         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5295         declare or define.
5296         * python/py-all-events.def: New file.
5297
5298 2017-09-11  Tom Tromey  <tom@tromey.com>
5299
5300         * python/py-threadevent.c (create_thread_event_object): Return
5301         gdbpy_ref.
5302         * python/py-stopevent.h (create_stop_event_object)
5303         (create_breakpoint_event_object, create_signal_event_object):
5304         Update.
5305         * python/py-stopevent.c (create_stop_event_object): Return
5306         gdbpy_ref.
5307         (emit_stop_event): Update.
5308         * python/py-signalevent.c (create_signal_event_object): Return
5309         gdbpy_ref.
5310         * python/py-infevents.c (create_inferior_call_event_object):
5311         Update.
5312         * python/py-event.h (create_event_object)
5313         (create_thread_event_object): Update.
5314         * python/py-event.c (create_event_object): Return gdbpy_ref.
5315         * python/py-continueevent.c: Return gdbpy_ref.
5316         * python/py-bpevent.c (create_breakpoint_event_object): Return
5317         gdbpy_ref.
5318
5319 2017-09-11  Tom Tromey  <tom@tromey.com>
5320
5321         PR python/15622:
5322         * NEWS: Add entry.
5323         * python/python.c (do_start_initialization): Initialize new event
5324         types.
5325         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5326         (gdbpy_initialize_inferior_deleted_event)
5327         (gdbpy_initialize_new_thread_event): Declare.
5328         * python/py-threadevent.c (create_thread_event_object): Add option
5329         "thread" parameter.
5330         * python/py-inferior.c (new_thread_event_object_type)
5331         (new_inferior_event_object_type)
5332         (inferior_deleted_event_object_type): Declare.
5333         (python_new_inferior, python_inferior_deleted): New functions.
5334         (add_thread_object): Emit new_thread event.
5335         (gdbpy_initialize_inferior): Attach new functions to corresponding
5336         observers.
5337         (new_thread, new_inferior, inferior_deleted): Define new event
5338         types.
5339         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5340         registries.
5341         * python/py-events.h (events_object) <new_inferior,
5342         inferior_deleted, new_thread>: New fields.
5343         * python/py-event.h (create_thread_event_breakpoint): Add optional
5344         "thread" parameter.
5345
5346 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5347
5348         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5349         check current_ui instead.
5350         (internal_vproblem): Likewise.
5351
5352 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5353
5354         * thread.c (print_thread_info_1): Remove unnecessary calls to
5355         uiout->is_mi_like_p.
5356
5357 2017-09-09  Tom Tromey  <tom@tromey.com>
5358
5359         * namespace.h (add_using_directive): Update.
5360         * namespace.c (add_using_directive): Change type of excludes to
5361         std::vector.
5362         * dwarf2read.c (read_import_statement): Use std::vector.
5363         (read_namespace): Update.
5364         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5365
5366 2017-09-09  Tom Tromey  <tom@tromey.com>
5367
5368         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5369
5370 2017-09-09  Tom Tromey  <tom@tromey.com>
5371
5372         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5373
5374 2017-09-09  Tom Tromey  <tom@tromey.com>
5375
5376         * stack.c (func_command): Use gdb::def_vector.
5377
5378 2017-09-09  Tom Tromey  <tom@tromey.com>
5379
5380         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5381         ui_out_emit_list, ui_out_emit_tuple.
5382         (mi_cmd_var_update): Likewise.
5383
5384 2017-09-09  Tom Tromey  <tom@tromey.com>
5385
5386         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5387         ui_out_redirect_pop.
5388         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5389         ui_out_redirect_pop.
5390         * utils.c (do_ui_out_redirect_pop)
5391         (make_cleanup_ui_out_redirect_pop): Remove.
5392         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5393         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5394         * ui-out.h (ui_out_redirect_pop): New class.
5395
5396 2017-09-09  Tom Tromey  <tom@tromey.com>
5397
5398         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5399         (list_available_thread_groups, mi_cmd_list_thread_groups)
5400         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5401         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5402         Likewise.
5403
5404 2017-09-09  Tom Tromey  <tom@tromey.com>
5405
5406         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5407         ui_out_emit_tuple.
5408
5409 2017-09-09  Tom Tromey  <tom@tromey.com>
5410
5411         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5412         * stack.c (print_frame): Use ui_out_emit_tuple.
5413         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5414         (info_spu_mailbox_command, info_spu_dma_command)
5415         (info_spu_proxydma_command): Likewise.
5416         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5417         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5418         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5419         ui_out_emit_tuple.
5420         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5421
5422 2017-09-09  Tom Tromey  <tom@tromey.com>
5423
5424         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5425         (class ui_out_emit_table): Update comment.
5426         * ui-out.c (do_cleanup_table_end)
5427         (make_cleanup_ui_out_table_begin_end): Remove.
5428         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5429         (info_spu_dma_cmdlist): Likewise.
5430         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5431         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5432         ui_out_emit_table.
5433
5434 2017-09-09  Tom Tromey  <tom@tromey.com>
5435
5436         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5437         ui_out_emit_list, gdb::optional.
5438
5439 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5440
5441         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5442         prototype.
5443         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5444         prototype.
5445         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5446         prototype.
5447         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5448         * ada-exp.y: Remove _initialize_ada_exp prototype.
5449         * ada-lang.c: Remove _initialize_ada_language prototype.
5450         * ada-tasks.c: Remove _initialize_tasks prototype.
5451         * addrmap.c: Remove _initialize_addrmap prototype.
5452         * agent.c: Remove _initialize_agent prototype.
5453         * aix-thread.c: Remove _initialize_aix_thread prototype.
5454         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5455         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5456         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5457         prototype.
5458         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5459         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5460         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5461         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5462         prototype.
5463         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5464         prototype.
5465         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5466         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5467         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5468         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5469         prototype.
5470         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5471         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5472         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5473         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5474         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5475         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5476         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5477         prototype.
5478         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5479         prototype.
5480         * annotate.c: Remove _initialize_annotate prototype.
5481         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5482         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5483         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5484         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5485         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5486         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5487         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5488         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5489         prototype.
5490         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5491         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5492         * auto-load.c: Remove _initialize_auto_load prototype.
5493         * auxv.c: Remove _initialize_auxv prototype.
5494         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5495         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5496         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5497         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5498         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5499         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5500         prototype.
5501         * break-catch-throw.c: Remove _initialize_break_catch_throw
5502         prototype.
5503         * breakpoint.c: Remove _initialize_breakpoint prototype.
5504         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5505         * btrace.c: Remove _initialize_btrace prototype.
5506         * charset.c: Remove _initialize_charset prototype.
5507         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5508         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5509         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5510         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5511         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5512         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5513         * coffread.c: Remove _initialize_coffread prototype.
5514         * compile/compile.c: Remove _initialize_compile prototype.
5515         * complaints.c: Remove _initialize_complaints prototype.
5516         * completer.c: Remove _initialize_completer prototype.
5517         * copying.awk: Remove _initialize_copying prototype.
5518         * copying.c: Regenerate.
5519         * core-regset.c: Remove _initialize_core_regset prototype.
5520         * corefile.c: Remove _initialize_core prototype.
5521         * corelow.c: Remove _initialize_corelow prototype.
5522         * cp-abi.c: Remove _initialize_cp_abi prototype.
5523         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5524         * cp-support.c: Remove _initialize_cp_support prototype.
5525         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5526         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5527         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5528         * ctf.c: Remove _initialize_ctf prototype.
5529         * d-lang.c: Remove _initialize_d_language prototype.
5530         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5531         prototype.
5532         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5533         * dbxread.c: Remove _initialize_dbxread prototype.
5534         * dcache.c: Remove _initialize_dcache prototype.
5535         * demangle.c: Remove _initialize_demangler prototype.
5536         * disasm-selftests.c: Remove _initialize_disasm_selftests
5537         prototype.
5538         * disasm.c: Remove _initialize_disasm prototype.
5539         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5540         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5541         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5542         prototype.
5543         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5544         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5545         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5546         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5547         * elfread.c: Remove _initialize_elfread prototype.
5548         * exec.c: Remove _initialize_exec prototype.
5549         * extension.c: Remove _initialize_extension prototype.
5550         * f-lang.c: Remove _initialize_f_language prototype.
5551         * f-valprint.c: Remove _initialize_f_valprint prototype.
5552         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5553         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5554         * filesystem.c: Remove _initialize_filesystem prototype.
5555         * findcmd.c: Remove _initialize_mem_search prototype.
5556         * fork-child.c: Remove _initialize_fork_child prototype.
5557         * frame-base.c: Remove _initialize_frame_base prototype.
5558         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5559         * frame.c: Remove _initialize_frame prototype.
5560         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5561         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5562         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5563         * gcore.c: Remove _initialize_gcore prototype.
5564         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5565         * gdbarch.c: Regenerate.
5566         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5567         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5568         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5569         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5570         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5571         * go-lang.c: Remove _initialize_go_language prototype.
5572         * go32-nat.c: Remove _initialize_go32_nat prototype.
5573         * guile/guile.c: Remove _initialize_guile prototype.
5574         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5575         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5576         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5577         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5578         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5579         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5580         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5581         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5582         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5583         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5584         prototype.
5585         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5586         prototype.
5587         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5588         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5589         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5590         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5591         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5592         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5593         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5594         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5595         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5596         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5597         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5598         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5599         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5600         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5601         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5602         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5603         prototype.
5604         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5605         prototype.
5606         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5607         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5608         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5609         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5610         * infcall.c: Remove _initialize_infcall prototype.
5611         * infcmd.c: Remove _initialize_infcmd prototype.
5612         * inferior.c: Remove _initialize_inferiors prototype.
5613         * inflow.c: Remove _initialize_inflow prototype.
5614         * infrun.c: Remove _initialize_infrun prototype.
5615         * interps.c: Remove _initialize_interpreter prototype.
5616         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5617         * jit.c: Remove _initialize_jit prototype.
5618         * language.c: Remove _initialize_language prototype.
5619         * linux-fork.c: Remove _initialize_linux_fork prototype.
5620         * linux-nat.c: Remove _initialize_linux_nat prototype.
5621         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5622         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5623         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5624         * m2-lang.c: Remove _initialize_m2_language prototype.
5625         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5626         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5627         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5628         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5629         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5630         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5631         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5632         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5633         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5634         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5635         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5636         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5637         * machoread.c: Remove _initialize_machoread prototype.
5638         * macrocmd.c: Remove _initialize_macrocmd prototype.
5639         * macroscope.c: Remove _initialize_macroscope prototype.
5640         * maint.c: Remove _initialize_maint_cmds prototype.
5641         * mdebugread.c: Remove _initialize_mdebugread prototype.
5642         * memattr.c: Remove _initialize_mem prototype.
5643         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5644         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5645         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5646         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5647         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5648         * microblaze-linux-tdep.c: Remove
5649         _initialize_microblaze_linux_tdep prototype.
5650         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5651         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5652         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5653         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5654         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5655         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5656         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5657         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5658         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5659         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5660         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5661         prototype.
5662         * mipsread.c: Remove _initialize_mipsread prototype.
5663         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5664         prototype.
5665         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5666         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5667         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5668         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5669         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5670         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5671         prototype.
5672         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5673         * nto-procfs.c: Remove _initialize_procfs prototype.
5674         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5675         * objc-lang.c: Remove _initialize_objc_language prototype.
5676         * objfiles.c: Remove _initialize_objfiles prototype.
5677         * observer.c: Remove observer_test_first_notification_function,
5678         observer_test_second_notification_function,
5679         observer_test_third_notification_function, and
5680         _initialize_observer prototypes.
5681         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5682         * osabi.c: Remove _initialize_gdb_osabi prototype.
5683         * osdata.c: Remove _initialize_osdata prototype.
5684         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5685         * parse.c: Remove _initialize_parse prototype.
5686         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5687         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5688         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5689         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5690         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5691         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5692         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5693         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5694         * printcmd.c: Remove _initialize_printcmd prototype.
5695         * probe.c: Remove _initialize_probe prototype.
5696         * proc-api.c: Remove _initialize_proc_api prototype.
5697         * proc-events.c: Remove _initialize_proc_events prototype.
5698         * proc-service.c: Remove _initialize_proc_service prototype.
5699         * procfs.c: Remove _initialize_procfs prototype.
5700         * psymtab.c: Remove _initialize_psymtab prototype.
5701         * python/python.c: Remove _initialize_python prototype.
5702         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5703         * record-btrace.c: Remove _initialize_record_btrace prototype.
5704         * record-full.c: Remove _initialize_record_full prototype.
5705         * record.c: Remove _initialize_record prototype.
5706         * regcache.c: Remove _initialize_regcache prototype.
5707         * reggroups.c: Remove _initialize_reggroup prototype.
5708         * remote-notif.c: Remove _initialize_notif prototype.
5709         * remote-sim.c: Remove _initialize_remote_sim prototype.
5710         * remote.c: Remove _initialize_remote prototype.
5711         * reverse.c: Remove _initialize_reverse prototype.
5712         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5713         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5714         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5715         prototype.
5716         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5717         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5718         * rust-exp.y: Remove _initialize_rust_exp prototype.
5719         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5720         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5721         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5722         * score-tdep.c: Remove _initialize_score_tdep prototype.
5723         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5724         prototype.
5725         * ser-go32.c: Remove _initialize_ser_dos prototype.
5726         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5727         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5728         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5729         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5730         * serial.c: Remove _initialize_serial prototype.
5731         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5732         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5733         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5734         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5735         * skip.c: Remove _initialize_step_skip prototype.
5736         * sol-thread.c: Remove _initialize_sol_thread prototype.
5737         * solib-aix.c: Remove _initialize_solib_aix prototype.
5738         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5739         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5740         * solib-frv.c: Remove _initialize_frv_solib prototype.
5741         * solib-spu.c: Remove _initialize_spu_solib prototype.
5742         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5743         * solib-target.c: Remove _initialize_solib_target prototype.
5744         * solib.c: Remove _initialize_solib prototype.
5745         * source.c: Remove _initialize_source prototype.
5746         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5747         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5748         prototype.
5749         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5750         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5751         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5752         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5753         prototype.
5754         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5755         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5756         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5757         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5758         prototype.
5759         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5760         prototype.
5761         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5762         prototype.
5763         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5764         prototype.
5765         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5766         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5767         prototype.
5768         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5769         prototype.
5770         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5771         prototype.
5772         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5773         prototype.
5774         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5775         prototype.
5776         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5777         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5778         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5779         * stabsread.c: Remove _initialize_stabsread prototype.
5780         * stack.c: Remove _initialize_stack prototype.
5781         * stap-probe.c: Remove _initialize_stap_probe prototype.
5782         * std-regs.c: Remove _initialize_frame_reg prototype.
5783         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5784         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5785         * symfile.c: Remove _initialize_symfile prototype.
5786         * symmisc.c: Remove _initialize_symmisc prototype.
5787         * symtab.c: Remove _initialize_symtab prototype.
5788         * target-dcache.c: Remove _initialize_target_dcache prototype.
5789         * target-descriptions.c: Remove _initialize_target_descriptions
5790         prototype.
5791         * thread.c: Remove _initialize_thread prototype.
5792         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5793         prototype.
5794         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5795         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5796         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5797         prototype.
5798         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5799         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5800         * tracefile.c: Remove _initialize_tracefile prototype.
5801         * tracepoint.c: Remove _initialize_tracepoint prototype.
5802         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5803         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5804         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5805         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5806         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5807         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5808         * tui/tui.c: Remove _initialize_tui prototype.
5809         * typeprint.c: Remove _initialize_typeprint prototype.
5810         * user-regs.c: Remove _initialize_user_regs prototype.
5811         * utils.c: Remove _initialize_utils prototype.
5812         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5813         * valarith.c: Remove _initialize_valarith prototype.
5814         * valops.c: Remove _initialize_valops prototype.
5815         * valprint.c: Remove _initialize_valprint prototype.
5816         * value.c: Remove _initialize_values prototype.
5817         * varobj.c: Remove _initialize_varobj prototype.
5818         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5819         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5820         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5821         * windows-nat.c: Remove _initialize_windows_nat,
5822         _initialize_check_for_gdb_ini, and _initialize_loadable
5823         prototypes.
5824         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5825         * xcoffread.c: Remove _initialize_xcoffread prototype.
5826         * xml-support.c: Remove _initialize_xml_support prototype.
5827         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5828         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5829         prototype.
5830         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5831         prototype.
5832         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5833
5834 2017-09-08  Keith Seitz  <keiths@redhat.com>
5835
5836         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5837         field.
5838
5839 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5840
5841         * f-valprint.c (f_val_print): Remove check for one byte
5842         sized integers. Remove printing of character type.
5843
5844 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5845             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5846             Bernhard Heckel  <bernhard.heckel@intel.com>
5847
5848         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5849         to maintain proper indentation when printing pointers/refs.
5850
5851 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5852
5853         GDB 8.0.1 released.
5854
5855 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5856
5857         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5858
5859 2017-09-05  Tom Tromey  <tom@tromey.com>
5860
5861         * parse.c (funcall_chain): Now a std::vector.
5862         (start_arglist, end_arglist): Simplify.
5863         (free_funcalls): Remove.
5864         (parse_exp_in_context_1): Remove cleanup.
5865
5866 2017-09-05  Tom Tromey  <tom@tromey.com>
5867
5868         * go-exp.y (go_parse): Don't create a cleanup.
5869
5870 2017-09-05  Tom Tromey  <tom@tromey.com>
5871
5872         * d-exp.y (PrimaryExpression): Use std::string.
5873         (d_parse): Don't create a cleanup.
5874
5875 2017-09-05  Tom Tromey  <tom@tromey.com>
5876
5877         * utils.c (do_clear_parser_state): Remove.
5878         (make_cleanup_clear_parser_state): Remove.
5879         * p-exp.y (pascal_parse): Use scoped_restore.
5880         * m2-exp.y (m2_parse): Use scoped_restore.
5881         * f-exp.y (f_parse): Use scoped_restore.
5882         * d-exp.y (d_parse): Use scoped_restore.
5883         * c-exp.y (c_parse): Use scoped_restore.
5884         * ada-exp.y (ada_parse): Use scoped_restore.
5885         * utils.h (make_cleanup_clear_parser_state): Remove.
5886
5887 2017-09-06  Keith Seitz  <keiths@redhat.com>
5888
5889         * dwarf2read.c (dw2_linkage_name_attr): New function.
5890         (dw2_linkage_name): New function.
5891         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5892         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5893         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5894
5895 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5896
5897         * config/djgpp/djconfig.sh: Correct shell portability issue.
5898
5899 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5900
5901         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5902
5903 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5904
5905         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5906         * NEWS: Mention new FreeBSD/mips native configuration.
5907         * configure.host: Add aarch64*-*-freebsd*.
5908         * configure.nat: Likewise.
5909         * aarch64-fbsd-nat.c: New file.
5910
5911 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5912
5913         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5914         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5915         * NEWS: Mention new FreeBSD/aarch64 target.
5916         * configure.tgt: Add aarch64*-*-freebsd*.
5917         * aarch64-fbsd-tdep.c: New file.
5918         * aarch64-fbsd-tdep.h: New file.
5919
5920 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5921
5922         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5923
5924 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5925
5926         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5927         of TLS symbols.
5928
5929 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5930
5931         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5932         call.
5933
5934 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5935
5936         * infrun.c (follow_exec): Call add_thread after
5937         target_find_description.
5938
5939 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5940
5941         * infrun.c (handle_inferior_event_1): When exec'ing, read
5942         stop_pc after follow_exec.
5943
5944 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5945
5946         * remote.c (process_g_packet): Update error message.
5947
5948 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5949
5950         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5951         targets.
5952
5953 2017-09-05  Pedro Alves  <palves@redhat.com>
5954
5955         * eval.c (eval_call, evaluate_funcall): New functions, factored
5956         out from ...
5957         (evaluate_subexp_standard): ... this.
5958
5959 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5960
5961         * amd64-tdep.c (amd64_target_description): Create target
5962         descriptions.
5963         (_initialize_amd64_tdep): Don't call functions
5964         initialize_tdesc_amd64_*.  Add self tests.
5965         * arch/amd64.c (amd64_create_target_description): Add parameter
5966         is_linux.  Call set_tdesc_osabi if is_linux is true.
5967         * arch/amd64.h (amd64_create_target_description): Update the
5968         declaration.
5969         * arch/i386.c (i386_create_target_description): Add parameter
5970         is_linux.  Call set_tdesc_osabi if is_linux is true.
5971         * arch/i386.h (i386_create_target_description): Update
5972         declaration.
5973         * configure.tgt: Add i386.o to gdb_target_obs.
5974         * features/Makefile (XMLTOC): Remove i386/*.xml.
5975         * features/i386/amd64-avx-avx512.c: Remove.
5976         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5977         * features/i386/amd64-avx-mpx.c: Remove.
5978         * features/i386/amd64-avx.c: Remove.
5979         * features/i386/amd64-mpx.c: Remove.
5980         * features/i386/amd64.c: Remove.
5981         * features/i386/i386-avx-avx512.c: Remove.
5982         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5983         * features/i386/i386-avx-mpx.c: Remove.
5984         * features/i386/i386-avx.c: Remove.
5985         * features/i386/i386-mmx.c: Remove.
5986         * features/i386/i386-mpx.c: Remove.
5987         * features/i386/i386.c: Remove.
5988         * i386-tdep.c: Don't include features/i386/i386*.c., include
5989         target-descriptions.h and arch/i386.h.
5990         (i386_target_description): Create target descriptions.
5991         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5992         functions.  Do self tests.
5993
5994 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5995
5996         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5997         * features/i386/amd64-avx-avx512-linux.c: Removed.
5998         * features/i386/amd64-avx-linux.c: Removed.
5999         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6000         * features/i386/amd64-avx-mpx-linux.c: Removed.
6001         * features/i386/amd64-linux.c: Removed.
6002         * features/i386/amd64-mpx-linux.c: Removed.
6003         * features/i386/x32-avx-avx512-linux.c: Removed.
6004         * features/i386/x32-avx-linux.c: Removed.
6005         * features/i386/x32-linux.c: Removed.
6006
6007 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6008
6009         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6010         features/i386/*.c.
6011         (amd64_linux_read_description): Call
6012         amd64_create_target_description.
6013         * arch/amd64.c: New file.
6014         * arch/amd64.h: New file.
6015         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6016         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6017
6018 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6019
6020         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6021         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6022         (amd64_linux_read_description): Create target descriptions.
6023         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6024         functions.  Add unit tests.
6025         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6026         x32-core.xml.
6027         * features/i386/64bit-avx.c: Generated.
6028         * features/i386/64bit-avx512.c: Generated.
6029         * features/i386/64bit-core.c: Generated.
6030         * features/i386/64bit-linux.c: Generated.
6031         * features/i386/64bit-mpx.c: Generated.
6032         * features/i386/64bit-pkeys.c: Generated.
6033         * features/i386/64bit-segments.c: Generated.
6034         * features/i386/64bit-sse.c: Generated.
6035         * features/i386/x32-core.c: Generated.
6036         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6037         c files for amd64-linux and x32-linux.
6038
6039 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6040
6041         * amd64-linux-tdep.c (amd64_linux_read_description): New
6042         function.
6043         (amd64_linux_core_read_description): Call
6044         amd64_linux_read_description.
6045         (amd64_linux_init_abi): Likewise.
6046         (amd64_x32_linux_init_abi): Likewise.
6047         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6048         * x86-linux-nat.c (x86_linux_read_description): Call
6049         amd64_linux_read_description.
6050
6051 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6052
6053         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6054         comments.
6055
6056 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6057
6058         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6059         * features/i386/i386-avx-avx512-linux.c: Remove.
6060         * features/i386/i386-avx-linux.c: Remove.
6061         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6062         * features/i386/i386-avx-mpx-linux.c: Remove.
6063         * features/i386/i386-linux.c: Remove.
6064         * features/i386/i386-mmx-linux.c: Remove.
6065         * features/i386/i386-mpx-linux.c: Remove.
6066
6067 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6068
6069         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6070         (SFILES): Add arch/i386.c.
6071         (HFILES_NO_SRCDIR): Add arch/i386.h.
6072         * arch/i386.c: New file.
6073         * arch/i386.h: New file.
6074         * arch/tdesc.h (allocate_target_description): Declare.
6075         (set_tdesc_architecture): Declare.
6076         (set_tdesc_osabi): Declare.
6077         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6078         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6079         include arch/i386.h.
6080         (i386_linux_read_description): Remove code and call
6081         i386_create_target_description.
6082         (set_tdesc_architecture): New function.
6083         (set_tdesc_osabi): New function.
6084         * target-descriptions.h (allocate_target_description): Remove.
6085
6086 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6087
6088         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6089         * target-descriptions.c (tdesc_create_feature): Likewise, and
6090         adjust code.
6091         * features/i386/32bit-avx.c: Re-generated.
6092         * features/i386/32bit-avx512.c: Re-generated.
6093         * features/i386/32bit-core.c: Re-generated.
6094         * features/i386/32bit-linux.c: Re-generated.
6095         * features/i386/32bit-mpx.c: Re-generated.
6096         * features/i386/32bit-pkeys.c: Re-generated.
6097         * features/i386/32bit-sse.c: Re-generated.
6098
6099 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6100
6101         * regformats/regdef.h (struct reg): Override operator == and !=.
6102
6103 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6104
6105         * arch/tdesc.h: New file.
6106         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6107         * target-descriptions.c: Update comments.
6108         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6109         declarations.
6110         * features/i386/32bit-avx.c: Re-generated.
6111         * features/i386/32bit-avx512.c: Re-generated.
6112         * features/i386/32bit-core.c: Re-generated.
6113         * features/i386/32bit-linux.c: Re-generated.
6114         * features/i386/32bit-mpx.c: Re-generated.
6115         * features/i386/32bit-pkeys.c: Re-generated.
6116         * features/i386/32bit-sse.c: Re-generated.
6117
6118 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6119
6120         * regformats/regdat.sh: Update generated code.
6121
6122 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6123
6124         * regformats/regdat.sh: Adjust code order.
6125
6126 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6127
6128         * expprint.c (dump_subexp_body_standard): Use constant format
6129         string in fprintf_filtered call.
6130
6131 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6132
6133         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6134         NetBSD/i386.
6135         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6136
6137 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6138
6139         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6140
6141 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6142
6143         * bsd-kvm.o: Define _KMEMUSER.
6144         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6145         * configure: Regenerate.
6146
6147 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6148
6149         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6150         * i386-fbsd-nat.c: Likewise.
6151
6152 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6153
6154         * unittests/array-view-selftests.c: Add include of <array>.
6155
6156 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6157
6158         * spu-tdep.c (flush_ea_cache): Add missing argument to
6159         call_function_by_hand.
6160
6161 2017-09-04  Pedro Alves  <palves@redhat.com>
6162
6163         * NEWS (Safer support for debugging with no debug info): New.
6164
6165 2017-09-04  Pedro Alves  <palves@redhat.com>
6166
6167         * c-exp.y (function_method, function_method_void): Add current
6168         instance flags to TYPE_INSTANCE.
6169         * dwarf2read.c (check_modifier): New.
6170         (compute_delayed_physnames): Assert that only C++ adds delayed
6171         physnames.  Mark fn_fields as const/volatile depending on
6172         physname.
6173         * eval.c (make_params): New type_instance_flags parameter.  Use
6174         it as the new type's instance flags.
6175         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6176         flags element and pass it to make_params.
6177         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6178         instance flags element.
6179         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6180         * gdbtypes.h: Include "enum-flags.h".
6181         (type_instance_flags): New enum-flags type.
6182         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6183         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6184         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6185         (follow_type_instance_flags): New function.
6186         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6187         * parser-defs.h (follow_type_instance_flags): Declare.
6188         * valops.c (value_struct_elt_for_reference): const/volatile must
6189         match too.
6190
6191 2017-09-04  Pedro Alves  <palves@redhat.com>
6192
6193         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6194         function/method scopes; lookup the nested name as a function local
6195         static variable.
6196
6197 2017-09-04  Pedro Alves  <palves@redhat.com>
6198
6199         (%type <voidval>): Add function_method.
6200         * c-exp.y (exp): New production for calls with no arguments.
6201         (function_method, function_method_void_or_typelist): New
6202         productions.
6203         (exp): New production for "method()::static_var".
6204         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6205         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6206         Handle OP_FUNC_STATIC_VAR.
6207         * parse.c (operator_length_standard):
6208         Handle OP_FUNC_STATIC_VAR.
6209
6210 2017-09-04  Pedro Alves  <palves@redhat.com>
6211
6212         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6213         handling.
6214         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6215         Ditto.
6216         * parse.c (operator_length_standard, operator_check_standard):
6217         Ditto.
6218         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6219
6220 2017-09-04  Pedro Alves  <palves@redhat.com>
6221
6222         * ax-gdb.c: Include "typeprint.h".
6223         (gen_expr_for_cast): New function.
6224         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6225         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6226         type is unknown.
6227         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6228         nodebug_data_symbol.
6229         * eval.c: Include "typeprint.h".
6230         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6231         Error out if symbol has unknown type.
6232         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6233         evaluate_subexp_for_cast.
6234         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6235         OP_VAR_MSYM_VALUE.
6236         (evaluate_subexp_for_cast): New function.
6237         * gdbtypes.c (init_nodebug_var_type): New function.
6238         (objfile_type): Use it to initialize types of variables with no
6239         debug info.
6240         * typeprint.c (error_unknown_type): New.
6241         * typeprint.h (error_unknown_type): New declaration.
6242         * compile/compile-c-types.c (convert_type_basic): Handle
6243         TYPE_CODE_ERROR; warn and fallback to int for variables with
6244         unknown type.
6245
6246 2017-09-04  Pedro Alves  <palves@redhat.com>
6247
6248         * eval.c (evaluate_var_value): New function, factored out from ...
6249         (evaluate_subexp_standard): ... here.
6250
6251 2017-09-04  Pedro Alves  <palves@redhat.com>
6252
6253         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6254         Remove useless assignments to 'op'.
6255
6256 2017-09-04  Pedro Alves  <palves@redhat.com>
6257
6258         * eval.c (eval_skip_value): New function.
6259         (evaluate_subexp_standard): Use it.
6260
6261 2017-09-04  Pedro Alves  <palves@redhat.com>
6262
6263         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6264         function name from symbol/minsym and pass it to
6265         error_call_unknown_return_type.
6266
6267 2017-09-04  Pedro Alves  <palves@redhat.com>
6268
6269         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6270         * ax-gdb.c (gen_msym_var_ref): New function.
6271         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6272         * eval.c (evaluate_var_msym_value): New function.
6273         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6274         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6275         to call_function_by_hand.
6276         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6277         Handle OP_VAR_MSYM_VALUE.
6278         (union exp_element) <msymbol>: New field.
6279         * minsyms.h (struct type): Forward declare.
6280         (find_minsym_type_and_address): Declare.
6281         * parse.c (write_exp_elt_msym): New function.
6282         (write_exp_msymbol): Delete, refactored as ...
6283         (find_minsym_type_and_address): ... this new function.
6284         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6285         (operator_length_standard, operator_check_standard): Handle
6286         OP_VAR_MSYM_VALUE.
6287         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6288
6289 2017-09-04  Pedro Alves  <palves@redhat.com>
6290
6291         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6292         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6293         unknown.
6294         * ada-typeprint.c (print_func_type): Handle functions with unknown
6295         return type.
6296         * c-typeprint.c (c_type_print_base): Handle functions and methods
6297         with unknown return type.
6298         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6299         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6300         * compile/compile-c-types.c: Include "objfiles.h".
6301         (convert_func): For functions with unknown return type, warn and
6302         default to int.
6303         * compile/compile-object-run.c (compile_object_run): Adjust call
6304         to call_function_by_hand_dummy.
6305         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6306         call_function_by_hand.
6307         * eval.c (evaluate_subexp_standard): Adjust calls to
6308         call_function_by_hand.  Handle functions and methods with unknown
6309         return type.  Pass expect_type to call_function_by_hand.
6310         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6311         return type.
6312         * gcore.c (call_target_sbrk): Adjust call to
6313         call_function_by_hand.
6314         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6315         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6316         an integer address type instead of nodebug.
6317         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6318         call_function_by_hand.
6319         * infcall.c (error_call_unknown_return_type): New function.
6320         (call_function_by_hand): New "default_return_type" parameter.
6321         Pass it down.
6322         (call_function_by_hand_dummy): New "default_return_type"
6323         parameter.  Use it instead of defaulting to int.  If there's no
6324         default and the return type is unknown, throw an error.  If
6325         there's a default return type, and the called function has no
6326         debug info, then assume the function is prototyped.
6327         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6328         New "default_return_type" parameter.
6329         (error_call_unknown_return_type): New declaration.
6330         * linux-fork.c (call_lseek): Cast return type of lseek.
6331         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6332         call_function_by_hand.
6333         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6334         calls to call_function_by_hand.
6335         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6336         return type.
6337         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6338         (value_nsstring, print_object_command): Adjust calls to
6339         call_function_by_hand.
6340         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6341         functions with unknown return type.
6342         (pascal_type_print_func_varspec_suffix): New function.
6343         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6344         TYPE_CODE_METHOD>: Use it.
6345         * python/py-value.c (valpy_call): Adjust call to
6346         call_function_by_hand.
6347         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6348         call_function_by_hand.
6349         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6350         call_function_by_hand.
6351         * valops.c (value_allocate_space_in_inferior): Adjust call to
6352         call_function_by_hand.
6353         * typeprint.c (type_print_unknown_return_type): New function.
6354         * typeprint.h (type_print_unknown_return_type): New declaration.
6355
6356 2017-09-04  Pedro Alves  <palves@redhat.com>
6357
6358         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6359         types with more than one parameter as prototyped.
6360
6361 2017-09-04  Pedro Alves  <palves@redhat.com>
6362
6363         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6364         (disassemble_command): Use gdb_disassembly_flags instead of bare
6365         int.
6366         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6367         (dump_insns, do_mixed_source_and_assembly_deprecated)
6368         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6369         Use gdb_disassembly_flags instead of bare int.
6370         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6371         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6372         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6373         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6374         (enum gdb_disassembly_flag): ... values of this new enumeration.
6375         (gdb_disassembly_flags): Define.
6376         (gdb_disassembly)
6377         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6378         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6379         gdb_disassembly_flags instead of bare int.
6380         * record-btrace.c (btrace_insn_history)
6381         (record_btrace_insn_history, record_btrace_insn_history_range)
6382         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6383         instead of bare int.
6384         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6385         Use gdb_disassembly_flags instead of bare int.
6386         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6387         Define.
6388         * target-delegates.c: Regenerate.
6389         * target.c (target_insn_history, target_insn_history_from)
6390         (target_insn_history_range): Use gdb_disassembly_flags instead of
6391         bare int.
6392         * target.h: Include "disasm.h".
6393         (struct target_ops) <to_insn_history, to_insn_history_from,
6394         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6395         int.
6396         (target_insn_history, target_insn_history_from)
6397         (target_insn_history_range): Use gdb_disassembly_flags instead of
6398         bare int.
6399
6400 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6401
6402         * cli/cli-script.c (build_command_line): For if/while commands,
6403         check whether args is empty.
6404
6405 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6406
6407         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6408         (enum command_control_type): Likewise.
6409         (struct command_line): Likewise.
6410         (free_command_lines): Likewise.
6411         (struct command_lines_deleter): Likewise.
6412         (command_line_up): Likewise.
6413         (read_command_lines): Likewise.
6414         (read_command_lines_1): Likewise.
6415         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6416         (enum command_control_type): Likewise.
6417         (struct command_line): Likewise.
6418         (free_command_lines): Likewise.
6419         (struct command_lines_deleter): Likewise.
6420         (command_line_up): Likewise.
6421         (read_command_lines): Likewise.
6422         (read_command_lines_1): Likewise.
6423         * breakpoint.h: Include cli/cli-script.h.
6424         * extension-priv.h: Likewise.
6425         * gdbcmd.h: Likewise.
6426
6427 2017-09-04  Pedro Alves  <palves@redhat.com>
6428
6429         * ada-lang.c (is_known_support_routine): Move sal declaration to
6430         where it is initialized.
6431         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6432         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6433         (clear_command, update_static_tracepoint): Remove init_sal
6434         references.  Move declarations closer to initializations.
6435         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6436         initializations.
6437         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6438         references.  Move sal declarations closer to initializations.
6439         * frame.c (find_frame_sal): Return a symtab_and_line via function
6440         return instead of output parameter.  Remove init_sal references.
6441         * frame.h (find_frame_sal): Return a symtab_and_line via function
6442         return instead of output parameter.
6443         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6444         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6445         instead of memset.
6446         (gdbscm_find_pc_line): Remove init_sal reference.
6447         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6448         references.  Move declarations closer to initializations.
6449         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6450         initializations.
6451         (finish_backward): Remove init_sal references.  Move declarations
6452         closer to initializations.
6453         * infrun.c (process_event_stop_test, handle_step_into_function)
6454         (insert_hp_step_resume_breakpoint_at_frame)
6455         (insert_step_resume_breakpoint_at_caller): Likewise.
6456         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6457         (symbol_to_sal): Likewise.
6458         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6459         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6460         to its initialization.
6461         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6462         init_sal references.  Move declarations closer to initializations.
6463         * source.c (get_current_source_symtab_and_line): Remove brace
6464         initialization.
6465         (set_current_source_symtab_and_line): Now takes the sal by const
6466         reference.  Remove brace initialization.
6467         (line_info): Remove init_sal reference.
6468         * source.h (set_current_source_symtab_and_line): Now takes a
6469         symtab_and_line via const reference.
6470         * stack.c (set_current_sal_from_frame): Adjust.
6471         (print_frame_info): Adjust.
6472         (get_last_displayed_sal): Return the sal via function return
6473         instead of via output parameter.  Simplify.
6474         (frame_info): Adjust.
6475         * stack.h (get_last_displayed_sal): Return the sal via function
6476         return instead of via output parameter.
6477         * symtab.c (init_sal): Delete.
6478         (find_pc_sect_line): Remove init_sal references.  Move
6479         declarations closer to initializations.
6480         (find_function_start_sal): Remove init_sal references.  Move
6481         declarations closer to initializations.
6482         * symtab.h (struct symtab_and_line): In-class initialize all
6483         fields.
6484         * tracepoint.c (set_traceframe_context)
6485         (print_one_static_tracepoint_marker): Remove init_sal references.
6486         Move declarations closer to initializations.
6487         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6488         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6489         declarations closer to initializations.
6490         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6491         init_sal references.  Adjust.
6492
6493 2017-09-04  Pedro Alves  <palves@redhat.com>
6494
6495         * ax-gdb.c (agent_command_1): Use range-for.
6496         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6497         * breakpoint.c: Include "common/array-view.h".
6498         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6499         parameter from struct symtabs_and_lines to
6500         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6501         (breakpoint_sals_to_pc): Change sals parameter from struct
6502         symtabs_and_lines to std::vector reference.
6503         (check_fast_tracepoint_sals): Change sals parameter from struct
6504         symtabs_and_lines to std::array_view.  Use range-for.
6505         (decode_static_tracepoint_spec): Return a std::vector instead of
6506         symtabs_and_lines.  Update.
6507         (create_breakpoint): Update.
6508         (break_range_command, until_break_command, clear_command): Update.
6509         (base_breakpoint_decode_location, bkpt_decode_location)
6510         (bkpt_probe_create_sals_from_location)
6511         (bkpt_probe_decode_location, tracepoint_decode_location)
6512         (tracepoint_probe_decode_location)
6513         (strace_marker_create_sals_from_location): Return a std::vector
6514         instead of symtabs_and_lines.
6515         (strace_marker_create_breakpoints_sal): Update.
6516         (strace_marker_decode_location): Return a std::vector instead of
6517         symtabs_and_lines.  Update.
6518         (update_breakpoint_locations): Change struct symtabs_and_lines
6519         parameters to gdb::array_view.  Adjust.
6520         (location_to_sals): Return a std::vector instead of
6521         symtabs_and_lines.  Update.
6522         (breakpoint_re_set_default): Use std::vector instead of struct
6523         symtabs_and_lines.
6524         (decode_location_default): Return a std::vector instead of
6525         symtabs_and_lines.  Update.
6526         * breakpoint.h: Include "common/array-view.h".
6527         (struct breakpoint_ops) <decode_location>: Now returns a
6528         std::vector instead of returning a symtabs_and_lines via output
6529         parameter.
6530         (update_breakpoint_locations): Change sals parameters to use
6531         gdb::array_view.
6532         * cli/cli-cmds.c (edit_command, list_command): Update to use
6533         std::vector and gdb::array_view.
6534         (ambiguous_line_spec): Adjust to use gdb::array_view and
6535         range-for.
6536         (compare_symtabs): Rename to ...
6537         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6538         const reference and adjust.
6539         (filter_sals): Rewrite using std::vector and standard algorithms.
6540         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6541         (jump_command): Update to use std::vector.
6542         * linespec.c (struct linespec_state) <canonical_names>: Update
6543         comment.
6544         (add_sal_to_sals_basic): Delete.
6545         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6546         (decode_line_2, create_sals_line_offset)
6547         (convert_address_location_to_sals, convert_linespec_to_sals)
6548         (convert_explicit_location_to_sals, parse_linespec)
6549         (event_location_to_sals, decode_line_full, decode_line_1)
6550         (decode_line_with_current_source)
6551         (decode_line_with_last_displayed, decode_objc)
6552         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6553         (linespec_result::~linespec_result): Adjust to use std::vector
6554         instead of symtabs_and_lines.
6555         * linespec.h (linespec_sals::sals): Now a std::vector.
6556         (struct linespec_result): Use std::vector, bool, and in-class
6557         initialization.
6558         (decode_line_1, decode_line_with_current_source)
6559         (decode_line_with_last_displayed): Return std::vector.
6560         * macrocmd.c (info_macros_command): Use std::vector.
6561         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6562         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6563         std::vector.
6564         * probe.h (parse_probes): Return a std::vector.
6565         * python/python.c (gdbpy_decode_line): Use std::vector and
6566         gdb::array_view.
6567         * source.c (select_source_symtab, line_info): Use std::vector.
6568         * stack.c (func_command): Use std::vector.
6569         * symtab.h (struct symtabs_and_lines): Delete.
6570         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6571
6572 2017-09-04  Pedro Alves  <palves@redhat.com>
6573
6574         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6575         unittests/array-view-selftests.c.
6576         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6577         * common/array-view.h: New file.
6578         * unittests/array-view-selftests.c: New file.
6579
6580 2017-09-04  Pedro Alves  <palves@redhat.com>
6581
6582         * cli/cli-cmds.c (edit_command): Pass message to
6583         ambiguous_line_spec.
6584         (list_command): Pass message to ambiguous_line_spec.  Say
6585         "first"/"last" instead of "start" and "end" to be consistent with
6586         the manual.
6587         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6588         them to print formatted message.
6589
6590 2017-09-04  Pedro Alves  <palves@redhat.com>
6591
6592         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6593         ftrace_update_insns by reference instead of pointer.
6594
6595 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6596
6597         * i386-go32-tdep.c: Include x86-xstate.h.
6598         (i386_go32_init_abi): Call i386_target_description.
6599         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6600         if xcr0 is X86_XSTATE_X87_MASK.
6601         * i386-tdep.h (tdesc_i386): Remove the declaration.
6602         (tdesc_i386_mmx): Likewise.
6603
6604 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6605
6606         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6607         X86_XSTATE_SSE_MASK instead of 0.
6608
6609 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6610
6611         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6612         i386_target_description.
6613         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6614         i386_target_description.
6615         * i386-tdep.c (i386_gdbarch_init): Likewise.
6616
6617 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6618
6619         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6620         (x86_darwin_init_abi_64): Call amd64_target_description.
6621         * amd64-dicos-tdep.c: Likewise.
6622         * amd64-fbsd-nat.c: Likewise.
6623         * amd64-fbsd-tdep.c: Likewise.
6624         * amd64-nbsd-tdep.c: Likewise.
6625         * amd64-obsd-tdep.c: Likewise.
6626         * amd64-sol2-tdep.c: Likewise.
6627         * amd64-windows-tdep.c: Likewise.
6628         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6629
6630 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6631
6632         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6633         (btrace_function) <insn>: Change type to use std::vector.
6634         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6635         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6636         ftrace_update_insns, ftrace_compute_global_level_offset,
6637         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6638         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6639         change to std::vector.
6640         (ftrace_update_insns): Adjust to change to std::vector, change
6641         type of INSN parameter.
6642         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6643         * record-btrace.c (btrace_call_history_insn_range,
6644         btrace_compute_src_line_range,
6645         record_btrace_frame_prev_register): Adjust to change to
6646         std::vector.
6647         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6648         to change to std::vector.
6649
6650 2017-09-03  Tom Tromey  <tom@tromey.com>
6651
6652         * corefile.c (reopen_exec_file): Use std::string.
6653
6654 2017-09-03  Tom Tromey  <tom@tromey.com>
6655
6656         * compile/compile.c (compile_register_name_mangled): Return
6657         std::string.
6658         * compile/compile-loc2c.c (pushf_register_address): Update.
6659         (pushf_register): Update.
6660         * compile/compile-c-types.c (convert_array): Update.
6661         * compile/compile-c-symbols.c (generate_vla_size): Update.
6662         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6663         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6664         (convert_one_symbol): Update.
6665         (generate_c_for_for_one_variable): Update.
6666         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6667         std::string.
6668         (generate_register_struct): Update.
6669         * compile/compile-internal.h (c_get_range_decl_name): Return a
6670         std::string.
6671         (compile_register_name_mangled): Return std::string.
6672
6673 2017-09-03  Tom Tromey  <tom@tromey.com>
6674
6675         * utils.c (perror_string): Return a std::string.
6676         (throw_perror_with_name, perror_warning_with_name): Update.
6677
6678 2017-09-03  Tom Tromey  <tom@tromey.com>
6679
6680         * demangle.c (demangle_command): Use std::string,
6681         unique_xmalloc_ptr.
6682
6683 2017-09-03  Tom Tromey  <tom@tromey.com>
6684
6685         * cli/cli-setshow.c (do_set_command): Use std::string.
6686
6687 2017-09-03  Tom Tromey  <tom@tromey.com>
6688
6689         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6690
6691 2017-09-03  Tom Tromey  <tom@tromey.com>
6692
6693         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6694
6695 2017-09-03  Tom Tromey  <tom@tromey.com>
6696
6697         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6698         gdb::unique_xmalloc_ptr.
6699
6700 2017-09-03  Tom Tromey  <tom@tromey.com>
6701
6702         * thread.c (print_thread_info_1): Use string_printf.
6703         (thread_apply_command, thread_apply_all_command): Use
6704         std::string.
6705
6706 2017-09-03  Tom Tromey  <tom@tromey.com>
6707
6708         * valprint.c (val_print_string): Update.
6709         * gdbcore.h (memory_error_message): Return std::string.
6710         * corefile.c (memory_error_message): Return std::string.
6711         (memory_error): Update.
6712         * breakpoint.c (insert_bp_location): Update.
6713
6714 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6715
6716         * target/waitstatus.h (target_waitstatus_to_string): Change
6717         return type to std::string.
6718         * target/waitstatus.c (target_waitstatus_to_string): Return
6719         std::string.
6720         * target.h (target_waitstatus_to_string): Remove declaration.
6721         * infrun.c (resume, clear_proceed_status_thread,
6722         print_target_wait_results, do_target_wait, save_waitstatus,
6723         stop_all_threads): Adjust.
6724         * record-btrace.c (record_btrace_wait): Adjust.
6725         * target-debug.h
6726         (target_debug_print_struct_target_waitstatus_p): Adjust.
6727
6728 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6729
6730         PR gdb/22046
6731         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6732         detection.
6733
6734 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6735
6736         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6737         for setting/unsetting environment variables on the remote target.
6738         (New remote packets): Add entries for QEnvironmentHexEncoded,
6739         QEnvironmentUnset and QEnvironmentReset.
6740         * common/environ.c (gdb_environ::operator=): Extend method to
6741         handle m_user_set_env_list and m_user_unset_env_list.
6742         (gdb_environ::clear): Likewise.
6743         (match_var_in_string): Change type of first parameter from 'char
6744         *' to 'const char *'.
6745         (gdb_environ::set): Extend method to handle
6746         m_user_set_env_list and m_user_unset_env_list.
6747         (gdb_environ::unset): Likewise.
6748         (gdb_environ::clear_user_set_env): New method.
6749         (gdb_environ::user_set_envp): Likewise.
6750         (gdb_environ::user_unset_envp): Likewise.
6751         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6752         m_user_unset_env_list on move constructor/assignment.
6753         (unset): Add new default parameter 'update_unset_list = true'.
6754         (clear_user_set_env): New method.
6755         (user_set_envp): Likewise.
6756         (user_unset_envp): Likewise.
6757         (m_user_set_env_list): New std::set.
6758         (m_user_unset_env_list): Likewise.
6759         * common/rsp-low.c (hex2str): New function.
6760         (bin2hex): New overload for bin2hex function.
6761         * common/rsp-low.c (hex2str): New prototype.
6762         (str2hex): New overload prototype.
6763         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6764         QEnvironmentUnset and QEnvironmentReset.
6765         (remote_protocol_features): Add QEnvironmentHexEncoded,
6766         QEnvironmentUnset and QEnvironmentReset packets.
6767         (send_environment_packet): New function.
6768         (extended_remote_environment_support): Likewise.
6769         (extended_remote_create_inferior): Call
6770         extended_remote_environment_support.
6771         (_initialize_remote): Add QEnvironmentHexEncoded,
6772         QEnvironmentUnset and QEnvironmentReset packet configs.
6773         * unittests/environ-selftests.c (gdb_selftest_env_var):
6774         New variable.
6775         (test_vector_initialization): New function.
6776         (test_init_from_host_environ): Likewise.
6777         (test_reinit_from_host_environ): Likewise.
6778         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6779         Likewise.
6780         (test_unset_set_empty_vector): Likewise.
6781         (test_vector_clear): Likewise.
6782         (test_std_move): Likewise.
6783         (test_move_constructor):
6784         (test_self_move): Likewise.
6785         (test_set_unset_reset): Likewise.
6786         (run_tests): Rewrite in terms of the functions above.
6787
6788 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6789
6790         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6791         (adi_available): Use a temp variable of type CORE_ADDR as argument
6792         3 when calling target_auxv_search.
6793         (adi_normalize_address): Use masks and xor operators to calculate
6794         normalized address.
6795         (adi_read_versions, adi_write_versions, adi_print_versions)
6796         (do_examine, do_assign): Use paddress.
6797
6798 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6799
6800         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6801         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6802         out of loop and add supply of FIR.
6803         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6804         add collect of FIR.
6805
6806 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6807
6808         PR gdb/21827
6809         * cli/cli-script.c (define_command): Don't convert command name
6810         to lower case.
6811
6812 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6813
6814         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6815         Update all callers accordingly. Remove all code blocks handling
6816         the case where DISPP is not NULL.
6817
6818 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6819
6820         PR symtab/22003
6821         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6822         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6823         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6824
6825 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6826
6827         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6828         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6829         (read_comp_units_from_section): New parameter abbrev_section, use
6830         read_and_check_comp_unit_head, allocate signatured_type if needed.
6831         (create_all_comp_units): Update read_comp_units_from_section caller.
6832
6833 2017-08-23  Pedro Alves  <palves@redhat.com>
6834
6835         PR remote/21852
6836         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6837         to null_ptid and switch to thread without reading the registers
6838         after adding the inferior.
6839
6840 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6841
6842         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6843         compile-gcc.
6844         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6845         (compile_to_object): Implement compile_gcc.
6846         (_initialize_compile): Install "set compile-gcc".  Initialize
6847         compile_gcc.
6848
6849 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6850
6851         * compile/compile.c (compile_to_object): Conditionally call
6852         set_verbose.  Conditionally call compile or compile_v0.
6853
6854 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6855
6856         * sparc64-tdep.h: (adi_normalize_address): New export.
6857         * sparc-nat.h: (open_adi_tag_fd): New export.
6858         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6859         * sparc64-linux-tdep.c:
6860         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6861         (sparc64_linux_handle_segmentation_fault): New function.
6862         (sparc64_linux_init_abi): Register
6863         sparc64_linux_handle_segmentation_fault
6864         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6865         (sparc64_addr_bits_remove): New function.
6866         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6867         (MAX_PROC_NAME_SIZE): New macro.
6868         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6869         (sparc64adilist): New variable.
6870         (adi_proc_list): New variable.
6871         (find_adi_info): New function.
6872         (add_adi_info): New function.
6873         (get_adi_info_proc): New function.
6874         (get_adi_info): New function.
6875         (info_adi_command): New function.
6876         (read_maps_entry): New function.
6877         (adi_available): New function.
6878         (adi_normalize_address): New function.
6879         (adi_align_address): New function.
6880         (adi_convert_byte_count): New function.
6881         (adi_tag_fd): New function.
6882         (adi_is_addr_mapped): New function.
6883         (adi_read_versions): New function.
6884         (adi_write_versions): New function.
6885         (adi_print_versions): New function.
6886         (do_examine): New function.
6887         (do_assign): New function.
6888         (adi_examine_command): New function.
6889         (adi_assign_command): New function.
6890         (_initialize_sparc64_adi_tdep): New function.
6891
6892 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6893
6894         * breakpoint.c (breakpoints_info): Rename to ...
6895         (info_breakpoints_command): ... this.
6896         (watchpoints_info): Rename to ...
6897         (info_watchpoints_command): ... this.
6898         (tracepoints_info): Rename to ...
6899         (info_tracepoints_command): ... this.
6900         (_initialize_breakpoint): Adjust.
6901         * dcache.c (dcache_info): Rename to ...
6902         (info_display_command): ... this.
6903         (_initialize_dcache): Adjust.
6904         * frame.h (args_info): Rename to ...
6905         (info_args_command): ... this.
6906         (locals_info): Rename to ...
6907         (info_locals_command): ... this.
6908         * infcmd.c (nofp_registers_info): Rename to ...
6909         (info_registers_command): ... this.
6910         (float_info): Rename to ...
6911         (info_float_command): ... this.
6912         (program_info): Rename to ...
6913         (info_program_command): ... this.
6914         (all_registers_info): Rename to ...
6915         (info_all_registers_command): ... this.
6916         (vector_info): Rename to ...
6917         (info_vector_command): ... this.
6918         (float_info): Rename to ...
6919         (info_float_command): ... this.
6920         (_initialize_infcmd): Adjust.
6921         * inferior.h (term_info): Rename to ...
6922         (info_terminal_command): ... this.
6923         * inflow.c (term_info): Rename to ...
6924         (info_terminal_command): ... this.
6925         (_initialize_inflow): Adjust.
6926         * infrun.c (signals_info): Rename to ...
6927         (info_signals_command): ... this.
6928         (_initialize_infrun): Adjust.
6929         * objc-lang.c (classes_info): Rename to ...
6930         (info_classes_command): ... this.
6931         (selectors_info): Rename to ...
6932         (info_selectors_command): ... this.
6933         (_initialize_objc_language): Adjust.
6934         * printcmd.c (sym_info): Rename to ...
6935         (info_symbol_command): ... this.
6936         (address_info): Rename to ...
6937         (info_address_command): ... this.
6938         (display_info): Rename to ...
6939         (info_display_command): ... this.
6940         (_initialize_printcmd): Adjust.
6941         * reverse.c (bookmarks_info): Rename to ...
6942         (info_breakpoints_command): ... this.
6943         (_initialize_reverse): Adjust.
6944         * ser-go32.c (dos_info): Rename to ...
6945         (info_serial_command): ... this.
6946         (_initialize_ser_dos): Adjust.
6947         * skip.c (skip_info): Rename to ...
6948         (info_skip_command): ... this.
6949         (_initialize_step_skip): Adjust.
6950         * source.c (line_info): Rename to ...
6951         (info_line_command): ... this.
6952         (source_info): Rename to ...
6953         (info_source_command)
6954         * stack.c (frame_info): Rename to ...
6955         (info_frame_command): ... this.
6956         (locals_info): Rename to ...
6957         (info_locals_command): ... this.
6958         (args_info): Rename to ...
6959         (info_args_command): ... this.
6960         (_initialize_stack): Adjust.
6961         * symtab.c (sources_info): Rename to ...
6962         (info_sources_command): ... this.
6963         (variables_info): Rename to ...
6964         (info_variables_command): ... this.
6965         (functions_info): Rename to ...
6966         (info_functions_command): ... this.
6967         (types_info): Rename to ...
6968         (info_types_command): ... this.
6969         (_initialize_symtab): Adjust.
6970         * target.c (target_info): Rename to ...
6971         (info_target_command): ... this.
6972         (initialize_targets): Adjust.
6973         * tracepoint.c (tvariables_info): Rename to ...
6974         (info_tvariables_command): ... this.
6975         (scope_info): Rename to ...
6976         (info_scope_command): ... this.
6977         (trace_dump_actions): Adjust.
6978         (_initialize_tracepoint): Adjust.
6979
6980 2017-08-22  Tom Tromey  <tom@tromey.com>
6981
6982         * breakpoint.h (install_breakpoint): Update.
6983         * breakpoint.c (add_solib_catchpoint): Update.
6984         (install_breakpoint): Change argument to a std::unique_ptr.
6985         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6986         (create_breakpoint_sal, create_breakpoint): Update.
6987         (watch_command_1, catch_exec_command_1)
6988         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6989         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6990         Return the breakpoint.
6991         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6992         (new_single_step_breakpoint): Update.
6993         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6994         std::unique_ptr.
6995         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6996         std::unique_ptr.
6997         * break-catch-sig.c (create_signal_catchpoint): Use
6998         std::unique_ptr.
6999         * ada-lang.c (create_ada_exception_catchpoint): Use
7000         std::unique_ptr.
7001
7002 2017-08-22  Tom Tromey  <tom@tromey.com>
7003
7004         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7005
7006 2017-08-22  Tom Tromey  <tom@tromey.com>
7007
7008         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7009         (lookup_partial_symbol): Update.
7010
7011 2017-08-22  Tom Tromey  <tom@tromey.com>
7012
7013         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7014         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7015         (find_and_open_source, symtab_to_fullname): Update.
7016         * psymtab.c (psymtab_to_fullname): Update.
7017
7018 2017-08-22  Tom Tromey  <tom@tromey.com>
7019
7020         * exec.c (exec_file_attach): Update.
7021         * linux-thread-db.c (try_thread_db_load): Update.
7022         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7023         * utils.c (gdb_realpath): Change return type.
7024         (gdb_realpath_keepfile): Update.
7025         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7026         (_initialize_utils): Register the new self test.
7027         * source.c (openp): Update.
7028         (find_and_open_source): Update.
7029         * nto-tdep.c (nto_find_and_open_solib): Update.
7030         * main.c (set_gdb_data_directory): Update.
7031         (captured_main_1): Update.
7032         * dwarf2read.c (dwarf2_get_dwz_file): Update
7033         (dw2_map_symbol_filenames): Update.
7034         * auto-load.c (auto_load_safe_path_vec_update): Update.
7035         (filename_is_in_auto_load_safe_path_vec): Change type of
7036         "filename_realp".
7037         (auto_load_objfile_script): Update.
7038         (file_is_auto_load_safe): Update.  Use std::string.
7039         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7040
7041 2017-08-22  Tom Tromey  <tom@tromey.com>
7042
7043         * utils.c (gdb_realpath_keepfile): Return a
7044         gdb::unique_xmalloc_ptr.
7045         * exec.c (exec_file_attach): Update.
7046         * utils.h (gdb_realpath_keepfile): Return a
7047         gdb::unique_xmalloc_ptr.
7048
7049 2017-08-22  Tom Tromey  <tom@tromey.com>
7050
7051         * compile/compile.c (compile_file_command): Use
7052         gdb::unique_xmalloc_ptr, std::string.
7053         * utils.c (gdb_abspath): Change return type.
7054         * source.c (openp): Update.
7055         * objfiles.c (allocate_objfile): Update.
7056         * main.c (set_gdb_data_directory): Update.
7057         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7058
7059 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7060
7061         * cli-cmds.c (list_commands): List actual code around more than
7062         one location.
7063
7064 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7065
7066         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7067
7068 2017-08-21  Pedro Alves  <palves@redhat.com>
7069
7070         PR gdb/19487
7071         * c-exp.y (variable production): Handle function aliases.
7072         * minsyms.c (msymbol_is_text): New function.
7073         * minsyms.h (msymbol_is_text): Declare.
7074         * symtab.c (find_function_alias_target): New function.
7075         * symtab.h (find_function_alias_target): Declare.
7076
7077 2017-08-21  Pedro Alves  <palves@redhat.com>
7078
7079         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7080         typedefs.
7081         * typeprint.c (whatis_exp): If handling "whatis", and expression
7082         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7083         typedefs here.
7084         * valops.c (value_cast): Save "to" type before resolving
7085         stubs/typedefs.  Use that type as resulting value's type.
7086
7087 2017-08-18  Tom Tromey  <tom@tromey.com>
7088             Pedro Alves  <palves@redhat.com>
7089
7090         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7091         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7092         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7093         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7094         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7095         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7096         (linux_get_siginfo_data): Add "thread" argument.  Use
7097         scoped_restore.
7098         * linux-nat.c (linux_child_follow_fork)
7099         (check_stopped_by_watchpoint): Use scoped_restore.
7100         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7101         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7102         (restore_inferior_ptid, save_inferior_ptid): Remove.
7103         * btrace.c (btrace_fetch): Use scoped_restore.
7104         * bsd-uthread.c (bsd_uthread_fetch_registers)
7105         (bsd_uthread_store_registers): Use scoped_restore.
7106         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7107         scoped_restore.
7108         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7109         (aix_thread_xfer_partial): Use scoped_restore.
7110         * inferior.h (save_inferior_ptid): Remove.
7111
7112 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7113
7114         PR tdep/21818
7115         * arm-tdep.c (gdb_print_insn_arm): Mark
7116         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7117
7118 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7119
7120         * NEWS: Mention GDBserver's new option "--selftest".
7121         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7122         * selftest.c: Move it to common/selftest.c.
7123         * selftest.h: Move it to common/selftest.h.
7124         * selftest-arch.c (reset): New function.
7125         (tests_with_arch): Call reset.
7126
7127 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7128
7129         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7130         instead of exception_fprintf and printf_filtered.
7131
7132 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7133
7134         * selftest.c (register_self_test): Rename it to
7135         selftests::register_test.
7136         (run_self_tests): selftest::run_tests.
7137         * selftest.h: Update declarations.
7138         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7139         selftests::register_test_foreach_arch.
7140         * selftest-arch.h: Update declaration.
7141         * aarch64-tdep.c: Update.
7142         * arm-tdep.c: Likewise.
7143         * disasm-selftests.c: Likewise.
7144         * dwarf2loc.c: Likewise.
7145         * dwarf2-frame.c: Likewise.
7146         * findvar.c: Likewise.
7147         * gdbarch-selftests.c: Likewise.
7148         * maint.c (maintenance_selftest): Likewise.
7149         * regcache.c: Likewise.
7150         * rust-exp.y: Likewise.
7151         * selftest-arch.c: Likewise.
7152         * unittests/environ-selftests.c: Likewise.
7153         * unittests/function-view-selftests.c: Likewise.
7154         * unittests/offset-type-selftests.c: Likewise.
7155         * unittests/optional-selftests.c: Likewise.
7156         * unittests/scoped_restore-selftests.c: Likewise.
7157         * utils-selftests.c: Likewise.
7158
7159 2017-08-17  Pedro Alves  <palves@redhat.com>
7160
7161         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7162         local.
7163
7164 2017-08-17  Pedro Alves  <palves@redhat.com>
7165
7166         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7167         field.
7168         (reset_die_in_process): Delete, replaced by ...
7169         (process_die_scope): ... this new class.  Make it responsible for
7170         freeing cu->line_header too.
7171         (process_die): Use process_die_scope.
7172         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7173         cu->line_header_die_owner.  Don't release the line header if it's
7174         owned by the CU.
7175         (setup_type_unit_groups): Make the CU/DIE own the line header.
7176         Don't release the line header here.
7177
7178 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7179
7180         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7181
7182 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7183
7184         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7185         Single-Key mode
7186
7187 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7188
7189         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7190         mode command list.
7191
7192 2017-08-15  Stafford Horne  <shorne@gmail.com>
7193
7194         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7195
7196 2017-08-15  Stafford Horne  <shorne@gmail.com>
7197
7198         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7199
7200 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7201
7202         PR gdb/21954
7203         * infcmd.c (unset_environment_command): Use the 'clear' method on
7204         the environment instead of resetting it.
7205
7206 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7207
7208         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7209         platforms.
7210
7211 2017-08-14  Tom Tromey  <tom@tromey.com>
7212
7213         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7214         (print_binary_chars): Likewise.
7215         (BITS_IN_BYTES): Remove.
7216
7217 2017-08-14  Tom Tromey  <tom@tromey.com>
7218
7219         PR gdb/21675
7220         * valprint.c (LOW_ZERO): Change value to 034.
7221         (print_octal_chars): Add static_asserts for octal constants.
7222         * printcmd.c (print_scalar_formatted): Add 'd' case.
7223
7224 2017-08-11  Tom Tromey  <tom@tromey.com>
7225
7226         * symfile.c (add_symbol_file_command): Use std::vector.
7227
7228 2017-08-14  Tom Tromey  <tom@tromey.com>
7229
7230         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7231         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7232         std::move.
7233         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7234
7235 2017-08-11  Pedro Alves  <palves@redhat.com>
7236
7237         * infrun.c (process_event_stop_test): Adjust
7238         function_name_is_marked_for_skip call.
7239         * skip.c: Include <list>.
7240         (skiplist_entry): Make it a class with private fields, and
7241         getters/setters.
7242         (skiplist_entry_chain): Delete.
7243         (skiplist_entries): New.
7244         (skiplist_entry_count): Delete.
7245         (highest_skiplist_entry_num): New.
7246         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7247         (add_skiplist_entry): Delete.
7248         (skiplist_entry::skiplist_entry): New.
7249         (skiplist_entry::add_entry): New.
7250         (skip_file_command, skip_function): Adjust.
7251         (compile_skip_regexp): Delete.
7252         (skip_command): Don't compile regexp here.  Adjust to use
7253         skiplist_entry::add_entry.
7254         (skip_info): Adjust to use range-for and getters.
7255         (skip_enable_command, skip_disable_command): Adjust to use
7256         range-for and setters.
7257         (skip_delete_command): Adjust to use std::list.
7258         (add_skiplist_entry): Delete.
7259         (skip_file_p): Delete, refactored as ...
7260         (skiplist_entry::do_skip_file_p): ... this new method.
7261         (skip_gfile_p): Delete, refactored as ...
7262         (skiplist_entry::do_gskip_file_p): ... this new method.
7263         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7264         (skiplist_entry::skip_function_p): ... this new method.
7265         (function_name_is_marked_for_skip): Now returns bool, and takes
7266         the function sal by const reference.  Adjust to use range-for and
7267         skiplist_entry methods.
7268         (_initialize_step_skip): Remove references to
7269         skiplist_entry_chain, skiplist_entry_count.
7270         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7271         takes the function sal by const reference.
7272
7273 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7274
7275         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7276         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7277         (dwarf2_frame_cache):
7278         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7279         RETURN_MASK_ALL and set *this_case to NULL.
7280         * frame-unwind.h: Update comments.
7281
7282 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7283
7284         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7285         (dwarf2_frame_state_copy_regs): Remove.
7286         (dwarf2_frame_state_free_regs): Remove.
7287         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7288         (dwarf2_restore_rule): Call method .alloc_regs instead of
7289         dwarf2_frame_state_alloc_regs.
7290         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7291         constructor.  Call std::move.
7292         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7293         (dwarf2_frame_cache): Likewise.
7294
7295         [GDB_SELF_TEST]: Include selftest.h and
7296         selftest-arch.h.
7297         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7298         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7299         execute_cfa_program_test.
7300
7301         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7302         copy ctor, assignment operator, move assignment.
7303         <alloc_regs>: New method.
7304         <swap>: New method.
7305         (struct dwarf2_frame_state): Delete dtor.
7306         (dwarf2_frame_state_alloc_regs): Remove declaration.
7307         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7308         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7309
7310 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7311
7312         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7313         (dwarf2_frame_state::dwarf2_frame_state): New.
7314         (dwarf2_frame_state::~dwarf2_frame_state): New.
7315         (dwarf2_fetch_cfa_info): Update.
7316         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7317         rather than a pointer.  Update code.
7318         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7319         dtor.
7320         <data_align, code_align, retaddr_column>: Change them to const.
7321         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7322         to bool.
7323
7324 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7325
7326         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7327         <loc.exp>: New field.
7328         * dwarf2-frame.c (execute_cfa_program): Update.
7329         (dwarf2_frame_prev_register): Update.
7330
7331 2017-08-10  Pedro Alves  <palves@redhat.com>
7332
7333         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7334
7335 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7336
7337         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7338         (fbsd_pending_children): Use std::list.
7339         (fbsd_remember_child): Likewise.
7340         (fbsd_is_child_pending): Likewise.
7341         (fbsd_pending_vfork_done): Use std::forward_list.
7342         (fbsd_add_vfork_done): Likewise.
7343         (fbsd_is_vfork_done_pending): Likewise.
7344         (fbsd_next_vfork_done): Likewise.
7345
7346 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7347
7348         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7349         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7350         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7351         for `mapfilename'.
7352         (fbsd_xfer_partial): Use gdb::byte_vector.
7353         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7354
7355 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7356
7357         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7358         "filestuff.h".
7359         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7360
7361 2017-08-09  Tom Tromey  <tom@tromey.com>
7362
7363         * skip.c (skiplist_entry): New constructor.
7364         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7365         (skiplist_entry::file_is_glob): Now bool.
7366         (skiplist_entry::file, skiplist_entry::function): Now
7367         std::string.
7368         (make_skip_entry): Return a unique_ptr.  Use new.
7369         (free_skiplist_entry, free_skiplist_entry_cleanup)
7370         (make_free_skiplist_entry_cleanup): Remove.
7371         (skip_command, skip_disable_command, add_skiplist_entry)
7372         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7373         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7374         (function_name_is_marked_for_skip): Update.
7375         (skip_delete_command): Update.  Use delete.
7376
7377 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7378
7379         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7380         (aarch64_linux_core_read_description): New function.
7381         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7382
7383 2017-08-09  Pedro Alves  <palves@redhat.com>
7384
7385         * cp-name-parser.y (cp_comp_to_string): Return a
7386         gdb::unique_xmalloc_ptr<char>.
7387         * cp-support.c (replace_typedefs_qualified_name)
7388         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7389         (cp_canonicalize_string_full): Use op= instead of explicit
7390         convertion.
7391         (cp_class_name_from_physname, method_name_from_physname)
7392         (cp_func_name, cp_remove_params): Adjust to use
7393         gdb::unique_xmalloc_ptr<char>.
7394         * cp-support.h (cp_comp_to_string): Return a
7395         gdb::unique_xmalloc_ptr<char>.
7396         * python/py-type.c (typy_lookup_type): Adjust to use
7397         gdb::unique_xmalloc_ptr<char>.
7398
7399 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7400
7401         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7402
7403 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7404             Yao Qi  <yao.qi@linaro.org>
7405
7406         * cp-support.c (cp_canonicalize_string_full): Use
7407         gdb::unique_xmalloc_ptr<char>.
7408         (cp_canonicalize_string): Likewise.
7409
7410 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7411
7412         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7413         * regformats/i386/amd64-avx-avx512.dat: Remove.
7414         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7415         * regformats/i386/amd64-avx-mpx.dat:Remove.
7416         * regformats/i386/amd64-avx.dat: Remove.
7417         * regformats/i386/amd64-mpx.dat: Remove.
7418         * regformats/i386/i386-avx-avx512.dat: Remove.
7419         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7420         * regformats/i386/i386-avx-mpx.dat: Remove.
7421         * regformats/i386/i386-mmx.dat: Remove.
7422         * regformats/i386/i386-mpx.dat: Remove.
7423
7424 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7425
7426         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7427         * amd64-tdep.c: Don't include features/i386/x32*.c.
7428         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7429         functions.
7430         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7431         and i386/x32-avx-avx512.
7432         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7433         and i386/x32.xml.
7434         * features/i386/x32-avx-avx512.c: Removed.
7435         * features/i386/x32-avx-avx512.xml: Removed.
7436         * features/i386/x32-avx.c: Removed.
7437         * features/i386/x32-avx.xml: Removed.
7438         * features/i386/x32.c: Removed.
7439         * features/i386/x32.xml: Removed.
7440         * regformats/i386/x32-avx-avx512.dat: Removed.
7441         * regformats/i386/x32-avx.dat: Removed.
7442         * regformats/i386/x32.dat: Removed.
7443
7444 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7445
7446         PR breakpoints/21886
7447         * mem-break.c (default_memory_insert_breakpoint): Use
7448         `->placed_address' rather than `->reqstd_address' for the
7449         breakpoint location.
7450
7451 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7452
7453         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7454         assertions.
7455
7456 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7457
7458         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7459         a union of `tdep_info', `tdesc_data' and `id'.
7460         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7461         rather than `info.tdep_info'.
7462         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7463         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7464         * i386-tdep.c (i386_gdbarch_init): Likewise.
7465         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7466         * mips-tdep.c (mips_gdbarch_init): Likewise.
7467         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7468         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7469         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7470         `info.tdep_info'.
7471         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7472         `info.tdep_info'.
7473         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7474         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7475         `info.tdep_info'.
7476         * spu-tdep.c (spu_gdbarch_init): Likewise.
7477         * gdbarch.h: Regenerate.
7478
7479 2017-08-07  Leszek Swirski  <leszeks@google.com>
7480
7481         PR symtab/20899
7482         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7483
7484 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7485
7486         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7487         (gdbsim_open): Rename gdb_argv args object to argv.
7488
7489 2017-08-05  Tom Tromey  <tom@tromey.com>
7490
7491         * compile/compile-object-load.c (compile_object_load): Use
7492         gdb::unique_xmalloc_ptr.
7493         * cli/cli-dump.c (scan_filename): Rename from
7494         scan_filename_with_cleanup.  Change return type.
7495         (scan_expression): Rename from scan_expression_with_cleanup.
7496         Change return type.
7497         (dump_memory_to_file, dump_value_to_file, restore_command):
7498         Use gdb::unique_xmalloc_ptr.  Update.
7499         * cli/cli-cmds.c (find_and_open_script): Use
7500         gdb::unique_xmalloc_ptr.
7501         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7502         * symmisc.c (maintenance_print_symbols)
7503         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7504         * symfile.c (symfile_bfd_open, generic_load)
7505         (add_symbol_file_command, remove_symbol_file_command): Use
7506         gdb::unique_xmalloc_ptr.
7507         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7508         * psymtab.c (maintenance_print_psymbols): Use
7509         gdb::unique_xmalloc_ptr.
7510         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7511         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7512         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7513         (reload_shared_libraries_1): Likewise.
7514
7515 2017-08-05  Tom Tromey  <tom@tromey.com>
7516
7517         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7518         (rust_op_vector, rust_set_vector): New typedefs.
7519         (current_parser): New global.
7520         (work_obstack): Change to pointer type.  Update all users.
7521         (rust_ast, pstate): Remove globals.
7522         (struct rust_parser): New.
7523         (%union) <params, field_inits>: Change type.
7524         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7525         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7526         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7527         (convert_params_to_types, convert_params_to_expression): Change
7528         type of "params".
7529         (ast_string): Change type of "fields".
7530         (rust_parse): Make a rust_parser.  Remove cleanups.
7531         (rust_lex_tests): Make and install an auto_obstack.
7532
7533 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7534
7535         * configure.srv (ipa_x32_linux_regobj): New.
7536         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7537         instead of X86_TDESC_AVX512.
7538         (initialize_low_tracepoint): Call
7539         init_registers_x32_avx_avx512_linux.
7540
7541 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7542
7543         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7544
7545 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7546
7547         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7548
7549 2017-08-03  Tom Tromey  <tom@tromey.com>
7550
7551         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7552         Remove.
7553         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7554
7555 2017-08-03  Tom Tromey  <tom@tromey.com>
7556
7557         * python/py-param.c (compute_enum_values): Use gdb_argv.
7558
7559 2017-08-03  Tom Tromey  <tom@tromey.com>
7560
7561         * utils.h (struct gdb_argv_deleter): New.
7562         (gdb_argv): New class.
7563         * utils.c (gdb_argv::reset): New method.
7564         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7565         * tracefile.c (tsave_command): Use gdb_argv.
7566         * top.c (new_ui_command): Use gdb_argv.
7567         * symmisc.c (maintenance_print_symbols)
7568         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7569         * symfile.c (symbol_file_command, generic_load)
7570         (remove_symbol_file_command): Use gdb_argv.
7571         * stack.c (backtrace_command): Use gdb_argv.
7572         * source.c (add_path, show_substitute_path_command)
7573         (unset_substitute_path_command, set_substitute_path_command):
7574         Use gdb_argv.
7575         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7576         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7577         * remote.c (extended_remote_run, remote_put_command)
7578         (remote_get_command, remote_delete_command): Use gdb_argv.
7579         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7580         (gdbsim_open): Use gdb_argv.
7581         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7582         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7583         * procfs.c (procfs_info_proc): Use gdb_argv.
7584         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7585         * infrun.c (handle_command): Use gdb_argv.
7586         * inferior.c (add_inferior_command, clone_inferior_command):
7587         Use gdb_argv.
7588         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7589         * exec.c (exec_file_command): Use gdb_argv.
7590         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7591         * compile/compile.c (build_argc_argv): Use gdb_argv.
7592
7593 2017-08-03  Tom Tromey  <tom@tromey.com>
7594
7595         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7596
7597 2017-08-03  Tom Tromey  <tom@tromey.com>
7598
7599         * python/python.c (compute_python_string): Return std::string.
7600         (gdbpy_eval_from_control_command): Update.
7601         (do_start_initialization): Use std::string.
7602         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7603         xstrprintf.
7604         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7605         xstrprintf.
7606
7607 2017-08-03  Tom Tromey  <tom@tromey.com>
7608
7609         * top.h (do_restore_instream_cleanup): Remove.
7610         * top.c (do_restore_instream_cleanup): Remove.
7611         (read_command_file): Use scoped_restore.
7612         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7613
7614 2017-08-03  Tom Tromey  <tom@tromey.com>
7615
7616         * cli/cli-script.c (execute_user_command)
7617         (execute_control_command): Use scoped_restore.
7618
7619 2017-08-03  Tom Tromey  <tom@tromey.com>
7620
7621         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7622         (execute_user_command): Remove user_call_depth; use
7623         user_args_stack's size instead.
7624
7625 2017-08-03  Tom Tromey  <tom@tromey.com>
7626
7627         * top.h (in_user_command): Remove.
7628         * top.c (in_user_command): Remove.
7629         * cli/cli-script.c (do_restore_user_call_depth)
7630         (execute_user_command): Update.
7631
7632 2017-08-03  Tom Tromey  <tom@tromey.com>
7633
7634         * valops.c (search_struct_method): Use gdb::byte_vector.
7635         * valarith.c (value_concat): Use std::vector.
7636         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7637         (simple_search_memory): Likewise.
7638         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7639         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7640         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7641         * elfread.c (elf_rel_plt_read): Use std::string.
7642         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7643         * cli/cli-dump.c (restore_section_callback): Use
7644         gdb::byte_vector.
7645
7646 2017-08-03  Tom Tromey  <tom@tromey.com>
7647
7648         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7649
7650 2017-08-03  Tom Tromey  <tom@tromey.com>
7651
7652         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7653         (tui_register_format): Use scoped_restore.
7654
7655 2017-08-03  Tom Tromey  <tom@tromey.com>
7656
7657         * reverse.c (exec_direction_default): Remove.
7658         (exec_reverse_once): Use scoped_restore.
7659         * remote.c (restore_remote_timeout): Remove.
7660         (remote_flash_erase, remote_flash_write, remote_flash_done)
7661         (readchar, remote_serial_write): Use scoped_restore.
7662         * cli/cli-script.c (struct source_cleanup_lines_args)
7663         (source_cleanup_lines): Remove.
7664         (script_from_file): Use scoped_restore.
7665         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7666         (source_command): Use scoped_restore.
7667
7668 2017-08-03  Tom Tromey  <tom@tromey.com>
7669
7670         * utils.h (make_cleanup_free_so): Remove.
7671         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7672         * solist.h (struct so_deleter): New.
7673         (so_list_up): New typedef.
7674         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7675
7676 2017-08-03  Tom Tromey  <tom@tromey.com>
7677
7678         * utils.h (make_cleanup_restore_current_language): Remove.
7679         * utils.c (do_restore_current_language)
7680         (make_cleanup_restore_current_language): Remove.
7681         * parse.c (parse_exp_in_context_1)
7682         (parse_expression_with_language): Use
7683         scoped_restore_current_language.
7684         * mi/mi-main.c (mi_cmd_execute): Use
7685         scoped_restore_current_language.
7686         * language.h (scoped_restore_current_language): New class.
7687
7688 2017-08-03  Tom Tromey  <tom@tromey.com>
7689
7690         * compile/compile.c (cleanup_unlink_file): Remove.
7691         (compile_to_object): Use gdb::unlinker.
7692         (eval_compile_command): Likewise.
7693
7694 2017-08-03  Tom Tromey  <tom@tromey.com>
7695
7696         * utils.h (make_cleanup_fclose): Remove.
7697         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7698
7699 2017-08-03  Tom Tromey  <tom@tromey.com>
7700
7701         * top.c (open_terminal_stream): Return gdb_file_up.
7702         (new_ui_command): Update.
7703
7704 2017-08-03  Tom Tromey  <tom@tromey.com>
7705
7706         * source.c (print_source_lines_base, forward_search_command)
7707         (reverse_search_command): Use gdb_file_up.
7708
7709 2017-08-03  Tom Tromey  <tom@tromey.com>
7710
7711         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7712
7713 2017-08-03  Tom Tromey  <tom@tromey.com>
7714
7715         * cli/cli-cmds.c (find_and_open_script): Change return type.
7716         Remove "streamp" and "full_path" parameters.
7717         (source_script_with_search): Update.
7718         * auto-load.c (source_script_file): Update.
7719         * cli/cli-cmds.h (find_and_open_script): Change type.
7720         (open_script): New struct.
7721
7722 2017-08-03  Tom Tromey  <tom@tromey.com>
7723
7724         * xml-support.c (xml_fetch_content_from_file): Update.
7725         * ui-file.c (stdio_file::open): Update.
7726         * tracefile-tfile.c (tfile_start): Update.
7727         * remote.c (remote_file_put, remote_file_get): Update.
7728         * nat/linux-procfs.c (linux_proc_get_int)
7729         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7730         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7731         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7732         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7733         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7734         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7735         * linux-nat.c (linux_proc_pending_signals): Update.
7736         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7737         (file_closer): Remove.
7738         * compile/compile.c (compile_to_object): Update.
7739         * common/filestuff.h (struct gdb_file_deleter): New.
7740         (gdb_file_up): New typedef.
7741         (gdb_fopen_cloexec): Change return type.
7742         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7743         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7744         (dump_binary_file, restore_binary_file): Update.
7745         * auto-load.c (auto_load_objfile_script_1): Update.
7746
7747 2017-08-03  Tom Tromey  <tom@tromey.com>
7748
7749         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7750         (info_static_tracepoint_markers_command): Likewise.
7751         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7752         * skip.c (skip_info): Use ui_out_emit_table.
7753         * progspace.c (print_program_space): Use ui_out_emit_table.
7754         * osdata.c (info_osdata): Use ui_out_emit_table.
7755         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7756         ui_out_emit_table.
7757         * linux-thread-db.c (info_auto_load_libthread_db): Use
7758         ui_out_emit_table.
7759         * inferior.c (print_inferior): Use ui_out_emit_table.
7760         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7761         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7762         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7763         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7764         * ui-out.h (class ui_out_emit_table): New.
7765
7766 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7767
7768         * mips-tdep.c (mips_fpu_type_str): New function.
7769         (mips_dump_tdep): Call it.
7770
7771 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7772
7773         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7774         `->mips_fpu_type'.
7775
7776 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7777
7778         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7779
7780 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7781
7782         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7783
7784 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7785
7786         * cli/cli-cmds.c (maintenancechecklist): New variable.
7787         * gdbcmd.h (maintenancechecklist): Declare it.
7788         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7789         Call i386_linux_read_description with different masks.
7790         * maint.c (maintenance_check_command): New function.
7791         (_initialize_maint_cmds): Call add_prefix_cmd.
7792         * target-descriptions.c (tdesc_reg): override operator != and ==.
7793         (tdesc_type): Likewise.
7794         (tdesc_feature): Likewise.
7795         (target_desc): Likewise.
7796         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7797         (maintenance_check_xml_descriptions): New function.
7798         (_initialize_target_descriptions) Add command "xml-descriptions".
7799         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7800
7801 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7802
7803         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7804         Include features/i386/32bit-*.c.
7805         (i386_linux_read_description): Generate target description if it
7806         doesn't exist.
7807         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7808         functions.
7809         * features/i386/32bit-linux.c: Re-generated.
7810         * features/i386/32bit-sse.c: Likewise.
7811         * target-descriptions.c (print_c_feature::visit): Print code to
7812         set register number if needed.
7813         (print_c_feature) <m_next_regnum>: New field.
7814
7815 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7816
7817         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7818         (FEATURE_XMLFILES): New.
7819         (FEATURE_CFILES): New.
7820         New rules.
7821         (clean-cfiles): Remove generated c files.
7822         * features/i386/32bit-avx.c: Generated.
7823         * features/i386/32bit-avx512.c: Generated.
7824         * features/i386/32bit-core.c: Generated.
7825         * features/i386/32bit-linux.c: Generated.
7826         * features/i386/32bit-mpx.c: Generated.
7827         * features/i386/32bit-pkeys.c: Generated.
7828         * features/i386/32bit-sse.c: Generated.
7829         * target-descriptions.c: Include algorithm.
7830         (tdesc_element_visitor): Add method visit_end.
7831         (print_c_tdesc): Implement visit_end.
7832         (print_c_tdesc:: m_filename_after_features): Move it to
7833         protected.
7834         (print_c_feature): New class.
7835         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7836         name starts with "i386/32bit-".
7837
7838 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7839
7840         * target-descriptions.c (tdesc_element_visitor): New class.
7841         (tdesc_element): New class.
7842         (tdesc_reg): Inherit from tdesc_element.
7843         (tdesc_reg::accept): New function.
7844         (tdesc_type): Inherit from tdesc_element.
7845         (tdesc_type::accept): New function.
7846         (tdesc_feature): Inherit from tdesc_element.
7847         (tdesc_feature::accept): New function.
7848         (target_desc): Inherit from tdesc_element.
7849         (target_desc::target_desc): New.
7850         (target_desc::~target_desc): New.
7851         (target_desc::accept): New.
7852         (allocate_target_description): Use new.
7853         (free_target_description): Use delete.
7854         (print_c_tdesc): New class.
7855         (maint_print_c_tdesc_cmd): Adjust.
7856
7857         * features/aarch64.c: Re-generated.
7858         * features/arc-arcompact.c: Re-generated.
7859         * features/arc-v2.c: Re-generated.
7860         * features/arm/arm-with-iwmmxt.c: Re-generated.
7861         * features/arm/arm-with-m.c: Re-generated.
7862         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7863         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7864         * features/arm/arm-with-neon.c: Re-generated.
7865         * features/arm/arm-with-vfpv2.c: Re-generated.
7866         * features/arm/arm-with-vfpv3.c: Re-generated.
7867         * features/i386/amd64-avx-avx512.c: Re-generated.
7868         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7869         * features/i386/amd64-avx.c: Re-generated.
7870         * features/i386/amd64-avx-linux.c: Re-generated.
7871         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7872         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7873         * features/i386/amd64-avx-mpx.c: Re-generated.
7874         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7875         * features/i386/amd64.c: Re-generated.
7876         * features/i386/amd64-linux.c: Re-generated.
7877         * features/i386/amd64-mpx.c: Re-generated.
7878         * features/i386/amd64-mpx-linux.c: Re-generated.
7879         * features/i386/i386-avx-avx512.c: Re-generated.
7880         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7881         * features/i386/i386-avx.c: Re-generated.
7882         * features/i386/i386-avx-linux.c: Re-generated.
7883         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7884         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7885         * features/i386/i386-avx-mpx.c: Re-generated.
7886         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7887         * features/i386/i386.c: Re-generated.
7888         * features/i386/i386-linux.c: Re-generated.
7889         * features/i386/i386-mmx.c: Re-generated.
7890         * features/i386/i386-mmx-linux.c: Re-generated.
7891         * features/i386/i386-mpx.c: Re-generated.
7892         * features/i386/i386-mpx-linux.c: Re-generated.
7893         * features/i386/x32-avx-avx512.c: Re-generated.
7894         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7895         * features/i386/x32-avx.c: Re-generated.
7896         * features/i386/x32-avx-linux.c: Re-generated.
7897         * features/i386/x32.c: Re-generated.
7898         * features/i386/x32-linux.c: Re-generated.
7899         * features/microblaze.c: Re-generated.
7900         * features/microblaze-with-stack-protect.c: Re-generated.
7901         * features/mips64-dsp-linux.c: Re-generated.
7902         * features/mips64-linux.c: Re-generated.
7903         * features/mips-dsp-linux.c: Re-generated.
7904         * features/mips-linux.c: Re-generated.
7905         * features/nds32.c: Re-generated.
7906         * features/nios2.c: Re-generated.
7907         * features/nios2-linux.c: Re-generated.
7908         * features/rs6000/powerpc-32.c: Re-generated.
7909         * features/rs6000/powerpc-32l.c: Re-generated.
7910         * features/rs6000/powerpc-403.c: Re-generated.
7911         * features/rs6000/powerpc-403gc.c : Re-generated.
7912         * features/rs6000/powerpc-405.c: Re-generated.
7913         * features/rs6000/powerpc-505.c: Re-generated.
7914         * features/rs6000/powerpc-601.c: Re-generated.
7915         * features/rs6000/powerpc-602.c: Re-generated.
7916         * features/rs6000/powerpc-603.c: Re-generated.
7917         * features/rs6000/powerpc-604.c: Re-generated.
7918         * features/rs6000/powerpc-64.c: Re-generated.
7919         * features/rs6000/powerpc-64l.c: Re-generated.
7920         * features/rs6000/powerpc-7400.c: Re-generated.
7921         * features/rs6000/powerpc-750.c: Re-generated.
7922         * features/rs6000/powerpc-860.c: Re-generated.
7923         * features/rs6000/powerpc-altivec32.c: Re-generated.
7924         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7925         * features/rs6000/powerpc-altivec64.c: Re-generated.
7926         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7927         * features/rs6000/powerpc-cell32l.c: Re-generated.
7928         * features/rs6000/powerpc-cell64l.c: Re-generated.
7929         * features/rs6000/powerpc-e500.c: Re-generated.
7930         * features/rs6000/powerpc-e500l.c: Re-generated.
7931         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7932         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7933         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7934         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7935         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7936         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7937         * features/rs6000/powerpc-vsx32.c: Re-generated.
7938         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7939         * features/rs6000/powerpc-vsx64.c: Re-generated.
7940         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7941         * features/rs6000/rs6000.c: Re-generated.
7942         * features/s390-linux32.c: Re-generated.
7943         * features/s390-linux32v1.c: Re-generated.
7944         * features/s390-linux32v2.c: Re-generated.
7945         * features/s390-linux64.c: Re-generated.
7946         * features/s390-linux64v1.c: Re-generated.
7947         * features/s390-linux64v2.c: Re-generated.
7948         * features/s390-te-linux64.c: Re-generated.
7949         * features/s390-tevx-linux64.c: Re-generated.
7950         * features/s390-vx-linux64.c: Re-generated.
7951         * features/s390x-linux64.c: Re-generated.
7952         * features/s390x-linux64v1.c: Re-generated.
7953         * features/s390x-linux64v2.c: Re-generated.
7954         * features/s390x-te-linux64.c: Re-generated.
7955         * features/s390x-tevx-linux64.c: Re-generated.
7956         * features/s390x-vx-linux64.c: Re-generated.
7957         * features/sparc/sparc32-solaris.c: Re-generated.
7958         * features/sparc/sparc64-solaris.c: Re-generated.
7959         * features/tic6x-c62x.c: Re-generated.
7960         * features/tic6x-c62x-linux.c: Re-generated.
7961         * features/tic6x-c64x.c: Re-generated.
7962         * features/tic6x-c64x-linux.c: Re-generated.
7963         * features/tic6x-c64xp.c: Re-generated.
7964         * features/tic6x-c64xp-linux.c: Re-generated.
7965
7966 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7967
7968         * i386-linux-tdep.c (i386_linux_read_description): New function.
7969         (i386_linux_core_read_description): Call
7970         i386_linux_read_description.
7971         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7972         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7973         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7974         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7975         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7976         * x86-linux-nat.c (x86_linux_read_description): Call
7977         i386_linux_read_description.
7978
7979 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7980
7981         * NEWS: Mention it.
7982         * features/Makefile (%.c: %.xml): Pass the xml file name to
7983         command "maint print c-tdesc".
7984         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7985         name from 'arg'.
7986
7987 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7988
7989         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7990         in-class initialization.
7991         (tdesc_create_feature): Call new instead of XCNEW.
7992         (free_target_description): Ue delete.
7993
7994 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7995
7996         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7997
7998 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7999
8000         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8001         constant.
8002         (amd64_x32_init_abi): Likewise.
8003         * amd64-tdep.h (amd64_init_abi): Update declaration.
8004         (amd64_x32_init_abi): Likewise.
8005
8006 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8007
8008         PR tdep/21717
8009         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8010         condition for FPSCR.
8011         (arm_linux_store_inferior_registers): Likewise.
8012
8013 2017-07-22  Tom Tromey  <tom@tromey.com>
8014
8015         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8016         <syscalls_counts>: Now a std::vector.
8017         (get_catch_syscall_inferior_data): Use "new".
8018         (catch_syscall_inferior_data_cleanup): Use "delete".
8019         (insert_catch_syscall, remove_catch_syscall)
8020         (clear_syscall_counts): Update.
8021
8022 2017-07-22  Tom Tromey  <tom@tromey.com>
8023
8024         * break-catch-syscall.c (syscall_catchpoint)
8025         <syscalls_to_be_caught>: Now a std::vector<int>
8026         (~syscall_catchpoint): Remove.
8027         (insert_catch_syscall, remove_catch_syscall)
8028         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8029         (print_mention_catch_syscall, print_recreate_catch_syscall):
8030         Update.
8031         (create_syscall_event_catchpoint): Change type of "filter"
8032         parameter.
8033         (catch_syscall_split_args): Return a std::vector.
8034         (catch_syscall_command_1, catching_syscall_number_1): Update.
8035
8036 2017-07-22  Tom Tromey  <tom@tromey.com>
8037
8038         * break-catch-throw.c (struct exception_catchpoint)
8039         <exception_rx>: Now a std::string.
8040         (~exception_catchpoint): Remove.
8041         (print_one_detail_exception_catchpoint): Update.
8042         (handle_gnu_v3_exceptions): Change type of except_rx.
8043         (extract_exception_regexp): Return a std::string.
8044         (catch_exception_command_1): Update.
8045
8046 2017-07-22  Tom Tromey  <tom@tromey.com>
8047
8048         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8049         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8050         std::vector.
8051         <catch_all>: Now a bool.
8052         (~signal_catchpoint): Remove.
8053         (signal_catchpoint_insert_location)
8054         (signal_catchpoint_remove_location)
8055         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8056         (signal_catchpoint_print_mention)
8057         (signal_catchpoint_print_recreate)
8058         (signal_catchpoint_explains_signal): Update.
8059         (create_signal_catchpoint): Change type of "filter" and
8060         "catch_all".
8061         (catch_signal_split_args): Return a std::vector.  Change type of
8062         "catch_all".
8063         (catch_signal_command): Update.
8064
8065 2017-07-20  Pedro Alves  <palves@redhat.com>
8066
8067         * ada-lang.c (ada_language_defn): Make extern.
8068         (_initialize_ada_language): Remove add_language call.
8069         * c-lang.c (c_language_defn, cplus_language_defn)
8070         (asm_language_defn, minimal_language_defn): Make extern.
8071         (_initialize_c_language): Delete.
8072         * completer.c (compare_cstrings): Delete, moved to utils.h.
8073         * d-lang.c (d_language_defn): Make extern.
8074         (_initialize_d_language): Remove add_language calls.
8075         * defs.h (enum language): Add comment.
8076         * f-lang.c (f_language_defn): Make extern.
8077         (_initialize_f_language): Remove add_language call.
8078         * go-lang.c (go_language_defn): Make extern.
8079         (_initialize_go_language): Remove add_language call.
8080         * language.c: Include <algorithm>.
8081         (languages): Redefine as const array.
8082         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8083         (set_language_command): Handle "local".  Use for-range loop.
8084         (set_language): Remove loop.
8085         (language_enum): Rewrite.
8086         (language_def, language_str): Remove loops.
8087         (add_language): Delete.
8088         (add_set_language_command): New, based on add_languages.
8089         (skip_language_trampoline): Adjust.
8090         (local_language_defn): Delete.
8091         (language_gdbarch_post_init): Adjust.
8092         (_initialize_language): Remove add_language calls.  Call
8093         add_set_language_command.
8094         * language.h (add_language): Delete.
8095         (auto_language_defn)
8096         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8097         (asm_language_defn, c_language_defn, cplus_language_defn)
8098         (d_language_defn, f_language_defn, go_language_defn)
8099         (m2_language_defn, objc_language_defn, opencl_language_defn)
8100         (pascal_language_defn, rust_language_defn): Declare.
8101         * m2-lang.c (m2_language_defn): Make extern.
8102         (_initialize_m2_language): Remove add_language call.
8103         * objc-lang.c (objc_language_defn): Make extern.
8104         (_initialize_objc_language): Remove add_language call.
8105         * opencl-lang.c (opencl_language_defn): Make extern.
8106         (_initialize_opencl_language): Remove add_language call.
8107         * p-lang.c (pascal_language_defn): Make extern.
8108         (_initialize_pascal_language): Delete.
8109         * rust-lang.c (rust_language_defn): Make extern.
8110         (_initialize_rust_language): Delete.
8111         * utils.h (compare_cstrings): New static inline function.
8112
8113 2017-07-20  Pedro Alves  <palves@redhat.com>
8114
8115         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8116         (get_var_value): Constify parameters.
8117         (get_int_var_value): Change prototype.
8118         (to_fixed_range_type): Adjust.
8119         * ada-lang.h (get_int_var_value): Change prototype.
8120
8121 2017-07-20  Pedro Alves  <palves@redhat.com>
8122
8123         * dwarf2read.c (dw2_lookup_symbol): Use
8124         SYMBOL_MATCHES_SEARCH_NAME.
8125         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8126
8127 2017-07-20  Pedro Alves  <palves@redhat.com>
8128
8129         * block.c (block_iter_name_step, block_iter_name_first)
8130         (block_iter_name_next): Delete.
8131         (block_lookup_symbol_primary): Adjust to use
8132         dict_iter_match_first/dict_iter_match_next.
8133         * block.h (block_iter_name_first, block_iter_name_next): Delete
8134         declarations.
8135         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8136         dict_iter_match_first/dict_iter_match_next.
8137
8138 2017-07-20  Pedro Alves  <palves@redhat.com>
8139
8140         * cp-support.c (cp_find_first_component_aux): Add missing case for
8141         end of string.
8142
8143 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8144
8145         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8146         of dwo_cu's dwo_file.
8147
8148 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8149
8150         * remote.c (store_registers_using_G): Remove one line comment.
8151
8152 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8153
8154         * regcache.c (regcache_cpy): Simplify it.
8155         (regcache::cpy_no_passthrough): Remove it.
8156         * regcache.h (cpy_no_passthrough): Remove it.
8157         (regcache_dup, regcache_cpy): Update comments.
8158
8159 2017-07-18  Pedro Alves  <palves@redhat.com>
8160
8161         * remote-sim.c (sim_command_completer): Adjust to work with a
8162         completion_tracker instead of a VEC.
8163
8164 2017-07-17  Pedro Alves  <palves@redhat.com>
8165
8166         * completer.c (complete_source_filenames): New function.
8167         (complete_address_and_linespec_locations): New function.
8168         (location_completer): Use complete_address_and_linespec_locations.
8169         (completion_tracker::build_completion_result): Honor the tracker's
8170         request to suppress append.
8171         * completer.h (completion_tracker::suppress_append_ws)
8172         (completion_tracker::set_suppress_append_ws): New methods.
8173         (completion_tracker::m_suppress_append_ws): New field.
8174         (complete_source_filenames): New declaration.
8175         * linespec.c (linespec_complete_what): New.
8176         (struct ls_parser) <complete_what, completion_word,
8177         completion_quote_char, completion_quote_end, completion_tracker>:
8178         New fields.
8179         (string_find_incomplete_keyword_at_end): New.
8180         (linespec_lexer_lex_string): Record quote char.  If in completion
8181         mode, don't throw.
8182         (linespec_lexer_consume_token): Advance the completion word point.
8183         (linespec_lexer_peek_token): Save/restore completion info.
8184         (save_stream_and_consume_token): New.
8185         (set_completion_after_number): New.
8186         (linespec_parse_basic): Set what to complete next depending on
8187         token.  Handle function and label completions specially.
8188         (parse_linespec): Disable objc shortcut in completion mode.  Set
8189         what to complete next depending on token type.  Skip keyword if in
8190         completion mode.
8191         (complete_linespec_component, linespec_complete): New.
8192         * linespec.h (linespec_complete): Declare.
8193
8194 2017-07-17  Pedro Alves  <palves@redhat.com>
8195
8196         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8197         Handle 'operator<' / 'operator<<'.
8198
8199 2017-07-17  Pedro Alves  <palves@redhat.com>
8200
8201         * completer.c (collect_explicit_location_matches): Handle
8202         MATCH_LABEL.
8203         (convert_explicit_location_to_linespec): New, factored out from
8204         ...
8205         (convert_explicit_location_to_sals): ... this.
8206         (complete_label): New.
8207         (linespec_complete_label, find_label_symbols_in_block): New.
8208         (find_label_symbols): Add completion_mode parameter and adjust to
8209         call find_label_symbols_in_block.
8210         * linespec.h (linespec_complete_label): Declare.
8211
8212 2017-07-17  Pedro Alves  <palves@redhat.com>
8213
8214         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8215         complete_symbol_mode parameter.
8216         * cli/cli-cmds.c (complete_command): Get the completion result out
8217         of the handle_brkchars tracker if used a custom word point.
8218         * completer.c: Include "linespec.h".
8219         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8220         (advance_to_expression_complete_word_point): New.
8221         (completion_tracker::completes_to_completion_word): New.
8222         (complete_files_symbols): Pass down
8223         complete_symbol_mode::EXPRESSION.
8224         (explicit_options, probe_options): New.
8225         (collect_explicit_location_matches): Complete on the
8226         explictit_loc->foo instead of word.  Use
8227         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8228         keyword and options completions.
8229         (backup_text_ptr): Delete.
8230         (skip_keyword): New.
8231         (complete_explicit_location): Remove 'word' parameter.  Add
8232         language, quoted_arg_start and quoted_arg_end parameters.
8233         Rewrite, parsing left to right.
8234         (location_completer): Rewrite.
8235         (location_completer_handle_brkchars): New function.
8236         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8237         (enum complete_line_internal_reason): Adjust comments.
8238         (completion_tracker::discard_completions): New.
8239         (completer_handle_brkchars_func_for_completer): Handle
8240         location_completer.
8241         (gdb_custom_word_point_brkchars)
8242         (gdb_org_rl_basic_quote_characters): New.
8243         (gdb_completion_word_break_characters_throw)
8244         (completion_find_completion_word): Handle trackers that use a
8245         custom word point.
8246         (completion_tracker::advance_custom_word_point_by): New.
8247         (completion_tracker::build_completion_result): Don't rely on
8248         readline appending the quote char.
8249         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8250         use a custom word point.
8251         (gdb_rl_attempted_completion_function): Restore
8252         rl_basic_quote_characters.
8253         * completer.h (class completion_tracker): Extend intro comment.
8254         (completion_tracker::set_quote_char)
8255         (completion_tracker::quote_char)
8256         (completion_tracker::set_use_custom_word_point)
8257         (completion_tracker::use_custom_word_point)
8258         (completion_tracker::custom_word_point)
8259         (completion_tracker::set_custom_word_point)
8260         (completion_tracker::advance_custom_word_point_by)
8261         (completion_tracker::completes_to_completion_word)
8262         (completion_tracker::discard_completions): New methods.
8263         (completion_tracker::m_quote_char)
8264         (completion_tracker::m_use_custom_word_point)
8265         (completion_tracker::m_custom_word_point): New fields.
8266         (advance_to_expression_complete_word_point): Declare.
8267         * f-lang.c (f_collect_symbol_completion_matches): Add
8268         complete_symbol_mode parameter.
8269         * language.h (struct language_defn)
8270         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8271         parameter.
8272         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8273         (linespec_complete_function): New function.
8274         (linespec_lexer_lex_keyword): Adjust.
8275         * linespec.h (linespec_keywords, linespec_complete_function): New
8276         declarations.
8277         * location.c (find_end_quote): New function.
8278         (explicit_location_lex_one): Add explicit_completion_info
8279         parameter.  Save quoting info.  Don't throw if being called for
8280         completion.  Don't handle Ada operators here.
8281         (is_cp_operator, skip_op_false_positives, first_of)
8282         (explicit_location_lex_one_function): New function.
8283         (string_to_explicit_location): Replace 'dont_throw' parameter with
8284         an explicit_completion_info pointer parameter.  Handle it.  Don't
8285         use explicit_location_lex_one to lex function names.  Use
8286         explicit_location_lex_one_function instead.
8287         * location.h (struct explicit_completion_info): New.
8288         (string_to_explicit_location): Replace 'dont_throw' parameter with
8289         an explicit_completion_info pointer parameter.
8290         * symtab.c (default_collect_symbol_completion_matches_break_on):
8291         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8292         (default_collect_symbol_completion_matches)
8293         (collect_symbol_completion_matches): Add complete_symbol_mode
8294         parameter.
8295         (collect_symbol_completion_matches_type): Pass down
8296         complete_symbol_mode::EXPRESSION.
8297         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8298         parameter.  Handle LINESPEC mode.
8299         * symtab.h (complete_symbol_mode): New.
8300         (default_collect_symbol_completion_matches_break_on)
8301         (default_collect_symbol_completion_matches)
8302         (collect_symbol_completion_matches)
8303         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8304         parameter.
8305
8306 2017-07-17  Pedro Alves  <palves@redhat.com>
8307
8308         * utils.c (enum class strncmp_iw_mode): New.
8309         (strcmp_iw): Rename to ...
8310         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8311         parameters.  Handle them.
8312         (strncmp_iw): New.
8313         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8314         * utils.h (strncmp_iw): Declare.
8315         (strcmp_iw): Move describing comments here.
8316
8317 2017-07-17  Pedro Alves  <palves@redhat.com>
8318
8319         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8320         CP_OPERATOR_STR.
8321         * c-typeprint.c (is_type_conversion_operator): Use
8322         CP_OPERATOR_STR.
8323         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8324         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8325         CP_OPERATOR_LEN.
8326         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8327         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8328         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8329         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8330         CP_OPERATOR_STR.
8331         * location.c: Include "cp-support.h".
8332         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8333         CP_OPERATOR_STR.
8334         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8335         CP_OPERATOR_LEN.
8336
8337 2017-07-17  Pedro Alves  <palves@redhat.com>
8338
8339         * cli/cli-cmds.c (complete_command): Use a completion tracker
8340         along with completion_find_completion_word for handle_brkchars
8341         phase.
8342         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8343         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8344         (struct gdb_rl_completion_word_info): New.
8345         (gdb_rl_find_completion_word): New.
8346         (completion_find_completion_word): New.
8347         * completer.h (completion_find_completion_word): Declare.
8348
8349 2017-07-17  Pedro Alves  <palves@redhat.com>
8350
8351         * ada-lang.c (symbol_completion_match): Adjust comments.
8352         (symbol_completion_add): Replace vector parameter with
8353         completion_tracker parameter.  Use it.
8354         (ada_make_symbol_completion_list): Rename to...
8355         (ada_collect_symbol_completion_matches): ... this.  Add
8356         completion_tracker parameter and use it.
8357         (ada_language_defn): Adjust.
8358         * break-catch-syscall.c (catch_syscall_completer): Adjust
8359         prototype and work with completion_tracker instead of VEC.
8360         * breakpoint.c (condition_completer): Adjust prototype and work
8361         with completion_tracker instead of VEC.
8362         * c-lang.c (c_language_defn, cplus_language_defn)
8363         (asm_language_defn, minimal_language_defn): Adjust to renames.
8364         * cli/cli-cmds.c (complete_command): Rework using
8365         completion_tracker.  Catch exceptions when completing.
8366         * cli/cli-decode.c (integer_unlimited_completer)
8367         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8368         with completion_tracker instead of VEC.
8369         * command.h (struct completion_tracker): Forward declare.
8370         (completer_ftype, completer_handle_brkchars_ftype): Change
8371         types.
8372         (complete_on_cmdlist, complete_on_enum): Adjust.
8373         * completer.c: Include <algorithm>.
8374         (struct gdb_completer_state): New.
8375         (current_completion): New global.
8376         (readline_line_completion_function): Delete.
8377         (noop_completer, filename_completer)
8378         (filename_completer_handle_brkchars, complete_files_symbols)
8379         (linespec_location_completer): Adjust to work with a
8380         completion_tracker instead of a VEC.
8381         (string_or_empty): New.
8382         (collect_explicit_location_matches): Adjust to work with a
8383         completion_tracker instead of a VEC.
8384         (explicit_location_completer): Rename to ...
8385         (complete_explicit_location): ... this and adjust to work with a
8386         completion_tracker instead of a VEC.
8387         (location_completer): Adjust to work with a completion_tracker
8388         instead of a VEC.
8389         (add_struct_fields): Adjust to work with a completion_list instead
8390         of VEC.
8391         (expression_completer): Rename to ...
8392         (complete_expression): ... this and adjust to work with a
8393         completion_tracker instead of a VEC.  Use complete_files_symbols.
8394         (expression_completer): Reimplement on top of complete_expression.
8395         (symbol_completer): Adjust to work with a completion_tracker
8396         instead of a VEC.
8397         (enum complete_line_internal_reason): Add describing comments.
8398         (complete_line_internal_normal_command): Adjust to work with a
8399         completion_tracker instead of a VEC.
8400         (complete_line_internal): Rename to ...
8401         (complete_line_internal_1): ... this and adjust to work with a
8402         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8403         handle_brkchars phase.
8404         (new_completion_tracker): Delete.
8405         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8406         complete_line_internal_1.
8407         (free_completion_tracker): Delete.
8408         (INITIAL_COMPLETION_HTAB_SIZE): New.
8409         (completion_tracker::completion_tracker)
8410         (completion_tracker::~completion_tracker): New.
8411         (maybe_add_completion): Delete.
8412         (completion_tracker::maybe_add_completion)
8413         (completion_tracker::add_completion)
8414         (completion_tracker::add_completions): New.
8415         (throw_max_completions_reached_error): Delete.
8416         (complete_line): Adjust to work with a completion_tracker instead
8417         of a VEC.  Don't create a completion_tracker_t or check for max
8418         completions here.
8419         (command_completer, command_completer_handle_brkchars)
8420         (signal_completer, reg_or_group_completer_1)
8421         (reg_or_group_completer, default_completer_handle_brkchars):
8422         Adjust to work with a completion_tracker.
8423         (gdb_completion_word_break_characters_throw): New.
8424         (gdb_completion_word_break_characters): Reimplement.
8425         (line_completion_function): Delete.
8426         (completion_tracker::recompute_lowest_common_denominator)
8427         (expand_preserving_ws)
8428         (completion_tracker::build_completion_result)
8429         (completion_result::completion_result)
8430         (completion_result::completion_result)
8431         (completion_result::~completion_result)
8432         (completion_result::completion_result)
8433         (completion_result::release_match_list, compare_cstrings)
8434         (completion_result::sort_match_list)
8435         (completion_result::reset_match_list)
8436         (gdb_rl_attempted_completion_function_throw)
8437         (gdb_rl_attempted_completion_function): New.
8438         * completer.h (completion_list, struct completion_result)
8439         (class completion_tracker): New.
8440         (complete_line): Add completion_tracker parameter.
8441         (readline_line_completion_function): Delete.
8442         (gdb_rl_attempted_completion_function): New.
8443         (noop_completer, filename_completer, expression_completer)
8444         (location_completer, symbol_completer, command_completer)
8445         (signal_completer, reg_or_group_completer): Update prototypes.
8446         (completion_tracker_t, new_completion_tracker)
8447         (make_cleanup_free_completion_tracker): Delete.
8448         (enum maybe_add_completion_enum): Delete.
8449         (maybe_add_completion): Delete.
8450         (throw_max_completions_reached_error): Delete.
8451         * corefile.c (complete_set_gnutarget): Adjust to work with a
8452         completion_tracker instead of a VEC.
8453         * cp-abi.c (cp_abi_completer): Adjust to work with a
8454         completion_tracker instead of a VEC.
8455         * d-lang.c (d_language_defn): Adjust.
8456         * disasm.c (disassembler_options_completer): Adjust to work with a
8457         completion_tracker instead of a VEC.
8458         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8459         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8460         with a completion_tracker instead of a VEC.
8461         (f_language_defn): Adjust.
8462         * go-lang.c (go_language_defn): Adjust.
8463         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8464         Adjust to work with a completion_tracker instead of a VEC.
8465         * infrun.c (handle_completer): Likewise.
8466         * interps.c (interpreter_completer): Likewise.
8467         * interps.h (interpreter_completer): Likewise.
8468         * language.c (unknown_language_defn, auto_language_defn)
8469         (local_language_defn): Adjust.
8470         * language.h (language_defn::la_make_symbol_completion_list):
8471         Rename to ...
8472         (language_defn::la_collect_symbol_completion_matches): ... this
8473         and adjust to work with a completion_tracker instead of a VEC.
8474         * m2-lang.c (m2_language_defn): Adjust.
8475         * objc-lang.c (objc_language_defn): Adjust.
8476         * opencl-lang.c (opencl_language_defn): Adjust.
8477         * p-lang.c (pascal_language_defn): Adjust.
8478         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8479         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8480         with a completion_tracker.
8481         * rust-lang.c (rust_language_defn): Adjust.
8482         * symtab.c (free_completion_list, do_free_completion_list)
8483         (return_val, completion_tracker): Delete.
8484         (completion_list_add_name, completion_list_add_symbol)
8485         (completion_list_add_msymbol, completion_list_objc_symbol)
8486         (completion_list_add_fields, add_symtab_completions): Add
8487         completion_tracker parameter and use it.
8488         (default_make_symbol_completion_list_break_on_1): Rename to...
8489         (default_collect_symbol_completion_matches_break_on): ... this.
8490         Add completion_tracker parameter and use it instead of allocating
8491         a completion tracker here.
8492         (default_make_symbol_completion_list_break_on): Delete old
8493         implementation.
8494         (default_make_symbol_completion_list): Delete.
8495         (default_collect_symbol_completion_matches): New.
8496         (make_symbol_completion_list): Delete.
8497         (collect_symbol_completion_matches): New.
8498         (make_symbol_completion_type): Rename to ...
8499         (collect_symbol_completion_matches_type): ... this.  Add
8500         completion_tracker parameter and use it instead of VEC.
8501         (make_file_symbol_completion_list_1): Rename to...
8502         (collect_file_symbol_completion_matches): ... this.  Add
8503         completion_tracker parameter and use it instead of VEC.
8504         (make_file_symbol_completion_list): Delete.
8505         (add_filename_to_list): Use completion_list instead of a VEC.
8506         (add_partial_filename_data::list): Now a completion_list.
8507         (make_source_files_completion_list): Work with a completion_list
8508         instead of a VEC.
8509         * symtab.h: Include "completer.h".
8510         (default_make_symbol_completion_list_break_on)
8511         (default_make_symbol_completion_list, make_symbol_completion_list)
8512         (make_symbol_completion_type, make_file_symbol_completion_list)
8513         (make_source_files_completion_list): Delete.
8514         (default_collect_symbol_completion_matches_break_on)
8515         (default_collect_symbol_completion_matches)
8516         (collect_symbol_completion_matches)
8517         (collect_symbol_completion_matches_type)
8518         (collect_file_symbol_completion_matches)
8519         (make_source_files_completion_list): New.
8520         * top.c (init_main): Don't install a rl_completion_entry_function
8521         hook.  Install a rl_attempted_completion_function hook instead.
8522         * tui/tui-layout.c (layout_completer): Adjust to work with a
8523         completion_tracker.
8524         * tui/tui-regs.c (tui_reggroup_completer):
8525         * tui/tui-win.c (window_name_completer, focus_completer)
8526         (winheight_completer): Adjust to work with a completion_tracker.
8527         * value.c: Include "completer.h".
8528         (complete_internalvar): Adjust to work with a completion_tracker.
8529         * value.h (complete_internalvar): Likewise.
8530
8531 2017-07-17  Pedro Alves  <palves@redhat.com>
8532
8533         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8534         renames.
8535         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8536         comments to completer_ftype's declaration.
8537         <completer_handle_brkchars>: Change type to
8538         completer_handle_brkchars_ftype.
8539         * command.h (completer_ftype): Add describing comment and give
8540         names to parameters.
8541         (completer_ftype_void): Rename to ...
8542         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8543         (set_cmd_completer_handle_brkchars): Adjust.
8544         * completer.c (filename_completer_handle_brkchars): New function.
8545         (complete_line_internal_normal_command): New function, factored
8546         out from ...
8547         (complete_line_internal): ... here.
8548         (command_completer_handle_brkchars)
8549         (default_completer_handle_brkchars)
8550         (completer_handle_brkchars_func_for_completer): New functions.
8551         * completer.h (set_gdb_completion_word_break_characters): Delete
8552         declaration.
8553         (completer_handle_brkchars_func_for_completer): New declaration.
8554         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8555         completer_handle_brkchars_func_for_completer.
8556
8557 2017-07-17  Pedro Alves  <palves@redhat.com>
8558
8559         * completer.c (symbol_completer): New function, based on
8560         make_symbol_completion_list_fn.
8561         * completer.h (symbol_completer): New declaration.
8562         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8563         * python/py-cmd.c (completers): Adjust.
8564         * symtab.c (make_symbol_completion_list_fn): Delete.
8565         * symtab.h (make_symbol_completion_list_fn): Delete.
8566         * cli/cli-decode.c (add_cmd): Adjust.
8567
8568 2017-07-17  Pedro Alves  <palves@redhat.com>
8569
8570         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8571         * dwarf2read.c: Include "filename-seen-cache.h".
8572         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8573         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8574         * filename-seen-cache.c: New file.
8575         * filename-seen-cache.h: New file.
8576         * symtab.c: Include "filename-seen-cache.h".
8577         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8578         (create_filename_seen_cache, clear_filename_seen_cache)
8579         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8580         to filename-seen-cache.h/filename-seen-cache.c.
8581         (output_source_filename, sources_info)
8582         (maybe_add_partial_symtab_filename)
8583         (make_source_files_completion_list): Adjust to use
8584         filename_seen_cache.
8585
8586 2017-07-17  Pedro Alves  <palves@redhat.com>
8587
8588         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8589         fields.
8590         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8591         dwarf2_debug_sections*)): New.
8592         (dwarf2_per_objfile::dwarf2_per_objfile(const
8593         dwarf2_per_objfile&)): Declare as deleted.
8594         (dwarf2_per_objfile::operator=): Declare as deleted.
8595         (dwarf2_per_objfile::dwarf2_per_objfile)
8596         (dwarf2_per_objfile::~dwarf2_per_objfile)
8597         (dwarf2_per_objfile::free_cached_comp_units): New.
8598         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8599         ctor.  Call dwarf2_per_objfile's ctor manually.
8600         (dwarf2_locate_sections): Deleted/refactored as ...
8601         (dwarf2_per_objfile::locate_sections): ... this new method.
8602         (free_cached_comp_units): Defer to
8603         dwarf2_per_objfile::free_cached_comp_units.
8604         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8605
8606 2017-07-14  Tom Tromey  <tom@tromey.com>
8607
8608         PR rust/21764:
8609         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8610         parameter.
8611         <UNOP_SIZEOF>: Split into separate case.
8612         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8613
8614 2017-07-14  Tom Tromey  <tom@tromey.com>
8615
8616         PR rust/21763:
8617         * symtab.c (symbol_matches_domain): Add language_rust to special
8618         case.
8619         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8620         treat LOC_TYPEDEF symbols as variables.
8621
8622 2017-07-14  Pedro Alves  <palves@redhat.com>
8623
8624         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8625         symtabs matching all symtabs with SRCFILE as file name instead of
8626         only considering the first hit, with lookup_symtab.
8627
8628 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8629
8630         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8631         operator_name parameters.
8632         (gen_expr): Update function call.
8633
8634 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8635
8636         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8637         parameter.
8638         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8639         Likewise.
8640         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8641         parameter, use agent_expr::gdbarch instead, update function
8642         calls.
8643         (locexpr_tracepoint_var_ref): Likewise.
8644         (loclist_tracepoint_var_ref): Likewise.
8645         * ax-gdb.c (gen_trace_static_fields): Likewise.
8646         (gen_traced_pop): Likewise.
8647         (gen_frame_args_address): Likewise.
8648         (gen_frame_locals_address): Likewise.
8649         (gen_var_ref): Likewise.
8650         (gen_struct_ref_recursive): Likewise.
8651         (gen_static_field): Likewise.
8652         (gen_maybe_namespace_elt): Likewise.
8653         (gen_expr): Likewise.
8654         (gen_trace_for_var): Likewise.
8655         (gen_trace_for_expr): Likewise.
8656         (gen_trace_for_return_address): Likewise.
8657
8658 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8659
8660         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8661         parameter.
8662         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8663
8664 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8665
8666         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8667         from ax, update calls.
8668         (gen_usual_arithmetic): Likewise.
8669         (gen_integral_promotions): Likewise.
8670         (gen_bitfield_ref): Likewise.
8671         (gen_primitive_field): Likewise.
8672         (gen_struct_ref_recursive): Likewise.
8673         (gen_struct_ref): Likewise.
8674         (gen_maybe_namespace_elt): Likewise.
8675         (gen_struct_elt_for_reference): Likewise.
8676         (gen_namespace_elt): Likewise.
8677         (gen_aggregate_elt_ref): Likewise.
8678         (gen_expr): Get gdbarch from ax, update calls.
8679         (gen_expr_binop_rest): Likewise.
8680
8681 2017-07-13  Pedro Alves  <palves@redhat.com>
8682
8683         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8684         as default tdesc.
8685         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8686         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8687         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8688         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8689         tdep.
8690         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8691         Get final tdesc from the tdep.
8692         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8693         default tdesc.
8694         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8695         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8696         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8697         Use it as default tdesc.
8698         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8699         down to amd_init_abi.  No longer handle fallback tdesc here.
8700         * amd64-tdep.h (tdesc_x32): Declare.
8701         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8702         parameter.
8703         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8704         as default tdesc.
8705
8706 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8707
8708         * s390-linux-tdep.c (s390_process_record): Add support for
8709         instructions new in arch12.
8710
8711 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8712
8713         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8714         PT_GETFSBASE and PT_GETGSBASE.
8715         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8716         PT_SETGSBASE.
8717
8718 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8719
8720         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8721         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8722         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8723         those rules.
8724         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8725         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8726         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8727         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8728         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8729         * features/i386/amd64.xml: Add 64bit-segments.xml.
8730         * features/i386/amd64-avx-avx512.c: Regenerated.
8731         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8732         * features/i386/amd64-avx-mpx.c: Regenerated.
8733         * features/i386/amd64-avx.c: Regenerated.
8734         * features/i386/amd64-mpx.c: Regenerated.
8735         * features/i386/amd64.c: Regenerated.
8736         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8737         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8738         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8739         * regformats/i386/amd64-avx.dat: Regenerated.
8740         * regformats/i386/amd64-mpx.dat: Regenerated.
8741         * regformats/i386/amd64.dat: Regenerated.
8742
8743 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8744
8745         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8746         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8747
8748 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8749
8750         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8751         unsetenv.
8752         * gnulib/aclocal.m4: Regenerate.
8753         * gnulib/config.in: Regenerate.
8754         * gnulib/configure: Regenerate.
8755         * gnulib/import/Makefile.am: Regenerate.
8756         * gnulib/import/Makefile.in: Regenerate.
8757         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8758         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8759         * gnulib/import/m4/environ.m4: New file.
8760         * gnulib/import/m4/setenv.m4: New file.
8761         * gnulib/import/setenv.c: New file.
8762         * gnulib/import/unsetenv.c: New file.
8763
8764 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8765
8766         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8767         address when op is DW_OP_addr.
8768
8769 2017-07-09  Tom Tromey  <tom@tromey.com>
8770
8771         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8772         check and apply to outer type.
8773
8774 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8775
8776         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8777         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8778         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8779         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8780
8781 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8782
8783         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8784
8785 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8786
8787         * corelow.c (get_core_siginfo): Remove.
8788         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8789         instead of get_core_siginfo.
8790         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8791         * gdbarch.h: Re-generate.
8792         * gdbarch.c: Re-generate.
8793         * linux-tdep.c (linux_core_xfer_siginfo): New.
8794         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8795
8796 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8797
8798         * corelow.c (thread_section_name): Move to ...
8799         * gdbcore.h (thread_section_name): ... here.
8800
8801 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8802
8803         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8804         (struct siginfo32): New.
8805         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8806         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8807         via ptrace(PT_LWPINFO).
8808
8809 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8810
8811         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8812         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8813         (fbsd_get_siginfo_type): New.
8814         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8815         (_initialize_fbsd_tdep): New.
8816
8817 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8818
8819         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8820         a singular dwo_unit*) to support multiple CUs in the same way that
8821         multiple TUs are supported.
8822         (create_cus_hash_table): Replace create_dwo_cu with a function for
8823         parsing multiple CUs from a DWO file.
8824         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8825         create_dwo_cu.
8826         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8827         htab_find, rather than comparing the signature to a singleton CU in
8828         the dwo_file.
8829
8830 2017-07-06  Pedro Alves  <palves@redhat.com>
8831
8832         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8833
8834 2017-07-04  Pedro Alves  <palves@redhat.com>
8835
8836         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8837         * gdbtypes.h (TYPE_STATIC): Delete.
8838         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8839         is_synchronized, is_native>: Delete.
8840         <dummy>: Bump.
8841         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8842         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8843         (TYPE_FN_FIELD_ABSTRACT): Delete.
8844
8845 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8846
8847         * buffer.h (buffer_finish): Fix spelling mistakes.
8848
8849 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8850
8851         * .dir-locals.el: Automatically switch to C-style comments in
8852         versions of Emacs that support the feature.
8853
8854 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8855             Pedro Alves  <palves@redhat.com>
8856
8857         PR cli/21688
8858         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8859         (process_next_line): New variable 'inline_cmd'.
8860         Adjust 'if' clauses for "python", "compile" and "guile" to use
8861         'command_name_equals' and check for '!inline_cmd'.
8862
8863 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8864
8865         PR cli/21688
8866         * cli/cli-script.c (command_name_equals_not_inline): New function.
8867         (process_next_line): Adjust 'if' clauses for "python", "compile"
8868         and "guile" to use command_name_equals_not_inline.
8869
8870 2017-06-29  Pedro Alves  <palves@redhat.com>
8871
8872         * completer.c (expression_completer): Call
8873         linespec_location_completer instead of location_completer.
8874
8875 2017-06-29  Pedro Alves  <palves@redhat.com>
8876
8877         * completer.c (expression_completer): Remove code that recomputes
8878         'text' from 'word'.
8879
8880 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8881
8882         * regformats/regdat.sh: Generate code with
8883         "ifndef IN_PROCESS_AGENT".
8884
8885 2017-06-28  Pedro Alves  <palves@redhat.com>
8886
8887         * command.h: Include "common/scoped_restore.h".
8888
8889 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8890
8891         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8892         instead of obstack_grow.
8893
8894 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8895
8896         PR gdb/21337
8897         * symfile.c (reread_symbols): Call objfiles_changed just before
8898         read_symbols.
8899
8900 2017-06-27  Pedro Alves  <palves@redhat.com>
8901
8902         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8903         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8904         (completion_list_add_symbol, completion_list_add_msymbol):
8905         ... these new functions.
8906         (add_symtab_completions)
8907         (default_make_symbol_completion_list_break_on_1): Adjust.
8908
8909 2017-06-27  Pedro Alves  <palves@redhat.com>
8910
8911         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8912         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8913         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8914         dtor.
8915         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8916         'storage_obstack' field an auto_obstack.  In-class initialize all
8917         non-bitfield fields.  Make minsyms_read bool.
8918         * symfile.c (read_symbols): Adjust.
8919
8920 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8921
8922         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8923         (gdbsim_store_register): Likewise.
8924
8925 2017-06-27  Pedro Alves  <palves@redhat.com>
8926
8927         * c-exp.y (name_obstack): Now an auto_obstack.
8928         (yylex): Use auto_obstack::clear.
8929         (c_parse): Use auto_obstack::clear instead of reinitializing and
8930         freeing the obstack.
8931         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8932         * d-exp.y (name_obstack): Now an auto_obstack.
8933         (yylex): Use auto_obstack::clear.
8934         (d_parse): Use auto_obstack::clear instead of reinitializing and
8935         freeing the obstack.
8936         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8937         auto_obstack.
8938         * dwarf2read.c (create_addrmap_from_index)
8939         (dwarf2_build_psymtabs_hard)
8940         (update_enumeration_type_from_children): Likewise.
8941         * gdb_obstack.h (auto_obstack): New type.
8942         * go-exp.y (name_obstack): Now an auto_obstack.
8943         (build_packaged_name): Use auto_obstack::clear.
8944         (go_parse): Use auto_obstack::clear instead of reinitializing and
8945         freeing the obstack.
8946         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8947         auto_obstack.
8948         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8949         * rust-exp.y (work_obstack): Now an auto_obstack.
8950         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8951         reinitializing and freeing the obstack.
8952         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8953         (host_char_to_target): Use auto_obstack.
8954         * utils.h (make_cleanup_obstack_free): Delete declaration.
8955         * valprint.c (generic_emit_char, generic_printstr): Use
8956         auto_obstack.
8957
8958 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8959
8960         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8961         thread.
8962         (darwin_init_thread_list): Don't update dummy thread.
8963         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8964
8965 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8966
8967         * record-full.c (netorder16): Remove.
8968
8969 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8970
8971         * common/diagnostics.h: Define macros for GCC.
8972         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8973         * common/vec.h: Include diagnostics.h.
8974         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8975         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8976         warning.
8977
8978 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8979
8980         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8981         New macro.
8982         * ada-lex.l: Ignore deprecated register warnings.
8983
8984 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8987         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8988
8989 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8990
8991         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8992         its own line.
8993
8994 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8995
8996         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8997
8998 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8999
9000         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9001         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9002         (xtensa_register_read_masked): Likewise.
9003
9004 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9005
9006         * common/environ.c (gdb_environ::unset): Update comment.
9007
9008 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9009
9010         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9011         registers.
9012
9013 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9014
9015         * record-full.c (record_full_exec_insn): Use byte_vector.
9016
9017 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9018
9019         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9020         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9021
9022 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9023
9024         * remote.c (cached_reg): Move from here...
9025         * regcache.h (cached_reg): ...to here.
9026         * python/py-unwind.c (struct reg_info): Remove.
9027         (cached_frame_info): Use cached_reg_t.
9028         (pyuw_prev_register): Likewise.
9029         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9030         (pyuw_dealloc_cache): Free all registers.
9031
9032 2017-06-22  Pedro Alves  <palves@redhat.com>
9033             Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9036         warning.
9037         * common/diagnostics.h: New file.
9038
9039 2017-06-22  Pedro Alves  <palves@redhat.com>
9040
9041         * common/agent.h: Add include guards.
9042
9043 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9044
9045         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9046         talk about addressable units instead of bytes.
9047
9048 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9049
9050         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9051         of '::const_iterator'.
9052
9053 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9054
9055         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9056         'unittests/environ-selftests.c'.
9057         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9058         * charset.c (find_charset_names): Declare object 'iconv_env'.
9059         Update code to use 'iconv_env' object.  Remove call to
9060         'free_environ'.
9061         * common/environ.c: Include <utility>.
9062         (make_environ): Delete function.
9063         (free_environ): Delete function.
9064         (gdb_environ::clear): New function.
9065         (gdb_environ::operator=): New function.
9066         (gdb_environ::get): Likewise.
9067         (environ_vector): Delete function.
9068         (set_in_environ): Delete function.
9069         (gdb_environ::set): New function.
9070         (unset_in_environ): Delete function.
9071         (gdb_environ::unset): New function.
9072         (gdb_environ::envp): Likewise.
9073         * common/environ.h: Include <vector>.
9074         (struct gdb_environ): Delete; transform into...
9075         (class gdb_environ): ... this class.
9076         (free_environ): Delete prototype.
9077         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9078         environ_vector): Likewise.
9079         * infcmd.c (run_command_1): Update code to call
9080         'envp' from 'gdb_environ' class.
9081         (environment_info): Update code to call methods from 'gdb_environ'
9082         class.
9083         (unset_environment_command): Likewise.
9084         (path_info): Likewise.
9085         (path_command): Likewise.
9086         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9087         (inferior::inferior): Initialize 'environment' using the host's
9088         information.
9089         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9090         Include "environ.h".
9091         (class inferior) <environment>: Change type from 'struct
9092         gdb_environ' to 'gdb_environ'.
9093         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9094         methods from 'gdb_environ' class.
9095         * solib.c (solib_find_1): Likewise
9096         * unittests/environ-selftests.c: New file.
9097
9098 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9099
9100         * features/i386/i386-linux.xml: Exchange the order of including
9101         32bit-linux.xml and 32bit-sse.xml.
9102         * features/i386/i386-linux.c: Regenerated.
9103
9104 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9105
9106         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9107         Delete copy ctor and assignment operator.
9108         (tdesc_type): Likewise.
9109         (tdesc_feature): Likewise.
9110         (tdesc_free_reg): Remove.
9111         (tdesc_create_reg): Use new.
9112         (tdesc_free_type): Remove.
9113         (tdesc_create_vector): Use new.
9114         (tdesc_create_union): Likewise.
9115         (tdesc_create_flags): Likewise.
9116         (tdesc_create_enum): Likewise.
9117         (tdesc_free_feature): Delete.
9118         (free_target_description): Use delete.
9119
9120 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9121
9122         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9123         registers.
9124
9125 2017-06-19  Pedro Alves  <palves@redhat.com>
9126
9127         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9128         after gdb::unlinker.
9129
9130 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9131
9132         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9133         gdb_environ to access an environment variable.
9134
9135 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9136
9137         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9138         gdb_byte*.
9139
9140 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9141
9142         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9143
9144 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9145
9146         * configure: Re-generate.
9147         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9148
9149 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9150
9151         * configure: Re-generate.
9152         * warning.m4: Pass -Werror to compiler when checking for
9153         supported warning flags.
9154
9155 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9156
9157         * Makefile.in (COMPILE.pre): Add "-x c++".
9158
9159 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9160             Pedro Alves  <palves@redhat.com>
9161             Yao Qi  <yao.qi@linaro.org>
9162
9163         * defs.h (RequireLongest): New.
9164         (extract_integer): Declare function template.
9165         (extract_signed_integer): Remove the declaration, but define it
9166         static inline.
9167         (extract_unsigned_integer): Likewise.
9168         (store_integer): Declare function template.
9169         (store_signed_integer): Remove the declaration, but define it
9170         static inline.
9171         (store_unsigned_integer): Likewise.
9172         * findvar.c (extract_integer): New function template.
9173         (extract_signed_integer): Remove.
9174         (extract_unsigned_integer): Remove.
9175         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9176         instantiations.
9177         (store_integer): New function template.
9178         (store_signed_integer): Remove.
9179         (store_unsigned_integer): Remove.
9180         (store_integer): Explicit instantiations.
9181         * regcache.c (regcache_raw_read_signed): Update.
9182         (regcache::raw_read): New function.
9183         (regcache::raw_read_signed): Remove.
9184         (regcache::raw_read_unsigned): Remove.
9185         (regcache_raw_read_unsigned): Update.
9186         (regcache_raw_write_unsigned): Update.
9187         (regcache::raw_write_signed): Remove.
9188         (regcache::raw_write): New function.
9189         (regcache_cooked_read_signed): Update.
9190         (regcache::raw_write_unsigned): Remove.
9191         (regcache::cooked_read_signed): Remove.
9192         (regcache_cooked_read_unsigned): Update.
9193         (regcache::cooked_read_unsigned): Remove.
9194         (regcache_cooked_write_signed): Update.
9195         (regcache_cooked_write_unsigned): Update.
9196         * regcache.h (regcache) <raw_read_signed>: Remove.
9197         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9198         <raw_read, raw_write>: New.
9199         <cooked_read_signed, cooked_write_signed>: Remove.
9200         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9201         <cooked_read, cooked_write>: New.
9202         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9203         (sh64_pseudo_register_write): Update.
9204
9205 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9206
9207         * arc-tdep.c (arc_disassembler_options): New variable.
9208         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9209         of default_print_insn.
9210         (arc_delayed_print_insn): Set info->section when needed,
9211         use default_print_insn to retrieve a disassembler.
9212
9213 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9214
9215         PR gdb/21574
9216         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9217         to mention $SHELL and startup-with-shell.
9218
9219 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9220
9221         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9222
9223 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9224
9225         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9226         default_print_insn instead of print_insn_aarch64.
9227         * arm-tdep.c (gdb_print_insn_arm): Call
9228         default_print_insn instead of print_insn_big_arm
9229         and print_insn_little_arm.
9230         * i386-tdep.c (i386_print_insn): Call default_print_insn
9231         instead of print_insn_i386.
9232         * ia64-tdep.c (ia64_print_insn): Call
9233         default_print_insn instead of print_insn_ia64.
9234         * mips-tdep.c (gdb_print_insn_mips): Call
9235         default_print_insn instead of print_insn_big_mips
9236         and print_insn_little_mips.
9237         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9238         instead of print_insn_spu.
9239
9240 2017-06-14  Pedro Alves  <palves@redhat.com>
9241
9242         * ada-lang.c: Include "common/byte-vector.h".
9243         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9244         * charset.c (wchar_iterator::iterate): Resize the vector instead
9245         of reserving it.
9246         * common/byte-vector.h: Include "common/def-vector.h".
9247         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9248         * cli/cli-dump.c: Include "common/byte-vector.h".
9249         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9250         * common/byte-vector.h: New file.
9251         * common/def-vector.h: New file.
9252         * common/default-init-alloc.h: New file.
9253         * dwarf2loc.c: Include "common/byte-vector.h".
9254         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9255         instead of reserving it.
9256         * dwarf2read.c: Include "common/byte-vector.h".
9257         (data_buf::m_vec): Now a gdb::byte_vector.
9258         * gdb_regex.c: Include "common/def-vector.h".
9259         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9260         * mi/mi-main.c: Include "common/byte-vector.h".
9261         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9262         * printcmd.c: Include "common/byte-vector.h".
9263         (print_scalar_formatted): Use gdb::byte_vector.
9264         * valprint.c: Include "common/byte-vector.h".
9265         (maybe_negate_by_bytes, print_decimal_chars): Use
9266         gdb::byte_vector.
9267
9268 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9269
9270         * darwin-nat.c: Include "nat/fork-inferior.h".
9271
9272 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9273
9274         * configure.nat: Factor out Darwin bits that are not
9275         architecture-specific.  Add fork-inferior.o.
9276
9277 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9278
9279         * configure.nat: Factor out AIX bits that are not
9280         architecture-specific.  Add fork-inferior.o.
9281
9282 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9283
9284         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9285         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9286         wrappers that just call rw_pieced_value.
9287
9288 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9289
9290         * dwarf2loc.c (write_pieced_value): When writing the data for a
9291         memory piece, use write_memory_with_notification instead of
9292         write_memory.
9293
9294 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9295
9296         * valops.c (read_value_memory): Change embedded_offset to
9297         represent a bit offset instead of a byte offset.
9298         * value.h (read_value_memory): Adjust comment.
9299
9300 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9301
9302         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9303         dest_offset_bits and source_offset_bits.
9304         (write_pieced_value): Likewise.
9305
9306 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9307
9308         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9309         given by DW_OP_bit_piece.
9310         (write_pieced_value): Likewise.
9311
9312 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9313
9314         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9315         some other preparations to the places where sufficient information
9316         is available.
9317         (write_pieced_value): Likewise.
9318
9319 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9320
9321         * dwarf2loc.c (bits_to_bytes): New function.
9322         (read_pieced_value): Fix offset calculations for register pieces
9323         on big-endian targets.
9324         (write_pieced_value): Likewise.
9325
9326 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9327
9328         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9329         (write_pieced_value): Likewise.
9330
9331 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9332
9333         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9334         transfer the source value's least significant bits, instead of its
9335         lowest-addressed ones.  Rename type_len to max_offset.
9336         (read_pieced_value): Mirror above changes to write_pieced_value as
9337         applicable.
9338
9339 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9340
9341         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9342         truncate full bytes from dest_offset_bits before using it as an
9343         offset into the buffer.
9344
9345 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9346
9347         * dwarf2loc.c (write_pieced_value): Include transfer size in
9348         byte-wise check.
9349
9350 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9351
9352         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9353         calculation of this_size.
9354
9355 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9356
9357         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9358         when targeting a bit-field.
9359         (write_pieced_value): Likewise.
9360
9361 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9362
9363         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9364         (allocate_piece_closure): Drop addr_size parameter.
9365         (dwarf2_evaluate_loc_desc_full): Adjust call to
9366         allocate_piece_closure.
9367
9368 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9369
9370         PR gdb/21226
9371         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9372         the LSB end, independent of endianness.
9373
9374 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9375
9376         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9377         size capping.
9378
9379 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9380
9381         * mips-linux-nat.c: Move include features/mips*-linux.c to
9382         mips-linux-tdep.c.
9383         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9384         to mips-linux-tdep.c.
9385         * mips-linux-tdep.c: Include features/mips*-linux.c
9386         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9387         functions.
9388         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9389         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9390         (tdesc_mips64_dsp_linux): Declare.
9391
9392 2017-06-12  Tom Tromey  <tom@tromey.com>
9393
9394         * valprint.h (val_print_type_code_int): Remove.
9395         * valprint.c (generic_val_print_int): Always call
9396         val_print_scalar_formatted.
9397         (val_print_type_code_int): Remove.
9398         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9399         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9400         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9401         * ada-valprint.c (ada_val_print_num): Use
9402         val_print_scalar_formatted.
9403
9404 2017-06-12  Tom Tromey  <tom@tromey.com>
9405
9406         * printcmd.c (print_scalar_formatted): Unify the two switches.
9407         Don't convert scalars to LONGEST.
9408
9409 2017-06-12  Tom Tromey  <tom@tromey.com>
9410
9411         PR exp/16225:
9412         * valprint.h (print_decimal_chars): Update.
9413         * valprint.c (maybe_negate_by_bytes): New function.
9414         (print_decimal_chars): Add "is_signed" argument.
9415         * printcmd.c (print_scalar_formatted): Update.
9416
9417 2017-06-12  Tom Tromey  <tom@tromey.com>
9418
9419         PR exp/16225:
9420         * valprint.h (print_binary_chars, print_hex_chars): Update.
9421         * valprint.c (val_print_type_code_int): Update.
9422         (print_binary_chars): Add "zero_pad" argument.
9423         (emit_octal_digit): New function.
9424         (print_octal_chars): Don't zero-pad.
9425         (print_decimal_chars): Likewise.
9426         (print_hex_chars): Add "zero_pad" argument.
9427         * sh64-tdep.c (sh64_do_fp_register): Update.
9428         * regcache.c (regcache::dump): Update.
9429         * printcmd.c (print_scalar_formatted): Update.
9430         * infcmd.c (default_print_one_register_info): Update.
9431
9432 2017-06-12  Pedro Alves  <palves@redhat.com>
9433             Alan Hayward  <alan.hayward@arm.com>
9434
9435         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9436         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9437         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9438         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9439         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9440
9441 2017-06-12  Pedro Alves  <palves@redhat.com>
9442
9443         * dwarf2read.c (mapped_symtab::data): Now a vector of
9444         symtab_index_entry instead of vector of
9445         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9446         whether an element's name is NULL instead of checking whether the
9447         element itself is NULL.
9448         (find_slot): Change return type.  Adjust.
9449         (hash_expand, , add_index_entry, uniquify_cu_indices)
9450         (write_hash_table): Adjust.
9451
9452 2017-06-12  Pedro Alves  <palves@redhat.com>
9453
9454         * dwarf2read.c (recursively_count_psymbols): New function.
9455         (write_psymtabs_to_index): Call it to compute number of psyms and
9456         pass estimate size of psyms_seen to unordered_set's ctor.
9457
9458 2017-06-12  Pedro Alves  <palves@redhat.com>
9459
9460         * dwarf2read.c (write_hash_table): Check if key already exists
9461         before emplacing.
9462
9463 2017-06-12  Pedro Alves  <palves@redhat.com>
9464
9465         * dwarf2read.c (data_buf::append_space): Rename to...
9466         (data_buf::grow): ... this, and make private.  Adjust all callers.
9467         (data_buf::append_uint): New method.
9468         (add_address_entry, write_one_signatured_type)
9469         (write_psymtabs_to_index): Use it.
9470
9471 2017-06-12  Pedro Alves  <palves@redhat.com>
9472
9473         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9474         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9475         (data_buf::file_write): Call ::fwrite directly.
9476
9477 2017-06-12  Pedro Alves  <palves@redhat.com>
9478
9479         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9480         std::vector::erase.
9481
9482 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9483
9484         Code cleanup: C++ify .gdb_index producer.
9485         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9486         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9487         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9488         (create_strtab, add_string): Remove.
9489         (file_write, data_buf): New.
9490         (struct symtab_index_entry): Use std::vector for cu_indices.
9491         (struct mapped_symtab): Use std::vector for data.
9492         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9493         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9494         Remove.
9495         (find_slot): Change return type.  Update it to the new data structures.
9496         (hash_expand, add_index_entry): Update it to the new data structures.
9497         (offset_type_compare): Remove.
9498         (uniquify_cu_indices): Update it to the new data structures.
9499         (c_str_view, c_str_view_hasher, vector_hasher): New.
9500         (add_indices_to_cpool): Remove.
9501         (write_hash_table): Update it to the new data structures.
9502         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9503         (eq_psymtab_cu_index): Remove.
9504         (psym_index_map): New typedef.
9505         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9506         reference and std::unordered_map for cu_index_htab.
9507         (add_address_entry, add_address_entry_worker, write_address_map)
9508         (write_psymbols): Update it to the new data structures.
9509         (write_obstack): Remove.
9510         (struct signatured_type_index_data): Change types_list to a data_buf
9511         reference and psyms_seen to a std::unordered_set reference.
9512         (write_one_signatured_type, recursively_write_psymbols)
9513         (write_psymtabs_to_index): Update it to the new data structures.
9514
9515 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9516
9517         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9518         separate-debug-file commands.
9519         * symfile.h (separate_debug_file_debug): New global.
9520         * symfile.c (separate_debug_file_debug): New global.
9521         (separate_debug_file_exists, find_separate_debug_file): Add
9522         debug output.
9523         (_initialize_symfile): Add "set debug separate-debug-file"
9524         command.
9525         * build-id.c (build_id_to_debug_bfd,
9526         find_separate_debug_file_by_buildid): Add debug output.
9527
9528 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9529
9530         * gdbarch.sh (displaced_step_free_closure): Remove.
9531         * gdbarch.h, gdbarch.c: Re-generate.
9532         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9533         displaced_step_free_closure.
9534         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9535         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9536         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9537         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9538         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9539         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9540         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9541         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9542         * infrun.c (displaced_step_clear): Call xfree instead of
9543         gdbarch_displaced_step_free_closure.
9544
9545 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9546
9547         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9548         NULL".
9549
9550 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9551
9552         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9553         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9554         (mn10300_push_dummy_call): Likewise.
9555
9556 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9557
9558         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9559
9560 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9561
9562         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9563
9564 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9565
9566         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9567         able to start inferiors using a shell.
9568         (New remote packets): Announce new packet "QStartupWithShell".
9569         * remote.c: Add PACKET_QStartupWithShell.
9570         (extended_remote_create_inferior): Handle new
9571         PACKET_QStartupWithShell.
9572         (remote_protocol_features) <QStartupWithShell>: New entry for
9573         PACKET_QStartupWithShell.
9574         (_initialize_remote): Call "add_packet_config_cmd" for
9575         QStartupShell.
9576
9577 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9578             Pedro Alves  <palves@redhat.com>
9579
9580         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9581         and "nat/fork-inferior.h".
9582         * common/common-inferior.h: New file, with contents from
9583         "gdb/inferior.h".
9584         * commom/common-utils.c: Include "common-utils.h".
9585         (stringify_argv): New function.
9586         * common/common-utils.h (stringify_argv): New prototype.
9587         * configure.nat: Add "fork-inferior.o" as a dependency for
9588         "*linux*", "fbsd*" and "nbsd*" hosts.
9589         * corefile.c (get_exec_file): Update comment.
9590         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9591         instead of "startup_inferior".
9592         (darwin_create_inferior): Call "add_thread_silent" after
9593         "fork_inferior".
9594         * fork-child.c: Cleanup unnecessary includes.
9595         (SHELL_FILE): Move to "common/common-fork-child.c".
9596         (environ): Likewise.
9597         (exec_wrapper): Initialize.
9598         (get_exec_wrapper): New function.
9599         (breakup_args): Move to "common/common-fork-child.c"; rename to
9600         "breakup_args_for_exec".
9601         (escape_bang_in_quoted_argument): Move to
9602         "common/common-fork-child.c".
9603         (saved_ui): New variable.
9604         (prefork_hook): New function.
9605         (postfork_hook): Likewise.
9606         (postfork_child_hook): Likewise.
9607         (gdb_startup_inferior): Likewise.
9608         (fork_inferior): Move to "common/common-fork-child.c".  Update
9609         function to support gdbserver.
9610         (startup_inferior): Likewise.
9611         * gdbcore.h (get_exec_file): Remove declaration.
9612         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9613         instead of "startup_inferior".  Call "add_thread_silent" after
9614         "fork_inferior".
9615         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9616         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9617         instead of "startup_inferior".  Call "add_thread_silent" after
9618         "fork_inferior".
9619         * inferior.h: Include "common-inferior.h".
9620         (trace_start_error): Move to "common/common-utils.h".
9621         (trace_start_error_with_name): Likewise.
9622         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9623         (startup_inferior): Likewise.
9624         (gdb_startup_inferior): New prototype.
9625         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9626         * nat/fork-inferior.h: New file.
9627         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9628         instead of "startup_inferior".  Call "add_thread_silent" after
9629         "fork_inferior".
9630         * target.h (target_terminal_init): Move prototype to
9631         "target/target.h".
9632         (target_terminal_inferior): Likewise.
9633         (target_terminal_ours): Likewise.
9634         * target/target.h (target_terminal_init): New prototype, moved
9635         from "target.h".
9636         (target_terminal_inferior): Likewise.
9637         (target_terminal_ours): Likewise.
9638         * utils.c (gdb_flush_out_err): New function.
9639
9640 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9641
9642         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9643         * common/common-gdbthread.h: New file, with parts from
9644         "gdb/gdbthread.h".
9645         * gdbthread.h: Include "common-gdbthread.h".
9646         (switch_to_thread): Moved to "common/common-gdbthread.h".
9647
9648 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9649
9650         * Makefile.in (SFILES): Add "common/job-control.c".
9651         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9652         (COMMON_OBS): Add "job-control.o".
9653         * common/job-control.c: New file, with contents from
9654         "gdb/inflow.c".
9655         * common/job-control.h: New file, with contents from "terminal.h".
9656         * fork-child.c: Include "job-control.h".
9657         * inflow.c: Include "job-control.h".
9658         (gdb_setpgid): Move to "common/common-inflow.c".
9659         (_initialize_inflow): Move setting of "job_control" to
9660         "handle_job_control".
9661         * terminal.h (job_control): Moved to "common/common-terminal.h".
9662         (gdb_setpgid): Likewise.
9663         * top.c: Include "job_control.h".
9664         * utils.c: Likewise.
9665         (job_control): Moved to "job-control.c".
9666
9667 2017-06-07  Pedro Alves  <palves@redhat.com>
9668
9669         * Makefile.in (SFILES): Add gdb_regex.c.
9670         (COMMON_OBS): Add gdb_regex.o.
9671         * ada-lang.c (ada_add_standard_exceptions)
9672         (ada_add_exceptions_from_frame, name_matches_regex)
9673         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9674         parameter type to compiled_regex.  Adjust.
9675         (ada_exceptions_list): Use compiled_regex.
9676         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9677         std::unique_ptr<compiled_regex>.
9678         (exception_catchpoint::~exception_catchpoint): Remove regfree
9679         call.
9680         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9681         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9682         * breakpoint.c (solib_catchpoint::compiled): Now a
9683         std::unique_ptr<compiled_regex>.
9684         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9685         (check_status_catch_solib): Adjust to use compiled_regex.
9686         (add_solib_catchpoint): Adjust to use compiled_regex.
9687         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9688         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9689         compiled_regex reference.  Adjust to use it.
9690         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9691         declaration.  Include "gdb_regex.h".
9692         (apropos_cmd): Change regex parameter to compiled_regex reference.
9693         * gdb_regex.c: New file.
9694         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9695         declarations.
9696         (class compiled_regex): New.
9697         * linux-tdep.c: Include "common/gdb_optional.h".
9698         (struct mapping_regexes): New, factored out from
9699         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9700         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9701         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9702         * probe.c: Include "common/gdb_optional.h".
9703         (collect_probes): Use compiled_regex and gdb::optional and remove
9704         cleanups.
9705         * skip.c: Include "common/gdb_optional.h".
9706         (skiplist_entry::compiled_function_regexp): Now a
9707         gdb::optional<compiled_regex>.
9708         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9709         (free_skiplist_entry): Remove regfree call.
9710         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9711         compiled_regex and gdb::optional.
9712         * symtab.c: Include "common/gdb_optional.h".
9713         (search_symbols): Use compiled_regex and gdb::optional.
9714         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9715         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9716         to gdb_regex.c.
9717
9718 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9719
9720         * regcache.c (regcache::save): Avoid buffer use.
9721         (regcache::dump): Likewise.
9722
9723 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9724
9725         * sh-tdep.c (sh_pseudo_register_read): Remove
9726         MAX_REGISTER_SIZE.
9727         (sh_pseudo_register_write): Likewise.
9728         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9729         (sh64_pseudo_register_write): Likewise
9730
9731 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9732
9733         * aarch64-tdep.c (aarch64_store_return_value): Use
9734         V_REGISTER_SIZE.
9735         (aarch64_pseudo_read_value): Likewise.
9736         (aarch64_pseudo_write): Likewise.
9737
9738 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9739
9740         * regformats/regdef.h (set_register_cache): Remove the
9741         declaration.
9742
9743 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9744
9745         * frame.c (frame_unwind_register_signed): Use
9746         frame_unwind_register_value.
9747
9748 2017-06-06  Pedro Alves  <palves@redhat.com>
9749
9750         PR breakpoints/21553
9751         * breakpoint.c (create_breakpoints_sal_default)
9752         (init_breakpoint_sal, create_breakpoint_sal): Use
9753         gdb::unique_xmalloc_ptr for string parameters.
9754         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9755         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9756         (base_breakpoint_create_breakpoints_sal)
9757         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9758         (strace_marker_create_breakpoints_sal)
9759         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9760         string parameters.
9761         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9762         gdb::unique_xmalloc_ptr for string parameters.
9763         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9764         parameters.
9765
9766 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9767
9768         * alpha-tdep.c (alpha_register_to_value): Use
9769         get_frame_register_value.
9770         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9771
9772 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9773
9774         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9775         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9776         (ia64_value_to_register): Likewise.
9777         (ia64_extract_return_value): Likewise.
9778         (ia64_store_return_value): Likewise.
9779         (ia64_push_dummy_call): Likewise.
9780
9781 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9782
9783         GDB 8.0 released.
9784
9785 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9786
9787         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9788
9789 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9790
9791         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9792         parameter.
9793         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9794
9795 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9796
9797         * event-loop.c (poll_timers): Unallocate timer using delete
9798         instead of xfree.
9799
9800 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9801
9802         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9803         (struct breakpoint) <~breakpoint>: New.
9804         (struct watchpoint): Inherit from breakpoint.
9805         <~watchpoint>: New.
9806         <base>: Remove.
9807         (struct tracepoint): Inherit from breakpoint.
9808         <base>: Remove.
9809         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9810         (struct longjmp_breakpoint): Inherit from breakpoint.
9811         <~longjmp_breakpoint>: New.
9812         <base>: Remove.
9813         (new_breakpoint_from_type): Remove casts.
9814         (watchpoint_in_thread_scope): Remove reference to base field.
9815         (watchpoint_del_at_next_stop): Likewise.
9816         (update_watchpoint): Likewise.
9817         (watchpoint_check): Likewise.
9818         (bpstat_check_watchpoint): Likewise.
9819         (set_longjmp_breakpoint): Likewise.
9820         (struct fork_catchpoint): Inherit from breakpoint.
9821         <base>: Remove.
9822         (struct solib_catchpoint): Inherit from breakpoint.
9823         <~solib_catchpoint>: New.
9824         <base>: Remove.
9825         (dtor_catch_solib): Change to ...
9826         (solib_catchpoint::~solib_catchpoint): ... this.
9827         (breakpoint_hit_catch_solib): Remove reference to base field.
9828         (add_solib_catchpoint): Likewise.
9829         (create_fork_vfork_event_catchpoint): Likewise.
9830         (struct exec_catchpoint): Inherit from breakpoint.
9831         <~exec_catchpoint>: New.
9832         <base>: Remove.
9833         (dtor_catch_exec): Change to ...
9834         (exec_catchpoint::~exec_catchpoint): ... this.
9835         (dtor_watchpoint): Change to ...
9836         (watchpoint::~watchpoint): ... this.
9837         (watch_command_1): Remove reference to base field.
9838         (catch_exec_command_1): Likewise.
9839         (base_breakpoint_dtor): Change to ...
9840         (breakpoint::~breakpoint): ... this.
9841         (base_breakpoint_ops): Remove dtor field value.
9842         (longjmp_bkpt_dtor): Change to ...
9843         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9844         (strace_marker_create_breakpoints_sal): Remove reference to base
9845         field.
9846         (delete_breakpoint): Don't manually call breakpoint destructor.
9847         (create_tracepoint_from_upload): Remove reference to base field.
9848         (trace_pass_set_count): Likewise.
9849         (initialize_breakpoint_ops): Don't initialize
9850         momentary_breakpoint_ops, don't set dtors.
9851         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9852         <~ada_catchpoint>: New.
9853         <base>: Remove.
9854         (create_excep_cond_exprs): Remove reference to base field.
9855         (dtor_exception): Change to ...
9856         (ada_catchpoint::~ada_catchpoint): ... this.
9857         (dtor_catch_exception): Remove.
9858         (dtor_catch_exception_unhandled): Remove.
9859         (dtor_catch_assert): Remove.
9860         (create_ada_exception_catchpoint): Remove reference to base
9861         field.
9862         (initialize_ada_catchpoint_ops): Don't set dtors.
9863         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9864         breakpoint.
9865         <~signal_catchpoint>: New.
9866         <base>: Remove.
9867         (signal_catchpoint_dtor): Change to ...
9868         (signal_catchpoint::~signal_catchpoint): ... this.
9869         (create_signal_catchpoint): Remove reference to base field.
9870         (initialize_signal_catchpoint_ops): Don't set dtor.
9871         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9872         from breakpoint.
9873         <~syscall_catchpoint>: New.
9874         <base>: Remove.
9875         (dtor_catch_syscall): Change to ...
9876         (syscall_catchpoint::~syscall_catchpoint): ... this.
9877         (create_syscall_event_catchpoint): Remove reference to base
9878         field.
9879         (initialize_syscall_catchpoint_ops): Don't set dtor.
9880         * break-catch-throw.c (struct exception_catchpoint): Inherit
9881         from breakpoint.
9882         <~exception_catchpoint>: New.
9883         <base>: Remove.
9884         (dtor_exception_catchpoint): Change to ...
9885         (exception_catchpoint::~exception_catchpoint): ... this.
9886         (handle_gnu_v3_exceptions): Remove reference to base field.
9887         (initialize_throw_catchpoint_ops): Don't set dtor.
9888         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9889         field.
9890         * remote.c (remote_get_tracepoint_status): Likewise.
9891         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9892         * tracefile.c (tracefile_fetch_registers): Likewise.
9893         * tracepoint.c (actions_command): Likewise.
9894         (validate_actionline): Likewise.
9895         (tfind_1): Likewise.
9896         (get_traceframe_location): Likewise.
9897         (find_matching_tracepoint_location): Likewise.
9898         (parse_tracepoint_status): Likewise.
9899         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9900
9901 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9902
9903         * breakpoint.c (struct longjmp_breakpoint): New struct.
9904         (is_tracepoint_type): Change return type to bool.
9905         (is_longjmp_type): New function.
9906         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9907         (set_raw_breakpoint_without_location): Use
9908         new_breakpoint_from_type.
9909         (set_raw_breakpoint): Likewise.
9910
9911 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9912
9913         * breakpoint.c (new_breakpoint_from_type): New function.
9914         (create_breakpoint_sal): Use new_breakpoint_from_type and
9915         unique_ptr.
9916         (create_breakpoint): Likewise.
9917
9918 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9919
9920         * memattr.c (mem_info_command): Rename to ...
9921         (info_mem_command): ... this.
9922         (mem_enable_command): Rename to ...
9923         (enable_mem_command): ... this.
9924         (mem_disable_command): Rename to ...
9925         (disable_mem_command): ... this.
9926         (mem_delete_command): Rename to ...
9927         (delete_mem_command): ... this.
9928         (_initialize_mem): Adjust function names.
9929
9930 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9931
9932         * btrace.c (handle_pt_insn_events): New.
9933         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9934         STATUS.  Split into this and ...
9935         (handle_pt_insn_event_flags): ... this.
9936
9937 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9938
9939         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9940         and struct pt_insn.resynced.
9941         * configure: Regenerated.
9942         * config.in: Regenerated.
9943
9944 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9945
9946         * btrace.c (ftrace_find_call_by_number): New function.
9947         (ftrace_new_function): Store objects, not pointers.
9948         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9949         ftrace_new_gap, ftrace_update_function,
9950         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9951         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9952         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9953         btrace_ends_with_single_insn, btrace_call_get): Account for
9954         btrace_thread_info::functions now storing objects.
9955         * btrace.h (struct btrace_thread_info): Add constructor.
9956         (struct btrace_thread_info) <functions>: Make std::vector.
9957         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9958         Initialize with default values.
9959         * record-btrace.c (record_btrace_frame_sniffer): Account for
9960         btrace_thread_info::functions now storing objects.
9961
9962 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9963
9964         * btrace.c: Remove typedef bfun_s.
9965         (ftrace_new_gap): Directly add gaps to the list of gaps.
9966         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9967         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9968         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9969         instead of gdb VEC.
9970
9971 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9972
9973         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9974         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9975         with btrace_thread_info::next_segment and
9976         btrace_thread_info::prev_segment.
9977         * btrace.h: Remove struct btrace_func_link.
9978         (struct btrace_function): Replace pair of function segment pointers
9979         with pair of indices.
9980         * python/py-record-btrace.c (btpy_call_prev_sibling,
9981         btpy_call_next_sibling): Replace references to
9982         btrace_thread_info::segment with btrace_thread_info::next_segment and
9983         btrace_thread_info::prev_segment.
9984         * record-btrace.c (record_btrace_frame_this_id): Use
9985         btrace_find_call_by_number.
9986
9987 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9988
9989         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9990         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9991         btrace_insn_next, btrace_insn_prev): Remove references to
9992         btrace_thread_info::flow.
9993         * btrace.h (struct btrace_function): Remove FLOW.
9994
9995 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9996
9997         * btrace.c (ftrace_find_call_by_number): New function.
9998         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9999         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10000         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10001         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10002         index.
10003         * btrace.h (struct btrace_function): Turn UP into an index.
10004         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10005         as an index.
10006         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10007         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10008         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10009
10010 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10011
10012         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10013         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10014         ftrace_update_function, ftrace_compute_global_level_offset,
10015         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10016         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10017         btrace_insn_end, btrace_is_empty): Remove references to
10018         btrace_thread_info::begin and btrace_thread_info::end.
10019         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10020         (struct btrace_thread_info) <functions>: Adjust comment.
10021         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10022         btrace_thread_info::begin.
10023
10024 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10025
10026         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10027         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10028         ftrace_update_function): Remove arguments that implicitly were always
10029         BTINFO->END.
10030         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10031         Don't pass BTINFO->END.
10032
10033 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10034
10035         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10036         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10037         btrace_find_insn_by_number): Replace function segment pointer with
10038         index.
10039         (btrace_insn_cmp): Simplify.
10040         * btrace.h: (struct btrace_insn_iterator) Rename index to
10041         insn_index.  Replace function segment pointer with index into function
10042         segment vector.
10043         * record-btrace.c (record_btrace_call_history): Replace function
10044         segment pointer use with index.
10045         (record_btrace_frame_sniffer): Retrieve function call segment through
10046         vector.
10047         (record_btrace_set_replay): Remove defunc't safety check.
10048
10049 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10050
10051         * btrace.c (btrace_ends_with_single_insn): New function.
10052         (btrace_call_get, btrace_call_number, btrace_call_begin,
10053         btrace_call_end, btrace_call_next, btrace_call_prev,
10054         btrace_find_call_by_number): Use index into call segment vector
10055         instead of pointer.
10056         (btrace_call_cmp): Simplify.
10057         * btrace.h (struct btrace_call_iterator): Replace function call segment
10058         pointer with index into vector.
10059         * record-btrace.c (record_btrace_call_history): Use index instead of
10060         pointer.
10061
10062 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10063
10064         * btrace.c (btrace_insn_begin, btrace_insn_end,
10065         btrace_find_insn_by_number): Add btinfo to iterator.
10066         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10067
10068 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10069
10070         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10071         and save pointers directly.
10072         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10073         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10074         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10075         changed signature of functions.
10076         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10077         (btrace_fetch): Remove code that adds btrace_function pointers to
10078         vector of btrace_functions.
10079         (btrace_clear): Simplify freeing vector of btrace_functions.
10080
10081 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10082
10083         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10084         Replace VEC_* with std::vector functions.
10085         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10086         (struct btrace_thread_info)<functions>: Change type to std::vector.
10087
10088 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10089
10090         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10091         "Removed targets and native configurations" up.  Merge duplicate
10092         "New commands" sub-sections.  Add "New options" sub-sections.
10093
10094 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10095
10096         * defs.h (copy_integer_to_size): New declaration.
10097         * findvar.c (copy_integer_to_size): New function.
10098         (do_cint_test): New selftest function.
10099         (copy_integer_to_size_test): Likewise.
10100         (_initialize_findvar): Likewise.
10101         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10102         (mips_fbsd_collect_reg): Use raw_collect_integer.
10103         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10104         (mips64_fill_gregset): Use raw_collect_integer
10105         (mips64_fill_fpregset): Use raw_supply_integer.
10106         * regcache.c (regcache::raw_supply_integer): New function.
10107         (regcache::raw_collect_integer): Likewise.
10108         * regcache.h: (regcache::raw_supply_integer): New declaration.
10109         (regcache::raw_collect_integer): Likewise.
10110
10111 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10112
10113         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10114         (COMMON_OBS): Add gdbarch-selftests.o.
10115         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10116         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10117         * gdbarch-selftests.c: New file.
10118         * regcache.h (regcache) <~regcache>: Mark it virtual if
10119         GDB_SELF_TEST.
10120         <raw_write>: Likewise.
10121
10122 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10123
10124         * regcache.c (current_regcache): Change it to
10125         regcache::current_regcache.
10126         (regcache_observer_target_changed): Update.
10127         (regcache_thread_ptid_changed): Make it a regcache static
10128         method.
10129         (regcache_thread_ptid_changed): Update.
10130         (class regcache_access): New.
10131         (current_regcache_test): Update.
10132         (_initialize_regcache): Update.
10133         * regcache.h: Include forward_list.
10134         (regcache): Declare regcache_thread_ptid_changed and declare
10135         registers_changed_ptid as friend.
10136
10137 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10138
10139         * i387-tdep.c (i387_register_to_value): Use register_size
10140         instead of TYPE_LENGTH.
10141         * m68k-tdep.c (m68k_register_to_value): Likewise.
10142
10143 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10144
10145         * i387-tdep.c (i387_convert_register_p): Return false if type
10146         code isn't TYPE_CODE_FLT.
10147
10148 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10149
10150         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10151         length is 4.
10152         (alpha_register_to_value): Remove type length check.
10153         (alpha_value_to_register): Likewise.
10154
10155 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10156
10157         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10158         TYPE_CODE_FLT.
10159
10160 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10161
10162         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10163         TYPE_CODE_FLT or not.
10164
10165 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10166
10167         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10168         * avr-tdep.c (avr_gdbarch_init): Likewise.
10169         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10170         * cris-tdep.c (cris_gdbarch_init): Likewise.
10171         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10172         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10173         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10174         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10175         * mep-tdep.c (mep_gdbarch_init): Likewise.
10176         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10177         * mips-tdep.c (mips_gdbarch_init): Likewise.
10178         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10179         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10180         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10181         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10182         * v850-tdep.c (v850_gdbarch_init): Likewise.
10183
10184 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10185
10186         * selftest-arch.c (tests_with_arch): Call registers_changed
10187         and reinit_frame_cache.
10188         * selftest.c (run_self_tests): Likewise.
10189
10190 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10191
10192         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10193         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10194
10195 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10196
10197         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10198         set_gdbarch_print_insn.
10199
10200 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10201
10202         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10203         set_gdbarch_print_insn.
10204
10205 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10206
10207         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10208         set_gdbarch_print_insn.
10209         * arc-tdep.c (arc_gdbarch_init): Likewise.
10210         * arch-utils.c: include dis-asm.h.
10211         (default_print_insn): New function.
10212         * arch-utils.h (default_print_insn): Declare.
10213         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10214         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10215         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10216         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10217         * frv-tdep.c (frv_gdbarch_init): Likewise.
10218         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10219         * gdbarch.sh (print_insn): Use default_print_insn.
10220         * gdbarch.c: Regenerated.
10221         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10222         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10223         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10224         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10225         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10226         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10227         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10228         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10229         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10230         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10231         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10232         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10233         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10234         * mt-tdep.c (mt_gdbarch_init): Likewise.
10235         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10236         * nios2-tdep.c (nios2_print_insn): Remove.
10237         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10238         * rx-tdep.c (rx_gdbarch_init): Likewise.
10239         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10240         * score-tdep.c (score_print_insn): Remove.
10241         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10242         * sh-tdep.c (sh_gdbarch_init): Likewise.
10243         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10244         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10245         * tic6x-tdep.c (tic6x_print_insn): Remove.
10246         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10247         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10248         * v850-tdep.c (v850_gdbarch_init): Likewise.
10249         * vax-tdep.c (vax_gdbarch_init): Likewise.
10250         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10251         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10252
10253 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10254
10255         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10256         (MIPS_FP0_REGNUM): Remove.
10257         (MIPS_FSR_REGNUM): Remove.
10258         (mips_fbsd_supply_fpregs): Use mips_regnum.
10259         (mips_fbsd_supply_gregs): Likewise.
10260         (mips_fbsd_collect_fpregs): Likewise.
10261         (mips_fbsd_collect_gregs): Likewise.
10262
10263 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10264
10265         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10266         (getpfpregs_supplies): New function.
10267         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10268         getfpregs_supplies.
10269         (mips_fbsd_store_inferior_registers): Likewise.
10270
10271 2017-05-22  Pedro Alves <palves@redhat.com>
10272
10273         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10274         maintainer.
10275
10276 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10277
10278         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10279         (store_register): Likewise.
10280         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10281         (get_decimal_float_return_value): Likewise.
10282         (do_ppc_sysv_return_value): Likewise.
10283         (ppc64_sysv_abi_push_integer): Likewise.
10284         (ppc64_sysv_abi_push_freg): Likewise.
10285         (ppc64_sysv_abi_return_value_base): Likewise.
10286         (ppc64_sysv_abi_return_value): Likewise.
10287         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10288         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10289         * rs6000-nat.c: Likewise.
10290         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10291         (rs6000_value_to_register): Likewise.
10292         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10293
10294 2017-05-21  Tom Tromey  <tom@tromey.com>
10295
10296         PR rust/21466:
10297         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10298         arrays as "[T]", not "[T; ]".
10299
10300 2017-05-19  Tom Tromey  <tom@tromey.com>
10301
10302         PR rust/21484:
10303         * rust-lang.c (exp_descriptor_rust): New function.
10304         (rust_language_defn): Use it.
10305         * p-lang.c (pascal_language_defn): Update.
10306         * opencl-lang.c (opencl_language_defn): Update.
10307         * objc-lang.c (objc_language_defn): Update.
10308         * m2-lang.c (m2_language_defn): Update.
10309         * language.h (struct language_defn)
10310         <la_watch_location_expression>: New member.
10311         * language.c (unknown_language_defn, auto_language_defn)
10312         (local_language_defn): Update.
10313         * go-lang.c (go_language_defn): Update.
10314         * f-lang.c (f_language_defn): Update.
10315         * d-lang.c (d_language_defn): Update.
10316         * c-lang.h (c_watch_location_expression): Declare.
10317         * c-lang.c (c_watch_location_expression): New function.
10318         (c_language_defn, cplus_language_defn, asm_language_defn)
10319         (minimal_language_defn): Use it.
10320         * breakpoint.c (watch_command_1): Call
10321         la_watch_location_expression.
10322         * ada-lang.c (ada_language_defn): Update.
10323
10324 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10325
10326         PR tui/21482
10327         * gdb_curses.h (NOMACROS): Define.
10328         (NCURSES_NOMACROS): Define.
10329
10330 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10331
10332         PR tui/21482
10333         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10334         arg to char *.
10335         * tui/tui-wingeneral.c (box_win): Likewise.
10336         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10337         (tui_show_source_line): Likewise.
10338         (tui_show_exec_info_content): Likewise.
10339
10340 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10341
10342         * sparc-tdep.c (sparc_structure_return_p)
10343         (sparc_arg_on_registers_p): New functions.
10344         (sparc32_store_arguments): Use them.
10345         * sparc64-tdep.c (sparc64_16_byte_align_p)
10346         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10347         Handle TYPE_CODE_ARRAY.
10348
10349 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10350
10351         * cli/cli-decode.c (add_alias_cmd): New function.
10352         * command.h (add_alias_cmd): Declare.
10353         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10354         instead call add_alias_cmd.
10355
10356 2017-05-17  Pedro Alves  <palves@redhat.com>
10357
10358         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10359         (nat_makefile_frag): ... this.  All references updated.
10360         * configure.ac: Likewise.
10361         * configure.nat: Likewise.  Enhance comments.
10362         * configure: Regenerate.
10363
10364 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10365
10366         * procfs.c (procfs_create_inferior): Change prototype to match
10367         definition.
10368
10369 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10370
10371         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10372         C++ compiler warning.
10373
10374 2017-05-12  Tom Tromey  <tom@tromey.com>
10375
10376         PR rust/21483:
10377         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10378         recurse, just call value_struct_elt directly.
10379
10380 2017-05-12  Tom Tromey  <tom@tromey.com>
10381
10382         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10383         OP_RUST_ARRAY>: Fix.
10384
10385 2017-05-12  Tom Tromey  <tom@tromey.com>
10386
10387         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10388
10389 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10390
10391         * regcache.c: Include <forward_list>.
10392         (struct regcache_list): Remove.
10393         (current_regcache): Update.
10394         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10395         (regcache_thread_ptid_changed): Likewise.
10396         (registers_changed_ptid): Likewise.
10397         (current_regcache_size): Likewise.
10398
10399 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10400
10401         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10402         (current_regcache_size): New function.
10403         (current_regcache_test): New function.
10404         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10405
10406 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10407
10408         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10409         (print_gp_register_row): Use get_frame_register_value.
10410
10411 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10412
10413         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10414         (mips_supply_fpregset): Likewise.
10415         (mips64_supply_gregset): Likewise.
10416
10417 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10418
10419         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10420         regcache->raw_supply_zeroed.
10421
10422 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10423
10424         * configure.nat: Rearrange 'case' statements to match
10425         host before cpu.
10426
10427 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10428
10429         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10430         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10431         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10432         "@nat_extra_makefile_frag@".
10433         (Makefile): Remove dependency on "@frags@".
10434         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10435         (data-directory/Makefile): Likewise.
10436         * config/aarch64/linux.mh: Deleted; moved contents to
10437         "gdb/configure.nat".
10438         * config/alpha/alpha-linux.mh: Likewise.
10439         * config/alpha/nbsd.mh: Likewise.
10440         * config/arm/linux.mh: Likewise.
10441         * config/arm/nbsdelf.mh: Likewise.
10442         * config/i386/cygwin.mh: Likewise.
10443         * config/i386/cygwin64.mh: Likewise.
10444         * config/i386/darwin.mh: Likewise.
10445         * config/i386/fbsd.mh: Likewise.
10446         * config/i386/fbsd64.mh: Likewise.
10447         * config/i386/go32.mh: Likewise.
10448         * config/i386/i386gnu.mh: Likewise.
10449         * config/i386/i386sol2.mh: Likewise.
10450         * config/i386/linux.mh: Likewise.
10451         * config/i386/linux64.mh: Likewise.
10452         * config/i386/mingw.mh: Likewise.
10453         * config/i386/mingw64.mh: Likewise.
10454         * config/i386/nbsd64.mh: Likewise.
10455         * config/i386/nbsdelf.mh: Likewise.
10456         * config/i386/nto.mh: Likewise.
10457         * config/i386/obsd.mh: Likewise.
10458         * config/i386/obsd64.mh: Likewise.
10459         * config/i386/sol2-64.mh: Likewise.
10460         * config/ia64/linux.mh: Likewise.
10461         * config/m32r/linux.mh: Likewise.
10462         * config/m68k/linux.mh: Likewise.
10463         * config/m68k/nbsdelf.mh: Likewise.
10464         * config/m68k/obsd.mh: Likewise.
10465         * config/m88k/obsd.mh: Likewise.
10466         * config/mips/fbsd.mh: Likewise.
10467         * config/mips/linux.mh: Likewise.
10468         * config/mips/nbsd.mh: Likewise.
10469         * config/mips/obsd64.mh: Likewise.
10470         * config/pa/linux.mh: Likewise.
10471         * config/pa/nbsd.mh: Likewise.
10472         * config/pa/obsd.mh: Likewise.
10473         * config/powerpc/aix.mh: Likewise.
10474         * config/powerpc/fbsd.mh: Likewise.
10475         * config/powerpc/linux.mh: Likewise.
10476         * config/powerpc/nbsd.mh: Likewise.
10477         * config/powerpc/obsd.mh: Likewise.
10478         * config/powerpc/ppc64-linux.mh: Likewise.
10479         * config/powerpc/spu-linux.mh: Likewise.
10480         * config/s390/linux.mh: Likewise.
10481         * config/sh/nbsd.mh: Likewise.
10482         * config/sparc/fbsd.mh: Likewise.
10483         * config/sparc/linux.mh: Likewise.
10484         * config/sparc/linux64.mh: Likewise.
10485         * config/sparc/nbsd64.mh: Likewise.
10486         * config/sparc/nbsdelf.mh: Likewise.
10487         * config/sparc/obsd64.mh: Likewise.
10488         * config/sparc/sol2.mh: Likewise.
10489         * config/tilegx/linux.mh: Likewise.
10490         * config/vax/nbsdelf.mh: Likewise.
10491         * config/vax/obsd.mh: Likewise.
10492         * config/xtensa/linux.mh: Likewise.
10493         * config/i386/i386gnu.mn: New file, with excerpts from
10494         "config/i386/i386gnu.mh".
10495         * configure: Regenerate.
10496         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10497         *.mh files under "gdb/config".
10498         * configure.nat: New file, with contents from the
10499         "gdb/config/*/*.mh" files.
10500
10501 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10502
10503         * btrace.c (btrace_clear): Free insn vector.
10504
10505 2017-05-05  Pedro Alves  <palves@redhat.com>
10506
10507         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10508         * configure: Regenerate.
10509
10510 2017-05-04  Pedro Alves  <palves@redhat.com>
10511
10512         * Makefile.in (SFILES): Add progspace-and-thread.c.
10513         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10514         (COMMON_OBS): Add progspace-and-thread.o.
10515         * breakpoint.c: Include "progspace-and-thread.h".
10516         (update_inserted_breakpoint_locations)
10517         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10518         Use scoped_restore_current_pspace_and_thread.
10519         (create_std_terminate_master_breakpoint): Use
10520         scoped_restore_current_program_space.
10521         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10522         (print_breakpoint_location): Use
10523         scoped_restore_current_program_space.
10524         (bp_loc_is_permanent): Use
10525         scoped_restore_current_pspace_and_thread.
10526         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10527         (download_tracepoint_locations): Use
10528         scoped_restore_current_pspace_and_thread.
10529         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10530         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10531         (enum step_over_calls_kind): Moved from inferior.h.
10532         (class scoped_restore_current_thread): New class.
10533         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10534         declaration.
10535         (scoped_restore_current_thread): New class.
10536         * infcmd.c: Include "common/gdb_optional.h".
10537         (continue_1, proceed_after_attach): Use
10538         scoped_restore_current_thread.
10539         (notice_new_inferior): Use scoped_restore_current_thread.
10540         * inferior.c: Include "progspace-and-thread.h".
10541         (restore_inferior, save_current_inferior): Delete.
10542         (add_inferior_command, clone_inferior_command): Use
10543         scoped_restore_current_pspace_and_thread.
10544         * inferior.h (scoped_restore_current_inferior): New class.
10545         * infrun.c: Include "progspace-and-thread.h" and
10546         "common/gdb_optional.h".
10547         (follow_fork_inferior): Use
10548         scoped_restore_current_pspace_and_thread.
10549         (scoped_restore_exited_inferior): New class.
10550         (handle_vfork_child_exec_or_exit): Use
10551         scoped_restore_exited_inferior,
10552         scoped_restore_current_pspace_and_thread,
10553         scoped_restore_current_thread and scoped_restore.
10554         (fetch_inferior_event): Use scoped_restore_current_thread.
10555         * linespec.c (decode_line_full, decode_line_1): Use
10556         scoped_restore_current_program_space.
10557         * mi/mi-main.c: Include "progspace-and-thread.h".
10558         (exec_continue): Use scoped_restore_current_thread.
10559         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10560         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10561         * proc-service.c (ps_pglobal_lookup): Use
10562         scoped_restore_current_program_space.
10563         * progspace-and-thread.c: New file.
10564         * progspace-and-thread.h: New file.
10565         * progspace.c (release_program_space, clone_program_space): Use
10566         scoped_restore_current_program_space.
10567         (restore_program_space, save_current_program_space)
10568         (save_current_space_and_thread): Delete.
10569         (switch_to_program_space_and_thread): Moved to
10570         progspace-and-thread.c.
10571         * progspace.h (save_current_program_space)
10572         (save_current_space_and_thread): Delete declarations.
10573         (scoped_restore_current_program_space): New class.
10574         * remote.c (remote_btrace_maybe_reopen): Use
10575         scoped_restore_current_thread.
10576         * symtab.c: Include "progspace-and-thread.h".
10577         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10578         * thread.c (print_thread_info_1): Use
10579         scoped_restore_current_thread.
10580         (struct current_thread_cleanup): Delete.
10581         (do_restore_current_thread_cleanup)
10582         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10583         (scoped_restore_current_thread::~scoped_restore_current_thread):
10584         ... this new dtor.
10585         (make_cleanup_restore_current_thread): Rename/convert to ...
10586         (scoped_restore_current_thread::scoped_restore_current_thread):
10587         ... this new ctor.
10588         (thread_apply_all_command): Use scoped_restore_current_thread.
10589         (thread_apply_command): Use scoped_restore_current_thread.
10590         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10591         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10592
10593 2017-05-04  Pedro Alves  <palves@redhat.com>
10594
10595         * thread.c (make_cleanup_restore_current_thread): Move
10596         find_thread_ptid call before the is_stopped call.  Assert that the
10597         thread is found.  Replace is_stopped call by checking the thread's
10598         state directly.  Remove unnecessary NULL-thread check.
10599
10600 2017-05-04  Pedro Alves  <palves@redhat.com>
10601
10602         * corelow.c (thread_section_name): New class.
10603         (get_core_register_section, get_core_siginfo): Use it.
10604
10605 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10606
10607         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10608         (get_core_register_section): Remove xfree of NULL pointer.
10609
10610 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10611
10612         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10613         * regcache.c (regcache::raw_supply_zeroed): New function.
10614         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10615
10616 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10617
10618         * gdbarch.sh: Remove commented out definition of
10619         TARGET_CHAR_BIT.
10620         * gdbarch.h: Re-generate.
10621
10622 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10623
10624         * configure: Regenerate.
10625
10626 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10627
10628         * solib-target.c (solib_target_relocate_section_addresses):
10629         Remove num_section_bases, num_bases, segment_bases variables.
10630
10631 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10632
10633         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10634
10635 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10636
10637         * solib-target.c: Include <vector>
10638         (struct lm_info_target) <~lm_info_target>: Remove.
10639         <segment_bases, section_bases>: Change type to
10640         std::vector<CORE_ADDR>.
10641         (library_list_start_segment, library_list_start_section,
10642         library_list_end_library,
10643         solib_target_relocate_section_addresses): Adjust.
10644
10645 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10646
10647         * gdbarch.sh (software_single_step): Change return type to
10648         std::vector<CORE_ADDR>.
10649         * gdbarch.c, gdbarch.h: Re-generate.
10650         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10651         Adjust.
10652         (arm_deal_with_atomic_sequence_raw): Adjust.
10653         (thumb_get_next_pcs_raw): Adjust.
10654         (arm_get_next_pcs_raw): Adjust.
10655         (arm_get_next_pcs): Adjust.
10656         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10657         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10658         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10659         (alpha_software_single_step): Adjust.
10660         * alpha-tdep.h (alpha_software_single_step): Adjust.
10661         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10662         * arm-tdep.c (arm_software_single_step): Adjust.
10663         (arm_breakpoint_kind_from_current_state): Adjust.
10664         * arm-tdep.h (arm_software_single_step): Adjust.
10665         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10666         * cris-tdep.c (cris_software_single_step): Adjust.
10667         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10668         (micromips_deal_with_atomic_sequence): Adjust.
10669         (deal_with_atomic_sequence): Adjust.
10670         (mips_software_single_step): Adjust.
10671         * mips-tdep.h (mips_software_single_step): Adjust.
10672         * moxie-tdep.c (moxie_software_single_step): Adjust.
10673         * nios2-tdep.c (nios2_software_single_step): Adjust.
10674         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10675         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10676         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10677         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10678         * sparc-tdep.c (sparc_software_single_step): Adjust.
10679         * spu-tdep.c (spu_software_single_step): Adjust.
10680         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10681
10682 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10683
10684         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10685         * gdbarch.h: Re-generate.
10686
10687 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10688
10689         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10690         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10691         * python/py-instruction.c, python/py-instruction.h: New file.
10692         * python/py-record.c: Add py-instruction.h include.
10693         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10694         gdb.RecordInstruction.
10695         * python/python-internal.h: Add gdbpy_initialize_instruction
10696         declaration.
10697         * python/python.c (do_start_initialization): Add
10698         gdbpy_initialize_instruction.
10699
10700 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10701
10702         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10703         Remove.
10704         (btrace_func_from_recpy_func): New function.
10705         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10706         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10707         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10708         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10709         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10710         Also, use new helper functions.
10711         (btpy_list_item): Use new helper functions.
10712         (recpy_bt_function_call_history): Use new type name.
10713         (btpy_call_getset): Remove.
10714         (gdbpy_initialize_btrace): Remove code to initialize
10715         gdb.BtraceFunctionCall.
10716         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10717         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10718         recpy_bt_func_prev, recpy_bt_func_next): New export.
10719         * python/py-record.c (recpy_func_type): New static object.
10720         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10721         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10722         recpy_func_next): New function.
10723         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10724         (recpy_func_getset): New static object.
10725         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10726         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10727
10728 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10729
10730         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10731         (btpy_object, btpy_insn_type, btpy_new): Remove.
10732         (btpy_list_object): Use gdb.RecordInstruction type instead of
10733         gdb.BtraceInstruction type.
10734         (btrace_insn_from_recpy_insn): New function.
10735         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10736         btpy_new.
10737         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10738         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10739         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10740         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10741         instead of btpy_object.
10742         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10743         btpy_insn_data, btpy_insn_decode): Rename to ...
10744         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10745         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10746         recpy_bt_insn_decode): This.  Also, use new helper functions.
10747         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10748         recpy_insn_type.
10749         (btpy_insn_getset): Remove.
10750         (gdbpy_initialize_btrace): Remove code to initialize
10751         gdb.BtraceInstruction.  Use recpy_element_object.
10752         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10753         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10754         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10755         * python/py-record.c (recpy_insn_type): New static object.
10756         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10757         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10758         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10759         New function.
10760         (recpy_insn_getset): New static object.
10761         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10762         * python/py-record.h (recpy_element_object): New typedef.
10763         (recpy_insn_type, recpy_insn_new): New export.
10764
10765 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10766
10767         * py-record-btrace.c (btpy_insn_new): Removed.
10768         (btpy_insn_or_gap_new): New function.
10769         (btpy_insn_error): Removed.
10770         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10771         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10772         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10773         btpy_insn_or_gap_new instead of btpy_insn_new.
10774         (btpy_insn_getset): Remove btpy_insn_error.
10775         * py-record.c (recpy_gap_type): New static object.
10776         (recpy_gap_object): New typedef.
10777         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10778         recpy_gap_reason_string): New function.
10779         (recpy_gap_getset): New static object.
10780         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10781         * py-record.h (recpy_gap_new): New export.
10782
10783 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10784
10785         * python/py-record.c (recpy_ptid): Remove.
10786         (recpy_record_getset): Remove recpy_ptid.
10787
10788 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10789
10790         * btrace.c (btrace_fetch): Set inferior_ptid.
10791         * python/py-record-btrace.c: Add "py-record.h" include.
10792         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10793         recpy_bt_end, recpy_bt_instruction_history,
10794         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10795         in gdb.Record object instead of current ptid.
10796         * python/py-record.c: Include new "py-record.h" file.
10797         (recpy_record_object): Moved to py-record.h.
10798         * python/py-record.h: New file.
10799
10800 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10801
10802         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10803         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10804         indentation.
10805
10806 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10807
10808         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10809         the past maintainers section.
10810
10811 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10812
10813         * infcmd.c (get_return_value): Use regcache ctor, and remove
10814         cleanup.
10815
10816 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10817             Pedro Alves  <palves@redhat.com>
10818
10819         * regcache.c (regcache::regcache): New tag dispatch ctor.
10820         (do_cooked_read): Moved above.
10821         (regcache_dup): Use the tag dispatch ctor..
10822         * regcache.h (regcache): Declare ctor, delete copy ctor and
10823         assignment operator, remove friend regcache_dup.
10824
10825 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10826
10827         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10828         call method save instead of regcache_cpy.
10829         * regcache.h (struct regcache): Make regcache_dup a friend.
10830
10831 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10832
10833         * regcache.c (struct regcache): Move to regcache.h
10834         (regcache::arch): New method.
10835         (regcache_get_ptid): Update.
10836         (get_regcache_arch): Call arch method.
10837         (get_regcache_aspace): Call method aspace.
10838         (register_buffer): Change it to method.
10839         (regcache_save): Change it to regcache::save.
10840         (regcache_restore): Likewise.
10841         (regcache_cpy_no_passthrough): Remove the declaration.
10842         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10843         (regcache_cpy_no_passthrough): Change it to method
10844         cpy_no_passthrough.
10845         (regcache_register_status): Change it to method
10846         get_register_status.
10847         (regcache_invalidate): Change it to method invalidate.
10848         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10849         (regcache_raw_update): Change it to method raw_update.
10850         (regcache_raw_read): Likewise.
10851         (regcache_raw_read_signed): Likewise.
10852         (regcache_raw_read_unsigned): Likewise.
10853         (regcache_raw_write_signed): Likewise.
10854         (regcache_raw_write_unsigned): Likewise.
10855         (regcache_cooked_read): Likewise.
10856         (regcache_cooked_read_value): Likewise.
10857         (regcache_cooked_read_signed): Likewise.
10858         (regcache_cooked_read_unsigned): Likewise.
10859         (regcache_cooked_write_signed): Likewise.
10860         (regcache_cooked_write_unsigned): Likewise.
10861         (regcache_raw_set_cached_value): Likewise.
10862         (regcache_raw_write): Likewise.
10863         (regcache_cooked_write): Likewise.
10864         (regcache_xfer_part): Likewise.
10865         (regcache_raw_read_part): Likewise.
10866         (regcache_raw_write_part): Likewise.
10867         (regcache_cooked_read_part): Likewise.
10868         (regcache_cooked_write_part): Likewise.
10869         (regcache_raw_supply): Likewise.
10870         (regcache_raw_collect): Likewise.
10871         (regcache_transfer_regset): Likewise.
10872         (regcache_supply_regset): Likewise.
10873         (regcache_collect_regset): Likewise.
10874         (regcache_debug_print_register): Likewise.
10875         (enum regcache_dump_what): Move it to regcache.h.
10876         (regcache_dump): Change it to method dump.
10877         * regcache.h (enum regcache_dump_what): New.
10878         (class regcache): New.
10879         * target.c (target_fetch_registers): Call method
10880         debug_print_register.
10881         (target_store_registers): Likewise.
10882
10883 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10884
10885         * windows-nat.c (struct lm_info_windows): Initialize field.
10886         (windows_make_so): Allocate lm_info_windows with new.
10887         (windows_free_so): Free lm_info_windows with delete.
10888
10889 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10890
10891         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10892         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10893         cleanup.
10894         (darwin_free_so): Free lm_info_darwin with delete.
10895
10896 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10897
10898         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10899         <l_addr_p>: Change type to bool.
10900         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10901         (svr4_free_so): Free lm_info_svr4 with delete.
10902         (svr4_copy_library_list): Replace memcpy with call to copy
10903         constructor.
10904         (library_list_start_library, svr4_default_sos): Allocate
10905         lm_info_svr4 with new.
10906
10907 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10908
10909         * solib-target.c (struct lm_info_target): Add destructor,
10910         initialize fields.
10911         <name>: Change type to std::string.
10912         (library_list_start_library): Allocate lm_info_target with new.
10913         (solib_target_free_library_list): Free lm_info_target with
10914         delete.
10915         (solib_target_current_sos): Adapt to std::string.
10916         (solib_target_free_so): Free lm_info_target with delete.
10917
10918 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10919
10920         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10921         fields.
10922         (frv_current_sos): Allocate lm_info_frv with new.
10923         (frv_relocate_main_executable): Free lm_info_frv with delete,
10924         allocate with new.
10925         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10926
10927 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10928
10929         * solib-frv.c (struct lm_info_frv): Fix indentation.
10930
10931 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10932
10933         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10934         map field.
10935         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10936         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10937         and allocate with new.
10938         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10939
10940 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10941
10942         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10943         <filename, member_name>: Change type to std::string.
10944         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10945         (library_list_start_library): Allocate lm_info_aix with new.
10946         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10947         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10948         with copy constructor.
10949
10950 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10951
10952         * solist.h (struct lm_info): Remove.
10953         (struct lm_info_base): New class.
10954         (struct so_list) <lm_info>: Change type to lm_info_base *.
10955         * nto-tdep.c (struct lm_info): Remove.
10956         (lm_addr): Adjust.
10957         * solib-aix.c (struct lm_info): Rename to ...
10958         (struct lm_info_aix): ... this.  Extend lm_info_base.
10959         (lm_info_p): Rename to ...
10960         (lm_info_aix_p): ... this, and adjust.
10961         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10962         solib_aix_parse_libraries, library_list_start_library,
10963         solib_aix_free_library_list, solib_aix_parse_libraries,
10964         solib_aix_get_library_list,
10965         solib_aix_relocate_section_addresses, solib_aix_free_so,
10966         solib_aix_get_section_offsets,
10967         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10968         Adjust.
10969         (struct solib_aix_inferior_data) <library_list>: Adjust.
10970         * solib-darwin.c (struct lm_info): Rename to ...
10971         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10972         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10973         * solib-dsbt.c (struct lm_info): Rename to ...
10974         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10975         (struct dsbt_info) <main_executable_lm_info): Adjust.
10976         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10977         dsbt_relocate_section_addresses): Adjust.
10978         * solib-frv.c (struct lm_info): Rename to ...
10979         (struct lm_info_frv): ... this.  Extend lm_info_base.
10980         (main_executable_lm_info): Adjust.
10981         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10982         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10983         find_canonical_descriptor_in_load_object,
10984         frv_fdpic_find_canonical_descriptor): Adjust.
10985         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10986         to lm_info_svr4.
10987         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10988         svr4_clear_so, svr4_copy_library_list,
10989         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10990         svr4_current_sos, svr4_fetch_objfile_link_map,
10991         solist_update_incremental): Adjust.
10992         * solib-svr4.h (struct lm_info_svr4): Move here from
10993         solib-svr4.c.
10994         * solib-target.c (struct lm_info): Rename to ...
10995         (struct lm_info_target): ... this.  Extend lm_info_base.
10996         (lm_info_p): Rename to ...
10997         (lm_info_target_p): ... this.
10998         (solib_target_parse_libraries, library_list_start_segment,
10999         library_list_start_section, library_list_start_library,
11000         library_list_end_library, solib_target_free_library_list,
11001         solib_target_current_sos, solib_target_free_so,
11002         solib_target_relocate_section_addresses): Adjust.
11003         * windows-nat.c (struct lm_info): Rename to ...
11004         (struct lm_info_windows): ... this.  Extend lm_info_base.
11005         (windows_make_so, handle_load_dll, handle_unload_dll,
11006         windows_xfer_shared_libraries): Adjust.
11007
11008 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11009
11010         * solib-darwin.c (struct darwin_so_list): Remove.
11011         (darwin_current_sos): Allocate an so_list object instead of a
11012         darwin_so_list, separately allocate an lm_info object.
11013         (darwin_free_so): Free lm_info.
11014
11015 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11016
11017         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11018         with fprintf_filtered.
11019
11020 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11021
11022         * regcache.c (regcache::regcache): New function.
11023         (regcache::~regcache): New function.
11024         (regcache_xmalloc_1): Remove.
11025         (regcache_xmalloc): Call new regcache.
11026         (regcache_xfree): Call delete regcache.
11027         (get_thread_arch_aspace_regcache): Call new regcache.
11028
11029 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11030
11031         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11032         lwp instead of ptid_get_lwp.
11033
11034 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11035
11036         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11037         lwp_info instead of getting from inferior_ptid.
11038
11039 2017-04-27  Keith Seitz  <keiths@redhat.com>
11040
11041         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11042         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11043         (CV_CONVERSION_BADNESS): Define.
11044         (rank_one_type): Remove overly restrictive rvalue reference
11045         rank checks.
11046         Add cv-qualifier checks and subranks for type equality.
11047         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11048         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11049         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11050
11051 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11052
11053         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11054         count when creating the object.
11055
11056 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11057             Ulrich Weigand  <uweigand@de.ibm.com>
11058
11059         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11060         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11061         is used in AIX.
11062         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11063         (process_xcoff_symbol): Likewise.
11064         (scan_xcoff_symtab): Likewise.
11065
11066 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11067
11068         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11069         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11070         (ia64_access_reg): Use get_frame_register_unsigned.
11071         (ia64_access_rse_reg): Likewise.
11072         (ia64_libunwind_frame_prev_register): Likewise.
11073
11074 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11075
11076         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11077         * gdbarch.c: Regenerated.
11078         * gdbarch.h: Regenerated.
11079         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11080         visibility external.
11081         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11082         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11083         (enum cfa_how_kind): Move to ...
11084         (struct dwarf2_frame_state_reg_info): Likewise.
11085         (struct dwarf2_frame_state): Likewise.
11086         * dwarf2-frame.h: ... here.
11087         (dwarf2_frame_state_alloc_regs): New declaration.
11088         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11089         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11090
11091 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11092
11093         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11094         regcache_raw_read_unsigned.
11095         (xtensa_pseudo_register_write): Likewise.
11096
11097 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11098
11099         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11100         (nds32_pseudo_register_write): Likewise.
11101
11102 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11103
11104         * regcache.c (struct regcache) <readonly_p>: Change its type
11105         to bool.
11106         (regcache_xmalloc_1): Update parameter type and callers update.
11107
11108 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11109
11110         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11111         set_gdbarch_wchar_bit.
11112         * arm-tdep.c (arm_gdbarch_init): Likewise.
11113
11114 2017-04-25  Pedro Alves  <palves@redhat.com>
11115
11116         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11117         (BothAreRelocatable, memcopy, memmove): Don't define.
11118         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11119         macros.
11120
11121 2017-04-25  Pedro Alves  <palves@redhat.com>
11122
11123         * common/common-defs.h: Include "common/poison.h".
11124         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11125         and adjust.
11126         * common/poison.h: New file.
11127         * common/traits.h: Include <type_traits>.
11128         (Not, Or, Requires): New, moved from common/function-view.h.
11129
11130 2017-04-25  Pedro Alves  <palves@redhat.com>
11131
11132         * breakpoint.h (struct breakpoint): In-class initialize all
11133         fields.  Make boolean fields "bool".
11134         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11135         memset call and initializations no longer necessary.
11136
11137 2017-04-25  Pedro Alves  <palves@redhat.com>
11138
11139         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11140         reference.
11141         (pt_btrace_insn): New function.
11142         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11143
11144 2017-04-25  Pedro Alves  <palves@redhat.com>
11145
11146         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11147         "base" field and inherit from "bp_location" instead.  Add
11148         non-default ctor.
11149         (allocate_location_exception): Use new non-default ctor.
11150         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11151         (init_bp_location): Convert to ...
11152         (bp_location::bp_location): ... this new ctor, and remove memset
11153         call.
11154         (base_breakpoint_allocate_location): Use the new non-default ctor.
11155         * breakpoint.h (bp_location): Now a class.  Declare default and
11156         non-default ctors.  In-class initialize all members.
11157         (init_bp_location): Remove declaration.
11158
11159 2017-04-25  Pedro Alves  <palves@redhat.com>
11160
11161         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11162         assignment operator.
11163
11164 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11165
11166         * doublest.c (convert_doublest_to_floatformat): Call
11167         floatformat_totalsize_bytes.
11168
11169 2017-04-22  Tom Tromey  <tom@tromey.com>
11170
11171         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11172         ui_out_emit_list.
11173         * stack.c (print_frame): Use ui_out_emit_list.
11174         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11175         ui_out_emit_list.
11176         * mi/mi-main.c (print_one_inferior)
11177         (mi_cmd_data_list_register_names)
11178         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11179         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11180         ui_out_emit_list.
11181         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11182         (mi_output_solib_attribs): Use ui_out_emit_list,
11183         ui_out_emit_tuple.
11184         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11185         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11186         (mi_cmd_stack_list_args, list_args_or_locals): Use
11187         ui_out_emit_list.
11188         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11189         * breakpoint.c (print_solib_event, output_thread_groups): Use
11190         ui_out_emit_list.
11191
11192 2017-04-22  Tom Tromey  <tom@tromey.com>
11193
11194         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11195         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11196         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11197
11198 2017-04-22  Tom Tromey  <tom@tromey.com>
11199
11200         * tracepoint.c (tvariables_info_1)
11201         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11202
11203 2017-04-22  Tom Tromey  <tom@tromey.com>
11204
11205         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11206         annotate_arg_emitter.
11207         * breakpoint.c (print_mention_watchpoint)
11208         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11209         * annotate.h (struct annotate_arg_emitter): New.
11210
11211 2017-04-22  Tom Tromey  <tom@tromey.com>
11212
11213         * record-btrace.c (record_btrace_insn_history)
11214         (record_btrace_insn_history_range, record_btrace_call_history)
11215         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11216         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11217         ui_out_emit_tuple.
11218         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11219         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11220         * skip.c (skip_info): Use ui_out_emit_tuple.
11221         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11222         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11223         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11224         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11225         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11226         ui_out_emit_tuple.
11227         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11228         (output_register, mi_cmd_data_read_memory)
11229         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11230         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11231         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11232         Use ui_out_emit_tuple.
11233         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11234         ui_out_emit_tuple.
11235         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11236         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11237         * linux-thread-db.c (info_auto_load_libthread_db): Use
11238         ui_out_emit_tuple.
11239         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11240         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11241         * disasm.c (do_mixed_source_and_assembly_deprecated)
11242         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11243         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11244         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11245         * breakpoint.c (print_one_breakpoint_location)
11246         (print_one_breakpoint): Use ui_out_emit_tuple.
11247         * auto-load.c (print_script, info_auto_load_cmd): Use
11248         ui_out_emit_tuple.
11249         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11250
11251 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11252
11253         * thread.c (print_thread_info_1): Remove dead code.
11254
11255 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11256
11257         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11258         GDB_SELF_TEST.
11259         * arm-tdep.c (selftests::arm_record_test): Likewise.
11260
11261 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11262
11263         * regcache.c (regcache_restore): Remove argument 2.  Replace
11264         argument 3 with regcache.  Get register status from
11265         src->register_status and get register contents from
11266         register_buffer (src, regnum).
11267         (regcache_cpy): Update.
11268
11269 2017-04-19  Pedro Alves  <palves@redhat.com>
11270
11271         * gdbthread.h (thread): Add missing closing parenthesis in
11272         comment.
11273
11274 2017-04-19  Pedro Alves  <palves@redhat.com>
11275
11276         * common/refcounted-object.h: New file.
11277         * gdbthread.h: Include "common/refcounted-object.h".
11278         (thread_info): Inherit from refcounted_object and add comments.
11279         (thread_info::incref, thread_info::decref)
11280         (thread_info::m_refcount): Delete.
11281         (thread_info::deletable): Use the refcounted_object::refcount()
11282         method.
11283         * inferior.c (current_inferior_): Add comment.
11284         (set_current_inferior): Increment/decrement refcounts.
11285         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11286         not-deletable instead of comparing with the current inferior.
11287         (initialize_inferiors): Increment the initial inferior's refcount.
11288         * inferior.h (struct inferior): Forward declare.
11289         Include "common/refcounted-object.h".
11290         (current_inferior, set_current_inferior): Move declaration to
11291         before struct inferior's definition, and fix comment.
11292         (inferior): Inherit from refcounted_object.  Add comments.
11293         * thread.c (switch_to_thread_no_regs): Reference the thread's
11294         inferior pointer directly instead of doing a ptid lookup.
11295         (switch_to_no_thread): New function.
11296         (switch_to_thread(thread_info *)): New function, factored out
11297         from ...
11298         (switch_to_thread(ptid_t)): ... this.
11299         (restore_current_thread): Delete.
11300         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11301         fields, and add 'inf' field.
11302         (do_restore_current_thread_cleanup): Check whether old->inf is
11303         alive instead of looking up an inferior by ptid.  Use
11304         switch_to_thread and switch_to_no_thread.
11305         (restore_current_thread_cleanup_dtor): Use old->inf directly
11306         instead of lookup up an inferior by id.  Decref the inferior.
11307         Don't restore 'removable'.
11308         (make_cleanup_restore_current_thread): Same the inferior pointer
11309         in old, instead of the inferior number.  Incref the inferior.
11310         Don't save/clear 'removable'.
11311
11312 2017-04-19  Pedro Alves  <palves@redhat.com>
11313
11314         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11315         unittests/scoped_restore-selftests.c.
11316         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11317         * common/scoped_restore.h (scoped_restore_base): Make "class".
11318         (scoped_restore_base::release): New public method.
11319         (scoped_restore_base::scoped_restore_base): New protected ctor.
11320         (scoped_restore_base::m_saved_var): New protected field.
11321         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11322         scoped_restore_base base class instead of m_saved_var directly.
11323         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11324         (scoped_restore_tmpl::scoped_restore_tmpl(const
11325         scoped_restore_tmpl<T>&)): Likewise.
11326         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11327         method.
11328         (scoped_restore_tmpl::saved_var): New method.
11329         (scoped_restore_tmpl::m_saved_var): Delete.
11330         * inferior.h (inferior::detaching): Now a bool.
11331         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11332         cleanup.
11333         * unittests/scoped_restore-selftests.c: New file.
11334
11335 2017-04-19  Pedro Alves  <palves@redhat.com>
11336
11337         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11338         Re-sort in alphabetic order.
11339
11340 2017-04-18  Pedro Alves  <palves@redhat.com>
11341
11342         * xml-support.c (obstack_xml_printf): Delete.
11343         * xml-support.h (obstack_xml_printf): Delete.
11344
11345 2017-04-18  Pedro Alves  <palves@redhat.com>
11346
11347         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11348         vdebug, verror, body_text, start_element, end_element, name,
11349         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11350         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11351         is_xinclude>: Make private and add m_ prefix.
11352         (gdb_xml_parser::body_text): New method, based on ...
11353         (gdb_xml_body_text): ... this.  Adjust.
11354         (gdb_xml_parser::vdebug): New method, based on ...
11355         (gdb_xml_debug): ... this.  Adjust.
11356         (gdb_xml_parser::verror): New method, based on ...
11357         (gdb_xml_error): ... this.  Adjust.
11358         (gdb_xml_parser::start_element): New method, based on ...
11359         (gdb_xml_start_element): ... this.  Adjust.
11360         (gdb_xml_start_element_wrapper): Defer to
11361         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11362         (gdb_xml_parser::end_element): New method, based on ...
11363         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11364         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11365         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11366         (gdb_xml_parser::use_dtd): New method, based on ...
11367         (gdb_xml_use_dtd): ... this.  Adjust.
11368         (gdb_xml_parser::parse): New method, based on ...
11369         (gdb_xml_parse): ... this.  Adjust.
11370         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11371         (xinclude_start_include): Adjust to call the parser's name method.
11372         (xml_xinclude_default, xml_xinclude_start_doctype)
11373         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11374         method.
11375         (xml_process_xincludes): Adjust to call parser methods.
11376         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11377         declarations.
11378
11379 2017-04-18  Pedro Alves  <palves@redhat.com>
11380
11381         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11382         gdb::optional<std::string>.
11383         * xml-support.c: Include <string>.
11384         (scope_level::scope_level(scope_level &&))
11385         (scope_level::~scope_level): Delete.
11386         (scope_level::body): Now a std::string.
11387         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11388         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11389         parameter.
11390         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11391         (xinclude_parsing_data::output): Now a std::string reference.
11392         (xinclude_start_include): Adjust.
11393         (xml_xinclude_default): Adjust.
11394         (xml_process_xincludes): Add 'output' parameter, and return bool.
11395         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11396         and return bool.
11397         * xml-tdesc.c: Include <unordered_map> and <string>.
11398         (tdesc_xml_cache): Delete.
11399         (tdesc_xml_cache_s): Delete.
11400         (xml_cache): Now an std::unordered_map.
11401         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11402         (target_fetch_description_xml): Change return type to
11403         gdb::optional<std::string>, and adjust.
11404         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11405         (target_fetch_description_xml): Change return type to
11406         gdb::optional<std::string>.
11407
11408 2017-04-18  Pedro Alves  <palves@redhat.com>
11409
11410         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11411         unittests/optional-selftests.c.
11412         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11413         * unittests/optional-selftests.c: New file.
11414         * unittests/optional/assignment/1.cc: New file.
11415         * unittests/optional/assignment/2.cc: New file.
11416         * unittests/optional/assignment/3.cc: New file.
11417         * unittests/optional/assignment/4.cc: New file.
11418         * unittests/optional/assignment/5.cc: New file.
11419         * unittests/optional/assignment/6.cc: New file.
11420         * unittests/optional/assignment/7.cc: New file.
11421         * unittests/optional/cons/copy.cc: New file.
11422         * unittests/optional/cons/default.cc: New file.
11423         * unittests/optional/cons/move.cc: New file.
11424         * unittests/optional/cons/value.cc: New file.
11425         * unittests/optional/in_place.cc: New file.
11426         * unittests/optional/observers/1.cc: New file.
11427         * unittests/optional/observers/2.cc: New file.
11428
11429 2017-04-18  Pedro Alves  <palves@redhat.com>
11430
11431         * common/gdb_optional.h: Include common/traits.h.
11432         (in_place_t): New type.
11433         (in_place): New constexpr variable.
11434         (optional::optional): Remove member initialization of
11435         m_instantiated.
11436         (optional::optional(in_place_t...)): New constructor.
11437         (optional::~optional): Use reset.
11438         (optional::optional(const optional&)): New.
11439         (optional::optional(const optional&&)): New.
11440         (optional::optional(T &)): New.
11441         (optional::optional(T &&)): New.
11442         (operator::operator=(const optional &)): New.
11443         (operator::operator=(optional &&)): New.
11444         (operator::operator= (const T &))
11445         (operator::operator= (T &&))
11446         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11447         (operator::reset): New.
11448         (operator::m_instantiated):: Add in-class initializer.
11449         * common/traits.h: Include <type_traits>.
11450         (struct And): New types.
11451
11452 2017-04-18  Pedro Alves  <palves@redhat.com>
11453
11454         * xml-support.c: Include <vector>.
11455         (scope_level::scope_level(const gdb_xml_element *))
11456         (scope_level::scope_level(scope_level&&)): New.
11457         (scope_level::~scope_level): New.
11458         (scope_level_s): Delete.
11459         (gdb_xml_parser::scopes): Now a std::vector.
11460         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11461         Use std::vector.
11462         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11463         scope cleanup code.
11464         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11465         of the scopes member.  Use std::vector::emplace_back.
11466
11467 2017-04-18  Pedro Alves  <palves@redhat.com>
11468
11469         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11470         a bool.
11471         (gdb_xml_end_element): Change type of first parameter.
11472         (gdb_xml_cleanup): Rename to ...
11473         (gdb_xml_parser::~gdb_xml_parser): ... this.
11474         (gdb_xml_create_parser_and_cleanup): Delete with ...
11475         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11476         to this new ctor.
11477         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11478         using gdb_xml_create_parser_and_cleanup.
11479         (xinclude_parsing_data): Add ctor/dtor.
11480         (xml_xinclude_cleanup): Delete.
11481         (xml_process_xincludes): Create a local xinclude_parsing_data
11482         instead of heap-allocating one.  Create a local gdb_xml_parser
11483         instead of heap-allocating one with
11484         gdb_xml_create_parser_and_cleanup.
11485
11486 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11487
11488         PR threads/20743
11489         * fbsd-nat.c (resume_one_thread_cb): Remove.
11490         (resume_all_threads_cb): Remove.
11491         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11492         iterate_over_threads.
11493
11494 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11495
11496         * NEWS: Create a new section for the next release branch.
11497         Rename the section of the current branch, now that it has
11498         been cut.
11499
11500 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11501
11502         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11503         * version.in: Bump version to 8.0.50.DATE-git.
11504
11505 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11506
11507         PR gdb/21385
11508         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11509         independently of the host, and fix build breakage on Cygwin.
11510
11511 2017-04-13  Pedro Alves  <palves@redhat.com>
11512
11513         * inferior.c (free_inferior): Convert to ...
11514         (inferior::~inferior): ... this dtor.
11515         (inferior::inferior): New ctor, factored out from ...
11516         (add_inferior_silent): ... here.  Allocate the inferior with a new
11517         expression.
11518         (delete_inferior): Call delete instead of free_inferior.
11519         * inferior.h (gdb_environ, continuation): Forward declare.
11520         (inferior): Now a class.  Add in-class initialization to all
11521         members.  Make boolean fields bool, except 'detaching'.
11522         (inferior::inferior): New explicit ctor.
11523         (inferior::~inferior): New.
11524
11525 2017-04-13  Pedro Alves  <palves@redhat.com>
11526
11527         * inferior.c (init_inferior_list): Delete.
11528         * inferior.h (init_inferior_list): Delete.
11529
11530 2017-04-13  Pedro Alves  <palves@redhat.com>
11531
11532         PR threads/13217
11533         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11534         (top level): Call it twice, with different thread sets.
11535
11536 2017-04-13  Pedro Alves  <palves@redhat.com>
11537
11538         * thread.c: Include <algorithm>.
11539         (thread_array_cleanup): Delete.
11540         (scoped_inc_dec_ref): New class.
11541         (live_threads_count): New function.
11542         (set_thread_refcount): Delete.
11543         (tp_array_compar_ascending): Now a bool.
11544         (tp_array_compar): Convert to a std::sort comparison function.
11545         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11546         and live_threads_count.
11547
11548 2017-04-13  Pedro Alves  <palves@redhat.com>
11549
11550         * infrun.c (follow_fork_inferior): Also switch the current
11551         inferior.
11552
11553 2017-04-13  Pedro Alves  <palves@redhat.com>
11554
11555         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11556         before calling create_internal_breakpoint.
11557
11558 2017-04-13  Pedro Alves  <palves@redhat.com>
11559
11560         * fork-child.c (execv_argv): New class.
11561         (breakup_args): Refactored as ...
11562         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11563         Copy arguments to storage and replace separators with NULL
11564         terminators in place.
11565         (escape_bang_in_quoted_argument): Adjust to return bool.
11566         (execv_argv::execv_argv): New ctor.
11567         (execv_argv::init_for_shell): New method, factored out from
11568         fork_inferior.  Don't strdup strings into the vector.
11569         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11570         Remove free_vector_argv call.
11571
11572 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11573
11574         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11575         tdep->rx_psw_type.
11576
11577 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11578
11579         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11580         * rx-tdep.c (rx_gdbarch_init): Likewise.
11581
11582 2017-04-13  Pedro Alves  <palves@redhat.com>
11583
11584         * breakpoint.h (struct breakpoint): Reindent.
11585
11586 2017-04-13  Pedro Alves  <palves@redhat.com>
11587
11588         * breakpoint.c (bp_location): Rename to ...
11589         (bp_locations): ... this.  All references updated.
11590         (bp_location_count): Rename to ...
11591         (bp_locations_count): ... this.  All references updated.
11592         (bp_location_placed_address_before_address_max): Rename to ...
11593         (bp_locations_placed_address_before_address_max): ... this.  All
11594         references updated.
11595         (bp_location_shadow_len_after_address_max): Rename to ...
11596         (bp_locations_shadow_len_after_address_max): ... this.  All
11597         references updated.
11598         (bp_location_compare_addrs): Rename to ...
11599         (bp_locations_compare_addrs): ... this.  All references updated.
11600         (bp_location_compare):Rename to ...
11601         (bp_locations_compare): ... this.  All references updated.
11602         (bp_location_target_extensions_update): Rename to ...
11603         (bp_locations_target_extensions_update): ... this.  All references
11604         updated.
11605
11606 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11607
11608         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11609         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11610         'sgtty.h'.
11611         * common/gdb_termios.h: New file, with parts of "terminal.h".
11612         * inflow.c: Include "gdb_termios.h".
11613         * ser-unix.c: Include "gdb_termios.h".
11614         * terminal.h: Move terminal-related defines to
11615         "common/gdb_termios.h".
11616
11617 2017-04-12  Tom Tromey  <tom@tromey.com>
11618
11619         * probe.c (parse_probes): Update.
11620         * location.h (delete_event_location): Don't declare.
11621         (event_location_deleter::operator()): Update.
11622         * location.c (event_location_deleter::operator()): Rename from
11623         delete_event_location.
11624         * linespec.h (linespec_result) <location>: Change type to
11625         event_location_up.
11626         * linespec.c (canonicalize_linespec, event_location_to_sals)
11627         (decode_objc): Update.
11628         (linespec_result): Don't call delete_event_location.
11629         * breakpoint.c (create_breakpoints_sal)
11630         (bkpt_probe_create_sals_from_location)
11631         (strace_marker_create_sals_from_location): Update.
11632
11633 2017-04-12  Tom Tromey  <tom@tromey.com>
11634
11635         * linespec.h (struct linespec_result): Add constructor and
11636         destructor.
11637         (init_linespec_result, destroy_linespec_result)
11638         (make_cleanup_destroy_linespec_result): Don't declare.
11639         * linespec.c (init_linespec_result): Remove.
11640         (linespec_result::~linespec_result): Rename from
11641         destroy_linespec_result.  Update.
11642         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11643         Remove.
11644         * breakpoint.c (create_breakpoint, break_range_command)
11645         (decode_location_default): Update.
11646         * ax-gdb.c (agent_command_1): Update.
11647
11648 2017-04-12  Tom Tromey  <tom@tromey.com>
11649
11650         * remote.c (remote_download_tracepoint): Update.
11651         * python/py-breakpoint.c (bppy_get_location): Update.
11652         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11653         (gdbscm_breakpoint_location): Update.
11654         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11655         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11656         Change type to event_location_up.
11657         * breakpoint.c (create_overlay_event_breakpoint)
11658         (create_longjmp_master_breakpoint)
11659         (create_std_terminate_master_breakpoint)
11660         (create_exception_master_breakpoint)
11661         (breakpoint_event_location_empty_p, print_breakpoint_location)
11662         (print_one_breakpoint_location, create_thread_event_breakpoint)
11663         (init_breakpoint_sal, create_breakpoint)
11664         (print_recreate_ranged_breakpoint, break_range_command)
11665         (init_ada_exception_breakpoint, say_where): Update.
11666         (base_breakpoint_dtor): Don't call delete_event_location.
11667         (bkpt_print_recreate, tracepoint_print_recreate)
11668         (dprintf_print_recreate, update_static_tracepoint)
11669         (breakpoint_re_set_default): Update.
11670
11671 2017-04-12  Tom Tromey  <tom@tromey.com>
11672
11673         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11674         type of "to_do".  Update.
11675         (compute_stack_depth): Use std::vector.
11676
11677 2017-04-12  Tom Tromey  <tom@tromey.com>
11678
11679         * printcmd.c (find_instruction_backward): Use std::vector.
11680
11681 2017-04-12  Tom Tromey  <tom@tromey.com>
11682
11683         * symfile.c (objfilep): Remove typedef.
11684         (reread_symbols): Use a std::vector.
11685
11686 2017-04-12  Tom Tromey  <tom@tromey.com>
11687
11688         * mi/mi-main.c (exec_direction_forward): Remove.
11689         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11690         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11691         scoped_restore.
11692         * guile/guile.c (guile_repl_command, guile_command)
11693         (gdbscm_execute_gdb_command): Use scoped_restore.
11694         * go-exp.y (go_parse): Use scoped_restore.
11695         * d-exp.y (d_parse): Use scoped_restore.
11696         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11697         * c-exp.y (c_parse): Use scoped_restore.
11698
11699 2017-04-12  Tom Tromey  <tom@tromey.com>
11700
11701         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11702         (mi_parse): Update return type.
11703         (mi_parse_free): Remove.
11704         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11705         (mi_parse::~mi_parse): Rename from mi_parse_free.
11706         (mi_parse_cleanup): Remove.
11707         (mi_parse): Return a unique_ptr.  Use new.
11708         * mi/mi-main.c (mi_execute_command): Update.
11709
11710 2017-04-12  Tom Tromey  <tom@tromey.com>
11711
11712         * location.c (explicit_location_lex_one): Return a
11713         unique_xmalloc_ptr.
11714         (string_to_explicit_location): Update.  Remove cleanups.
11715
11716 2017-04-12  Tom Tromey  <tom@tromey.com>
11717
11718         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11719         (compare_value_and_voffset): Change type.  Update.
11720         (compute_vtable_size): Change type of "offset_vec".
11721         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11722         (gnuv3_get_typeid): Remove extraneous declaration.
11723
11724 2017-04-12  Tom Tromey  <tom@tromey.com>
11725
11726         * charset.h (wchar_iterator): Fix comment.
11727
11728 2017-04-12  Tom Tromey  <tom@tromey.com>
11729
11730         * charset.c (iconv_wrapper): New class.
11731         (cleanup_iconv): Remove.
11732         (convert_between_encodings): Use it.
11733
11734 2017-04-12  Tom Tromey  <tom@tromey.com>
11735
11736         * symfile.h (increment_reading_symtab): Update type.
11737         * symfile.c (decrement_reading_symtab): Remove.
11738         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11739         * psymtab.c (psymtab_to_symtab): Update.
11740         * dwarf2read.c (dw2_instantiate_symtab): Update.
11741
11742 2017-04-12  Tom Tromey  <tom@tromey.com>
11743
11744         * jit.c (struct jit_reader): Declare separately.  Add constructor
11745         and destructor.  Change type of "handle".
11746         (loaded_jit_reader): Define separately.
11747         (jit_reader_load): Update.  New "new".
11748         (jit_reader_unload_command): Use "delete".
11749         * gdb-dlfcn.h (struct dlclose_deleter): New.
11750         (gdb_dlhandle_up): New typedef.
11751         (gdb_dlopen, gdb_dlsym): Update types.
11752         (gdb_dlclose): Remove.
11753         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11754         (gdb_dlsym): Change type of "handle".
11755         (make_cleanup_dlclose): Remove.
11756         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11757         * compile/compile-c-support.c (load_libcc): Update.
11758
11759 2017-04-12  Tom Tromey  <tom@tromey.com>
11760
11761         * symtab.h (find_pcs_for_symtab_line): Change return type.
11762         * symtab.c (find_pcs_for_symtab_line): Change return type.
11763         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11764         type of "vec".  Update.
11765         (ltpy_get_pcs_for_line): Update.
11766         * linespec.c (decode_digits_ordinary): Update.
11767
11768 2017-04-12  Tom Tromey  <tom@tromey.com>
11769
11770         * tracepoint.c (actions_command): Update.
11771         * python/python.c (python_command, python_interactive_command):
11772         Update.
11773         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11774         * guile/guile.c (guile_command): Update.
11775         * defs.h (read_command_lines, read_command_lines_1): Return
11776         command_line_up.
11777         (command_lines_deleter): New struct.
11778         (command_line_up): New typedef.
11779         * compile/compile.c (compile_code_command)
11780         (compile_print_command): Update.
11781         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11782         command_line_up.
11783         (make_cleanup_free_command_lines): Remove.
11784         * cli/cli-script.c (get_command_line, read_command_lines_1)
11785         (copy_command_lines): Return command_line_up.
11786         (while_command, if_command, read_command_lines, define_command)
11787         (document_command): Update.
11788         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11789         Remove.
11790         * breakpoint.h (breakpoint_set_commands): Change type of
11791         "commands".
11792         * breakpoint.c (breakpoint_set_commands): Change type of
11793         "commands".  Update.
11794         (do_map_commands_command, update_dprintf_command_list)
11795         (create_tracepoint_from_upload): Update.
11796
11797 2017-04-12  Tom Tromey  <tom@tromey.com>
11798
11799         * tracepoint.c (scope_info): Update.
11800         * spu-tdep.c (spu_catch_start): Update.
11801         * python/python.c (gdbpy_decode_line): Update.
11802         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11803         * python/py-breakpoint.c (bppy_init): Update.
11804         * probe.c (parse_probes): Update.
11805         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11806         * location.h (event_location_deleter): New struct.
11807         (event_location_up): New typedef.
11808         (new_linespec_location, new_address_location, new_probe_location)
11809         (new_explicit_location, copy_event_location)
11810         (string_to_event_location, string_to_event_location_basic)
11811         (string_to_explicit_location): Update return type.
11812         (make_cleanup_delete_event_location): Remove.
11813         * location.c (new_linespec_location, new_address_location)
11814         (new_probe_location, new_explicit_location, copy_event_location):
11815         Return event_location_up.
11816         (delete_event_location_cleanup)
11817         (make_cleanup_delete_event_location): Remove.
11818         (string_to_explicit_location, string_to_event_location_basic)
11819         (string_to_event_location): Return event_location_up.
11820         * linespec.c (canonicalize_linespec, event_location_to_sals)
11821         (decode_line_with_current_source)
11822         (decode_line_with_last_displayed, decode_objc): Update.
11823         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11824         * completer.c (location_completer): Update.
11825         * cli/cli-cmds.c (edit_command, list_command): Update.
11826         * breakpoint.c (create_overlay_event_breakpoint)
11827         (create_longjmp_master_breakpoint)
11828         (create_std_terminate_master_breakpoint)
11829         (create_exception_master_breakpoint)
11830         (create_thread_event_breakpoint): Update.
11831         (init_breakpoint_sal): Update.  Remove some dead code.
11832         (create_breakpoint_sal): Change type of "location".  Update.
11833         (create_breakpoints_sal, create_breakpoint, break_command_1)
11834         (dprintf_command, break_range_command, until_break_command)
11835         (init_ada_exception_breakpoint)
11836         (strace_marker_create_sals_from_location)
11837         (update_static_tracepoint, trace_command, ftrace_command)
11838         (strace_command, create_tracepoint_from_upload): Update.
11839         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11840         * ax-gdb.c (agent_command_1): Update.
11841
11842 2017-04-12  Pedro Alves  <palves@redhat.com>
11843
11844         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11845         * configure.tgt: Handle i[34567]86-*-go32* and
11846         i[34567]86-*-msdosdjgpp*.
11847         * i386-tdep.c (i386_svr4_reg_to_regnum):
11848         Make extern.
11849         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11850         i386-go32-tdep.c.
11851         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11852         * i386-go32-tdep.c: New file.
11853         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11854         declarations.
11855
11856 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11857
11858         * aix-thread.c (pd_status2str): Change return type to const char *.
11859
11860 2017-04-12  Pedro Alves  <palves@redhat.com>
11861
11862         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11863         calls to set_gdbarch_gnu_triplet_regexp.
11864
11865 2017-04-12  Pedro Alves  <palves@redhat.com>
11866
11867         PR gdb/21323
11868         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11869         New enum value.
11870         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11871         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11872         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11873         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11874         * gdbarch.h, gdbarch.c: Regenerate.
11875         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11876         gdbarch_wchar_bit and gdbarch_wchar_signed.
11877         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11878         * arm-tdep.c (arm_gdbarch_init): Likewise.
11879         * avr-tdep.c (avr_gdbarch_init): Likewise.
11880         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11881         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11882         * i386-tdep.c (i386_go32_init_abi): Likewise.
11883         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11884         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11885         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11886         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11887         * sh-tdep.c (sh_gdbarch_init): Likewise.
11888         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11889         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11890         * windows-tdep.c (windows_init_abi): Likewise.
11891         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11892
11893 2017-04-12  Pedro Alves  <palves@redhat.com>
11894
11895         PR c++/21323
11896         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11897         cplus_primitive_type_char32_t>: New enum values.
11898         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11899         and cplus_primitive_type_char32_t.
11900         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11901         32, use the archtecture's built-in type for char16_t and char32_t,
11902         respectively.  Otherwise, fallback to init_integer_type as before,
11903         but make the type unsigned, and issue a complaint.
11904         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11905
11906 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11907
11908         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11909         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11910
11911 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11912
11913         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11914         'const char *'.
11915
11916 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11917
11918         * common/common-utils.c (free_vector_argv): New function.
11919         * common/common-utils.h: Include <vector>.
11920         (free_vector_argv): New prototype.
11921         * darwin-nat.c (darwin_create_inferior): Rewrite function
11922         prototype in order to constify "exec_file" and accept a
11923         "std::string" for "allargs".
11924         * fork-child.c: Include <vector>.
11925         (breakup_args): Rewrite function, using C++.
11926         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11927         and accept "std::string" for "allargs".  Update the code to
11928         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11929         and "execvp".
11930         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11931         order to constify "exec_file" and accept a "std::string" for
11932         "allargs".
11933         * go32-nat.c (go32_create_inferior): Likewise.
11934         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11935         * infcmd.c (run_command_1): Constify "exec_file".  Use
11936         "std::string" for inferior arguments.
11937         * inferior.h (fork_inferior): Update prototype.
11938         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11939         prototype in order to constify "exec_file" and accept a
11940         "std::string" for "allargs".
11941         * nto-procfs.c (procfs_create_inferior): Likewise.
11942         * procfs.c (procfs_create_inferior): Likewise.
11943         * remote-sim.c (gdbsim_create_inferior): Likewise.
11944         * remote.c (extended_remote_run): Update code to accept
11945         "std::string" as argument.
11946         (extended_remote_create_inferior): Rewrite function prototype in
11947         order to constify "exec_file" and accept a "std::string" for
11948         "allargs".
11949         * rs6000-nat.c (super_create_inferior): Likewise.
11950         (rs6000_create_inferior): Likewise.
11951         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11952         * windows-nat.c (windows_create_inferior): Likewise.
11953
11954 2017-04-11  Pedro Alves  <palves@redhat.com>
11955
11956         * thread.c: Fix whitespace throughout.
11957
11958 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11959
11960         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11961
11962 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11963
11964         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11965
11966 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11967
11968         PR gdb/21364
11969         * osdata.c (info_osdata): Check if 'type' is an empty string
11970         instead of NULL.
11971
11972 2017-04-10  Pedro Alves  <palves@redhat.com>
11973
11974         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11975         (ptid_to_global_thread_id, in_thread_list)
11976         (do_captured_list_thread_ids, set_resumed, set_running)
11977         (set_executing, set_stop_requested, finish_thread_state)
11978         (validate_registers_access, can_access_registers_ptid)
11979         (print_thread_info_1, switch_to_thread)
11980         (do_restore_current_thread_cleanup)
11981         (make_cleanup_restore_current_thread, thread_command)
11982         (thread_name_command): Use operator== instead of ptid_equal.
11983
11984 2017-04-10  Pedro Alves  <palves@redhat.com>
11985
11986         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11987         (current_thread_cleanup_chain): Delete.
11988         (restore_current_thread_cleanup_dtor)
11989         (make_cleanup_restore_current_thread): Remove references to
11990         current_thread_cleanup_chain.
11991
11992 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11993
11994         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11995         REG_UNKNOWN.
11996
11997 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11998
11999         PR gdb/19942
12000         * gdbthread.h (thread_info::deletable): New method.
12001         (thread_info::incref): New method.
12002         (thread_info::decref): New method.
12003         (thread_info::refcount): Move it to private.
12004         * infrun.c (save_stop_context): Call inc_refcount.
12005         (release_stop_context_cleanup): Likewise.
12006         * thread.c (set_thread_exited): New function.
12007         (init_thread_list): Delete "tp" only it is deletable, otherwise
12008         call set_thread_exited.
12009         (delete_thread_1): Call set_thread_exited.
12010         (current_thread_cleanup) <inferior_pid>: Remove.
12011         <thread>: New field.
12012         (restore_current_thread_ptid_changed): Removed.
12013         (do_restore_current_thread_cleanup): Adjust.
12014         (restore_current_thread_cleanup_dtor): Don't call
12015         find_thread_ptid.
12016         (set_thread_refcount): Use dec_refcount.
12017         (make_cleanup_restore_current_thread): Adjust.
12018         (thread_apply_all_command): Call inc_refcount.
12019         (_initialize_thread): Don't call
12020         observer_attach_thread_ptid_changed.
12021
12022 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12023
12024         * thread.c (delete_thread_1): Hoist code on marking thread as
12025         exited.
12026
12027 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12028
12029         * windows-nat.c (windows_detach): Initialize ptid with
12030         minus_one_ptid.
12031
12032 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12033
12034         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12035
12036 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12037
12038         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12039         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12040         (bfin_pseudo_register_write): Likewise
12041
12042 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12043
12044         * common/ptid.h (struct ptid): Change to...
12045         (class ptid_t): ... this.
12046         <ptid_t>: New constructors.
12047         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12048         matches>: New methods.
12049         <make_null, make_minus_one>: New static methods.
12050         <pid>: Rename to...
12051         <m_pid>: ...this.
12052         <lwp>: Rename to...
12053         <m_lwp>: ...this.
12054         <tid>: Rename to...
12055         <m_tid>: ...this.
12056         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12057         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12058         as references, move comment to class ptid_t.
12059         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12060         ptid_t static methods.
12061         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12062         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12063         Take ptid arguments as references, implement using ptid_t methods.
12064         * unittests/ptid-selftests.c: New file.
12065         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12066         unittests/ptid-selftests.c.
12067         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12068
12069 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12070
12071         * python/python.c (python_run_simple_file): Cast mode literal to
12072         non-const char pointer as expected by PyFile_FromString.
12073
12074 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12075
12076         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12077         minus_one_ptid and null_ptid.
12078
12079 2017-04-05  Pedro Alves  <palves@redhat.com>
12080
12081         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12082         * configure: Regenerate.
12083
12084 2017-04-05  Pedro Alves  <palves@redhat.com>
12085
12086         * ada-exp.y (yyerror): Constify.
12087         * ada-lang.c (bound_name, get_selections)
12088         (ada_variant_discrim_type)
12089         (ada_variant_discrim_name, ada_value_struct_elt)
12090         (ada_lookup_struct_elt_type, is_unchecked_variant)
12091         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12092         (catch_ada_exception_command_split)
12093         (catch_ada_assert_command_split, catch_assert_command)
12094         (ada_op_name): Constify.
12095         * ada-lang.h (ada_yyerror, get_selections)
12096         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12097         * arc-tdep.c (arc_print_frame_cache): Constify.
12098         * arm-tdep.c (arm_skip_stub): Constify.
12099         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12100         (gen_aggregate_elt_ref): Constify.
12101         * bcache.c (print_bcache_statistics): Constify.
12102         * bcache.h (print_bcache_statistics): Constify.
12103         * break-catch-throw.c (catch_exception_command_1):
12104         * breakpoint.c (struct ep_type_description::description):
12105         Constify.
12106         (add_solib_catchpoint): Constify.
12107         (catch_fork_command_1): Add cast.
12108         (add_catch_command): Constify.
12109         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12110         Constify.
12111         * bsd-uthread.c (bsd_uthread_state): Constify.
12112         * buildsym.c (patch_subfile_names): Constify.
12113         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12114         Constify.
12115         * c-exp.y (yyerror): Constify.
12116         (token::oper): Constify.
12117         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12118         * c-varobj.c (cplus_describe_child): Constify.
12119         * charset.c (find_charset_names): Add cast.
12120         (find_charset_names): Constify array and add const_cast.
12121         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12122         (edit_command): Constify.
12123         * cli/cli-decode.c (lookup_cmd): Constify.
12124         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12125         Constify.
12126         (struct dump_context): Constify.
12127         (add_dump_command, restore_command): Constify.
12128         * cli/cli-script.c (get_command_line): Constify.
12129         * cli/cli-script.h (get_command_line): Constify.
12130         * cli/cli-utils.c (check_for_argument): Constify.
12131         * cli/cli-utils.h (check_for_argument): Constify.
12132         * coff-pe-read.c (struct read_pe_section_data): Constify.
12133         * command.h (lookup_cmd): Constify.
12134         * common/print-utils.c (decimal2str): Constify.
12135         * completer.c (gdb_print_filename): Constify.
12136         * corefile.c (set_gnutarget): Constify.
12137         * cp-name-parser.y (yyerror): Constify.
12138         * cp-valprint.c (cp_print_class_member): Constify.
12139         * cris-tdep.c (cris_register_name, crisv32_register_name):
12140         Constify.
12141         * d-exp.y (yyerror): Constify.
12142         (struct token::oper): Constify.
12143         * d-lang.h (d_yyerror): Constify.
12144         * dbxread.c (struct header_file_location::name): Constify.
12145         (add_old_header_file, add_new_header_file, last_function_name)
12146         (dbx_next_symbol_text, add_bincl_to_list)
12147         (find_corresponding_bincl_psymtab, set_namestring)
12148         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12149         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12150         * defs.h (command_line_input, print_address_symbolic)
12151         (deprecated_readline_begin_hook): Constify.
12152         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12153         Constify.
12154         * event-top.c (handle_line_of_input): Constify and add cast.
12155         * exceptions.c (catch_errors): Constify.
12156         * exceptions.h (catch_errors): Constify.
12157         * expprint.c (print_subexp_standard, op_string, op_name)
12158         (op_name_standard, dump_raw_expression, dump_raw_expression):
12159         * expression.h (op_name, op_string, dump_raw_expression):
12160         Constify.
12161         * f-exp.y (yyerror): Constify.
12162         (struct token::oper): Constify.
12163         (struct f77_boolean_val::name): Constify.
12164         * f-lang.c (f_word_break_characters): Constify.
12165         * f-lang.h (f_yyerror): Constify.
12166         * fork-child.c (fork_inferior): Add cast.
12167         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12168         (new_variant): Constify.
12169         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12170         * gdbarch.c: Regenerate.
12171         * gdbcore.h (set_gnutarget): Constify.
12172         * go-exp.y (yyerror): Constify.
12173         (token::oper): Constify.
12174         * go-lang.h (go_yyerror): Constify.
12175         * go32-nat.c (go32_sysinfo): Constify.
12176         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12177         * guile/scm-cmd.c (cmdscm_function): Constify.
12178         * guile/scm-param.c (pascm_param_value): Constify.
12179         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12180         (h8300sx_register_name): Constify.
12181         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12182         Constify.
12183         * ia64-tdep.c (ia64_register_names): Constify.
12184         * infcmd.c (construct_inferior_arguments): Constify.
12185         (path_command, attach_post_wait): Constify.
12186         * language.c (show_range_command, show_case_command)
12187         (unk_lang_error): Constify.
12188         * language.h (language_defn::la_error)
12189         (language_defn::la_name_of_this): Constify.
12190         * linespec.c (decode_line_2): Constify.
12191         * linux-thread-db.c (thread_db_err_str): Constify.
12192         * lm32-tdep.c (lm32_register_name): Constify.
12193         * m2-exp.y (yyerror): Constify.
12194         * m2-lang.h (m2_yyerror): Constify.
12195         * m32r-tdep.c (m32r_register_names): Constify and make static.
12196         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12197         * m88k-tdep.c (m88k_register_name): Constify.
12198         * macroexp.c (appendmem): Constify.
12199         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12200         (upgrade_type, parse_external, parse_partial_symbols)
12201         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12202         (new_symbol): Constify.
12203         * memattr.c (mem_info_command): Constify.
12204         * mep-tdep.c (register_name_from_keyword): Constify.
12205         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12206         Constify.
12207         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12208         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12209         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12210         cast.
12211         (mi_execute_async_cli_command): Constify.
12212         * mips-tdep.c (mips_register_name): Constify.
12213         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12214         (am33_register_name, am33_2_register_name)
12215         * moxie-tdep.c (moxie_register_names): Constify.
12216         * nat/linux-osdata.c (osdata_type): Constify fields.
12217         * nto-tdep.c (nto_parse_redirection): Constify.
12218         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12219         (lookup_child_selector): Constify.
12220         (objc_methcall::name): Constify.
12221         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12222         (lookup_struct_typedef): Constify.
12223         * objfiles.c (pc_in_section): Constify.
12224         * objfiles.h (pc_in_section): Constify.
12225         * p-exp.y (struct token::oper): Constify.
12226         (yyerror): Constify.
12227         * p-lang.h (pascal_yyerror): Constify.
12228         * parser-defs.h (op_name_standard): Constify.
12229         (op_print::string): Constify.
12230         (exp_descriptor::op_name): Constify.
12231         * printcmd.c (print_address_symbolic): Constify.
12232         * psymtab.c (print_partial_symbols): Constify.
12233         * python/py-breakpoint.c (stop_func): Constify.
12234         (bppy_get_expression): Constify.
12235         * python/py-cmd.c (cmdpy_completer::name): Constify.
12236         (cmdpy_function): Constify.
12237         * python/py-event.c (evpy_add_attribute)
12238         (gdbpy_initialize_event_generic): Constify.
12239         * python/py-event.h (evpy_add_attribute)
12240         (gdbpy_initialize_event_generic): Constify.
12241         * python/py-evts.c (add_new_registry): Constify.
12242         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12243         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12244         * python/py-inferior.c (get_buffer): Add cast.
12245         * python/py-param.c (parm_constant::name): Constify.
12246         * python/py-unwind.c (fprint_frame_id): Constify.
12247         * python/python.c (gdbpy_parameter_value): Constify.
12248         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12249         * remote.c (memory_packet_config::name): Constify.
12250         (show_packet_config_cmd, remote_write_bytes)
12251         (remote_buffer_add_string):
12252         * reverse.c (exec_reverse_once): Constify.
12253         * rs6000-tdep.c (variant::name, variant::description): Constify.
12254         * rust-exp.y (rustyyerror): Constify.
12255         * rust-lang.c (rust_op_name): Constify.
12256         * rust-lang.h (rustyyerror): Constify.
12257         * serial.h (serial_ops::name): Constify.
12258         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12259         (sh_sh3e_register_name, sh_sh2e_register_name)
12260         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12261         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12262         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12263         (sh_sh4al_dsp_register_name): Constify.
12264         * sh64-tdep.c (sh64_register_name): Constify.
12265         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12266         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12267         * stabsread.c (patch_block_stabs, read_type_number)
12268         (ref_map::stabs, ref_add, process_reference)
12269         (symbol_reference_defined, define_symbol, define_symbol)
12270         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12271         (read_one_struct_field, read_struct_fields, read_baseclasses)
12272         (read_tilde_fields, read_struct_type, read_array_type)
12273         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12274         (read_huge_number, read_range_type, read_args, common_block_start)
12275         (find_name_end): Constify.
12276         * stabsread.h (common_block_start, define_symbol)
12277         (process_one_symbol, symbol_reference_defined, ref_add):
12278         * symfile.c (get_section_index, add_symbol_file_command):
12279         * symfile.h (get_section_index): Constify.
12280         * target-descriptions.c (tdesc_type::name): Constify.
12281         (tdesc_free_type): Add cast.
12282         * target.c (find_default_run_target):
12283         (add_deprecated_target_alias, find_default_run_target)
12284         (target_announce_detach): Constify.
12285         (do_option): Constify.
12286         * target.h (add_deprecated_target_alias): Constify.
12287         * thread.c (print_thread_info_1): Constify.
12288         * top.c (deprecated_readline_begin_hook, command_line_input):
12289         Constify.
12290         (init_main): Add casts.
12291         * top.h (handle_line_of_input): Constify.
12292         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12293         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12294         (tfind_command): Rename to ...
12295         (tfind_command_1): ... this and constify.
12296         (tfind_command): New function.
12297         (tfind_end_command, tfind_start_command): Adjust.
12298         (encode_source_string): Constify.
12299         * tracepoint.h (encode_source_string): Constify.
12300         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12301         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12302         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12303         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12304         * tui/tui-win.c (parse_scrolling_args): Constify.
12305         * tui/tui-windata.c (tui_erase_data_content): Constify.
12306         * tui/tui-windata.h (tui_erase_data_content): Constify.
12307         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12308         * tui/tui.c (tui_enable): Add cast.
12309         * utils.c (defaulted_query): Constify.
12310         (init_page_info): Add cast.
12311         (puts_debug, subset_compare): Constify.
12312         * utils.h (subset_compare): Constify.
12313         * varobj.c (varobj_format_string): Constify.
12314         * varobj.h (varobj_format_string): Constify.
12315         * vax-tdep.c (vax_register_name): Constify.
12316         * windows-nat.c (windows_detach): Constify.
12317         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12318         * xml-support.c (gdb_xml_end_element): Constify.
12319         * xml-tdesc.c (tdesc_start_reg): Constify.
12320         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12321         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12322         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12323
12324 2017-04-05  Pedro Alves  <palves@redhat.com>
12325
12326         * proc-api.c (struct trans): Constify.
12327         (procfs_note): Constify.
12328         * proc-events.c (struct trans, syscall_table):
12329         * proc-flags.c (struct trans): Constify.
12330         * proc-utils.h (procfs_note): Constify.
12331         * proc-why.c (struct trans): Constify.
12332         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12333         (procfs_detach): Constify.
12334         * sol-thread.c (struct string_map): Constify.
12335         (td_err_string, td_state_string): Constify.
12336
12337 2017-04-05  Pedro Alves  <palves@redhat.com>
12338
12339         * proc-api.c (procfs_filename): Don't initialize
12340         procfs_filename.
12341         (prepare_to_trace): Assume procfs_filename is non-NULL.
12342         (_initialize_proc_api): Give procfs_filename a default value here.
12343
12344 2017-04-05  Pedro Alves  <palves@redhat.com>
12345
12346         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12347         'cond_string' parameter.
12348         (extract_exception_regexp): Constify 'string' parameter.
12349         (catch_exception_command_1): Constify.
12350         * breakpoint.c (init_catchpoint)
12351         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12352         parameter.
12353         (ep_parse_optional_if_clause, catch_fork_command_1)
12354         (catch_exec_command_1): Constify.
12355         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12356         parameter.
12357         (ep_parse_optional_if_clause): Constify.
12358         * cli/cli-utils.c (remove_trailing_whitespace)
12359         (check_for_argument): Constify.
12360         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12361         non-const overload.
12362         (check_for_argument): Likewise.
12363
12364 2017-04-05  Pedro Alves  <palves@redhat.com>
12365
12366         * event-top.c (command_line_handler): Add cast to execute_command
12367         call.
12368         * record-btrace.c (cmd_record_btrace_bts_start)
12369         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12370         (cmd_record_btrace_start): Add cast to execute_command call.
12371         * record-full.c (record_full_goto_insn):
12372         * record.c (record_start, record_stop): Add cast to
12373         execute_command_to_string calls.
12374         (cmd_record_start): Add cast to execute_command calls.
12375
12376 2017-04-05  Pedro Alves  <palves@redhat.com>
12377
12378         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12379         static inline function.
12380         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12381         array and use gdb_PyArg_ParseTupleAndKeywords.
12382         * python/py-cmd.c (cmdpy_init): Likewise.
12383         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12384         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12385         (infpy_search_memory): Likewise.
12386         * python/py-objfile.c (objfpy_add_separate_debug_file)
12387         (gdbpy_lookup_objfile): Likewise.
12388         * python/py-symbol.c (gdbpy_lookup_symbol)
12389         (gdbpy_lookup_global_symbol): Likewise.
12390         * python/py-type.c (gdbpy_lookup_type): Likewise.
12391         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12392         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12393         Likewise.
12394
12395 2017-04-05  Pedro Alves  <palves@redhat.com>
12396
12397         * python/python-internal.h (gdb_PyGetSetDef): New type.
12398         * python/py-block.c (block_object_getset)
12399         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12400         * python/py-event.c (event_object_getset)
12401         (finish_breakpoint_object_getset): Likewise.
12402         * python/py-inferior.c (inferior_object_getset): Likewise.
12403         * python/py-infthread.c (thread_object_getset): Likewise.
12404         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12405         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12406         * python/py-objfile.c (objfile_getset): Likewise.
12407         * python/py-progspace.c (pspace_getset): Likewise.
12408         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12409         Likewise.
12410         * python/py-record.c (recpy_record_getset): Likewise.
12411         * python/py-symbol.c (symbol_object_getset): Likewise.
12412         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12413         Likewise.
12414         * python/py-type.c (type_object_getset, field_object_getset):
12415         Likewise.
12416         * python/py-value.c (value_object_getset): Likewise.
12417
12418 2017-04-05  Pedro Alves  <palves@redhat.com>
12419
12420         * python/python-internal.h (gdb_PyObject_CallMethod)
12421         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12422         New functions.
12423         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12424         (PySys_GetObject, PySys_SetPath): New macros.
12425
12426 2017-04-05  Pedro Alves  <palves@redhat.com>
12427
12428         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12429         info_osdata_command.
12430         * osdata.c (info_osdata_command): Rename to ...
12431         (info_osdata): ... this.  Constify 'type' parameter, and remove
12432         the 'from_tty' parameter.  Accept NULL TYPE.
12433         (info_osdata_command): New function.
12434         * osdata.h (info_osdata_command): Remove declaration.
12435         (info_osdata): New declaration.
12436
12437 2017-04-05  Pedro Alves  <palves@redhat.com>
12438
12439         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12440         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12441         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12442         parameter.
12443         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12444         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12445         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12446         parameter.
12447         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12448         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12449         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12450         (mi_cmd_file_list_exec_source_files)
12451         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12452         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12453         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12454         parameter.
12455         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12456         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12457         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12458         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12459         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12460         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12461         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12462         'command' parameter.
12463         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12464         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12465         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12466         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12467         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12468         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12469         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12470         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12471         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12472         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12473         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12474         parameter.
12475         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12476         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12477         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12478         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12479         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12480         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12481         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12482         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12483         (mi_cmd_data_list_changed_registers)
12484         (mi_cmd_data_write_register_values)
12485         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12486         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12487         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12488         (mi_cmd_list_features, mi_cmd_list_target_features)
12489         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12490         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12491         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12492         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12493         (mi_cmd_trace_frame_collected): Constify 'command'
12494         parameter.
12495         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12496         'command' parameter.
12497
12498 2017-04-05  Pedro Alves  <palves@redhat.com>
12499
12500         * ada-lang.c (ada_completer_word_break_characters): Now a const
12501         array.
12502         (ada_get_gdb_completer_word_break_characters): Constify.
12503         * completer.c (gdb_completer_command_word_break_characters)
12504         (gdb_completer_file_name_break_characters)
12505         (gdb_completer_quote_characters): Now const arrays.
12506         (get_gdb_completer_quote_characters): Constify.
12507         (set_rl_completer_word_break_characters): New function.
12508         (set_gdb_completion_word_break_characters)
12509         (complete_line_internal): Use it.
12510         * completer.h (get_gdb_completer_quote_characters): Constify.
12511         (set_rl_completer_word_break_characters): Declare.
12512         * f-lang.c (f_word_break_characters): Constify.
12513         * language.c (default_word_break_characters): Constify.
12514         * language.h (language_defn::la_word_break_characters): Constify.
12515         (default_word_break_characters): Constify.
12516         * top.c (init_main): Use set_rl_completer_word_break_characters.
12517
12518 2017-04-05  Pedro Alves  <palves@redhat.com>
12519
12520         * aix-thread.c (aix_thread_pid_to_str)
12521         (aix_thread_extra_thread_info): Constify.
12522         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12523         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12524         (bsd_uthread_pid_to_str): Constify.
12525         * corelow.c (core_pid_to_str): Constify.
12526         * darwin-nat.c (darwin_pid_to_str): Constify.
12527         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12528         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12529         Constify.
12530         * gnu-nat.c (gnu_pid_to_str): Constify.
12531         * go32-nat.c (go32_pid_to_str): Constify.
12532         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12533         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12534         * inferior.c (inferior_pid_to_str): Constify.
12535         * linux-nat.c (linux_nat_pid_to_str): Constify.
12536         * linux-tdep.c (linux_core_pid_to_str): Constify.
12537         * linux-thread-db.c (thread_db_pid_to_str)
12538         (thread_db_extra_thread_info): Constify.
12539         * nto-tdep.c (nto_extra_thread_info): Constify.
12540         * nto-tdep.h (nto_extra_thread_info): Constify.
12541         * obsd-nat.c (obsd_pid_to_str): Constify.
12542         * procfs.c (procfs_pid_to_str): Constify.
12543         * ravenscar-thread.c (ravenscar_extra_thread_info)
12544         (ravenscar_pid_to_str): Constify.
12545         * remote-sim.c (gdbsim_pid_to_str): Constify.
12546         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12547         Constify.
12548         * sol-thread.c (solaris_pid_to_str): Constify.
12549         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12550         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12551         * target.c (default_pid_to_str, target_pid_to_str)
12552         (normal_pid_to_str, default_pid_to_str): Constify.
12553         * target.h (target_ops::to_pid_to_str)
12554         (target_ops::to_extra_thread_info): Constify.
12555         (target_pid_to_str, normal_pid_to_str): Constify.
12556         * windows-nat.c (windows_pid_to_str): Constify.
12557         * gdbarch.sh (core_pid_to_str): Constify.
12558         * target-delegates.c: Regenerate.
12559         * gdbarch.h, gdbarch.c: Regenerate.
12560
12561 2017-04-05  Pedro Alves  <palves@redhat.com>
12562
12563         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12564         the memory of the temporary warning_pre_print override.
12565         * utils.c (warning_pre_print): Constify.
12566         * utils.h (warning_pre_print): Constify.
12567
12568 2017-04-05  Pedro Alves  <palves@redhat.com>
12569
12570         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12571         (shell_command): New function.
12572         (make_command): Use std::string.
12573         (init_cli_cmds): Register shell_command instead of shell_escape.
12574
12575 2017-04-05  Pedro Alves  <palves@redhat.com>
12576
12577         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12578         * tracepoint.c (default_collect): Don't initialize.
12579
12580 2017-04-05  Pedro Alves  <palves@redhat.com>
12581
12582         * macroexp.c (macro_buffer::shared): Now a bool.
12583         (init_buffer): Update.
12584         (init_shared_buffer): Constify 'addr' parameter.
12585         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12586         casts.
12587
12588 2017-04-05  Pedro Alves  <palves@redhat.com>
12589
12590         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12591         * disasm.c (set_disassembler_options): Constify local.
12592         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12593
12594 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12595
12596         PR gdb/21352
12597         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12598         option.
12599
12600 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12601
12602         * frame.c (frame_unwind_register_unsigned): Call
12603         frame_unwind_register_value.
12604
12605 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12606
12607         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12608         Use gdb_test_multiple, and don't match anchor.
12609
12610 2017-04-05  Pedro Alves  <palves@redhat.com>
12611
12612         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12613         (Write After Approval): Remove Simon Marchi.
12614
12615 2017-04-05  Pedro Alves  <palves@redhat.com>
12616
12617         * common/gdb_optional.h (optional::optional): Make constexpr and
12618         initialize m_dummy.
12619
12620 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12621
12622         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12623         (amd64fbsd_jmp_buf_reg_offset): Remove.
12624         (amd64fbsd_supply_uthread): Remove function.
12625         (amd64fbsd_collect_uthread): Remove function.
12626         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12627         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12628         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12629         (fbsd-nat.c): Update comment.
12630         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12631         (i386fbsd_jmp_buf_reg_offset): Remove.
12632         (i386fbsd_supply_uthread): Remove function.
12633         (i386fbsd_collect_uthread): Remove function.
12634         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12635
12636 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12637
12638         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12639         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12640         * NEWS: Mention that support for FreeBSD/alpha was removed.
12641         * alpha-fbsd-tdep.c: Delete file.
12642         * config/alpha/fbsd.mh: Delete file.
12643         * configure.host: Delete alpha*-*-freebsd* and
12644         alpha*-*-kfreebsd*-gnu.
12645         * configure.tgt: Delete alpha*-*-freebsd* and
12646         alpha*-*-kfreebsd*-gnu.
12647
12648 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12649
12650         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12651         amd64bsd_store_inferior_registers): Use ptid from regcache.
12652
12653 2017-04-04  Pedro Alves  <palves@redhat.com>
12654
12655         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12656         data fields, make them private and add "m_" prefixes.
12657         (lnp_state_machine::lnp_state_machine): New ctor.
12658         (record_line, check_line_address, handle_set_discriminator)
12659         (handle_set_address, handle_advance_pc, handle_special_opcode)
12660         (handle_advance_line, handle_set_file, handle_negate_stmt)
12661         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12662         (end_sequence, advance_line): New methods.
12663         (m_gdbarch, m_record_lines_p): New fields.
12664         (lnp_reader_state): Delete.
12665         (dwarf_record_line): Rename to ...
12666         (lnp_state_machine::record_line): ... adjust.
12667         (init_lnp_state_machine): Delete.
12668         (lnp_state_machine::lnp_state_machine): New.
12669         (check_line_address): Rename to ...
12670         (lnp_state_machine::check_line_address): This.
12671         (dwarf_decode_lines_1): Remove reference to "reader_state".
12672         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12673         State machine internal state manipulation moved to
12674         lnp_state_machine methods.
12675
12676 2017-04-04  Pedro Alves  <palves@redhat.com>
12677
12678         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12679         unittests/offset-type-selftests.c.
12680         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12681         * common/offset-type.h: New file.
12682         * common/preprocessor.h: New file.
12683         * common/traits.h: New file.
12684         * common/valid-expr.h: New file.
12685         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12686         sect_offset and cu_offset strong typedefs throughout.
12687         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12688         typedefs throughout.
12689         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12690         sect_offset and cu_offset strong typedefs throughout.
12691         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12692         typedefs throughout.
12693         * gdbtypes.h: Include "common/offset-type.h".
12694         (cu_offset): Now an offset type (strong typedef) instead of a
12695         struct.
12696         (sect_offset): Likewise.
12697         (union call_site_parameter_u): Rename "param_offset" field to
12698         "param_cu_off".
12699         * unittests/offset-type-selftests.c: New file.
12700
12701 2017-04-04  Pedro Alves  <palves@redhat.com>
12702
12703         * common/underlying.h: New file.
12704         * dwarf2read.c: Include "common/gdb_optional.h" and
12705         "common/underlying.h".
12706         (dir_index, file_name_index): New types.
12707         (file_entry): Use them.
12708         (file_entry::include): Use to_underlying.
12709         (line_header::add_file_name): Use dir_index.
12710         (read_formatted_entries): Use gdb::optional.  Read form before
12711         writting to file_entry.
12712         (dwarf_decode_line_header): Use dir_index.
12713         (lnp_state_machine::current_file): Use to_underlying.
12714         (lnp_state_machine::file): Change type to file_name_index.
12715         (dwarf_record_line): Use to_underlying.
12716         (init_lnp_state_machine): Use file_name_index.
12717         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12718
12719 2017-04-04  Pedro Alves  <palves@redhat.com>
12720
12721         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12722         operator bool, has_value and get methods.
12723
12724 2017-04-04  Pedro Alves  <palves@redhat.com>
12725
12726         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12727         fields.
12728         (line_header): Initialize all data fields.  Change type of
12729         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12730         Change type of include_dirs to std::vector<const char *>.  Remove
12731         num_include_dirs, include_dirs_size.  Change type of file_names to
12732         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12733         (line_header::line_header): New.
12734         (line_header::add_include_dir, line_header::add_file_name): New
12735         methods.
12736         (line_header::include_dir_at): Remove NULL check.
12737         (line_header::file_name_at): Add const overload.
12738         (line_header_up): New unique_ptr typedef.
12739         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12740         std::vector.  Remove free_line_header call.
12741         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12742         free_line_header call.
12743         (free_cu_line_header): Delete.
12744         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12745         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12746         Adjust to use std::vector.
12747         (free_line_header): Delete.
12748         (free_line_header_voidp): Use delete.
12749         (add_include_dir): Replace with ...
12750         (line_header::add_include_dir): ... this method.  Use std::vector.
12751         (add_file_name): Replace with ...
12752         (line_header::add_file_name): ... this method.  Use std::vector.
12753         (add_include_dir_stub): Delete.
12754         (read_formatted_entries): Remove memset.
12755         (dwarf_decode_line_header): Return a line_header_up instead of a
12756         raw pointer.  Remove cleanup handling.  Pass lambdas to
12757         read_formatted_entries.  Adjust to use line_header methods.
12758         (dwarf_decode_lines_1): Adjust to use line_header methods.
12759         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12760         use std::vector.
12761
12762 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12763
12764         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12765         instead of struct ptid.
12766
12767 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12768
12769         * frame.c (get_frame_register_bytes): Unwind using value.
12770         (put_frame_register_bytes): Likewise.
12771
12772 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12773
12774         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12775         aggregate-like.
12776
12777 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12778
12779         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12780
12781 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12782
12783         * gdbthread.h (struct thread_info): Declare constructor and
12784         destructor.  Add some in-class member initializers.
12785         * thread.c (free_thread): Remove.
12786         (init_thread_list): Call delete instead of free_thread.
12787         (new_thread): Call thread_info constructor.
12788         (thread_info::thread_info): New function.
12789         (thread_info::~thread_info): New function.
12790         (delete_thread_1): Call delete instead of free_thread.
12791         (make_cleanup_restore_current_thread): Move tp and frame to
12792         inner block.
12793
12794 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12795
12796         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12797         (arc_skip_prologue): Likewise.
12798         (arc_make_frame_cache): Likewise.
12799         (arc_pv_get_operand): New function.
12800         (arc_is_in_prologue): Likewise.
12801         (arc_analyze_prologue): Likewise.
12802         (arc_print_frame_cache): Likewise.
12803         (MAX_PROLOGUE_LENGTH): New constant.
12804
12805 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12806
12807         * configure.tgt: Add arc-insn.o.
12808         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12809         (dump_arc_instruction_command): New function.
12810         (arc_fprintf_disasm): Likewise.
12811         (arc_disassemble_info): Likewise.
12812         (arc_insn_get_operand_value): Likewise.
12813         (arc_insn_get_operand_value_signed): Likewise.
12814         (arc_insn_get_memory_base_reg): Likewise.
12815         (arc_insn_get_memory_offset): Likewise.
12816         (arc_insn_get_branch_target): Likewise.
12817         (arc_insn_dump): Likewise.
12818         (arc_insn_get_linear_next_pc): Likewise.
12819         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12820         (arc_disassemble_info): Likewise.
12821         (arc_insn_get_branch_target): Likewise.
12822         (arc_insn_get_linear_next_pc): Likewise.
12823         * NEWS: Mention new "maint print arc arc-instruction".
12824
12825 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12826
12827         * arc-tdep (maintenance_print_arc_list): New variable.
12828         (maintenance_print_arc_command): New function.
12829
12830 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12831
12832         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12833         Add "limm" and "reserved".
12834         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12835         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12836         * arc-tdep.h (arc_regnum): Likewise.
12837
12838 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12839
12840         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12841         for THREADPTR register.
12842         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12843         register.
12844         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12845         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12846         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12847
12848 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12849
12850         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12851         registers above gdbarch_num_regs (gdbarch) as privileged in
12852         call0 ABI.
12853
12854 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12855
12856         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12857         for a single specified register or for all registers in
12858         a0_base..a0_base + C0_NREGS range.
12859         (supply_gregset_reg): Call regcache_raw_supply for a single
12860         specified register or for all registers in a0_base..a0_base +
12861         C0_NREGS range.
12862
12863 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12864
12865         * arch/xtensa.h (C0_NREGS): Add definition.
12866         * xtensa-tdep.c (C0_NREGS): Remove definition.
12867
12868 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12869
12870         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12871         Drop xtensa_default_isa initialization.
12872         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12873
12874 2017-03-27  Pedro Alves  <palves@redhat.com>
12875
12876         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12877         (file_entry::include_dir): New method.
12878         (line_header::include_dir_at, line_header::file_name_at): New
12879         methods.
12880         (setup_type_unit_groups, setup_type_unit_groups)
12881         (psymtab_include_file_name): Simplify using the new methods.
12882         (lnp_state_machine) <the_line_header>: New field.
12883         <file>: Add comment.
12884         (lnp_state_machine::current_file): New method.
12885         (dwarf_record_line): Simplify using the new methods.
12886         (init_lnp_state_machine): Initialize the "the_line_header" field.
12887         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12888         Simplify using the new methods.
12889
12890 2017-03-27  Pedro Alves  <palves@redhat.com>
12891
12892         * cp-name-parser.y (make_empty): Delete.
12893         (demangler_special, nested_name, ptr_operator, array_indicator)
12894         (direct_declarator, declarator_1): Use fill_comp instead of
12895         make_empty.
12896
12897 2017-03-27  Pedro Alves  <palves@redhat.com>
12898
12899         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12900         to ATTRIBUTE_PRINTF.
12901         * solib-target.c (library_list_start_list): Print "string" not
12902         "version".
12903         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12904         gdb_xml_error call.
12905
12906 2017-03-27  Pedro Alves  <palves@redhat.com>
12907
12908         * dwarf2read.c (struct file_and_directory): New.
12909         (dwarf2_get_dwz_file): Adjust to use std::string.
12910         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12911         (find_file_and_directory): Adjust to return a file_and_directory
12912         object.
12913         (read_file_scope): Adjust to use file_and_directory.  Remove
12914         make_cleanup/do_cleanups calls.
12915         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12916         make_cleanup/do_cleanups calls.
12917         * python/python.c (do_start_initialization): Adjust to ldirname
12918         returning a std::string.
12919         * utils.c (ldirname): Now returns a std::string.
12920         * utils.h (ldirname): Change return type to std::string.
12921         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12922         returning a std::string.
12923         * xml-tdesc.c (file_read_description_xml): Likewise.
12924
12925 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12926
12927         * regcache.c (regcache_debug_print_register): New function.
12928         * regcache.h (regcache_debug_print_register): New declaration.
12929         * target.c (debug_print_register): Remove.
12930         (target_fetch_registers): Call regcache_debug_print_register.
12931         (target_store_registers): Likewise.
12932
12933 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12934
12935         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12936         reference beyond the 'lh->include_dirs' array before accessing to
12937         it.
12938         (psymtab_include_file_name): Likewise.
12939         (dwarf_decode_lines_1): Likewise.
12940         (dwarf_decode_lines): Likewise.
12941         (file_file_name): Likewise.
12942
12943 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12944
12945         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12946         inferior_ptid.
12947         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12948         ps_lsetfpregs): Likewise.
12949         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12950         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12951         ps_lsetfpregs): Likewise.
12952         * target.c (target_fetch_registers, target_store_registers):
12953         Remove asserts.
12954
12955 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12956
12957         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12958
12959 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12960
12961         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12962         (_initialize_aarch64_tdep): Register it.
12963         (aarch64_record_load_store): Handle PRFM instruction.
12964         (aarch64_process_record_test): New function.
12965
12966 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12967
12968         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12969         indentation.
12970
12971 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12972
12973         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12974
12975 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12976
12977         python/python.c (do_start_initialization): Fix memory leak.
12978
12979 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12980
12981         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12982         using get_ptrace_pid.
12983         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12984         inferior_ptid.
12985         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12986         inferior_ptid instead of pid.
12987
12988 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12989
12990         * aarch64-tdep.c: Wrap locally used classes in anonymous
12991         namespace.
12992         * arm-tdep.c: Likewise.
12993         * linespec.c: Likewise.
12994         * ui-out.c: Likewise.
12995
12996 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12997
12998         PR gdb/19637
12999         * python/lib/gdb/printer/bound_registers.py: Import sys.
13000
13001 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13002
13003         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13004         windows_thread_info parameter and use it instead of
13005         current_thread.
13006         (windows_fetch_inferior_registers): Don't set current_thread,
13007         pass the thread to do_windows_fetch_inferior_registers.  Use
13008         ptid from regcache instead of inferior_ptid.
13009         (do_windows_store_inferior_registers): Add windows_thread_info
13010         parameter and use it instead of current_thread.
13011         (windows_store_inferior_registers): Don't set current_thread,
13012         pass the thread to do_windows_store_inferior_registers.  Use
13013         ptid from regcache instead of inferior_ptid.
13014
13015 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13016
13017         * ser-mingw.c (ser_windows_raw): Remove reference to
13018         struct serial::current_timeout.
13019
13020 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13021
13022         PR tdep/20928
13023         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13024         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13025         (sparc64_fsr_type): Fix %fsr decoding.
13026
13027 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13028
13029         * python/py-record-btrace.c (btpy_insn_data): Change return type
13030         for Python 2.
13031
13032 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13033
13034         * spu-linux-nat.c (spu_fetch_inferior_registers,
13035         spu_store_inferior_registers): Use ptid from regcache, set and
13036         restore inferior_ptid.
13037         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13038         Likewise.
13039
13040 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13041
13042         * i386-linux-nat.c (fetch_register, store_register,
13043         i386_linux_fetch_inferior_registers,
13044         i386_linux_store_inferior_registers): Use ptid from regcache.
13045         * ia64-linux-nat.c (ia64_linux_fetch_register,
13046         ia64_linux_store_register): Likewise.
13047         * inf-ptrace.c (inf_ptrace_fetch_register,
13048         inf_ptrace_store_register): Likewise.
13049         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13050         m32r_linux_store_inferior_registers): Likewise.
13051         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13052         m68kbsd_store_inferior_registers): Likewise.
13053         * m68k-linux-nat.c (fetch_register, store_register,
13054         m68k_linux_fetch_inferior_registers,
13055         m68k_linux_store_inferior_registers): Likewise.
13056         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13057         m88kbsd_store_inferior_registers): Likewise.
13058         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13059         mips_fbsd_store_inferior_registers): Likewise.
13060         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13061         mips64_linux_regsets_store_registers): Likewise.
13062         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13063         mipsnbsd_store_inferior_registers): Likewise.
13064         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13065         mips64obsd_store_inferior_registers): Likewise.
13066         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13067         Likewise.
13068         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13069         ppcfbsd_store_inferior_registers): Likewise.
13070         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13071         ppc_linux_store_inferior_registers): Likewise.
13072         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13073         ppcnbsd_store_inferior_registers): Likewise.
13074         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13075         ppcobsd_store_registers): Likewise.
13076         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13077         Likewise.
13078         * ravenscar-thread.c (ravenscar_fetch_registers,
13079         ravenscar_store_registers, ravenscar_prepare_to_store):
13080         Likewise.
13081         * record-btrace.c (record_btrace_fetch_registers,
13082         record_btrace_store_registers, record_btrace_prepare_to_store):
13083         Likewise.
13084         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13085         Lookup inferior using ptid from regcache, instead of
13086         current_inferior.
13087         * remote.c (remote_fetch_registers, remote_store_registers): Use
13088         ptid from regcache.
13089         * rs6000-nat.c (fetch_register, store_register): Likewise.
13090         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13091         s390_linux_store_inferior_registers): Likewise.
13092         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13093         shnbsd_store_inferior_registers): Likewise.
13094         * sol-thread.c (sol_thread_fetch_registers,
13095         sol_thread_store_registers): Likewise.
13096         * sparc-nat.c (sparc_fetch_inferior_registers,
13097         sparc_store_inferior_registers): Likewise.
13098         * tilegx-linux-nat.c (fetch_inferior_registers,
13099         store_inferior_registers): Likewise.
13100         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13101         vaxbsd_store_inferior_registers): Likewise.
13102         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13103         store_xtregs): Likewise.
13104
13105 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13106
13107         PR gdb/14441
13108         * NEWS: Mention support for rvalue references in GDB and python.
13109         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13110         supports both lvalue and rvalue references.
13111
13112 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13113
13114         PR gdb/14441
13115         * gdbtypes.c (rank_one_type): Implement overloading
13116         resolution rules regarding rvalue references.
13117
13118 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13119
13120         PR gdb/14441
13121         * aarch64-tdep.c (aarch64_type_align)
13122         (aarch64_extract_return_value, aarch64_store_return_value): Change
13123         lvalue reference type checks to general reference type checks.
13124         * amd64-tdep.c (amd64_classify): Likewise.
13125         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13126         Likewise.
13127         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13128         (arm_store_return_value): Likewise.
13129         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13130         * c-typeprint.c (c_print_type): Likewise.
13131         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13132         (cplus_number_of_children, cplus_describe_child): Likewise.
13133         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13134         * completer.c (expression_completer): Likewise.
13135         * cp-support.c (make_symbol_overload_list_adl_namespace):
13136         Likewise.
13137         * darwin-nat-info.c (info_mach_region_command): Likewise.
13138         * dwarf2loc.c (entry_data_value_coerce_ref)
13139         (value_of_dwarf_reg_entry): Likewise.
13140         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13141         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13142         Likewise.
13143         * findvar.c (extract_typed_address, store_typed_address):
13144         Likewise.
13145         * gdbtypes.c (rank_one_type): Likewise.
13146         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13147         * infcall.c (value_arg_coerce): Likewise.
13148         * language.c (pointer_type): Likewise.
13149         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13150         Likewise.
13151         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13152         * mn10300-tdep.c (mn10300_type_align): Likewise.
13153         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13154         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13155         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13156         Likewise.
13157         * printcmd.c (print_formatted, x_command): Likewise.
13158         * python/py-type.c (typy_get_composite, typy_template_argument):
13159         Likewise.
13160         * python/py-value.c (valpy_referenced_value)
13161         (valpy_get_dynamic_type, value_has_field): Likewise.
13162         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13163         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13164         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13165         * spu-tdep.c (spu_scalar_value_p): Likewise.
13166         * symtab.c (lookup_symbol_aux): Likewise.
13167         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13168         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13169         Likewise.
13170         * valops.c (value_cast_pointers, value_cast)
13171         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13172         (value_struct_elt, value_struct_elt_bitpos)
13173         (value_find_oload_method_list, find_overload_match)
13174         (value_rtti_indirect_type): Likewise.
13175         * valprint.c (val_print_scalar_type_p, generic_val_print):
13176         Likewise.
13177         * value.c (value_actual_type, value_as_address, unpack_long)
13178         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13179         (coerce_ref): Likewise.
13180         * varobj.c (varobj_get_value_type): Likewise.
13181
13182 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13183
13184         PR gdb/14441
13185         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13186         table of constants.
13187         * python/lib/gdb/command/explore.py: Support exploring values
13188         of rvalue reference types.
13189         * python/lib/gdb/types.py: Implement get_basic_type() for
13190         rvalue reference types.
13191         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13192         constant.
13193         * python/py-value.c (valpy_getitem): Add an rvalue reference
13194         check.
13195         (valpy_reference_value): Add new parameter "refcode".
13196         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13197         New wrappers for valpy_reference_value().
13198         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13199         (gdbpy_invoke_xmethod): Likewise.
13200
13201 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13202
13203         PR gdb/14441
13204         * dwarf2read.c (process_die, read_type_die_1): Handle the
13205         DW_TAG_rvalue_reference_type DIE.
13206         (read_tag_reference_type): Add new parameter "refcode".
13207
13208 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13209
13210         PR gdb/14441
13211         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13212         (c_type_print_modifier, c_type_print_varspec_suffix)
13213         (c_type_print_base): Support printing rvalue reference types.
13214         * c-valprint.c (c_val_print, c_value_print): Support printing
13215         rvalue reference values.
13216
13217 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13218
13219         PR gdb/14441
13220         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13221         typename.
13222         * cp-support.c (replace_typedefs): Handle
13223         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13224         * python/py-type.c (typy_lookup_type): Likewise.
13225
13226 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13227
13228         PR gdb/14441
13229         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13230         * parse.c (insert_type): Change assert statement.
13231         (follow_types): Handle rvalue reference types.
13232         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13233         constant.
13234
13235 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13236
13237         PR gdb/14441
13238         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13239         value_ref() interface.
13240         * c-valprint.c (c_value_print): Likewise.
13241         * infcall.c (value_arg_coerce): Likewise.
13242         * python/py-value.c (valpy_reference_value): Likewise.
13243         * valops.c (value_cast, value_reinterpret_cast)
13244         (value_dynamic_cast, typecmp): Likewise.
13245         (value_ref): Parameterize by kind of return value reference type.
13246         * value.h (value_ref): Add new parameter "refcode".
13247
13248 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13249
13250         PR gdb/14441
13251         * dwarf2read.c (read_tag_reference_type): Use
13252         lookup_lvalue_reference_type() instead of lookup_reference_type().
13253         * eval.c (evaluate_subexp_standard): Likewise.
13254         * f-exp.y: Likewise.
13255         * gdbtypes.c (make_reference_type, lookup_reference_type):
13256         Generalize with rvalue reference types.
13257         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13258         convenience wrappers for lookup_reference_type().
13259         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13260         reference kind parameter.
13261         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13262         wrappers for lookup_reference_type().
13263         * guile/scm-type.c (gdbscm_type_reference): Use
13264         lookup_lvalue_reference_type() instead of lookup_reference_type().
13265         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13266         * parse.c (follow_types): Likewise.
13267         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13268         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13269         Likewise.
13270         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13271         (gdbpy_invoke_xmethod): Likewise.
13272         * stabsread.c: Provide extra argument to make_reference_type()
13273         call.
13274         * valops.c (value_ref, value_rtti_indirect_type): Use
13275         lookup_lvalue_reference_type() instead of lookup_reference_type().
13276
13277 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13278
13279         PR gdb/14441
13280         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13281         (TYPE_IS_REFERENCE): New macro.
13282         (struct type): Add rvalue_reference_type field.
13283         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13284
13285 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13286
13287         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13288         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13289         New function definition.
13290         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13291         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13292         New function declaration.
13293         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13294         * mi/mi-interp.h: New file.
13295         * solib.c (info_sharedlibrary_command): Replace for loop with
13296         ALL_SO_LIBS macro
13297         * solib.h (update_solib_list): New function declaration.
13298         (so_list_head): Move macro.
13299         * solist.h (ALL_SO_LIBS): New macro.
13300
13301 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13302
13303         * infcmd.c (post_create_inferior): Remove unused argument in
13304         call to solib_add.
13305         * remote.c (remote_start_remote): Likewise.
13306         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13307         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13308         (enable_break): Likewise.
13309         * solib.c (update_solib_list): Remove unused target argument
13310         and its documentation.
13311         (solib_add): Remove unused target argument.  Remove unused
13312         argument in call to update_solib_list.
13313         (info_sharedlibrary_command): Remove unused argument in call
13314         to update_solib_list.
13315         (sharedlibrary_command): Remove unused argument in call to
13316         solib_add.
13317         (handle_solib_event): Likewise.
13318         (reload_shared_libraries): Likewise.
13319         * solib.h (solib_add): Remove unused target argument.
13320
13321 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13322
13323         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13324         (s390_displaced_step_fixup): Cover relative branches with the
13325         default fixup handling.  This fixes lack of support for some
13326         relative branch instructions.
13327
13328 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13329
13330         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13331         ptid from regcache.
13332
13333 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13334
13335         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13336         i386_darwin_store_inferior_registers): Use ptid from regcache.
13337
13338 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13339
13340         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13341         i386bsd_store_inferior_registers): Use ptid from regcache.
13342
13343 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13344
13345         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13346         hppaobsd_store_registers): Use ptid from regcache.
13347
13348 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13349
13350         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13351         hppanbsd_store_registers): Use ptid from regcache.
13352
13353 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13354
13355         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13356         from regcache.  Use get_ptrace_pid.
13357
13358 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13359
13360         * corelow.c (get_core_register_section): Use ptid from regcache,
13361         update doc.
13362
13363 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13364
13365         * bsd-uthread.c (bsd_uthread_fetch_registers,
13366         bsd_uthread_store_registers): Use ptid from regcache, set and
13367         restore inferior_ptid.
13368
13369 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13370
13371         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13372         fetch_fp_regs, store_register, store_regs, store_fp_register,
13373         store_fp_regs): Use ptid from regcache.
13374
13375 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13376
13377         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13378         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13379         store_vfp_regs): Use ptid from regcache.
13380
13381 2017-03-17  Pedro Alves  <palves@redhat.com>
13382
13383         PR remote/21188
13384         * ser-base.c (ser_base_wait_for): Add comment.
13385         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13386         version.
13387         * ser-unix.c (hardwire_raw): Remove reference to
13388         scb->current_timeout.
13389         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13390         (hardwire_ops): Install ser_base_readchar instead of
13391         hardwire_readchar.
13392         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13393         Remove fields.
13394
13395 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13396
13397         PR gdb/19637
13398         * python/lib/gdb/printer/bound_registers.py: Add support for
13399         Python 3.
13400
13401 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13402
13403         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13404         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13405         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13406         byte_offset to subobj_byte_offset.  Fix the handling of
13407         DWARF_VALUE_STACK on big-endian targets when coming via an
13408         implicit pointer.
13409         (dwarf2_evaluate_loc_desc): Adjust call to
13410         dwarf2_evaluate_loc_desc_full.
13411         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13412         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13413
13414 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13415
13416         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13417         and REVSH instructions.
13418
13419 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13420
13421         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13422         (arm_record_test): Declare.
13423         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13424         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13425         align with the manual.
13426         (thumb_record_misc): Adjust the code order to align with the
13427         manual.
13428         (thumb2_record_decode_insn_handler): Fix instruction matching.
13429         (instruction_reader_thumb): New class.
13430         (arm_record_test): New function.
13431
13432 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13433
13434         * arm-tdep.c (abstract_memory_reader): New class.
13435         (instruction_reader): New class.
13436         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13437         (decode_insn): Likewise.
13438
13439 2017-03-16  Doug Evans  <dje@google.com>
13440
13441         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13442         member.  Change type of TYPE member to SCM.  All uses updated.
13443         (lsscm_make_lazy_string_smob): Add assert.
13444         (lsscm_make_lazy_string): Flag bad length values.
13445         (lsscm_elt_type): New function.
13446         (gdbscm_lazy_string_to_value): Rewrite to use
13447         lsscm_safe_lazy_string_to_value.
13448         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13449         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13450         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13451         in incoming type.
13452         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13453         * guile/scm-type.c (tyscm_scm_to_type): New function.
13454
13455 2017-03-15  Doug Evans  <dje@google.com>
13456
13457         PR python/17728, python/18439, python/18779
13458         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13459         member.  Change type of TYPE member to PyObject *.  All uses updated.
13460         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13461         (gdbpy_create_lazy_string_object): Flag bad length values.
13462         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13463         Handle typedefs in incoming type.
13464         (stpy_lazy_string_elt_type): New function.
13465         (gdbpy_extract_lazy_string): Call it.
13466         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13467         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13468         typedefs in incoming type.
13469
13470 2017-03-16  Doug Evans  <dje@google.com>
13471
13472         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13473         * guile/scm-type.c (tyscm_scm_to_type): New function.
13474
13475 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13476
13477         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13478         "ULONGEST" for "skip".
13479
13480 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13481
13482         PR gdb/21220
13483         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13484         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13485         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13486         over ptrace peek/poke until end of buffer or error.
13487
13488 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13489
13490         * parse.c (length_of_subexp): Make static.
13491         * parser-defs.h (length_of_subexp): Remove.
13492
13493 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13494
13495         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13496         as well.
13497
13498 2017-03-14  Pedro Alves  <palves@redhat.com>
13499
13500         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13501         (main): Use std::unique_ptr.  Remove calls to
13502         cp_demangled_name_parse_free.
13503
13504 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13505
13506         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13507         alphabsd_store_inferior_registers): Use regcache->ptid instead
13508         of inferior_ptid.
13509
13510 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13511
13512         * aix-thread.c (aix_thread_fetch_registers,
13513         aix_thread_store_registers): Use regcache->ptid instead of
13514         inferior_ptid.
13515
13516 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13517
13518         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13519         store_gregs_to_thread, fetch_fpregs_from_thread,
13520         store_fpregs_to_thread): Use regcache->ptid instead of
13521         inferior_ptid.
13522
13523 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13524
13525         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13526         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13527         instead of inferior_ptid.
13528
13529 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13530
13531         * target.c (target_fetch_registers, target_store_registers): Add
13532         assert.
13533
13534 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13535
13536         * regcache.h (regcache_get_ptid): New function.
13537         * regcache.c (regcache_get_ptid): New function.
13538
13539 2017-03-13  Mark Wielaard  <mark@klomp.org>
13540
13541         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13542
13543 2017-03-10  Keith Seitz  <keiths@redhat.com>
13544
13545         PR c++/8218
13546         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13547
13548 2017-03-08  Pedro Alves  <palves@redhat.com>
13549
13550         PR gdb/18360
13551         * infrun.c (start_step_over, do_target_resume, resume)
13552         (restart_threads): Assert we're not resuming a thread that is
13553         meant to be stopped.
13554         (infrun_thread_stop_requested_callback): Delete.
13555         (infrun_thread_stop_requested): If the thread is internally
13556         stopped, queue a pending stop event and clear the thread's
13557         inline-frame state.
13558         (handle_stop_requested): New function.
13559         (handle_syscall_event, handle_inferior_event_1): Use
13560         handle_stop_requested.
13561         (handle_stop_requested): New function.
13562         (handle_signal_stop): Set the thread's stop_signal here instead of
13563         at caller.
13564         (finish_step_over): Clear step over info unconditionally.
13565         (handle_signal_stop): If the user had interrupted the event
13566         thread, consider the stop a random signal.
13567         (handle_signal_stop) <signal arrived while stepping over
13568         breakpoint>: Don't restart threads here.
13569         (stop_waiting): Don't clear step-over info here.
13570
13571 2017-03-08  Pedro Alves  <palves@redhat.com>
13572
13573         PR 21206
13574         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13575         goes to argument 2, not 1.
13576
13577 2017-03-08  Pedro Alves  <palves@redhat.com>
13578
13579         PR cli/21218
13580         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13581         display_gdb_prompt.
13582         (command_line_input): Add comment.
13583
13584 2017-03-08  Pedro Alves  <palves@redhat.com>
13585
13586         PR tui/21216
13587         * tui/tui-file.c (tui_file::write): New.
13588         * tui/tui-file.h (tui_file): Override "write".
13589         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13590         factored out from ...
13591         (tui_puts): ... here.
13592         (tui_putc): Use them.
13593         (tui_write): New function.
13594         * tui/tui-io.h (tui_write): Declare.
13595
13596 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13597
13598         * Makefile.in (SFILES): Replace "environ.c" with
13599         "common/environ.c".
13600         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13601         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13602         to...
13603         * common/environ.c: ... here.
13604         * environ.h: Moved to...
13605         * common/environ.h: ... here.
13606
13607 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13608
13609         * gdbarch.sh (pstring_ptr): New static function.
13610         (gdbarch_disassembler_options): Use it.
13611         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13612         not valid_disassembler_option->name.
13613         * gdbarch.c: Regenerate.
13614
13615 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13616
13617         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13618
13619 2017-03-07  Pedro Alves  <palves@redhat.com>
13620
13621         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13622
13623 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13624
13625         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13626         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13627         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13628         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13629
13630 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13631
13632         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13633
13634 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13635
13636         * remote.c (remote_add_target_side_commands): Use range-based
13637         for loop.
13638
13639 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13640
13641         PR gdb/21165
13642         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13643         value is lazy.
13644         * valprint.c (common_val_print): Likewise.
13645
13646 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13647
13648         * NEWS: Mention new set/show disassembler-options commands.
13649         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13650         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13651         (prospective_options): New static variable.
13652         (gdb_disassembler::gdb_disassembler): Initialize
13653         m_di.disassembler_options.
13654         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13655         (get_disassembler_options): New function.
13656         (set_disassembler_options): Likewise.
13657         (set_disassembler_options_sfunc): Likewise.
13658         (show_disassembler_options_sfunc): Likewise.
13659         (disassembler_options_completer): Likewise.
13660         (_initialize_disasm): Likewise.
13661         * disasm.h (get_disassembler_options): New prototype.
13662         (set_disassembler_options): Likewise.
13663         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13664         (gdbarch_verify_disassembler_options): Likewise.
13665         * gdbarch.c: Regenerate.
13666         * gdbarch.h: Likewise.
13667         * arm-tdep.c (num_disassembly_options): Delete.
13668         (set_disassembly_style): Likewise.
13669         (arm_disassembler_options): New static variable.
13670         (set_disassembly_style_sfunc): Convert short style name into long
13671         option name.  Call set_disassembler_options.
13672         (show_disassembly_style_sfunc): New function.
13673         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13674         set_gdbarch_verify_disassembler_options.
13675         (_initialize_arm_tdep): Delete regnames variable and update callers.
13676         (arm_disassembler_options): Initialize.
13677         (disasm_options): New variable.
13678         (num_disassembly_options): Rename from this...
13679         (num_disassembly_styles): ...to this.  Compute by scanning through
13680         disasm_options.
13681         (valid_disassembly_styles): Initialize using disasm_options.
13682         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13683         set_arm_regname_option.
13684         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13685         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13686         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13687         set_gdbarch_verify_disassembler_options.
13688         * s390-tdep.c (s390_disassembler_options): New static variable.
13689         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13690         set_gdbarch_verify_disassembler_options.
13691
13692 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13693
13694         * remote.c (remote_add_target_side_condition): Remove "struct"
13695         keyword from range-based for loop.
13696
13697 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13698
13699         * remote.c (remote_add_target_side_condition): Use range-based
13700         for loop.  Update comment.
13701
13702 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13703
13704         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13705
13706 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13707
13708         * regcache.c (regcache_raw_update): New function.
13709         (regcache_raw_read): Move code to regcache_raw_update.
13710         * regcache.h (regcache_raw_update): New declaration.
13711         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13712
13713 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13714
13715         * dwarf2read.c (create_debug_type_hash_table): Initialize
13716         header.signature and header.type_offset_in_tu.
13717
13718 2017-02-24  Pedro Alves  <palves@redhat.com>
13719
13720         * symtab.c (make_file_symbol_completion_list_1): Use
13721         add_symtab_completions.
13722
13723 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13724
13725         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13726
13727 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13728
13729         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13730         I386_MAX_REGISTER_SIZE.
13731         (i386_pseudo_register_write): Likewise.
13732         (i386_process_record): Likewise.
13733         * i387-tdep.c (i387_supply_xsave): Likewise.
13734         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13735         (store_register): Likewise.
13736
13737 2017-02-23  Pedro Alves  <palves@redhat.com>
13738
13739         * ada-lang.c: Include "common/function-view.h".
13740         (ada_iterate_over_symbols): Adjust to use function_view as
13741         callback type.
13742         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13743         (ada_make_symbol_completion_list): Use a lambda.
13744         (ada_exc_search_name_matches): Delete.
13745         (name_matches_regex): New.
13746         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13747         * compile/compile-c-support.c: Include "common/function-view.h".
13748         (print_one_macro): Change prototype to accept a ui_file pointer.
13749         (write_macro_definitions): Use a lambda.
13750         * dwarf2read.c: Include "common/function-view.h".
13751         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13752         (dw2_expand_symtabs_matching): Adjust to use function_view as
13753         callback type.
13754         * language.h: Include "common/function-view.h".
13755         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13756         function_view as callback type.
13757         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13758         * linespec.c: Include "common/function-view.h".
13759         (collect_info::add_symbol): New method.
13760         (struct symbol_and_data_callback, iterate_inline_only, struct
13761         symbol_matcher_data, iterate_name_matcher): Delete.
13762         (iterate_over_all_matching_symtabs): Adjust to use function_view
13763         as callback type and lambdas.
13764         (iterate_over_file_blocks): Adjust to use function_view as
13765         callback type.
13766         (decode_compound_collector): Now a class with private fields.
13767         (decode_compound_collector::release_symbols): New method.
13768         (collect_one_symbol): Rename to...
13769         (decode_compound_collector::operator()): ... this and adjust.
13770         (lookup_prefix_sym): decode_compound_collector construction bits
13771         move to decode_compound_collector ctor.  Pass the
13772         decode_compound_collector object directly as callback.  Remove
13773         cleanups and use decode_compound_collector::release_symbols
13774         instead.
13775         (symtab_collector): Now a class with private fields.
13776         (symtab_collector::release_symtabs): New method.
13777         (add_symtabs_to_list): Rename to...
13778         (symtab_collector::operator()): ... this and adjust.
13779         (collect_symtabs_from_filename): symtab_collector construction
13780         bits move to symtab_collector ctor.  Pass the symtab_collector
13781         object directly as callback.  Remove cleanups and use
13782         symtab_collector::release_symtabs instead.
13783         (collect_symbols): Delete.
13784         (add_matching_symbols_to_info): Use lambdas.
13785         * macrocmd.c (print_macro_callback): Delete.
13786         (info_macro_command): Use a lambda.
13787         (info_macros_command): Pass print_macro_definition as callable
13788         directly.
13789         (print_one_macro): Remove 'ignore' parameter.
13790         (macro_list_command): Adjust.
13791         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13792         (macro_for_each_data::user_data): Delete field.
13793         (foreach_macro): Adjust to call the function_view.
13794         (macro_for_each): Adjust to use function_view as callback type.
13795         (foreach_macro_in_scope): Adjust to call the function_view.
13796         (macro_for_each_in_scope): Adjust to use function_view as callback
13797         type.
13798         * macrotab.h: Include "common/function-view.h".
13799         (macro_callback_fn): Declare a prototype instead of a pointer.
13800         Remove "user_data" parameter.
13801         (macro_for_each, macro_for_each_in_scope): Adjust to use
13802         function_view as callback type.
13803         * psymtab.c (partial_map_expand_apply)
13804         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13805         Adjust to use function_view as callback type and to return bool.
13806         (psym_expand_symtabs_matching): Adjust to use function_view as
13807         callback types.
13808         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13809         to use function_view as callback type and to return bool.
13810         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13811         callback types.
13812         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13813         as callback types.
13814         * symfile.h: Include "common/function-view.h".
13815         (expand_symtabs_file_matcher_ftype)
13816         (expand_symtabs_symbol_matcher_ftype)
13817         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13818         return bool.
13819         (quick_symbol_functions::map_symtabs_matching_filename)
13820         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13821         function_view as callback type and return bool.
13822         (expand_symtabs_matching): Adjust to use function_view as callback
13823         type.
13824         (maintenance_expand_name_matcher)
13825         (maintenance_expand_file_matcher): Delete.
13826         (maintenance_expand_symtabs): Use lambdas.
13827         * symtab.c (iterate_over_some_symtabs): Adjust to use
13828         function_view as callback types and return bool.
13829         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13830         of a cleanup.
13831         (lookup_symtab_callback): Delete.
13832         (lookup_symtab): Use a lambda.
13833         (iterate_over_symbols): Adjust to use function_view as callback
13834         type.
13835         (struct search_symbols_data, search_symbols_file_matches)
13836         (search_symbols_name_matches): Delete.
13837         (search_symbols): Use a pair of lambdas.
13838         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13839         (symtab_expansion_callback): Delete.
13840         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13841         * symtab.h: Include "common/function-view.h".
13842         (iterate_over_some_symtabs): Adjust to use function_view as
13843         callback type and return bool.
13844         (iterate_over_symtabs): Adjust to use function_view as callback
13845         type.
13846         (symbol_found_callback_ftype): Remove 'data' parameter and return
13847         bool.
13848         (iterate_over_symbols): Adjust to use function_view as callback
13849         type.
13850
13851 2017-02-23  Pedro Alves  <palves@redhat.com>
13852
13853         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13854         (%.o) <unittests/%.c>: New pattern.
13855         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13856         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13857         * common/function-view.h: New file.
13858         * unittests/function-view-selftests.c: New file.
13859         * configure: Regenerate.
13860
13861 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13862
13863         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13864         inferior_ptid.
13865         * go32-nat.c (go32_thread_alive): Likewise.
13866
13867 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13868
13869         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13870         delete.
13871
13872 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13873
13874         * varobj.c (varobj_clear_saved_item): Use delete instead of
13875         xfree.
13876         (update_dynamic_varobj_children): Likewise.
13877
13878 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13879
13880         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13881
13882 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13883
13884         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13885         m_enum_value to 0 in default constructor.
13886
13887 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13888
13889         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13890         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13891         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13892         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13893         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13894         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13895         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13896         IS_STORE_CONDITIONAL_INSN.
13897
13898 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13899
13900         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13901
13902 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13903
13904         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13905
13906 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13907
13908         * dwarf2read.c (skip_one_die, read_attribute_value)
13909         (dwarf2_const_value_attr, dump_die_shallow)
13910         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13911         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13912
13913 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13914
13915         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13916         (dwarf_parse_macro_header): Accept DWARF version 5.
13917         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13918
13919 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13920
13921         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13922         DW_AT_GNU_*.
13923         * common/common-exceptions.h (enum errors): Likewise.
13924         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13925         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13926         (dwarf_expr_context::execute_stack_op): Likewise.
13927         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13928         Likewise.
13929         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13930         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13931         (show_entry_values_debug, call_site_to_target_addr)
13932         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13933         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13934         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13935         (value_of_dwarf_block_entry, indirect_pieced_value)
13936         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13937         (disassemble_dwarf_expression): Likewise.
13938         * dwarf2read.c (process_die, inherit_abstract_dies)
13939         (read_call_site_scope): Likewise.
13940         * gdbtypes.h (struct func_type, struct call_site_parameter)
13941         (struct call_site): Likewise.
13942         * stack.c (read_frame_arg): Likewise.
13943         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13944
13945 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13946
13947         * defs.h (read_unsigned_leb128): New declaration.
13948         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13949         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13950         (dwarf2_find_location_expression): Call also
13951         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13952         * dwarf2loc.h (dwarf2_version): New declaration.
13953         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13954         rnglists.
13955         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13956         .debug_rnglists.
13957         (struct dwop_section_names): Add loclists_dwo.
13958         (dwop_section_names): Add .debug_loclists.dwo.
13959         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13960         (struct dwarf2_per_cu_data): Add dwarf_version.
13961         (struct dwo_sections): Add loclists.
13962         (struct attr_abbrev): Add implicit_const.
13963         (read_indirect_line_string): New declaration.
13964         (read_unsigned_leb128): Delete declaration.
13965         (rcuh_kind): New definition.
13966         (read_and_check_comp_unit_head): Change parameter
13967         is_debug_types_section to section_kind.
13968         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13969         (read_comp_unit_head): Change parameter abfd to section, add parameter
13970         section_kind.  Handle DWARF-5.
13971         (error_check_comp_unit_head): Accept also DWARF version 5.
13972         (read_and_check_comp_unit_head): Change parameter
13973         is_debug_types_section to section_kind.
13974         (read_and_check_type_unit_head): Delete function.
13975         (read_abbrev_offset): Handle DWARF-5.
13976         (create_debug_type_hash_table): Add parameter section_kind.  Process
13977         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13978         comp_unit_head.
13979         (create_debug_types_hash_table): Update create_debug_type_hash_table
13980         caller.
13981         (create_all_type_units): Call create_debug_type_hash_table.
13982         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13983         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13984         caller.
13985         (skip_one_die): Handle DW_FORM_implicit_const.
13986         (dwarf2_rnglists_process): New function.
13987         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13988         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13989         (read_attribute_value): Handle DW_FORM_implicit_const,
13990         DW_FORM_line_strp.
13991         (read_attribute): Handle DW_FORM_implicit_const.
13992         (read_indirect_string_at_offset_from): New function from
13993         read_indirect_string_at_offset.
13994         (read_indirect_string_at_offset): Call
13995         read_indirect_string_at_offset_from.
13996         (read_indirect_line_string_at_offset): New function.
13997         (read_indirect_string): New function comment.
13998         (read_indirect_line_string): New function.
13999         (read_unsigned_leb128): Make it global.
14000         (dwarf2_string_attr): Handle DWARF-5.
14001         (add_include_dir_stub, read_formatted_entries): New functions.
14002         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14003         Handle DWARF-5.
14004         (per_cu_header_read_in): Update read_comp_unit_head caller.
14005         (dwarf2_version): New function.
14006         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14007         rnglists.
14008         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14009         fields.
14010
14011 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14012
14013         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14014
14015 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14016
14017         * dwarf2read.c (dwarf2_ranges_process): New function from
14018         dwarf2_ranges_read.
14019         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14020         dwarf2_ranges_process.
14021
14022 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14023
14024         * dwarf2read.c (create_debug_type_hash_table): New function from
14025         create_debug_types_hash_table.
14026         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14027         (create_all_type_units, open_and_init_dwo_file): Update
14028         create_debug_types_hash_table callers.
14029
14030 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14031
14032         PR gdb/16188
14033         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14034         refer to 'ap', not 'args'.
14035
14036 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14037             Pedro Alves  <palves@redhat.com>
14038
14039         PR gdb/16188
14040         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14041         calls succeeded.
14042         * fork-child.c (trace_start_error): New function.
14043         (trace_start_error_with_name): Likewise.
14044         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14045         * inf-ptrace.c (inf_ptrace_me): Likewise.
14046         * inferior.h (trace_start_error): New prototype.
14047         (trace_start_error_with_name): Likewise.
14048
14049 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14050
14051         PR gdb/21164
14052         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14053         NULL before using it.
14054         * symmisc.c (maintenance_print_symbols): Likewise.
14055         (maintenance_print_msymbols): Likewise.
14056
14057 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14058
14059         * NEWS: Add record Python bindings entry.
14060
14061 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14062
14063         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14064         py-record-full.o.
14065         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14066         * python/py-record-btrace.c, python/py-record-btrace.h,
14067         python/py-record-full.c, python/py-record-full.h: New file.
14068         * python/py-record.c: Add include for py-record-btrace.h and
14069         py-record-full.h.
14070         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14071         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14072         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14073         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14074         New definition.
14075         (gdbpy_initialize_btrace): New export.
14076         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14077
14078 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14079
14080         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14081         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14082         * python/py-record.c: New file.
14083         * python/python-internal.h (gdbpy_start_recording,
14084         gdbpy_current_recording, gdpy_stop_recording,
14085         gdbpy_initialize_record): New export.
14086         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14087         (python_GdbMethods): Add gdbpy_start_recording,
14088         gdbpy_current_recording and gdbpy_stop_recording.
14089
14090 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14091
14092         * record-btrace.c (record_btrace_record_method): New function.
14093         (init_record_btrace_ops): Initialize to_record_method.
14094         * record-full.c (record_full_record_method): New function.
14095         (init_record_full_ops, init_record_full_core_ops): Add
14096         record_full_record_method.
14097         * record.h (enum record_method): New enum.
14098         * target-debug.h (target_debug_print_enum_record_method: New define.
14099         * target-delegates.c: Regenerate.
14100         * target.c (target_record_method): New function.
14101         * target.h: Include record.h.
14102         (struct target_ops) <to_record_method>: New field.
14103         (target_record_method): New export.
14104
14105 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14106
14107         * record.h (record_start, record_stop): New export.
14108         * record.c (record_start, record_stop): New function.
14109
14110 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14111
14112         * btrace.c (btrace_fetch): Copy function call segments pointer
14113         into a vector.
14114         (btrace_clear): Clear the vector.
14115         (btrace_find_insn_by_number): Use binary search to find the correct
14116         function call segment.
14117         * btrace.h (brace_fun_p): New typedef.
14118         (struct btrace_thread_info) <functions>: New field.
14119
14120 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14121
14122         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14123         * btrace.c (btrace_decode_error): ... here.  New function.
14124         * btrace.h (btrace_decode_error): New export.
14125
14126 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14127
14128         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14129         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14130         btrace_find_insn_by_number): Remove special case for gaps.
14131         * btrace.h (btrace_insn_get_error): New export.
14132         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14133         * record-btrace.c (btrace_insn_history): Print number for gaps.
14134         (record_btrace_info, record_btrace_goto): Handle gaps.
14135
14136 2017-02-14  Tom Tromey  <tom@tromey.com>
14137
14138         PR python/13598:
14139         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14140         event.
14141         * python/py-evts.c (gdbpy_initialize_py_events): Add
14142         before_prompt registry.
14143         * python/py-events.h (events_object) <before_prompt>: New field.
14144
14145 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14146
14147         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14148
14149 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14150
14151         * symfile (_initialize_symfile): Add usage text to the load command's
14152         help text.
14153
14154 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14155
14156         * utils.c (defaulted_query): Don't query on secondary UIs.
14157
14158 2017-02-10  Tom Tromey  <tom@tromey.com>
14159
14160         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14161
14162 2017-02-10  Tom Tromey  <tom@tromey.com>
14163
14164         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14165         "cleanup" local.
14166         * python/py-type.c (typy_legacy_template_argument): Remove
14167         unnecessary "cleanup" local.
14168
14169 2017-02-10  Tom Tromey  <tom@tromey.com>
14170
14171         * python/python.c (do_start_initialization): New function, from
14172         _initialize_python.
14173         (_initialize_python): Call do_start_initialization.
14174         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14175         goto.
14176
14177 2017-02-10  Tom Tromey  <tom@tromey.com>
14178
14179         * python/py-prettyprint.c (pretty_print_one_value): Use
14180         gdbpy_ref.
14181
14182 2017-02-10  Tom Tromey  <tom@tromey.com>
14183
14184         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14185         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14186         gdbpy_ref.
14187         * python/py-type.c (field_new): Use gdbpy_ref.
14188         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14189         gdbpy_ref.
14190         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14191         (py_free_pspace): Likewise.
14192         (pspace_to_pspace_object): Likewise.
14193         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14194         (py_free_objfile): Likewise.
14195         (objfile_to_objfile_object): Likewise.
14196         * python/py-inferior.c (delete_thread_object): Use
14197         gdbpy_ref.
14198         (infpy_read_memory): Likewise.
14199         (py_free_inferior): Likewise.
14200         * python/py-evtregistry.c (create_eventregistry_object): Use
14201         gdbpy_ref.
14202         * python/py-event.c (create_event_object): Use gdbpy_ref.
14203
14204 2017-02-10  Tom Tromey  <tom@tromey.com>
14205
14206         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14207         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14208         used.
14209         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14210         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14211         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14212         python/py-framefilter.c, python/py-function.c,
14213         python/py-inferior.c, python/py-infevents.c,
14214         python/py-linetable.c, python/py-newobjfileevent.c,
14215         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14216         python/py-signalevent.c, python/py-stopevent.c,
14217         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14218         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14219         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14220         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14221
14222 2017-02-10  Tom Tromey  <tom@tromey.com>
14223
14224         * ui-out.h (ui_out_emit_type): New class.
14225         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14226         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14227         and ui_out_emit_tuple.
14228         (enumerate_locals): Likewise.
14229         (py_mi_print_variables, py_print_locals, py_print_args): Use
14230         ui_out_emit_list.
14231         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14232         ui_out_emit_list.
14233         * common/gdb_optional.h: New file.
14234
14235 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14236
14237         * MAINTAINERS (Write After Approval): Update my e-mail address.
14238
14239 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14240
14241         PR gdb/21122
14242         * breakpoint.c (_initialize_breakpoint): Update the help description
14243         of the 'commands' command to indicate that it takes a list argument.
14244
14245 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14246
14247         * interps.c (current_interp_set_logging): Remove "return".
14248
14249 2017-02-09  Gary Benson  <gbenson@redhat.com>
14250
14251         * symtab.c (add_symtab_completions): Prevent NULL pointer
14252         dereference.
14253
14254 2017-02-08  Pedro Alves  <palves@redhat.com>
14255
14256         * interps.c (interp::interp): Remove reference to quiet_p.
14257         (interp_set): Make static.  Remove dead "Switching to" output
14258         code.
14259         (interp_quiet_p, interp_set_quiet): Delete.
14260         (interpreter_exec_cmd): Don't set the interpreter quiet.
14261         * interps.h (interp_quiet_p): Make static.
14262         (class interp) <quiet_p>: Remove field
14263
14264 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14265
14266         * cli/cli-decode.c (find_command_name_length): Make it extern.
14267         * cli/cli-decode.h (find_command_name_length): Declare.
14268         * cli/cli-script.c (command_name_equals, line_first_arg):
14269         New functions.
14270         (process_next_line): Use cli-decode to parse command names.
14271         (build_command_line): Make args a constant pointer.
14272
14273 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14274
14275         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14276         Remove case-insensitive search.
14277
14278 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14279
14280         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14281         at the end of the line.  Avoids an ARI warning.
14282
14283 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14284
14285         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14286         rdseed instructions.
14287         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14288
14289 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14290
14291         PR tdep/20936
14292         Provide and use sparc32 and sparc64 target description XML files.
14293         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14294         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14295         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14296         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14297         * features/sparc/sparc32-solaris.xml: New file.
14298         * features/sparc/sparc64-solaris.xml: New file.
14299         * features/sparc/sparc32-solaris.c: Generated.
14300         * features/sparc/sparc64-solaris.c: Generated.
14301         * sparc-tdep.h: Account for differences in target descriptions.
14302         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14303         (sparc32_register_type): Use target provided registers.
14304         (validate_tdesc_registers): New function.
14305         (sparc32_gdbarch_init): Use tdesc_has_registers.
14306         Set pseudoregister functions.
14307         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14308         (sparc64_register_type): Use target provided registers.
14309         (sparc64_init_abi): Set pseudoregister functions.
14310
14311 2017-02-03  Tom Tromey  <tom@tromey.com>
14312
14313         PR rust/21097:
14314         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14315         with a single member.
14316
14317 2017-02-03  Pedro Alves  <palves@redhat.com>
14318
14319         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14320         (cli_interp_base::~cli_interp_base): New.
14321         (cli_interp): New struct.
14322         (as_cli_interp): Cast the interp itself to cli_interp.
14323         (cli_interpreter_pre_command_loop): Rename to ...
14324         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14325         parameter.
14326         (cli_interpreter_init): Rename to ...
14327         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14328         boolean.  Make extern.
14329         (cli_interpreter_resume): Rename to ...
14330         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14331         extern.
14332         (cli_interpreter_suspend): Rename to ...
14333         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14334         extern.
14335         (cli_interpreter_exec): Rename to ...
14336         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14337         extern.
14338         (cli_interpreter_supports_command_editing): Rename to ...
14339         (cli_interp_base::supports_command_editing): ... this.  Remove
14340         'interp' parameter.  Make extern.
14341         (cli_ui_out): Rename to ...
14342         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14343         Make extern.
14344         (cli_set_logging): Rename to ...
14345         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14346         parameter.  Make extern.
14347         (cli_interp_procs): Delete.
14348         (cli_interp_factory): Adjust to use "new".
14349         * cli/cli-interp.h: Include "interps.h".
14350         (struct cli_interp_base): New struct.
14351         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14352         (interp_new): Delete.
14353         (interp::interp, interp::~interp): New.
14354         (interp_set): Use bool, and return void.  Assume the interpreter
14355         has suspend, init and resume methods, and that the all return
14356         void.
14357         (set_top_level_interpreter): interp_set returns void.
14358         (interp_ui_out): Adapt.
14359         (current_interp_set_logging): Adapt.
14360         (interp_data): Delete.
14361         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14362         (interp_exec): Adapt.
14363         (top_level_interpreter_data): Delete.
14364         * interps.h (interp_init_ftype, interp_resume_ftype)
14365         (interp_suspend_ftype, interp_exec_ftype)
14366         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14367         (class interp): New.
14368         (interp_new): Delete.
14369         (interp_set): Now returns void.  Use bool.
14370         (interp_data, top_level_interpreter_data): Delete.
14371         * mi/mi-common.h: Include interps.h.
14372         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14373         init, resume, suspect, exec, interp_ui_out, set_logging and
14374         pre_command_loop methods.
14375         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14376         (mi_interpreter_init): Rename to ...
14377         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14378         bool, return void and make extern.  Adjust.
14379         (mi_interpreter_resume): ... Rename to ...
14380         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14381         return void and make extern.  Adjust.
14382         (mi_interpreter_suspend): ... Rename to ...
14383         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14384         return void and make extern.  Adjust.
14385         (mi_interpreter_exec): ... Rename to ...
14386         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14387         extern.  Adjust.
14388         (mi_interpreter_pre_command_loop): ... Rename to ...
14389         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14390         parameter and make extern.
14391         (mi_on_normal_stop_1): Adjust.
14392         (mi_ui_out): Rename to ...
14393         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14394         parameter and make extern.  Adjust.
14395         (mi_set_logging): Rename to ...
14396         (mi_interp::set_logging): ... this.  Remove the 'interp'
14397         parameter and make extern.  Adjust.
14398         (mi_interp_procs): Delete.
14399         (mi_interp_factory): Adjust to use 'new'.
14400         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14401         (mi_print_exception, mi_execute_command, mi_load_progress):
14402         Adjust.
14403         * tui/tui-interp.c (tui_interp): New class.
14404         (as_tui_interp): Return a tui_interp pointer.
14405         (tui_on_normal_stop, tui_on_signal_received)
14406         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14407         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14408         to use interp::interp_ui_out.
14409         (tui_init): Rename to ...
14410         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14411         bool, return void and make extern.  Adjust.
14412         (tui_resume): Rename to ...
14413         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14414         return void and make extern.  Adjust.
14415         (tui_suspend): Rename to ...
14416         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14417         return void and make extern.  Adjust.
14418         (tui_ui_out): Rename to ...
14419         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14420         parameter, and make extern.  Adjust.
14421         (tui_exec): Rename to ...
14422         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14423         make extern.
14424         (tui_interp_procs): Delete.
14425         (tui_interp_factory): Use "new".
14426
14427 2017-02-02  Tom Tromey  <tom@tromey.com>
14428
14429         * rust-exp.y (ends_raw_string, space_then_number)
14430         (rust_identifier_start_p): Return bool.
14431         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14432         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14433         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14434         (rust_chartype_p): Return bool.
14435         (val_print_struct, rust_print_struct_def, rust_print_type):
14436         Update.
14437         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14438         Return bool.
14439
14440 2017-02-02  Tom Tromey  <tom@tromey.com>
14441
14442         * rust-lang.c: Reindent.
14443
14444 2017-02-02  Tom Tromey  <tom@tromey.com>
14445
14446         * rust-lang.h (rust_crate_for_block): Update.
14447         * rust-lang.c (rust_crate_for_block): Return std::string.
14448         (rust_get_disr_info): Use std:;string, not
14449         gdb::unique_xmalloc_ptr.
14450         * rust-exp.y (crate_name): Update.
14451
14452 2017-02-02  Pedro Alves  <palves@redhat.com>
14453
14454         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14455         field out of gdb_disassembler_test and make it static.
14456
14457 2017-02-02  Pedro Alves  <palves@redhat.com>
14458
14459         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14460         mi1_interp and mi_interp fields.
14461
14462 2017-02-02  Pedro Alves  <palves@redhat.com>
14463
14464         * cli/cli-interp.c (struct saved_output_files, saved_output):
14465         Moved from cli/cli-logging.c.
14466         (cli_set_logging): New function.
14467         (cli_interp_procs): Install cli_set_logging.
14468         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14469         Declare.
14470         * cli/cli-logging.c (struct saved_output_files, saved_output):
14471         Moved to cli/cli-interp.c.
14472         (pop_output_files): Don't save outputs here.
14473         (make_logging_output): New function.
14474         (handle_redirections): Don't build tee nor save previous outputs
14475         here.
14476         * interps.c (current_interp_set_logging): Change prototype.
14477         Assume there's always a set_logging_proc method installed.
14478         * interps.h (interp_set_logging_ftype): Change prototype.
14479         (current_interp_set_logging): Change prototype and adjust comment.
14480         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14481         use make_logging_output.
14482         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14483 2017-02-02  Pedro Alves  <palves@redhat.com>
14484
14485         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14486         from ...
14487         (set_logging_overwrite): ... here.
14488         (logging_no_redirect_file): Delete.
14489         (set_logging_redirect): Don't handle redirection on the fly.
14490         Instead warn that "logging off" / "logging on" is necessary.
14491         (pop_output_files): Delete references to logging_no_redirect_file.
14492         (show_logging_command): Always speak in terms of what will happen
14493         once logging is reenabled.
14494
14495 2017-02-02  Pedro Alves  <palves@redhat.com>
14496
14497         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14498
14499 2017-02-02  Pedro Alves  <palves@redhat.com>
14500
14501         * disasm.c (gdb_pretty_print_insn): Rename to ...
14502         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14503         Remove gdbarch parameter.  Adapt to clear the object's buffers
14504         instead of allocating new buffers, and to print using the object's
14505         gdb_disassembler instead of calling gdb_print_insn.
14506         (dump_insns): Use gdb_pretty_print_disassembler.
14507         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14508         (gdb_pretty_print_disassembler): New class.
14509         * record-btrace.c (btrace_insn_history): Use
14510         gdb_pretty_print_disassembler.
14511
14512 2017-02-02  Pedro Alves  <palves@redhat.com>
14513
14514         * ada-lang.c (type_as_string): Use string_file.
14515         * ada-valprint.c (ada_print_floating): Use string_file.
14516         * ada-varobj.c (ada_varobj_scalar_image)
14517         (ada_varobj_get_value_image): Use string_file.
14518         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14519         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14520         * breakpoint.c (update_inserted_breakpoint_locations)
14521         (insert_breakpoint_locations, reattach_breakpoints)
14522         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14523         (print_it_watchpoint): Use string_file.
14524         (save_breakpoints): Use stdio_file.
14525         * c-exp.y (oper): Use string_file.
14526         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14527         tee_file.
14528         (pop_output_files): Use delete.
14529         (handle_redirections): Use stdio_file and tee_file.
14530         * cli/cli-setshow.c (do_show_command): Use string_file.
14531         * compile/compile-c-support.c (c_compute_program): Use
14532         string_file.
14533         * compile/compile-c-symbols.c (generate_vla_size): Take a
14534         'string_file &' instead of a 'ui_file *'.
14535         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14536         of a 'ui_file *'.  Use string_file.
14537         (generate_c_for_variable_locations): Take a 'string_file &'
14538         instead of a 'ui_file *'.
14539         * compile/compile-internal.h (generate_c_for_for_one_variable):
14540         Take a 'string_file &' instead of a 'ui_file *'.
14541         * compile/compile-loc2c.c (push, pushf, unary, binary)
14542         (print_label, pushf_register_address, pushf_register)
14543         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14544         'ui_file *'.  Adjust.
14545         * compile/compile.c (compile_to_object): Use string_file.
14546         * compile/compile.h (compile_dwarf_expr_to_c)
14547         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14548         'ui_file *'.
14549         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14550         (replace_typedefs_qualified_name): Use string_file and
14551         obstack_copy0.
14552         * disasm.c (gdb_pretty_print_insn): Use string_file.
14553         (gdb_disassembly): Adjust reference the null_stream global.
14554         (do_ui_file_delete): Delete.
14555         (gdb_insn_length): Use null_stream.
14556         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14557         * dwarf2loc.c (dwarf2_compile_property_to_c)
14558         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14559         'string_file &' instead of a 'ui_file *'.
14560         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14561         * dwarf2read.c (do_ui_file_peek_last): Delete.
14562         (dwarf2_compute_name): Use string_file.
14563         * event-top.c (gdb_setup_readline): Use stdio_file.
14564         * gdbarch.sh (verify_gdbarch): Use string_file.
14565         * gdbtypes.c (safe_parse_type): Use null_stream.
14566         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14567         string_file.
14568         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14569         'string_file *' instead of a 'ui_file *'.
14570         (gdbscm_arch_disassemble): Use string_file.
14571         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14572         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14573         inherits from ui_file.
14574         (ioscm_file_port_delete, ioscm_file_port_rewind)
14575         (ioscm_file_port_put): Delete.
14576         (ioscm_file_port_write): Rename to ...
14577         (ioscm_file_port::write): ... this.  Remove file_port_magic
14578         checks.
14579         (ioscm_file_port_new): Delete.
14580         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14581         ui_file_up.
14582         * guile/scm-type.c (tyscm_type_name): Use string_file.
14583         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14584         Use string_file.
14585         * infcmd.c (print_return_value_1): Use string_file.
14586         * infrun.c (print_target_wait_results): Use string_file.
14587         * language.c (add_language): Use string_file.
14588         * location.c (explicit_to_string_internal): Use string_file.
14589         * main.c (captured_main_1): Use null_file.
14590         * maint.c (maintenance_print_architecture): Use stdio_file.
14591         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14592         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14593         event_channel>: Change type to mi_console_file pointer.
14594         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14595         (mi_console_file_delete): Delete.
14596         (struct mi_console_file): Delete.
14597         (mi_console_file_magic): Delete.
14598         (mi_console_file_new): Delete.
14599         (mi_console_file::mi_console_file): New.
14600         (mi_console_file_delete): Delete.
14601         (mi_console_file_fputs): Delete.
14602         (mi_console_file::write): New.
14603         (mi_console_raw_packet): Delete.
14604         (mi_console_file::flush): New.
14605         (mi_console_file_flush): Delete.
14606         (mi_console_set_raw): Rename to ...
14607         (mi_console_file::set_raw): ... this.
14608         * mi/mi-console.h (class mi_console_file): New class.
14609         (mi_console_file_new, mi_console_set_raw): Delete.
14610         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14611         (mi_set_logging): Use delete and tee_file.  Adjust.
14612         * mi/mi-main.c (output_register): Use string_file.
14613         (mi_cmd_data_evaluate_expression): Use string_file.
14614         (mi_cmd_data_read_memory): Use string_file.
14615         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14616         * mi/mi-out.c (mi_ui_out::main_stream): New.
14617         (mi_ui_out::rewind): Use main_stream and
14618         string_file.
14619         (mi_ui_out::put): Use main_stream and string_file.
14620         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14621         Allocate a 'string_file' instead.
14622         (mi_out_new): Don't allocate a mem_fileopen stream here.
14623         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14624         (mi_ui_out::main_stream): Declare method.
14625         * printcmd.c (eval_command): Use string_file.
14626         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14627         * python/py-arch.c (archpy_disassemble): Use string_file.
14628         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14629         * python/py-frame.c (frapy_str): Use string_file.
14630         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14631         Use string_file.
14632         * python/py-type.c (typy_str): Use string_file.
14633         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14634         * python/py-value.c (valpy_str): Use string_file.
14635         * record-btrace.c (btrace_insn_history): Use string_file.
14636         * regcache.c (regcache_print): Use stdio_file.
14637         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14638         * remote.c (escape_buffer): Use string_file.
14639         * rust-lang.c (rust_get_disr_info): Use string_file.
14640         * serial.c (serial_open_ops_1): Use stdio_file.
14641         (do_serial_close): Use delete.
14642         * stack.c (print_frame_arg): Use string_file.
14643         (print_frame_args): Remove local mem_fileopen stream, not used.
14644         (print_frame): Use string_file.
14645         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14646         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14647         Take a 'string_file *' instead of a 'ui_file *'.
14648         * top.c (new_ui): Use stdio_file and stderr_file.
14649         (free_ui): Use delete.
14650         (execute_command_to_string): Use string_file.
14651         (quit_confirm): Use string_file.
14652         * tracepoint.c (collection_list::append_exp): Use string_file.
14653         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14654         * tui/tui-file.c: Don't include "ui-file.h".
14655         (enum streamtype, struct tui_stream): Delete.
14656         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14657         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14658         (tui_file::tui_file): New method.
14659         (tui_file_fputs): Delete.
14660         (tui_file_get_strbuf): Delete.
14661         (tui_file::puts): New method.
14662         (tui_file_adjust_strbuf): Delete.
14663         (tui_file_flush): Delete.
14664         (tui_file::flush): New method.
14665         * tui/tui-file.h: Tweak intro comment.
14666         Include ui-file.h.
14667         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14668         (tui_file_adjust_strbuf): Delete declarations.
14669         (class tui_file): New class.
14670         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14671         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14672         (tui_register_format): Use string_stream.
14673         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14674         (tui_get_function_from_frame): Use string_file.
14675         * typeprint.c (type_to_string): Use string_file.
14676         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14677         (null_stream): New global.
14678         (ui_file_delete): Delete.
14679         (ui_file::ui_file): New.
14680         (null_file_isatty): Delete.
14681         (ui_file::~ui_file): New.
14682         (null_file_rewind): Delete.
14683         (ui_file::printf): New.
14684         (null_file_put): Delete.
14685         (null_file_flush): Delete.
14686         (ui_file::putstr): New.
14687         (null_file_write): Delete.
14688         (ui_file::putstrn): New.
14689         (null_file_read): Delete.
14690         (ui_file::putc): New.
14691         (null_file_fputs): Delete.
14692         (null_file_write_async_safe): Delete.
14693         (ui_file::vprintf): New.
14694         (null_file_delete): Delete.
14695         (null_file::write): New.
14696         (null_file_fseek): Delete.
14697         (null_file::puts): New.
14698         (ui_file_data): Delete.
14699         (null_file::write_async_safe): New.
14700         (gdb_flush, ui_file_isatty): Adjust.
14701         (ui_file_put, ui_file_rewind): Delete.
14702         (ui_file_write): Adjust.
14703         (ui_file_write_for_put): Delete.
14704         (ui_file_write_async_safe, ui_file_read): Adjust.
14705         (ui_file_fseek): Delete.
14706         (fputs_unfiltered): Adjust.
14707         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14708         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14709         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14710         (set_ui_file_data): Delete.
14711         (string_file::~string_file, string_file::write)
14712         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14713         (do_ui_file_as_string, ui_file_as_string): Delete.
14714         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14715         (struct mem_file): Delete.
14716         (mem_file_new): Delete.
14717         (stdio_file::stdio_file): New.
14718         (mem_file_delete): Delete.
14719         (stdio_file::stdio_file): New.
14720         (mem_fileopen): Delete.
14721         (stdio_file::~stdio_file): New.
14722         (mem_file_rewind): Delete.
14723         (stdio_file::set_stream): New.
14724         (mem_file_put): Delete.
14725         (stdio_file::open): New.
14726         (mem_file_write): Delete.
14727         (stdio_file_magic, struct stdio_file): Delete.
14728         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14729         (stdio_file::flush): New.
14730         (stdio_file_read): Rename to ...
14731         (stdio_file::read): ... this.  Adjust.
14732         (stdio_file_write): Rename to ...
14733         (stdio_file::write): ... this.  Adjust.
14734         (stdio_file_write_async_safe): Rename to ...
14735         (stdio_file::write_async_safe) ... this.  Adjust.
14736         (stdio_file_fputs): Rename to ...
14737         (stdio_file::puts) ... this.  Adjust.
14738         (stdio_file_isatty): Delete.
14739         (stdio_file_fseek): Delete.
14740         (stdio_file::isatty): New.
14741         (stderr_file_write): Rename to ...
14742         (stderr_file::write) ... this.  Adjust.
14743         (stderr_file_fputs): Rename to ...
14744         (stderr_file::puts) ... this.  Adjust.
14745         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14746         (stderr_file::stderr_file): New.
14747         (tee_file_magic): Delete.
14748         (struct tee_file): Delete.
14749         (tee_file::tee_file): New.
14750         (tee_file_new): Delete.
14751         (tee_file::~tee_file): New.
14752         (tee_file_delete): Delete.
14753         (tee_file_flush): Rename to ...
14754         (tee_file::flush): ... this.  Adjust.
14755         (tee_file_write): Rename to ...
14756         (tee_file::write): ... this.  Adjust.
14757         (tee_file::write_async_safe): New.
14758         (tee_file_fputs): Rename to ...
14759         (tee_file::puts): ... this.  Adjust.
14760         (tee_file_isatty): Rename to ...
14761         (tee_file::isatty): ... this.  Adjust.
14762         * ui-file.h (struct obstack, struct ui_file): Don't
14763         forward-declare.
14764         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14765         (ui_file_write_ftype)
14766         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14767         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14768         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14769         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14770         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14771         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14772         (set_ui_file_fseek): Delete.
14773         (ui_file_data, ui_file_delete, ui_file_rewind)
14774         (struct ui_file): New.
14775         (ui_file_up): New.
14776         (class null_file): New.
14777         (null_stream): Declare.
14778         (ui_file_write_for_put, ui_file_put): Delete.
14779         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14780         Delete.
14781         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14782         (gdb_fopen, tee_file_new): Delete.
14783         (struct string_file): New.
14784         (struct stdio_file): New.
14785         (stdio_file_up): New.
14786         (struct stderr_file): New.
14787         (class tee_file): New.
14788         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14789         of a 'ui_file *'.  Adjust.
14790         * ui-out.h (class ui_out) <field_stream>: Likewise.
14791         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14792         (null_stream): Delete.
14793         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14794         Adjust.
14795         * utils.h (struct ui_file): Delete forward declaration..
14796         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14797         (error_stream): Take a 'string_file &' instead of a
14798         'ui_file *'.
14799         * varobj.c (varobj_value_get_print_value): Use string_file.
14800         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14801         * gdbarch.c: Regenerate.
14802
14803 2017-02-02  Pedro Alves  <palves@redhat.com>
14804
14805         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14806         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14807         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14808         Adjust to call gdb_print_insn instead of
14809         gdb_disassembler::print_insn.
14810         (dump_insns, do_mixed_source_and_assembly_deprecated)
14811         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14812         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14813         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14814         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14815         declaration.
14816         (gdb_pretty_print_insn): Re-add declaration.
14817         * record-btrace.c (btrace_insn_history): Don't allocate a
14818         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14819
14820 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14821
14822         * disasm.h (gdb_disassembly): Remove file_string parameter.
14823         * disasm.c (gdb_disassembly): Likewise.
14824         * cli/cli-cmds.c (print_disassembly): Adapt.
14825         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14826         * stack.c (do_gdb_disassembly): Likewise.
14827
14828 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14829
14830         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14831         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14832         targets.  And if the implicit value is longer than needed, extract
14833         the first bytes instead of the "least significant" ones.
14834
14835 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14836
14837         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14838         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14839         (btrace_fetch): Assert can_access_registers_ptid.
14840         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14841         validate_registers_access.
14842
14843 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14844
14845         * gdbthread.h (can_access_registers_ptid): New.
14846         * thread.c (can_access_registers_ptid): New.
14847
14848 2017-02-01  Pedro Alves  <palves@redhat.com>
14849
14850         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14851
14852 2017-01-31  Pedro Alves  <palves@redhat.com>
14853
14854         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14855         Fix typos.
14856
14857 2017-01-31  Pedro Alves  <palves@redhat.com>
14858
14859         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14860         not used.
14861
14862 2017-01-31  Pedro Alves  <palves@redhat.com>
14863
14864         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14865
14866 2017-01-31  Pedro Alves  <palves@redhat.com>
14867
14868         * common/scoped_restore.h
14869         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14870         change the value's parameter type to T2.
14871         (make_scoped_restore): Likewise.
14872
14873 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14874             Richard Henderson  <rth@redhat.com>
14875
14876         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14877         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14878         GS_BASE for older kernels.
14879         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14880         GS_BASE for older kernels.
14881         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14882         and GS_BASE to the offset table.
14883         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14884         system register group.
14885         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14886         for older kernels.
14887         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14888         amd64 ABI.
14889         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14890         AMD64_GSBASE_REGNUM.
14891         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14892         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14893         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14894         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14895         i386/64bit-segments.xml in those rules.
14896         * features/i386/64bit-segments.xml: New file.
14897         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14898         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14899         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14900         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14901         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14902         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14903         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14904         * features/i386/amd64-avx-linux.c: Regenerated.
14905         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14906         * features/i386/amd64-avx-mpx.c: Regenerated.
14907         * features/i386/amd64-avx512-linux.c: Regenerated.
14908         * features/i386/amd64-linux.c: Regenerated.
14909         * features/i386/amd64-mpx-linux.c: Regenerated.
14910         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14911         * features/i386/i386-avx-mpx.c: Regenerated.
14912         * features/i386/x32-avx-linux.c: Regenerated.
14913         * features/i386/x32-avx512-linux.c: Regenerated.
14914         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14915         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14916         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14917         * regformats/i386/amd64-linux.dat: Regenerated.
14918         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14919         * regformats/i386/x32-avx-linux.dat: Regenerated.
14920         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14921         * regformats/i386/x32-linux.dat: Regenerated.
14922
14923 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14924
14925         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14926         Set to AMD64_NUM_REGS.
14927
14928 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14929
14930         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14931         that checks validity of a register number.
14932
14933 2017-01-27  Kees Cook  <keescook@google.com>
14934
14935         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14936         fetch_fpregs if target has fpa registers.
14937         (arm_linux_store_inferior_registers): Call store_fpregs if target
14938         has fpa registers.
14939
14940 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14941
14942         * cris-tdep.c (cris_gdbarch_init): Remove check for
14943         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14944
14945 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14946
14947         * corelow.c (get_core_register_section): Check for regset
14948         existence before checking for REGSET_VARIABLE_SIZE.
14949
14950 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14951             Pedro Alves  <palves@redhat.com>
14952
14953         PR gdb/20939
14954         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14955         call memory_error, save memaddr instead.
14956         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14957         negative, cal memory_error.
14958         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14959
14960 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14961
14962         * disasm-selftests.c (memory_error_test): New function.
14963         (_initialize_disasm_selftests): Register memory_error_test.
14964
14965 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14966
14967         * Makefile.in (SFILES): Add disasm-selftests.c and
14968         selftest-arch.c.
14969         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14970         * disasm-selftests.c: New file.
14971         * selftest-arch.c: New file.
14972         * selftest-arch.h: New file.
14973
14974 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14975
14976         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14977         to bfd_arch_mep.  Don't return 0 if section is not
14978         found.  Call print_insn_mep.
14979
14980 2017-01-26  Pedro Alves  <palves@redhat.com>
14981             Yao Qi  <yao.qi@linaro.org>
14982
14983         * arm-tdep.c: Include "disasm.h".
14984         (gdb_print_insn_arm): Update code to get gdbarch.
14985         * disasm.c (dis_asm_read_memory): Change it to
14986         gdb_disassembler::dis_asm_read_memory.
14987         (dis_asm_memory_error): Likewise.
14988         (dis_asm_print_address): Likewise.
14989         (gdb_pretty_print_insn): Change it to
14990         gdb_disassembler::pretty_print_insn.
14991         (dump_insns): Add one argument gdb_disassemlber.  All
14992         callers updated.
14993         (do_mixed_source_and_assembly_deprecated): Likewise.
14994         (do_mixed_source_and_assembly): Likewise.
14995         (do_assembly_only): Likewise.
14996         (gdb_disassembler::gdb_disassembler): New.
14997         (gdb_disassembler::print_insn): New.
14998         * disasm.h (class gdb_disassembler): New.
14999         (gdb_pretty_print_insn): Remove declaration.
15000         (gdb_disassemble_info): Likewise.
15001         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15002         (gdbscm_disasm_read_memory_worker): Update.
15003         (gdbscm_disasm_read_memory): Update.
15004         (gdbscm_disasm_memory_error): Remove.
15005         (gdbscm_disasm_print_address): Remove.
15006         (gdbscm_disassembler::gdbscm_disassembler): New.
15007         (gdbscm_print_insn_from_port): Update.
15008         * mips-tdep.c: Include disasm.h.
15009         (gdb_print_insn_mips): Update code to get gdbarch.
15010         * record-btrace.c (btrace_insn_history): Update.
15011         * spu-tdep.c: Include disasm.h.
15012         (struct spu_dis_asm_data): Remove.
15013         (struct spu_dis_asm_info): New.
15014         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15015         SPU id.
15016         (gdb_print_insn_spu): Cast disassemble_info to
15017         spu_dis_asm_info.
15018
15019 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15020
15021         * disasm.c (do_ui_file_delete): Delete.
15022         (gdb_insn_length): Move code creating stream to ...
15023         * utils.c (null_stream): ... here.  New function.
15024         * utils.h (null_stream): Declare.
15025
15026 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15027
15028         * python/py-inferior.c (find_thread_object): Return directly
15029         from the loop.  Remove "found" variable.
15030
15031 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15032
15033         GDB 7.12.1 released.
15034
15035 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15036
15037         * python/py-function.c (fnpy_call): Reorder declarations to have
15038         the gdbpy_enter object declared first.
15039         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15040
15041 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15042
15043         PR python/21068
15044         * python/python-internal.h (PyMem_RawMalloc): Define for
15045         Python < 3.4.
15046         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15047         PyMem_RawMalloc instead of PyMem_Malloc.
15048
15049 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15050             Luis Machado  <lgustavo@codesourcery.com>
15051
15052         * NEWS (New commands): Mention flash-erase.
15053         (New MI commands): Mention target-flash-erase.
15054         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15055         command.
15056         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15057         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15058         * target.c (flash_erase_command): New function.
15059         (initialize_targets): Add new flash-erase command.
15060         * target.h (flash_erase_command): New declaration.
15061
15062 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15063
15064         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15065         HAVE_SYS_PROCFS_H is defined.
15066
15067 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15068
15069         * remote.c (struct cached_reg): Change data into a pointer.
15070         * (stop_reply_dtr): Free data pointers before deleting vector.
15071         (process_stop_reply): Likewise.
15072         (remote_parse_stop_reply): Allocate space for data
15073
15074 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15075
15076         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15077         MAX_REGISTER_SIZE.
15078         (amd64_pseudo_register_read_value): Likewise.
15079         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15080         (store_register_using_P): Likewise.
15081         * regcache.c (regcache_xfer_part): Likewise.
15082
15083 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15084
15085         Split real and pseudo registers.
15086         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15087         (sparc32_pseudo_regnum): New enum.
15088         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15089         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15090         (SPARC32_CP0_REGISTERS): New macro.
15091         (sparc32_pseudo_register_name): New function.
15092         (sparc32_register_name): Use sparc32_pseudo_register_name.
15093         (sparc32_pseudo_register_type): New function.
15094         (sparc32_register_type): Use sparc32_pseudo_register_type.
15095         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15096         pseudo register numbers.
15097         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15098         (SPARC64_CP0_REGISTERS): New macro.
15099         (sparc64_pseudo_register_name): New function.
15100         (sparc64_register_name): Use sparc64_pseudo_register_name.
15101         (sparc64_pseudo_register_type): New function.
15102         (sparc64_register_type): Use sparc64_pseudo_register_type.
15103         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15104         pseudo register numbers.
15105         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15106         sparc64_store_arguments): Handle pseudo register numbers.
15107
15108 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15109
15110         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15111         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15112         output.
15113         (getpkt_or_notif_sane_1): Likewise.
15114
15115 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15116
15117         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15118         of CC.  Pass "-x c++-header" instead of "-x c".
15119
15120 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15121
15122         * remote.c (remote_can_async_p): Update comment.
15123
15124 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15125
15126         * linux-nat.c (linux_nat_can_async_p): Update comment.
15127
15128 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15129
15130         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15131
15132 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15133
15134         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15135
15136 2017-01-10  Tom Tromey  <tom@tromey.com>
15137
15138         * python/py-type.c (typy_legacy_template_argument): Update.
15139         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15140         ~demangle_parse_info): Declare new members.
15141         (cp_demangled_name_to_comp): Return unique_ptr.
15142         (cp_demangled_name_parse_free)
15143         (make_cleanup_cp_demangled_name_parse_free)
15144         (cp_new_demangle_parse_info): Remove.
15145         * cp-support.c (do_demangled_name_parse_free_cleanup)
15146         (make_cleanup_cp_demangled_name_parse_free): Remove.
15147         (inspect_type, cp_canonicalize_string_full)
15148         (cp_canonicalize_string): Update.
15149         (mangled_name_to_comp): Change return type.
15150         (cp_class_name_from_physname, method_name_from_physname)
15151         (cp_func_name, cp_remove_params): Update.
15152         * cp-name-parser.y (demangle_parse_info): New constructor, from
15153         cp_new_demangle_parse_info.
15154         (~demangle_parse_info): New destructor, from
15155         cp_demangled_name_parse_free.
15156         (cp_merge_demangle_parse_infos): Update.
15157         (cp_demangled_name_to_comp): Change return type.
15158
15159 2017-01-10  Tom Tromey  <tom@tromey.com>
15160
15161         * top.c (prevent_dont_repeat): Change return type.
15162         * python/python.c (execute_gdb_command): Use std::string.
15163         Update.
15164         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15165         * command.h (prevent_dont_repeat): Change return type.
15166         * breakpoint.c (bpstat_do_actions_1): Update.
15167
15168 2017-01-10  Tom Tromey  <tom@tromey.com>
15169
15170         * value.h (scoped_value_mark::~scoped_value_mark): Call
15171         free_to_mark.
15172         (scoped_value_mark::free_to_mark): New method.
15173         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15174         scoped_value_mark.
15175
15176 2017-01-10  Tom Tromey  <tom@tromey.com>
15177
15178         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15179         (valpy_reference_value, valpy_const_value, valpy_get_address)
15180         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15181         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15182         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15183         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15184         scoped_value_mark.
15185         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15186         * value.h (scoped_value_mark): New class.
15187
15188 2017-01-10  Tom Tromey  <tom@tromey.com>
15189
15190         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15191         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15192         * psymtab.c (discard_psymtabs_upto): Remove.
15193         (make_cleanup_discard_psymtabs): Remove.
15194         (struct psymtab_state): Remove.
15195
15196 2017-01-10  Tom Tromey  <tom@tromey.com>
15197
15198         * record-full.c (record_full_save_cleanups): Remove.
15199         (record_full_save): Use gdb::unlinker.
15200         * gcore.c (do_bfd_delete_cleanup): Remove.
15201         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15202         cleanups.
15203         * dwarf2read.c (unlink_if_set): Remove.
15204         (write_psymtabs_to_index): Use gdb::unlinker.
15205         * common/gdb_unlinker.h: New file.
15206
15207 2017-01-10  Tom Tromey  <tom@tromey.com>
15208
15209         * windows-tdep.c (windows_xfer_shared_library): Update.
15210         * windows-nat.c (windows_make_so): Update.
15211         * utils.h (make_cleanup_bfd_unref): Remove.
15212         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15213         * symfile.h (symfile_bfd_open)
15214         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15215         * symfile.c (read_symbols, symbol_file_add)
15216         (separate_debug_file_exists): Update.
15217         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15218         (generic_load, reread_symbols): Update.
15219         * symfile-mem.c (symbol_file_add_from_memory): Update.
15220         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15221         (spu_symbol_file_add_from_memory): Update.
15222         * solist.h (struct target_so_ops) <bfd_open>: Return
15223         gdb_bfd_ref_ptr.
15224         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15225         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15226         gdb_bfd_ref_ptr.
15227         (solib_map_sections, reload_shared_libraries_1): Update.
15228         * solib-svr4.c (enable_break): Update.
15229         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15230         * solib-frv.c (enable_break2): Update.
15231         * solib-dsbt.c (enable_break): Update.
15232         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15233         gdb_bfd_ref_ptr.
15234         (darwin_solib_get_all_image_info_addr_at_init): Update.
15235         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15236         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15237         * record-full.c (record_full_save): Update.
15238         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15239         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15240         * minidebug.c (find_separate_debug_file_in_section): Return
15241         gdb_bfd_ref_ptr.
15242         * machoread.c (macho_add_oso_symfile): Change abfd to
15243         gdb_bfd_ref_ptr.
15244         (macho_symfile_read_all_oso): Update.
15245         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15246         (macho_symfile_read): Update.
15247         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15248         (jit_bfd_try_read_symtab): Update.
15249         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15250         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15251         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15252         gdb_bfd_ref_ptr.
15253         (gdb_bfd_ref_policy): New struct.
15254         (gdb_bfd_ref_ptr): New typedef.
15255         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15256         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15257         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15258         gdb_bfd_ref_ptr.
15259         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15260         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15261         (gcore_command): Update.
15262         * exec.c (exec_file_attach): Update.
15263         * elfread.c (elf_symfile_read): Update.
15264         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15265         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15266         (open_and_init_dwo_file): Update.
15267         (open_dwp_file): Return gdb_bfd_ref_ptr.
15268         (open_and_init_dwp_file): Update.
15269         * corelow.c (core_open): Update.
15270         * compile/compile-object-load.c (compile_object_load): Update.
15271         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15272         * coffread.c (coff_symfile_read): Update.
15273         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15274         gdb_bfd_ref_ptr.  Rename.
15275         (dump_bfd_file, restore_command): Update.
15276         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15277         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15278         (find_separate_debug_file_by_buildid): Update.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * common/gdb_ref_ptr.h: New file.
15283         * python/py-ref.h (struct gdbpy_ref_policy): New.
15284         (gdbpy_ref): Now a typedef.
15285
15286 2017-01-10  Tom Tromey  <tom@tromey.com>
15287
15288         * utils.h (make_cleanup_htab_delete): Don't declare.
15289         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15290         Remove.
15291         * linespec.c (decode_compound_collector): Add constructor,
15292         destructor.
15293         (lookup_prefix_sym): Remove cleanup.
15294         (symtab_collector): Add constructor, destructor.
15295         (collect_symtabs_from_filename): Remove cleanup.
15296         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15297         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15298         Use htab_up.
15299         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15300         * dwarf2read.c (dw2_expand_symtabs_matching)
15301         (dw2_map_symbol_filenames, dwarf_decode_macros)
15302         (write_psymtabs_to_index): Use htab_up.
15303         * dwarf2loc.c (func_verify_no_selftailcall)
15304         (call_site_find_chain_1, func_verify_no_selftailcall)
15305         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15306         std::vector, gdb::unique_xmalloc_ptr.
15307         (call_sitep): Remove typedef.
15308         (dwarf2_locexpr_baton_eval): Remove unused variable.
15309
15310 2017-01-10  Tom Tromey  <tom@tromey.com>
15311
15312         * python/python-internal.h (make_cleanup_py_decref)
15313         (make_cleanup_py_xdecref): Don't declare.
15314         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15315         (py_xdecref, make_cleanup_py_xdecref): Remove.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15320         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15325
15326 2017-01-10  Tom Tromey  <tom@tromey.com>
15327
15328         * python/py-utils.c (unicode_to_encoded_string)
15329         (python_string_to_target_string)
15330         (python_string_to_target_python_string)
15331         (python_string_to_host_string, gdbpy_obj_to_string)
15332         (get_addr_from_python): Use gdbpy_ref.
15333
15334 2017-01-10  Tom Tromey  <tom@tromey.com>
15335
15336         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15337         gdbpy_ref.
15338
15339 2017-01-10  Tom Tromey  <tom@tromey.com>
15340
15341         * python/python.c (eval_python_command, gdbpy_decode_line)
15342         (gdbpy_run_events, gdbpy_start_type_printers)
15343         (gdbpy_apply_type_printers): Use gdbpy_ref.
15344
15345 2017-01-10  Tom Tromey  <tom@tromey.com>
15346
15347         * python/py-param.c (get_doc_string, compute_enum_values): Use
15348         gdbpy_ref.
15349
15350 2017-01-10  Tom Tromey  <tom@tromey.com>
15351
15352         * python/py-inferior.c (find_thread_object, build_inferior_list):
15353         Use gdbpy_ref.
15354
15355 2017-01-10  Tom Tromey  <tom@tromey.com>
15356
15357         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15358
15359 2017-01-10  Tom Tromey  <tom@tromey.com>
15360
15361         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15362         gdbpy_ref.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15367         extra incref.
15368         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15369         Use gdbpy_ref.
15370
15371 2017-01-10  Tom Tromey  <tom@tromey.com>
15372
15373         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15374         gdbpy_ref.
15375
15376 2017-01-10  Tom Tromey  <tom@tromey.com>
15377
15378         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15379         decref results of PyArg_ParseTupleAndKeywords.
15380
15381 2017-01-10  Tom Tromey  <tom@tromey.com>
15382
15383         * python/python.c (python_run_simple_file): Use
15384         unique_xmalloc_ptr, gdbpy_ref.
15385
15386 2017-01-10  Tom Tromey  <tom@tromey.com>
15387
15388         * python/py-prettyprint.c (print_stack_unless_memory_error)
15389         (print_string_repr, print_children): Use gdbpy_ref.
15390         (dummy_python_frame): New class.
15391         (dummy_python_frame::dummy_python_frame): Rename from
15392         push_dummy_python_frame.
15393         (py_restore_tstate): Remove.
15394
15395 2017-01-10  Tom Tromey  <tom@tromey.com>
15396
15397         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15398
15399 2017-01-10  Tom Tromey  <tom@tromey.com>
15400
15401         * python/python.c (ensure_python_env, restore_python_env):
15402         Remove.
15403         * python/python-internal.h (ensure_python_env): Don't declare.
15404         * varobj.h (varobj_ensure_python_env): Don't declare.
15405         * varobj.c (varobj_ensure_python_env): Remove.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * varobj.c (varobj_value_get_print_value): Use
15410         gdbpy_enter_varobj.
15411
15412 2017-01-10  Tom Tromey  <tom@tromey.com>
15413
15414         * python/py-prettyprint.c (print_string_repr, print_children):
15415         Update.
15416         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15417         of "encoding".
15418         * varobj.c (varobj_value_get_print_value): Update.
15419         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * varobj.c (varobj_get_display_hint)
15424         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15425         (varobj_set_visualizer, free_variable): Use
15426         gdbpy_enter_varobj.
15427
15428 2017-01-10  Tom Tromey  <tom@tromey.com>
15429
15430         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15431         (do_finish_initialization): New function.  Use gdbpy_ref.
15432         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15433         do_finish_initialization.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-param.c (get_set_value, get_show_value): Use
15438         gdbpy_enter, gdbpy_ref.
15439
15440 2017-01-10  Tom Tromey  <tom@tromey.com>
15441
15442         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15447
15448 2017-01-10  Tom Tromey  <tom@tromey.com>
15449
15450         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15451         Use gdbpy_enter_varobj.
15452
15453 2017-01-10  Tom Tromey  <tom@tromey.com>
15454
15455         * varobj.c (gdbpy_enter_varobj): New constructor.
15456         * python/python-internal.h (gdbpy_enter_varobj): New class.
15457         * python/py-varobj.c (py_varobj_get_iterator): Use
15458         gdbpy_enter_varobj.
15459
15460 2017-01-10  Tom Tromey  <tom@tromey.com>
15461
15462         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15463         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15464         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15465         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15466         unique_xmalloc_ptr.
15467         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-xmethods.c (invoke_match_method): Use
15472         gdbpy_ref.
15473
15474 2017-01-10  Tom Tromey  <tom@tromey.com>
15475
15476         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15477         gdbpy_enter, gdbpy_ref.
15478
15479 2017-01-10  Tom Tromey  <tom@tromey.com>
15480
15481         * python/python.c (python_interactive_command): Use gdbpy_enter.
15482
15483 2017-01-10  Tom Tromey  <tom@tromey.com>
15484
15485         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15486         gdbpy_ref.
15487
15488 2017-01-10  Tom Tromey  <tom@tromey.com>
15489
15490         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15491         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15492
15493 2017-01-10  Tom Tromey  <tom@tromey.com>
15494
15495         * utils.h (htab_deleter): New struct.
15496         (htab_up): New typedef.
15497         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15498         gdbpy_enter, gdbpy_ref, htab_up.
15499
15500 2017-01-10  Tom Tromey  <tom@tromey.com>
15501
15502         * python/py-unwind.c (pending_frame_invalidate): Remove.
15503         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15504
15505 2017-01-10  Tom Tromey  <tom@tromey.com>
15506
15507         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15508         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15509
15510 2017-01-10  Tom Tromey  <tom@tromey.com>
15511
15512         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15513
15514 2017-01-10  Tom Tromey  <tom@tromey.com>
15515
15516         * python/python.c (gdbpy_eval_from_control_command)
15517         (gdbpy_source_script, gdbpy_run_events)
15518         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15519         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15520         gdbpy_enter.
15521
15522 2017-01-10  Tom Tromey  <tom@tromey.com>
15523
15524         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15525
15526 2017-01-10  Tom Tromey  <tom@tromey.com>
15527
15528         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15533         (python_on_inferior_call_pre, python_on_inferior_call_post)
15534         (python_on_memory_change, python_on_register_change)
15535         (python_inferior_exit, python_new_objfile, add_thread_object)
15536         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15537
15538 2017-01-10  Tom Tromey  <tom@tromey.com>
15539
15540         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15541         (bpfinishpy_handle_exit): Use gdbpy_enter.
15542
15543 2017-01-10  Tom Tromey  <tom@tromey.com>
15544
15545         * python/py-cmd.c (cmdpy_destroyer)
15546         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15547         gdbpy_enter.
15548
15549 2017-01-10  Tom Tromey  <tom@tromey.com>
15550
15551         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15552         gdbpy_enter.
15553         (gdbpy_breakpoint_has_cond): Likewise.
15554
15555 2017-01-10  Tom Tromey  <tom@tromey.com>
15556
15557         * python/python.c (gdbpy_enter): New constructor.
15558         (~gdbpy_enter): New destructor.
15559         (restore_python_env, ensure_python_env): Rewrite.
15560         * python/python-internal.h (gdbpy_enter): New class.
15561
15562 2017-01-10  Tom Tromey  <tom@tromey.com>
15563
15564         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15565
15566 2017-01-10  Tom Tromey  <tom@tromey.com>
15567
15568         * python/py-value.c (value_has_field, get_field_flag)
15569         (get_field_type, valpy_getitem, convert_value_from_python): Use
15570         gdbpy_ref.
15571
15572 2017-01-10  Tom Tromey  <tom@tromey.com>
15573
15574         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15575         gdbpy_ref.
15576
15577 2017-01-10  Tom Tromey  <tom@tromey.com>
15578
15579         * python/py-prettyprint.c (search_pp_list)
15580         (find_pretty_printer_from_objfiles)
15581         (find_pretty_printer_from_progspace)
15582         (find_pretty_printer_from_gdb, find_pretty_printer)
15583         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15584         gdbpy_ref.
15585
15586 2017-01-10  Tom Tromey  <tom@tromey.com>
15587
15588         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15589
15590 2017-01-10  Tom Tromey  <tom@tromey.com>
15591
15592         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15593         (ltpy_get_all_source_lines): Use gdbpy_ref.
15594
15595 2017-01-10  Tom Tromey  <tom@tromey.com>
15596
15597         * python/py-framefilter.c (extract_sym, extract_value)
15598         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15599         gdbpy_ref.
15600
15601 2017-01-10  Tom Tromey  <tom@tromey.com>
15602
15603         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15604
15605 2017-01-10  Tom Tromey  <tom@tromey.com>
15606
15607         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15608
15609 2017-01-10  Tom Tromey  <tom@tromey.com>
15610
15611         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15612         gdbpy_ref.
15613
15614 2017-01-10  Tom Tromey  <tom@tromey.com>
15615
15616         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15617
15618 2017-01-10  Tom Tromey  <tom@tromey.com>
15619
15620         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15621         (typy_range): Use gdbpy_ref.
15622
15623 2017-01-10  Tom Tromey  <tom@tromey.com>
15624
15625         * python/py-threadevent.c (create_thread_event_object): Use
15626         gdbpy_ref.
15627         * python/py-stopevent.c (create_stop_event_object): Simplify.
15628         (emit_stop_event): Use gdbpy_ref.
15629         * python/py-signalevent.c (create_signal_event_object): Use
15630         gdbpy_ref.
15631         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15632         (emit_new_objfile_event, create_clear_objfiles_event_object)
15633         (emit_clear_objfiles_event): Use gdbpy_ref.
15634         * python/py-infevents.c (create_inferior_call_event_object)
15635         (create_register_changed_event_object)
15636         (create_memory_changed_event_object, emit_inferior_call_event)
15637         (emit_memory_changed_event, emit_register_changed_event): Use
15638         gdbpy_ref.
15639         * python/py-exitedevent.c (create_exited_event_object)
15640         (emit_exited_event): Use gdbpy_ref.
15641         * python/py-event.h (evpy_emit_event): Remove
15642         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15643         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15644         * python/py-continueevent.c (emit_continue_event): Use
15645         gdbpy_ref.
15646         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15647         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15648         gdbpy_ref.
15649         * python/py-bpevent.c (create_breakpoint_event_object): Use
15650         gdbpy_ref.
15651
15652 2017-01-10  Tom Tromey  <tom@tromey.com>
15653
15654         * python/py-ref.h: New file.
15655
15656 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15657
15658         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15659         void.
15660         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15661         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15662         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15663         * ui-out.c (ui_out::redirect): Likewise.
15664         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15665         * cli/cli-logging.c (set_logging_redirect): Update call site of
15666         ui_out::redirect.
15667         (handle_redirections): Likewise.
15668         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15669         * top.c (execute_command_to_string): Likewise.
15670         * utils.c (do_ui_out_redirect_pop): Likewise.
15671
15672 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15673
15674         * stack.c (_initialize_stack): Update "frame" command help message.
15675
15676 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15677
15678         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15679
15680 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15681
15682         * x86-linux-nat.h: Include gdb_proc_service.h.
15683
15684 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15685
15686         * ser-base.h: Include serial.h.
15687
15688 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15689
15690         * ppc-linux-tdep.h: Include ppc-tdep.h.
15691
15692 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15693
15694         * nat/amd64-linux-siginfo.h: Include signal.h.
15695
15696 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15697
15698         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15699
15700 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15701
15702         * mi/mi-parse.h: Include mi-cmds.h.
15703
15704 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15705
15706         * inf-loop.c: Don't include "target.h".
15707         * inf-loop.h: Include it here.
15708
15709 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15710
15711         * dfp.h: Include "dboulest.h" and "expression.h".
15712
15713 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15714
15715         * ax-gdb.h: Include "ax.h".
15716
15717 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15718
15719         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15720         with nat/gdb_ptrace.h.
15721
15722 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15723
15724         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15725         new line.
15726         (mips64_fbsd_sigframe_init): Likewise.
15727
15728 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15729
15730         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15731         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15732
15733 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15734
15735         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15736         * NEWS: Mention new FreeBSD/mips native configuration.
15737         * config/mips/fbsd.mh: New file.
15738         * configure.host: Add mips*-*-freebsd*.
15739         * mips-fbsd-nat.c: New file.
15740
15741 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15742
15743         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15744         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15745         * NEWS: Mention new FreeBSD/mips target.
15746         * configure.tgt: Add mips*-*-freebsd*.
15747         * mips-fbsd-tdep.c: New file.
15748         * mips-fbsd-tdep.h: New file.
15749
15750 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15751
15752         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15753         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15754
15755 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15756
15757         Update copyright year range in all GDB files.
15758
15759 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15760
15761         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15762
15763 For older changes see ChangeLog-2016.
15764 \f
15765 Local Variables:
15766 mode: change-log
15767 left-margin: 8
15768 fill-column: 74
15769 version-control: never
15770 coding: utf-8
15771 End: