Fix swallowed "Quit" when inserting breakpoints
[external/binutils.git] / gdb / ChangeLog
1 2017-11-16  Pedro Alves  <palves@redhat.com>
2
3         * breakpoint.c (insert_bp_location): Replace bp_err and
4         bp_err_message locals by a gdb_exception local.
5
6 2017-11-16  Pedro Alves  <palves@redhat.com>
7
8         * inflow.c (scoped_ignore_sigttou): New class.
9         (child_terminal_ours_1, new_tty): Use it.
10
11 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
12
13         * target-float.c (decimal_from_number): Add byte_order argument and
14         call match_endianness.  Error if unknown floating-point type.
15         (decimal_to_number): Add byte_order argument and call match_endianness.
16         (decimal_from_longest): Update call.  Do not call match_endianness.
17         (decimal_from_ulongest): Likewise.
18         (decimal_binop): Likewise.
19         (decimal_is_zero): Likewise.
20         (decimal_compare): Likewise.
21         (decimal_convert): Likewise.
22
23 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
24
25         * python/python.c (gdbpy_rbreak): New function.
26         * NEWS: Document Python rbreak feature.
27
28 2017-11-16  Yao Qi  <yao.qi@linaro.org>
29
30         * features/tic6x-c62x.xml: Remove.
31         * features/tic6x-c64x.xml: Remove.
32         * features/tic6x-c64xp.xml: Remove.
33
34 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
35
36         * symtab.h: Include <array>.
37
38 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
39
40         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
41         (bsd_kvm_proc_cmd): Likewise.
42
43 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
44
45         * tui/tui-win.c (window_name_completer): Replace VEC with
46         std::vector.
47
48 2017-11-15  Andrew Cagney  <cagney@gnu.org>
49
50         * MAINTAINERS: Remove no-longer applicable entries.
51
52 2017-11-15  Andrew Cagney  <cagney@gnu.org>
53
54         * MAINTAINERS: Move self to Past Maintainers.
55
56 2017-11-15  Yao Qi  <yao.qi@linaro.org>
57
58         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
59         * features/nios2-linux.c: Remove.
60         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
61         initialize_tdesc_nios2_linux.
62
63 2017-11-15  Yao Qi  <yao.qi@linaro.org>
64
65         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
66         M68HC11_LAST_HARD_REG + 1.
67
68 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
69
70         PR gdb/22388
71         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
72         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
73         Return TARGET_XFER_EOF if size of returned data is 0.
74
75 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
76
77         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
78         memory-map-selftests.c.
79         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
80         * memory-map.c (memory_map_start_memory): Fix computation of hi
81         address.
82         * unittests/memory-map-selftests.c: New file.
83
84 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
85
86         * ada-lang.c: Fix some typos in the general command documenting
87         how Ada expressions are being evaluated and how their result
88         is printed.
89
90 2017-11-09  Tom Tromey  <tom@tromey.com>
91
92         * psymtab.c (psymbol_hash): Do not hash string contents.
93         (psymbol_compare): Add comment.
94
95 2017-11-09  Tom Tromey  <tom@tromey.com>
96
97         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
98
99 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
100
101         * ada-exp.y (write_var_from_sym): Remove parameter
102         "orig_left_context".  Update all callers.
103
104 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
105
106         * tracepoint.h (class collection_list) <stringify>: Return
107         std::vector<std::string>.
108         (encode_actions_rsp): Change parameters to
109         std::vector<std::string> *.
110         * tracepoint.c (collection_list::stringify): Return
111         std::vector<std::string> and adjust accordingly.
112         (encode_actions_rsp): Changee parameters to
113         std::vector<std::string> and adjust accordingly.
114         * remote.c (free_actions_list),
115         free_actions_list_cleanup_wrapper): Remove.
116         (remote_download_tracepoint): Adjust to std::vector.
117
118 2017-11-08  Tom Tromey  <tom@tromey.com>
119
120         * dwarf2read.c (symbolp): Remove typedef.
121         (read_func_scope): Use std::vector.
122         (process_structure_scope): Use std::vector.
123
124 2017-11-08  Pedro Alves  <palves@redhat.com>
125
126         * ada-lang.c (ada_make_symbol_completion_list): Use
127         completion_skip_symbol.
128         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
129         (symbol_is_function_or_method(symbol*)): New.
130         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
131         completion_skip_symbol.
132         (default_collect_symbol_completion_matches_break_on): Use
133         completion_skip_symbol.  Pass down mode.
134         (collect_file_symbol_completion_matches): Pass down mode.
135         * symtab.h (symbol_is_function_or_method): New declarations.
136         (completion_skip_symbol): New template function.
137
138 2017-11-08  Pedro Alves  <palves@redhat.com>
139
140         * linespec.c (iterate_over_all_matching_symtabs): Add
141         search_domain parameter.  Pass it down to expand_symtabs_matching.
142         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
143         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
144         search_domain.
145         (add_all_symbol_names_from_pspace): Add search_domain parameter.
146         Pass it down.
147         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
148         symbols.
149         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
150         it down.
151
152 2017-11-08  Pedro Alves  <palves@redhat.com>
153
154         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
155         text_len locals and don't pass them down.
156         * symtab.c (completion_list_add_name): Remove
157         sym_text/sym_text_len parameters and adjust.
158         (completion_list_add_symbol, completion_list_add_msymbol)
159         (completion_list_objc_symbol, completion_list_add_fields)
160         (add_symtab_completions): Likewise.
161         (default_collect_symbol_completion_matches_break_on)
162         (collect_file_symbol_completion_matches): Remove sym_text_len
163         local and don't pass it down.
164         * symtab.h (completion_list_add_name): Remove
165         sym_text/sym_text_len parameters.
166
167 2017-11-08  Pedro Alves  <palves@redhat.com>
168
169         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
170         unittests/lookup_name_info-selftests.c.
171         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
172         * cp-support.c: Include "selftest.h".
173         (cp_remove_params_1): Rename from cp_remove_params.  Add
174         'require_param' parameter, and handle it.
175         (cp_remove_params): Reimplement.
176         (cp_remove_params_if_any): New.
177         (selftests::quote): New.
178         (selftests::check_remove_params): New.
179         (selftests::test_cp_remove_params): New.
180         (_initialize_cp_support): Install
181         selftests::test_cp_remove_params.
182         * cp-support.h (cp_remove_params_if_any): Declare.
183         * dwarf2read.c :Include "selftest.h".
184         (dw2_expand_symtabs_matching_symbol): Use
185         lookup_name_info::make_ignore_params.
186         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
187         (selftests::dw2_expand_symtabs_matching::string_or_null)
188         (selftests::dw2_expand_symtabs_matching::check_match)
189         (selftests::dw2_expand_symtabs_matching::test_symbols)
190         (selftests::dw2_expand_symtabs_matching::run_test): New.
191         (_initialize_dwarf2_read): Register
192         selftests::dw2_expand_symtabs_matching::run_test.
193         * psymtab.c (psym_expand_symtabs_matching): Use
194         lookup_name_info::make_ignore_params.
195         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
196         If the lookup name wants to ignore parameters, strip them.
197         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
198         code handling '('.
199         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
200         (default_collect_symbol_completion_matches_break_on): Don't try to
201         strip parameters.
202         * symtab.h (lookup_name_info::lookup_name_info): Add
203         'ignore_parameters' parameter.
204         (lookup_name_info::ignore_parameters)
205         (lookup_name_info::make_ignore_params): New methods.
206         (lookup_name_info::m_ignore_parameters): New field.
207         * unittests/lookup_name_info-selftests.c: New file.
208
209 2017-11-08  Pedro Alves  <palves@redhat.com>
210
211         * dwarf2read.c (dw2_expand_marked_cus)
212         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
213         (dw2_expand_symtabs_matching): Move further below.
214         (dw2_expand_marked_cus): Reindent.
215
216 2017-11-08  Pedro Alves  <palves@redhat.com>
217
218         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
219         (struct name_component): New.
220         (mapped_index::name_components): New field.
221         (mapped_index::symbol_name_at): New method.
222         (dwarf2_read_index): Call mapped_index ctor.
223         (dw2_map_matching_symbols): Add comment about name_components
224         table.
225         (dw2_expand_symtabs_matching): Factor part to...
226         (dw2_expand_symtabs_matching_symbol): ... this new function.
227         Build name components table, and lookup symbols in it before
228         calling the name matcher.
229         (dw2_expand_marked_cus): New, factored out from
230         dw2_expand_symtabs_matching.
231         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
232
233 2017-11-08   Pedro Alves  <palves@redhat.com>
234
235         * ada-lang.c (ada_encode): Rename to ..
236         (ada_encode_1): ... this.  Add throw_errors parameter and handle
237         it.
238         (ada_encode): Reimplement.
239         (match_name): Delete, folded into full_name.
240         (resolve_subexp): No longer pass the encoded name to
241         ada_lookup_symbol_list.
242         (should_use_wild_match): Delete.
243         (name_match_type_from_name): New.
244         (ada_lookup_simple_minsym): Use lookup_name_info and the
245         language's symbol_name_matcher_ftype.
246         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
247         (ada_add_block_renamings): Adjust to use lookup_name_info.
248         (ada_lookup_name): New.
249         (add_nonlocal_symbols, ada_add_all_symbols)
250         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
251         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
252         (ada_name_for_lookup): Delete.
253         (ada_lookup_encoded_symbol): Construct a verbatim name.
254         (wild_match): Reverse sense of return type.  Use bool.
255         (full_match): Reverse sense of return type.  Inline bits of old
256         match_name here.
257         (ada_add_block_symbols): Adjust to use lookup_name_info.
258         (symbol_completion_match): Delete, folded into...
259         (ada_lookup_name_info::matches): ... .this new method.
260         (symbol_completion_add): Delete.
261         (ada_collect_symbol_completion_matches): Add name_match_type
262         parameter.  Adjust to use lookup_name_info and
263         completion_list_add_name.
264         (get_var_value, ada_add_global_exceptions): Adjust to use
265         lookup_name_info.
266         (ada_get_symbol_name_cmp): Delete.
267         (do_wild_match, do_full_match): New functions.
268         (ada_lookup_name_info::ada_lookup_name_info): New method.
269         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
270         functions.
271         (ada_language_defn): Install ada_get_symbol_name_matcher.
272         * ada-lex.l (processId): If name starts with '<', copy it
273         verbatim.
274         * block.c (block_iter_match_step, block_iter_match_first)
275         (block_iter_match_next, block_lookup_symbol)
276         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
277         lookup_name_info.
278         * block.h (block_iter_match_first, block_iter_match_next)
279         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
280         * c-lang.c (c_language_defn, cplus_language_defn)
281         (asm_language_defn, minimal_language_defn): Adjust comments to
282         refer to la_get_symbol_name_matcher.
283         * completer.c (complete_files_symbols)
284         (collect_explicit_location_matches, symbol_completer): Pass a
285         symbol_name_match_type down.
286         * completer.h (class completion_match, completion_match_result):
287         New classes.
288         (completion_tracker::reset_completion_match_result): New method.
289         (completion_tracker::m_completion_match_result): New field.
290         * cp-support.c (make_symbol_overload_list_block): Adjust to use
291         lookup_name_info.
292         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
293         functions.
294         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
295         * d-lang.c: Adjust comments to refer to
296         la_get_symbol_name_matcher.
297         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
298         Adjust to use lookup_name_info.
299         (dict_iter_match_first, dict_iter_match_next)
300         (iter_match_first_hashed, iter_match_next_hashed)
301         (iter_match_first_linear, iter_match_next_linear): Adjust to work
302         with a lookup_name_info.
303         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
304         Likewise.
305         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
306         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
307         (gdb_index_symbol_name_matcher): New class.
308         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
309         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
310         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
311         with a symbol_name_match_type.
312         (f_language_defn): Adjust comments to refer to
313         la_get_symbol_name_matcher.
314         * go-lang.c (go_language_defn): Adjust comments to refer to
315         la_get_symbol_name_matcher.
316         * language.c (default_symbol_name_matcher)
317         (language_get_symbol_name_matcher): New functions.
318         (unknown_language_defn, auto_language_defn): Adjust comments to
319         refer to la_get_symbol_name_matcher.
320         * language.h (symbol_name_cmp_ftype): Delete.
321         (language_defn) <la_collect_symbol_completion_matches>: Add match
322         type parameter.
323         <la_get_symbol_name_cmp>: Delete field.
324         <la_get_symbol_name_matcher>: New field.
325         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
326         (default_symbol_name_matcher, language_get_symbol_name_matcher):
327         Declare.
328         * linespec.c (iterate_over_all_matching_symtabs)
329         (iterate_over_file_blocks): Adjust to use lookup_name_info.
330         (find_methods): Add language parameter, and use lookup_name_info
331         and the language's symbol_name_matcher_ftype.
332         (linespec_complete_function): Adjust.
333         (lookup_prefix_sym): Use lookup_name_info.
334         (add_all_symbol_names_from_pspace): Adjust.
335         (find_superclass_methods): Add language parameter and pass it
336         down.
337         (find_method): Pass symbol language down.
338         (find_linespec_symbols): Don't demangle or Ada encode here.
339         (search_minsyms_for_name): Add lookup_name_info parameter.
340         (add_matching_symbols_to_info): Add name_match_type parameter.
341         Use lookup_name_info.
342         * m2-lang.c (m2_language_defn): Adjust comments to refer to
343         la_get_symbol_name_matcher.
344         * minsyms.c: Include <algorithm>.
345         (add_minsym_to_demangled_hash_table): Remove table parameter and
346         add objfile parameter.  Use search_name_hash, and add language to
347         demangled languages vector.
348         (struct found_minimal_symbols): New struct.
349         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
350         New functions.
351         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
352         input names here.  Use lookup_name_info instead.  Lookup up
353         demangled names once for each language in the demangled names
354         vector.
355         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
356         demangled names once for each language in the demangled names
357         vector.
358         (build_minimal_symbol_hash_tables): Adjust.
359         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
360         lookup_name_info.
361         * objc-lang.c (objc_language_defn): Adjust comment to refer to
362         la_get_symbol_name_matcher.
363         * objfiles.h: Include <vector>.
364         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
365         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
366         la_get_symbol_name_matcher.
367         * p-lang.c (pascal_language_defn): Adjust comment to refer to
368         la_get_symbol_name_matcher.
369         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
370         (match_partial_symbol): Use symbol_name_match_type,
371         lookup_name_info and psymbol_name_matches.
372         (lookup_partial_symbol): Use lookup_name_info.
373         (map_block): Use symbol_name_match_type and lookup_name_info.
374         (psym_map_matching_symbols): Use symbol_name_match_type.
375         (psymbol_name_matches): New.
376         (recursively_search_psymtabs): Use lookup_name_info and
377         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
378         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
379         'kind' parameter to 'domain'.
380         * rust-lang.c (rust_language_defn): Adjust comment to refer to
381         la_get_symbol_name_matcher.
382         * symfile-debug.c (debug_qf_map_matching_symbols)
383         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
384         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
385         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
386         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
387         Adjust to use symbol_name_match_type.
388         <expand_symtabs_matching>: Adjust to use lookup_name_info.
389         (expand_symtabs_matching): Adjust to use lookup_name_info.
390         * symmisc.c (maintenance_expand_symtabs): Use
391         lookup_name_info::match_any ().
392         * symtab.c (symbol_matches_search_name): New.
393         (eq_symbol_entry): Adjust to use lookup_name_info and the
394         language's matcher.
395         (demangle_for_lookup_info::demangle_for_lookup_info): New.
396         (lookup_name_info::match_any): New.
397         (iterate_over_symbols, search_symbols): Use lookup_name_info.
398         (compare_symbol_name): Add language, lookup_name_info and
399         completion_match_result parameters, and use them.
400         (completion_list_add_name): Make extern.  Add language and
401         lookup_name_info parameters.  Use them.
402         (completion_list_add_symbol, completion_list_add_msymbol)
403         (completion_list_objc_symbol): Add lookup_name_info parameters and
404         adjust.  Pass down language.
405         (completion_list_add_fields): Add lookup_name_info parameters and
406         adjust.  Pass down language.
407         (add_symtab_completions): Add lookup_name_info parameters and
408         adjust.
409         (default_collect_symbol_completion_matches_break_on): Add
410         name_match_type parameter, and use it.  Use lookup_name_info.
411         (default_collect_symbol_completion_matches)
412         (collect_symbol_completion_matches): Add name_match_type
413         parameter, and pass it down.
414         (collect_symbol_completion_matches_type): Adjust.
415         (collect_file_symbol_completion_matches): Add name_match_type
416         parameter, and use lookup_name_info.
417         * symtab.h: Include <string> and "common/gdb_optional.h".
418         (enum class symbol_name_match_type): New.
419         (class ada_lookup_name_info): New.
420         (struct demangle_for_lookup_info): New.
421         (class lookup_name_info): New.
422         (symbol_name_matcher_ftype): New.
423         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
424         (symbol_matches_search_name): Declare.
425         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
426         (default_collect_symbol_completion_matches)
427         (collect_symbol_completion_matches)
428         (collect_file_symbol_completion_matches): Add name_match_type
429         parameter.
430         (iterate_over_symbols): Use lookup_name_info.
431         (completion_list_add_name): Declare.
432         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
433         (strncmp_iw_with_mode): Now extern.
434         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
435         (strncmp_iw_with_mode): Declare.
436
437 2017-11-08  Keith Seitz  <keiths@redhat.com>
438             Pedro Alves  <palves@redhat.com>
439
440         * ada-lang.c (ada_language_defn): Install
441         default_search_name_hash.
442         * buildsym.c (struct buildsym_compunit): <language>: New field.
443         (finish_block_internal): Pass language when creating dictionaries.
444         (start_buildsym_compunit, start_symtab): New language parameters.
445         Use them.
446         (restart_symtab): Pass down compilation unit's language.
447         * buildsym.h (enum language): Forward declare.
448         (start_symtab): New 'language' parameter.
449         * c-lang.c (c_language_defn, cplus_language_defn)
450         (asm_language_defn, minimal_language_defn): Install
451         default_search_name_hash.
452         * coffread.c (coff_start_symtab): Adjust.
453         * d-lang.c (d_language_defn): Install default_search_name_hash.
454         * dbxread.c (struct symloc): Add 'pst_language' field.
455         (PST_LANGUAGE): Define.
456         (start_psymtab, read_ofile_symtab): Use it.
457         (process_one_symbol): New 'language' parameter.  Pass it down.
458         * dictionary.c (struct dictionary) <language>: New field.
459         (DICT_LANGUAGE): Define.
460         (dict_create_hashed, dict_create_hashed_expandable)
461         (dict_create_linear, dict_create_linear_expandable): New parameter
462         'language'.  Set the dictionary's language.
463         (iter_match_first_hashed): Adjust to rename.
464         (insert_symbol_hashed): Assert we don't see mismatching
465         languages.  Adjust to rename.
466         (dict_hash): Rename to ...
467         (default_search_name_hash): ... this and make extern.
468         * dictionary.h (struct language_defn): Forward declare.
469         (dict_create_hashed): New parameter 'language'.
470         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
471         * f-lang.c (f_language_defn): Install default_search_name_hash.
472         * go-lang.c (go_language_defn): Install default_search_name_hash.
473         * jit.c (finalize_symtab): Pass compunit's language to dictionary
474         creation.
475         * language.c (unknown_language_defn, auto_language_defn):
476         * language.h (language_defn::la_search_name_hash): New field.
477         (default_search_name_hash): Declare.
478         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
479         * mdebugread.c (new_block): New parameter 'language'.
480         * mdebugread.c (parse_symbol): Pass symbol language to block
481         allocation.
482         (psymtab_to_symtab_1): Pass down language.
483         (new_symtab): Pass compunit's language to block allocation.
484         * objc-lang.c (objc_language_defn): Install
485         default_search_name_hash.
486         * opencl-lang.c (opencl_language_defn):
487         * p-lang.c (pascal_language_defn): Install
488         default_search_name_hash.
489         * rust-lang.c (rust_language_defn): Install
490         default_search_name_hash.
491         * stabsread.h (enum language): Forward declare.
492         (process_one_symbol): Add 'language' parameter.
493         * symtab.c (search_name_hash): New function.
494         * symtab.h (search_name_hash): Declare.
495         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
496
497 2017-11-08  Pedro Alves  <palves@redhat.com>
498
499         * cp-name-parser.y (main): Don't initialize extra_chars.
500
501 2017-11-07  Tom Tromey  <tom@tromey.com>
502
503         * event-top.h (command_handler): Constify.
504         * record-full.c (cmd_record_full_start): Update.
505         * thread.c (thread_apply_all_command): Update.
506         * printcmd.c (eval_command): Update.
507         * mi/mi-main.c (mi_execute_cli_command): Update.
508         (mi_execute_async_cli_command): Update.
509         * tui/tui-stack.c (tui_update_command): Update.
510         * cli/cli-interp.c (safe_execute_command): Constify.
511         * record.c (record_start): Update.
512         (record_start, record_stop, cmd_record_start): Update.
513         * record-btrace.c (cmd_record_btrace_bts_start): Update.
514         (cmd_record_btrace_pt_start): Update.
515         (cmd_record_btrace_start): Update.
516         (cmd_record_btrace_start): Update.
517         * reverse.c (exec_reverse_once): Update.
518         * python/python.c (execute_gdb_command): Don't copy the command.
519         * event-top.c (command_line_handler): Update.
520         (command_handler): Constify.
521         * defs.h (deprecated_call_command_hook): Constify.
522         * cli/cli-script.h (execute_user_command): Constify.
523         * cli/cli-script.c (execute_user_command): Constify.
524         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
525         (enum command_control_type): Update.
526         * main.c (catch_command_errors): Remove non-const overload.
527         (catch_command_errors_ftype): Remove.
528         * python/py-cmd.c (cmdpy_function): Constify.
529         * guile/scm-cmd.c (cmdscm_function): Constify.
530         * cli/cli-dump.c (call_dump_func): Constify.
531         * cli/cli-decode.c (do_const_cfunc): Constify.
532         (do_sfunc): Constify.
533         (cmd_func): Constify.
534         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
535         * top.h (execute_command): Constify.
536         * top.c (execute_command): Constify.
537         (execute_command_to_string): Constify.
538         (deprecated_call_command_hook): Constify.
539         * command.h (cmd_func): Constify.
540         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
541
542 2017-11-07  Tom Tromey  <tom@tromey.com>
543
544         * ada-lang.c (catch_ada_exception_command): Constify.
545         (catch_assert_command): Constify.
546         * break-catch-throw.c (catch_catch_command, catch_throw_command)
547         (catch_rethrow_command): Constify.
548         (catch_exception_command_1): Constify.
549         * breakpoint.h (add_catch_command): Constify.
550         * break-catch-syscall.c (catch_syscall_command_1): Constify.
551         (catch_syscall_split_args): Constify.
552         * break-catch-sig.c (catch_signal_command): Constify.
553         (catch_signal_split_args): Constify.
554         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
555         cmd_const_sfunc_ftype.
556         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
557         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
558         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
559         (add_setshow_string_cmd, struct cmd_list_element)
560         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
561         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
562         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
563         Constify.
564         (set_cmd_sfunc): Constify.
565         (empty_sfunc): Constify.
566         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
567         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
568         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
569         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
570         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
571         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
572         Constify.
573         (set_cmd_sfunc): Constify.
574         (cmd_sfunc_ftype): Remove.
575         * compile/compile.c (set_compile_args): Constify.
576         * infrun.c (set_disable_randomization): Constify.
577         * infcmd.c (set_args_command, set_cwd_command): Constify.
578         * breakpoint.c (set_condition_evaluation_mode): Constify.
579         (add_catch_command): Constify.
580         (catch_fork_command_1, catch_exec_command_1)
581         (catch_load_command_1, catch_unload_command_1): Constify.
582         (catch_load_or_unload): Constify.
583         * guile/scm-param.c (pascm_set_func): Constify.
584         (add_setshow_generic): Constify.
585         * python/py-param.c (get_set_value): Constify.
586         * top.h (set_verbose): Constify.
587         * tui/tui-win.c (tui_set_var_cmd): Constify.
588         * mi/mi-main.c (set_mi_async_command): Constify.
589         * cli/cli-logging.c (set_logging_overwrite)
590         (set_logging_redirect): Constify.
591         * value.c (set_max_value_size): Constify.
592         * valprint.c (set_input_radix, set_output_radix): Constify.
593         * utils.c (set_width_command, set_height_command): Constify.
594         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
595         * tracepoint.c (set_disconnected_tracing)
596         (set_circular_trace_buffer, set_trace_buffer_size)
597         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
598         * top.c (set_history_size_command, set_verbose, set_editing)
599         (set_gdb_datadir, set_history_filename): Constify.
600         * target.c (set_targetdebug, maint_set_target_async_command)
601         (maint_set_target_non_stop_command, set_target_permissions)
602         (set_write_memory_permission): Constify.
603         (open_target): Constify.
604         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
605         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
606         * symtab.c (set_symbol_cache_size_handler): Constify.
607         * symfile.c (set_ext_lang_command): Constify.
608         * symfile-debug.c (set_debug_symfile): Constify.
609         * source.c (set_directories_command): Constify.
610         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
611         * serial.c (set_parity): Constify.
612         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
613         * remote.c (set_remote_exec_file, set_remotebreak)
614         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
615         * record.c (set_record_insn_history_size)
616         (set_record_call_history_size): Constify.
617         * record-full.c (set_record_full_insn_max_num): Constify.
618         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
619         * osabi.c (set_osabi): Constify.
620         * mips-tdep.c (set_mips64_transfers_32bit_regs)
621         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
622         * maint.c (maintenance_set_profile_cmd): Constify.
623         * linux-thread-db.c (set_libthread_db_search_path): Constify.
624         * language.c (set_language_command, set_range_command)
625         (set_case_command): Constify.
626         * infrun.c (set_non_stop, set_observer_mode)
627         (set_stop_on_solib_events, set_schedlock_func)
628         (set_exec_direction_func): Constify.
629         * infcmd.c (set_inferior_tty_command): Constify.
630         * disasm.c (set_disassembler_options_sfunc): Constify.
631         * demangle.c (set_demangling_command): Constify.
632         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
633         * cris-tdep.c (set_cris_version, set_cris_mode)
634         (set_cris_dwarf2_cfi): Constify.
635         * corefile.c (set_gnutarget_command): Constify.
636         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
637         (set_target_wide_charset_sfunc): Constify.
638         * breakpoint.c (update_dprintf_commands): Constify.
639         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
640         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
641         (set_disassembly_style_sfunc): Constify.
642         * arch-utils.c (set_endian, set_architecture): Constify.
643         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
644         * agent.c (set_can_use_agent): Constify.
645
646 2017-11-07  Tom Tromey  <tom@tromey.com>
647
648         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
649         (go32_pde, go32_pte, go32_pte_for_address): Constify.
650         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
651         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
652         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
653         (parse_int_arg, show_thread_default_detach_sc_cmd)
654         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
655         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
656         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
657         (show_task_pause_cmd, set_task_detach_sc_cmd)
658         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
659         (set_noninvasive_cmd, set_thread_pause_cmd)
660         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
661         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
662         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
663         * windows-nat.c (display_selectors): Constify.
664         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
665         non-const "cfunc".
666         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
667         (cmd_cfunc_eq): Likewise.
668         (struct cmd_list_element): Likewise.
669         (do_cfunc): Remove.
670         (cli_user_command_p): Update.
671         * command.h (add_cmd): Remove non-const overload.
672         (cmd_cfunc_ftype): Remove typedef.
673         (cmd_cfunc_eq): Remove non-const overload.
674         * value.c (show_values): Constify.
675         * thread.c (thread_apply_all_command): Constify.
676         * symfile.c (load_command): Constify.
677         * source.c (directory_command): Constify.
678         * maint.c (maintenance_internal_error)
679         (maintenance_demangler_warning, maintenance_space_display)
680         (maintenance_print_architecture, maintenance_translate_address)
681         (maintenance_info_selftests, maintenance_internal_warning):
682         Constify.
683         * breakpoint.c (disable_trace_command, enable_trace_command):
684         Constify.
685         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
686         Constify.
687         (add_auto_load_safe_path): Constify.
688         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
689         * top.h (show_commands): Constify.
690         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
691         * sparc64-tdep.c (adi_examine_command): Constify.
692         (adi_assign_command): Constify.
693
694 2017-11-07  Tom Tromey  <tom@tromey.com>
695
696         * frame.h (info_locals_command, info_args_command): Constify.
697         * auto-load.h (auto_load_info_scripts): Constify.
698         * inferior.h (registers_info): Constify.
699         * copying.c: Rebuild.
700         * copying.awk: Constify generated commands.
701         * auto-load.c (auto_load_info_scripts)
702         (info_auto_load_gdb_scripts): Constify.
703         * cli/cli-decode.c (struct cmd_list_element): Take a
704         cmd_const_cfunc_ftype.
705         * command.h (add_info): Take a cmd_const_cfunc_ftype.
706         * tui/tui-win.c (tui_all_windows_info): Constify.
707         * python/py-auto-load.c (info_auto_load_python_scripts):
708         Constify.
709         * cli/cli-cmds.c (show_command): Remove non-const overload.
710         * tracepoint.c (info_tvariables_command, info_scope_command):
711         Constify.
712         (info_static_tracepoint_markers_command): Constify.
713         * thread.c (info_threads_command): Constify.
714         (print_thread_info_1): Constify.
715         * target.c (info_target_command): Constify.
716         * symtab.c (info_sources_command, info_functions_command)
717         (info_types_command): Constify.
718         (info_variables_command): Remove non-const overload.
719         * symfile.c (info_ext_lang_command): Constify.
720         * stack.c (info_frame_command, info_locals_command)
721         (info_args_command): Constify.
722         (backtrace_command): Remove non-const overload.
723         * source.c (info_source_command, info_line_command): Constify.
724         * solib.c (info_sharedlibrary_command): Constify.
725         * skip.c (info_skip_command): Constify.
726         * ser-go32.c (info_serial_command): Constify.
727         * reverse.c (info_bookmarks_command): Constify.
728         * printcmd.c (info_symbol_command, info_address_command)
729         (info_display_command): Constify.
730         * osdata.c (info_osdata_command): Constify.
731         * objc-lang.c (info_selectors_command, info_classes_command):
732         Constify.
733         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
734         * memattr.c (info_mem_command): Constify.
735         * macrocmd.c (info_macro_command, info_macros_command): Constify.
736         * linux-fork.c (info_checkpoints_command): Constify.
737         * infrun.c (info_signals_command): Constify.
738         * inflow.c (info_terminal_command): Constify.
739         * inferior.c (info_inferiors_command): Constify.
740         (print_inferior): Constify.
741         * infcmd.c (info_program_command, info_all_registers_command)
742         (info_registers_command, info_vector_command)
743         (info_float_command): Constify.
744         (registers_info): Constify.
745         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
746         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
747         Constify.
748         * f-valprint.c (info_common_command): Constify.
749         * dcache.c (info_dcache_command): Constify.
750         (dcache_info_1): Constify.
751         * darwin-nat-info.c (info_mach_tasks_command)
752         (info_mach_task_command, info_mach_ports_command)
753         (info_mach_port_command, info_mach_threads_command)
754         (info_mach_thread_command, info_mach_regions_command)
755         (info_mach_regions_recurse_command, info_mach_region_command)
756         (info_mach_exceptions_command): Constify.
757         (get_task_from_args): Constify.
758         * cp-support.c (info_vtbl_command): Constify.
759         * breakpoint.c (info_watchpoints_command)
760         (info_tracepoints_command): Constify.
761         (info_breakpoints_command): Remove non-const overload.
762         * avr-tdep.c (avr_io_reg_read_command): Constify.
763         * auxv.c (info_auxv_command): Constify.
764         * ada-tasks.c (info_tasks_command): Constify.
765         (info_task): Constify.
766         * ada-lang.c (info_exceptions_command): Constify.
767
768 2017-11-07  Tom Tromey  <tom@tromey.com>
769
770         * solib.h (no_shared_libraries): Constify.
771         * frame.h (return_command): Constify.
772         * cli/cli-cmds.h (quit_command): Constify.
773         * top.h (quit_command, execute_command): Constify.
774         * target.h (flash_erase_command): Constify.
775         * inferior.h (set_inferior_args, attach_command): Constify.
776         * tracepoint.h (start_tracing, stop_tracing): Constify.
777         * breakpoint.h (break_command, tbreak_command)
778         (hbreak_command_wrapper, thbreak_command_wrapper)
779         (rbreak_command_wrapper, watch_command_wrapper)
780         (awatch_command_wrapper, rwatch_command_wrapper)
781         (get_tracepoint_by_number): Constify.
782         * symtab.c (info_variables_command, rbreak_command)
783         (symtab_symbol_info): Constify.
784         (info_variables_command): Add non-const overload.
785         * top.c (dont_repeat_command): Constify.
786         * breakpoint.c (ignore_command, commands_command)
787         (condition_command, tbreak_command, hbreak_command)
788         (thbreak_command, clear_command, break_command)
789         (info_breakpoints_command, watch_command, rwatch_command)
790         (awatch_command, trace_command, ftrace_command, strace_command)
791         (trace_pass_command, break_range_command, dprintf_command)
792         (agent_printf_command, get_tracepoint_by_number)
793         (watch_maybe_just_location, trace_pass_command): Constify.
794         (info_breakpoints_command): Add non-const overload.
795         * tracefile.c (tsave_command): Constify.
796         * infcmd.c (attach_command, disconnect_command, signal_command)
797         (queue_signal_command, stepi_command, nexti_command)
798         (finish_command, next_command, step_command, until_command)
799         (advance_command, jump_command, continue_command, run_command)
800         (start_command, starti_command, interrupt_command)
801         (run_command_1, set_inferior_args, step_1): Constify.
802         * inferior.c (add_inferior_command, remove_inferior_command)
803         (clone_inferior_command): Constify.
804         * linux-fork.c (checkpoint_command, restart_command): Constify.
805         * windows-nat.c (signal_event_command): Constify.
806         * guile/guile.c (guile_repl_command, guile_command): Constify.
807         * printcmd.c (x_command, display_command, printf_command)
808         (output_command, set_command, call_command, print_command)
809         (eval_command): Constify.
810         (non_const_set_command): Remove.
811         (_initialize_printcmd): Update.
812         * source.c (forward_search_command, reverse_search_command):
813         Constify.
814         * jit.c (jit_reader_load_command, jit_reader_unload_command):
815         Constify.
816         * infrun.c (handle_command): Constify.
817         * memattr.c (mem_command): Constify.
818         * stack.c (return_command, up_command, up_silently_command)
819         (down_command, down_silently_command, frame_command)
820         (backtrace_command, func_command, backtrace_command_1): Constify.
821         (backtrace_command): Add non-const overload.
822         * remote-sim.c (simulator_command): Constify.
823         * exec.c (set_section_command): Constify.
824         * tracepoint.c (tdump_command, trace_variable_command)
825         (tstatus_command, tstop_command, tstart_command)
826         (end_actions_pseudocommand, while_stepping_pseudocommand)
827         (collect_pseudocommand, teval_pseudocommand, actions_command)
828         (start_tracing, stop_tracing): Constify.
829         * value.c (init_if_undefined_command): Constify.
830         * tui/tui-stack.c (tui_update_command): Constify.
831         * tui/tui-win.c (tui_refresh_all_command)
832         (tui_set_tab_width_command, tui_set_win_height_command)
833         (tui_set_focus_command, tui_scroll_forward_command)
834         (tui_scroll_backward_command, tui_scroll_left_command)
835         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
836         (tui_set_win_height): Constify.
837         * tui/tui-layout.c (tui_layout_command): Constify.
838         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
839         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
840         (proc_untrace_sysexit_cmd): Constify.
841         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
842         (threadset_test_cmd, threadlist_update_test_cmd)
843         (threadalive_test): Constify.
844         * objc-lang.c (print_object_command): Constify.
845         * command.h (add_com): Constify.
846         * cli/cli-dump.c (restore_command): Constify.
847         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
848         (help_command, complete_command, shell_command, edit_command)
849         (list_command, disassemble_command, make_command)
850         (apropos_command, alias_command): Constify.
851         * cli/cli-script.c (document_command, define_command)
852         (while_command, if_command, validate_comname): Constify.
853         * cli/cli-decode.c (struct cmd_list_element): Change type of
854         "fun".
855         * target.c (do_monitor_command, flash_erase_command): Constify.
856         * regcache.c (reg_flush_command): Constify.
857         * reverse.c (reverse_step, reverse_next, reverse_stepi)
858         (reverse_nexti, reverse_continue, reverse_finish)
859         (save_bookmark_command, goto_bookmark_command)
860         (exec_reverse_once): Constify.
861         * python/python.c (python_interactive_command, python_command):
862         Constify.
863         * typeprint.c (ptype_command, whatis_command, whatis_exp):
864         Constify.
865         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
866         * gcore.c (gcore_command): Constify.
867
868 2017-11-07  Tom Tromey  <tom@tromey.com>
869
870         * printcmd.c (x_command): Call set_repeat_arguments.
871         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
872         * top.c (repeat_arguments): New global.
873         (set_repeat_arguments): New function.
874         (execute_command): Handle repeat_arguments.
875         (show_commands): Calls set_repeat_arguments.
876         * command.h (set_repeat_arguments): Declare.
877
878 2017-11-07  Tom Tromey  <tom@tromey.com>
879
880         * stack.c (backtrace_command): Use std::string.
881         (backtrace_command_1): Make "count_exp" const.
882
883 2017-11-07  Tom Tromey  <tom@tromey.com>
884
885         * source.c (directory_switch, mod_path, add_path): Constify.
886         * defs.h (add_path, mod_path, directory_switch): Constify.
887         * mi/mi-cmd-env.c (env_mod_path): Constify.
888
889 2017-11-07  Tom Tromey  <tom@tromey.com>
890
891         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
892         (run_command_1, continue_command, step_1, jump_command)
893         (signal_command, until_command, advance_command, finish_command)
894         (attach_command): Update.
895
896 2017-11-07  Tom Tromey  <tom@tromey.com>
897
898         * command.h (set_cmd_cfunc): Don't declare.
899         * cli/cli-decode.c (set_cmd_cfunc): Now static.
900
901 2017-11-07  Tom Tromey  <tom@tromey.com>
902
903         * stack.c (select_frame_command): Constify.
904         * cli/cli-decode.c (add_com_suppress_notification): Constify.
905         * command.h (add_com_suppress_notification): Constify.
906
907 2017-11-07  Tom Tromey  <tom@tromey.com>
908
909         * breakpoint.c (stop_command): Constify.
910         * cli/cli-decode.c (struct cmd_list_element): Constify.
911         * command.h (add_abbrev_prefix_cmd): Constify.
912
913 2017-11-07  Pedro Alves  <palves@redhat.com>
914
915         * breakpoint.c (extract_bp_kind): New enum.
916         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
917         factored out from ...
918         (extract_bp_number_and_location): ... here.
919         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
920
921 2017-11-07  Pedro Alves  <palves@redhat.com>
922
923         * breakpoint.c (extract_bp_number_and_location): Change return
924         type to void.  Throw error instead of warning.
925         (enable_disable_command): Adjust.
926
927 2017-11-07  Xavier Roirand  <roirand@adacore.com>
928             Pedro Alves  <palves@redhat.com>
929
930         * breakpoint.c (map_breakpoint_number_range): New, factored out
931         from ...
932         (map_breakpoint_numbers): ... here.
933         (find_location_by_number): Change parameters from string to
934         breakpoint number and location.
935         (extract_bp_number_and_location): New function.
936         (enable_disable_bp_num_loc)
937         (enable_disable_breakpoint_location_range)
938         (enable_disable_command): New functions, factored out ...
939         (enable_command, disable_command): ... these functions, and
940         adjusted to support ranges.
941         * NEWS: Document enable/disable breakpoint location range feature.
942
943 2017-11-06  Luis Machado  <luis.machado@linaro.org>
944
945         * MAINTAINERS (Write After Approval): Update my e-mail address.
946
947 2017-11-06  Pedro Alves  <palves@redhat.com>
948
949         * gnu-nat.c (gnu_terminal_init): Delete.
950         (gnu_target): Don't install gnu_terminal_init.
951         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
952         (child_terminal_init): ... this function.
953
954 2017-11-06  Pedro Alves  <palves@redhat.com>
955
956         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
957         sgtty.h.
958         * config.in, configure: Regenerate.
959
960 2017-11-06  Pedro Alves  <palves@redhat.com>
961
962         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
963         (async_init_signals): Adjust.
964         (handle_stop_sig): Rename to ...
965         (handle_sigtstp): ... this.
966         (async_stop_sig): Rename to ...
967         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
968         SIGTSTP path.
969         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
970         instead of STOP_SIGNAL thoughout.
971         (handle_stop_sig): Rename to ...
972         (handle_sigtstp): ... this.
973         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
974
975 2017-11-06  Pedro Alves  <palves@redhat.com>
976
977         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
978         longer set flags twice in row.
979
980 2017-11-06  Pedro Alves  <palves@redhat.com>
981
982         * Makefile.in (SER_HARDWIRE): Update comment.
983         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
984         * common/gdb_termios.h: Delete file.
985         * common/job-control.c: Include termios.h and unistd.h instead of
986         gdb_termios.h.
987         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
988         check.
989         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
990         Remove sgtty code.
991         * configure.ac: No longer check for termio.h and sgtty.h.
992         * configure: Regenerate.
993         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
994         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
995         Replace PROCESS_GROUP_TYPE references with pid_t references
996         throughout.
997         (gdb_getpgrp): Delete.
998         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
999         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1000         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1001         gdb_getpgrp.  Use serial_set_tty_state instead aof
1002         serial_noflush_set_tty_state.  Remove sgtty code.
1003         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1004         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1005         (inferior_process_group): Now returns pid_t.
1006         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1007         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1008         * ser-event.c (serial_event_ops): Update.
1009         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1010         (dos_ops): Update.
1011         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1012         * ser-pipe.c (pipe_ops): Update.
1013         * ser-tcp.c (tcp_ops): Update.
1014         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1015         HAVE_TERMIOS checks.
1016         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1017         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1018         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1019         assume termios.
1020         (hardwire_noflush_set_tty_state): Delete.
1021         (hardwire_print_tty_state, hardwire_drain_output)
1022         (hardwire_flush_output, hardwire_flush_input)
1023         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1024         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1025         code, and assume termios.
1026         (hardwire_ops): Update.
1027         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1028         * serial.c (serial_noflush_set_tty_state): Delete.
1029         * serial.h (serial_noflush_set_tty_state): Delete.
1030         (serial_ops::noflush_set_tty_state): Delete.
1031
1032 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1033
1034         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1035         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1036         (COMMON_OBS): Remove doublest.o and dfp.o.
1037         Do not build target-float.c (instead of doublest.c)
1038         with -Wformat-nonliteral.
1039
1040         * doublest.c: Remove file.
1041         * doublest.h: Remove file.
1042         * dfp.c: Remove file.
1043         * dfp.h: Remove file.
1044
1045         * target-float.c: Do not include "doublest.h" and "dfp.h".
1046         (DOUBLEST): Move here from doublest.h.
1047         (enum float_kind): Likewise.
1048         (FLOATFORMAT_CHAR_BIT): Likewise.
1049         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1050         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1051         (floatformat_precision): Likewise.
1052         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1053         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1054         Likewise.
1055         (host_float_format, host_double_format, host_long_double_format):
1056         Likewise.
1057         (floatformat_to_string, floatformat_from_string): Likewise.
1058         (floatformat_to_doublest): Likewise.  Also, inline the original
1059         convert_floatformat_to_doublest.
1060         (floatformat_from_doublest): Likewise.  Also, inline the original
1061         convert_floatformat_from_doublest.
1062
1063         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1064         (MAX_DECIMAL_STRING): Move here from dfp.c.
1065         (match_endianness): Likewise.
1066         (set_decnumber_context, decimal_check_errors): Likewise.
1067         (decimal_from_number, decimal_to_number): Likewise.
1068         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1069         (decimal_from_longest, decimal_from_ulongest): Likewise.
1070         (decimal_to_longest): Likewise.
1071         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1072         (decimal_convert): Likewise.
1073
1074 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1075
1076         * doublest.c: Do not include "gdbtypes.h".
1077         (extract_typed_floating): Remove.
1078         (store_typed_floating): Remove.
1079         (convert_typed_floating): Remove.
1080         * doublest.h (struct type): Remove.
1081         (DOUBLEST_PRINT_FORMAT): Remove.
1082         (DOUBLEST_SCAN_FORMAT): Remove.
1083         (extract_typed_floating): Remove.
1084         (store_typed_floating): Remove.
1085         (convert_typed_floating): Remove.
1086
1087         * dfp.c (decimal_from_doublest): Remove.
1088         (decimal_to_doublest): Remove.
1089         * dfp.h: Do not include "doublest.h".
1090         (decimal_from_doublest): Remove.
1091         (decimal_to_doublest): Remove.
1092
1093         * value.c: Do not include "doublest.h" and "dfp.h".
1094         (value_as_double): Remove.
1095         (unpack_double): Remove.
1096         (value_from_double): Remove.
1097         (value_from_decfloat): Remove.
1098         * value.h: Do not include "doublest.h".
1099         (value_as_double): Remove.
1100         (unpack_double): Remove.
1101         (value_from_double): Remove.
1102         (value_from_decfloat): Remove.
1103
1104 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1105
1106         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1107         (i386_extract_return_value): Use target_float_convert.
1108         (i386_store_return_value): Likewise.
1109         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1110         (i387_value_to_register): Likewise.
1111         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1112         (ia64_register_to_value): Use target_float_convert.
1113         (ia64_value_to_register): Likewise.
1114         (ia64_extract_return_value): Likewise.
1115         (ia64_store_return_value): Likewise.
1116         (ia64_push_dummy_call): Likewise.
1117         * m68k-tdep.c: Include "target-float.h".
1118         (m68k_register_to_value): Use target_float_convert.
1119         (m68k_value_to_register): Likewise.
1120         (m68k_svr4_extract_return_value): Likewise.
1121         (m68k_svr4_store_return_value): Likewise.
1122         * ppc-sysv-tdep.c: Include "target-float.h".
1123         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1124         (do_ppc_sysv_return_value): Likewise.
1125         (ppc64_sysv_abi_push_freg): Likewise.
1126         (ppc64_sysv_abi_return_value_base): Likewise.
1127         * rs6000-aix-tdep.c: Include "target-float.h".
1128         (rs6000_push_dummy_call): Use target_float_convert.
1129         (rs6000_return_value): Likewise.
1130         * rs6000-lynx178-tdep.c: Include "target-float.h".
1131         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1132         (rs6000_lynx178_return_value): Likewise.
1133         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1134         (rs6000_register_to_value): Use target_float_convert.
1135         (rs6000_value_to_register): Likewise.
1136         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1137         (arm_extract_return_value): Use target_float_convert.
1138         (arm_store_return_value): Likewise.
1139         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1140         (sh_register_convert_to_virtual): Use target_float_convert.
1141         (sh_register_convert_to_raw): Likewise.
1142         * sh64-tdep.c: Include "target-float.h".
1143         (sh64_extract_return_value): Use target_float_convert.
1144         (sh64_register_convert_to_virtual): Likewise.
1145         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1146
1147 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1148
1149         * target-float.c (floatformat_to_host_double): New function.
1150         (floatformat_from_host_double): Likewise.
1151         (target_float_to_host_double): Likewise.
1152         (target_float_from_host_double): Likewise.
1153         * target-float.h (target_float_to_host_double): Add prototype.
1154         (target_float_from_host_double): Likewise.
1155
1156         * guile/scm-value.c: Include "target-float.h".
1157         (gdbscm_value_to_real): Use target_float_to_host_double.
1158         Handle integer source values via value_as_long.
1159         * guile/scm-math.c: Include "target-float.h".  Do not include
1160         "doublest.h", "dfp.h", and "expression.h".
1161         (vlscm_convert_typed_number): Use target_float_from_host_double.
1162         (vlscm_convert_number): Likewise.
1163
1164         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1165         (convert_value_from_python): Use target_float_from_host_double.
1166
1167 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1168
1169         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1170         (cast_from_fixed): Likewise.
1171         (ada_scaling_type): New function.
1172         (ada_delta): Return value instead of DOUBLEST.  Perform target
1173         arithmetic instead of host arithmetic.
1174         (scaling_factor): Rename to ...
1175         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1176         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1177         (ada_fixed_to_float): Remove.
1178         (ada_float_to_fixed): Remove.
1179         * ada-lang.h (ada_fixed_to_float): Remove.
1180         (ada_float_to_fixed): Remove.
1181         (ada_delta): Return value instead of DOUBLEST.
1182         (ada_scaling_factor): Add prototype.
1183
1184         * ada-typeprint.c: Include "target-float.h".
1185         (print_fixed_point_type): Perform target arithmetic instead of
1186         host arithmetic.
1187         * ada-valprint.c: Include "target-float.h".
1188         (ada_val_print_num): Perform target arithmetic instead of
1189         host arithmetic for fixed-point types.
1190
1191 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1192
1193         * target-float.c: Include <math.h>.
1194         (floatformat_binop): New function.
1195         (floatformat_compare): Likewise.
1196         (target_float_binop): Likewise.
1197         (target_float_compare): Likewise.
1198         * target-float.h: Include "expression.h".
1199         (target_float_binop): Add prototype.
1200         (target_float_compare): Likewise.
1201
1202         * valarith.c: Do not include "doublest.h" and "dfp.h".
1203         Include "common/byte-vector.h".
1204         (value_args_as_decimal): Remove, replace by ...
1205         (value_args_as_target_float): ... this function.  Handle both
1206         binary and decimal target floating-point formats.
1207         (scalar_binop): Handle both binary and decimal FP using
1208         value_args_as_target_float and target_float_binop.
1209         (value_equal): Handle both binary and decimal FP using
1210         value_args_as_target_float and target_float_compare.
1211         (value_less): Likewise.
1212         (value_pos): Handle all scalar types as simple copy.
1213         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1214         * dfp.c (decimal_binop): Throw error instead of internal_error
1215         when called with an unsupported operation code.
1216
1217 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1218
1219         * target-float.c (target_float_to_string): New function.
1220         (target_float_from_string): New function.
1221         * target-float.h (target_float_to_string): Add prototype.
1222         (target_float_from_string): Add prototype.
1223
1224         * valprint.c: Include "target-float.h".  Do not include
1225         "doublest.h" and "dfp.h".
1226         (print_floating): Use target_float_to_string.
1227         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1228         (printf_floating): Use target_float_to_string.
1229         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1230         (print_i387_value): Use target_float_to_string.
1231         * mips-tdep.c: Include "target-float.h".
1232         (mips_print_fp_register): Use target_float_to_string.
1233         * sh64-tdep.c: Include "target-float.h".
1234         (sh64_do_fp_register): Use target_float_to_string.
1235
1236         * parse.c: Include "target-float.h".  Do not include
1237         "doublest.h" and "dfp.h".
1238         (parse_float): Use target_float_from_string.
1239         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1240         (define_symbol): Use target_float_from_string.
1241         * gdbarch-selftests.c: Include "target-float.h".
1242         (register_to_value_test): Use target_float_from_string.
1243
1244 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1245
1246         * Makefile.c (SFILES): Add target-float.c.
1247         (HFILES_NO_SRCDIR): Add target-float.h.
1248         (COMMON_OBS): Add target-float.o.
1249         * target-float.h: New file.
1250         * target-float.c: New file.
1251
1252         * doublest.c (floatformat_classify): Fix detection of float_zero.
1253
1254         * gdbtypes.c (is_floating_type): New function.
1255         * gdbtypes.h (is_floating_type): Add prototype.
1256
1257         * value.c: Do not include "floatformat.h".
1258         (unpack_double): Use target_float_is_valid.
1259         (is_floating_value): New function.
1260         * value.h (is_floating_value): Add prototype-
1261
1262         * valarith.c: Include "target-float.h".
1263         (value_logical_not): Use target_float_is_zero.
1264
1265         * python/py-value.c: Include "target-float.h".
1266         (valpy_nonzero): Use target_float_is_zero.
1267
1268 2017-11-04  Tom Tromey  <tom@tromey.com>
1269
1270         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1271
1272 2017-11-04  Tom Tromey  <tom@tromey.com>
1273
1274         * breakpoint.c (set_momentary_breakpoint): Return
1275         breakpoint_up.
1276         (until_break_command): Update.
1277         (new_until_break_fsm): Change argument types to
1278         breakpoint_up.
1279         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1280         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1281         Remove.
1282         * infcmd.c (finish_forward): Update.
1283         * breakpoint.h (set_momentary_breakpoint)
1284         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1285         (make_cleanup_delete_breakpoint): Remove.
1286         (struct breakpoint_deleter): New.
1287         (breakpoint_up): New typedef.
1288         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1289         (insert_exception_resume_breakpoint): Update.
1290         (insert_exception_resume_from_probe): Update.
1291         (insert_longjmp_resume_breakpoint): Update.
1292         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1293         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1294         * infcall.c (call_function_by_hand_dummy): Update
1295
1296 2017-11-04  Tom Tromey  <tom@tromey.com>
1297
1298         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1299
1300 2017-11-04  Tom Tromey  <tom@tromey.com>
1301
1302         * linux-tdep.c (linux_core_info_proc_mappings): Use
1303         gdb::def_vector.
1304         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1305         "size" argument.
1306         (linux_corefile_thread): Update.
1307         (linux_make_corefile_notes): Remove unused variable.
1308
1309 2017-11-04  Tom Tromey  <tom@tromey.com>
1310
1311         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1312         gdb::byte_vector.
1313
1314 2017-11-04  Tom Tromey  <tom@tromey.com>
1315
1316         * objfiles.c (do_free_objfile_cleanup): Remove.
1317         * compile/compile-object-load.c (compile_object_load): Update.
1318         * objfiles.h (make_cleanup_free_objfile): Remove.
1319
1320 2017-11-04  Tom Tromey  <tom@tromey.com>
1321
1322         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1323         (adi_read_versions): Change "tags" to "gdb_byte *".
1324         (adi_print_versions): Likewise.
1325
1326 2017-11-04  Tom Tromey  <tom@tromey.com>
1327
1328         * breakpoint.c
1329         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1330         from start_rbreak_breakpoints.
1331         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1332         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1333         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1334         * symtab.c (do_end_rbreak_breakpoints): Remove.
1335         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1336
1337 2017-11-04  Tom Tromey  <tom@tromey.com>
1338
1339         * cp-namespace.c (reset_directive_searched): Remove.
1340         (cp_lookup_symbol_via_imports): Use scoped_restore.
1341         * cp-support.c (reset_directive_searched): Remove.
1342         (make_symbol_overload_list_using): Use scoped_restore.
1343         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1344         (reset_directive_searched): Remove.
1345
1346 2017-11-04  Tom Tromey  <tom@tromey.com>
1347
1348         * symfile.c (find_separate_debug_file_by_debuglink): Use
1349         unique_xmalloc_ptr.
1350
1351 2017-11-04  Tom Tromey  <tom@tromey.com>
1352
1353         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1354         type of "info".
1355         (compute_stack_depth): Likewise.
1356         (do_compile_dwarf_expr_to_c): Use std::vector.
1357
1358 2017-11-04  Tom Tromey  <tom@tromey.com>
1359
1360         * compile/compile-object-load.c (link_callbacks_einfo): Use
1361         std::string.
1362
1363 2017-11-04  Tom Tromey  <tom@tromey.com>
1364
1365         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1366         Use scoped_free_pendings.
1367         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1368         scoped_free_pendings.
1369         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1370         (xcoff_initial_scan): Likewise.
1371         * buildsym.c (reset_symtab_globals): Update comment.
1372         (scoped_free_pendings): Rename from really_free_pendings.
1373         (prepare_for_building): Update comment.
1374         (buildsym_init): Likewise.
1375         * buildsym.h (class scoped_free_pendings): New class.
1376         (really_free_pendings): Don't declare.
1377
1378 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1379
1380         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1381         output when converting a zero value to a special byteorder format.
1382
1383 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1384
1385         * frame.c (do_frame_register_read): Remove aspace.
1386         * jit.c (jit_frame_sniffer): Likwise.
1387         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1388         * regcache.c (regcache::regcache): Pass nullptr.
1389         (regcache_print): Caller updated.
1390         * regcache.h (regcache::regcache): Remove one constructor
1391         parameter aspace.
1392
1393 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1394
1395         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1396
1397 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1398
1399         * breakpoint.c (insert_single_step_breakpoints): Update.
1400         * frame.c (struct frame_info) <aspace>: Add const.
1401         (frame_save_as_regcache): Add const.
1402         (get_frame_address_space): Return const address_space *.
1403         * frame.h (get_frame_address_space): Update declaration.
1404         * infrun.c (struct step_over_info) <aspace>: Add const.
1405         (set_step_over_info): Make aspace const.
1406         (displaced_step_prepare_throw): Change variable const.
1407         (resume): Likewise.
1408         (proceed): Likewise.
1409         (adjust_pc_after_break): Likewise.
1410         (save_waitstatus): Likewise.
1411         (handle_signal_stop): Likewise.
1412         (keep_going_pass_signal): Likewise.
1413         * jit.c (jit_frame_sniffer): Add const.
1414         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1415         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1416         * record-full.c (record_full_wait_1): Likewise.
1417         * regcache.c (regcache::regcache): Change parameter to const.
1418         * regcache.h (regcache::regcache): Likewise.
1419         (regcache::aspace): Return const address_space *.
1420         (regcache) <m_aspace>: Add const.
1421
1422 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1423
1424         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1425         * frame.c (create_sentinel_frame): Likewise.
1426         * infrun.c (displaced_step_prepare_throw): Likewise.
1427         (resume): Likewise.
1428         (thread_still_needs_step_over_bp): Likewise.
1429         (proceed): Likewise.
1430         (do_target_wait): Likewise.
1431         (adjust_pc_after_break): Likewise.
1432         (handle_syscall_event): Likewise.
1433         (save_waitstatus): Likewise.
1434         (handle_inferior_event_1): Likewise.
1435         (handle_signal_stop): Likewise.
1436         (keep_going_pass_signal): Likewise.
1437         * linux-nat.c (status_callback): Likewise.
1438         (save_stop_reason): Likewise.
1439         (resume_stopped_resumed_lwps): Likewise.
1440         * record-full.c (record_full_exec_insn): Likewise.
1441         (record_full_wait_1): Likewise.
1442         * regcache.c (get_regcache_aspace): Remove.
1443         * regcache.h (get_regcache_aspace): Remove.
1444
1445 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1446
1447         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1448         (init_regcache_descr): Use gdbarch_num_regs.
1449         (regcache::regcache): Likewise.
1450         (regcache::get_register_status): Likewise.
1451         (regcache::assert_raw_regnum): Likewise.
1452         (regcache::cooked_read): Likewise.
1453         (regcache::cooked_read_value): Likewise.
1454         (regcache::cooked_write): Likewise.
1455         (regcache::dump): Likewise.
1456         (regcache::num_raw_registers): New method.
1457         * regcache.h (class regcache) <num_raw_registers>: New.
1458
1459 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1460
1461         * regcache.c (regcache::assert_regnum): New method.
1462         (regcache::invalidate): Call assert_regnum.
1463         (regcache::raw_update): Likewise.
1464         (regcache::raw_write): Likewise.
1465         (regcache::raw_read_part): Likewise.
1466         (regcache::raw_write_part): Likewise.
1467         (regcache::raw_supply): Likewise.
1468         (regcache::raw_supply_integer): Likewise.
1469         (regcache::raw_supply_zeroed): Likewise.
1470         (regcache::raw_collect): Likewise.
1471         (regcache::raw_collect_integer): Likewise.
1472         * regcache.h (regcache::assert_regnum): Declare.
1473
1474 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1475
1476         * regcache.c (regcache::dump): Remove code.
1477
1478 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1479
1480         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1481         Remove.
1482         <sizeof_cooked_register_status>: Remove.
1483         (init_regcache_descr): Update.
1484         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1485         (regcache::save): Likewise.
1486         (regcache::dump): Likewise.
1487
1488 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1489
1490         * ft32-tdep.c (ft32_fetch_instruction): New function.
1491         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1492
1493 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1494
1495         * cli/cli-script.c (execute_control_command): Rename to ...
1496         (execute_control_command_1): ... this.
1497         (execute_control_command): New function.
1498
1499 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1500
1501         * tracepoint.c (tfind_command): Remove const_cast.
1502
1503 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1504
1505         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1506
1507 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1508
1509         * common/common-utils.h (in_inclusive_range): New function.
1510         * arm-tdep.c (arm_record_extension_space): Use
1511         in_inclusive_range.
1512         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1513         * cris-tdep.c (cris_spec_reg_applicable): Use
1514         in_inclusive_range.
1515
1516 2017-10-30  Pedro Alves  <palves@redhat.com>
1517             Simon Marchi <simon.marchi@ericsson.com>
1518
1519         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1520         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1521
1522 2017-10-30  Pedro Alves  <palves@redhat.com>
1523
1524         * common/common-utils.c (string_appendf, string_vappendf): New
1525         functions.
1526         * common/common-utils.h (string_appendf, string_vappendf): New
1527         declarations.
1528         * unittests/common-utils-selftests.c (string_appendf_func)
1529         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1530         (string_vappendf_tests): New functions.
1531         (_initialize_common_utils_selftests): Register "string_appendf" and
1532         "string_vappendf tests".
1533
1534 2017-10-30  Pedro Alves  <palves@redhat.com>
1535
1536         * unittests/common-utils-selftests.c (format_func): New typedef.
1537         (string_printf_tests, string_vprintf_tests): Tests factored out
1538         and merged to ...
1539         (test_format_func): ... this new function.
1540         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1541         test_format_func.
1542
1543 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1544
1545         * darwin-nat.c: Remove include of gdb.h.
1546
1547 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1548
1549         * xtensa-xtregs.c: Fix formatting issues.
1550
1551 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1552
1553         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1554
1555 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1556
1557         PR python/21213
1558         * python/py-infthread.c (thpy_get_inferior): Increment reference
1559         of inferior before returning it.
1560
1561 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1562
1563         * unittests/common-utils-selftests.c (format): Add
1564         ATTRIBUTE_PRINTF.
1565
1566 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1567
1568         * xml-syscall.c (struct syscall_desc): Add constructor.
1569         <name>: Change type to std::string.
1570         (syscall_desc_up): New typedef.
1571         (syscall_desc_p): Remove typeder.
1572         (DEF_VEC_P(syscall_desc_p)): Remove.
1573         (struct syscall_group_desc): Add constructor.
1574         <name>: Change type to std::string.
1575         <syscalls>: Change type to std::vector.
1576         (syscall_group_desc_up): New typedef.
1577         (syscall_group_desc_p): Remove typedef.
1578         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1579         (struct syscalls_info) <syscalls>: Change type to std::vector of
1580         unique_ptr.
1581         <groups>: Likewise.
1582         <my_gdb_datadir>: Change type to std::string.
1583         (syscalls_info_up): New typedef.
1584         (allocate_syscalls_info): Remove.
1585         (syscalls_info_free_syscalls_desc): Remove.
1586         (syscalls_info_free_syscall_group_desc): Remove.
1587         (free_syscalls_info): Remove.
1588         (make_cleanup_free_syscalls_info): Remove.
1589         (syscall_group_create_syscall_group_desc): Adjust.
1590         (syscall_group_add_syscall): Adjust.
1591         (syscall_create_syscall_desc): Adjust.
1592         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1593         (init_syscalls_info): Adjust.
1594         (syscall_group_get_group_by_name): Adjust.
1595         (xml_get_syscall_number): Adjust.
1596         (xml_get_syscall_name): Adjust.
1597         (xml_list_of_syscalls): Adjust.
1598         (xml_list_syscalls_by_group): Adjust.
1599         (xml_list_of_groups): Adjust.
1600
1601 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1602
1603         * probe.h: Don't include gdb_vecs.h.
1604         (DEF_VEC_P (probe_p)): Remove.
1605         (find_probes_in_objfile): Return an std::vector.
1606         * probe.c (find_probes_in_objfile): Likewise.
1607         * breakpoint.c (breakpoint_objfile_data)
1608         <longjmp_probes>: Change type to std::vector.
1609         <exception_probes>: Likewise.
1610         (free_breakpoint_probes): Don't manually free vectors.
1611         (create_longjmp_master_breakpoint): Adjust.
1612         (create_exception_master_breakpoint): Adjust.
1613         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1614         parameter type, adjust.
1615         (svr4_create_solib_event_breakpoints): Adjust.
1616
1617 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1618
1619         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1620         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1621         with new.
1622         (free_breakpoint_probes): Rename to ...
1623         (free_breakpoint_objfile_data): ... this, and call delete on
1624         bp_objfile_data..
1625
1626 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1627
1628         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1629         (loaded_script_ptr): Remove typedef.
1630         (DEF_VEC_P (loaded_script_ptr)): Remove.
1631         (struct collect_matching_scripts_data): Add constructor.
1632         <scripts_p>: Change type to (pointer to) std::vector.
1633         (collect_matching_scripts_data): Adjust.
1634         (sort_scripts_by_name): Make suitable for std::sort.
1635         (print_scripts): Don't sort vector, adjust to std::vector.
1636         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1637
1638 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1639
1640         * symfile.c (filename_language): Make struct, not typedef.  Add
1641         constructor.
1642         <ext>: Change type to std::string.
1643         (DEF_VEC_O (filename_language)): Remove.
1644         (filename_language_table): Change type to std::vector.
1645         (add_filename_language): Adjust.
1646         (set_ext_lang_command): Adjust.
1647         (info_ext_lang_command): Adjust.
1648         (deduce_language_from_filename): Adjust.
1649         (class scoped_restore_filename_language_table): Remove.
1650         (test_filename_language): Use scoped_restore.
1651         (test_set_ext_lang_command): Use scoped_restore, adjust to
1652         std::vector change.
1653
1654 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1655
1656         * symfile.c: Include selftest.h.
1657         (class scoped_restore_filename_language_table): New.
1658         (test_filename_language): New test.
1659         (test_set_ext_lang_command): New test.
1660         (_initialize_symfile): Register tests.
1661
1662 2017-10-27  Keith Seitz  <keiths@redhat.com>
1663
1664         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1665         in the bp_location, falling back to find_pc_sect_function when
1666         needed.
1667         (add_location_to_breakpoint): Save sal->symbol.
1668         * breakpoint.h (struct bp_location) <symbol>: New field.
1669         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1670         * symtab.h (struct symtab_and_line) <symbol>: New field.
1671
1672 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1673
1674         PR gdb/13669
1675         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1676         to rewind obstack.
1677
1678 2017-10-26  Pedro Alves  <palves@redhat.com>
1679
1680         * remote.c (remote_async_terminal_ours_p): Delete.
1681         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1682         Remove references to 'remote_async_terminal_ours_p'.
1683
1684 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1685
1686         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1687
1688 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1689
1690         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1691         aspace const.
1692         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1693         Likewise.
1694         * breakpoint.c (bpstat_check_location): Remove cast.
1695         (breakpoint_hit_catch_fork): Make aspce const.
1696         (breakpoint_hit_catch_solib): Likewise.
1697         (breakpoint_hit_catch_exec): Likewise.
1698         (breakpoint_hit_ranged_breakpoint): Likewise.
1699         (breakpoint_hit_watchpoint): Likewise.
1700         (base_breakpoint_breakpoint_hit): Likewise.
1701         (bkpt_breakpoint_hit): Likewise.
1702         (dprintf_breakpoint_hit): Likewise.
1703         (tracepoint_breakpoint_hit): Likewise.
1704         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1705
1706 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1707
1708         * breakpoint.c (breakpoint_location_address_match): Change
1709         "struct address_space *" to "const address_space".
1710         (breakpoint_location_address_range_overlap): Likewise.
1711         (breakpoint_here_p): Likewise.
1712         (breakpoint_in_range_p): Likewise.
1713         (moribund_breakpoint_here_p): Likewise.
1714         (bp_location_inserted_here_p): Likewise.
1715         (software_breakpoint_inserted_here_p): Likewise.
1716         (hardware_breakpoint_inserted_here_p): Likewise.
1717         (hardware_watchpoint_inserted_in_range): Likewise.
1718         (bpstat_check_location): Likewise.
1719         (bpstat_stop_status): Likewise.
1720         (breakpoint_address_match): Likewise.
1721         (breakpoint_address_match_range): Likewise.
1722         (breakpoint_location_address_match): Likewise.
1723         (breakpoint_location_address_range_overlap): Likewise.
1724         (insert_single_step_breakpoint): Likewise.
1725         (breakpoint_has_location_inserted_here): Likewise.
1726         (single_step_breakpoint_inserted_here_p): Likewise.
1727         (pc_at_non_inline_function): Likewise.
1728         * breakpoint.h (bpstat_stop_status): Update declaration.
1729         (breakpoint_here_p): Likewise.
1730         (breakpoint_in_range_p): Likewise.
1731         (moribund_breakpoint_here_p): Likewise.
1732         (breakpoint_inserted_here_p): Likewise.
1733         (software_breakpoint_inserted_here_p): Likewise.
1734         (hardware_breakpoint_inserted_here_p): Likewise.
1735         (breakpoint_has_location_inserted_here): Likewise.
1736         (single_step_breakpoint_inserted_here_p): Likewise.
1737         (hardware_watchpoint_inserted_in_range): Likewise.
1738         (breakpoint_address_match): Likewise.
1739         (insert_single_step_breakpoint): Likewise.
1740         (pc_at_non_inline_function): Likewise.
1741         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1742         * record.c (record_check_stopped_by_breakpoint): Likewise.
1743         * record.h (record_check_stopped_by_breakpoint): Likewise.
1744         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1745
1746 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1747
1748         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1749         regcache->arch () instead get_regcache_arch.
1750         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1751         Likewise.
1752         (aarch64_fbsd_store_inferior_registers): Likewise.
1753         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1754         (store_gregs_to_thread): Likewise.
1755         (fetch_fpregs_from_thread): Likewise.
1756         (store_fpregs_to_thread): Likewise.
1757         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1758         (aarch64_store_return_value): Likewise.
1759         (aarch64_software_single_step): Likewise.
1760         * aix-thread.c (aix_thread_wait): Likewise.
1761         (supply_reg32): Likewise.
1762         (supply_sprs64): Likewise.
1763         (supply_sprs32): Likewise.
1764         (fill_gprs64): Likewise.
1765         (fill_gprs32): Likewise.
1766         (fill_sprs64): Likewise.
1767         (fill_sprs32): Likewise.
1768         (store_regs_user_thread): Likewise.
1769         (store_regs_kernel_thread): Likewise.
1770         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1771         (alphabsd_store_inferior_registers): Likewise.
1772         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1773         (alpha_store_return_value): Likewise.
1774         (alpha_deal_with_atomic_sequence): Likewise.
1775         (alpha_next_pc): Likewise.
1776         (alpha_software_single_step): Likewise.
1777         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1778         (amd64bsd_store_inferior_registers): Likewise.
1779         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1780         Likewise.
1781         (amd64_linux_store_inferior_registers): Likewise.
1782         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1783         (amd64_collect_native_gregset): Likewise.
1784         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1785         (amd64obsd_collect_uthread): Likewise.
1786         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1787         (amd64_collect_fpregset): Likewise.
1788         (amd64_supply_fxsave): Likewise.
1789         (amd64_supply_xsave): Likewise.
1790         (amd64_collect_fxsave): Likewise.
1791         (amd64_collect_xsave): Likewise.
1792         * arc-tdep.c (arc_write_pc): Likewise.
1793         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1794         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1795         (arm_fbsd_store_inferior_registers): Likewise.
1796         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1797         (store_vfp_regs): Likewise.
1798         (arm_linux_fetch_inferior_registers): Likewise.
1799         (arm_linux_store_inferior_registers): Likewise.
1800         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1801         (arm_linux_sigreturn_next_pc): Likewise.
1802         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1803         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1804         (fetch_register): Likewise.
1805         (store_register): Likewise.
1806         * arm-tdep.c (arm_is_thumb): Likewise.
1807         (displaced_in_arm_mode): Likewise.
1808         (bx_write_pc): Likewise.
1809         (arm_get_next_pcs_addr_bits_remove): Likewise.
1810         (arm_software_single_step): Likewise.
1811         (arm_extract_return_value): Likewise.
1812         (arm_store_return_value): Likewise.
1813         (arm_write_pc): Likewise.
1814         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1815         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1816         (bsd_uthread_store_registers): Likewise.
1817         * core-regset.c (fetch_core_registers): Likewise.
1818         * corelow.c (get_core_registers): Likewise.
1819         * cris-tdep.c (cris_store_return_value): Likewise.
1820         (cris_extract_return_value): Likewise.
1821         (find_step_target): Likewise.
1822         (find_step_target): Likewise.
1823         (cris_software_single_step): Likewise.
1824         * ctf.c (ctf_fetch_registers): Likewise.
1825         * darwin-nat.c (cancel_breakpoint): Likewise.
1826         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1827         * frv-tdep.c (frv_extract_return_value): Likewise.
1828         * ft32-tdep.c (ft32_store_return_value): Likewise.
1829         (ft32_extract_return_value): Likewise.
1830         * go32-nat.c (fetch_register): Likewise.
1831         (go32_fetch_registers): Likewise.
1832         (go32_store_registers): Likewise.
1833         (store_register): Likewise.
1834         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1835         (h8300_store_return_value): Likewise.
1836         * hppa-linux-nat.c (fetch_register): Likewise.
1837         (store_register): Likewise.
1838         (hppa_linux_fetch_inferior_registers): Likewise.
1839         (hppa_linux_store_inferior_registers): Likewise.
1840         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1841         (i386_darwin_store_inferior_registers): Likewise.
1842         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1843         (gnu_store_registers): Likewise.
1844         * i386-linux-nat.c (fetch_register): Likewise.
1845         (store_register): Likewise.
1846         (supply_gregset): Likewise.
1847         (fill_gregset): Likewise.
1848         (i386_linux_fetch_inferior_registers): Likewise.
1849         (i386_linux_store_inferior_registers): Likewise.
1850         (i386_linux_resume): Likewise.
1851         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1852         Likewise.
1853         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1854         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1855         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1856         (i386obsd_collect_uthread): Likewise.
1857         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1858         (i386_supply_gregset): Likewise.
1859         (i386_collect_gregset): Likewise.
1860         (i386_supply_fpregset): Likewise.
1861         (i386_collect_fpregset): Likewise.
1862         (i386_mpx_bd_base): Likewise.
1863         * i386-v4-nat.c (supply_fpregset): Likewise.
1864         (fill_fpregset): Likewise.
1865         * i387-tdep.c (i387_supply_fsave): Likewise.
1866         (i387_collect_fsave): Likewise.
1867         (i387_supply_fxsave): Likewise.
1868         (i387_collect_fxsave): Likewise.
1869         (i387_supply_xsave): Likewise.
1870         (i387_collect_xsave): Likewise.
1871         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1872         (ia64_linux_store_registers): Likewise.
1873         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1874         (ia64_extract_return_value): Likewise.
1875         (ia64_store_return_value): Likewise.
1876         (find_func_descr): Likewise.
1877         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1878         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1879         (inf_ptrace_store_registers): Likewise.
1880         * infrun.c (use_displaced_stepping): Likewise.
1881         (displaced_step_prepare_throw): Likewise.
1882         (resume): Likewise.
1883         (proceed): Likewise.
1884         (do_target_wait): Likewise.
1885         (adjust_pc_after_break): Likewise.
1886         (handle_inferior_event_1): Likewise.
1887         (handle_signal_stop): Likewise.
1888         (save_infcall_suspend_state): Likewise.
1889         (restore_infcall_suspend_state): Likewise.
1890         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1891         * jit.c (jit_frame_prev_register): Likewise.
1892         * linux-nat.c (save_stop_reason): Likewise.
1893         (linux_nat_wait_1): Likewise.
1894         (resume_stopped_resumed_lwps): Likewise.
1895         * linux-record.c (record_linux_sockaddr): Likewise.
1896         (record_linux_msghdr): Likewise.
1897         (record_linux_system_call): Likewise.
1898         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1899         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1900         (lm32_store_return_value): Likewise.
1901         * m32c-tdep.c (m32c_read_flg): Likewise.
1902         (m32c_pseudo_register_read): Likewise.
1903         (m32c_pseudo_register_write): Likewise.
1904         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1905         (m32r_linux_collect_gregset): Likewise.
1906         * m32r-tdep.c (m32r_store_return_value): Likewise.
1907         (m32r_extract_return_value): Likewise.
1908         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1909         (m68kbsd_collect_fpregset): Likewise.
1910         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1911         * m68k-linux-nat.c (fetch_register): Likewise.
1912         (old_fetch_inferior_registers): Likewise.
1913         (old_store_inferior_registers): Likewise.
1914         (store_regs): Likewise.
1915         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1916         (m68k_svr4_store_return_value): Likewise.
1917         * m88k-tdep.c (m88k_store_arguments): Likewise.
1918         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1919         (mi_cmd_data_write_register_values): Likewise.
1920         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1921         (mips_fbsd_store_inferior_registers): Likewise.
1922         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1923         (mips_fbsd_supply_gregs): Likewise.
1924         (mips_fbsd_collect_fpregs): Likewise.
1925         (mips_fbsd_collect_gregs): Likewise.
1926         (mips_fbsd_supply_fpregset): Likewise.
1927         (mips_fbsd_collect_fpregset): Likewise.
1928         (mips_fbsd_supply_gregset): Likewise.
1929         (mips_fbsd_collect_gregset): Likewise.
1930         * mips-linux-nat.c (supply_gregset): Likewise.
1931         (fill_gregset): Likewise.
1932         (supply_fpregset): Likewise.
1933         (fill_fpregset): Likewise.
1934         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1935         (mips_fill_gregset): Likewise.
1936         (mips_supply_fpregset): Likewise.
1937         (mips_fill_fpregset): Likewise.
1938         (mips64_supply_gregset): Likewise.
1939         (micromips_linux_sigframe_validate): Likewise.
1940         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1941         (mipsnbsd_fetch_inferior_registers): Likewise.
1942         (mipsnbsd_store_inferior_registers): Likewise.
1943         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1944         (mipsnbsd_supply_gregset): Likewise.
1945         (mipsnbsd_iterate_over_regset_sections): Likewise.
1946         (mipsnbsd_supply_reg): Likewise.
1947         (mipsnbsd_supply_fpreg): Likewise.
1948         * mips-tdep.c (mips_in_frame_stub): Likewise.
1949         (mips_dummy_id): Likewise.
1950         (is_octeon_bbit_op): Likewise.
1951         (micromips_bc1_pc): Likewise.
1952         (extended_mips16_next_pc): Likewise.
1953         (mips16_next_pc): Likewise.
1954         (deal_with_atomic_sequence): Likewise.
1955         * moxie-tdep.c (moxie_process_readu): Likewise.
1956         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1957         * nto-procfs.c (procfs_store_registers): Likewise.
1958         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1959         (ppcfbsd_store_inferior_registers): Likewise.
1960         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1961         (fetch_altivec_register): Likewise.
1962         (get_spe_registers): Likewise.
1963         (fetch_spe_register): Likewise.
1964         (fetch_altivec_registers): Likewise.
1965         (fetch_all_gp_regs): Likewise.
1966         (fetch_all_fp_regs): Likewise.
1967         (store_vsx_register): Likewise.
1968         (store_altivec_register): Likewise.
1969         (set_spe_registers): Likewise.
1970         (store_spe_register): Likewise.
1971         (store_altivec_registers): Likewise.
1972         (store_all_gp_regs): Likewise.
1973         (store_all_fp_regs): Likewise.
1974         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1975         (ppc_linux_collect_gregset): Likewise.
1976         (ppc_canonicalize_syscall): Likewise.
1977         (ppc_linux_record_signal): Likewise.
1978         (ppu2spu_prev_register): Likewise.
1979         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1980         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1981         (ppcobsd_store_registers): Likewise.
1982         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1983         Likewise.
1984         (ppc_ravenscar_generic_store_registers): Likewise.
1985         * procfs.c (procfs_fetch_registers): Likewise.
1986         (procfs_store_registers): Likewise.
1987         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1988         (ravenscar_store_registers): Likewise.
1989         (ravenscar_prepare_to_store): Likewise.
1990         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1991         * record-full.c (record_full_wait_1): Likewise.
1992         (record_full_registers_change): Likewise.
1993         (record_full_store_registers): Likewise.
1994         (record_full_core_fetch_registers): Likewise.
1995         (record_full_save): Likewise.
1996         (record_full_goto_insn): Likewise.
1997         * regcache.c (regcache_register_size): Likewise.
1998         (get_regcache_arch): Remove.
1999         (regcache_read_pc): Likewise.
2000         * regcache.h (get_regcache_arch): Remove.
2001         * remote-sim.c (gdbsim_fetch_register): Likewise.
2002         (gdbsim_store_register): Likewise.
2003         * remote.c (fetch_register_using_p): Likewise.
2004         (send_g_packet): Likewise.
2005         (remote_prepare_to_store): Likewise.
2006         (store_registers_using_G): Likewise.
2007         * reverse.c (save_bookmark_command): Likewise.
2008         (goto_bookmark_command): Likewise.
2009         * rs6000-aix-tdep.c (branch_dest): Likewise.
2010         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2011         (fetch_register): Likewise.
2012         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2013         (ppc_collect_reg): Likewise.
2014         (ppc_collect_gregset): Likewise.
2015         (ppc_collect_fpregset): Likewise.
2016         (ppc_collect_vsxregset): Likewise.
2017         (ppc_collect_vrregset): Likewise.
2018         (ppc_displaced_step_hw_singlestep): Likewise.
2019         (rs6000_pseudo_register_read): Likewise.
2020         (rs6000_pseudo_register_write): Likewise.
2021         * s390-linux-nat.c (supply_gregset): Likewise.
2022         (fill_gregset): Likewise.
2023         (s390_linux_fetch_inferior_registers): Likewise.
2024         * s390-linux-tdep.c (s390_write_pc): Likewise.
2025         (s390_software_single_step): Likewise.
2026         (s390_all_but_pc_registers_record): Likewise.
2027         (s390_linux_syscall_record): Likewise.
2028         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2029         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2030         (shnbsd_store_inferior_registers): Likewise.
2031         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2032         (sh_extract_return_value_fpu): Likewise.
2033         (sh_store_return_value_nofpu): Likewise.
2034         (sh_corefile_supply_regset): Likewise.
2035         (sh_corefile_collect_regset): Likewise.
2036         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2037         (sh64_store_return_value): Likewise.
2038         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2039         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2040         (sparc_store_inferior_registers): Likewise.
2041         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2042         (sparc_ravenscar_prepare_to_store): Likewise.
2043         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2044         (sparc_analyze_control_transfer): Likewise.
2045         (sparc_step_trap): Likewise.
2046         (sparc_software_single_step): Likewise.
2047         (sparc32_gdbarch_init): Likewise.
2048         (sparc_supply_rwindow): Likewise.
2049         (sparc_collect_rwindow): Likewise.
2050         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2051         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2052         (sparc64nbsd_collect_gregset): Likewise.
2053         (sparc64nbsd_supply_fpregset): Likewise.
2054         (sparc64nbsd_collect_fpregset): Likewise.
2055         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2056         (sparc64_supply_gregset): Likewise.
2057         (sparc64_collect_gregset): Likewise.
2058         (sparc64_supply_fpregset): Likewise.
2059         (sparc64_collect_fpregset): Likewise.
2060         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2061         * spu-tdep.c (spu_unwind_sp): Likewise.
2062         (spu2ppu_prev_register): Likewise.
2063         (spu_memory_remove_breakpoint): Likewise.
2064         * stack.c (return_command): Likewise.
2065         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2066         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2067         * tracefile.c (trace_save_ctf): Likewise.
2068         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2069         (do_windows_store_inferior_registers): Likewise.
2070         (windows_resume): Likewise.
2071         * xtensa-linux-nat.c (fill_gregset): Likewise.
2072         (supply_gregset_reg): Likewise.
2073         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2074         (xtensa_register_read_masked): Likewise.
2075         (xtensa_supply_gregset): Likewise.
2076         (xtensa_extract_return_value): Likewise.
2077         (xtensa_store_return_value): Likewise.
2078
2079 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2080
2081         * doublest.c (floatformat_from_string): New function.
2082         * doublest.h (floatformat_from_string): Add prototype.
2083
2084         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2085         (OP_FLOAT): ... this.
2086         * expression.h: Do not include "doublest.h".
2087         (union exp_element): Replace doubleconst and decfloatconst by
2088         new element floatconst.
2089         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2090         (ada_evaluate_subexp): Likewise.
2091         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2092         OP_DOUBLE and OP_DECFLOAT.
2093         * expprint.c (print_subexp_standard): Likewise.
2094         (dump_subexp_body_standard): Likewise.
2095         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2096
2097         * parse.c: Include "dfp.h".
2098         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2099         (write_exp_elt_floatcst): New function.
2100         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2101         and OP_DECFLOAT.
2102         (operator_check_standard): Likewise.
2103         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2104         Return target format buffer instead of host DOUBLEST.
2105         Use floatformat_from_string and decimal_from_string to parse
2106         either binary or decimal floating-point types.
2107         (parse_c_float): Remove.
2108         * parser-defs.h: Do not include "doublest.h".
2109         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2110         (write_exp_elt_floatcst): Add prototype.
2111         (parse_float): Update prototype.
2112         (parse_c_float): Remove.
2113
2114         * c-exp.y: Do not include "dfp.h".
2115         (typed_val_float): Use byte buffer instead of DOUBLEST.
2116         (typed_val_decfloat): Remove.
2117         (DECFLOAT): Remove.
2118         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2119         (parse_number): Update to new parse_float interface.
2120         Parse suffixes and determine type before calling parse_float.
2121         Handle decimal and binary FP types the same way.
2122
2123         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2124         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2125         (parse_number): Update to new parse_float interface.
2126         Parse suffixes and determine type before calling parse_float.
2127
2128         * f-exp.y: Replace dval by typed_val_float.
2129         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2130         (parse_number): Use parse_float instead of atof.
2131
2132         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2133         (parse_go_float): Remove.
2134         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2135         (parse_number): Call parse_float instead of parse_go_float.
2136         Parse suffixes and determine type before calling parse_float.
2137
2138         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2139         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2140         (parse_number): Update to new parse_float interface.
2141         Parse suffixes and determine type before calling parse_float.
2142
2143         * m2-exp.y: Replace dval by byte buffer val.
2144         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2145         (parse_number): Call parse_float instead of atof.
2146
2147         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2148         (lex_number): Call parse_float instead of strtod.
2149         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2150         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2151         Use write_exp_elt_floatcst.
2152         (unit_testing): Remove static variable.
2153         (rust_type): Do not check unit_testing.
2154         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2155
2156         * ada-exp.y (type_float, type_double): Remove.
2157         (typed_val_float): Use byte buffer instead of DOUBLEST.
2158         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2159         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2160
2161 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2162
2163         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2164         * arch/aarch64.h: New file.
2165
2166 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2167
2168         * dfp.h (decimal_from_string): Use const reference for argument.
2169         * dfp.c (decimal_from_string): Likewise.
2170
2171 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2172
2173         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2174         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2175         * mips-tdep.c (mips_print_fp_register): Likewise.
2176
2177 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2178
2179         * common/format.h (enum argclass): Replace decfloat_arg by
2180         dec32float_arg, dec64float_arg, and dec128float_arg.
2181         * common/format.c (parse_format_string): Update to return
2182         new decimal float argument classes.
2183
2184         * printcmd.c (printf_decfloat): Rename to ...
2185         (printf_floating): ... this.  Add argclass argument, and use it
2186         instead of parsing the format string again.  Add support for
2187         binary floating-point values, using floatformat_to_string.
2188         Convert value to the target format if it doesn't already match.
2189         (ui_printf): Call printf_floating instead of printf_decfloat,
2190         also for double_arg / long_double_arg.  Pass argclass.
2191
2192         * dfp.c (decimal_to_string): Add format string argument.
2193         * dfp.h (decimal_to_string): Likewise.
2194
2195         * doublest.c (floatformat_to_string): Add format string argument.
2196         * doublest.h (floatformat_to_string): Likewise.
2197
2198 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2199
2200         * doublest.c (floatformat_precision): New routine.
2201         (floatformat_to_string): Likewise.
2202         * doublest.c (floatformat_to_string): Add prototype.
2203
2204         * printcmd.c (print_scalar_formatted): Only call print_floating
2205         on floating-point types.
2206         * valprint.c: Do not include "floatformat.h".
2207         (generic_val_print_decfloat): Remove.
2208         (generic_val_print): Call generic_val_print_float for both
2209         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2210         (print_floating): Use floatformat_to_string.  Handle decimal float.
2211         (print_decimal_floating): Remove, merge into floatformat_to_string.
2212         * value.h (print_decimal_floating): Remove.
2213
2214         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2215
2216 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2217
2218         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2219
2220 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2221
2222         * memattr.h: Don't include vec.h.
2223         (struct mem_attrib): Initialize fields.
2224         <unknown>: New static method.
2225         (struct mem_region): Add constructors, operator<, initialize
2226         fields.
2227         * memattr.c: Include algorithm.
2228         (default_mem_attrib, unknown_mem_attrib): Remove.
2229         (user_mem_region_list): New global.
2230         (target_mem_region_list, mem_region_list): Change type to
2231         std::vector<mem_region>.
2232         (mem_use_target): Now a function.
2233         (target_mem_regions_valid): Change type to bool.
2234         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2235         (require_user_regions): Adjust.
2236         (require_target_regions): Adjust.
2237         (create_mem_region): Adjust.
2238         (lookup_mem_region): Adjust.
2239         (invalidate_target_mem_regions): Adjust.
2240         (mem_clear): Rename to...
2241         (user_mem_clear): ... this, and adjust.
2242         (mem_command): Adjust.
2243         (info_mem_command): Adjust.
2244         (mem_enable, enable_mem_command, mem_disable,
2245         disable_mem_command): Adjust.
2246         (mem_delete): Adjust.
2247         (delete_mem_command): Adjust.
2248         * memory-map.h (parse_memory_map): Return an std::vector.
2249         * memory-map.c (parse_memory_map): Likewise.
2250         (struct memory_map_parsing_data): Add constructor.
2251         <memory_map>: Point to std::vector.
2252         (memory_map_start_memory): Adjust.
2253         (memory_map_end_memory): Adjust.
2254         (memory_map_end_property): Adjust.
2255         (clear_result): Remove.
2256         * remote.c (remote_memory_map): Return an std::vector.
2257         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2258         Remove.
2259         (target_debug_print_mem_region_vector): New.
2260         * target-delegates.c: Regenerate.
2261         * target.h (mem_region_vector): New typedef.
2262         (to_memory_map): Return mem_region_vector.
2263         (target_memory_map): Return an std::vector.
2264         * target.c (target_memory_map): Return an std::vector.
2265         (flash_erase_command): Adjust.
2266
2267 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2268
2269         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2270         Change type to std::string.
2271         (memory_map_start_property): Adjust.
2272         (memory_map_end_property): Adjust.
2273
2274 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2275
2276         * infrun.h: Include common/byte-vector.h.
2277         (struct displaced_step_closure): New struct.
2278         (struct buf_displaced_step_closure): New struct.
2279         * infrun.c (displaced_step_closure::~displaced_step_closure):
2280         Provide default implementation.
2281         (displaced_step_clear): Deallocate step closure with delete.
2282         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2283         (aarch64_displaced_step_closure): ... this, extend
2284         displaced_step_closure.
2285         (aarch64_displaced_step_data) <dsc>: Change type to
2286         aarch64_displaced_step_closure.
2287         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2288         unique_ptr.
2289         (aarch64_displaced_step_fixup): Add cast for displaced step
2290         closure.
2291         * amd64-tdep.c (displaced_step_closure): Rename to ...
2292         (amd64_displaced_step_closure): ... this, extend
2293         displaced_step_closure.
2294         <insn_buf>: Change type to std::vector<gdb_byte>.
2295         <max_len>: Remove.
2296         (fixup_riprel): Change type of DSC parameter, adjust to type
2297         change of insn_buf.
2298         (fixup_displaced_copy): Change type of DSC parameter.
2299         (amd64_displaced_step_copy_insn): Instantiate
2300         amd64_displaced_step_closure.
2301         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2302         to type change of insn_buf.
2303         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2304         parameter DSC.
2305         (arm_linux_copy_svc): Likewise.
2306         (cleanup_kernel_helper_return): Likewise.
2307         (arm_catch_kernel_helper_return): Likewise.
2308         (arm_linux_displaced_step_copy_insn): Instantiate
2309         arm_displaced_step_closure.
2310         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2311         (displaced_read_reg): Change type of parameter DSC.
2312         (branch_write_pc): Likewise.
2313         (load_write_pc): Likewise.
2314         (alu_write_pc): Likewise.
2315         (displaced_write_reg): Likewise.
2316         (arm_copy_unmodified): Likewise.
2317         (thumb_copy_unmodified_32bit): Likewise.
2318         (thumb_copy_unmodified_16bit): Likewise.
2319         (cleanup_preload): Likewise.
2320         (install_preload): Likewise.
2321         (arm_copy_preload): Likewise.
2322         (thumb2_copy_preload): Likewise.
2323         (install_preload_reg): Likewise.
2324         (arm_copy_preload_reg): Likewise.
2325         (cleanup_copro_load_store): Likewise.
2326         (install_copro_load_store): Likewise.
2327         (arm_copy_copro_load_store) Likewise.
2328         (thumb2_copy_copro_load_store): Likewise.
2329         (cleanup_branch): Likewise.
2330         (install_b_bl_blx): Likewise.
2331         (arm_copy_b_bl_blx): Likewise.
2332         (thumb2_copy_b_bl_blx): Likewise.
2333         (thumb_copy_b): Likewise.
2334         (install_bx_blx_reg): Likewise.
2335         (arm_copy_bx_blx_reg): Likewise.
2336         (thumb_copy_bx_blx_reg): Likewise.
2337         (cleanup_alu_imm): Likewise.
2338         (arm_copy_alu_imm): Likewise.
2339         (thumb2_copy_alu_imm): Likewise.
2340         (cleanup_alu_reg): Likewise.
2341         (install_alu_reg): Likewise.
2342         (arm_copy_alu_reg): Likewise.
2343         (thumb_copy_alu_reg): Likewise.
2344         (cleanup_alu_shifted_reg): Likewise.
2345         (install_alu_shifted_reg): Likewise.
2346         (arm_copy_alu_shifted_reg): Likewise.
2347         (cleanup_load): Likewise.
2348         (cleanup_store): Likewise.
2349         (arm_copy_extra_ld_st): Likewise.
2350         (install_load_store): Likewise.
2351         (thumb2_copy_load_literal): Likewise.
2352         (thumb2_copy_load_reg_imm): Likewise.
2353         (arm_copy_ldr_str_ldrb_strb): Likewise.
2354         (cleanup_block_load_all): Likewise.
2355         (cleanup_block_store_pc): Likewise.
2356         (cleanup_block_load_pc): Likewise.
2357         (arm_copy_block_xfer): Likewise.
2358         (thumb2_copy_block_xfer): Likewise.
2359         (cleanup_svc): Likewise.
2360         (install_svc): Likewise.
2361         (arm_copy_svc): Likewise.
2362         (thumb_copy_svc): Likewise.
2363         (arm_copy_undef): Likewise.
2364         (thumb_32bit_copy_undef): Likewise.
2365         (arm_copy_unpred): Likewise.
2366         (arm_decode_misc_memhint_neon): Likewise.
2367         (arm_decode_unconditional): Likewise.
2368         (arm_decode_miscellaneous): Likewise.
2369         (arm_decode_dp_misc): Likewise.
2370         (arm_decode_ld_st_word_ubyte): Likewise.
2371         (arm_decode_media): Likewise.
2372         (arm_decode_b_bl_ldmstm): Likewise.
2373         (arm_decode_ext_reg_ld_st): Likewise.
2374         (thumb2_decode_dp_shift_reg): Likewise.
2375         (thumb2_decode_ext_reg_ld_st): Likewise.
2376         (arm_decode_svc_copro): Likewise.
2377         (thumb2_decode_svc_copro): Likewise.
2378         (install_pc_relative): Likewise.
2379         (thumb_copy_pc_relative_16bit): Likewise.
2380         (thumb_decode_pc_relative_16bit): Likewise.
2381         (thumb_copy_pc_relative_32bit): Likewise.
2382         (thumb_copy_16bit_ldr_literal): Likewise.
2383         (thumb_copy_cbnz_cbz): Likewise.
2384         (thumb2_copy_table_branch): Likewise.
2385         (cleanup_pop_pc_16bit_all): Likewise.
2386         (thumb_copy_pop_pc_16bit): Likewise.
2387         (thumb_process_displaced_16bit_insn): Likewise.
2388         (decode_thumb_32bit_ld_mem_hints): Likewise.
2389         (thumb_process_displaced_32bit_insn): Likewise.
2390         (thumb_process_displaced_insn): Likewise.
2391         (arm_process_displaced_insn): Likewise.
2392         (arm_displaced_init_closure): Likewise.
2393         (arm_displaced_step_fixup): Add cast for closure.
2394         * arm-tdep.h: Include infrun.h.
2395         (displaced_step_closure): Rename to ...
2396         (arm_displaced_step_closure): ... this, extend
2397         displaced_step_closure.
2398         <u::svc::copy_svc_os>: Change type of parameter DSC.
2399         <cleanup>: Likewise.
2400         (arm_process_displaced_insn): Likewise.
2401         (arm_displaced_init_closure): Likewise.
2402         (displaced_read_reg): Likewise.
2403         (displaced_write_reg): Likewise.
2404         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2405         Adjust.
2406         * i386-tdep.h: Include infrun.h.
2407         (i386_displaced_step_closure): New typedef.
2408         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2409         i386_displaced_step_closure.
2410         (i386_displaced_step_fixup): Adjust.
2411         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2412         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2413         and unique_ptr.
2414         (ppc_displaced_step_fixup): Adjust.
2415         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2416         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2417         and unique_ptr.
2418         (s390_displaced_step_fixup): Adjust.
2419
2420 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2421
2422         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2423         Remove declarations.
2424
2425 2017-10-20  Tom Tromey  <tom@tromey.com>
2426
2427         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2428         std::vector.
2429         (gdb_bfd_record_inclusion): Update.
2430         (bfdp): Remove typedef.
2431
2432 2017-10-20  Tom Tromey  <tom@tromey.com>
2433
2434         * gdb_bfd.c (gdb_bfd_ref): Use new.
2435         (struct gdb_bfd_data): Add constructor, destructor, and member
2436         initializers.
2437         (gdb_bfd_unref): Use delete.
2438
2439 2017-10-20  Tom Tromey  <tom@tromey.com>
2440
2441         * exec.c (exec_file_attach): Use new_bfd_ref.
2442         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2443         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2444         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2445         new_bfd_ref.
2446         * gdb_bfd.h (new_bfd_ref): New function.
2447
2448 2017-10-20  Pedro Alves  <palves@redhat.com>
2449
2450         * main.c (captured_command_loop): Add attribute noinline.
2451
2452 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2453
2454         * interps.c (struct interp_factory): Add constructor.
2455         (interp_factory_p): Remove typedef.
2456         (DEF_VEC_P(interp_factory_p)): Remove.
2457         (interpreter_factories): Change type to std::vector.
2458         (interp_factory_register): Adjust.
2459         (interp_lookup): Adjust.
2460         (interpreter_completer): Adjust.
2461
2462 2017-10-19  Tom Tromey  <tom@tromey.com>
2463
2464         * break-catch-syscall.c (catch_syscall_completer): Use
2465         std::string, gdb::unique_xmalloc_ptr.
2466
2467 2017-10-19  Tom Tromey  <tom@tromey.com>
2468
2469         * infcall.c (call_function_by_hand_dummy): Use std::string.
2470
2471 2017-10-19  Tom Tromey  <tom@tromey.com>
2472
2473         * mi/mi-main.c (mi_cmd_execute): Update.
2474         * top.h (prepare_execute_command): Return scoped_value_mark.
2475         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2476         Add move constructor.
2477         * top.c (prepare_execute_command): Return scoped_value_mark.
2478         (execute_command): Update.
2479
2480 2017-10-19  Pedro Alves  <palves@redhat.com>
2481
2482         * xml-support.c (xml_fetch_content_from_file): Check fread's
2483         return.
2484
2485 2017-10-19  Pedro Alves  <palves@redhat.com>
2486
2487         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2488         async.
2489         (handle_error_fd): New function.
2490         (ser_base_async): Add/delete an event loop file handler for
2491         error_fd.
2492
2493 2017-10-19  Pedro Alves  <palves@redhat.com>
2494
2495         * xml-support.c (xml_fetch_content_from_file): Don't read in
2496         chunks.  Instead use fseek to determine the file's size, and read
2497         it in one go.
2498
2499 2017-11-18  Keith Seitz  <keiths@redhat.com>
2500
2501         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2502         types.
2503         Add whitespace to front of type name.
2504
2505 2017-10-18  Keith Seitz  <keiths@redhat.com>
2506
2507         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2508         DW_AT_accessibility.
2509
2510 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2511
2512         * features/tic6x-c62x-linux.c: Remove.
2513
2514 2017-10-17  Tom Tromey  <tom@tromey.com>
2515
2516         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2517         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2518         (do_mixed_source_and_assembly): Likewise.
2519
2520 2017-10-17  Tom Tromey  <tom@tromey.com>
2521
2522         * regcache.c (regcache::xfer_part): Remove assertion.
2523
2524 2017-10-17  Pedro Alves  <palves@redhat.com>
2525
2526         * xml-support.c (xml_fetch_content_from_file): Call
2527         unique_ptr::release() instead unique_ptr::get() when passing
2528         through xrealloc.
2529
2530 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2531
2532         * regcache.c (regcache::xfer_part): Remove parameters read and
2533         write, add parameter is_raw.  All callers are updated.
2534
2535 2017-10-16  Keith Seitz  <keiths@redhat.com>
2536
2537         * c-typeprint.c (enum access_specifier): Moved here from
2538         c_type_print_base.
2539         (output_access_specifier): New function.
2540         (c_type_print_base): Consider typedefs when assessing
2541         whether access labels are needed.
2542         Use output_access_specifier as needed.
2543         Output access specifier for typedefs, if needed.
2544         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2545         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2546         fields.
2547         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2548         accessor macros.
2549
2550 2017-10-16  Tom Tromey  <tom@tromey.com>
2551
2552         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2553         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2554         * target.c (target_fileio_read_stralloc): Update.
2555         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2556         * target.h (target_fileio_read_stralloc): Return
2557         unique_xmalloc_ptr.
2558
2559 2017-10-16  Tom Tromey  <tom@tromey.com>
2560
2561         * xml-syscall.c (xml_init_syscalls_info): Update.
2562         * xml-support.c (xinclude_start_include): Update.
2563         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2564         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2565         (xml_fetch_content_from_file): Likewise.
2566         * osdata.c (get_osdata): Update.
2567         * target.h (target_read_stralloc, target_get_osdata): Return
2568         unique_xmalloc_ptr.
2569         * solib-aix.c (solib_aix_get_library_list): Update.
2570         * solib-target.c (solib_target_current_sos): Update.
2571         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2572         * xml-tdesc.c (fetch_available_features_from_target): Update.
2573         (target_fetch_description_xml): Update.
2574         (file_read_description_xml): Update.
2575         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2576         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2577         (remote_pid_to_exec_file): Update.
2578         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2579         (target_get_osdata): Likewise.
2580
2581 2017-10-16  Tom Tromey  <tom@tromey.com>
2582
2583         * remote.c (remote_register_number_and_offset): Use std::vector.
2584         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2585         (putpkt_binary): Use gdb::def_vector.
2586         (compare_sections_command): Use gdb::byte_vector.
2587
2588 2017-10-16  Tom Tromey  <tom@tromey.com>
2589
2590         * ppc-linux-nat.c (hwdebug_insert_point): Use
2591         gdb::unique_xmalloc_ptr, XDUP.
2592
2593 2017-10-16  Tom Tromey  <tom@tromey.com>
2594
2595         * probe.c (parse_probes): Use std::string.
2596         (info_probes_for_ops, enable_probes_command)
2597         (disable_probes_command): Remove cleanups.
2598
2599 2017-10-16  Tom Tromey  <tom@tromey.com>
2600
2601         * buildsym.c (block_compar): Remove.
2602         (end_symtab_get_static_block): Use std::vector.
2603
2604 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2605
2606         * memrange.h (struct mem_range): Define operator< and operator==.
2607         (mem_range_s): Remove.
2608         (DEF_VEC_O (mem_range_s)): Remove.
2609         (normalize_mem_ranges): Change parameter type to std::vector.
2610         * memrange.c (compare_mem_ranges): Remove.
2611         (normalize_mem_ranges): Change parameter type to std::vector,
2612         adjust to vector change.
2613         * exec.c (section_table_available_memory): Return vector, remove
2614         parameter.
2615         (section_table_read_available_memory): Adjust to std::vector
2616         change.
2617         * remote.c (remote_read_bytes): Adjust to std::vector
2618         change.
2619         * tracepoint.h (traceframe_available_memory): Change parameter
2620         type to std::vector.
2621         * tracepoint.c (traceframe_available_memory): Change parameter
2622         type to std::vector, adjust.
2623         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2624         std::vector change.
2625         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2626         unittests/memrange-selftests.c.
2627         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2628         * gdb/unittests/memrange-selftests.c: New file.
2629
2630 2017-10-16  Pedro Alves  <palves@redhat.com>
2631
2632         * elfread.c (probe_key_free): Rename range-for variable.
2633         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2634         (find_probe_by_pc, collect_probes): Rename range-for variable.
2635
2636 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2637
2638         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2639         * features/tic6x-c62x.c: Remove.
2640         * features/tic6x-c64x-linux.c: Remove.
2641         * features/tic6x-c64x.c: Remove.
2642         * features/tic6x-c64xp-linux.c: Remove.
2643         * features/tic6x-c64xp.c: Remove.
2644         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2645         initialize_tdesc_tic6x_*_linux functions.
2646         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2647         initialize_tdesc_tic6x_* functions.
2648
2649 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2650
2651         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2652         tic6x-c62x.
2653         * regformats/tic6x-c62x.dat: Remove.
2654         * regformats/tic6x-c64x.dat: Remove.
2655         * regformats/tic6x-c64xp.dat: Remove.
2656
2657 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2658
2659         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2660         (the !HAVE_LIBEXPAT version).
2661
2662 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2663
2664         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2665         const.
2666
2667 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2668
2669         * target.h: Include tracepoint.h.
2670         (enum trace_find_type): Move to tracepoint.h.
2671         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2672         * tracepoint.h: Don't include target.h
2673         (enum trace_find_type): Move from target.h.
2674         (parse_traceframe_info): Return a unique ptr.
2675         * tracepoint.c (current_traceframe_info): Change type to unique
2676         ptr.
2677         (free_traceframe_info): Remove.
2678         (clear_traceframe_info): Don't manually free
2679         current_traceframe_info.
2680         (free_result): Remove.
2681         (parse_traceframe_info): Return a unique ptr.
2682         (get_traceframe_info): Adjust to unique ptr.
2683         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2684         * remote.c (remote_traceframe_info): Return a unique ptr.
2685         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2686         ptr.
2687         * target-debug.h (target_debug_print_traceframe_info_up): New
2688         macro.
2689         * target-delegates.c: Regenerate.
2690
2691 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2692
2693         * memrange.h (struct mem_range): Add constructors.
2694         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2695         std::vector<mem_range>.
2696         * tracepoint.c (free_traceframe_info): Don't manually free
2697         vector.
2698         (traceframe_info_start_memory): Adjust to vector change.
2699         (traceframe_available_memory): Likewise.
2700         * tracefile-tfile.c (build_traceframe_info): Likewise.
2701         * ctf.c (ctf_traceframe_info): Likewise.
2702
2703 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2704
2705         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2706         std::vector<int>.
2707         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2708         (traceframe_info_start_tvar): Adjust to vector change.
2709         (parse_traceframe_info): Allocate with new.
2710         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2711         vector change.
2712         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2713         change.
2714         tfile_traceframe_info): Allocate with new.
2715         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2716         change.
2717
2718 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2719
2720         * tracepoint.c (traceframe_info): Rename to...
2721         (current_traceframe_info): ...this.
2722         (clear_traceframe_info): Adjust.
2723         (get_traceframe_info): Adjust.
2724
2725 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2726
2727         * nat/linux-osdata.c: Include algorithm.
2728         (compare_processes): Remove.
2729         (struct pid_pgid_entry): New struct.
2730         (linux_xfer_osdata_processgroups): Use std::vector instead of
2731         XNEWVEC.
2732
2733 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2734
2735         * objfiles.h: Don't include symfile.h.
2736         (struct partial_symbol): Remove forward-declaration.
2737         (struct objfile) <global_psymbols, static_psymbols>: Change type
2738         to std::vector<partial_symbol *>.
2739         * objfiles.c (objfile::objfile): Don't memset those fields.
2740         (objfile::~objfile): Don't free those fields.
2741         * psympriv.h (struct psymbol_allocation_list): Remove
2742         forward-declaration.
2743         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2744         to std::vector.
2745         (start_psymtab_common): Change parameters to std::vector.
2746         * psymtab.c: Include algorithm.
2747         (require_partial_symbols): Call shrink_to_fit.
2748         (find_pc_sect_psymbol): Adjust to vector change.
2749         (match_partial_symbol): Likewise.
2750         (lookup_partial_symbol): Likewise.
2751         (psym_relocate): Likewise.
2752         (dump_psymtab): Likewise.
2753         (recursively_search_psymtabs): Likewise.
2754         (compare_psymbols): Remove.
2755         (sort_pst_symbols): Adjust to vector change.
2756         (start_psymtab_common): Likewise.
2757         (end_psymtab_common): Likewise.
2758         (psymbol_bcache_full): De-constify return value.
2759         (add_psymbol_to_bcache): Likewise.
2760         (extend_psymbol_list): Remove.
2761         (append_psymbol_to_list): Adjust to vector change.
2762         (add_psymbol_to_list): Likewise.
2763         (init_psymbol_list): Likewise.
2764         (maintenance_info_psymtabs): Likewise.
2765         (maintenance_check_psymtabs): Likewise.
2766         * symfile.h (struct psymbol_allocation_list): Remove.
2767         * symfile.c (reread_symbols): Adjust to vector change.
2768         * dbxread.c (start_psymtab): Change type of parameters.
2769         (dbx_symfile_read): Adjust to vector change.
2770         (read_dbx_symtab): Likewise.
2771         (start_psymtab): Change type of parameters.
2772         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2773         (create_partial_symtab): Likewise.
2774         (add_partial_symbol): Likewise.
2775         (write_one_signatured_type): Likewise.
2776         (recursively_write_psymbols): Likewise.
2777         * mdebugread.c (parse_partial_symbols): Likewise.
2778         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2779         (scan_xcoff_symtab): Adjust to vector change.
2780         (xcoff_initial_scan): Likewise.
2781
2782 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2783
2784         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2785
2786 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2787
2788         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2789         Remove s390x-*-expedite, add s390x-expedite.
2790
2791 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2792
2793         * features/s390-gs-linux64.c: Regenerated.
2794         * features/s390x-gs-linux64.c: Regenerated.
2795
2796 2017-10-13  Tom Tromey  <tom@tromey.com>
2797
2798         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2799         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2800         delete.
2801         * symfile.c (symbol_file_add_with_addrs): Use new.
2802         (symbol_file_add_separate): Update comment.
2803         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2804         * jit.c (jit_object_close_impl): Use new.
2805         (jit_unregister_code): Use delete.
2806         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2807         (~objfile): Rename from free_objfile.
2808         (free_objfile_separate_debug, do_free_objfile_cleanup)
2809         (free_all_objfiles, objfile_purge_solibs): Use delete.
2810         * objfiles.h (struct objfile): Add constructor and destructor.
2811         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2812         (allocate_objfile, free_objfile): Don't declare.
2813         (struct objstats): Add initializers.
2814
2815 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2816
2817         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2818         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2819         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2820         * gdbarch.h: Regenerate.
2821         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2822         Adjust comment.
2823         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2824         (i386_displaced_step_fixup): Adjust comment.
2825         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2826
2827 2017-10-12  Tom Tromey  <tom@tromey.com>
2828
2829         * prologue-value.h (pv_area::store_would_trash): Return bool.
2830         (pv_area::find_reg): Likewise.
2831         * prologue-value.c (pv_area::store_would_trash): Return bool.
2832         (pv_area::find_reg): Likewise.
2833
2834 2017-10-12  Tom Tromey  <tom@tromey.com>
2835
2836         * s390-linux-tdep.c (s390_store, s390_load)
2837         (s390_check_for_saved, s390_analyze_prologue): Update.
2838         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2839         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2840         * prologue-value.h (class pv_area): Move from prologue-value.c.
2841         Change names of members.  Add constructor, destructor, member
2842         functions.
2843         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2844         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2845         (pv_area_fetch, pv_area_scan): Don't declare.
2846         * prologue-value.c (struct pv_area::area_entry): Now member of
2847         pv_area.
2848         (struct pv_area): Move to prologue-value.h.
2849         (pv_area::pv_area): Rename from make_pv_area.
2850         (pv_area::~pv_area): Rename from free_pv_area.
2851         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2852         (clear_entries, find_entry, overlaps, store_would_trash, store)
2853         (fetch, find_reg, scan): Now member of pv_area.
2854         Remove "area" argument.  Update.
2855         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2856         Update.
2857         * mn10300-tdep.c (push_reg, check_for_saved)
2858         (mn10300_analyze_prologue): Update.
2859         * mep-tdep.c (is_arg_spill, check_for_saved)
2860         (mep_analyze_prologue): Update.
2861         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2862         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2863         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2864         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2865         Update.
2866         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2867         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2868
2869 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2870
2871         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2872         * linux-nat.c (linux_nat_delete_thread): New variable.
2873         (lwp_free): Invoke linux_nat_delete_thread if set.
2874         (linux_nat_set_delete_thread): New function.
2875         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2876         thread delete callback.
2877         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2878         (_initialize_arm_linux_nat): Assign thread delete callback.
2879         * s390-linux-nat.c (s390_delete_thread): New function.
2880         (_initialize_s390_nat): Assign thread delete callback.
2881         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2882         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2883         function.
2884         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2885         declaration.
2886         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2887         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2888
2889 2017-10-09  Tom Tromey  <tom@tromey.com>
2890
2891         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2892         std::string.
2893         * tui/tui-layout.c (enum tui_status): Use std::string.
2894
2895 2017-10-11  Tom Tromey  <tom@tromey.com>
2896
2897         * gdbthread.h (thread_command): Constify.
2898         * inferior.h (detach_command): Constify.
2899         * top.h (set_history, show_history): Constify.
2900         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2901         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2902         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2903         * printcmd.c (set_command): Constify.
2904         (non_const_set_command): New function.
2905         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2906         * breakpoint.c (enable_command, disable_command, delete_command)
2907         (catch_command, tcatch_command, set_breakpoint_cmd)
2908         (show_breakpoint_cmd): Constify.
2909         * macrocmd.c (macro_command): Constify.
2910         * infcmd.c (unset_command, kill_command, detach_command)
2911         (info_proc_cmd): Constify.
2912         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2913         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2914         (info_auto_load_cmd): Constify.
2915         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2916         (unset_tdesc_cmd): Constify.
2917         * ada-lang.c (set_ada_command, show_ada_command)
2918         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2919         * guile/guile.c (set_guile_command, show_guile_command)
2920         (info_guile_command): Constify.
2921         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2922         Constify.
2923         * skip.c (skip_command): Constify.
2924         * compile/compile.c (_initialize_compile): Constify.
2925         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2926         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2927         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2928         (maint_btrace_pt_show_cmd): Constify.
2929         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2930         Constify.
2931         * python/python.c (user_show_python, user_set_python): Constify.
2932         * mips-tdep.c (set_mips_command, show_mips_command)
2933         (set_mipsfpu_command): Constify.
2934         * record-btrace.c (cmd_record_btrace_start)
2935         (cmd_set_record_btrace, cmd_show_record_btrace)
2936         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2937         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2938         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2939         Constify.
2940         * symfile.c (overlay_command): Constify.
2941         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2942         * cli/cli-logging.c (set_logging_command, show_logging_command):
2943         Constify.
2944         * cli/cli-dump.c (dump_command, append_command)
2945         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2946         (tekhex_dump_command, binary_dump_command)
2947         (binary_append_command): Constify.
2948         * cli/cli-decode.c (struct cmd_list_element): Change type of
2949         "fun".
2950         * cli/cli-cmds.c (info_command, show_command, set_debug)
2951         (show_debug): Constify.
2952         (show_command): Add non-const overload.
2953         * top.c (set_history, show_history): Constify.
2954         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2955         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2956         * target.c (target_command): Constify.
2957         * sparc64-tdep.c (info_adi_command): Constify.
2958         * record-full.c (cmd_record_full_start): Constify.
2959         (set_record_full_command): Constify.  Fix typo.
2960         (show_record_full_command): Constify.
2961         * thread.c (thread_command, thread_apply_command): Constify.
2962         * memattr.c (dummy_cmd): Constify.
2963         * value.c (function_command): Constify.
2964         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2965         * probe.c (info_probes_command): Constify.
2966         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2967         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2968         (show_thread_cmd, set_thread_default_cmd)
2969         (show_thread_default_cmd): Constify.
2970         (check_empty): Constify.
2971         * tracepoint.c (tfind_command): Constify.
2972         * cp-support.c (maint_cplus_command): Constify.
2973         * windows-tdep.c (info_w32_command): Constify.
2974         * record.c (cmd_record_start, set_record_command)
2975         (show_record_command, info_record_command, cmd_record_goto):
2976         Constify.
2977         * ravenscar-thread.c (set_ravenscar_command)
2978         (show_ravenscar_command): Constify.
2979         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2980         Constify.
2981         (add_internal_problem_command): Remove casts.
2982         * arc-tdep.c (maintenance_print_arc_command): Constify.
2983         * valprint.c (set_print, show_print, set_print_raw)
2984         (show_print_raw): Constify.
2985         * maint.c (maintenance_command, maintenance_info_command)
2986         (maintenance_print_command, maintenance_set_cmd)
2987         (maintenance_show_cmd, set_per_command_cmd)
2988         (show_per_command_cmd, maintenance_check_command): Constify.
2989         * language.c (set_check, show_check): Constify.
2990         * typeprint.c (show_print_type, set_print_type): Constify.
2991         * go32-nat.c (go32_info_dos_command): Constify.
2992
2993 2017-10-11  Tom Tromey  <tom@tromey.com>
2994
2995         * breakpoint.c (prepare_re_set_context): Remove.
2996         (breakpoint_re_set_one): Update.  Don't use cleanups.
2997         (breakpoint_re_set): Use scoped_restore, std::string, and
2998         scoped_restore_current_language.
2999
3000 2017-10-11  Tom Tromey  <tom@tromey.com>
3001
3002         * breakpoint.c (commands_command_1): Use std::string.
3003         (cleanup_executing_breakpoints): Remove.
3004         (bpstat_do_actions_1): Use scoped_restore.
3005         (bpstat_check_watchpoint): Use std::string.
3006         (decode_static_tracepoint_spec): Likewise.
3007         (break_range_command): Likewise.
3008         (watch_command_1): Likewise.
3009         (compare_breakpoints): Change argument types.
3010         (clear_command): Use std::vector.
3011         (cleanup_executing_breakpoints): Remove.
3012         (update_global_location_list): Use unique_xmalloc_ptr.
3013         (strace_command): Remove unused declaration.
3014
3015 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3016
3017         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3018         * NEWS: Mention new FreeBSD/arm native configuration.
3019         * configure.host: Add arm*-*-freebsd*.
3020         * configure.nat: Likewise.
3021         * arm-fbsd-nat.c: New file.
3022
3023 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3024
3025         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3026         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3027         * NEWS: Mention new FreeBSD/arm target.
3028         * configure.tgt: Add arm*-*-freebsd*.
3029         * arm-fbsd-tdep.c: New file.
3030         * arm-fbsd-tdep.h: New file.
3031
3032 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3033
3034         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3035         `gdbarch_elfcore_write_linux_prpsinfo'.
3036         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3037         method.
3038         (elf_internal_linux_prpsinfo): Remove declaration.
3039         * gdbarch.h: Regenerate.
3040         * gdbarch.c: Regenerate.
3041
3042 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3043
3044         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3045         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3046
3047 2017-10-11  Pedro Alves  <palves@redhat.com>
3048
3049         * breakpoint.c (reattach_breakpoints): Delete.
3050         * breakpoint.h (reattach_breakpoints): Delete.
3051
3052 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3053
3054         * symfile.c (registered_sym_fns): Make struct, not typedef.
3055         (DEF_VEC_O (registered_sym_fns)): Remove.
3056         (symtab_fns): Change type to std::vector.
3057         (add_symtab_fns): Adjust.
3058         (find_sym_fns): Adjust.
3059
3060 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3061
3062         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3063         * arc-tdep.h (arc_arch_is_em): New function.
3064         (arc_arch_is_hs): Likewise.
3065
3066 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3067
3068         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3069         parentheses in the declaration.
3070         (macro_lookup_inclusion): Likewise.
3071         (macro_lookup_definition): Likewise.
3072         * p-lang.h (pascal_builtin_types): Likewise.
3073         * tui/tui-data.c (tui_win_list): Likewise.
3074         * tui/tui-data.h (tui_win_list): Likewise.
3075         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3076
3077 2017-10-11  Mark Rages  <markrages@gmail.com>
3078
3079         * target-memory.c (block_boundaries): Fix for block address not
3080         aligned on block size.
3081
3082 2017-10-10  Pedro Alves <palves@redhat.com>
3083             Tom Tromey  <tom@tromey.com>
3084
3085         * breakpoint.c (struct captured_breakpoint_query_args)
3086         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3087         (print_breakpoint): New.
3088         * breakpoint.h (print_breakpoint): Declare.
3089         * common/common-exceptions.h (enum return_reason): Remove
3090         references to catch_exceptions.
3091         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3092         Delete.
3093         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3094         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3095         * gdb.h: Delete.
3096         * gdbthread.h (thread_select): Declare.
3097         * mi/mi-cmd-break.c: Don't include gdb.h.
3098         (breakpoint_notify): Use print_breakpoint.
3099         * mi/mi-cmd-catch.c: Don't include gdb.h.
3100         * mi/mi-interp.c: Don't include gdb.h.
3101         (mi_print_breakpoint_for_event): New.
3102         (mi_breakpoint_created, mi_breakpoint_modified): Use
3103         mi_print_breakpoint_for_event.
3104         * mi/mi-main.c: Don't include gdb.h.
3105         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3106         thread_select instead of gdb_thread_select.
3107         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3108         of using gdb_list_thread_ids.
3109         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3110         FILEIO_ENOSYS here.
3111         (remote_fileio_request): Use TRY/CATCH instead of
3112         catch_exceptions.
3113         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3114         (symbol_file_add_from_memory_wrapper): Delete.
3115         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3116         * thread.c: Don't include gdb.h.
3117         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3118         (thread_alive): Use thread_select.
3119         (do_captured_thread_select): Delete, parts salvaged as ...
3120         (thread_select): ... this new function.
3121         (gdb_thread_select): Delete.
3122
3123 2017-10-10  Pedro Alves  <palves@redhat.com>
3124             Tom Tromey  <tom@tromey.com>
3125
3126         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3127         and reverse logic.
3128         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3129         No longer macros.  Instead ...
3130         (enum wp_check_result): They're now values of this new
3131         enumeration.
3132         (watchpoint_check): Change return type to wp_check_result and
3133         parameter type to bpstat.
3134         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3135         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3136         catch_errors.  Reverse logic of watchpoint_check call.
3137         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3138         pointer as parameter.
3139         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3140         * common/common-exceptions.c (throw_exception_sjlj): Update
3141         comments to avoid mentioning catch_errors.
3142         * exceptions.c (catch_errors): Delete.
3143         * exceptions.h: Update comments to avoid mentioning catch_errors.
3144         (catch_errors_ftype, catch_errors): Delete.
3145         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3146         (hook_stop_stub): Delete.
3147         (restore_selected_frame): Change return type to void, and
3148         parameter type to const frame_id &.
3149         (restore_infcall_control_state): Use TRY/CATCH instead of
3150         catch_errors.
3151         * main.c (captured_command_loop): Return void and remove
3152         parameter.  Remove references to catch_errors.
3153         (captured_main): Use TRY/CATCH instead of catch_errors.
3154         * objc-lang.c (objc_submethod_helper_data)
3155         (find_objc_msgcall_submethod_helper): Delete.
3156         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3157         catch_errors.
3158         * record-full.c (record_full_message): Return void.
3159         (record_full_message_args, record_full_message_wrapper): Delete.
3160         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3161         instead of catch_errors.
3162         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3163         parameter type to int.
3164         * solib-darwin.c (open_symbol_file_object): Ditto.
3165         * solib-dsbt.c (open_symbol_file_object): Ditto.
3166         * solib-frv.c (open_symbol_file_object): Ditto.
3167         * solib-svr4.c (open_symbol_file_object): Ditto.
3168         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3169         * solib.c (update_solib_list): Use TRY/CATCH instead of
3170         catch_errors.
3171         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3172         Change type.
3173         * symmisc.c (struct print_symbol_args): Remove.
3174         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3175         (print_symbol): Change type.
3176         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3177         and remove parameters.
3178         (catch_errors): New.
3179         (get_windows_debug_event): Adjust.
3180
3181 2017-10-09  Tom Tromey  <tom@tromey.com>
3182
3183         * mi/mi-main.c (free_splay_tree): Remove.
3184         (list_available_thread_groups): Use splay_tree_up.
3185         * common/gdb_splay_tree.h: New file.
3186
3187 2017-10-09  Tom Tromey  <tom@tromey.com>
3188
3189         * mi/mi-main.c (do_nothing): Remove.
3190         (list_available_thread_groups): Update.
3191
3192 2017-10-09  Pedro Alves  <palves@redhat.com>
3193
3194         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3195         reading registers when switching context.
3196
3197 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3198
3199         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3200         (fbsd_convert_siginfo): Likewise.
3201         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3202
3203 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3204
3205         * configure.ac (try_guile_versions): Remove guile-2.2.
3206         * configure: Regenerate.
3207
3208 2017-10-09  Tom Tromey  <tom@tromey.com>
3209
3210         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3211         (COMPILE.pre): Use $(CXX).
3212
3213 2017-10-09  Pedro Alves  <palves@redhat.com>
3214
3215         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3216         Use bool.
3217         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3218         * cp-support.h (cp_remove_params): Now returns a
3219         gdb::unique_xmalloc_ptr.
3220         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3221         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3222         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3223         returning a gdb::unique_xmalloc_ptr.
3224         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3225         * stack.c (find_frame_funname): Adjust to cp_remove_params
3226         returning a gdb::unique_xmalloc_ptr.
3227
3228 2017-10-08  Tom Tromey  <tom@tromey.com>
3229
3230         * dwarf2read.c (dwarf2_get_dwz_file): Use
3231         gdb::unique_xmalloc_ptr.
3232         (find_slot_in_mapped_hash): Likewise.
3233         (dwarf2_physname): Likewise.
3234         (create_dwo_unit_in_dwp_v1): Use std::string.
3235         (create_dwo_unit_in_dwp_v2): Likewise.
3236         (lookup_dwo_cutu): Likewise.
3237         (inherit_abstract_dies): Use std::vector.
3238         (read_array_type): Likewise.
3239         (dwarf_decode_macros): Remove unused declaration.
3240         (unsigned_int_compar): Remove.
3241         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3242         (psymtabs_addrmap_cleanup): Remove.
3243
3244 2017-10-08  Tom Tromey  <tom@tromey.com>
3245
3246         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3247         * frame.h (frame_cleanup_after_sniffer): Declare.
3248         (frame_prepare_for_sniffer): Return void.
3249         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3250         type of argument.
3251         (frame_prepare_for_sniffer): Return void.
3252
3253 2017-10-08  Tom Tromey  <tom@tromey.com>
3254
3255         * utils.h (make_cleanup_value_free): Remove.
3256         * utils.c (do_value_free, struct cleanup): Remove.
3257         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3258         Use gdb_value_up.
3259         * value.h (struct value_deleter): New.
3260         (gdb_value_up): New typedef.
3261
3262 2017-10-08  Tom Tromey  <tom@tromey.com>
3263
3264         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3265         (make_cleanup_free_search_symbols): Remove.
3266         (search_symbols): Return std::vector.
3267         (symbol_search::compare_search_syms): Now member of
3268         symbol_search.  Change arguments.
3269         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3270         (symtab_symbol_info, rbreak_command): Update.
3271         * symtab.h (struct symbol_search) <next>: Remove.
3272         Add constructors.
3273         (symbol_search::operator<): New function.
3274         (symbol_search::operator==): New function.
3275         (search_symbols): Remove std::vector.
3276         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3277         (symbol_search::compare_search_syms): Declare.
3278
3279 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3280
3281         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3282         arch/aarch64-insn.o.
3283         Remove one rule.
3284         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3285
3286 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3287
3288         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3289         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3290         arch/arm-linux.o respectively.
3291         * configure.tgt: Likewise.
3292
3293 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3294
3295         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3296         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3297
3298 2017-10-06  Pedro Alves  <palves@redhat.com>
3299
3300         * windows-nat.c: Include <algorithm>.
3301
3302 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3303
3304         * configure.tgt (i386_tobjs): New variable.
3305         (amd64_tobjs): New variable.
3306         Set $cpu_obs and $os_obs.
3307
3308 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3309
3310         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3311         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3312         (clean): Remove object files and dependency files.
3313         (distclean): Remove the directory.
3314         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3315         * configure: Re-generated.
3316         * configure.tgt: Replace amd64.o with arch/amd64.o.
3317
3318 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3319
3320         PR build/22188
3321         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3322         and SETEND.
3323
3324 2017-10-05  Pedro Alves  <palves@redhat.com>
3325
3326         * linux-nat.c (linux_child_follow_fork): When following the parent
3327         and detaching the child, consult the parent thread's architecture
3328         instead of the child's.
3329
3330 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3331
3332         * ax.h: Do not include "doublest.h".
3333         (union agent_val): Remove.
3334
3335 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3336
3337         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3338         (decimal_to_string): Return std::string object.
3339         (decimal_from_string): Accept std::string object.  Return bool.
3340         (decimal_from_integral, decimal_from_doublest): Remove.
3341         (decimal_from_longest): Add prototype.
3342         (decimal_from_ulongest): Likewise.
3343         (decimal_to_longest): Likewise.
3344         (decimal_from_doublest): Likewise.
3345         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3346         (MAX_DECIMAL_STRING): Move here.
3347         (decimal_to_string): Return std::string object.
3348         (decimal_from_string): Accept std::string object.  Return bool.
3349         (decimal_from_integral): Remove, replace by ...
3350         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3351         (decimal_to_longest): New function.
3352         (decimal_from_floating): Remove, replace by ...
3353         (decimal_from_doublest): ... this new function.
3354         (decimal_to_doublest): Update to new decimal_to_string interface.
3355
3356         * value.c (unpack_long): Use decimal_to_longest.
3357         * valops.c (value_cast): Use decimal_from_doublest instead of
3358         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3359         decimal_from_integral.
3360         * valarith.c (value_args_as_decimal): Likewise.
3361         * valprint.c (print_decimal_floating): Update to new
3362         decimal_to_string interface.
3363         * printcmd.c (printf_decfloat): Likewise.
3364         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3365
3366 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3367
3368         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3369         * gdbtypes.c: Include "floatformat.h".
3370         * value.c: Likewise.
3371         * m68k-tdep.c: Likewise.
3372
3373         * findvar.c: Do not include "floatformat.h".
3374         * amd64-darwin-tdep.c: Likewise.
3375         * arm-linux-tdep.c: Likewise.
3376         * i386-darwin-tdep.c: Likewise.
3377         * i387-tdep.c: Likewise.
3378         * m68k-linux-tdep.c: Likewise.
3379         * mep-tdep.c: Likewise.
3380         * mips-tdep.c: Likewise.
3381         * nios2-tdep.c: Likewise.
3382         * s390-linux-tdep.c: Likewise.
3383         * sparc-obsd-tdep.c: Likewise.
3384         * sparc-tdep.c: Likewise.
3385         * sparc64-tdep.c: Likewise.
3386         * spu-tdep.c: Likewise.
3387         * tic6x-tdep.c: Likewise.
3388         * tilegx-tdep.c: Likewise.
3389         * vax-tdep.c: Likewise.
3390         * xstormy16-tdep.c: Likewise.
3391         * xtensa-tdep.c: Likewise.
3392
3393         * top.c: Do not include "doublest.h".
3394         * aarch64-tdep.c: Likewise.
3395         * alpha-tdep.c: Likewise.
3396         * arm-linux-tdep.c: Likewise.
3397         * m68k-linux-tdep.c: Likewise.
3398         * tilegx-tdep.c: Likewise.
3399         * xstormy16-tdep.c: Likewise.
3400
3401 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3402
3403         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3404         (mipsn32_fbsd_sigframe): Define.
3405         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3406         for FreeBSD/mipsn32.
3407
3408 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3409
3410         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3411         AT_HWCAP.
3412
3413 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3414
3415         * MAINTAINERS (Misc): Update my email address.
3416
3417 2017-10-04  Pedro Alves  <palves@redhat.com>
3418
3419         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3420         it instead of target_gdbarch.
3421         (get_remote_state, get_remote_packet_size): Adjust
3422         get_remote_arch_state calls, passing down target_gdbarch
3423         explicitly.
3424         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3425         'gdbarch' and use it instead of target_gdbarch.
3426         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3427         passing down target_gdbarch explicitly.
3428         (struct stop_reply) <arch>: New field.
3429         (remote_parse_stop_reply): Use the stopped thread's architecture,
3430         not the current inferior's.  Save the architecture in the
3431         stop_reply.
3432         (process_stop_reply): Use the stop reply's architecture.
3433         (process_g_packet, remote_fetch_registers)
3434         (remote_prepare_to_store, store_registers_using_G)
3435         (remote_store_registers): Adjust get_remote_arch_state calls,
3436         using the regcache's architecture.
3437         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3438         passing down target_gdbarch explicitly.
3439         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3440         beneath instead of calling target_gdbarch.
3441         * target.c (default_thread_architecture): Use the specified
3442         inferior's architecture, instead of the current inferior's
3443         architecture (via target_gdbarch).
3444
3445 2017-10-04  Pedro Alves  <palves@redhat.com>
3446
3447         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3448         case.
3449         (regcache_print): Handle !target_has_registers here instead.
3450
3451 2017-10-04  Pedro Alves  <palves@redhat.com>
3452
3453         * frame.c (create_test_frame): Delete.
3454         * frame.h (create_test_frame): Delete.
3455         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3456         (class regcache_test): Delete.
3457         (test_target_has_registers, test_target_has_stack)
3458         (test_target_has_memory, test_target_prepare_to_store)
3459         (test_target_store_registers): New functions.
3460         (test_target_ops): New class.
3461         (register_to_value_test): Error out if there's already a
3462         process_stratum (or higher) target pushed.  Create a fuller mock
3463         environment, with mock target_ops, inferior, address space, thread
3464         and inferior_ptid.
3465         * progspace.c (struct address_space): Move to ...
3466         * progspace.h (struct address_space): ... here.
3467         * regcache.h (regcache::~regcache, regcache::raw_write)
3468         [GDB_SELF_TEST]: No longer virtual.
3469
3470 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3471
3472         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3473
3474 2017-10-04  Pedro Alves  <palves@redhat.com>
3475
3476         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3477         out of 'between TRY and CATCH'.
3478
3479 2017-10-04  Pedro Alves  <palves@redhat.com>
3480
3481         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3482         * common/common-exceptions.h (TRY): Open an outermost scope.
3483         Expand intro comment.
3484         (CATCH): Reindent.
3485         (END_CATCH): Close the outermost scope.
3486         * completer.c (complete_line_internal): Add missing END_CATCH.
3487
3488 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3489
3490         * NEWS (Changes since GDB 8.0): Add entry about new
3491         'set-cwd-on-gdbserver' feature.
3492         (New remote packets): Add entry for QSetWorkingDir.
3493         * common/common-inferior.h (set_inferior_cwd): New prototype.
3494         * infcmd.c (set_inferior_cwd): Remove "static".
3495         (show_cwd_command): Expand text to include remote debugging.
3496         * remote.c: Add PACKET_QSetWorkingDir.
3497         (remote_protocol_features) <QSetWorkingDir>: New entry for
3498         PACKET_QSetWorkingDir.
3499         (extended_remote_set_inferior_cwd): New function.
3500         (extended_remote_create_inferior): Call
3501         "extended_remote_set_inferior_cwd".
3502         (_initialize_remote): Call "add_packet_config_cmd" for
3503         QSetWorkingDir.
3504
3505 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3506
3507         * NEWS (New commands): Mention "set/show cwd".
3508         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3509         "cd" command's help text.
3510         * common/common-inferior.h (get_inferior_cwd): New prototype.
3511         * infcmd.c (inferior_cwd_scratch): New global variable.
3512         (set_inferior_cwd): New function.
3513         (get_inferior_cwd): Likewise.
3514         (set_cwd_command): Likewise.
3515         (show_cwd_command): Likewise.
3516         (_initialize_infcmd): Add "set/show cwd" commands.
3517         * inferior.h (class inferior) <cwd>: New field.
3518         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3519         (fork_inferior): Change inferior's cwd before its execution.
3520         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3521         to CreateProcess.
3522
3523 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3524
3525         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3526         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3527         (COMMON_OBS): Add gdb_tilde_expand.o.
3528         * common/gdb_tilde_expand.c: New file.
3529         * common/gdb_tilde_expand.h: Likewise.
3530
3531 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3532
3533         * gdbarch.sh (objfile): Remove duplicate declaration.
3534         * gdbarch.h: Regenerate.
3535
3536 2017-10-03  Tom Tromey  <tom@tromey.com>
3537
3538         * utils.c (internal_vproblem): Use string_vprintf.
3539
3540 2017-10-03  Tom Tromey  <tom@tromey.com>
3541
3542         * printcmd.c (info_symbol_command): Use std::string.
3543
3544 2017-10-03  Tom Tromey  <tom@tromey.com>
3545
3546         * top.c (gdb_safe_append_history): Use std::string.
3547
3548 2017-10-03  Tom Tromey  <tom@tromey.com>
3549
3550         * event-top.c (stdin_event_handler): Update.
3551         * main.c (captured_main_1): Update.
3552         * top.h (make_delete_ui_cleanup): Remove.
3553         (struct ui): Add constructor and destructor.
3554         (new_ui, delete_ui): Remove.
3555         * top.c (make_delete_ui_cleanup): Remove.
3556         (new_ui_command): Use std::unique_ptr.
3557         (delete_ui_cleanup): Remove.
3558         (ui::ui): Rename from new_ui.  Update.
3559         (free_ui): Remove.
3560         (ui::~ui): Rename from delete_ui.  Update.
3561
3562 2017-10-03  Tom Tromey  <tom@tromey.com>
3563
3564         * symfile.c (load_progress): Use gdb::byte_vector.
3565
3566 2017-10-03  Tom Tromey  <tom@tromey.com>
3567
3568         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3569         declaration.
3570         * printcmd.c (x_command): Remove unused declaration.
3571         * symfile.c (symbol_file_command): Remove unused declaration.
3572
3573 2017-10-03  Tom Tromey  <tom@tromey.com>
3574
3575         * utils.c (internal_vproblem): Use std::string.
3576         (defaulted_query): Likewise.
3577
3578 2017-10-03  Tom Tromey  <tom@tromey.com>
3579
3580         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3581         * top.c (execute_command_to_string): Update.
3582         * utils.c (make_cleanup_restore_page_info): Remove.
3583         (do_restore_page_info_cleanup): Remove.
3584         (set_batch_flag_and_restore_page_info):
3585         New.
3586         (make_cleanup_restore_page_info): Remove.
3587         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3588         (~set_batch_flag_and_restore_page_info): New
3589         (make_cleanup_restore_uinteger): Remove.
3590         (make_cleanup_restore_integer): Remove.
3591         (struct restore_integer_closure): Remove.
3592         (restore_integer): Remove.
3593         * utils.h (struct set_batch_flag_and_restore_page_info): New
3594         class.
3595         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3596         (make_cleanup_restore_page_info): Remove.
3597         (make_cleanup_restore_uinteger) Remove.
3598         (make_cleanup_restore_integer) Remove.
3599
3600 2017-10-03  Tom Tromey  <tom@tromey.com>
3601
3602         * record-full.h (record_full_gdb_operation_disable_set): Return
3603         scoped_restore_tmpl<int>.
3604         * infrun.c (adjust_pc_after_break): Update.
3605         (handle_signal_stop): Update.
3606         * record-full.c (record_full_gdb_operation_disable_set): Return
3607         scoped_restore_tmpl<int>.
3608         (record_full_wait_1, record_full_insert_breakpoint)
3609         (record_full_remove_breakpoint, record_full_save)
3610         (record_full_goto_insn): Update.
3611
3612 2017-10-02  Tom Tromey  <tom@tromey.com>
3613
3614         PR rust/22236:
3615         * rust-lang.c (rust_val_print_str): New function.
3616         (val_print_struct): Call it.
3617         (rust_subscript): Preserve name of slice type.
3618
3619 2017-10-02  Tom Tromey  <tom@tromey.com>
3620
3621         * rust-lang.c (rust_subscript): Handle slices in
3622         EVAL_AVOID_SIDE_EFFECTS case.
3623
3624 2017-10-02  Tom Tromey  <tom@tromey.com>
3625
3626         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3627
3628 2017-10-02  Tom Tromey  <tom@tromey.com>
3629
3630         * rust-lang.h (rust_slice_type): Add "extern".
3631
3632 2017-10-02  Tom Tromey  <tom@tromey.com>
3633             Pedro Alves  <palves@redhat.com>
3634
3635         * ada-lang.h (ada_exc_info::operator<): Make const.
3636         (ada_exc_info::operator==): Make const.
3637         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3638         Make const.
3639
3640 2017-09-29  Tom Tromey  <tom@tromey.com>
3641
3642         * target.c (read_whatever_is_readable): Change type of "result".
3643         Update.
3644         (free_memory_read_result_vector): Remove.
3645         (read_memory_robust): Change return type.  Update.
3646         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3647         bin2hex, std::string.
3648         * target.h (memory_read_result_s): Remove typedef.
3649         (free_memory_read_result_vector): Remove.
3650         (read_memory_robust): Return std::vector.
3651
3652 2017-09-29  Tom Tromey  <tom@tromey.com>
3653
3654         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3655
3656 2017-09-29  Tom Tromey  <tom@tromey.com>
3657
3658         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3659         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3660         operator< and operator==.
3661         (ada_exceptions_list): Return a std::vector.
3662         * ada-lang.c (ada_exc_info::operator<): Rename from
3663         compare_ada_exception_info.
3664         (ada_exc_info::operator==): New.
3665         (sort_remove_dups_ada_exceptions_list): Change type of
3666         "exceptions".
3667         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3668         (ada_add_global_exceptions): Likewise.
3669         (ada_exceptions_list_1): Return a std::vector.
3670         (ada_exceptions_list): Likewise.
3671
3672 2017-09-29  Tom Tromey  <tom@tromey.com>
3673
3674         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3675         'std::set *'.
3676         (print_one_inferior): Update.
3677         (free_vector_of_ints): Remove.
3678         (list_available_thread_groups): Change "ids" to std::set.
3679         (mi_cmd_list_thread_groups): Update.
3680         (struct collect_cores_data) <core>: Now a std::set.
3681         (collect_cores): Update.
3682         (unique): Remove.
3683         (print_one_inferior): Update.
3684
3685 2017-09-29  Tom Tromey  <tom@tromey.com>
3686
3687         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3688         (mi_execute_async_cli_command): Likewise.
3689         (mi_cmd_trace_frame_collected): Use field_fmt.
3690
3691 2017-09-29  Tom Tromey  <tom@tromey.com>
3692
3693         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3694         gdb::byte_vector.
3695
3696 2017-09-29  Tom Tromey  <tom@tromey.com>
3697
3698         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3699
3700 2017-09-29  Tom Tromey  <tom@tromey.com>
3701
3702         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3703
3704 2017-09-29  Tom Tromey  <tom@tromey.com>
3705
3706         * varobj.h (varobj_gen_name): Return std::string.
3707         * varobj.c (varobj_gen_name): Return std::string.
3708         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3709         (mi_cmd_var_delete): Don't copy "name".
3710
3711 2017-09-29  Tom Tromey  <tom@tromey.com>
3712
3713         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3714         (mi_cmd_break_insert_1): Update.
3715
3716 2017-09-29  Tom Tromey  <tom@tromey.com>
3717
3718         * target.h (make_scoped_defer_target_commit_resume): Update.
3719         * target.c (make_scoped_defer_target_commit_resume): Rename from
3720         make_cleanup_defer_target_commit_resume.  Return a
3721         scoped_restore.
3722         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3723
3724 2017-09-29  Tom Tromey  <tom@tromey.com>
3725
3726         * main.c (captured_main_1): Remove unused declaration.
3727         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3728
3729 2017-09-29  Tom Tromey  <tom@tromey.com>
3730
3731         * symtab.c (search_symbols): Remove unused outer cleanup.
3732         (make_source_files_completion_list): Remove unused declaration.
3733
3734 2017-09-29  Tom Tromey  <tom@tromey.com>
3735
3736         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3737
3738 2017-09-29  Tom Tromey  <tom@tromey.com>
3739
3740         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3741         gdb::byte_vector.
3742
3743 2017-09-29  Tom Tromey  <tom@tromey.com>
3744
3745         * complaints.c (vcomplaint): Use std::string.
3746
3747 2017-09-29  Tom Tromey  <tom@tromey.com>
3748
3749         * tracepoint.c (trace_variable_command): Use std::string.
3750         (encode_actions_1): Remove unused declarations.
3751         (create_tsv_from_upload): Use std::string.
3752
3753 2017-09-29  Tom Tromey  <tom@tromey.com>
3754
3755         * cp-support.c (gdb_demangle): Use std::string.
3756
3757 2017-09-29  Tom Tromey  <tom@tromey.com>
3758
3759         * stack.c (parse_frame_specification): Use std::string
3760         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3761
3762 2017-09-29  Tom Tromey  <tom@tromey.com>
3763
3764         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3765
3766 2017-09-29  Tom Tromey  <tom@tromey.com>
3767
3768         * utils.c (vfprintf_maybe_filtered): Use std::string.
3769         (vfprintf_unfiltered): Likewise.
3770
3771 2017-09-29  Tom Tromey  <tom@tromey.com>
3772
3773         * event-top.c (top_level_prompt): Return std::string.
3774         (display_gdb_prompt): Update.
3775
3776 2017-09-29  Tom Tromey  <tom@tromey.com>
3777
3778         * unittests/common-utils-selftests.c (format): New function.
3779         (string_vprintf_tests): New function.
3780         (_initialize_common_utils_selftests): Register new tests.
3781         * common/common-utils.c (string_vprintf): New function.
3782         * common/common-utils.h (string_vprintf): Declare.
3783
3784 2017-09-29  Pedro Alves  <palves@redhat.com>
3785
3786         * common/rsp-low.c (unpack_varlen_hex): Constify.
3787         * common/rsp-low.h (unpack_varlen_hex): Constify.
3788         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3789         Constify.
3790         * remote.c (remote_set_permissions, read_ptid)
3791         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3792         (remote_static_tracepoint_marker_at)
3793         (remote_static_tracepoint_markers_by_strid)
3794         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3795         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3796         (parse_tracepoint_definition, parse_tsv_definition)
3797         (parse_static_tracepoint_marker_definition): Constify.
3798         * tracepoint.h (parse_static_tracepoint_marker_definition)
3799         (parse_trace_status, parse_tracepoint_status)
3800         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3801
3802 2017-09-29  Pedro Alves  <palves@redhat.com>
3803
3804         * remote.c (target_buf, target_buf_size): Delete.
3805         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3806         Use the connection's packet buffer instead.
3807         All callers adjusted.
3808         (_initialize_remote): Remove references to target_buf and
3809         target_buf_size.
3810
3811 2017-09-28  Pedro Alves  <palves@redhat.com>
3812
3813         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3814         unittests/common-utils-selftests.c.
3815         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3816         (COMMON_OBS): Remove utils-selftests.o.
3817         * utils-selftests.c: Move to ...
3818         * unittests/common-utils-selftests.c: ... here and rename self
3819         test to "string_printf".
3820
3821 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3822
3823         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3824         having NULL cus or tus.
3825
3826 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3827
3828         * arm-tdep.c: (convert_from_extended): Remove.
3829         (convert_to_extended): Likewise.
3830         (arm_extract_return_value): Use convert_typed_floating.
3831         (arm_store_return_value): Likewise.
3832
3833         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3834         * sh-tdep.c: Do not include "floatformat.h".
3835         (sh_littlebyte_bigword_type): New function.
3836         (sh_register_convert_to_virtual): Use convert_typed_floating.
3837         (sh_register_convert_to_raw): Likewise.
3838         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3839         (sh64_littlebyte_bigword_type): New function.
3840         (sh64_extract_return_value): Use convert_typed_floating.
3841         (sh64_register_convert_to_virtual): Likewise.
3842         (sh64_register_convert_to_raw): Likewise.
3843
3844 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3845
3846         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3847         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3848
3849         * gdbtypes.h (union type_specific): Make field floatformat hold
3850         just a single struct floatformat, not an array.
3851         (floatformat_from_type): Move here.
3852         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3853         changed TYPE_FLOATFORMAT definition.
3854         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3855         (recursive_dump_type): Likewise.
3856         (init_float_type): Install correct floatformat for byte order.
3857         (arch_float_type): Likewise.
3858
3859 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3860
3861         * gdbtypes.c (init_type): Change incoming argument from
3862         length-in-bytes to length-in-bits.  Assert length is a
3863         multiple of TARGET_CHAR_BITS.
3864         (arch_type, arch_flags_type): Likewise.
3865         (init_integer_type): Update call to init_type.
3866         (init_character_type): Likewise.
3867         (init_boolean_type): Likewise.
3868         (init_float_type): Likewise.
3869         (init_decfloat_type): Likewise.
3870         (init_complex_type): Likewise.
3871         (init_pointer_type): Likewise.
3872         (objfile_type): Likewise.
3873         (arch_integer_type): Update call to arch_type.
3874         (arch_character_type): Likewise.
3875         (arch_boolean_type): Likewise.
3876         (arch_float_type): Likewise.
3877         (arch_decfloat_type): Likewise.
3878         (arch_complex_type): Likewise.
3879         (arch_pointer_type): Likewise.
3880         (gdbtypes_post_init): Likewise.
3881
3882         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3883         (read_base_type): Likewise.
3884         * mdebugread.c (basic_type): Likewise.
3885         * stabsread.c (dbx_init_float_type): Likewise.
3886         (rs6000_builtin_type): Likewise.
3887         (read_range_type): Likewise.  Also, fix call to init_integer_type
3888         with erroneous length argument.
3889
3890         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3891         * d-lang.c (build_d_types): Likewise.
3892         * f-lang.c (build_fortran_types): Likewise.
3893         * go-lang.c (build_go_types): Likewise.
3894         * opencl-lang.c (build_opencl_types): Likewise.
3895         * jit.c (finalize_symtab): Likewise.
3896         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3897         (build_std_type_info_type): Likewise.
3898         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3899         update call to arch_flags_type.
3900
3901         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3902         arch_type.
3903         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3904         * windows-tdep.c (windows_get_tlb_type): Likewise.
3905
3906         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3907         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3908         * m32c-tdep.c (make_types): Likewise.
3909         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3910         (rl78_psw_type): Update call to arch_flags_type.
3911         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3912         * rx-tdep.c (rx_psw_type): Likewise.
3913         (rx_fpsw_type): Likewise.
3914         * sparc-tdep.c (sparc_psr_type): Likewise.
3915         (sparc_fsr_type): Likewise.
3916         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3917         (sparc64_ccr_type): Likewise.
3918         (sparc64_fsr_type): Likewise.
3919         (sparc64_fprs_type): Likewise.
3920
3921 2017-09-27  Tom Tromey  <tom@tromey.com>
3922
3923         * findcmd.c (find_command): Constify.
3924
3925 2017-09-27  Tom Tromey  <tom@tromey.com>
3926
3927         * ada-tasks.c (task_command_1, task_command): Constify.
3928
3929 2017-09-27  Tom Tromey  <tom@tromey.com>
3930
3931         * symtab.c (maintenance_print_symbol_cache)
3932         (maintenance_flush_symbol_cache)
3933         (maintenance_print_symbol_cache_statistics): Constify.
3934
3935 2017-09-27  Tom Tromey  <tom@tromey.com>
3936
3937         * inferior.c (detach_inferior_command, kill_inferior_command)
3938         (inferior_command): Constify.
3939
3940 2017-09-27  Tom Tromey  <tom@tromey.com>
3941
3942         * regcache.c (regcache_print, maintenance_print_registers)
3943         (maintenance_print_raw_registers)
3944         (maintenance_print_cooked_registers)
3945         (maintenance_print_register_groups)
3946         (maintenance_print_remote_registers): Constify.
3947
3948 2017-09-27  Tom Tromey  <tom@tromey.com>
3949
3950         * printcmd.c (map_display_numbers, undisplay_command)
3951         (enable_disable_display_command, enable_display_command)
3952         (disable_display_command): Constify.
3953
3954 2017-09-27  Tom Tromey  <tom@tromey.com>
3955
3956         * breakpoint.h (delete_command): Don't declare.
3957         * breakpoint.c (delete_command, enable_once_command)
3958         (enable_count_command, enable_delete_command, breakpoint_1)
3959         (maintenance_info_breakpoints, stopin_command, stopat_command)
3960         (delete_command, delete_trace_command, save_breakpoints)
3961         (save_breakpoints_command, save_tracepoints_command): Constify.
3962
3963 2017-09-27  Tom Tromey  <tom@tromey.com>
3964
3965         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3966         (skip_ws, extract_identifier, macro_define_command)
3967         (macro_undef_command, macro_list_command): Constify.
3968
3969 2017-09-27  Tom Tromey  <tom@tromey.com>
3970
3971         * infcmd.c (environment_info, set_environment_command)
3972         (unset_environment_command, path_info, info_proc_cmd_1)
3973         (info_proc_cmd_mappings, info_proc_cmd_stat)
3974         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3975         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3976
3977 2017-09-27  Tom Tromey  <tom@tromey.com>
3978
3979         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3980         Constify.
3981
3982 2017-09-27  Tom Tromey  <tom@tromey.com>
3983
3984         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3985
3986 2017-09-27  Tom Tromey  <tom@tromey.com>
3987
3988         * demangle.c (demangle_command): Constify.
3989
3990 2017-09-27  Tom Tromey  <tom@tromey.com>
3991
3992         * progspace.c (maintenance_info_program_spaces_command):
3993         Constify.
3994
3995 2017-09-27  Tom Tromey  <tom@tromey.com>
3996
3997         * compile/compile.c (check_raw_argument, compile_file_command)
3998         (compile_code_command, compile_print_command): Constify.
3999
4000 2017-09-27  Tom Tromey  <tom@tromey.com>
4001
4002         * reggroups.c (maintenance_print_reggroups): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * dwarf2read.c (save_gdb_index_command): Constify.
4007
4008 2017-09-27  Tom Tromey  <tom@tromey.com>
4009
4010         * stap-probe.c (info_probes_stap_command): Constify.
4011
4012 2017-09-27  Tom Tromey  <tom@tromey.com>
4013
4014         * fork-child.c (unset_exec_wrapper_command): Constify.
4015
4016 2017-09-27  Tom Tromey  <tom@tromey.com>
4017
4018         * btrace.c (get_uint, get_context_size, no_chunk)
4019         (maint_btrace_packet_history_cmd)
4020         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4021         (maint_info_btrace_cmd): Constify.
4022
4023 2017-09-27  Tom Tromey  <tom@tromey.com>
4024
4025         * reverse.c (delete_bookmark_command): Constify.
4026
4027 2017-09-27  Tom Tromey  <tom@tromey.com>
4028
4029         * remote.c (set_memory_packet_size)
4030         (set_memory_write_packet_size, show_memory_write_packet_size)
4031         (set_memory_read_packet_size, show_memory_read_packet_size)
4032         (compare_sections_command, packet_command, remote_put_command)
4033         (remote_get_command, remote_delete_command): Constify.
4034
4035 2017-09-27  Tom Tromey  <tom@tromey.com>
4036
4037         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4038         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4039         (set_mipsfpu_auto_command): Constify.
4040
4041 2017-09-27  Tom Tromey  <tom@tromey.com>
4042
4043         * cli/cli-cmds.h (cd_command): Constify.
4044         * cli/cli-cmds.c (cd_command): Constify.
4045
4046 2017-09-27  Tom Tromey  <tom@tromey.com>
4047
4048         * thread.c (thread_name_command, thread_find_command): Constify.
4049
4050 2017-09-27  Tom Tromey  <tom@tromey.com>
4051
4052         * probe.c (enable_probes_command, disable_probes_command):
4053         Constify.
4054
4055 2017-09-27  Tom Tromey  <tom@tromey.com>
4056
4057         * symfile.c (symbol_file_command): Constify.
4058         * gdbcore.h (deprecated_file_changed_hook): Constify.
4059         * exec.c (deprecated_file_changed_hook, exec_file_command)
4060         (file_command): Constify.
4061         * defs.h (symbol_file_command): Constify.
4062
4063 2017-09-27  Tom Tromey  <tom@tromey.com>
4064
4065         * remote-fileio.c (set_system_call_allowed)
4066         (show_system_call_allowed): Constify.
4067
4068 2017-09-27  Tom Tromey  <tom@tromey.com>
4069
4070         * tracepoint.c (delete_trace_variable_command)
4071         (tfind_end_command, tfind_start_command, tfind_pc_command)
4072         (tfind_tracepoint_command, tfind_line_command)
4073         (tfind_range_command, tfind_outside_command): Constify.
4074
4075 2017-09-27  Tom Tromey  <tom@tromey.com>
4076
4077         * ax-gdb.c (maint_agent_printf_command, agent_command)
4078         (agent_eval_command): Constify.
4079
4080 2017-09-27  Tom Tromey  <tom@tromey.com>
4081
4082         * tracepoint.c (info_scope_command): Constify.
4083         * python/python.c (gdbpy_decode_line): Constify.
4084         * python/py-breakpoint.c (bppy_init): Constify.
4085         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4086         * location.h: (new_linespec_location)
4087         (string_to_event_location_basic, string_to_event_location):
4088         Constify.
4089         * location.c (new_linespec_location)
4090         (string_to_event_location_basic, string_to_event_location):
4091         Constify.
4092         * linespec.h (decode_line_with_current_source)
4093         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4094         * linespec.c (linespec_lex_to_end)
4095         (decode_line_with_current_source)
4096         (decode_line_with_last_displayed): Constify.
4097         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4098         Constify.
4099         * cli/cli-cmds.c (edit_command, list_command): Constify.
4100         * breakpoint.h (until_break_command, watch_command_wrapper)
4101         (awatch_command_wrapper, rwatch_command_wrapper)
4102         (init_ada_exception_breakpoint): Constify.
4103         * breakpoint.c (break_command_1, dprintf_command)
4104         (break_range_command, watch_command_wrapper)
4105         (rwatch_command_wrapper, awatch_command_wrapper)
4106         (until_break_command, init_ada_exception_breakpoint)
4107         (strace_marker_create_sals_from_location, trace_command)
4108         (ftrace_command, strace_command, struct tracepoint): Constify.
4109         * ax-gdb.c (agent_command_1): Constify.
4110         * ada-lang.c (ada_exception_sal): Constify.
4111
4112 2017-09-27  Tom Tromey  <tom@tromey.com>
4113
4114         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4115         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4116         (get_context_size, no_chunk, get_insn_history_modifiers)
4117         (cmd_record_insn_history, get_call_history_modifiers)
4118         (cmd_record_call_history): Constify.
4119
4120 2017-09-27  Tom Tromey  <tom@tromey.com>
4121
4122         * source.c (show_substitute_path_command)
4123         (unset_substitute_path_command, set_substitute_path_command):
4124         Constify.
4125
4126 2017-09-27  Tom Tromey  <tom@tromey.com>
4127
4128         * typeprint.c (maintenance_print_type): Constify.
4129         * maint.c (maintenance_dump_me, maintenance_demangle)
4130         (maintenance_time_display, maintenance_info_sections)
4131         (maintenance_print_statistics, maintenance_deprecate)
4132         (maintenance_undeprecate): Constify.
4133         (maintenance_do_deprecate): Constify.  Use std::string.
4134         (maintenance_selftest): Constify.
4135         * gdbtypes.h (maintenance_print_type): Constify.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * hppa-tdep.c (unwind_command): Constify.
4140
4141 2017-09-27  Tom Tromey  <tom@tromey.com>
4142
4143         * target-descriptions.c (unset_tdesc_filename_cmd)
4144         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4145         Constify.
4146
4147 2017-09-27  Tom Tromey  <tom@tromey.com>
4148
4149         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4150
4151 2017-09-27  Tom Tromey  <tom@tromey.com>
4152
4153         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4154
4155 2017-09-27  Tom Tromey  <tom@tromey.com>
4156
4157         * tui/tui-regs.c (tui_reg_command): Constify.
4158
4159 2017-09-27  Tom Tromey  <tom@tromey.com>
4160
4161         * skip.c (skip_file_command, skip_function_command)
4162         (skip_enable_command, skip_disable_command, skip_delete_command):
4163         Constify.
4164
4165 2017-09-27  Tom Tromey  <tom@tromey.com>
4166
4167         * record-btrace.c (cmd_record_btrace_bts_start)
4168         (cmd_record_btrace_pt_start): Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * symmisc.c (maintenance_print_symbols)
4173         (maintenance_print_msymbols, maintenance_print_objfiles)
4174         (maintenance_info_symtabs, maintenance_check_symtabs)
4175         (maintenance_expand_symtabs, maintenance_info_line_tables):
4176         Constify.
4177
4178 2017-09-27  Tom Tromey  <tom@tromey.com>
4179
4180         * top.c (new_ui_command): Constify.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * symfile.c (add_symbol_file_command)
4185         (remove_symbol_file_command, list_overlays_command)
4186         (map_overlay_command, unmap_overlay_command)
4187         (overlay_auto_command, overlay_manual_command)
4188         (overlay_off_command, overlay_load_command): Constify.
4189
4190 2017-09-27  Tom Tromey  <tom@tromey.com>
4191
4192         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4193         (info_spu_mailbox_command, info_spu_dma_command)
4194         (info_spu_proxydma_command): Constify.
4195
4196 2017-09-27  Tom Tromey  <tom@tromey.com>
4197
4198         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4199
4200 2017-09-27  Tom Tromey  <tom@tromey.com>
4201
4202         * cli/cli-script.c (user_defined_command): Constify.
4203
4204 2017-09-27  Tom Tromey  <tom@tromey.com>
4205
4206         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4207         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4208         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4209         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4210         (dump_binary_value, append_binary_memory, append_binary_value):
4211         Constify.
4212         (struct dump_context) <func>: Constify.
4213         (add_dump_command): Update.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * cli/cli-cmds.c (show_version, show_configuration)
4218         (source_command, show_user): Constify.
4219
4220 2017-09-27  Tom Tromey  <tom@tromey.com>
4221
4222         * target.c (maintenance_print_target_stack): Constify.
4223
4224 2017-09-27  Tom Tromey  <tom@tromey.com>
4225
4226         * interps.c (interpreter_exec_cmd): Constify.
4227
4228 2017-09-27  Tom Tromey  <tom@tromey.com>
4229
4230         * record-full.c (cmd_record_full_restore): Constify.
4231
4232 2017-09-27  Tom Tromey  <tom@tromey.com>
4233
4234         * memattr.c (enable_mem_command, disable_mem_command)
4235         (delete_mem_command): Constify.
4236
4237 2017-09-27  Tom Tromey  <tom@tromey.com>
4238
4239         * value.c (show_convenience): Constify.
4240
4241 2017-09-27  Tom Tromey  <tom@tromey.com>
4242
4243         * gdbcore.h (core_file_command): Update.
4244         * corefile.c (core_file_command): Constify.
4245
4246 2017-09-27  Tom Tromey  <tom@tromey.com>
4247
4248         * user-regs.c (maintenance_print_user_registers): Constify.
4249
4250 2017-09-27  Tom Tromey  <tom@tromey.com>
4251
4252         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4253
4254 2017-09-27  Tom Tromey  <tom@tromey.com>
4255
4256         * cp-support.c (first_component_command): Constify.
4257
4258 2017-09-27  Tom Tromey  <tom@tromey.com>
4259
4260         * psymtab.c (maintenance_print_psymbols)
4261         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4262         Constify.
4263
4264 2017-09-27  Tom Tromey  <tom@tromey.com>
4265
4266         * windows-tdep.c (display_tib): Constify.
4267
4268 2017-09-27  Tom Tromey  <tom@tromey.com>
4269
4270         * linux-fork.c (delete_checkpoint_command)
4271         (detach_checkpoint_command): Constify.
4272
4273 2017-09-27  Tom Tromey  <tom@tromey.com>
4274
4275         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4276
4277 2017-09-27  Tom Tromey  <tom@tromey.com>
4278
4279         * arc-tdep.c (dump_arc_instruction_command): Constify.
4280
4281 2017-09-27  Tom Tromey  <tom@tromey.com>
4282
4283         * valprint.c (set_radix, show_radix): Constify.
4284
4285 2017-09-27  Tom Tromey  <tom@tromey.com>
4286
4287         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4288
4289 2017-09-27  Tom Tromey  <tom@tromey.com>
4290
4291         * command.h (not_just_help_class_command): Update.
4292         * cli/cli-decode.h (not_just_help_class_command): Update.
4293         * cli/cli-decode.c (not_just_help_class_command): Constify.
4294
4295 2017-09-27  Tom Tromey  <tom@tromey.com>
4296
4297         * gdb_bfd.c (maintenance_info_bfds): Constify.
4298
4299 2017-09-27  Tom Tromey  <tom@tromey.com>
4300
4301         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4302         overloads.
4303         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4304         (do_const_cfunc): New function.
4305         (cmd_cfunc_eq): New overload.
4306         (cli_user_command_p): Check do_const_cfunc.
4307         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4308         const_cfunc.
4309         * command.h (add_cmd): Add const overload and no-function
4310         overload.
4311         (set_cmd_cfunc): Add const overload.
4312         (cmd_const_cfunc_ftype): Declare.
4313         (cmd_cfunc_eq): Add const overload.
4314         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4315         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4316         overload.
4317
4318 2017-09-27  Tom Tromey  <tom@tromey.com>
4319
4320         * macroexp.c (get_next_token_for_substitution): New function.
4321         (substitute_args): Call it.  Check for __VA_OPT__.
4322
4323 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4324             Pedro Alves <palves@redhat.com>
4325
4326         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4327         producer_is_icc_lt_14.
4328         (producer_is_icc_lt_14): New function.
4329         (check_producer): Add code for checking version of ICC.
4330         (producer_is_icc): Move to producer.c.
4331         (read_structure_type): Restrict ICC workaround to ICC<14.
4332         * producer.c: Include selftest.h.
4333         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4334         New functions.
4335         * producer.h (producer_is_icc): New declaration.
4336
4337 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4338
4339         * Makefile.in (SFILES): Add producer.c.
4340         (COMMON_OBS): Add producer.o
4341         * amd64-tdep.c (producer.h): Add new include.
4342         * dwarf2read.c (producer.h): Add new include.
4343         * producer.c: New file.
4344         * producer.h: New file.
4345         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4346         producer.c.
4347         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4348         producer.h.
4349
4350 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4351
4352         * configure.ac: Search ncursesw before ncurses.
4353         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4354         * gdb_curses.h: Include <ncursesw/ncurses.h>
4355         * config.in, configure: Regenerate.
4356
4357 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4358
4359         PR gdb/22185
4360         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4361         obsolete.
4362         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4363         Remove i386sol2 support.
4364         * configure.nat <i386sol2>: Remove.
4365         <sol2-64>: Fold into ...
4366         <sol2>: ... this.
4367         Move common settings to default section.
4368         Add sol-thread.o.
4369         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4370         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4371         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4372         <i[34567]86-*-solaris*>: Remove.
4373         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4374
4375         * configure.ac: Remove wctype in libw check.
4376         (_MSE_INT_H): Don't define on Solaris 7-9.
4377         <solaris*>: Remove libthread_db.so.1 check.
4378         * configure: Regenerate.
4379         * config.in: Regenerate.
4380
4381         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4382         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4383         (gdb_ps_size_t): Remove.
4384         Use base types in users.
4385         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4386
4387         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4388
4389 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4390
4391         PR build/22206
4392         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4393         (adi_is_addr_mapped): Likewise.
4394         (PSR_ICC): Don't redefine.
4395         (PSR_IMPL): Likewise.
4396
4397 2017-09-25  Tom Tromey  <tom@tromey.com>
4398
4399         * regcache.c (regcache::dump): Use string_printf.
4400
4401 2017-09-25  Tom Tromey  <tom@tromey.com>
4402
4403         * regcache.c (class regcache_invalidator): New.
4404         (struct register_to_invalidate): Remove.
4405         (make_cleanup_regcache_invalidate): Remove.
4406         (regcache::raw_write): Use regcache_invalidator.
4407
4408 2017-09-25  Tom Tromey  <tom@tromey.com>
4409
4410         * spu-tdep.c (spu2ppu_sniffer): Update.
4411         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4412         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4413         Remove.
4414         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4415         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4416         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4417         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4418         (frame_pop): Update.
4419
4420 2017-09-25  Tom Tromey  <tom@tromey.com>
4421
4422         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4423         * regcache.h (regcache_xfree): Don't declare.
4424         * regcache.c (regcache_xfree): Remove.
4425         (do_regcache_xfree): Use delete.
4426         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4427         * linux-fork.c (free_fork): Use delete.
4428         (fork_save_infrun_state): Likewise.
4429         * jit.c (jit_dealloc_cache): Use delete.
4430         * infrun.c (discard_infcall_suspend_state): Use delete.
4431
4432 2017-09-25  Tom Tromey  <tom@tromey.com>
4433
4434         * regcache.h (regcache_xmalloc): Don't declare.
4435         (regcache_raw_set_cached_value): Update comment.
4436         * regcache.c (regcache_xmalloc): Remove.
4437         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4438         * jit.c (jit_frame_sniffer): Use new.
4439         * frame.c (frame_save_as_regcache): Use new.
4440
4441 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4442
4443         * NEWS: Advertise support for guarded-storage registers on IBM z.
4444
4445 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4446
4447         * s390-linux-nat.c (have_regset_gs): New static variable.
4448         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4449         control block and guarded-storage broadcast control regsets.
4450         (s390_read_description): Detect whether the target has
4451         guarded-storage support, return appropriate tdesc.
4452         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4453         (features/s390x-gs-linux64.c): Likewise.
4454         (struct gdbarch_tdep) <have_gs>: New field.
4455         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4456         (s390_gsbc_regset): New variables.
4457         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4458         and s390_gsbc_regset, if applicable.
4459         (s390_core_read_description): Check whether core file was from a
4460         target with guarded-storage support; include appropriate regsets.
4461         (s390_gdbarch_init): Add registers for guarded-storage support.
4462         (_initialize_s390_tdep): Initialize new target descriptions that
4463         include registers for guarded-storage support.
4464         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4465         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4466         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4467         (S390_NUM_REGS): Adjust macro definition.
4468         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4469         (tdesc_s390x_gs_linux64): New declarations.
4470
4471 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4472
4473         * features/s390-gs-linux64.xml: New file.
4474         * features/s390-gs.xml: New file.
4475         * features/s390-gsbc.xml: New file.
4476         * features/s390x-gs-linux64.xml: New file.
4477         * features/Makefile (WHICH): Add s390-gs-linux64 and
4478         s390x-gs-linux64.
4479         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4480         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4481         * features/s390-gs-linux64.c: New generated file.
4482         * features/s390x-gs-linux64.c: New file.
4483         * regformats/s390-gs-linux64.dat: New file.
4484         * regformats/s390x-gs-linux64.dat: New file.
4485
4486 2017-09-23  Tom Tromey  <tom@tromey.com>
4487
4488         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4489
4490 2017-09-22  Tom Tromey  <tom@tromey.com>
4491
4492         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4493         type to scoped_restore_tmpl.
4494         <scoped_input_handler>: Initialize m_quit_handler directly.
4495
4496 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4497
4498         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4499         (cd_command): Likewise.  Free "current_directory" before
4500         assigning to it.
4501         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4502         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4503         * top.c (gdb_dirbuf): Remove global declaration.
4504         * top.h (gdb_dirbuf): Likewise.
4505
4506 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4507
4508         * gnulib/aclocal.m4: Regenerate.
4509         * gnulib/config.in: Regenerate.
4510         * gnulib/configure: Regenerate.
4511         * gnulib/import/Makefile.am: Regenerate.
4512         * gnulib/import/Makefile.in: Regenerate.
4513         * gnulib/import/assure.h: New file.
4514         * gnulib/import/at-func.c: Likewise
4515         * gnulib/import/chdir-long.c: New file.
4516         * gnulib/import/chdir-long.h: New file.
4517         * gnulib/import/cloexec.c: New file.
4518         * gnulib/import/cloexec.h: New file.
4519         * gnulib/import/close.c: New file.
4520         * gnulib/import/closedir.c: New file.
4521         * gnulib/import/dirent-private.h: New file.
4522         * gnulib/import/dup-safer.c: New file.
4523         * gnulib/import/dup.c: New file.
4524         * gnulib/import/dup2.c: New file.
4525         * gnulib/import/error.c: New file.
4526         * gnulib/import/error.h: New file.
4527         * gnulib/import/exitfail.c: New file.
4528         * gnulib/import/exitfail.h: New file.
4529         * gnulib/import/fchdir.c: New file.
4530         * gnulib/import/fcntl.c: New file.
4531         * gnulib/import/fcntl.in.h: New file.
4532         * gnulib/import/fd-hook.c: New file.
4533         * gnulib/import/fd-hook.h: New file.
4534         * gnulib/import/fd-safer.c: New file.
4535         * gnulib/import/fdopendir.c: New file.
4536         * gnulib/import/filename.h: New file.
4537         * gnulib/import/filenamecat-lgpl.c: New file.
4538         * gnulib/import/filenamecat.h: New file.
4539         * gnulib/import/fstat.c: New file.
4540         * gnulib/import/fstatat.c: New file.
4541         * gnulib/import/getcwd-lgpl.c: New file.
4542         * gnulib/import/getcwd.c: New file.
4543         * gnulib/import/getdtablesize.c: New file.
4544         * gnulib/import/getlogin_r.c: New file.
4545         * gnulib/import/getprogname.c: New file.
4546         * gnulib/import/getprogname.h: New file.
4547         * gnulib/import/gettext.h: New file.
4548         * gnulib/import/glob-libc.h: New file.
4549         * gnulib/import/glob.c: New file.
4550         * gnulib/import/glob.in.h: New file.
4551         * gnulib/import/intprops.h: New file.
4552         * gnulib/import/m4/chdir-long.m4: New file.
4553         * gnulib/import/m4/close.m4: New file.
4554         * gnulib/import/m4/closedir.m4: New file.
4555         * gnulib/import/m4/d-ino.m4: New file.
4556         * gnulib/import/m4/d-type.m4: New file.
4557         * gnulib/import/m4/dup.m4: New file.
4558         * gnulib/import/m4/dup2.m4: New file.
4559         * gnulib/import/m4/error.m4: New file.
4560         * gnulib/import/m4/fchdir.m4: New file.
4561         * gnulib/import/m4/fcntl.m4: New file.
4562         * gnulib/import/m4/fcntl_h.m4: New file.
4563         * gnulib/import/m4/fdopendir.m4: New file.
4564         * gnulib/import/m4/filenamecat.m4: New file.
4565         * gnulib/import/m4/fstat.m4: New file.
4566         * gnulib/import/m4/fstatat.m4: New file.
4567         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4568         * gnulib/import/m4/getcwd-path-max.m4: New file.
4569         * gnulib/import/m4/getcwd.m4: New file.
4570         * gnulib/import/m4/getdtablesize.m4: New file.
4571         * gnulib/import/m4/getlogin_r.m4: New file.
4572         * gnulib/import/m4/getprogname.m4: New file.
4573         * gnulib/import/m4/glob.m4: New file.
4574         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4575         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4576         * gnulib/import/m4/mempcpy.m4: New file.
4577         * gnulib/import/m4/memrchr.m4: New file.
4578         * gnulib/import/m4/mode_t.m4: New file.
4579         * gnulib/import/m4/msvc-inval.m4: New file.
4580         * gnulib/import/m4/msvc-nothrow.m4: New file.
4581         * gnulib/import/m4/open.m4: New file.
4582         * gnulib/import/m4/openat.m4: New file.
4583         * gnulib/import/m4/opendir.m4: New file.
4584         * gnulib/import/m4/readdir.m4: New file.
4585         * gnulib/import/m4/realloc.m4: New file.
4586         * gnulib/import/m4/rewinddir.m4: New file.
4587         * gnulib/import/m4/save-cwd.m4: New file.
4588         * gnulib/import/m4/strdup.m4: New file.
4589         * gnulib/import/m4/strerror.m4: New file.
4590         * gnulib/import/m4/unistd-safer.m4: New file.
4591         * gnulib/import/mempcpy.c: New file.
4592         * gnulib/import/memrchr.c: New file.
4593         * gnulib/import/msvc-inval.c: New file.
4594         * gnulib/import/msvc-inval.h: New file.
4595         * gnulib/import/msvc-nothrow.c: New file.
4596         * gnulib/import/msvc-nothrow.h: New file.
4597         * gnulib/import/open.c: New file.
4598         * gnulib/import/openat-die.c: New file.
4599         * gnulib/import/openat-priv.h: New file.
4600         * gnulib/import/openat-proc.c: New file.
4601         * gnulib/import/openat.c: New file.
4602         * gnulib/import/openat.h: New file.
4603         * gnulib/import/opendir.c: New file.
4604         * gnulib/import/pipe-safer.c: New file.
4605         * gnulib/import/readdir.c: New file.
4606         * gnulib/import/realloc.c: New file.
4607         * gnulib/import/rewinddir.c: New file.
4608         * gnulib/import/save-cwd.c: New file.
4609         * gnulib/import/save-cwd.h: New file.
4610         * gnulib/import/strdup.c: New file.
4611         * gnulib/import/strerror-override.c: New file.
4612         * gnulib/import/strerror-override.h: New file.
4613         * gnulib/import/strerror.c: New file.
4614         * gnulib/import/unistd--.h: New file.
4615         * gnulib/import/unistd-safer.h: New file.
4616         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4617         "getcwd" and "glob".
4618         * ser-tcp.c: Undefine "close" before redefining it.
4619
4620 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4621
4622         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4623         get rid of res_val.
4624
4625 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4626
4627         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4628         <sol2,sparc>: Likewise.
4629         <sol2-64,i386>: Likewise.
4630
4631         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4632         -Wdeprecated-declarations on *-*-solaris*.
4633         * configure: Regenerate.
4634
4635         * procfs.c: Include "nat/inferior.h".
4636         (procfs_info_proc): Fix typo.
4637
4638 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4639
4640         * remote.c (vector): Include.
4641         (struct private_thread_info): Add field, thread_handle.
4642         (free_private_thread_info): Deallocate storage associated with
4643         thread handle.
4644         (get_private_info_thread): Initialize `thread_handle' field.
4645         (struct thread_item): Add field, thread_handle.
4646         (clear_threads_listing_context): Deallocate storage associated
4647         with thread handle.
4648         (start_thread): Add support for "handle" attribute.
4649         (thread_attributes): Add "handle".
4650         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4651         field.
4652         (remote_update_thread_list): Update thread_handle.
4653         (remote_thread_handle_to_thread_info): New function.
4654         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4655
4656 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4657
4658         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4659         function.
4660         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4661         * python/python-internal.h (thread_object_type): Declare.
4662
4663 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4664
4665         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4666         (target_thread_handle_to_thread_info): Declare.
4667         * target.c (target_thread_handle_to_thread_info): New function.
4668         * target-delegates.c: Regenerate.
4669         * gdbthread.h (find_thread_by_handle): Declare.
4670         * thread.c (find_thread_by_handle): New function.
4671         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4672         function.
4673         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4674
4675 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4676
4677         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4678
4679 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4680
4681         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4682
4683 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4684
4685         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4686         to gdb_target_obs.
4687
4688 2017-09-20  Tom Tromey  <tom@tromey.com>
4689
4690         * breakpoint.c (struct counted_command_line): Remove.
4691         (breakpoint_commands): Update.
4692         (alloc_counted_command_line, incref_counted_command_line)
4693         (decref_counted_command_line, do_cleanup_counted_command_line)
4694         (make_cleanup_decref_counted_command_line): Remove.
4695         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4696         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4697         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4698         (save_breakpoints): Update.
4699         * breakpoint.h (counted_command_line): Now a typedef to
4700         shared_ptr.
4701         (struct breakpoint) <commands>: Now a counted_command_line.
4702         (struct bpstats) <command>: Likewise.
4703
4704 2017-09-20  Tom Tromey  <tom@tromey.com>
4705
4706         * breakpoint.c (struct commands_info, do_map_commands_command):
4707         Remove.
4708         (commands_command_1): Update.
4709         (iterate_over_related_breakpoints): Take a function_view.
4710         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4711         (delete_command): Update.
4712         (map_breakpoint_numbers): Take a function_view.
4713         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4714         (disable_command): Update.
4715         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4716         (enable_command): Update.
4717         (struct disp_data, do_enable_breakpoint_disp)
4718         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4719         (do_map_enable_delete_breakpoint): Remove.
4720         (enable_once_command, enable_count_command, enable_delete_command)
4721         (delete_trace_variable_command): Update.
4722
4723 2017-09-20  Tom Tromey  <tom@tromey.com>
4724
4725         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4726         (bpstat_clear): Use delete.
4727         (bpstats): New constructors.
4728         (bpstat_copy, bpstat_stop_status): Use new.
4729         (dprintf_after_condition_true): Update.
4730         * breakpoint.h (bpstats::bpstats): Add constructors.
4731         (bpstats::~bpstats): Add destructor.
4732
4733 2017-09-20  Pedro Alves  <palves@redhat.com>
4734
4735         * eval.c (make_params): Delete, refactored as ...
4736         (class fake_method): ... this new type's ctor.
4737         (fake_method::~fake_method): New.
4738         (evaluate_subexp_standard): Use 'fake_method'.
4739
4740 2017-09-20  Tom Tromey  <tom@tromey.com>
4741
4742         * windows-nat.c (get_windows_debug_event, windows_wait)
4743         (do_initial_windows_stuff, windows_attach): Update.
4744         * utils.c (vwarning, internal_vproblem): Update.
4745         (ui_unregister_input_event_handler_cleanup)
4746         (prepare_to_handle_input): Remove.
4747         (class scoped_input_handler): New.
4748         (defaulted_query, prompt_for_continue): Update.
4749         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4750         Update.
4751         * top.c (undo_terminal_modifications_before_exit): Update.
4752         * target/target.h (target_terminal_init, target_terminal_inferior)
4753         (target_terminal_ours): Don't declare.
4754         (class target_terminal): New.
4755         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4756         (target_terminal_ours_for_output)
4757         (make_cleanup_restore_target_terminal): Don't declare.
4758         (target_terminal_info): Remove.
4759         * target.c (enum terminal_state, terminal_state): Remove.
4760         (target_terminal::terminal_state): Define.
4761         (target_terminal::init): Rename from target_terminal_init.
4762         (target_terminal::inferior): Rename from
4763         target_terminal_inferior.
4764         (target_terminal::ours): Rename from target_terminal_ours.
4765         (target_terminal::ours_for_output): Rename from
4766         target_terminal_ours_for_output.
4767         (target_terminal::info): New method.
4768         (cleanup_restore_target_terminal)
4769         (make_cleanup_restore_target_terminal): Remove.
4770         * solib.c (handle_solib_event): Update.
4771         * remote.c (remote_serial_quit_handler): Update.
4772         (remote_terminal_inferior, remote_wait_as): Update.
4773         * record-full.c (record_full_wait_1): Update.
4774         * nto-procfs.c (procfs_create_inferior): Update.
4775         * nat/fork-inferior.c (startup_inferior): Update.
4776         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4777         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4778         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4779         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4780         (mi_breakpoint_created, mi_breakpoint_deleted)
4781         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4782         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4783         (mi_user_selected_context_changed, report_initial_inferior):
4784         Update.
4785         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4786         (linux_nat_terminal_inferior): Update.
4787         * infrun.c (follow_fork_inferior)
4788         (handle_vfork_child_exec_or_exit, do_target_resume)
4789         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4790         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4791         Update.
4792         * inflow.c (child_terminal_init, info_terminal_command): Update.
4793         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4794         (attach_command): Update.
4795         * infcall.c (call_thread_fsm_should_stop): Update.
4796         * gnu-nat.c (gnu_attach): Update.
4797         * extension.c (struct active_ext_lang_state)
4798         (restore_active_ext_lang): Update.
4799         * exceptions.c (print_flush): Update.
4800         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4801         (struct quit_handler_cleanup_data, restore_quit_handler)
4802         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4803         Remove.
4804         * cp-support.c (gdb_demangle): Update.
4805         * breakpoint.c (update_inserted_breakpoint_locations)
4806         (insert_breakpoint_locations, handle_jit_event)
4807         (disable_breakpoints_in_unloaded_shlib): Update.
4808         * annotate.c (annotate_breakpoints_invalid)
4809         (annotate_frames_invalid): Update.
4810
4811 2017-09-20  Tom Tromey  <tom@tromey.com>
4812
4813         * main.c (catch_command_errors): Rename from
4814         catch_command_errors_const.
4815         (captured_main_1): Update.
4816
4817 2017-09-20  Pedro Alves  <palves@redhat.com>
4818
4819         * cli/cli-cmds.c (list_command): Use print_sal_location.
4820         (print_sal_location): New function.
4821         (ambiguous_line_spec): Use print_sal_location.
4822         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4823         * symtab.c (find_function_start_sal): Likewise.
4824         * symtab.h (symtab_and_line::symbol): New field.
4825
4826 2017-09-20  Pedro Alves  <palves@redhat.com>
4827
4828         * linespec.c (minsym_found): Handle non-text minsyms.
4829         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4830
4831 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4832
4833         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4834         backslash.
4835
4836 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4837
4838         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4839         vmovups instead vmovaps.
4840         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4841
4842 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4843
4844         * NEWS (Changes since GDB 8.0): Add starti.
4845         * infcmd.c (enum run_break): New.
4846         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4847         case.
4848         (run_command): Use enum run_how.
4849         (start_command): Likewise.
4850         (starti_command): New function.
4851         (RUN_ARGS_HELP): New macro.
4852         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4853         commands.  Add starti command.
4854
4855 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4856
4857         * Makefile.in (monitor.o): Remove the rule.
4858
4859 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4860
4861         * annotate.h (struct annotate_arg_emitter): Use
4862         DISABLE_COPY_AND_ASSIGN.
4863         * common/refcounted-object.h (refcounted_object): Likewise.
4864         * completer.h (struct completion_result): Likewise.
4865         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4866         * filename-seen-cache.h (filename_seen_cache): Likewise.
4867         * gdbcore.h (thread_section_name): Likewise.
4868         * gdb_regex.h (compiled_regex): Likewise.
4869         * gdbthread.h (scoped_restore_current_thread): Likewise.
4870         * inferior.h (scoped_restore_current_inferior): Likewise.
4871         * jit.c (jit_reader): Likewise.
4872         * linespec.h (struct linespec_result): Likewise.
4873         * mi/mi-parse.h (struct mi_parse): Likewise.
4874         * nat/fork-inferior.c (execv_argv): Likewise.
4875         * progspace.h (scoped_restore_current_program_space): Likewise.
4876         * python/python-internal.h (class gdbpy_enter): Likewise.
4877         * regcache.h (regcache): Likewise.
4878         * target-descriptions.c (struct tdesc_reg): Likewise.
4879         (struct tdesc_type): Likewise.
4880         (struct tdesc_feature): Likewise.
4881         * ui-out.h (ui_out_emit_type): Likewise.
4882
4883 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4884
4885         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4886         label abort_expression.
4887
4888 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * common/buffer.c (buffer_xml_printf): Adjust.
4891         * common/xml-utils.c (xml_escape_text): Change return type to
4892         std::string, update code accordingly.
4893         * common/xml-utils.h (xml_escape_text): Change return type to
4894         std::string.
4895         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4896         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4897         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4898         Adjust.
4899
4900 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4901
4902         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4903         (SUBDIR_UNITTESTS_OBS): Add new object file.
4904         * unittests/xml-utils-selftests.c: New file.
4905
4906 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4907
4908         * common/selftest.h (selftest): New struct/interface.
4909         (register_test): Add name parameter, add new overload.
4910         (run_tests): Add filter parameter.
4911         (for_each_selftest_ftype): New typedef.
4912         (for_each_selftest): New declaration.
4913         * common/selftest.c (tests): Change type to
4914         map<string, unique_ptr<selftest>>.
4915         (simple_selftest): New struct.
4916         (register_test): New function.
4917         (register_test): Add name parameter and use it.
4918         (run_tests): Add filter parameter and use it.  Add prints.
4919         Adjust to vector -> map change.
4920         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4921         registering selftests.
4922         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4923         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4924         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4925         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4926         * findvar.c (_initialize_findvar): Likewise.
4927         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4928         * maint.c (maintenance_selftest): Update call to run_tests.
4929         (maintenance_info_selftests): New function.
4930         (_initialize_maint_cmds): Register "maintenance info selftests"
4931         command.  Update "maintenance selftest" doc.
4932         * regcache.c (_initialize_regcache): Add names when registering
4933         selftests.
4934         * rust-exp.y (_initialize_rust_exp): Likewise.
4935         * selftest-arch.c (gdbarch_selftest): New struct.
4936         (gdbarch_tests): Remove.
4937         (register_test_foreach_arch): Add name parameter.  Call
4938         register_test.
4939         (tests_with_arch): Remove, move most content to
4940         gdbarch_selftest::operator().
4941         (_initialize_selftests_foreach_arch): Remove.
4942         * selftest-arch.h (register_test_foreach_arch): Add name
4943         parameter.
4944         (run_tests_with_arch): New declaration.
4945         * utils-selftests.c (_initialize_utils_selftests): Add names
4946         when registering selftests.
4947         * utils.c (_initialize_utils): Likewise.
4948         * unittests/array-view-selftests.c
4949         (_initialize_array_view_selftests): Likewise.
4950         * unittests/environ-selftests.c (_initialize_environ_selftests):
4951         Likewise.
4952         * unittests/function-view-selftests.c
4953         (_initialize_function_view_selftests): Likewise.
4954         * unittests/offset-type-selftests.c
4955         (_initialize_offset_type_selftests): Likewise.
4956         * unittests/optional-selftests.c
4957         (_initialize_optional_selftests): Likewise.
4958         * unittests/scoped_restore-selftests.c
4959         (_initialize_scoped_restore_selftests): Likewise.
4960         * NEWS: Document "maintenance selftest" and "maint info
4961         selftests".
4962
4963 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4964
4965         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4966         scoped_restore.
4967
4968 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4969
4970         * mi/mi-main.c (mi_load_progress): Make uiout variable
4971         a unique_ptr.
4972
4973 2017-09-15  Pedro Alves  <palves@redhat.com>
4974
4975         * compile/compile-c-types.c (convert_enum, convert_int)
4976         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4977
4978 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4979
4980         * dwarf2read.c (copy_string): Remove.
4981         (parse_macro_definition): Replace copy_string with savestring.
4982
4983 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4984
4985         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4986         gdb_target_obs.
4987         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4988         Likewise.
4989         (i[34567]86-*-linux*): Likewise.
4990
4991 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4992
4993         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4994         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4995         <stack>: Change type to std::vector.
4996         <stack_len, stack_allocated>: Remove.
4997         <grow_stack>: Remove.
4998         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4999         (dwarf_expr_context::~dwarf_expr_context): Remove.
5000         (dwarf_expr_context::grow_stack): Remove.
5001         (dwarf_expr_context::push): Adjust.
5002         (dwarf_expr_context::pop): Adjust.
5003         (dwarf_expr_context::fetch): Adjust.
5004         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5005         (dwarf_expr_context::stack_empty_p): Adjust.
5006         (dwarf_expr_context::execute_stack_op): Adjust.
5007
5008 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5009
5010         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5011         return type to bool.
5012         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5013
5014 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5015
5016         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5017         Change type to bool.
5018         (dwarf_stack_value) <in_stack_memory>: Likewise.
5019         (dwarf_expr_context) <push_address>: Change parameter type to
5020         bool.
5021         <fetch_in_stack_memory>: Change return type to bool.
5022         <push>: Change parameter type to bool.
5023         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5024         to bool.
5025         (dwarf_expr_context::push_address): Likewise.
5026         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5027         to bool.
5028         (dwarf_expr_context::execute_stack_op): Adjust.
5029         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5030
5031 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5032
5033         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5034         (struct dwarf_expr_context) <n_pieces>: Remove.
5035         <pieces>: Change type to std::vector.
5036         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5037         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5038         pieces.
5039         (dwarf_expr_context::add_piece): Adjust.
5040         * dwarf2loc.c (struct piece_closure): Initialize fields.
5041         <n_pieces>: Remove.
5042         <pieces>: Change type to std::vector.
5043         (allocate_piece_closure): Adjust, change parameter to
5044         std::vector rvalue and std::move it to piece_closure.
5045         (rw_pieced_value): Adjust.
5046         (check_pieced_synthetic_pointer): Adjust.
5047         (indirect_synthetic_pointer): Adjust.
5048         (coerce_pieced_ref): Adjust.
5049         (free_pieced_value_closure):  Adjust.  Use delete to free
5050         piece_closure.
5051         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5052         to allocate_piece_closure.
5053         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5054
5055 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5056
5057         * probe.h (probe_ops_cp): Remove typedef.
5058         (DEF_VEC_P (probe_ops_cp)): Remove.
5059         (all_probe_ops): Change type to std::vector.
5060         * probe.c (info_probes_for_ops): Adjust to vector change.
5061         (probe_linespec_to_ops): Likewise.
5062         (all_probe_ops): Change type to std::vector.
5063         (_initialize_probe): Adjust to vector change.
5064         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5065         * elfread.c (elf_get_probes): Likewise.
5066         * stap-probe.c (_initialize_stap_probe): Likewise.
5067
5068 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5069
5070         * probe.h (struct bound_probe): Define constructors.
5071         * probe.c (bound_probe_s): Remove typedef.
5072         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5073         (collect_probes): Change return type to std::vector, remove
5074         cleanup.
5075         (compare_probes): Return bool, change parameter type.  Change
5076         semantic to "less than".
5077         (gen_ui_out_table_header_info): Change parameter to std::vector
5078         and update.
5079         (exists_probe_with_pops): Likewise.
5080         (info_probes_for_ops): Update to std::vector change.
5081         (enable_probes_command): Likewise.
5082         (disable_probes_command): Likewise.
5083
5084 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5085
5086         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5087         vec to std::vector.
5088         * probe.c (parse_probes_in_pspace): Update.
5089         (find_probes_in_objfile): Update.
5090         (find_probe_by_pc): Update.
5091         (collect_probes): Update.
5092         (probe_any_get_probes): Update.
5093         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5094         return type to reference to std::vector.
5095         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5096         std::vector and update.
5097         (dtrace_process_dof): Likewise.
5098         (dtrace_get_probes): Likewise.
5099         * elfread.c (elf_get_probes): Change return type to std::vector,
5100         store an std::vector in bfd_data.
5101         (probe_key_free): Update to std::vector.
5102         * stap-probe.c (handle_stap_probe): Change parameter to
5103         std::vector and update.
5104         (stap_get_probes): Likewise.
5105         * symfile-debug.c (debug_sym_get_probes): Change return type to
5106         std::vector and update.
5107
5108 2017-09-11  Tom Tromey  <tom@tromey.com>
5109
5110         * breakpoint.c (program_breakpoint_here_p): Update.
5111         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5112         from make_show_memory_breakpoints_cleanup.  Return a
5113         scoped_restore_tmpl<int>.
5114         (restore_show_memory_breakpoints): Remove.
5115         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5116         * mem-break.c (memory_validate_breakpoint): Update.
5117         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5118         (ia64_memory_remove_breakpoint): Update.
5119         (ia64_breakpoint_from_pc): Update.
5120         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5121         from make_show_memory_breakpoints_cleanup.
5122
5123 2017-09-11  Tom Tromey  <tom@tromey.com>
5124
5125         * d-namespace.c (d_lookup_symbol): Use std::string.
5126         (find_symbol_in_baseclass): Likewise.
5127
5128 2017-09-11  Tom Tromey  <tom@tromey.com>
5129
5130         * ctf.c (ctf_start): Use std::string.
5131
5132 2017-09-11  Tom Tromey  <tom@tromey.com>
5133
5134         * ada-lang.c (is_known_support_routine): Update.
5135         (ada_unhandled_exception_name_addr_from_raise): Update.
5136         * guile/scm-frame.c (gdbscm_frame_name): Update.
5137         * python/py-frame.c (frapy_name): Update.
5138         (frapy_function): Update.
5139         * stack.h (find_frame_funname): Update.
5140         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5141         (print_frame): Update.
5142
5143 2017-09-11  Tom Tromey  <tom@tromey.com>
5144
5145         * findcmd.c (put_bits): Take a gdb::byte_vector.
5146         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5147         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5148         cleanups.
5149         (find_command): Update.
5150
5151 2017-09-11  Tom Tromey  <tom@tromey.com>
5152
5153         * cli/cli-script.c (class scoped_restore_hook_in): New.
5154         (clear_hook_in_cleanup): Remove.
5155         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5156         scoped_restore_hook_in.
5157
5158 2017-09-11  Tom Tromey  <tom@tromey.com>
5159
5160         * cli/cli-script.c (restore_interp): Remove.
5161         (read_command_lines): Use scoped_restore_interp.
5162         * interps.c (scoped_restore_interp::set_temp): Rename from
5163         interp_set_temp.
5164         * interps.h (class scoped_restore_interp): New.
5165         (interp_set_temp): Remove.
5166
5167 2017-09-11  Tom Tromey  <tom@tromey.com>
5168
5169         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5170         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5171         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5172         scoped_restore.
5173         (mi_cmd_break_insert_1): Update.
5174         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5175         scoped_restore.
5176
5177 2017-09-11  Tom Tromey  <tom@tromey.com>
5178
5179         * demangle.c (demangle_command): Update.
5180         * breakpoint.c (disable_command): Update.
5181         (enable_command): Update.
5182         (find_location_by_number): Make "number" const.  Use
5183         get_number_trailer.
5184         * cli/cli-utils.c (extract_arg): Return std::string.
5185         * probe.c (parse_probe_linespec): Update.  Change types.
5186         (collect_probes): Take string arguments.
5187         (parse_probe_linespec): Likewise.
5188         (info_probes_for_ops): Update.
5189         (enable_probes_command): Update.
5190         (disable_probes_command): Update.
5191         * break-catch-sig.c (catch_signal_split_args): Update.
5192         * mi/mi-parse.c (mi_parse): Update.
5193
5194 2017-09-11  Tom Tromey  <tom@tromey.com>
5195
5196         * language.h (language_enum): Make argument const.
5197         * language.c (language_enum): Make argument const.
5198
5199 2017-09-11  Tom Tromey  <tom@tromey.com>
5200
5201         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5202         as function.
5203         (skip_to_space): Rename from skip_to_space_const.
5204         * common/common-utils.c (skip_to_space): New function.
5205         (skip_to_space): Rename from skip_to_space_const.
5206         * cli/cli-utils.h (get_number): Rename from get_number_const.
5207         (extract_arg): Rename from extract_arg_const.
5208         * cli/cli-utils.c (get_number): Rename from get_number_const.
5209         (extract_arg): Rename from extract_arg_const.
5210         (number_or_range_parser::get_number): Use ::get_number.
5211         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5212         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5213         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5214         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5215         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5216         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5217         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5218         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5219
5220 2017-09-11  Tom Tromey  <tom@tromey.com>
5221
5222         * python/python.c (do_start_initialization): Use
5223         py-event-types.def to initialize types.
5224         Define all object type structures.
5225         * python/python-internal.h: Don't declare event initialization
5226         functions.
5227         * python/py-threadevent.c (thread_event_object_type): Don't
5228         define.
5229         * python/py-stopevent.c (stop_event_object_type): Don't define.
5230         * python/py-signalevent.c (signal_event_object_type): Don't
5231         declare or define.
5232         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5233         (clear_objfiles_event_object_type): Don't declare or define.
5234         * python/py-infevents.c (inferior_call_pre_event_object_type)
5235         (inferior_call_post_event_object_type)
5236         (register_changed_event_object_type)
5237         (memory_changed_event_object_type): Don't declare or define.
5238         * python/py-inferior.c (new_thread_event_object_type)
5239         (new_inferior_event_object_type)
5240         (inferior_deleted_event_object_type): Don't declare or define.
5241         * python/py-exitedevent.c (exited_event_object_type): Don't
5242         declare or define.
5243         * python/py-evts.c (gdbpy_initialize_py_events): Use
5244         py-all-events.def.
5245         * python/py-events.h (thread_event_object_type): Don't declare.
5246         (events_object): Use py-all-events.def.
5247         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5248         py-event-types.def.
5249         * python/py-event-types.def: New file.
5250         * python/py-continueevent.c (create_continue_event_object): Don't
5251         declare or define.
5252         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5253         declare or define.
5254         * python/py-all-events.def: New file.
5255
5256 2017-09-11  Tom Tromey  <tom@tromey.com>
5257
5258         * python/py-threadevent.c (create_thread_event_object): Return
5259         gdbpy_ref.
5260         * python/py-stopevent.h (create_stop_event_object)
5261         (create_breakpoint_event_object, create_signal_event_object):
5262         Update.
5263         * python/py-stopevent.c (create_stop_event_object): Return
5264         gdbpy_ref.
5265         (emit_stop_event): Update.
5266         * python/py-signalevent.c (create_signal_event_object): Return
5267         gdbpy_ref.
5268         * python/py-infevents.c (create_inferior_call_event_object):
5269         Update.
5270         * python/py-event.h (create_event_object)
5271         (create_thread_event_object): Update.
5272         * python/py-event.c (create_event_object): Return gdbpy_ref.
5273         * python/py-continueevent.c: Return gdbpy_ref.
5274         * python/py-bpevent.c (create_breakpoint_event_object): Return
5275         gdbpy_ref.
5276
5277 2017-09-11  Tom Tromey  <tom@tromey.com>
5278
5279         PR python/15622:
5280         * NEWS: Add entry.
5281         * python/python.c (do_start_initialization): Initialize new event
5282         types.
5283         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5284         (gdbpy_initialize_inferior_deleted_event)
5285         (gdbpy_initialize_new_thread_event): Declare.
5286         * python/py-threadevent.c (create_thread_event_object): Add option
5287         "thread" parameter.
5288         * python/py-inferior.c (new_thread_event_object_type)
5289         (new_inferior_event_object_type)
5290         (inferior_deleted_event_object_type): Declare.
5291         (python_new_inferior, python_inferior_deleted): New functions.
5292         (add_thread_object): Emit new_thread event.
5293         (gdbpy_initialize_inferior): Attach new functions to corresponding
5294         observers.
5295         (new_thread, new_inferior, inferior_deleted): Define new event
5296         types.
5297         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5298         registries.
5299         * python/py-events.h (events_object) <new_inferior,
5300         inferior_deleted, new_thread>: New fields.
5301         * python/py-event.h (create_thread_event_breakpoint): Add optional
5302         "thread" parameter.
5303
5304 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5305
5306         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5307         check current_ui instead.
5308         (internal_vproblem): Likewise.
5309
5310 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5311
5312         * thread.c (print_thread_info_1): Remove unnecessary calls to
5313         uiout->is_mi_like_p.
5314
5315 2017-09-09  Tom Tromey  <tom@tromey.com>
5316
5317         * namespace.h (add_using_directive): Update.
5318         * namespace.c (add_using_directive): Change type of excludes to
5319         std::vector.
5320         * dwarf2read.c (read_import_statement): Use std::vector.
5321         (read_namespace): Update.
5322         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5323
5324 2017-09-09  Tom Tromey  <tom@tromey.com>
5325
5326         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5327
5328 2017-09-09  Tom Tromey  <tom@tromey.com>
5329
5330         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5331
5332 2017-09-09  Tom Tromey  <tom@tromey.com>
5333
5334         * stack.c (func_command): Use gdb::def_vector.
5335
5336 2017-09-09  Tom Tromey  <tom@tromey.com>
5337
5338         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5339         ui_out_emit_list, ui_out_emit_tuple.
5340         (mi_cmd_var_update): Likewise.
5341
5342 2017-09-09  Tom Tromey  <tom@tromey.com>
5343
5344         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5345         ui_out_redirect_pop.
5346         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5347         ui_out_redirect_pop.
5348         * utils.c (do_ui_out_redirect_pop)
5349         (make_cleanup_ui_out_redirect_pop): Remove.
5350         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5351         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5352         * ui-out.h (ui_out_redirect_pop): New class.
5353
5354 2017-09-09  Tom Tromey  <tom@tromey.com>
5355
5356         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5357         (list_available_thread_groups, mi_cmd_list_thread_groups)
5358         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5359         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5360         Likewise.
5361
5362 2017-09-09  Tom Tromey  <tom@tromey.com>
5363
5364         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5365         ui_out_emit_tuple.
5366
5367 2017-09-09  Tom Tromey  <tom@tromey.com>
5368
5369         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5370         * stack.c (print_frame): Use ui_out_emit_tuple.
5371         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5372         (info_spu_mailbox_command, info_spu_dma_command)
5373         (info_spu_proxydma_command): Likewise.
5374         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5375         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5376         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5377         ui_out_emit_tuple.
5378         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5379
5380 2017-09-09  Tom Tromey  <tom@tromey.com>
5381
5382         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5383         (class ui_out_emit_table): Update comment.
5384         * ui-out.c (do_cleanup_table_end)
5385         (make_cleanup_ui_out_table_begin_end): Remove.
5386         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5387         (info_spu_dma_cmdlist): Likewise.
5388         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5389         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5390         ui_out_emit_table.
5391
5392 2017-09-09  Tom Tromey  <tom@tromey.com>
5393
5394         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5395         ui_out_emit_list, gdb::optional.
5396
5397 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5398
5399         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5400         prototype.
5401         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5402         prototype.
5403         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5404         prototype.
5405         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5406         * ada-exp.y: Remove _initialize_ada_exp prototype.
5407         * ada-lang.c: Remove _initialize_ada_language prototype.
5408         * ada-tasks.c: Remove _initialize_tasks prototype.
5409         * addrmap.c: Remove _initialize_addrmap prototype.
5410         * agent.c: Remove _initialize_agent prototype.
5411         * aix-thread.c: Remove _initialize_aix_thread prototype.
5412         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5413         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5414         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5415         prototype.
5416         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5417         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5418         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5419         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5420         prototype.
5421         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5422         prototype.
5423         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5424         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5425         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5426         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5427         prototype.
5428         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5429         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5430         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5431         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5432         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5433         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5434         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5435         prototype.
5436         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5437         prototype.
5438         * annotate.c: Remove _initialize_annotate prototype.
5439         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5440         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5441         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5442         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5443         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5444         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5445         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5446         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5447         prototype.
5448         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5449         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5450         * auto-load.c: Remove _initialize_auto_load prototype.
5451         * auxv.c: Remove _initialize_auxv prototype.
5452         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5453         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5454         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5455         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5456         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5457         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5458         prototype.
5459         * break-catch-throw.c: Remove _initialize_break_catch_throw
5460         prototype.
5461         * breakpoint.c: Remove _initialize_breakpoint prototype.
5462         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5463         * btrace.c: Remove _initialize_btrace prototype.
5464         * charset.c: Remove _initialize_charset prototype.
5465         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5466         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5467         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5468         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5469         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5470         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5471         * coffread.c: Remove _initialize_coffread prototype.
5472         * compile/compile.c: Remove _initialize_compile prototype.
5473         * complaints.c: Remove _initialize_complaints prototype.
5474         * completer.c: Remove _initialize_completer prototype.
5475         * copying.awk: Remove _initialize_copying prototype.
5476         * copying.c: Regenerate.
5477         * core-regset.c: Remove _initialize_core_regset prototype.
5478         * corefile.c: Remove _initialize_core prototype.
5479         * corelow.c: Remove _initialize_corelow prototype.
5480         * cp-abi.c: Remove _initialize_cp_abi prototype.
5481         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5482         * cp-support.c: Remove _initialize_cp_support prototype.
5483         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5484         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5485         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5486         * ctf.c: Remove _initialize_ctf prototype.
5487         * d-lang.c: Remove _initialize_d_language prototype.
5488         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5489         prototype.
5490         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5491         * dbxread.c: Remove _initialize_dbxread prototype.
5492         * dcache.c: Remove _initialize_dcache prototype.
5493         * demangle.c: Remove _initialize_demangler prototype.
5494         * disasm-selftests.c: Remove _initialize_disasm_selftests
5495         prototype.
5496         * disasm.c: Remove _initialize_disasm prototype.
5497         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5498         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5499         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5500         prototype.
5501         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5502         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5503         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5504         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5505         * elfread.c: Remove _initialize_elfread prototype.
5506         * exec.c: Remove _initialize_exec prototype.
5507         * extension.c: Remove _initialize_extension prototype.
5508         * f-lang.c: Remove _initialize_f_language prototype.
5509         * f-valprint.c: Remove _initialize_f_valprint prototype.
5510         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5511         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5512         * filesystem.c: Remove _initialize_filesystem prototype.
5513         * findcmd.c: Remove _initialize_mem_search prototype.
5514         * fork-child.c: Remove _initialize_fork_child prototype.
5515         * frame-base.c: Remove _initialize_frame_base prototype.
5516         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5517         * frame.c: Remove _initialize_frame prototype.
5518         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5519         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5520         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5521         * gcore.c: Remove _initialize_gcore prototype.
5522         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5523         * gdbarch.c: Regenerate.
5524         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5525         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5526         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5527         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5528         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5529         * go-lang.c: Remove _initialize_go_language prototype.
5530         * go32-nat.c: Remove _initialize_go32_nat prototype.
5531         * guile/guile.c: Remove _initialize_guile prototype.
5532         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5533         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5534         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5535         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5536         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5537         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5538         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5539         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5540         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5541         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5542         prototype.
5543         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5544         prototype.
5545         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5546         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5547         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5548         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5549         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5550         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5551         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5552         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5553         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5554         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5555         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5556         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5557         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5558         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5559         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5560         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5561         prototype.
5562         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5563         prototype.
5564         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5565         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5566         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5567         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5568         * infcall.c: Remove _initialize_infcall prototype.
5569         * infcmd.c: Remove _initialize_infcmd prototype.
5570         * inferior.c: Remove _initialize_inferiors prototype.
5571         * inflow.c: Remove _initialize_inflow prototype.
5572         * infrun.c: Remove _initialize_infrun prototype.
5573         * interps.c: Remove _initialize_interpreter prototype.
5574         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5575         * jit.c: Remove _initialize_jit prototype.
5576         * language.c: Remove _initialize_language prototype.
5577         * linux-fork.c: Remove _initialize_linux_fork prototype.
5578         * linux-nat.c: Remove _initialize_linux_nat prototype.
5579         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5580         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5581         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5582         * m2-lang.c: Remove _initialize_m2_language prototype.
5583         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5584         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5585         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5586         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5587         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5588         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5589         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5590         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5591         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5592         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5593         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5594         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5595         * machoread.c: Remove _initialize_machoread prototype.
5596         * macrocmd.c: Remove _initialize_macrocmd prototype.
5597         * macroscope.c: Remove _initialize_macroscope prototype.
5598         * maint.c: Remove _initialize_maint_cmds prototype.
5599         * mdebugread.c: Remove _initialize_mdebugread prototype.
5600         * memattr.c: Remove _initialize_mem prototype.
5601         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5602         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5603         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5604         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5605         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5606         * microblaze-linux-tdep.c: Remove
5607         _initialize_microblaze_linux_tdep prototype.
5608         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5609         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5610         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5611         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5612         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5613         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5614         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5615         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5616         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5617         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5618         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5619         prototype.
5620         * mipsread.c: Remove _initialize_mipsread prototype.
5621         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5622         prototype.
5623         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5624         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5625         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5626         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5627         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5628         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5629         prototype.
5630         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5631         * nto-procfs.c: Remove _initialize_procfs prototype.
5632         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5633         * objc-lang.c: Remove _initialize_objc_language prototype.
5634         * objfiles.c: Remove _initialize_objfiles prototype.
5635         * observer.c: Remove observer_test_first_notification_function,
5636         observer_test_second_notification_function,
5637         observer_test_third_notification_function, and
5638         _initialize_observer prototypes.
5639         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5640         * osabi.c: Remove _initialize_gdb_osabi prototype.
5641         * osdata.c: Remove _initialize_osdata prototype.
5642         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5643         * parse.c: Remove _initialize_parse prototype.
5644         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5645         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5646         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5647         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5648         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5649         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5650         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5651         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5652         * printcmd.c: Remove _initialize_printcmd prototype.
5653         * probe.c: Remove _initialize_probe prototype.
5654         * proc-api.c: Remove _initialize_proc_api prototype.
5655         * proc-events.c: Remove _initialize_proc_events prototype.
5656         * proc-service.c: Remove _initialize_proc_service prototype.
5657         * procfs.c: Remove _initialize_procfs prototype.
5658         * psymtab.c: Remove _initialize_psymtab prototype.
5659         * python/python.c: Remove _initialize_python prototype.
5660         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5661         * record-btrace.c: Remove _initialize_record_btrace prototype.
5662         * record-full.c: Remove _initialize_record_full prototype.
5663         * record.c: Remove _initialize_record prototype.
5664         * regcache.c: Remove _initialize_regcache prototype.
5665         * reggroups.c: Remove _initialize_reggroup prototype.
5666         * remote-notif.c: Remove _initialize_notif prototype.
5667         * remote-sim.c: Remove _initialize_remote_sim prototype.
5668         * remote.c: Remove _initialize_remote prototype.
5669         * reverse.c: Remove _initialize_reverse prototype.
5670         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5671         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5672         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5673         prototype.
5674         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5675         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5676         * rust-exp.y: Remove _initialize_rust_exp prototype.
5677         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5678         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5679         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5680         * score-tdep.c: Remove _initialize_score_tdep prototype.
5681         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5682         prototype.
5683         * ser-go32.c: Remove _initialize_ser_dos prototype.
5684         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5685         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5686         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5687         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5688         * serial.c: Remove _initialize_serial prototype.
5689         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5690         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5691         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5692         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5693         * skip.c: Remove _initialize_step_skip prototype.
5694         * sol-thread.c: Remove _initialize_sol_thread prototype.
5695         * solib-aix.c: Remove _initialize_solib_aix prototype.
5696         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5697         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5698         * solib-frv.c: Remove _initialize_frv_solib prototype.
5699         * solib-spu.c: Remove _initialize_spu_solib prototype.
5700         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5701         * solib-target.c: Remove _initialize_solib_target prototype.
5702         * solib.c: Remove _initialize_solib prototype.
5703         * source.c: Remove _initialize_source prototype.
5704         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5705         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5706         prototype.
5707         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5708         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5709         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5710         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5711         prototype.
5712         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5713         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5714         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5715         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5716         prototype.
5717         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5718         prototype.
5719         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5720         prototype.
5721         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5722         prototype.
5723         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5724         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5725         prototype.
5726         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5727         prototype.
5728         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5729         prototype.
5730         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5731         prototype.
5732         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5733         prototype.
5734         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5735         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5736         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5737         * stabsread.c: Remove _initialize_stabsread prototype.
5738         * stack.c: Remove _initialize_stack prototype.
5739         * stap-probe.c: Remove _initialize_stap_probe prototype.
5740         * std-regs.c: Remove _initialize_frame_reg prototype.
5741         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5742         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5743         * symfile.c: Remove _initialize_symfile prototype.
5744         * symmisc.c: Remove _initialize_symmisc prototype.
5745         * symtab.c: Remove _initialize_symtab prototype.
5746         * target-dcache.c: Remove _initialize_target_dcache prototype.
5747         * target-descriptions.c: Remove _initialize_target_descriptions
5748         prototype.
5749         * thread.c: Remove _initialize_thread prototype.
5750         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5751         prototype.
5752         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5753         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5754         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5755         prototype.
5756         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5757         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5758         * tracefile.c: Remove _initialize_tracefile prototype.
5759         * tracepoint.c: Remove _initialize_tracepoint prototype.
5760         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5761         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5762         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5763         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5764         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5765         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5766         * tui/tui.c: Remove _initialize_tui prototype.
5767         * typeprint.c: Remove _initialize_typeprint prototype.
5768         * user-regs.c: Remove _initialize_user_regs prototype.
5769         * utils.c: Remove _initialize_utils prototype.
5770         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5771         * valarith.c: Remove _initialize_valarith prototype.
5772         * valops.c: Remove _initialize_valops prototype.
5773         * valprint.c: Remove _initialize_valprint prototype.
5774         * value.c: Remove _initialize_values prototype.
5775         * varobj.c: Remove _initialize_varobj prototype.
5776         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5777         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5778         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5779         * windows-nat.c: Remove _initialize_windows_nat,
5780         _initialize_check_for_gdb_ini, and _initialize_loadable
5781         prototypes.
5782         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5783         * xcoffread.c: Remove _initialize_xcoffread prototype.
5784         * xml-support.c: Remove _initialize_xml_support prototype.
5785         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5786         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5787         prototype.
5788         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5789         prototype.
5790         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5791
5792 2017-09-08  Keith Seitz  <keiths@redhat.com>
5793
5794         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5795         field.
5796
5797 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5798
5799         * f-valprint.c (f_val_print): Remove check for one byte
5800         sized integers. Remove printing of character type.
5801
5802 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5803             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5804             Bernhard Heckel  <bernhard.heckel@intel.com>
5805
5806         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5807         to maintain proper indentation when printing pointers/refs.
5808
5809 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5810
5811         GDB 8.0.1 released.
5812
5813 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5814
5815         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5816
5817 2017-09-05  Tom Tromey  <tom@tromey.com>
5818
5819         * parse.c (funcall_chain): Now a std::vector.
5820         (start_arglist, end_arglist): Simplify.
5821         (free_funcalls): Remove.
5822         (parse_exp_in_context_1): Remove cleanup.
5823
5824 2017-09-05  Tom Tromey  <tom@tromey.com>
5825
5826         * go-exp.y (go_parse): Don't create a cleanup.
5827
5828 2017-09-05  Tom Tromey  <tom@tromey.com>
5829
5830         * d-exp.y (PrimaryExpression): Use std::string.
5831         (d_parse): Don't create a cleanup.
5832
5833 2017-09-05  Tom Tromey  <tom@tromey.com>
5834
5835         * utils.c (do_clear_parser_state): Remove.
5836         (make_cleanup_clear_parser_state): Remove.
5837         * p-exp.y (pascal_parse): Use scoped_restore.
5838         * m2-exp.y (m2_parse): Use scoped_restore.
5839         * f-exp.y (f_parse): Use scoped_restore.
5840         * d-exp.y (d_parse): Use scoped_restore.
5841         * c-exp.y (c_parse): Use scoped_restore.
5842         * ada-exp.y (ada_parse): Use scoped_restore.
5843         * utils.h (make_cleanup_clear_parser_state): Remove.
5844
5845 2017-09-06  Keith Seitz  <keiths@redhat.com>
5846
5847         * dwarf2read.c (dw2_linkage_name_attr): New function.
5848         (dw2_linkage_name): New function.
5849         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5850         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5851         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5852
5853 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5854
5855         * config/djgpp/djconfig.sh: Correct shell portability issue.
5856
5857 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5858
5859         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5860
5861 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5862
5863         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5864         * NEWS: Mention new FreeBSD/mips native configuration.
5865         * configure.host: Add aarch64*-*-freebsd*.
5866         * configure.nat: Likewise.
5867         * aarch64-fbsd-nat.c: New file.
5868
5869 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5870
5871         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5872         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5873         * NEWS: Mention new FreeBSD/aarch64 target.
5874         * configure.tgt: Add aarch64*-*-freebsd*.
5875         * aarch64-fbsd-tdep.c: New file.
5876         * aarch64-fbsd-tdep.h: New file.
5877
5878 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5879
5880         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5881
5882 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5883
5884         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5885         of TLS symbols.
5886
5887 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5888
5889         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5890         call.
5891
5892 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5893
5894         * infrun.c (follow_exec): Call add_thread after
5895         target_find_description.
5896
5897 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5898
5899         * infrun.c (handle_inferior_event_1): When exec'ing, read
5900         stop_pc after follow_exec.
5901
5902 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5903
5904         * remote.c (process_g_packet): Update error message.
5905
5906 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5907
5908         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5909         targets.
5910
5911 2017-09-05  Pedro Alves  <palves@redhat.com>
5912
5913         * eval.c (eval_call, evaluate_funcall): New functions, factored
5914         out from ...
5915         (evaluate_subexp_standard): ... this.
5916
5917 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5918
5919         * amd64-tdep.c (amd64_target_description): Create target
5920         descriptions.
5921         (_initialize_amd64_tdep): Don't call functions
5922         initialize_tdesc_amd64_*.  Add self tests.
5923         * arch/amd64.c (amd64_create_target_description): Add parameter
5924         is_linux.  Call set_tdesc_osabi if is_linux is true.
5925         * arch/amd64.h (amd64_create_target_description): Update the
5926         declaration.
5927         * arch/i386.c (i386_create_target_description): Add parameter
5928         is_linux.  Call set_tdesc_osabi if is_linux is true.
5929         * arch/i386.h (i386_create_target_description): Update
5930         declaration.
5931         * configure.tgt: Add i386.o to gdb_target_obs.
5932         * features/Makefile (XMLTOC): Remove i386/*.xml.
5933         * features/i386/amd64-avx-avx512.c: Remove.
5934         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5935         * features/i386/amd64-avx-mpx.c: Remove.
5936         * features/i386/amd64-avx.c: Remove.
5937         * features/i386/amd64-mpx.c: Remove.
5938         * features/i386/amd64.c: Remove.
5939         * features/i386/i386-avx-avx512.c: Remove.
5940         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5941         * features/i386/i386-avx-mpx.c: Remove.
5942         * features/i386/i386-avx.c: Remove.
5943         * features/i386/i386-mmx.c: Remove.
5944         * features/i386/i386-mpx.c: Remove.
5945         * features/i386/i386.c: Remove.
5946         * i386-tdep.c: Don't include features/i386/i386*.c., include
5947         target-descriptions.h and arch/i386.h.
5948         (i386_target_description): Create target descriptions.
5949         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5950         functions.  Do self tests.
5951
5952 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5953
5954         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5955         * features/i386/amd64-avx-avx512-linux.c: Removed.
5956         * features/i386/amd64-avx-linux.c: Removed.
5957         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5958         * features/i386/amd64-avx-mpx-linux.c: Removed.
5959         * features/i386/amd64-linux.c: Removed.
5960         * features/i386/amd64-mpx-linux.c: Removed.
5961         * features/i386/x32-avx-avx512-linux.c: Removed.
5962         * features/i386/x32-avx-linux.c: Removed.
5963         * features/i386/x32-linux.c: Removed.
5964
5965 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5966
5967         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5968         features/i386/*.c.
5969         (amd64_linux_read_description): Call
5970         amd64_create_target_description.
5971         * arch/amd64.c: New file.
5972         * arch/amd64.h: New file.
5973         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5974         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5975
5976 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5977
5978         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5979         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5980         (amd64_linux_read_description): Create target descriptions.
5981         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5982         functions.  Add unit tests.
5983         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5984         x32-core.xml.
5985         * features/i386/64bit-avx.c: Generated.
5986         * features/i386/64bit-avx512.c: Generated.
5987         * features/i386/64bit-core.c: Generated.
5988         * features/i386/64bit-linux.c: Generated.
5989         * features/i386/64bit-mpx.c: Generated.
5990         * features/i386/64bit-pkeys.c: Generated.
5991         * features/i386/64bit-segments.c: Generated.
5992         * features/i386/64bit-sse.c: Generated.
5993         * features/i386/x32-core.c: Generated.
5994         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5995         c files for amd64-linux and x32-linux.
5996
5997 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5998
5999         * amd64-linux-tdep.c (amd64_linux_read_description): New
6000         function.
6001         (amd64_linux_core_read_description): Call
6002         amd64_linux_read_description.
6003         (amd64_linux_init_abi): Likewise.
6004         (amd64_x32_linux_init_abi): Likewise.
6005         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6006         * x86-linux-nat.c (x86_linux_read_description): Call
6007         amd64_linux_read_description.
6008
6009 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6010
6011         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6012         comments.
6013
6014 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6015
6016         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6017         * features/i386/i386-avx-avx512-linux.c: Remove.
6018         * features/i386/i386-avx-linux.c: Remove.
6019         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6020         * features/i386/i386-avx-mpx-linux.c: Remove.
6021         * features/i386/i386-linux.c: Remove.
6022         * features/i386/i386-mmx-linux.c: Remove.
6023         * features/i386/i386-mpx-linux.c: Remove.
6024
6025 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6026
6027         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6028         (SFILES): Add arch/i386.c.
6029         (HFILES_NO_SRCDIR): Add arch/i386.h.
6030         * arch/i386.c: New file.
6031         * arch/i386.h: New file.
6032         * arch/tdesc.h (allocate_target_description): Declare.
6033         (set_tdesc_architecture): Declare.
6034         (set_tdesc_osabi): Declare.
6035         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6036         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6037         include arch/i386.h.
6038         (i386_linux_read_description): Remove code and call
6039         i386_create_target_description.
6040         (set_tdesc_architecture): New function.
6041         (set_tdesc_osabi): New function.
6042         * target-descriptions.h (allocate_target_description): Remove.
6043
6044 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6045
6046         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6047         * target-descriptions.c (tdesc_create_feature): Likewise, and
6048         adjust code.
6049         * features/i386/32bit-avx.c: Re-generated.
6050         * features/i386/32bit-avx512.c: Re-generated.
6051         * features/i386/32bit-core.c: Re-generated.
6052         * features/i386/32bit-linux.c: Re-generated.
6053         * features/i386/32bit-mpx.c: Re-generated.
6054         * features/i386/32bit-pkeys.c: Re-generated.
6055         * features/i386/32bit-sse.c: Re-generated.
6056
6057 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6058
6059         * regformats/regdef.h (struct reg): Override operator == and !=.
6060
6061 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6062
6063         * arch/tdesc.h: New file.
6064         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6065         * target-descriptions.c: Update comments.
6066         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6067         declarations.
6068         * features/i386/32bit-avx.c: Re-generated.
6069         * features/i386/32bit-avx512.c: Re-generated.
6070         * features/i386/32bit-core.c: Re-generated.
6071         * features/i386/32bit-linux.c: Re-generated.
6072         * features/i386/32bit-mpx.c: Re-generated.
6073         * features/i386/32bit-pkeys.c: Re-generated.
6074         * features/i386/32bit-sse.c: Re-generated.
6075
6076 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6077
6078         * regformats/regdat.sh: Update generated code.
6079
6080 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6081
6082         * regformats/regdat.sh: Adjust code order.
6083
6084 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6085
6086         * expprint.c (dump_subexp_body_standard): Use constant format
6087         string in fprintf_filtered call.
6088
6089 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6090
6091         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6092         NetBSD/i386.
6093         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6094
6095 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6096
6097         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6098
6099 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6100
6101         * bsd-kvm.o: Define _KMEMUSER.
6102         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6103         * configure: Regenerate.
6104
6105 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6106
6107         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6108         * i386-fbsd-nat.c: Likewise.
6109
6110 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6111
6112         * unittests/array-view-selftests.c: Add include of <array>.
6113
6114 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6115
6116         * spu-tdep.c (flush_ea_cache): Add missing argument to
6117         call_function_by_hand.
6118
6119 2017-09-04  Pedro Alves  <palves@redhat.com>
6120
6121         * NEWS (Safer support for debugging with no debug info): New.
6122
6123 2017-09-04  Pedro Alves  <palves@redhat.com>
6124
6125         * c-exp.y (function_method, function_method_void): Add current
6126         instance flags to TYPE_INSTANCE.
6127         * dwarf2read.c (check_modifier): New.
6128         (compute_delayed_physnames): Assert that only C++ adds delayed
6129         physnames.  Mark fn_fields as const/volatile depending on
6130         physname.
6131         * eval.c (make_params): New type_instance_flags parameter.  Use
6132         it as the new type's instance flags.
6133         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6134         flags element and pass it to make_params.
6135         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6136         instance flags element.
6137         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6138         * gdbtypes.h: Include "enum-flags.h".
6139         (type_instance_flags): New enum-flags type.
6140         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6141         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6142         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6143         (follow_type_instance_flags): New function.
6144         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6145         * parser-defs.h (follow_type_instance_flags): Declare.
6146         * valops.c (value_struct_elt_for_reference): const/volatile must
6147         match too.
6148
6149 2017-09-04  Pedro Alves  <palves@redhat.com>
6150
6151         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6152         function/method scopes; lookup the nested name as a function local
6153         static variable.
6154
6155 2017-09-04  Pedro Alves  <palves@redhat.com>
6156
6157         (%type <voidval>): Add function_method.
6158         * c-exp.y (exp): New production for calls with no arguments.
6159         (function_method, function_method_void_or_typelist): New
6160         productions.
6161         (exp): New production for "method()::static_var".
6162         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6163         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6164         Handle OP_FUNC_STATIC_VAR.
6165         * parse.c (operator_length_standard):
6166         Handle OP_FUNC_STATIC_VAR.
6167
6168 2017-09-04  Pedro Alves  <palves@redhat.com>
6169
6170         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6171         handling.
6172         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6173         Ditto.
6174         * parse.c (operator_length_standard, operator_check_standard):
6175         Ditto.
6176         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6177
6178 2017-09-04  Pedro Alves  <palves@redhat.com>
6179
6180         * ax-gdb.c: Include "typeprint.h".
6181         (gen_expr_for_cast): New function.
6182         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6183         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6184         type is unknown.
6185         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6186         nodebug_data_symbol.
6187         * eval.c: Include "typeprint.h".
6188         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6189         Error out if symbol has unknown type.
6190         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6191         evaluate_subexp_for_cast.
6192         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6193         OP_VAR_MSYM_VALUE.
6194         (evaluate_subexp_for_cast): New function.
6195         * gdbtypes.c (init_nodebug_var_type): New function.
6196         (objfile_type): Use it to initialize types of variables with no
6197         debug info.
6198         * typeprint.c (error_unknown_type): New.
6199         * typeprint.h (error_unknown_type): New declaration.
6200         * compile/compile-c-types.c (convert_type_basic): Handle
6201         TYPE_CODE_ERROR; warn and fallback to int for variables with
6202         unknown type.
6203
6204 2017-09-04  Pedro Alves  <palves@redhat.com>
6205
6206         * eval.c (evaluate_var_value): New function, factored out from ...
6207         (evaluate_subexp_standard): ... here.
6208
6209 2017-09-04  Pedro Alves  <palves@redhat.com>
6210
6211         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6212         Remove useless assignments to 'op'.
6213
6214 2017-09-04  Pedro Alves  <palves@redhat.com>
6215
6216         * eval.c (eval_skip_value): New function.
6217         (evaluate_subexp_standard): Use it.
6218
6219 2017-09-04  Pedro Alves  <palves@redhat.com>
6220
6221         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6222         function name from symbol/minsym and pass it to
6223         error_call_unknown_return_type.
6224
6225 2017-09-04  Pedro Alves  <palves@redhat.com>
6226
6227         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6228         * ax-gdb.c (gen_msym_var_ref): New function.
6229         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6230         * eval.c (evaluate_var_msym_value): New function.
6231         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6232         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6233         to call_function_by_hand.
6234         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6235         Handle OP_VAR_MSYM_VALUE.
6236         (union exp_element) <msymbol>: New field.
6237         * minsyms.h (struct type): Forward declare.
6238         (find_minsym_type_and_address): Declare.
6239         * parse.c (write_exp_elt_msym): New function.
6240         (write_exp_msymbol): Delete, refactored as ...
6241         (find_minsym_type_and_address): ... this new function.
6242         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6243         (operator_length_standard, operator_check_standard): Handle
6244         OP_VAR_MSYM_VALUE.
6245         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6246
6247 2017-09-04  Pedro Alves  <palves@redhat.com>
6248
6249         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6250         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6251         unknown.
6252         * ada-typeprint.c (print_func_type): Handle functions with unknown
6253         return type.
6254         * c-typeprint.c (c_type_print_base): Handle functions and methods
6255         with unknown return type.
6256         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6257         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6258         * compile/compile-c-types.c: Include "objfiles.h".
6259         (convert_func): For functions with unknown return type, warn and
6260         default to int.
6261         * compile/compile-object-run.c (compile_object_run): Adjust call
6262         to call_function_by_hand_dummy.
6263         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6264         call_function_by_hand.
6265         * eval.c (evaluate_subexp_standard): Adjust calls to
6266         call_function_by_hand.  Handle functions and methods with unknown
6267         return type.  Pass expect_type to call_function_by_hand.
6268         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6269         return type.
6270         * gcore.c (call_target_sbrk): Adjust call to
6271         call_function_by_hand.
6272         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6273         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6274         an integer address type instead of nodebug.
6275         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6276         call_function_by_hand.
6277         * infcall.c (error_call_unknown_return_type): New function.
6278         (call_function_by_hand): New "default_return_type" parameter.
6279         Pass it down.
6280         (call_function_by_hand_dummy): New "default_return_type"
6281         parameter.  Use it instead of defaulting to int.  If there's no
6282         default and the return type is unknown, throw an error.  If
6283         there's a default return type, and the called function has no
6284         debug info, then assume the function is prototyped.
6285         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6286         New "default_return_type" parameter.
6287         (error_call_unknown_return_type): New declaration.
6288         * linux-fork.c (call_lseek): Cast return type of lseek.
6289         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6290         call_function_by_hand.
6291         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6292         calls to call_function_by_hand.
6293         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6294         return type.
6295         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6296         (value_nsstring, print_object_command): Adjust calls to
6297         call_function_by_hand.
6298         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6299         functions with unknown return type.
6300         (pascal_type_print_func_varspec_suffix): New function.
6301         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6302         TYPE_CODE_METHOD>: Use it.
6303         * python/py-value.c (valpy_call): Adjust call to
6304         call_function_by_hand.
6305         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6306         call_function_by_hand.
6307         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6308         call_function_by_hand.
6309         * valops.c (value_allocate_space_in_inferior): Adjust call to
6310         call_function_by_hand.
6311         * typeprint.c (type_print_unknown_return_type): New function.
6312         * typeprint.h (type_print_unknown_return_type): New declaration.
6313
6314 2017-09-04  Pedro Alves  <palves@redhat.com>
6315
6316         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6317         types with more than one parameter as prototyped.
6318
6319 2017-09-04  Pedro Alves  <palves@redhat.com>
6320
6321         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6322         (disassemble_command): Use gdb_disassembly_flags instead of bare
6323         int.
6324         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6325         (dump_insns, do_mixed_source_and_assembly_deprecated)
6326         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6327         Use gdb_disassembly_flags instead of bare int.
6328         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6329         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6330         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6331         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6332         (enum gdb_disassembly_flag): ... values of this new enumeration.
6333         (gdb_disassembly_flags): Define.
6334         (gdb_disassembly)
6335         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6336         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6337         gdb_disassembly_flags instead of bare int.
6338         * record-btrace.c (btrace_insn_history)
6339         (record_btrace_insn_history, record_btrace_insn_history_range)
6340         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6341         instead of bare int.
6342         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6343         Use gdb_disassembly_flags instead of bare int.
6344         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6345         Define.
6346         * target-delegates.c: Regenerate.
6347         * target.c (target_insn_history, target_insn_history_from)
6348         (target_insn_history_range): Use gdb_disassembly_flags instead of
6349         bare int.
6350         * target.h: Include "disasm.h".
6351         (struct target_ops) <to_insn_history, to_insn_history_from,
6352         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6353         int.
6354         (target_insn_history, target_insn_history_from)
6355         (target_insn_history_range): Use gdb_disassembly_flags instead of
6356         bare int.
6357
6358 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6359
6360         * cli/cli-script.c (build_command_line): For if/while commands,
6361         check whether args is empty.
6362
6363 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6364
6365         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6366         (enum command_control_type): Likewise.
6367         (struct command_line): Likewise.
6368         (free_command_lines): Likewise.
6369         (struct command_lines_deleter): Likewise.
6370         (command_line_up): Likewise.
6371         (read_command_lines): Likewise.
6372         (read_command_lines_1): Likewise.
6373         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6374         (enum command_control_type): Likewise.
6375         (struct command_line): Likewise.
6376         (free_command_lines): Likewise.
6377         (struct command_lines_deleter): Likewise.
6378         (command_line_up): Likewise.
6379         (read_command_lines): Likewise.
6380         (read_command_lines_1): Likewise.
6381         * breakpoint.h: Include cli/cli-script.h.
6382         * extension-priv.h: Likewise.
6383         * gdbcmd.h: Likewise.
6384
6385 2017-09-04  Pedro Alves  <palves@redhat.com>
6386
6387         * ada-lang.c (is_known_support_routine): Move sal declaration to
6388         where it is initialized.
6389         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6390         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6391         (clear_command, update_static_tracepoint): Remove init_sal
6392         references.  Move declarations closer to initializations.
6393         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6394         initializations.
6395         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6396         references.  Move sal declarations closer to initializations.
6397         * frame.c (find_frame_sal): Return a symtab_and_line via function
6398         return instead of output parameter.  Remove init_sal references.
6399         * frame.h (find_frame_sal): Return a symtab_and_line via function
6400         return instead of output parameter.
6401         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6402         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6403         instead of memset.
6404         (gdbscm_find_pc_line): Remove init_sal reference.
6405         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6406         references.  Move declarations closer to initializations.
6407         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6408         initializations.
6409         (finish_backward): Remove init_sal references.  Move declarations
6410         closer to initializations.
6411         * infrun.c (process_event_stop_test, handle_step_into_function)
6412         (insert_hp_step_resume_breakpoint_at_frame)
6413         (insert_step_resume_breakpoint_at_caller): Likewise.
6414         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6415         (symbol_to_sal): Likewise.
6416         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6417         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6418         to its initialization.
6419         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6420         init_sal references.  Move declarations closer to initializations.
6421         * source.c (get_current_source_symtab_and_line): Remove brace
6422         initialization.
6423         (set_current_source_symtab_and_line): Now takes the sal by const
6424         reference.  Remove brace initialization.
6425         (line_info): Remove init_sal reference.
6426         * source.h (set_current_source_symtab_and_line): Now takes a
6427         symtab_and_line via const reference.
6428         * stack.c (set_current_sal_from_frame): Adjust.
6429         (print_frame_info): Adjust.
6430         (get_last_displayed_sal): Return the sal via function return
6431         instead of via output parameter.  Simplify.
6432         (frame_info): Adjust.
6433         * stack.h (get_last_displayed_sal): Return the sal via function
6434         return instead of via output parameter.
6435         * symtab.c (init_sal): Delete.
6436         (find_pc_sect_line): Remove init_sal references.  Move
6437         declarations closer to initializations.
6438         (find_function_start_sal): Remove init_sal references.  Move
6439         declarations closer to initializations.
6440         * symtab.h (struct symtab_and_line): In-class initialize all
6441         fields.
6442         * tracepoint.c (set_traceframe_context)
6443         (print_one_static_tracepoint_marker): Remove init_sal references.
6444         Move declarations closer to initializations.
6445         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6446         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6447         declarations closer to initializations.
6448         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6449         init_sal references.  Adjust.
6450
6451 2017-09-04  Pedro Alves  <palves@redhat.com>
6452
6453         * ax-gdb.c (agent_command_1): Use range-for.
6454         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6455         * breakpoint.c: Include "common/array-view.h".
6456         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6457         parameter from struct symtabs_and_lines to
6458         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6459         (breakpoint_sals_to_pc): Change sals parameter from struct
6460         symtabs_and_lines to std::vector reference.
6461         (check_fast_tracepoint_sals): Change sals parameter from struct
6462         symtabs_and_lines to std::array_view.  Use range-for.
6463         (decode_static_tracepoint_spec): Return a std::vector instead of
6464         symtabs_and_lines.  Update.
6465         (create_breakpoint): Update.
6466         (break_range_command, until_break_command, clear_command): Update.
6467         (base_breakpoint_decode_location, bkpt_decode_location)
6468         (bkpt_probe_create_sals_from_location)
6469         (bkpt_probe_decode_location, tracepoint_decode_location)
6470         (tracepoint_probe_decode_location)
6471         (strace_marker_create_sals_from_location): Return a std::vector
6472         instead of symtabs_and_lines.
6473         (strace_marker_create_breakpoints_sal): Update.
6474         (strace_marker_decode_location): Return a std::vector instead of
6475         symtabs_and_lines.  Update.
6476         (update_breakpoint_locations): Change struct symtabs_and_lines
6477         parameters to gdb::array_view.  Adjust.
6478         (location_to_sals): Return a std::vector instead of
6479         symtabs_and_lines.  Update.
6480         (breakpoint_re_set_default): Use std::vector instead of struct
6481         symtabs_and_lines.
6482         (decode_location_default): Return a std::vector instead of
6483         symtabs_and_lines.  Update.
6484         * breakpoint.h: Include "common/array-view.h".
6485         (struct breakpoint_ops) <decode_location>: Now returns a
6486         std::vector instead of returning a symtabs_and_lines via output
6487         parameter.
6488         (update_breakpoint_locations): Change sals parameters to use
6489         gdb::array_view.
6490         * cli/cli-cmds.c (edit_command, list_command): Update to use
6491         std::vector and gdb::array_view.
6492         (ambiguous_line_spec): Adjust to use gdb::array_view and
6493         range-for.
6494         (compare_symtabs): Rename to ...
6495         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6496         const reference and adjust.
6497         (filter_sals): Rewrite using std::vector and standard algorithms.
6498         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6499         (jump_command): Update to use std::vector.
6500         * linespec.c (struct linespec_state) <canonical_names>: Update
6501         comment.
6502         (add_sal_to_sals_basic): Delete.
6503         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6504         (decode_line_2, create_sals_line_offset)
6505         (convert_address_location_to_sals, convert_linespec_to_sals)
6506         (convert_explicit_location_to_sals, parse_linespec)
6507         (event_location_to_sals, decode_line_full, decode_line_1)
6508         (decode_line_with_current_source)
6509         (decode_line_with_last_displayed, decode_objc)
6510         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6511         (linespec_result::~linespec_result): Adjust to use std::vector
6512         instead of symtabs_and_lines.
6513         * linespec.h (linespec_sals::sals): Now a std::vector.
6514         (struct linespec_result): Use std::vector, bool, and in-class
6515         initialization.
6516         (decode_line_1, decode_line_with_current_source)
6517         (decode_line_with_last_displayed): Return std::vector.
6518         * macrocmd.c (info_macros_command): Use std::vector.
6519         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6520         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6521         std::vector.
6522         * probe.h (parse_probes): Return a std::vector.
6523         * python/python.c (gdbpy_decode_line): Use std::vector and
6524         gdb::array_view.
6525         * source.c (select_source_symtab, line_info): Use std::vector.
6526         * stack.c (func_command): Use std::vector.
6527         * symtab.h (struct symtabs_and_lines): Delete.
6528         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6529
6530 2017-09-04  Pedro Alves  <palves@redhat.com>
6531
6532         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6533         unittests/array-view-selftests.c.
6534         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6535         * common/array-view.h: New file.
6536         * unittests/array-view-selftests.c: New file.
6537
6538 2017-09-04  Pedro Alves  <palves@redhat.com>
6539
6540         * cli/cli-cmds.c (edit_command): Pass message to
6541         ambiguous_line_spec.
6542         (list_command): Pass message to ambiguous_line_spec.  Say
6543         "first"/"last" instead of "start" and "end" to be consistent with
6544         the manual.
6545         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6546         them to print formatted message.
6547
6548 2017-09-04  Pedro Alves  <palves@redhat.com>
6549
6550         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6551         ftrace_update_insns by reference instead of pointer.
6552
6553 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6554
6555         * i386-go32-tdep.c: Include x86-xstate.h.
6556         (i386_go32_init_abi): Call i386_target_description.
6557         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6558         if xcr0 is X86_XSTATE_X87_MASK.
6559         * i386-tdep.h (tdesc_i386): Remove the declaration.
6560         (tdesc_i386_mmx): Likewise.
6561
6562 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6563
6564         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6565         X86_XSTATE_SSE_MASK instead of 0.
6566
6567 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6568
6569         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6570         i386_target_description.
6571         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6572         i386_target_description.
6573         * i386-tdep.c (i386_gdbarch_init): Likewise.
6574
6575 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6576
6577         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6578         (x86_darwin_init_abi_64): Call amd64_target_description.
6579         * amd64-dicos-tdep.c: Likewise.
6580         * amd64-fbsd-nat.c: Likewise.
6581         * amd64-fbsd-tdep.c: Likewise.
6582         * amd64-nbsd-tdep.c: Likewise.
6583         * amd64-obsd-tdep.c: Likewise.
6584         * amd64-sol2-tdep.c: Likewise.
6585         * amd64-windows-tdep.c: Likewise.
6586         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6587
6588 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6589
6590         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6591         (btrace_function) <insn>: Change type to use std::vector.
6592         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6593         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6594         ftrace_update_insns, ftrace_compute_global_level_offset,
6595         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6596         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6597         change to std::vector.
6598         (ftrace_update_insns): Adjust to change to std::vector, change
6599         type of INSN parameter.
6600         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6601         * record-btrace.c (btrace_call_history_insn_range,
6602         btrace_compute_src_line_range,
6603         record_btrace_frame_prev_register): Adjust to change to
6604         std::vector.
6605         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6606         to change to std::vector.
6607
6608 2017-09-03  Tom Tromey  <tom@tromey.com>
6609
6610         * corefile.c (reopen_exec_file): Use std::string.
6611
6612 2017-09-03  Tom Tromey  <tom@tromey.com>
6613
6614         * compile/compile.c (compile_register_name_mangled): Return
6615         std::string.
6616         * compile/compile-loc2c.c (pushf_register_address): Update.
6617         (pushf_register): Update.
6618         * compile/compile-c-types.c (convert_array): Update.
6619         * compile/compile-c-symbols.c (generate_vla_size): Update.
6620         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6621         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6622         (convert_one_symbol): Update.
6623         (generate_c_for_for_one_variable): Update.
6624         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6625         std::string.
6626         (generate_register_struct): Update.
6627         * compile/compile-internal.h (c_get_range_decl_name): Return a
6628         std::string.
6629         (compile_register_name_mangled): Return std::string.
6630
6631 2017-09-03  Tom Tromey  <tom@tromey.com>
6632
6633         * utils.c (perror_string): Return a std::string.
6634         (throw_perror_with_name, perror_warning_with_name): Update.
6635
6636 2017-09-03  Tom Tromey  <tom@tromey.com>
6637
6638         * demangle.c (demangle_command): Use std::string,
6639         unique_xmalloc_ptr.
6640
6641 2017-09-03  Tom Tromey  <tom@tromey.com>
6642
6643         * cli/cli-setshow.c (do_set_command): Use std::string.
6644
6645 2017-09-03  Tom Tromey  <tom@tromey.com>
6646
6647         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6648
6649 2017-09-03  Tom Tromey  <tom@tromey.com>
6650
6651         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6652
6653 2017-09-03  Tom Tromey  <tom@tromey.com>
6654
6655         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6656         gdb::unique_xmalloc_ptr.
6657
6658 2017-09-03  Tom Tromey  <tom@tromey.com>
6659
6660         * thread.c (print_thread_info_1): Use string_printf.
6661         (thread_apply_command, thread_apply_all_command): Use
6662         std::string.
6663
6664 2017-09-03  Tom Tromey  <tom@tromey.com>
6665
6666         * valprint.c (val_print_string): Update.
6667         * gdbcore.h (memory_error_message): Return std::string.
6668         * corefile.c (memory_error_message): Return std::string.
6669         (memory_error): Update.
6670         * breakpoint.c (insert_bp_location): Update.
6671
6672 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6673
6674         * target/waitstatus.h (target_waitstatus_to_string): Change
6675         return type to std::string.
6676         * target/waitstatus.c (target_waitstatus_to_string): Return
6677         std::string.
6678         * target.h (target_waitstatus_to_string): Remove declaration.
6679         * infrun.c (resume, clear_proceed_status_thread,
6680         print_target_wait_results, do_target_wait, save_waitstatus,
6681         stop_all_threads): Adjust.
6682         * record-btrace.c (record_btrace_wait): Adjust.
6683         * target-debug.h
6684         (target_debug_print_struct_target_waitstatus_p): Adjust.
6685
6686 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6687
6688         PR gdb/22046
6689         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6690         detection.
6691
6692 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6693
6694         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6695         for setting/unsetting environment variables on the remote target.
6696         (New remote packets): Add entries for QEnvironmentHexEncoded,
6697         QEnvironmentUnset and QEnvironmentReset.
6698         * common/environ.c (gdb_environ::operator=): Extend method to
6699         handle m_user_set_env_list and m_user_unset_env_list.
6700         (gdb_environ::clear): Likewise.
6701         (match_var_in_string): Change type of first parameter from 'char
6702         *' to 'const char *'.
6703         (gdb_environ::set): Extend method to handle
6704         m_user_set_env_list and m_user_unset_env_list.
6705         (gdb_environ::unset): Likewise.
6706         (gdb_environ::clear_user_set_env): New method.
6707         (gdb_environ::user_set_envp): Likewise.
6708         (gdb_environ::user_unset_envp): Likewise.
6709         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6710         m_user_unset_env_list on move constructor/assignment.
6711         (unset): Add new default parameter 'update_unset_list = true'.
6712         (clear_user_set_env): New method.
6713         (user_set_envp): Likewise.
6714         (user_unset_envp): Likewise.
6715         (m_user_set_env_list): New std::set.
6716         (m_user_unset_env_list): Likewise.
6717         * common/rsp-low.c (hex2str): New function.
6718         (bin2hex): New overload for bin2hex function.
6719         * common/rsp-low.c (hex2str): New prototype.
6720         (str2hex): New overload prototype.
6721         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6722         QEnvironmentUnset and QEnvironmentReset.
6723         (remote_protocol_features): Add QEnvironmentHexEncoded,
6724         QEnvironmentUnset and QEnvironmentReset packets.
6725         (send_environment_packet): New function.
6726         (extended_remote_environment_support): Likewise.
6727         (extended_remote_create_inferior): Call
6728         extended_remote_environment_support.
6729         (_initialize_remote): Add QEnvironmentHexEncoded,
6730         QEnvironmentUnset and QEnvironmentReset packet configs.
6731         * unittests/environ-selftests.c (gdb_selftest_env_var):
6732         New variable.
6733         (test_vector_initialization): New function.
6734         (test_init_from_host_environ): Likewise.
6735         (test_reinit_from_host_environ): Likewise.
6736         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6737         Likewise.
6738         (test_unset_set_empty_vector): Likewise.
6739         (test_vector_clear): Likewise.
6740         (test_std_move): Likewise.
6741         (test_move_constructor):
6742         (test_self_move): Likewise.
6743         (test_set_unset_reset): Likewise.
6744         (run_tests): Rewrite in terms of the functions above.
6745
6746 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6747
6748         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6749         (adi_available): Use a temp variable of type CORE_ADDR as argument
6750         3 when calling target_auxv_search.
6751         (adi_normalize_address): Use masks and xor operators to calculate
6752         normalized address.
6753         (adi_read_versions, adi_write_versions, adi_print_versions)
6754         (do_examine, do_assign): Use paddress.
6755
6756 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6757
6758         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6759         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6760         out of loop and add supply of FIR.
6761         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6762         add collect of FIR.
6763
6764 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6765
6766         PR gdb/21827
6767         * cli/cli-script.c (define_command): Don't convert command name
6768         to lower case.
6769
6770 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6771
6772         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6773         Update all callers accordingly. Remove all code blocks handling
6774         the case where DISPP is not NULL.
6775
6776 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6777
6778         PR symtab/22003
6779         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6780         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6781         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6782
6783 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6784
6785         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6786         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6787         (read_comp_units_from_section): New parameter abbrev_section, use
6788         read_and_check_comp_unit_head, allocate signatured_type if needed.
6789         (create_all_comp_units): Update read_comp_units_from_section caller.
6790
6791 2017-08-23  Pedro Alves  <palves@redhat.com>
6792
6793         PR remote/21852
6794         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6795         to null_ptid and switch to thread without reading the registers
6796         after adding the inferior.
6797
6798 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6799
6800         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6801         compile-gcc.
6802         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6803         (compile_to_object): Implement compile_gcc.
6804         (_initialize_compile): Install "set compile-gcc".  Initialize
6805         compile_gcc.
6806
6807 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6808
6809         * compile/compile.c (compile_to_object): Conditionally call
6810         set_verbose.  Conditionally call compile or compile_v0.
6811
6812 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6813
6814         * sparc64-tdep.h: (adi_normalize_address): New export.
6815         * sparc-nat.h: (open_adi_tag_fd): New export.
6816         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6817         * sparc64-linux-tdep.c:
6818         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6819         (sparc64_linux_handle_segmentation_fault): New function.
6820         (sparc64_linux_init_abi): Register
6821         sparc64_linux_handle_segmentation_fault
6822         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6823         (sparc64_addr_bits_remove): New function.
6824         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6825         (MAX_PROC_NAME_SIZE): New macro.
6826         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6827         (sparc64adilist): New variable.
6828         (adi_proc_list): New variable.
6829         (find_adi_info): New function.
6830         (add_adi_info): New function.
6831         (get_adi_info_proc): New function.
6832         (get_adi_info): New function.
6833         (info_adi_command): New function.
6834         (read_maps_entry): New function.
6835         (adi_available): New function.
6836         (adi_normalize_address): New function.
6837         (adi_align_address): New function.
6838         (adi_convert_byte_count): New function.
6839         (adi_tag_fd): New function.
6840         (adi_is_addr_mapped): New function.
6841         (adi_read_versions): New function.
6842         (adi_write_versions): New function.
6843         (adi_print_versions): New function.
6844         (do_examine): New function.
6845         (do_assign): New function.
6846         (adi_examine_command): New function.
6847         (adi_assign_command): New function.
6848         (_initialize_sparc64_adi_tdep): New function.
6849
6850 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6851
6852         * breakpoint.c (breakpoints_info): Rename to ...
6853         (info_breakpoints_command): ... this.
6854         (watchpoints_info): Rename to ...
6855         (info_watchpoints_command): ... this.
6856         (tracepoints_info): Rename to ...
6857         (info_tracepoints_command): ... this.
6858         (_initialize_breakpoint): Adjust.
6859         * dcache.c (dcache_info): Rename to ...
6860         (info_display_command): ... this.
6861         (_initialize_dcache): Adjust.
6862         * frame.h (args_info): Rename to ...
6863         (info_args_command): ... this.
6864         (locals_info): Rename to ...
6865         (info_locals_command): ... this.
6866         * infcmd.c (nofp_registers_info): Rename to ...
6867         (info_registers_command): ... this.
6868         (float_info): Rename to ...
6869         (info_float_command): ... this.
6870         (program_info): Rename to ...
6871         (info_program_command): ... this.
6872         (all_registers_info): Rename to ...
6873         (info_all_registers_command): ... this.
6874         (vector_info): Rename to ...
6875         (info_vector_command): ... this.
6876         (float_info): Rename to ...
6877         (info_float_command): ... this.
6878         (_initialize_infcmd): Adjust.
6879         * inferior.h (term_info): Rename to ...
6880         (info_terminal_command): ... this.
6881         * inflow.c (term_info): Rename to ...
6882         (info_terminal_command): ... this.
6883         (_initialize_inflow): Adjust.
6884         * infrun.c (signals_info): Rename to ...
6885         (info_signals_command): ... this.
6886         (_initialize_infrun): Adjust.
6887         * objc-lang.c (classes_info): Rename to ...
6888         (info_classes_command): ... this.
6889         (selectors_info): Rename to ...
6890         (info_selectors_command): ... this.
6891         (_initialize_objc_language): Adjust.
6892         * printcmd.c (sym_info): Rename to ...
6893         (info_symbol_command): ... this.
6894         (address_info): Rename to ...
6895         (info_address_command): ... this.
6896         (display_info): Rename to ...
6897         (info_display_command): ... this.
6898         (_initialize_printcmd): Adjust.
6899         * reverse.c (bookmarks_info): Rename to ...
6900         (info_breakpoints_command): ... this.
6901         (_initialize_reverse): Adjust.
6902         * ser-go32.c (dos_info): Rename to ...
6903         (info_serial_command): ... this.
6904         (_initialize_ser_dos): Adjust.
6905         * skip.c (skip_info): Rename to ...
6906         (info_skip_command): ... this.
6907         (_initialize_step_skip): Adjust.
6908         * source.c (line_info): Rename to ...
6909         (info_line_command): ... this.
6910         (source_info): Rename to ...
6911         (info_source_command)
6912         * stack.c (frame_info): Rename to ...
6913         (info_frame_command): ... this.
6914         (locals_info): Rename to ...
6915         (info_locals_command): ... this.
6916         (args_info): Rename to ...
6917         (info_args_command): ... this.
6918         (_initialize_stack): Adjust.
6919         * symtab.c (sources_info): Rename to ...
6920         (info_sources_command): ... this.
6921         (variables_info): Rename to ...
6922         (info_variables_command): ... this.
6923         (functions_info): Rename to ...
6924         (info_functions_command): ... this.
6925         (types_info): Rename to ...
6926         (info_types_command): ... this.
6927         (_initialize_symtab): Adjust.
6928         * target.c (target_info): Rename to ...
6929         (info_target_command): ... this.
6930         (initialize_targets): Adjust.
6931         * tracepoint.c (tvariables_info): Rename to ...
6932         (info_tvariables_command): ... this.
6933         (scope_info): Rename to ...
6934         (info_scope_command): ... this.
6935         (trace_dump_actions): Adjust.
6936         (_initialize_tracepoint): Adjust.
6937
6938 2017-08-22  Tom Tromey  <tom@tromey.com>
6939
6940         * breakpoint.h (install_breakpoint): Update.
6941         * breakpoint.c (add_solib_catchpoint): Update.
6942         (install_breakpoint): Change argument to a std::unique_ptr.
6943         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6944         (create_breakpoint_sal, create_breakpoint): Update.
6945         (watch_command_1, catch_exec_command_1)
6946         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6947         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6948         Return the breakpoint.
6949         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6950         (new_single_step_breakpoint): Update.
6951         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6952         std::unique_ptr.
6953         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6954         std::unique_ptr.
6955         * break-catch-sig.c (create_signal_catchpoint): Use
6956         std::unique_ptr.
6957         * ada-lang.c (create_ada_exception_catchpoint): Use
6958         std::unique_ptr.
6959
6960 2017-08-22  Tom Tromey  <tom@tromey.com>
6961
6962         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6963
6964 2017-08-22  Tom Tromey  <tom@tromey.com>
6965
6966         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6967         (lookup_partial_symbol): Update.
6968
6969 2017-08-22  Tom Tromey  <tom@tromey.com>
6970
6971         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6972         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6973         (find_and_open_source, symtab_to_fullname): Update.
6974         * psymtab.c (psymtab_to_fullname): Update.
6975
6976 2017-08-22  Tom Tromey  <tom@tromey.com>
6977
6978         * exec.c (exec_file_attach): Update.
6979         * linux-thread-db.c (try_thread_db_load): Update.
6980         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6981         * utils.c (gdb_realpath): Change return type.
6982         (gdb_realpath_keepfile): Update.
6983         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6984         (_initialize_utils): Register the new self test.
6985         * source.c (openp): Update.
6986         (find_and_open_source): Update.
6987         * nto-tdep.c (nto_find_and_open_solib): Update.
6988         * main.c (set_gdb_data_directory): Update.
6989         (captured_main_1): Update.
6990         * dwarf2read.c (dwarf2_get_dwz_file): Update
6991         (dw2_map_symbol_filenames): Update.
6992         * auto-load.c (auto_load_safe_path_vec_update): Update.
6993         (filename_is_in_auto_load_safe_path_vec): Change type of
6994         "filename_realp".
6995         (auto_load_objfile_script): Update.
6996         (file_is_auto_load_safe): Update.  Use std::string.
6997         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6998
6999 2017-08-22  Tom Tromey  <tom@tromey.com>
7000
7001         * utils.c (gdb_realpath_keepfile): Return a
7002         gdb::unique_xmalloc_ptr.
7003         * exec.c (exec_file_attach): Update.
7004         * utils.h (gdb_realpath_keepfile): Return a
7005         gdb::unique_xmalloc_ptr.
7006
7007 2017-08-22  Tom Tromey  <tom@tromey.com>
7008
7009         * compile/compile.c (compile_file_command): Use
7010         gdb::unique_xmalloc_ptr, std::string.
7011         * utils.c (gdb_abspath): Change return type.
7012         * source.c (openp): Update.
7013         * objfiles.c (allocate_objfile): Update.
7014         * main.c (set_gdb_data_directory): Update.
7015         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7016
7017 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7018
7019         * cli-cmds.c (list_commands): List actual code around more than
7020         one location.
7021
7022 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7023
7024         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7025
7026 2017-08-21  Pedro Alves  <palves@redhat.com>
7027
7028         PR gdb/19487
7029         * c-exp.y (variable production): Handle function aliases.
7030         * minsyms.c (msymbol_is_text): New function.
7031         * minsyms.h (msymbol_is_text): Declare.
7032         * symtab.c (find_function_alias_target): New function.
7033         * symtab.h (find_function_alias_target): Declare.
7034
7035 2017-08-21  Pedro Alves  <palves@redhat.com>
7036
7037         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7038         typedefs.
7039         * typeprint.c (whatis_exp): If handling "whatis", and expression
7040         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7041         typedefs here.
7042         * valops.c (value_cast): Save "to" type before resolving
7043         stubs/typedefs.  Use that type as resulting value's type.
7044
7045 2017-08-18  Tom Tromey  <tom@tromey.com>
7046             Pedro Alves  <palves@redhat.com>
7047
7048         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7049         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7050         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7051         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7052         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7053         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7054         (linux_get_siginfo_data): Add "thread" argument.  Use
7055         scoped_restore.
7056         * linux-nat.c (linux_child_follow_fork)
7057         (check_stopped_by_watchpoint): Use scoped_restore.
7058         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7059         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7060         (restore_inferior_ptid, save_inferior_ptid): Remove.
7061         * btrace.c (btrace_fetch): Use scoped_restore.
7062         * bsd-uthread.c (bsd_uthread_fetch_registers)
7063         (bsd_uthread_store_registers): Use scoped_restore.
7064         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7065         scoped_restore.
7066         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7067         (aix_thread_xfer_partial): Use scoped_restore.
7068         * inferior.h (save_inferior_ptid): Remove.
7069
7070 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7071
7072         PR tdep/21818
7073         * arm-tdep.c (gdb_print_insn_arm): Mark
7074         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7075
7076 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7077
7078         * NEWS: Mention GDBserver's new option "--selftest".
7079         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7080         * selftest.c: Move it to common/selftest.c.
7081         * selftest.h: Move it to common/selftest.h.
7082         * selftest-arch.c (reset): New function.
7083         (tests_with_arch): Call reset.
7084
7085 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7086
7087         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7088         instead of exception_fprintf and printf_filtered.
7089
7090 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7091
7092         * selftest.c (register_self_test): Rename it to
7093         selftests::register_test.
7094         (run_self_tests): selftest::run_tests.
7095         * selftest.h: Update declarations.
7096         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7097         selftests::register_test_foreach_arch.
7098         * selftest-arch.h: Update declaration.
7099         * aarch64-tdep.c: Update.
7100         * arm-tdep.c: Likewise.
7101         * disasm-selftests.c: Likewise.
7102         * dwarf2loc.c: Likewise.
7103         * dwarf2-frame.c: Likewise.
7104         * findvar.c: Likewise.
7105         * gdbarch-selftests.c: Likewise.
7106         * maint.c (maintenance_selftest): Likewise.
7107         * regcache.c: Likewise.
7108         * rust-exp.y: Likewise.
7109         * selftest-arch.c: Likewise.
7110         * unittests/environ-selftests.c: Likewise.
7111         * unittests/function-view-selftests.c: Likewise.
7112         * unittests/offset-type-selftests.c: Likewise.
7113         * unittests/optional-selftests.c: Likewise.
7114         * unittests/scoped_restore-selftests.c: Likewise.
7115         * utils-selftests.c: Likewise.
7116
7117 2017-08-17  Pedro Alves  <palves@redhat.com>
7118
7119         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7120         local.
7121
7122 2017-08-17  Pedro Alves  <palves@redhat.com>
7123
7124         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7125         field.
7126         (reset_die_in_process): Delete, replaced by ...
7127         (process_die_scope): ... this new class.  Make it responsible for
7128         freeing cu->line_header too.
7129         (process_die): Use process_die_scope.
7130         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7131         cu->line_header_die_owner.  Don't release the line header if it's
7132         owned by the CU.
7133         (setup_type_unit_groups): Make the CU/DIE own the line header.
7134         Don't release the line header here.
7135
7136 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7137
7138         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7139
7140 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7141
7142         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7143         Single-Key mode
7144
7145 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7146
7147         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7148         mode command list.
7149
7150 2017-08-15  Stafford Horne  <shorne@gmail.com>
7151
7152         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7153
7154 2017-08-15  Stafford Horne  <shorne@gmail.com>
7155
7156         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7157
7158 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7159
7160         PR gdb/21954
7161         * infcmd.c (unset_environment_command): Use the 'clear' method on
7162         the environment instead of resetting it.
7163
7164 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7165
7166         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7167         platforms.
7168
7169 2017-08-14  Tom Tromey  <tom@tromey.com>
7170
7171         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7172         (print_binary_chars): Likewise.
7173         (BITS_IN_BYTES): Remove.
7174
7175 2017-08-14  Tom Tromey  <tom@tromey.com>
7176
7177         PR gdb/21675
7178         * valprint.c (LOW_ZERO): Change value to 034.
7179         (print_octal_chars): Add static_asserts for octal constants.
7180         * printcmd.c (print_scalar_formatted): Add 'd' case.
7181
7182 2017-08-11  Tom Tromey  <tom@tromey.com>
7183
7184         * symfile.c (add_symbol_file_command): Use std::vector.
7185
7186 2017-08-14  Tom Tromey  <tom@tromey.com>
7187
7188         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7189         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7190         std::move.
7191         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7192
7193 2017-08-11  Pedro Alves  <palves@redhat.com>
7194
7195         * infrun.c (process_event_stop_test): Adjust
7196         function_name_is_marked_for_skip call.
7197         * skip.c: Include <list>.
7198         (skiplist_entry): Make it a class with private fields, and
7199         getters/setters.
7200         (skiplist_entry_chain): Delete.
7201         (skiplist_entries): New.
7202         (skiplist_entry_count): Delete.
7203         (highest_skiplist_entry_num): New.
7204         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7205         (add_skiplist_entry): Delete.
7206         (skiplist_entry::skiplist_entry): New.
7207         (skiplist_entry::add_entry): New.
7208         (skip_file_command, skip_function): Adjust.
7209         (compile_skip_regexp): Delete.
7210         (skip_command): Don't compile regexp here.  Adjust to use
7211         skiplist_entry::add_entry.
7212         (skip_info): Adjust to use range-for and getters.
7213         (skip_enable_command, skip_disable_command): Adjust to use
7214         range-for and setters.
7215         (skip_delete_command): Adjust to use std::list.
7216         (add_skiplist_entry): Delete.
7217         (skip_file_p): Delete, refactored as ...
7218         (skiplist_entry::do_skip_file_p): ... this new method.
7219         (skip_gfile_p): Delete, refactored as ...
7220         (skiplist_entry::do_gskip_file_p): ... this new method.
7221         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7222         (skiplist_entry::skip_function_p): ... this new method.
7223         (function_name_is_marked_for_skip): Now returns bool, and takes
7224         the function sal by const reference.  Adjust to use range-for and
7225         skiplist_entry methods.
7226         (_initialize_step_skip): Remove references to
7227         skiplist_entry_chain, skiplist_entry_count.
7228         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7229         takes the function sal by const reference.
7230
7231 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7232
7233         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7234         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7235         (dwarf2_frame_cache):
7236         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7237         RETURN_MASK_ALL and set *this_case to NULL.
7238         * frame-unwind.h: Update comments.
7239
7240 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7241
7242         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7243         (dwarf2_frame_state_copy_regs): Remove.
7244         (dwarf2_frame_state_free_regs): Remove.
7245         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7246         (dwarf2_restore_rule): Call method .alloc_regs instead of
7247         dwarf2_frame_state_alloc_regs.
7248         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7249         constructor.  Call std::move.
7250         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7251         (dwarf2_frame_cache): Likewise.
7252
7253         [GDB_SELF_TEST]: Include selftest.h and
7254         selftest-arch.h.
7255         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7256         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7257         execute_cfa_program_test.
7258
7259         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7260         copy ctor, assignment operator, move assignment.
7261         <alloc_regs>: New method.
7262         <swap>: New method.
7263         (struct dwarf2_frame_state): Delete dtor.
7264         (dwarf2_frame_state_alloc_regs): Remove declaration.
7265         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7266         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7267
7268 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7269
7270         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7271         (dwarf2_frame_state::dwarf2_frame_state): New.
7272         (dwarf2_frame_state::~dwarf2_frame_state): New.
7273         (dwarf2_fetch_cfa_info): Update.
7274         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7275         rather than a pointer.  Update code.
7276         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7277         dtor.
7278         <data_align, code_align, retaddr_column>: Change them to const.
7279         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7280         to bool.
7281
7282 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7283
7284         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7285         <loc.exp>: New field.
7286         * dwarf2-frame.c (execute_cfa_program): Update.
7287         (dwarf2_frame_prev_register): Update.
7288
7289 2017-08-10  Pedro Alves  <palves@redhat.com>
7290
7291         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7292
7293 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7294
7295         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7296         (fbsd_pending_children): Use std::list.
7297         (fbsd_remember_child): Likewise.
7298         (fbsd_is_child_pending): Likewise.
7299         (fbsd_pending_vfork_done): Use std::forward_list.
7300         (fbsd_add_vfork_done): Likewise.
7301         (fbsd_is_vfork_done_pending): Likewise.
7302         (fbsd_next_vfork_done): Likewise.
7303
7304 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7305
7306         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7307         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7308         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7309         for `mapfilename'.
7310         (fbsd_xfer_partial): Use gdb::byte_vector.
7311         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7312
7313 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7314
7315         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7316         "filestuff.h".
7317         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7318
7319 2017-08-09  Tom Tromey  <tom@tromey.com>
7320
7321         * skip.c (skiplist_entry): New constructor.
7322         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7323         (skiplist_entry::file_is_glob): Now bool.
7324         (skiplist_entry::file, skiplist_entry::function): Now
7325         std::string.
7326         (make_skip_entry): Return a unique_ptr.  Use new.
7327         (free_skiplist_entry, free_skiplist_entry_cleanup)
7328         (make_free_skiplist_entry_cleanup): Remove.
7329         (skip_command, skip_disable_command, add_skiplist_entry)
7330         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7331         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7332         (function_name_is_marked_for_skip): Update.
7333         (skip_delete_command): Update.  Use delete.
7334
7335 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7336
7337         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7338         (aarch64_linux_core_read_description): New function.
7339         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7340
7341 2017-08-09  Pedro Alves  <palves@redhat.com>
7342
7343         * cp-name-parser.y (cp_comp_to_string): Return a
7344         gdb::unique_xmalloc_ptr<char>.
7345         * cp-support.c (replace_typedefs_qualified_name)
7346         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7347         (cp_canonicalize_string_full): Use op= instead of explicit
7348         convertion.
7349         (cp_class_name_from_physname, method_name_from_physname)
7350         (cp_func_name, cp_remove_params): Adjust to use
7351         gdb::unique_xmalloc_ptr<char>.
7352         * cp-support.h (cp_comp_to_string): Return a
7353         gdb::unique_xmalloc_ptr<char>.
7354         * python/py-type.c (typy_lookup_type): Adjust to use
7355         gdb::unique_xmalloc_ptr<char>.
7356
7357 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7358
7359         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7360
7361 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7362             Yao Qi  <yao.qi@linaro.org>
7363
7364         * cp-support.c (cp_canonicalize_string_full): Use
7365         gdb::unique_xmalloc_ptr<char>.
7366         (cp_canonicalize_string): Likewise.
7367
7368 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7369
7370         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7371         * regformats/i386/amd64-avx-avx512.dat: Remove.
7372         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7373         * regformats/i386/amd64-avx-mpx.dat:Remove.
7374         * regformats/i386/amd64-avx.dat: Remove.
7375         * regformats/i386/amd64-mpx.dat: Remove.
7376         * regformats/i386/i386-avx-avx512.dat: Remove.
7377         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7378         * regformats/i386/i386-avx-mpx.dat: Remove.
7379         * regformats/i386/i386-mmx.dat: Remove.
7380         * regformats/i386/i386-mpx.dat: Remove.
7381
7382 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7383
7384         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7385         * amd64-tdep.c: Don't include features/i386/x32*.c.
7386         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7387         functions.
7388         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7389         and i386/x32-avx-avx512.
7390         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7391         and i386/x32.xml.
7392         * features/i386/x32-avx-avx512.c: Removed.
7393         * features/i386/x32-avx-avx512.xml: Removed.
7394         * features/i386/x32-avx.c: Removed.
7395         * features/i386/x32-avx.xml: Removed.
7396         * features/i386/x32.c: Removed.
7397         * features/i386/x32.xml: Removed.
7398         * regformats/i386/x32-avx-avx512.dat: Removed.
7399         * regformats/i386/x32-avx.dat: Removed.
7400         * regformats/i386/x32.dat: Removed.
7401
7402 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7403
7404         PR breakpoints/21886
7405         * mem-break.c (default_memory_insert_breakpoint): Use
7406         `->placed_address' rather than `->reqstd_address' for the
7407         breakpoint location.
7408
7409 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7410
7411         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7412         assertions.
7413
7414 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7415
7416         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7417         a union of `tdep_info', `tdesc_data' and `id'.
7418         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7419         rather than `info.tdep_info'.
7420         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7421         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7422         * i386-tdep.c (i386_gdbarch_init): Likewise.
7423         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7424         * mips-tdep.c (mips_gdbarch_init): Likewise.
7425         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7426         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7427         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7428         `info.tdep_info'.
7429         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7430         `info.tdep_info'.
7431         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7432         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7433         `info.tdep_info'.
7434         * spu-tdep.c (spu_gdbarch_init): Likewise.
7435         * gdbarch.h: Regenerate.
7436
7437 2017-08-07  Leszek Swirski  <leszeks@google.com>
7438
7439         PR symtab/20899
7440         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7441
7442 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7443
7444         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7445         (gdbsim_open): Rename gdb_argv args object to argv.
7446
7447 2017-08-05  Tom Tromey  <tom@tromey.com>
7448
7449         * compile/compile-object-load.c (compile_object_load): Use
7450         gdb::unique_xmalloc_ptr.
7451         * cli/cli-dump.c (scan_filename): Rename from
7452         scan_filename_with_cleanup.  Change return type.
7453         (scan_expression): Rename from scan_expression_with_cleanup.
7454         Change return type.
7455         (dump_memory_to_file, dump_value_to_file, restore_command):
7456         Use gdb::unique_xmalloc_ptr.  Update.
7457         * cli/cli-cmds.c (find_and_open_script): Use
7458         gdb::unique_xmalloc_ptr.
7459         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7460         * symmisc.c (maintenance_print_symbols)
7461         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7462         * symfile.c (symfile_bfd_open, generic_load)
7463         (add_symbol_file_command, remove_symbol_file_command): Use
7464         gdb::unique_xmalloc_ptr.
7465         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7466         * psymtab.c (maintenance_print_psymbols): Use
7467         gdb::unique_xmalloc_ptr.
7468         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7469         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7470         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7471         (reload_shared_libraries_1): Likewise.
7472
7473 2017-08-05  Tom Tromey  <tom@tromey.com>
7474
7475         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7476         (rust_op_vector, rust_set_vector): New typedefs.
7477         (current_parser): New global.
7478         (work_obstack): Change to pointer type.  Update all users.
7479         (rust_ast, pstate): Remove globals.
7480         (struct rust_parser): New.
7481         (%union) <params, field_inits>: Change type.
7482         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7483         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7484         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7485         (convert_params_to_types, convert_params_to_expression): Change
7486         type of "params".
7487         (ast_string): Change type of "fields".
7488         (rust_parse): Make a rust_parser.  Remove cleanups.
7489         (rust_lex_tests): Make and install an auto_obstack.
7490
7491 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7492
7493         * configure.srv (ipa_x32_linux_regobj): New.
7494         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7495         instead of X86_TDESC_AVX512.
7496         (initialize_low_tracepoint): Call
7497         init_registers_x32_avx_avx512_linux.
7498
7499 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7500
7501         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7502
7503 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7504
7505         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7506
7507 2017-08-03  Tom Tromey  <tom@tromey.com>
7508
7509         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7510         Remove.
7511         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7512
7513 2017-08-03  Tom Tromey  <tom@tromey.com>
7514
7515         * python/py-param.c (compute_enum_values): Use gdb_argv.
7516
7517 2017-08-03  Tom Tromey  <tom@tromey.com>
7518
7519         * utils.h (struct gdb_argv_deleter): New.
7520         (gdb_argv): New class.
7521         * utils.c (gdb_argv::reset): New method.
7522         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7523         * tracefile.c (tsave_command): Use gdb_argv.
7524         * top.c (new_ui_command): Use gdb_argv.
7525         * symmisc.c (maintenance_print_symbols)
7526         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7527         * symfile.c (symbol_file_command, generic_load)
7528         (remove_symbol_file_command): Use gdb_argv.
7529         * stack.c (backtrace_command): Use gdb_argv.
7530         * source.c (add_path, show_substitute_path_command)
7531         (unset_substitute_path_command, set_substitute_path_command):
7532         Use gdb_argv.
7533         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7534         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7535         * remote.c (extended_remote_run, remote_put_command)
7536         (remote_get_command, remote_delete_command): Use gdb_argv.
7537         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7538         (gdbsim_open): Use gdb_argv.
7539         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7540         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7541         * procfs.c (procfs_info_proc): Use gdb_argv.
7542         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7543         * infrun.c (handle_command): Use gdb_argv.
7544         * inferior.c (add_inferior_command, clone_inferior_command):
7545         Use gdb_argv.
7546         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7547         * exec.c (exec_file_command): Use gdb_argv.
7548         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7549         * compile/compile.c (build_argc_argv): Use gdb_argv.
7550
7551 2017-08-03  Tom Tromey  <tom@tromey.com>
7552
7553         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7554
7555 2017-08-03  Tom Tromey  <tom@tromey.com>
7556
7557         * python/python.c (compute_python_string): Return std::string.
7558         (gdbpy_eval_from_control_command): Update.
7559         (do_start_initialization): Use std::string.
7560         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7561         xstrprintf.
7562         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7563         xstrprintf.
7564
7565 2017-08-03  Tom Tromey  <tom@tromey.com>
7566
7567         * top.h (do_restore_instream_cleanup): Remove.
7568         * top.c (do_restore_instream_cleanup): Remove.
7569         (read_command_file): Use scoped_restore.
7570         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7571
7572 2017-08-03  Tom Tromey  <tom@tromey.com>
7573
7574         * cli/cli-script.c (execute_user_command)
7575         (execute_control_command): Use scoped_restore.
7576
7577 2017-08-03  Tom Tromey  <tom@tromey.com>
7578
7579         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7580         (execute_user_command): Remove user_call_depth; use
7581         user_args_stack's size instead.
7582
7583 2017-08-03  Tom Tromey  <tom@tromey.com>
7584
7585         * top.h (in_user_command): Remove.
7586         * top.c (in_user_command): Remove.
7587         * cli/cli-script.c (do_restore_user_call_depth)
7588         (execute_user_command): Update.
7589
7590 2017-08-03  Tom Tromey  <tom@tromey.com>
7591
7592         * valops.c (search_struct_method): Use gdb::byte_vector.
7593         * valarith.c (value_concat): Use std::vector.
7594         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7595         (simple_search_memory): Likewise.
7596         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7597         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7598         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7599         * elfread.c (elf_rel_plt_read): Use std::string.
7600         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7601         * cli/cli-dump.c (restore_section_callback): Use
7602         gdb::byte_vector.
7603
7604 2017-08-03  Tom Tromey  <tom@tromey.com>
7605
7606         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7607
7608 2017-08-03  Tom Tromey  <tom@tromey.com>
7609
7610         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7611         (tui_register_format): Use scoped_restore.
7612
7613 2017-08-03  Tom Tromey  <tom@tromey.com>
7614
7615         * reverse.c (exec_direction_default): Remove.
7616         (exec_reverse_once): Use scoped_restore.
7617         * remote.c (restore_remote_timeout): Remove.
7618         (remote_flash_erase, remote_flash_write, remote_flash_done)
7619         (readchar, remote_serial_write): Use scoped_restore.
7620         * cli/cli-script.c (struct source_cleanup_lines_args)
7621         (source_cleanup_lines): Remove.
7622         (script_from_file): Use scoped_restore.
7623         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7624         (source_command): Use scoped_restore.
7625
7626 2017-08-03  Tom Tromey  <tom@tromey.com>
7627
7628         * utils.h (make_cleanup_free_so): Remove.
7629         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7630         * solist.h (struct so_deleter): New.
7631         (so_list_up): New typedef.
7632         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7633
7634 2017-08-03  Tom Tromey  <tom@tromey.com>
7635
7636         * utils.h (make_cleanup_restore_current_language): Remove.
7637         * utils.c (do_restore_current_language)
7638         (make_cleanup_restore_current_language): Remove.
7639         * parse.c (parse_exp_in_context_1)
7640         (parse_expression_with_language): Use
7641         scoped_restore_current_language.
7642         * mi/mi-main.c (mi_cmd_execute): Use
7643         scoped_restore_current_language.
7644         * language.h (scoped_restore_current_language): New class.
7645
7646 2017-08-03  Tom Tromey  <tom@tromey.com>
7647
7648         * compile/compile.c (cleanup_unlink_file): Remove.
7649         (compile_to_object): Use gdb::unlinker.
7650         (eval_compile_command): Likewise.
7651
7652 2017-08-03  Tom Tromey  <tom@tromey.com>
7653
7654         * utils.h (make_cleanup_fclose): Remove.
7655         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7656
7657 2017-08-03  Tom Tromey  <tom@tromey.com>
7658
7659         * top.c (open_terminal_stream): Return gdb_file_up.
7660         (new_ui_command): Update.
7661
7662 2017-08-03  Tom Tromey  <tom@tromey.com>
7663
7664         * source.c (print_source_lines_base, forward_search_command)
7665         (reverse_search_command): Use gdb_file_up.
7666
7667 2017-08-03  Tom Tromey  <tom@tromey.com>
7668
7669         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7670
7671 2017-08-03  Tom Tromey  <tom@tromey.com>
7672
7673         * cli/cli-cmds.c (find_and_open_script): Change return type.
7674         Remove "streamp" and "full_path" parameters.
7675         (source_script_with_search): Update.
7676         * auto-load.c (source_script_file): Update.
7677         * cli/cli-cmds.h (find_and_open_script): Change type.
7678         (open_script): New struct.
7679
7680 2017-08-03  Tom Tromey  <tom@tromey.com>
7681
7682         * xml-support.c (xml_fetch_content_from_file): Update.
7683         * ui-file.c (stdio_file::open): Update.
7684         * tracefile-tfile.c (tfile_start): Update.
7685         * remote.c (remote_file_put, remote_file_get): Update.
7686         * nat/linux-procfs.c (linux_proc_get_int)
7687         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7688         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7689         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7690         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7691         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7692         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7693         * linux-nat.c (linux_proc_pending_signals): Update.
7694         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7695         (file_closer): Remove.
7696         * compile/compile.c (compile_to_object): Update.
7697         * common/filestuff.h (struct gdb_file_deleter): New.
7698         (gdb_file_up): New typedef.
7699         (gdb_fopen_cloexec): Change return type.
7700         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7701         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7702         (dump_binary_file, restore_binary_file): Update.
7703         * auto-load.c (auto_load_objfile_script_1): Update.
7704
7705 2017-08-03  Tom Tromey  <tom@tromey.com>
7706
7707         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7708         (info_static_tracepoint_markers_command): Likewise.
7709         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7710         * skip.c (skip_info): Use ui_out_emit_table.
7711         * progspace.c (print_program_space): Use ui_out_emit_table.
7712         * osdata.c (info_osdata): Use ui_out_emit_table.
7713         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7714         ui_out_emit_table.
7715         * linux-thread-db.c (info_auto_load_libthread_db): Use
7716         ui_out_emit_table.
7717         * inferior.c (print_inferior): Use ui_out_emit_table.
7718         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7719         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7720         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7721         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7722         * ui-out.h (class ui_out_emit_table): New.
7723
7724 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7725
7726         * mips-tdep.c (mips_fpu_type_str): New function.
7727         (mips_dump_tdep): Call it.
7728
7729 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7730
7731         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7732         `->mips_fpu_type'.
7733
7734 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7735
7736         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7737
7738 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7739
7740         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7741
7742 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7743
7744         * cli/cli-cmds.c (maintenancechecklist): New variable.
7745         * gdbcmd.h (maintenancechecklist): Declare it.
7746         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7747         Call i386_linux_read_description with different masks.
7748         * maint.c (maintenance_check_command): New function.
7749         (_initialize_maint_cmds): Call add_prefix_cmd.
7750         * target-descriptions.c (tdesc_reg): override operator != and ==.
7751         (tdesc_type): Likewise.
7752         (tdesc_feature): Likewise.
7753         (target_desc): Likewise.
7754         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7755         (maintenance_check_xml_descriptions): New function.
7756         (_initialize_target_descriptions) Add command "xml-descriptions".
7757         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7758
7759 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7760
7761         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7762         Include features/i386/32bit-*.c.
7763         (i386_linux_read_description): Generate target description if it
7764         doesn't exist.
7765         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7766         functions.
7767         * features/i386/32bit-linux.c: Re-generated.
7768         * features/i386/32bit-sse.c: Likewise.
7769         * target-descriptions.c (print_c_feature::visit): Print code to
7770         set register number if needed.
7771         (print_c_feature) <m_next_regnum>: New field.
7772
7773 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7774
7775         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7776         (FEATURE_XMLFILES): New.
7777         (FEATURE_CFILES): New.
7778         New rules.
7779         (clean-cfiles): Remove generated c files.
7780         * features/i386/32bit-avx.c: Generated.
7781         * features/i386/32bit-avx512.c: Generated.
7782         * features/i386/32bit-core.c: Generated.
7783         * features/i386/32bit-linux.c: Generated.
7784         * features/i386/32bit-mpx.c: Generated.
7785         * features/i386/32bit-pkeys.c: Generated.
7786         * features/i386/32bit-sse.c: Generated.
7787         * target-descriptions.c: Include algorithm.
7788         (tdesc_element_visitor): Add method visit_end.
7789         (print_c_tdesc): Implement visit_end.
7790         (print_c_tdesc:: m_filename_after_features): Move it to
7791         protected.
7792         (print_c_feature): New class.
7793         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7794         name starts with "i386/32bit-".
7795
7796 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7797
7798         * target-descriptions.c (tdesc_element_visitor): New class.
7799         (tdesc_element): New class.
7800         (tdesc_reg): Inherit from tdesc_element.
7801         (tdesc_reg::accept): New function.
7802         (tdesc_type): Inherit from tdesc_element.
7803         (tdesc_type::accept): New function.
7804         (tdesc_feature): Inherit from tdesc_element.
7805         (tdesc_feature::accept): New function.
7806         (target_desc): Inherit from tdesc_element.
7807         (target_desc::target_desc): New.
7808         (target_desc::~target_desc): New.
7809         (target_desc::accept): New.
7810         (allocate_target_description): Use new.
7811         (free_target_description): Use delete.
7812         (print_c_tdesc): New class.
7813         (maint_print_c_tdesc_cmd): Adjust.
7814
7815         * features/aarch64.c: Re-generated.
7816         * features/arc-arcompact.c: Re-generated.
7817         * features/arc-v2.c: Re-generated.
7818         * features/arm/arm-with-iwmmxt.c: Re-generated.
7819         * features/arm/arm-with-m.c: Re-generated.
7820         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7821         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7822         * features/arm/arm-with-neon.c: Re-generated.
7823         * features/arm/arm-with-vfpv2.c: Re-generated.
7824         * features/arm/arm-with-vfpv3.c: Re-generated.
7825         * features/i386/amd64-avx-avx512.c: Re-generated.
7826         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7827         * features/i386/amd64-avx.c: Re-generated.
7828         * features/i386/amd64-avx-linux.c: Re-generated.
7829         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7830         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7831         * features/i386/amd64-avx-mpx.c: Re-generated.
7832         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7833         * features/i386/amd64.c: Re-generated.
7834         * features/i386/amd64-linux.c: Re-generated.
7835         * features/i386/amd64-mpx.c: Re-generated.
7836         * features/i386/amd64-mpx-linux.c: Re-generated.
7837         * features/i386/i386-avx-avx512.c: Re-generated.
7838         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7839         * features/i386/i386-avx.c: Re-generated.
7840         * features/i386/i386-avx-linux.c: Re-generated.
7841         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7842         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7843         * features/i386/i386-avx-mpx.c: Re-generated.
7844         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7845         * features/i386/i386.c: Re-generated.
7846         * features/i386/i386-linux.c: Re-generated.
7847         * features/i386/i386-mmx.c: Re-generated.
7848         * features/i386/i386-mmx-linux.c: Re-generated.
7849         * features/i386/i386-mpx.c: Re-generated.
7850         * features/i386/i386-mpx-linux.c: Re-generated.
7851         * features/i386/x32-avx-avx512.c: Re-generated.
7852         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7853         * features/i386/x32-avx.c: Re-generated.
7854         * features/i386/x32-avx-linux.c: Re-generated.
7855         * features/i386/x32.c: Re-generated.
7856         * features/i386/x32-linux.c: Re-generated.
7857         * features/microblaze.c: Re-generated.
7858         * features/microblaze-with-stack-protect.c: Re-generated.
7859         * features/mips64-dsp-linux.c: Re-generated.
7860         * features/mips64-linux.c: Re-generated.
7861         * features/mips-dsp-linux.c: Re-generated.
7862         * features/mips-linux.c: Re-generated.
7863         * features/nds32.c: Re-generated.
7864         * features/nios2.c: Re-generated.
7865         * features/nios2-linux.c: Re-generated.
7866         * features/rs6000/powerpc-32.c: Re-generated.
7867         * features/rs6000/powerpc-32l.c: Re-generated.
7868         * features/rs6000/powerpc-403.c: Re-generated.
7869         * features/rs6000/powerpc-403gc.c : Re-generated.
7870         * features/rs6000/powerpc-405.c: Re-generated.
7871         * features/rs6000/powerpc-505.c: Re-generated.
7872         * features/rs6000/powerpc-601.c: Re-generated.
7873         * features/rs6000/powerpc-602.c: Re-generated.
7874         * features/rs6000/powerpc-603.c: Re-generated.
7875         * features/rs6000/powerpc-604.c: Re-generated.
7876         * features/rs6000/powerpc-64.c: Re-generated.
7877         * features/rs6000/powerpc-64l.c: Re-generated.
7878         * features/rs6000/powerpc-7400.c: Re-generated.
7879         * features/rs6000/powerpc-750.c: Re-generated.
7880         * features/rs6000/powerpc-860.c: Re-generated.
7881         * features/rs6000/powerpc-altivec32.c: Re-generated.
7882         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7883         * features/rs6000/powerpc-altivec64.c: Re-generated.
7884         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7885         * features/rs6000/powerpc-cell32l.c: Re-generated.
7886         * features/rs6000/powerpc-cell64l.c: Re-generated.
7887         * features/rs6000/powerpc-e500.c: Re-generated.
7888         * features/rs6000/powerpc-e500l.c: Re-generated.
7889         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7890         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7891         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7892         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7893         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7894         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7895         * features/rs6000/powerpc-vsx32.c: Re-generated.
7896         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7897         * features/rs6000/powerpc-vsx64.c: Re-generated.
7898         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7899         * features/rs6000/rs6000.c: Re-generated.
7900         * features/s390-linux32.c: Re-generated.
7901         * features/s390-linux32v1.c: Re-generated.
7902         * features/s390-linux32v2.c: Re-generated.
7903         * features/s390-linux64.c: Re-generated.
7904         * features/s390-linux64v1.c: Re-generated.
7905         * features/s390-linux64v2.c: Re-generated.
7906         * features/s390-te-linux64.c: Re-generated.
7907         * features/s390-tevx-linux64.c: Re-generated.
7908         * features/s390-vx-linux64.c: Re-generated.
7909         * features/s390x-linux64.c: Re-generated.
7910         * features/s390x-linux64v1.c: Re-generated.
7911         * features/s390x-linux64v2.c: Re-generated.
7912         * features/s390x-te-linux64.c: Re-generated.
7913         * features/s390x-tevx-linux64.c: Re-generated.
7914         * features/s390x-vx-linux64.c: Re-generated.
7915         * features/sparc/sparc32-solaris.c: Re-generated.
7916         * features/sparc/sparc64-solaris.c: Re-generated.
7917         * features/tic6x-c62x.c: Re-generated.
7918         * features/tic6x-c62x-linux.c: Re-generated.
7919         * features/tic6x-c64x.c: Re-generated.
7920         * features/tic6x-c64x-linux.c: Re-generated.
7921         * features/tic6x-c64xp.c: Re-generated.
7922         * features/tic6x-c64xp-linux.c: Re-generated.
7923
7924 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7925
7926         * i386-linux-tdep.c (i386_linux_read_description): New function.
7927         (i386_linux_core_read_description): Call
7928         i386_linux_read_description.
7929         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7930         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7931         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7932         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7933         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7934         * x86-linux-nat.c (x86_linux_read_description): Call
7935         i386_linux_read_description.
7936
7937 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7938
7939         * NEWS: Mention it.
7940         * features/Makefile (%.c: %.xml): Pass the xml file name to
7941         command "maint print c-tdesc".
7942         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7943         name from 'arg'.
7944
7945 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7946
7947         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7948         in-class initialization.
7949         (tdesc_create_feature): Call new instead of XCNEW.
7950         (free_target_description): Ue delete.
7951
7952 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7953
7954         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7955
7956 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7957
7958         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7959         constant.
7960         (amd64_x32_init_abi): Likewise.
7961         * amd64-tdep.h (amd64_init_abi): Update declaration.
7962         (amd64_x32_init_abi): Likewise.
7963
7964 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7965
7966         PR tdep/21717
7967         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7968         condition for FPSCR.
7969         (arm_linux_store_inferior_registers): Likewise.
7970
7971 2017-07-22  Tom Tromey  <tom@tromey.com>
7972
7973         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7974         <syscalls_counts>: Now a std::vector.
7975         (get_catch_syscall_inferior_data): Use "new".
7976         (catch_syscall_inferior_data_cleanup): Use "delete".
7977         (insert_catch_syscall, remove_catch_syscall)
7978         (clear_syscall_counts): Update.
7979
7980 2017-07-22  Tom Tromey  <tom@tromey.com>
7981
7982         * break-catch-syscall.c (syscall_catchpoint)
7983         <syscalls_to_be_caught>: Now a std::vector<int>
7984         (~syscall_catchpoint): Remove.
7985         (insert_catch_syscall, remove_catch_syscall)
7986         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7987         (print_mention_catch_syscall, print_recreate_catch_syscall):
7988         Update.
7989         (create_syscall_event_catchpoint): Change type of "filter"
7990         parameter.
7991         (catch_syscall_split_args): Return a std::vector.
7992         (catch_syscall_command_1, catching_syscall_number_1): Update.
7993
7994 2017-07-22  Tom Tromey  <tom@tromey.com>
7995
7996         * break-catch-throw.c (struct exception_catchpoint)
7997         <exception_rx>: Now a std::string.
7998         (~exception_catchpoint): Remove.
7999         (print_one_detail_exception_catchpoint): Update.
8000         (handle_gnu_v3_exceptions): Change type of except_rx.
8001         (extract_exception_regexp): Return a std::string.
8002         (catch_exception_command_1): Update.
8003
8004 2017-07-22  Tom Tromey  <tom@tromey.com>
8005
8006         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8007         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8008         std::vector.
8009         <catch_all>: Now a bool.
8010         (~signal_catchpoint): Remove.
8011         (signal_catchpoint_insert_location)
8012         (signal_catchpoint_remove_location)
8013         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8014         (signal_catchpoint_print_mention)
8015         (signal_catchpoint_print_recreate)
8016         (signal_catchpoint_explains_signal): Update.
8017         (create_signal_catchpoint): Change type of "filter" and
8018         "catch_all".
8019         (catch_signal_split_args): Return a std::vector.  Change type of
8020         "catch_all".
8021         (catch_signal_command): Update.
8022
8023 2017-07-20  Pedro Alves  <palves@redhat.com>
8024
8025         * ada-lang.c (ada_language_defn): Make extern.
8026         (_initialize_ada_language): Remove add_language call.
8027         * c-lang.c (c_language_defn, cplus_language_defn)
8028         (asm_language_defn, minimal_language_defn): Make extern.
8029         (_initialize_c_language): Delete.
8030         * completer.c (compare_cstrings): Delete, moved to utils.h.
8031         * d-lang.c (d_language_defn): Make extern.
8032         (_initialize_d_language): Remove add_language calls.
8033         * defs.h (enum language): Add comment.
8034         * f-lang.c (f_language_defn): Make extern.
8035         (_initialize_f_language): Remove add_language call.
8036         * go-lang.c (go_language_defn): Make extern.
8037         (_initialize_go_language): Remove add_language call.
8038         * language.c: Include <algorithm>.
8039         (languages): Redefine as const array.
8040         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8041         (set_language_command): Handle "local".  Use for-range loop.
8042         (set_language): Remove loop.
8043         (language_enum): Rewrite.
8044         (language_def, language_str): Remove loops.
8045         (add_language): Delete.
8046         (add_set_language_command): New, based on add_languages.
8047         (skip_language_trampoline): Adjust.
8048         (local_language_defn): Delete.
8049         (language_gdbarch_post_init): Adjust.
8050         (_initialize_language): Remove add_language calls.  Call
8051         add_set_language_command.
8052         * language.h (add_language): Delete.
8053         (auto_language_defn)
8054         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8055         (asm_language_defn, c_language_defn, cplus_language_defn)
8056         (d_language_defn, f_language_defn, go_language_defn)
8057         (m2_language_defn, objc_language_defn, opencl_language_defn)
8058         (pascal_language_defn, rust_language_defn): Declare.
8059         * m2-lang.c (m2_language_defn): Make extern.
8060         (_initialize_m2_language): Remove add_language call.
8061         * objc-lang.c (objc_language_defn): Make extern.
8062         (_initialize_objc_language): Remove add_language call.
8063         * opencl-lang.c (opencl_language_defn): Make extern.
8064         (_initialize_opencl_language): Remove add_language call.
8065         * p-lang.c (pascal_language_defn): Make extern.
8066         (_initialize_pascal_language): Delete.
8067         * rust-lang.c (rust_language_defn): Make extern.
8068         (_initialize_rust_language): Delete.
8069         * utils.h (compare_cstrings): New static inline function.
8070
8071 2017-07-20  Pedro Alves  <palves@redhat.com>
8072
8073         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8074         (get_var_value): Constify parameters.
8075         (get_int_var_value): Change prototype.
8076         (to_fixed_range_type): Adjust.
8077         * ada-lang.h (get_int_var_value): Change prototype.
8078
8079 2017-07-20  Pedro Alves  <palves@redhat.com>
8080
8081         * dwarf2read.c (dw2_lookup_symbol): Use
8082         SYMBOL_MATCHES_SEARCH_NAME.
8083         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8084
8085 2017-07-20  Pedro Alves  <palves@redhat.com>
8086
8087         * block.c (block_iter_name_step, block_iter_name_first)
8088         (block_iter_name_next): Delete.
8089         (block_lookup_symbol_primary): Adjust to use
8090         dict_iter_match_first/dict_iter_match_next.
8091         * block.h (block_iter_name_first, block_iter_name_next): Delete
8092         declarations.
8093         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8094         dict_iter_match_first/dict_iter_match_next.
8095
8096 2017-07-20  Pedro Alves  <palves@redhat.com>
8097
8098         * cp-support.c (cp_find_first_component_aux): Add missing case for
8099         end of string.
8100
8101 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8102
8103         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8104         of dwo_cu's dwo_file.
8105
8106 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8107
8108         * remote.c (store_registers_using_G): Remove one line comment.
8109
8110 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8111
8112         * regcache.c (regcache_cpy): Simplify it.
8113         (regcache::cpy_no_passthrough): Remove it.
8114         * regcache.h (cpy_no_passthrough): Remove it.
8115         (regcache_dup, regcache_cpy): Update comments.
8116
8117 2017-07-18  Pedro Alves  <palves@redhat.com>
8118
8119         * remote-sim.c (sim_command_completer): Adjust to work with a
8120         completion_tracker instead of a VEC.
8121
8122 2017-07-17  Pedro Alves  <palves@redhat.com>
8123
8124         * completer.c (complete_source_filenames): New function.
8125         (complete_address_and_linespec_locations): New function.
8126         (location_completer): Use complete_address_and_linespec_locations.
8127         (completion_tracker::build_completion_result): Honor the tracker's
8128         request to suppress append.
8129         * completer.h (completion_tracker::suppress_append_ws)
8130         (completion_tracker::set_suppress_append_ws): New methods.
8131         (completion_tracker::m_suppress_append_ws): New field.
8132         (complete_source_filenames): New declaration.
8133         * linespec.c (linespec_complete_what): New.
8134         (struct ls_parser) <complete_what, completion_word,
8135         completion_quote_char, completion_quote_end, completion_tracker>:
8136         New fields.
8137         (string_find_incomplete_keyword_at_end): New.
8138         (linespec_lexer_lex_string): Record quote char.  If in completion
8139         mode, don't throw.
8140         (linespec_lexer_consume_token): Advance the completion word point.
8141         (linespec_lexer_peek_token): Save/restore completion info.
8142         (save_stream_and_consume_token): New.
8143         (set_completion_after_number): New.
8144         (linespec_parse_basic): Set what to complete next depending on
8145         token.  Handle function and label completions specially.
8146         (parse_linespec): Disable objc shortcut in completion mode.  Set
8147         what to complete next depending on token type.  Skip keyword if in
8148         completion mode.
8149         (complete_linespec_component, linespec_complete): New.
8150         * linespec.h (linespec_complete): Declare.
8151
8152 2017-07-17  Pedro Alves  <palves@redhat.com>
8153
8154         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8155         Handle 'operator<' / 'operator<<'.
8156
8157 2017-07-17  Pedro Alves  <palves@redhat.com>
8158
8159         * completer.c (collect_explicit_location_matches): Handle
8160         MATCH_LABEL.
8161         (convert_explicit_location_to_linespec): New, factored out from
8162         ...
8163         (convert_explicit_location_to_sals): ... this.
8164         (complete_label): New.
8165         (linespec_complete_label, find_label_symbols_in_block): New.
8166         (find_label_symbols): Add completion_mode parameter and adjust to
8167         call find_label_symbols_in_block.
8168         * linespec.h (linespec_complete_label): Declare.
8169
8170 2017-07-17  Pedro Alves  <palves@redhat.com>
8171
8172         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8173         complete_symbol_mode parameter.
8174         * cli/cli-cmds.c (complete_command): Get the completion result out
8175         of the handle_brkchars tracker if used a custom word point.
8176         * completer.c: Include "linespec.h".
8177         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8178         (advance_to_expression_complete_word_point): New.
8179         (completion_tracker::completes_to_completion_word): New.
8180         (complete_files_symbols): Pass down
8181         complete_symbol_mode::EXPRESSION.
8182         (explicit_options, probe_options): New.
8183         (collect_explicit_location_matches): Complete on the
8184         explictit_loc->foo instead of word.  Use
8185         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8186         keyword and options completions.
8187         (backup_text_ptr): Delete.
8188         (skip_keyword): New.
8189         (complete_explicit_location): Remove 'word' parameter.  Add
8190         language, quoted_arg_start and quoted_arg_end parameters.
8191         Rewrite, parsing left to right.
8192         (location_completer): Rewrite.
8193         (location_completer_handle_brkchars): New function.
8194         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8195         (enum complete_line_internal_reason): Adjust comments.
8196         (completion_tracker::discard_completions): New.
8197         (completer_handle_brkchars_func_for_completer): Handle
8198         location_completer.
8199         (gdb_custom_word_point_brkchars)
8200         (gdb_org_rl_basic_quote_characters): New.
8201         (gdb_completion_word_break_characters_throw)
8202         (completion_find_completion_word): Handle trackers that use a
8203         custom word point.
8204         (completion_tracker::advance_custom_word_point_by): New.
8205         (completion_tracker::build_completion_result): Don't rely on
8206         readline appending the quote char.
8207         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8208         use a custom word point.
8209         (gdb_rl_attempted_completion_function): Restore
8210         rl_basic_quote_characters.
8211         * completer.h (class completion_tracker): Extend intro comment.
8212         (completion_tracker::set_quote_char)
8213         (completion_tracker::quote_char)
8214         (completion_tracker::set_use_custom_word_point)
8215         (completion_tracker::use_custom_word_point)
8216         (completion_tracker::custom_word_point)
8217         (completion_tracker::set_custom_word_point)
8218         (completion_tracker::advance_custom_word_point_by)
8219         (completion_tracker::completes_to_completion_word)
8220         (completion_tracker::discard_completions): New methods.
8221         (completion_tracker::m_quote_char)
8222         (completion_tracker::m_use_custom_word_point)
8223         (completion_tracker::m_custom_word_point): New fields.
8224         (advance_to_expression_complete_word_point): Declare.
8225         * f-lang.c (f_collect_symbol_completion_matches): Add
8226         complete_symbol_mode parameter.
8227         * language.h (struct language_defn)
8228         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8229         parameter.
8230         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8231         (linespec_complete_function): New function.
8232         (linespec_lexer_lex_keyword): Adjust.
8233         * linespec.h (linespec_keywords, linespec_complete_function): New
8234         declarations.
8235         * location.c (find_end_quote): New function.
8236         (explicit_location_lex_one): Add explicit_completion_info
8237         parameter.  Save quoting info.  Don't throw if being called for
8238         completion.  Don't handle Ada operators here.
8239         (is_cp_operator, skip_op_false_positives, first_of)
8240         (explicit_location_lex_one_function): New function.
8241         (string_to_explicit_location): Replace 'dont_throw' parameter with
8242         an explicit_completion_info pointer parameter.  Handle it.  Don't
8243         use explicit_location_lex_one to lex function names.  Use
8244         explicit_location_lex_one_function instead.
8245         * location.h (struct explicit_completion_info): New.
8246         (string_to_explicit_location): Replace 'dont_throw' parameter with
8247         an explicit_completion_info pointer parameter.
8248         * symtab.c (default_collect_symbol_completion_matches_break_on):
8249         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8250         (default_collect_symbol_completion_matches)
8251         (collect_symbol_completion_matches): Add complete_symbol_mode
8252         parameter.
8253         (collect_symbol_completion_matches_type): Pass down
8254         complete_symbol_mode::EXPRESSION.
8255         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8256         parameter.  Handle LINESPEC mode.
8257         * symtab.h (complete_symbol_mode): New.
8258         (default_collect_symbol_completion_matches_break_on)
8259         (default_collect_symbol_completion_matches)
8260         (collect_symbol_completion_matches)
8261         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8262         parameter.
8263
8264 2017-07-17  Pedro Alves  <palves@redhat.com>
8265
8266         * utils.c (enum class strncmp_iw_mode): New.
8267         (strcmp_iw): Rename to ...
8268         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8269         parameters.  Handle them.
8270         (strncmp_iw): New.
8271         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8272         * utils.h (strncmp_iw): Declare.
8273         (strcmp_iw): Move describing comments here.
8274
8275 2017-07-17  Pedro Alves  <palves@redhat.com>
8276
8277         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8278         CP_OPERATOR_STR.
8279         * c-typeprint.c (is_type_conversion_operator): Use
8280         CP_OPERATOR_STR.
8281         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8282         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8283         CP_OPERATOR_LEN.
8284         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8285         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8286         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8287         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8288         CP_OPERATOR_STR.
8289         * location.c: Include "cp-support.h".
8290         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8291         CP_OPERATOR_STR.
8292         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8293         CP_OPERATOR_LEN.
8294
8295 2017-07-17  Pedro Alves  <palves@redhat.com>
8296
8297         * cli/cli-cmds.c (complete_command): Use a completion tracker
8298         along with completion_find_completion_word for handle_brkchars
8299         phase.
8300         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8301         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8302         (struct gdb_rl_completion_word_info): New.
8303         (gdb_rl_find_completion_word): New.
8304         (completion_find_completion_word): New.
8305         * completer.h (completion_find_completion_word): Declare.
8306
8307 2017-07-17  Pedro Alves  <palves@redhat.com>
8308
8309         * ada-lang.c (symbol_completion_match): Adjust comments.
8310         (symbol_completion_add): Replace vector parameter with
8311         completion_tracker parameter.  Use it.
8312         (ada_make_symbol_completion_list): Rename to...
8313         (ada_collect_symbol_completion_matches): ... this.  Add
8314         completion_tracker parameter and use it.
8315         (ada_language_defn): Adjust.
8316         * break-catch-syscall.c (catch_syscall_completer): Adjust
8317         prototype and work with completion_tracker instead of VEC.
8318         * breakpoint.c (condition_completer): Adjust prototype and work
8319         with completion_tracker instead of VEC.
8320         * c-lang.c (c_language_defn, cplus_language_defn)
8321         (asm_language_defn, minimal_language_defn): Adjust to renames.
8322         * cli/cli-cmds.c (complete_command): Rework using
8323         completion_tracker.  Catch exceptions when completing.
8324         * cli/cli-decode.c (integer_unlimited_completer)
8325         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8326         with completion_tracker instead of VEC.
8327         * command.h (struct completion_tracker): Forward declare.
8328         (completer_ftype, completer_handle_brkchars_ftype): Change
8329         types.
8330         (complete_on_cmdlist, complete_on_enum): Adjust.
8331         * completer.c: Include <algorithm>.
8332         (struct gdb_completer_state): New.
8333         (current_completion): New global.
8334         (readline_line_completion_function): Delete.
8335         (noop_completer, filename_completer)
8336         (filename_completer_handle_brkchars, complete_files_symbols)
8337         (linespec_location_completer): Adjust to work with a
8338         completion_tracker instead of a VEC.
8339         (string_or_empty): New.
8340         (collect_explicit_location_matches): Adjust to work with a
8341         completion_tracker instead of a VEC.
8342         (explicit_location_completer): Rename to ...
8343         (complete_explicit_location): ... this and adjust to work with a
8344         completion_tracker instead of a VEC.
8345         (location_completer): Adjust to work with a completion_tracker
8346         instead of a VEC.
8347         (add_struct_fields): Adjust to work with a completion_list instead
8348         of VEC.
8349         (expression_completer): Rename to ...
8350         (complete_expression): ... this and adjust to work with a
8351         completion_tracker instead of a VEC.  Use complete_files_symbols.
8352         (expression_completer): Reimplement on top of complete_expression.
8353         (symbol_completer): Adjust to work with a completion_tracker
8354         instead of a VEC.
8355         (enum complete_line_internal_reason): Add describing comments.
8356         (complete_line_internal_normal_command): Adjust to work with a
8357         completion_tracker instead of a VEC.
8358         (complete_line_internal): Rename to ...
8359         (complete_line_internal_1): ... this and adjust to work with a
8360         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8361         handle_brkchars phase.
8362         (new_completion_tracker): Delete.
8363         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8364         complete_line_internal_1.
8365         (free_completion_tracker): Delete.
8366         (INITIAL_COMPLETION_HTAB_SIZE): New.
8367         (completion_tracker::completion_tracker)
8368         (completion_tracker::~completion_tracker): New.
8369         (maybe_add_completion): Delete.
8370         (completion_tracker::maybe_add_completion)
8371         (completion_tracker::add_completion)
8372         (completion_tracker::add_completions): New.
8373         (throw_max_completions_reached_error): Delete.
8374         (complete_line): Adjust to work with a completion_tracker instead
8375         of a VEC.  Don't create a completion_tracker_t or check for max
8376         completions here.
8377         (command_completer, command_completer_handle_brkchars)
8378         (signal_completer, reg_or_group_completer_1)
8379         (reg_or_group_completer, default_completer_handle_brkchars):
8380         Adjust to work with a completion_tracker.
8381         (gdb_completion_word_break_characters_throw): New.
8382         (gdb_completion_word_break_characters): Reimplement.
8383         (line_completion_function): Delete.
8384         (completion_tracker::recompute_lowest_common_denominator)
8385         (expand_preserving_ws)
8386         (completion_tracker::build_completion_result)
8387         (completion_result::completion_result)
8388         (completion_result::completion_result)
8389         (completion_result::~completion_result)
8390         (completion_result::completion_result)
8391         (completion_result::release_match_list, compare_cstrings)
8392         (completion_result::sort_match_list)
8393         (completion_result::reset_match_list)
8394         (gdb_rl_attempted_completion_function_throw)
8395         (gdb_rl_attempted_completion_function): New.
8396         * completer.h (completion_list, struct completion_result)
8397         (class completion_tracker): New.
8398         (complete_line): Add completion_tracker parameter.
8399         (readline_line_completion_function): Delete.
8400         (gdb_rl_attempted_completion_function): New.
8401         (noop_completer, filename_completer, expression_completer)
8402         (location_completer, symbol_completer, command_completer)
8403         (signal_completer, reg_or_group_completer): Update prototypes.
8404         (completion_tracker_t, new_completion_tracker)
8405         (make_cleanup_free_completion_tracker): Delete.
8406         (enum maybe_add_completion_enum): Delete.
8407         (maybe_add_completion): Delete.
8408         (throw_max_completions_reached_error): Delete.
8409         * corefile.c (complete_set_gnutarget): Adjust to work with a
8410         completion_tracker instead of a VEC.
8411         * cp-abi.c (cp_abi_completer): Adjust to work with a
8412         completion_tracker instead of a VEC.
8413         * d-lang.c (d_language_defn): Adjust.
8414         * disasm.c (disassembler_options_completer): Adjust to work with a
8415         completion_tracker instead of a VEC.
8416         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8417         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8418         with a completion_tracker instead of a VEC.
8419         (f_language_defn): Adjust.
8420         * go-lang.c (go_language_defn): Adjust.
8421         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8422         Adjust to work with a completion_tracker instead of a VEC.
8423         * infrun.c (handle_completer): Likewise.
8424         * interps.c (interpreter_completer): Likewise.
8425         * interps.h (interpreter_completer): Likewise.
8426         * language.c (unknown_language_defn, auto_language_defn)
8427         (local_language_defn): Adjust.
8428         * language.h (language_defn::la_make_symbol_completion_list):
8429         Rename to ...
8430         (language_defn::la_collect_symbol_completion_matches): ... this
8431         and adjust to work with a completion_tracker instead of a VEC.
8432         * m2-lang.c (m2_language_defn): Adjust.
8433         * objc-lang.c (objc_language_defn): Adjust.
8434         * opencl-lang.c (opencl_language_defn): Adjust.
8435         * p-lang.c (pascal_language_defn): Adjust.
8436         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8437         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8438         with a completion_tracker.
8439         * rust-lang.c (rust_language_defn): Adjust.
8440         * symtab.c (free_completion_list, do_free_completion_list)
8441         (return_val, completion_tracker): Delete.
8442         (completion_list_add_name, completion_list_add_symbol)
8443         (completion_list_add_msymbol, completion_list_objc_symbol)
8444         (completion_list_add_fields, add_symtab_completions): Add
8445         completion_tracker parameter and use it.
8446         (default_make_symbol_completion_list_break_on_1): Rename to...
8447         (default_collect_symbol_completion_matches_break_on): ... this.
8448         Add completion_tracker parameter and use it instead of allocating
8449         a completion tracker here.
8450         (default_make_symbol_completion_list_break_on): Delete old
8451         implementation.
8452         (default_make_symbol_completion_list): Delete.
8453         (default_collect_symbol_completion_matches): New.
8454         (make_symbol_completion_list): Delete.
8455         (collect_symbol_completion_matches): New.
8456         (make_symbol_completion_type): Rename to ...
8457         (collect_symbol_completion_matches_type): ... this.  Add
8458         completion_tracker parameter and use it instead of VEC.
8459         (make_file_symbol_completion_list_1): Rename to...
8460         (collect_file_symbol_completion_matches): ... this.  Add
8461         completion_tracker parameter and use it instead of VEC.
8462         (make_file_symbol_completion_list): Delete.
8463         (add_filename_to_list): Use completion_list instead of a VEC.
8464         (add_partial_filename_data::list): Now a completion_list.
8465         (make_source_files_completion_list): Work with a completion_list
8466         instead of a VEC.
8467         * symtab.h: Include "completer.h".
8468         (default_make_symbol_completion_list_break_on)
8469         (default_make_symbol_completion_list, make_symbol_completion_list)
8470         (make_symbol_completion_type, make_file_symbol_completion_list)
8471         (make_source_files_completion_list): Delete.
8472         (default_collect_symbol_completion_matches_break_on)
8473         (default_collect_symbol_completion_matches)
8474         (collect_symbol_completion_matches)
8475         (collect_symbol_completion_matches_type)
8476         (collect_file_symbol_completion_matches)
8477         (make_source_files_completion_list): New.
8478         * top.c (init_main): Don't install a rl_completion_entry_function
8479         hook.  Install a rl_attempted_completion_function hook instead.
8480         * tui/tui-layout.c (layout_completer): Adjust to work with a
8481         completion_tracker.
8482         * tui/tui-regs.c (tui_reggroup_completer):
8483         * tui/tui-win.c (window_name_completer, focus_completer)
8484         (winheight_completer): Adjust to work with a completion_tracker.
8485         * value.c: Include "completer.h".
8486         (complete_internalvar): Adjust to work with a completion_tracker.
8487         * value.h (complete_internalvar): Likewise.
8488
8489 2017-07-17  Pedro Alves  <palves@redhat.com>
8490
8491         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8492         renames.
8493         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8494         comments to completer_ftype's declaration.
8495         <completer_handle_brkchars>: Change type to
8496         completer_handle_brkchars_ftype.
8497         * command.h (completer_ftype): Add describing comment and give
8498         names to parameters.
8499         (completer_ftype_void): Rename to ...
8500         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8501         (set_cmd_completer_handle_brkchars): Adjust.
8502         * completer.c (filename_completer_handle_brkchars): New function.
8503         (complete_line_internal_normal_command): New function, factored
8504         out from ...
8505         (complete_line_internal): ... here.
8506         (command_completer_handle_brkchars)
8507         (default_completer_handle_brkchars)
8508         (completer_handle_brkchars_func_for_completer): New functions.
8509         * completer.h (set_gdb_completion_word_break_characters): Delete
8510         declaration.
8511         (completer_handle_brkchars_func_for_completer): New declaration.
8512         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8513         completer_handle_brkchars_func_for_completer.
8514
8515 2017-07-17  Pedro Alves  <palves@redhat.com>
8516
8517         * completer.c (symbol_completer): New function, based on
8518         make_symbol_completion_list_fn.
8519         * completer.h (symbol_completer): New declaration.
8520         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8521         * python/py-cmd.c (completers): Adjust.
8522         * symtab.c (make_symbol_completion_list_fn): Delete.
8523         * symtab.h (make_symbol_completion_list_fn): Delete.
8524         * cli/cli-decode.c (add_cmd): Adjust.
8525
8526 2017-07-17  Pedro Alves  <palves@redhat.com>
8527
8528         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8529         * dwarf2read.c: Include "filename-seen-cache.h".
8530         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8531         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8532         * filename-seen-cache.c: New file.
8533         * filename-seen-cache.h: New file.
8534         * symtab.c: Include "filename-seen-cache.h".
8535         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8536         (create_filename_seen_cache, clear_filename_seen_cache)
8537         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8538         to filename-seen-cache.h/filename-seen-cache.c.
8539         (output_source_filename, sources_info)
8540         (maybe_add_partial_symtab_filename)
8541         (make_source_files_completion_list): Adjust to use
8542         filename_seen_cache.
8543
8544 2017-07-17  Pedro Alves  <palves@redhat.com>
8545
8546         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8547         fields.
8548         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8549         dwarf2_debug_sections*)): New.
8550         (dwarf2_per_objfile::dwarf2_per_objfile(const
8551         dwarf2_per_objfile&)): Declare as deleted.
8552         (dwarf2_per_objfile::operator=): Declare as deleted.
8553         (dwarf2_per_objfile::dwarf2_per_objfile)
8554         (dwarf2_per_objfile::~dwarf2_per_objfile)
8555         (dwarf2_per_objfile::free_cached_comp_units): New.
8556         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8557         ctor.  Call dwarf2_per_objfile's ctor manually.
8558         (dwarf2_locate_sections): Deleted/refactored as ...
8559         (dwarf2_per_objfile::locate_sections): ... this new method.
8560         (free_cached_comp_units): Defer to
8561         dwarf2_per_objfile::free_cached_comp_units.
8562         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8563
8564 2017-07-14  Tom Tromey  <tom@tromey.com>
8565
8566         PR rust/21764:
8567         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8568         parameter.
8569         <UNOP_SIZEOF>: Split into separate case.
8570         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8571
8572 2017-07-14  Tom Tromey  <tom@tromey.com>
8573
8574         PR rust/21763:
8575         * symtab.c (symbol_matches_domain): Add language_rust to special
8576         case.
8577         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8578         treat LOC_TYPEDEF symbols as variables.
8579
8580 2017-07-14  Pedro Alves  <palves@redhat.com>
8581
8582         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8583         symtabs matching all symtabs with SRCFILE as file name instead of
8584         only considering the first hit, with lookup_symtab.
8585
8586 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8587
8588         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8589         operator_name parameters.
8590         (gen_expr): Update function call.
8591
8592 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8593
8594         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8595         parameter.
8596         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8597         Likewise.
8598         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8599         parameter, use agent_expr::gdbarch instead, update function
8600         calls.
8601         (locexpr_tracepoint_var_ref): Likewise.
8602         (loclist_tracepoint_var_ref): Likewise.
8603         * ax-gdb.c (gen_trace_static_fields): Likewise.
8604         (gen_traced_pop): Likewise.
8605         (gen_frame_args_address): Likewise.
8606         (gen_frame_locals_address): Likewise.
8607         (gen_var_ref): Likewise.
8608         (gen_struct_ref_recursive): Likewise.
8609         (gen_static_field): Likewise.
8610         (gen_maybe_namespace_elt): Likewise.
8611         (gen_expr): Likewise.
8612         (gen_trace_for_var): Likewise.
8613         (gen_trace_for_expr): Likewise.
8614         (gen_trace_for_return_address): Likewise.
8615
8616 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8617
8618         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8619         parameter.
8620         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8621
8622 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8623
8624         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8625         from ax, update calls.
8626         (gen_usual_arithmetic): Likewise.
8627         (gen_integral_promotions): Likewise.
8628         (gen_bitfield_ref): Likewise.
8629         (gen_primitive_field): Likewise.
8630         (gen_struct_ref_recursive): Likewise.
8631         (gen_struct_ref): Likewise.
8632         (gen_maybe_namespace_elt): Likewise.
8633         (gen_struct_elt_for_reference): Likewise.
8634         (gen_namespace_elt): Likewise.
8635         (gen_aggregate_elt_ref): Likewise.
8636         (gen_expr): Get gdbarch from ax, update calls.
8637         (gen_expr_binop_rest): Likewise.
8638
8639 2017-07-13  Pedro Alves  <palves@redhat.com>
8640
8641         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8642         as default tdesc.
8643         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8644         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8645         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8646         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8647         tdep.
8648         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8649         Get final tdesc from the tdep.
8650         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8651         default tdesc.
8652         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8653         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8654         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8655         Use it as default tdesc.
8656         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8657         down to amd_init_abi.  No longer handle fallback tdesc here.
8658         * amd64-tdep.h (tdesc_x32): Declare.
8659         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8660         parameter.
8661         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8662         as default tdesc.
8663
8664 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8665
8666         * s390-linux-tdep.c (s390_process_record): Add support for
8667         instructions new in arch12.
8668
8669 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8670
8671         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8672         PT_GETFSBASE and PT_GETGSBASE.
8673         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8674         PT_SETGSBASE.
8675
8676 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8677
8678         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8679         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8680         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8681         those rules.
8682         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8683         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8684         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8685         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8686         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8687         * features/i386/amd64.xml: Add 64bit-segments.xml.
8688         * features/i386/amd64-avx-avx512.c: Regenerated.
8689         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8690         * features/i386/amd64-avx-mpx.c: Regenerated.
8691         * features/i386/amd64-avx.c: Regenerated.
8692         * features/i386/amd64-mpx.c: Regenerated.
8693         * features/i386/amd64.c: Regenerated.
8694         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8695         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8696         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8697         * regformats/i386/amd64-avx.dat: Regenerated.
8698         * regformats/i386/amd64-mpx.dat: Regenerated.
8699         * regformats/i386/amd64.dat: Regenerated.
8700
8701 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8702
8703         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8704         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8705
8706 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8707
8708         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8709         unsetenv.
8710         * gnulib/aclocal.m4: Regenerate.
8711         * gnulib/config.in: Regenerate.
8712         * gnulib/configure: Regenerate.
8713         * gnulib/import/Makefile.am: Regenerate.
8714         * gnulib/import/Makefile.in: Regenerate.
8715         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8716         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8717         * gnulib/import/m4/environ.m4: New file.
8718         * gnulib/import/m4/setenv.m4: New file.
8719         * gnulib/import/setenv.c: New file.
8720         * gnulib/import/unsetenv.c: New file.
8721
8722 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8723
8724         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8725         address when op is DW_OP_addr.
8726
8727 2017-07-09  Tom Tromey  <tom@tromey.com>
8728
8729         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8730         check and apply to outer type.
8731
8732 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8733
8734         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8735         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8736         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8737         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8738
8739 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8740
8741         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8742
8743 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8744
8745         * corelow.c (get_core_siginfo): Remove.
8746         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8747         instead of get_core_siginfo.
8748         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8749         * gdbarch.h: Re-generate.
8750         * gdbarch.c: Re-generate.
8751         * linux-tdep.c (linux_core_xfer_siginfo): New.
8752         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8753
8754 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8755
8756         * corelow.c (thread_section_name): Move to ...
8757         * gdbcore.h (thread_section_name): ... here.
8758
8759 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8760
8761         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8762         (struct siginfo32): New.
8763         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8764         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8765         via ptrace(PT_LWPINFO).
8766
8767 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8768
8769         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8770         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8771         (fbsd_get_siginfo_type): New.
8772         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8773         (_initialize_fbsd_tdep): New.
8774
8775 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8776
8777         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8778         a singular dwo_unit*) to support multiple CUs in the same way that
8779         multiple TUs are supported.
8780         (create_cus_hash_table): Replace create_dwo_cu with a function for
8781         parsing multiple CUs from a DWO file.
8782         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8783         create_dwo_cu.
8784         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8785         htab_find, rather than comparing the signature to a singleton CU in
8786         the dwo_file.
8787
8788 2017-07-06  Pedro Alves  <palves@redhat.com>
8789
8790         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8791
8792 2017-07-04  Pedro Alves  <palves@redhat.com>
8793
8794         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8795         * gdbtypes.h (TYPE_STATIC): Delete.
8796         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8797         is_synchronized, is_native>: Delete.
8798         <dummy>: Bump.
8799         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8800         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8801         (TYPE_FN_FIELD_ABSTRACT): Delete.
8802
8803 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8804
8805         * buffer.h (buffer_finish): Fix spelling mistakes.
8806
8807 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8808
8809         * .dir-locals.el: Automatically switch to C-style comments in
8810         versions of Emacs that support the feature.
8811
8812 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8813             Pedro Alves  <palves@redhat.com>
8814
8815         PR cli/21688
8816         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8817         (process_next_line): New variable 'inline_cmd'.
8818         Adjust 'if' clauses for "python", "compile" and "guile" to use
8819         'command_name_equals' and check for '!inline_cmd'.
8820
8821 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8822
8823         PR cli/21688
8824         * cli/cli-script.c (command_name_equals_not_inline): New function.
8825         (process_next_line): Adjust 'if' clauses for "python", "compile"
8826         and "guile" to use command_name_equals_not_inline.
8827
8828 2017-06-29  Pedro Alves  <palves@redhat.com>
8829
8830         * completer.c (expression_completer): Call
8831         linespec_location_completer instead of location_completer.
8832
8833 2017-06-29  Pedro Alves  <palves@redhat.com>
8834
8835         * completer.c (expression_completer): Remove code that recomputes
8836         'text' from 'word'.
8837
8838 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8839
8840         * regformats/regdat.sh: Generate code with
8841         "ifndef IN_PROCESS_AGENT".
8842
8843 2017-06-28  Pedro Alves  <palves@redhat.com>
8844
8845         * command.h: Include "common/scoped_restore.h".
8846
8847 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8848
8849         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8850         instead of obstack_grow.
8851
8852 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8853
8854         PR gdb/21337
8855         * symfile.c (reread_symbols): Call objfiles_changed just before
8856         read_symbols.
8857
8858 2017-06-27  Pedro Alves  <palves@redhat.com>
8859
8860         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8861         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8862         (completion_list_add_symbol, completion_list_add_msymbol):
8863         ... these new functions.
8864         (add_symtab_completions)
8865         (default_make_symbol_completion_list_break_on_1): Adjust.
8866
8867 2017-06-27  Pedro Alves  <palves@redhat.com>
8868
8869         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8870         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8871         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8872         dtor.
8873         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8874         'storage_obstack' field an auto_obstack.  In-class initialize all
8875         non-bitfield fields.  Make minsyms_read bool.
8876         * symfile.c (read_symbols): Adjust.
8877
8878 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8879
8880         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8881         (gdbsim_store_register): Likewise.
8882
8883 2017-06-27  Pedro Alves  <palves@redhat.com>
8884
8885         * c-exp.y (name_obstack): Now an auto_obstack.
8886         (yylex): Use auto_obstack::clear.
8887         (c_parse): Use auto_obstack::clear instead of reinitializing and
8888         freeing the obstack.
8889         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8890         * d-exp.y (name_obstack): Now an auto_obstack.
8891         (yylex): Use auto_obstack::clear.
8892         (d_parse): Use auto_obstack::clear instead of reinitializing and
8893         freeing the obstack.
8894         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8895         auto_obstack.
8896         * dwarf2read.c (create_addrmap_from_index)
8897         (dwarf2_build_psymtabs_hard)
8898         (update_enumeration_type_from_children): Likewise.
8899         * gdb_obstack.h (auto_obstack): New type.
8900         * go-exp.y (name_obstack): Now an auto_obstack.
8901         (build_packaged_name): Use auto_obstack::clear.
8902         (go_parse): Use auto_obstack::clear instead of reinitializing and
8903         freeing the obstack.
8904         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8905         auto_obstack.
8906         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8907         * rust-exp.y (work_obstack): Now an auto_obstack.
8908         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8909         reinitializing and freeing the obstack.
8910         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8911         (host_char_to_target): Use auto_obstack.
8912         * utils.h (make_cleanup_obstack_free): Delete declaration.
8913         * valprint.c (generic_emit_char, generic_printstr): Use
8914         auto_obstack.
8915
8916 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8917
8918         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8919         thread.
8920         (darwin_init_thread_list): Don't update dummy thread.
8921         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8922
8923 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8924
8925         * record-full.c (netorder16): Remove.
8926
8927 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8928
8929         * common/diagnostics.h: Define macros for GCC.
8930         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8931         * common/vec.h: Include diagnostics.h.
8932         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8933         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8934         warning.
8935
8936 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8937
8938         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8939         New macro.
8940         * ada-lex.l: Ignore deprecated register warnings.
8941
8942 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8943
8944         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8945         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8946
8947 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8948
8949         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8950         its own line.
8951
8952 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8953
8954         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8955
8956 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8957
8958         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8959         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8960         (xtensa_register_read_masked): Likewise.
8961
8962 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8963
8964         * common/environ.c (gdb_environ::unset): Update comment.
8965
8966 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8967
8968         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8969         registers.
8970
8971 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8972
8973         * record-full.c (record_full_exec_insn): Use byte_vector.
8974
8975 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8976
8977         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8978         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8979
8980 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8981
8982         * remote.c (cached_reg): Move from here...
8983         * regcache.h (cached_reg): ...to here.
8984         * python/py-unwind.c (struct reg_info): Remove.
8985         (cached_frame_info): Use cached_reg_t.
8986         (pyuw_prev_register): Likewise.
8987         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8988         (pyuw_dealloc_cache): Free all registers.
8989
8990 2017-06-22  Pedro Alves  <palves@redhat.com>
8991             Simon Marchi  <simon.marchi@ericsson.com>
8992
8993         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8994         warning.
8995         * common/diagnostics.h: New file.
8996
8997 2017-06-22  Pedro Alves  <palves@redhat.com>
8998
8999         * common/agent.h: Add include guards.
9000
9001 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9002
9003         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9004         talk about addressable units instead of bytes.
9005
9006 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9007
9008         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9009         of '::const_iterator'.
9010
9011 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9012
9013         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9014         'unittests/environ-selftests.c'.
9015         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9016         * charset.c (find_charset_names): Declare object 'iconv_env'.
9017         Update code to use 'iconv_env' object.  Remove call to
9018         'free_environ'.
9019         * common/environ.c: Include <utility>.
9020         (make_environ): Delete function.
9021         (free_environ): Delete function.
9022         (gdb_environ::clear): New function.
9023         (gdb_environ::operator=): New function.
9024         (gdb_environ::get): Likewise.
9025         (environ_vector): Delete function.
9026         (set_in_environ): Delete function.
9027         (gdb_environ::set): New function.
9028         (unset_in_environ): Delete function.
9029         (gdb_environ::unset): New function.
9030         (gdb_environ::envp): Likewise.
9031         * common/environ.h: Include <vector>.
9032         (struct gdb_environ): Delete; transform into...
9033         (class gdb_environ): ... this class.
9034         (free_environ): Delete prototype.
9035         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9036         environ_vector): Likewise.
9037         * infcmd.c (run_command_1): Update code to call
9038         'envp' from 'gdb_environ' class.
9039         (environment_info): Update code to call methods from 'gdb_environ'
9040         class.
9041         (unset_environment_command): Likewise.
9042         (path_info): Likewise.
9043         (path_command): Likewise.
9044         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9045         (inferior::inferior): Initialize 'environment' using the host's
9046         information.
9047         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9048         Include "environ.h".
9049         (class inferior) <environment>: Change type from 'struct
9050         gdb_environ' to 'gdb_environ'.
9051         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9052         methods from 'gdb_environ' class.
9053         * solib.c (solib_find_1): Likewise
9054         * unittests/environ-selftests.c: New file.
9055
9056 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9057
9058         * features/i386/i386-linux.xml: Exchange the order of including
9059         32bit-linux.xml and 32bit-sse.xml.
9060         * features/i386/i386-linux.c: Regenerated.
9061
9062 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9063
9064         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9065         Delete copy ctor and assignment operator.
9066         (tdesc_type): Likewise.
9067         (tdesc_feature): Likewise.
9068         (tdesc_free_reg): Remove.
9069         (tdesc_create_reg): Use new.
9070         (tdesc_free_type): Remove.
9071         (tdesc_create_vector): Use new.
9072         (tdesc_create_union): Likewise.
9073         (tdesc_create_flags): Likewise.
9074         (tdesc_create_enum): Likewise.
9075         (tdesc_free_feature): Delete.
9076         (free_target_description): Use delete.
9077
9078 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9079
9080         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9081         registers.
9082
9083 2017-06-19  Pedro Alves  <palves@redhat.com>
9084
9085         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9086         after gdb::unlinker.
9087
9088 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9089
9090         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9091         gdb_environ to access an environment variable.
9092
9093 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9094
9095         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9096         gdb_byte*.
9097
9098 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9099
9100         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9101
9102 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9103
9104         * configure: Re-generate.
9105         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9106
9107 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9108
9109         * configure: Re-generate.
9110         * warning.m4: Pass -Werror to compiler when checking for
9111         supported warning flags.
9112
9113 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9114
9115         * Makefile.in (COMPILE.pre): Add "-x c++".
9116
9117 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9118             Pedro Alves  <palves@redhat.com>
9119             Yao Qi  <yao.qi@linaro.org>
9120
9121         * defs.h (RequireLongest): New.
9122         (extract_integer): Declare function template.
9123         (extract_signed_integer): Remove the declaration, but define it
9124         static inline.
9125         (extract_unsigned_integer): Likewise.
9126         (store_integer): Declare function template.
9127         (store_signed_integer): Remove the declaration, but define it
9128         static inline.
9129         (store_unsigned_integer): Likewise.
9130         * findvar.c (extract_integer): New function template.
9131         (extract_signed_integer): Remove.
9132         (extract_unsigned_integer): Remove.
9133         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9134         instantiations.
9135         (store_integer): New function template.
9136         (store_signed_integer): Remove.
9137         (store_unsigned_integer): Remove.
9138         (store_integer): Explicit instantiations.
9139         * regcache.c (regcache_raw_read_signed): Update.
9140         (regcache::raw_read): New function.
9141         (regcache::raw_read_signed): Remove.
9142         (regcache::raw_read_unsigned): Remove.
9143         (regcache_raw_read_unsigned): Update.
9144         (regcache_raw_write_unsigned): Update.
9145         (regcache::raw_write_signed): Remove.
9146         (regcache::raw_write): New function.
9147         (regcache_cooked_read_signed): Update.
9148         (regcache::raw_write_unsigned): Remove.
9149         (regcache::cooked_read_signed): Remove.
9150         (regcache_cooked_read_unsigned): Update.
9151         (regcache::cooked_read_unsigned): Remove.
9152         (regcache_cooked_write_signed): Update.
9153         (regcache_cooked_write_unsigned): Update.
9154         * regcache.h (regcache) <raw_read_signed>: Remove.
9155         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9156         <raw_read, raw_write>: New.
9157         <cooked_read_signed, cooked_write_signed>: Remove.
9158         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9159         <cooked_read, cooked_write>: New.
9160         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9161         (sh64_pseudo_register_write): Update.
9162
9163 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9164
9165         * arc-tdep.c (arc_disassembler_options): New variable.
9166         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9167         of default_print_insn.
9168         (arc_delayed_print_insn): Set info->section when needed,
9169         use default_print_insn to retrieve a disassembler.
9170
9171 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9172
9173         PR gdb/21574
9174         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9175         to mention $SHELL and startup-with-shell.
9176
9177 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9178
9179         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9180
9181 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9182
9183         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9184         default_print_insn instead of print_insn_aarch64.
9185         * arm-tdep.c (gdb_print_insn_arm): Call
9186         default_print_insn instead of print_insn_big_arm
9187         and print_insn_little_arm.
9188         * i386-tdep.c (i386_print_insn): Call default_print_insn
9189         instead of print_insn_i386.
9190         * ia64-tdep.c (ia64_print_insn): Call
9191         default_print_insn instead of print_insn_ia64.
9192         * mips-tdep.c (gdb_print_insn_mips): Call
9193         default_print_insn instead of print_insn_big_mips
9194         and print_insn_little_mips.
9195         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9196         instead of print_insn_spu.
9197
9198 2017-06-14  Pedro Alves  <palves@redhat.com>
9199
9200         * ada-lang.c: Include "common/byte-vector.h".
9201         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9202         * charset.c (wchar_iterator::iterate): Resize the vector instead
9203         of reserving it.
9204         * common/byte-vector.h: Include "common/def-vector.h".
9205         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9206         * cli/cli-dump.c: Include "common/byte-vector.h".
9207         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9208         * common/byte-vector.h: New file.
9209         * common/def-vector.h: New file.
9210         * common/default-init-alloc.h: New file.
9211         * dwarf2loc.c: Include "common/byte-vector.h".
9212         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9213         instead of reserving it.
9214         * dwarf2read.c: Include "common/byte-vector.h".
9215         (data_buf::m_vec): Now a gdb::byte_vector.
9216         * gdb_regex.c: Include "common/def-vector.h".
9217         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9218         * mi/mi-main.c: Include "common/byte-vector.h".
9219         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9220         * printcmd.c: Include "common/byte-vector.h".
9221         (print_scalar_formatted): Use gdb::byte_vector.
9222         * valprint.c: Include "common/byte-vector.h".
9223         (maybe_negate_by_bytes, print_decimal_chars): Use
9224         gdb::byte_vector.
9225
9226 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9227
9228         * darwin-nat.c: Include "nat/fork-inferior.h".
9229
9230 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9231
9232         * configure.nat: Factor out Darwin bits that are not
9233         architecture-specific.  Add fork-inferior.o.
9234
9235 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9236
9237         * configure.nat: Factor out AIX bits that are not
9238         architecture-specific.  Add fork-inferior.o.
9239
9240 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9241
9242         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9243         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9244         wrappers that just call rw_pieced_value.
9245
9246 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9247
9248         * dwarf2loc.c (write_pieced_value): When writing the data for a
9249         memory piece, use write_memory_with_notification instead of
9250         write_memory.
9251
9252 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9253
9254         * valops.c (read_value_memory): Change embedded_offset to
9255         represent a bit offset instead of a byte offset.
9256         * value.h (read_value_memory): Adjust comment.
9257
9258 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9259
9260         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9261         dest_offset_bits and source_offset_bits.
9262         (write_pieced_value): Likewise.
9263
9264 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9267         given by DW_OP_bit_piece.
9268         (write_pieced_value): Likewise.
9269
9270 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9271
9272         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9273         some other preparations to the places where sufficient information
9274         is available.
9275         (write_pieced_value): Likewise.
9276
9277 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9278
9279         * dwarf2loc.c (bits_to_bytes): New function.
9280         (read_pieced_value): Fix offset calculations for register pieces
9281         on big-endian targets.
9282         (write_pieced_value): Likewise.
9283
9284 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9285
9286         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9287         (write_pieced_value): Likewise.
9288
9289 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9290
9291         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9292         transfer the source value's least significant bits, instead of its
9293         lowest-addressed ones.  Rename type_len to max_offset.
9294         (read_pieced_value): Mirror above changes to write_pieced_value as
9295         applicable.
9296
9297 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9298
9299         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9300         truncate full bytes from dest_offset_bits before using it as an
9301         offset into the buffer.
9302
9303 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9304
9305         * dwarf2loc.c (write_pieced_value): Include transfer size in
9306         byte-wise check.
9307
9308 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9309
9310         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9311         calculation of this_size.
9312
9313 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9314
9315         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9316         when targeting a bit-field.
9317         (write_pieced_value): Likewise.
9318
9319 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9320
9321         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9322         (allocate_piece_closure): Drop addr_size parameter.
9323         (dwarf2_evaluate_loc_desc_full): Adjust call to
9324         allocate_piece_closure.
9325
9326 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9327
9328         PR gdb/21226
9329         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9330         the LSB end, independent of endianness.
9331
9332 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9333
9334         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9335         size capping.
9336
9337 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9338
9339         * mips-linux-nat.c: Move include features/mips*-linux.c to
9340         mips-linux-tdep.c.
9341         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9342         to mips-linux-tdep.c.
9343         * mips-linux-tdep.c: Include features/mips*-linux.c
9344         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9345         functions.
9346         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9347         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9348         (tdesc_mips64_dsp_linux): Declare.
9349
9350 2017-06-12  Tom Tromey  <tom@tromey.com>
9351
9352         * valprint.h (val_print_type_code_int): Remove.
9353         * valprint.c (generic_val_print_int): Always call
9354         val_print_scalar_formatted.
9355         (val_print_type_code_int): Remove.
9356         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9357         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9358         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9359         * ada-valprint.c (ada_val_print_num): Use
9360         val_print_scalar_formatted.
9361
9362 2017-06-12  Tom Tromey  <tom@tromey.com>
9363
9364         * printcmd.c (print_scalar_formatted): Unify the two switches.
9365         Don't convert scalars to LONGEST.
9366
9367 2017-06-12  Tom Tromey  <tom@tromey.com>
9368
9369         PR exp/16225:
9370         * valprint.h (print_decimal_chars): Update.
9371         * valprint.c (maybe_negate_by_bytes): New function.
9372         (print_decimal_chars): Add "is_signed" argument.
9373         * printcmd.c (print_scalar_formatted): Update.
9374
9375 2017-06-12  Tom Tromey  <tom@tromey.com>
9376
9377         PR exp/16225:
9378         * valprint.h (print_binary_chars, print_hex_chars): Update.
9379         * valprint.c (val_print_type_code_int): Update.
9380         (print_binary_chars): Add "zero_pad" argument.
9381         (emit_octal_digit): New function.
9382         (print_octal_chars): Don't zero-pad.
9383         (print_decimal_chars): Likewise.
9384         (print_hex_chars): Add "zero_pad" argument.
9385         * sh64-tdep.c (sh64_do_fp_register): Update.
9386         * regcache.c (regcache::dump): Update.
9387         * printcmd.c (print_scalar_formatted): Update.
9388         * infcmd.c (default_print_one_register_info): Update.
9389
9390 2017-06-12  Pedro Alves  <palves@redhat.com>
9391             Alan Hayward  <alan.hayward@arm.com>
9392
9393         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9394         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9395         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9396         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9397         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9398
9399 2017-06-12  Pedro Alves  <palves@redhat.com>
9400
9401         * dwarf2read.c (mapped_symtab::data): Now a vector of
9402         symtab_index_entry instead of vector of
9403         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9404         whether an element's name is NULL instead of checking whether the
9405         element itself is NULL.
9406         (find_slot): Change return type.  Adjust.
9407         (hash_expand, , add_index_entry, uniquify_cu_indices)
9408         (write_hash_table): Adjust.
9409
9410 2017-06-12  Pedro Alves  <palves@redhat.com>
9411
9412         * dwarf2read.c (recursively_count_psymbols): New function.
9413         (write_psymtabs_to_index): Call it to compute number of psyms and
9414         pass estimate size of psyms_seen to unordered_set's ctor.
9415
9416 2017-06-12  Pedro Alves  <palves@redhat.com>
9417
9418         * dwarf2read.c (write_hash_table): Check if key already exists
9419         before emplacing.
9420
9421 2017-06-12  Pedro Alves  <palves@redhat.com>
9422
9423         * dwarf2read.c (data_buf::append_space): Rename to...
9424         (data_buf::grow): ... this, and make private.  Adjust all callers.
9425         (data_buf::append_uint): New method.
9426         (add_address_entry, write_one_signatured_type)
9427         (write_psymtabs_to_index): Use it.
9428
9429 2017-06-12  Pedro Alves  <palves@redhat.com>
9430
9431         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9432         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9433         (data_buf::file_write): Call ::fwrite directly.
9434
9435 2017-06-12  Pedro Alves  <palves@redhat.com>
9436
9437         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9438         std::vector::erase.
9439
9440 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9441
9442         Code cleanup: C++ify .gdb_index producer.
9443         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9444         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9445         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9446         (create_strtab, add_string): Remove.
9447         (file_write, data_buf): New.
9448         (struct symtab_index_entry): Use std::vector for cu_indices.
9449         (struct mapped_symtab): Use std::vector for data.
9450         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9451         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9452         Remove.
9453         (find_slot): Change return type.  Update it to the new data structures.
9454         (hash_expand, add_index_entry): Update it to the new data structures.
9455         (offset_type_compare): Remove.
9456         (uniquify_cu_indices): Update it to the new data structures.
9457         (c_str_view, c_str_view_hasher, vector_hasher): New.
9458         (add_indices_to_cpool): Remove.
9459         (write_hash_table): Update it to the new data structures.
9460         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9461         (eq_psymtab_cu_index): Remove.
9462         (psym_index_map): New typedef.
9463         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9464         reference and std::unordered_map for cu_index_htab.
9465         (add_address_entry, add_address_entry_worker, write_address_map)
9466         (write_psymbols): Update it to the new data structures.
9467         (write_obstack): Remove.
9468         (struct signatured_type_index_data): Change types_list to a data_buf
9469         reference and psyms_seen to a std::unordered_set reference.
9470         (write_one_signatured_type, recursively_write_psymbols)
9471         (write_psymtabs_to_index): Update it to the new data structures.
9472
9473 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9474
9475         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9476         separate-debug-file commands.
9477         * symfile.h (separate_debug_file_debug): New global.
9478         * symfile.c (separate_debug_file_debug): New global.
9479         (separate_debug_file_exists, find_separate_debug_file): Add
9480         debug output.
9481         (_initialize_symfile): Add "set debug separate-debug-file"
9482         command.
9483         * build-id.c (build_id_to_debug_bfd,
9484         find_separate_debug_file_by_buildid): Add debug output.
9485
9486 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9487
9488         * gdbarch.sh (displaced_step_free_closure): Remove.
9489         * gdbarch.h, gdbarch.c: Re-generate.
9490         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9491         displaced_step_free_closure.
9492         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9493         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9494         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9495         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9496         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9497         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9498         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9499         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9500         * infrun.c (displaced_step_clear): Call xfree instead of
9501         gdbarch_displaced_step_free_closure.
9502
9503 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9504
9505         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9506         NULL".
9507
9508 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9509
9510         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9511         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9512         (mn10300_push_dummy_call): Likewise.
9513
9514 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9515
9516         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9517
9518 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9519
9520         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9521
9522 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9523
9524         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9525         able to start inferiors using a shell.
9526         (New remote packets): Announce new packet "QStartupWithShell".
9527         * remote.c: Add PACKET_QStartupWithShell.
9528         (extended_remote_create_inferior): Handle new
9529         PACKET_QStartupWithShell.
9530         (remote_protocol_features) <QStartupWithShell>: New entry for
9531         PACKET_QStartupWithShell.
9532         (_initialize_remote): Call "add_packet_config_cmd" for
9533         QStartupShell.
9534
9535 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9536             Pedro Alves  <palves@redhat.com>
9537
9538         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9539         and "nat/fork-inferior.h".
9540         * common/common-inferior.h: New file, with contents from
9541         "gdb/inferior.h".
9542         * commom/common-utils.c: Include "common-utils.h".
9543         (stringify_argv): New function.
9544         * common/common-utils.h (stringify_argv): New prototype.
9545         * configure.nat: Add "fork-inferior.o" as a dependency for
9546         "*linux*", "fbsd*" and "nbsd*" hosts.
9547         * corefile.c (get_exec_file): Update comment.
9548         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9549         instead of "startup_inferior".
9550         (darwin_create_inferior): Call "add_thread_silent" after
9551         "fork_inferior".
9552         * fork-child.c: Cleanup unnecessary includes.
9553         (SHELL_FILE): Move to "common/common-fork-child.c".
9554         (environ): Likewise.
9555         (exec_wrapper): Initialize.
9556         (get_exec_wrapper): New function.
9557         (breakup_args): Move to "common/common-fork-child.c"; rename to
9558         "breakup_args_for_exec".
9559         (escape_bang_in_quoted_argument): Move to
9560         "common/common-fork-child.c".
9561         (saved_ui): New variable.
9562         (prefork_hook): New function.
9563         (postfork_hook): Likewise.
9564         (postfork_child_hook): Likewise.
9565         (gdb_startup_inferior): Likewise.
9566         (fork_inferior): Move to "common/common-fork-child.c".  Update
9567         function to support gdbserver.
9568         (startup_inferior): Likewise.
9569         * gdbcore.h (get_exec_file): Remove declaration.
9570         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9571         instead of "startup_inferior".  Call "add_thread_silent" after
9572         "fork_inferior".
9573         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9574         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9575         instead of "startup_inferior".  Call "add_thread_silent" after
9576         "fork_inferior".
9577         * inferior.h: Include "common-inferior.h".
9578         (trace_start_error): Move to "common/common-utils.h".
9579         (trace_start_error_with_name): Likewise.
9580         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9581         (startup_inferior): Likewise.
9582         (gdb_startup_inferior): New prototype.
9583         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9584         * nat/fork-inferior.h: New file.
9585         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9586         instead of "startup_inferior".  Call "add_thread_silent" after
9587         "fork_inferior".
9588         * target.h (target_terminal_init): Move prototype to
9589         "target/target.h".
9590         (target_terminal_inferior): Likewise.
9591         (target_terminal_ours): Likewise.
9592         * target/target.h (target_terminal_init): New prototype, moved
9593         from "target.h".
9594         (target_terminal_inferior): Likewise.
9595         (target_terminal_ours): Likewise.
9596         * utils.c (gdb_flush_out_err): New function.
9597
9598 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9599
9600         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9601         * common/common-gdbthread.h: New file, with parts from
9602         "gdb/gdbthread.h".
9603         * gdbthread.h: Include "common-gdbthread.h".
9604         (switch_to_thread): Moved to "common/common-gdbthread.h".
9605
9606 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9607
9608         * Makefile.in (SFILES): Add "common/job-control.c".
9609         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9610         (COMMON_OBS): Add "job-control.o".
9611         * common/job-control.c: New file, with contents from
9612         "gdb/inflow.c".
9613         * common/job-control.h: New file, with contents from "terminal.h".
9614         * fork-child.c: Include "job-control.h".
9615         * inflow.c: Include "job-control.h".
9616         (gdb_setpgid): Move to "common/common-inflow.c".
9617         (_initialize_inflow): Move setting of "job_control" to
9618         "handle_job_control".
9619         * terminal.h (job_control): Moved to "common/common-terminal.h".
9620         (gdb_setpgid): Likewise.
9621         * top.c: Include "job_control.h".
9622         * utils.c: Likewise.
9623         (job_control): Moved to "job-control.c".
9624
9625 2017-06-07  Pedro Alves  <palves@redhat.com>
9626
9627         * Makefile.in (SFILES): Add gdb_regex.c.
9628         (COMMON_OBS): Add gdb_regex.o.
9629         * ada-lang.c (ada_add_standard_exceptions)
9630         (ada_add_exceptions_from_frame, name_matches_regex)
9631         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9632         parameter type to compiled_regex.  Adjust.
9633         (ada_exceptions_list): Use compiled_regex.
9634         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9635         std::unique_ptr<compiled_regex>.
9636         (exception_catchpoint::~exception_catchpoint): Remove regfree
9637         call.
9638         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9639         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9640         * breakpoint.c (solib_catchpoint::compiled): Now a
9641         std::unique_ptr<compiled_regex>.
9642         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9643         (check_status_catch_solib): Adjust to use compiled_regex.
9644         (add_solib_catchpoint): Adjust to use compiled_regex.
9645         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9646         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9647         compiled_regex reference.  Adjust to use it.
9648         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9649         declaration.  Include "gdb_regex.h".
9650         (apropos_cmd): Change regex parameter to compiled_regex reference.
9651         * gdb_regex.c: New file.
9652         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9653         declarations.
9654         (class compiled_regex): New.
9655         * linux-tdep.c: Include "common/gdb_optional.h".
9656         (struct mapping_regexes): New, factored out from
9657         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9658         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9659         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9660         * probe.c: Include "common/gdb_optional.h".
9661         (collect_probes): Use compiled_regex and gdb::optional and remove
9662         cleanups.
9663         * skip.c: Include "common/gdb_optional.h".
9664         (skiplist_entry::compiled_function_regexp): Now a
9665         gdb::optional<compiled_regex>.
9666         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9667         (free_skiplist_entry): Remove regfree call.
9668         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9669         compiled_regex and gdb::optional.
9670         * symtab.c: Include "common/gdb_optional.h".
9671         (search_symbols): Use compiled_regex and gdb::optional.
9672         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9673         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9674         to gdb_regex.c.
9675
9676 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9677
9678         * regcache.c (regcache::save): Avoid buffer use.
9679         (regcache::dump): Likewise.
9680
9681 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9682
9683         * sh-tdep.c (sh_pseudo_register_read): Remove
9684         MAX_REGISTER_SIZE.
9685         (sh_pseudo_register_write): Likewise.
9686         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9687         (sh64_pseudo_register_write): Likewise
9688
9689 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9690
9691         * aarch64-tdep.c (aarch64_store_return_value): Use
9692         V_REGISTER_SIZE.
9693         (aarch64_pseudo_read_value): Likewise.
9694         (aarch64_pseudo_write): Likewise.
9695
9696 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9697
9698         * regformats/regdef.h (set_register_cache): Remove the
9699         declaration.
9700
9701 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9702
9703         * frame.c (frame_unwind_register_signed): Use
9704         frame_unwind_register_value.
9705
9706 2017-06-06  Pedro Alves  <palves@redhat.com>
9707
9708         PR breakpoints/21553
9709         * breakpoint.c (create_breakpoints_sal_default)
9710         (init_breakpoint_sal, create_breakpoint_sal): Use
9711         gdb::unique_xmalloc_ptr for string parameters.
9712         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9713         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9714         (base_breakpoint_create_breakpoints_sal)
9715         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9716         (strace_marker_create_breakpoints_sal)
9717         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9718         string parameters.
9719         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9720         gdb::unique_xmalloc_ptr for string parameters.
9721         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9722         parameters.
9723
9724 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9725
9726         * alpha-tdep.c (alpha_register_to_value): Use
9727         get_frame_register_value.
9728         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9729
9730 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9731
9732         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9733         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9734         (ia64_value_to_register): Likewise.
9735         (ia64_extract_return_value): Likewise.
9736         (ia64_store_return_value): Likewise.
9737         (ia64_push_dummy_call): Likewise.
9738
9739 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9740
9741         GDB 8.0 released.
9742
9743 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9744
9745         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9746
9747 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9748
9749         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9750         parameter.
9751         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9752
9753 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9754
9755         * event-loop.c (poll_timers): Unallocate timer using delete
9756         instead of xfree.
9757
9758 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9759
9760         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9761         (struct breakpoint) <~breakpoint>: New.
9762         (struct watchpoint): Inherit from breakpoint.
9763         <~watchpoint>: New.
9764         <base>: Remove.
9765         (struct tracepoint): Inherit from breakpoint.
9766         <base>: Remove.
9767         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9768         (struct longjmp_breakpoint): Inherit from breakpoint.
9769         <~longjmp_breakpoint>: New.
9770         <base>: Remove.
9771         (new_breakpoint_from_type): Remove casts.
9772         (watchpoint_in_thread_scope): Remove reference to base field.
9773         (watchpoint_del_at_next_stop): Likewise.
9774         (update_watchpoint): Likewise.
9775         (watchpoint_check): Likewise.
9776         (bpstat_check_watchpoint): Likewise.
9777         (set_longjmp_breakpoint): Likewise.
9778         (struct fork_catchpoint): Inherit from breakpoint.
9779         <base>: Remove.
9780         (struct solib_catchpoint): Inherit from breakpoint.
9781         <~solib_catchpoint>: New.
9782         <base>: Remove.
9783         (dtor_catch_solib): Change to ...
9784         (solib_catchpoint::~solib_catchpoint): ... this.
9785         (breakpoint_hit_catch_solib): Remove reference to base field.
9786         (add_solib_catchpoint): Likewise.
9787         (create_fork_vfork_event_catchpoint): Likewise.
9788         (struct exec_catchpoint): Inherit from breakpoint.
9789         <~exec_catchpoint>: New.
9790         <base>: Remove.
9791         (dtor_catch_exec): Change to ...
9792         (exec_catchpoint::~exec_catchpoint): ... this.
9793         (dtor_watchpoint): Change to ...
9794         (watchpoint::~watchpoint): ... this.
9795         (watch_command_1): Remove reference to base field.
9796         (catch_exec_command_1): Likewise.
9797         (base_breakpoint_dtor): Change to ...
9798         (breakpoint::~breakpoint): ... this.
9799         (base_breakpoint_ops): Remove dtor field value.
9800         (longjmp_bkpt_dtor): Change to ...
9801         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9802         (strace_marker_create_breakpoints_sal): Remove reference to base
9803         field.
9804         (delete_breakpoint): Don't manually call breakpoint destructor.
9805         (create_tracepoint_from_upload): Remove reference to base field.
9806         (trace_pass_set_count): Likewise.
9807         (initialize_breakpoint_ops): Don't initialize
9808         momentary_breakpoint_ops, don't set dtors.
9809         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9810         <~ada_catchpoint>: New.
9811         <base>: Remove.
9812         (create_excep_cond_exprs): Remove reference to base field.
9813         (dtor_exception): Change to ...
9814         (ada_catchpoint::~ada_catchpoint): ... this.
9815         (dtor_catch_exception): Remove.
9816         (dtor_catch_exception_unhandled): Remove.
9817         (dtor_catch_assert): Remove.
9818         (create_ada_exception_catchpoint): Remove reference to base
9819         field.
9820         (initialize_ada_catchpoint_ops): Don't set dtors.
9821         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9822         breakpoint.
9823         <~signal_catchpoint>: New.
9824         <base>: Remove.
9825         (signal_catchpoint_dtor): Change to ...
9826         (signal_catchpoint::~signal_catchpoint): ... this.
9827         (create_signal_catchpoint): Remove reference to base field.
9828         (initialize_signal_catchpoint_ops): Don't set dtor.
9829         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9830         from breakpoint.
9831         <~syscall_catchpoint>: New.
9832         <base>: Remove.
9833         (dtor_catch_syscall): Change to ...
9834         (syscall_catchpoint::~syscall_catchpoint): ... this.
9835         (create_syscall_event_catchpoint): Remove reference to base
9836         field.
9837         (initialize_syscall_catchpoint_ops): Don't set dtor.
9838         * break-catch-throw.c (struct exception_catchpoint): Inherit
9839         from breakpoint.
9840         <~exception_catchpoint>: New.
9841         <base>: Remove.
9842         (dtor_exception_catchpoint): Change to ...
9843         (exception_catchpoint::~exception_catchpoint): ... this.
9844         (handle_gnu_v3_exceptions): Remove reference to base field.
9845         (initialize_throw_catchpoint_ops): Don't set dtor.
9846         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9847         field.
9848         * remote.c (remote_get_tracepoint_status): Likewise.
9849         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9850         * tracefile.c (tracefile_fetch_registers): Likewise.
9851         * tracepoint.c (actions_command): Likewise.
9852         (validate_actionline): Likewise.
9853         (tfind_1): Likewise.
9854         (get_traceframe_location): Likewise.
9855         (find_matching_tracepoint_location): Likewise.
9856         (parse_tracepoint_status): Likewise.
9857         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9858
9859 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9860
9861         * breakpoint.c (struct longjmp_breakpoint): New struct.
9862         (is_tracepoint_type): Change return type to bool.
9863         (is_longjmp_type): New function.
9864         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9865         (set_raw_breakpoint_without_location): Use
9866         new_breakpoint_from_type.
9867         (set_raw_breakpoint): Likewise.
9868
9869 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9870
9871         * breakpoint.c (new_breakpoint_from_type): New function.
9872         (create_breakpoint_sal): Use new_breakpoint_from_type and
9873         unique_ptr.
9874         (create_breakpoint): Likewise.
9875
9876 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9877
9878         * memattr.c (mem_info_command): Rename to ...
9879         (info_mem_command): ... this.
9880         (mem_enable_command): Rename to ...
9881         (enable_mem_command): ... this.
9882         (mem_disable_command): Rename to ...
9883         (disable_mem_command): ... this.
9884         (mem_delete_command): Rename to ...
9885         (delete_mem_command): ... this.
9886         (_initialize_mem): Adjust function names.
9887
9888 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9889
9890         * btrace.c (handle_pt_insn_events): New.
9891         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9892         STATUS.  Split into this and ...
9893         (handle_pt_insn_event_flags): ... this.
9894
9895 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9896
9897         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9898         and struct pt_insn.resynced.
9899         * configure: Regenerated.
9900         * config.in: Regenerated.
9901
9902 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9903
9904         * btrace.c (ftrace_find_call_by_number): New function.
9905         (ftrace_new_function): Store objects, not pointers.
9906         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9907         ftrace_new_gap, ftrace_update_function,
9908         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9909         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9910         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9911         btrace_ends_with_single_insn, btrace_call_get): Account for
9912         btrace_thread_info::functions now storing objects.
9913         * btrace.h (struct btrace_thread_info): Add constructor.
9914         (struct btrace_thread_info) <functions>: Make std::vector.
9915         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9916         Initialize with default values.
9917         * record-btrace.c (record_btrace_frame_sniffer): Account for
9918         btrace_thread_info::functions now storing objects.
9919
9920 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9921
9922         * btrace.c: Remove typedef bfun_s.
9923         (ftrace_new_gap): Directly add gaps to the list of gaps.
9924         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9925         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9926         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9927         instead of gdb VEC.
9928
9929 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9930
9931         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9932         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9933         with btrace_thread_info::next_segment and
9934         btrace_thread_info::prev_segment.
9935         * btrace.h: Remove struct btrace_func_link.
9936         (struct btrace_function): Replace pair of function segment pointers
9937         with pair of indices.
9938         * python/py-record-btrace.c (btpy_call_prev_sibling,
9939         btpy_call_next_sibling): Replace references to
9940         btrace_thread_info::segment with btrace_thread_info::next_segment and
9941         btrace_thread_info::prev_segment.
9942         * record-btrace.c (record_btrace_frame_this_id): Use
9943         btrace_find_call_by_number.
9944
9945 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9946
9947         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9948         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9949         btrace_insn_next, btrace_insn_prev): Remove references to
9950         btrace_thread_info::flow.
9951         * btrace.h (struct btrace_function): Remove FLOW.
9952
9953 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9954
9955         * btrace.c (ftrace_find_call_by_number): New function.
9956         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9957         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9958         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9959         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9960         index.
9961         * btrace.h (struct btrace_function): Turn UP into an index.
9962         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9963         as an index.
9964         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9965         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9966         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9967
9968 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9969
9970         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9971         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9972         ftrace_update_function, ftrace_compute_global_level_offset,
9973         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9974         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9975         btrace_insn_end, btrace_is_empty): Remove references to
9976         btrace_thread_info::begin and btrace_thread_info::end.
9977         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9978         (struct btrace_thread_info) <functions>: Adjust comment.
9979         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9980         btrace_thread_info::begin.
9981
9982 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9983
9984         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9985         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9986         ftrace_update_function): Remove arguments that implicitly were always
9987         BTINFO->END.
9988         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9989         Don't pass BTINFO->END.
9990
9991 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9992
9993         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9994         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9995         btrace_find_insn_by_number): Replace function segment pointer with
9996         index.
9997         (btrace_insn_cmp): Simplify.
9998         * btrace.h: (struct btrace_insn_iterator) Rename index to
9999         insn_index.  Replace function segment pointer with index into function
10000         segment vector.
10001         * record-btrace.c (record_btrace_call_history): Replace function
10002         segment pointer use with index.
10003         (record_btrace_frame_sniffer): Retrieve function call segment through
10004         vector.
10005         (record_btrace_set_replay): Remove defunc't safety check.
10006
10007 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10008
10009         * btrace.c (btrace_ends_with_single_insn): New function.
10010         (btrace_call_get, btrace_call_number, btrace_call_begin,
10011         btrace_call_end, btrace_call_next, btrace_call_prev,
10012         btrace_find_call_by_number): Use index into call segment vector
10013         instead of pointer.
10014         (btrace_call_cmp): Simplify.
10015         * btrace.h (struct btrace_call_iterator): Replace function call segment
10016         pointer with index into vector.
10017         * record-btrace.c (record_btrace_call_history): Use index instead of
10018         pointer.
10019
10020 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10021
10022         * btrace.c (btrace_insn_begin, btrace_insn_end,
10023         btrace_find_insn_by_number): Add btinfo to iterator.
10024         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10025
10026 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10027
10028         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10029         and save pointers directly.
10030         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10031         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10032         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10033         changed signature of functions.
10034         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10035         (btrace_fetch): Remove code that adds btrace_function pointers to
10036         vector of btrace_functions.
10037         (btrace_clear): Simplify freeing vector of btrace_functions.
10038
10039 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10040
10041         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10042         Replace VEC_* with std::vector functions.
10043         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10044         (struct btrace_thread_info)<functions>: Change type to std::vector.
10045
10046 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10047
10048         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10049         "Removed targets and native configurations" up.  Merge duplicate
10050         "New commands" sub-sections.  Add "New options" sub-sections.
10051
10052 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10053
10054         * defs.h (copy_integer_to_size): New declaration.
10055         * findvar.c (copy_integer_to_size): New function.
10056         (do_cint_test): New selftest function.
10057         (copy_integer_to_size_test): Likewise.
10058         (_initialize_findvar): Likewise.
10059         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10060         (mips_fbsd_collect_reg): Use raw_collect_integer.
10061         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10062         (mips64_fill_gregset): Use raw_collect_integer
10063         (mips64_fill_fpregset): Use raw_supply_integer.
10064         * regcache.c (regcache::raw_supply_integer): New function.
10065         (regcache::raw_collect_integer): Likewise.
10066         * regcache.h: (regcache::raw_supply_integer): New declaration.
10067         (regcache::raw_collect_integer): Likewise.
10068
10069 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10070
10071         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10072         (COMMON_OBS): Add gdbarch-selftests.o.
10073         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10074         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10075         * gdbarch-selftests.c: New file.
10076         * regcache.h (regcache) <~regcache>: Mark it virtual if
10077         GDB_SELF_TEST.
10078         <raw_write>: Likewise.
10079
10080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10081
10082         * regcache.c (current_regcache): Change it to
10083         regcache::current_regcache.
10084         (regcache_observer_target_changed): Update.
10085         (regcache_thread_ptid_changed): Make it a regcache static
10086         method.
10087         (regcache_thread_ptid_changed): Update.
10088         (class regcache_access): New.
10089         (current_regcache_test): Update.
10090         (_initialize_regcache): Update.
10091         * regcache.h: Include forward_list.
10092         (regcache): Declare regcache_thread_ptid_changed and declare
10093         registers_changed_ptid as friend.
10094
10095 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10096
10097         * i387-tdep.c (i387_register_to_value): Use register_size
10098         instead of TYPE_LENGTH.
10099         * m68k-tdep.c (m68k_register_to_value): Likewise.
10100
10101 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10102
10103         * i387-tdep.c (i387_convert_register_p): Return false if type
10104         code isn't TYPE_CODE_FLT.
10105
10106 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10107
10108         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10109         length is 4.
10110         (alpha_register_to_value): Remove type length check.
10111         (alpha_value_to_register): Likewise.
10112
10113 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10114
10115         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10116         TYPE_CODE_FLT.
10117
10118 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10119
10120         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10121         TYPE_CODE_FLT or not.
10122
10123 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10124
10125         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10126         * avr-tdep.c (avr_gdbarch_init): Likewise.
10127         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10128         * cris-tdep.c (cris_gdbarch_init): Likewise.
10129         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10130         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10131         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10132         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10133         * mep-tdep.c (mep_gdbarch_init): Likewise.
10134         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10135         * mips-tdep.c (mips_gdbarch_init): Likewise.
10136         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10137         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10138         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10139         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10140         * v850-tdep.c (v850_gdbarch_init): Likewise.
10141
10142 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10143
10144         * selftest-arch.c (tests_with_arch): Call registers_changed
10145         and reinit_frame_cache.
10146         * selftest.c (run_self_tests): Likewise.
10147
10148 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10149
10150         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10151         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10152
10153 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10154
10155         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10156         set_gdbarch_print_insn.
10157
10158 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10159
10160         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10161         set_gdbarch_print_insn.
10162
10163 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10164
10165         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10166         set_gdbarch_print_insn.
10167         * arc-tdep.c (arc_gdbarch_init): Likewise.
10168         * arch-utils.c: include dis-asm.h.
10169         (default_print_insn): New function.
10170         * arch-utils.h (default_print_insn): Declare.
10171         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10172         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10173         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10174         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10175         * frv-tdep.c (frv_gdbarch_init): Likewise.
10176         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10177         * gdbarch.sh (print_insn): Use default_print_insn.
10178         * gdbarch.c: Regenerated.
10179         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10180         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10181         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10182         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10183         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10184         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10185         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10186         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10187         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10188         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10189         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10190         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10191         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10192         * mt-tdep.c (mt_gdbarch_init): Likewise.
10193         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10194         * nios2-tdep.c (nios2_print_insn): Remove.
10195         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10196         * rx-tdep.c (rx_gdbarch_init): Likewise.
10197         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10198         * score-tdep.c (score_print_insn): Remove.
10199         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10200         * sh-tdep.c (sh_gdbarch_init): Likewise.
10201         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10202         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10203         * tic6x-tdep.c (tic6x_print_insn): Remove.
10204         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10205         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10206         * v850-tdep.c (v850_gdbarch_init): Likewise.
10207         * vax-tdep.c (vax_gdbarch_init): Likewise.
10208         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10209         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10210
10211 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10212
10213         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10214         (MIPS_FP0_REGNUM): Remove.
10215         (MIPS_FSR_REGNUM): Remove.
10216         (mips_fbsd_supply_fpregs): Use mips_regnum.
10217         (mips_fbsd_supply_gregs): Likewise.
10218         (mips_fbsd_collect_fpregs): Likewise.
10219         (mips_fbsd_collect_gregs): Likewise.
10220
10221 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10222
10223         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10224         (getpfpregs_supplies): New function.
10225         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10226         getfpregs_supplies.
10227         (mips_fbsd_store_inferior_registers): Likewise.
10228
10229 2017-05-22  Pedro Alves <palves@redhat.com>
10230
10231         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10232         maintainer.
10233
10234 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10235
10236         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10237         (store_register): Likewise.
10238         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10239         (get_decimal_float_return_value): Likewise.
10240         (do_ppc_sysv_return_value): Likewise.
10241         (ppc64_sysv_abi_push_integer): Likewise.
10242         (ppc64_sysv_abi_push_freg): Likewise.
10243         (ppc64_sysv_abi_return_value_base): Likewise.
10244         (ppc64_sysv_abi_return_value): Likewise.
10245         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10246         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10247         * rs6000-nat.c: Likewise.
10248         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10249         (rs6000_value_to_register): Likewise.
10250         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10251
10252 2017-05-21  Tom Tromey  <tom@tromey.com>
10253
10254         PR rust/21466:
10255         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10256         arrays as "[T]", not "[T; ]".
10257
10258 2017-05-19  Tom Tromey  <tom@tromey.com>
10259
10260         PR rust/21484:
10261         * rust-lang.c (exp_descriptor_rust): New function.
10262         (rust_language_defn): Use it.
10263         * p-lang.c (pascal_language_defn): Update.
10264         * opencl-lang.c (opencl_language_defn): Update.
10265         * objc-lang.c (objc_language_defn): Update.
10266         * m2-lang.c (m2_language_defn): Update.
10267         * language.h (struct language_defn)
10268         <la_watch_location_expression>: New member.
10269         * language.c (unknown_language_defn, auto_language_defn)
10270         (local_language_defn): Update.
10271         * go-lang.c (go_language_defn): Update.
10272         * f-lang.c (f_language_defn): Update.
10273         * d-lang.c (d_language_defn): Update.
10274         * c-lang.h (c_watch_location_expression): Declare.
10275         * c-lang.c (c_watch_location_expression): New function.
10276         (c_language_defn, cplus_language_defn, asm_language_defn)
10277         (minimal_language_defn): Use it.
10278         * breakpoint.c (watch_command_1): Call
10279         la_watch_location_expression.
10280         * ada-lang.c (ada_language_defn): Update.
10281
10282 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10283
10284         PR tui/21482
10285         * gdb_curses.h (NOMACROS): Define.
10286         (NCURSES_NOMACROS): Define.
10287
10288 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10289
10290         PR tui/21482
10291         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10292         arg to char *.
10293         * tui/tui-wingeneral.c (box_win): Likewise.
10294         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10295         (tui_show_source_line): Likewise.
10296         (tui_show_exec_info_content): Likewise.
10297
10298 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10299
10300         * sparc-tdep.c (sparc_structure_return_p)
10301         (sparc_arg_on_registers_p): New functions.
10302         (sparc32_store_arguments): Use them.
10303         * sparc64-tdep.c (sparc64_16_byte_align_p)
10304         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10305         Handle TYPE_CODE_ARRAY.
10306
10307 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10308
10309         * cli/cli-decode.c (add_alias_cmd): New function.
10310         * command.h (add_alias_cmd): Declare.
10311         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10312         instead call add_alias_cmd.
10313
10314 2017-05-17  Pedro Alves  <palves@redhat.com>
10315
10316         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10317         (nat_makefile_frag): ... this.  All references updated.
10318         * configure.ac: Likewise.
10319         * configure.nat: Likewise.  Enhance comments.
10320         * configure: Regenerate.
10321
10322 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10323
10324         * procfs.c (procfs_create_inferior): Change prototype to match
10325         definition.
10326
10327 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10328
10329         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10330         C++ compiler warning.
10331
10332 2017-05-12  Tom Tromey  <tom@tromey.com>
10333
10334         PR rust/21483:
10335         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10336         recurse, just call value_struct_elt directly.
10337
10338 2017-05-12  Tom Tromey  <tom@tromey.com>
10339
10340         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10341         OP_RUST_ARRAY>: Fix.
10342
10343 2017-05-12  Tom Tromey  <tom@tromey.com>
10344
10345         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10346
10347 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10348
10349         * regcache.c: Include <forward_list>.
10350         (struct regcache_list): Remove.
10351         (current_regcache): Update.
10352         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10353         (regcache_thread_ptid_changed): Likewise.
10354         (registers_changed_ptid): Likewise.
10355         (current_regcache_size): Likewise.
10356
10357 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10358
10359         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10360         (current_regcache_size): New function.
10361         (current_regcache_test): New function.
10362         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10363
10364 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10365
10366         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10367         (print_gp_register_row): Use get_frame_register_value.
10368
10369 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10370
10371         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10372         (mips_supply_fpregset): Likewise.
10373         (mips64_supply_gregset): Likewise.
10374
10375 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10376
10377         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10378         regcache->raw_supply_zeroed.
10379
10380 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10381
10382         * configure.nat: Rearrange 'case' statements to match
10383         host before cpu.
10384
10385 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10386
10387         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10388         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10389         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10390         "@nat_extra_makefile_frag@".
10391         (Makefile): Remove dependency on "@frags@".
10392         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10393         (data-directory/Makefile): Likewise.
10394         * config/aarch64/linux.mh: Deleted; moved contents to
10395         "gdb/configure.nat".
10396         * config/alpha/alpha-linux.mh: Likewise.
10397         * config/alpha/nbsd.mh: Likewise.
10398         * config/arm/linux.mh: Likewise.
10399         * config/arm/nbsdelf.mh: Likewise.
10400         * config/i386/cygwin.mh: Likewise.
10401         * config/i386/cygwin64.mh: Likewise.
10402         * config/i386/darwin.mh: Likewise.
10403         * config/i386/fbsd.mh: Likewise.
10404         * config/i386/fbsd64.mh: Likewise.
10405         * config/i386/go32.mh: Likewise.
10406         * config/i386/i386gnu.mh: Likewise.
10407         * config/i386/i386sol2.mh: Likewise.
10408         * config/i386/linux.mh: Likewise.
10409         * config/i386/linux64.mh: Likewise.
10410         * config/i386/mingw.mh: Likewise.
10411         * config/i386/mingw64.mh: Likewise.
10412         * config/i386/nbsd64.mh: Likewise.
10413         * config/i386/nbsdelf.mh: Likewise.
10414         * config/i386/nto.mh: Likewise.
10415         * config/i386/obsd.mh: Likewise.
10416         * config/i386/obsd64.mh: Likewise.
10417         * config/i386/sol2-64.mh: Likewise.
10418         * config/ia64/linux.mh: Likewise.
10419         * config/m32r/linux.mh: Likewise.
10420         * config/m68k/linux.mh: Likewise.
10421         * config/m68k/nbsdelf.mh: Likewise.
10422         * config/m68k/obsd.mh: Likewise.
10423         * config/m88k/obsd.mh: Likewise.
10424         * config/mips/fbsd.mh: Likewise.
10425         * config/mips/linux.mh: Likewise.
10426         * config/mips/nbsd.mh: Likewise.
10427         * config/mips/obsd64.mh: Likewise.
10428         * config/pa/linux.mh: Likewise.
10429         * config/pa/nbsd.mh: Likewise.
10430         * config/pa/obsd.mh: Likewise.
10431         * config/powerpc/aix.mh: Likewise.
10432         * config/powerpc/fbsd.mh: Likewise.
10433         * config/powerpc/linux.mh: Likewise.
10434         * config/powerpc/nbsd.mh: Likewise.
10435         * config/powerpc/obsd.mh: Likewise.
10436         * config/powerpc/ppc64-linux.mh: Likewise.
10437         * config/powerpc/spu-linux.mh: Likewise.
10438         * config/s390/linux.mh: Likewise.
10439         * config/sh/nbsd.mh: Likewise.
10440         * config/sparc/fbsd.mh: Likewise.
10441         * config/sparc/linux.mh: Likewise.
10442         * config/sparc/linux64.mh: Likewise.
10443         * config/sparc/nbsd64.mh: Likewise.
10444         * config/sparc/nbsdelf.mh: Likewise.
10445         * config/sparc/obsd64.mh: Likewise.
10446         * config/sparc/sol2.mh: Likewise.
10447         * config/tilegx/linux.mh: Likewise.
10448         * config/vax/nbsdelf.mh: Likewise.
10449         * config/vax/obsd.mh: Likewise.
10450         * config/xtensa/linux.mh: Likewise.
10451         * config/i386/i386gnu.mn: New file, with excerpts from
10452         "config/i386/i386gnu.mh".
10453         * configure: Regenerate.
10454         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10455         *.mh files under "gdb/config".
10456         * configure.nat: New file, with contents from the
10457         "gdb/config/*/*.mh" files.
10458
10459 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10460
10461         * btrace.c (btrace_clear): Free insn vector.
10462
10463 2017-05-05  Pedro Alves  <palves@redhat.com>
10464
10465         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10466         * configure: Regenerate.
10467
10468 2017-05-04  Pedro Alves  <palves@redhat.com>
10469
10470         * Makefile.in (SFILES): Add progspace-and-thread.c.
10471         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10472         (COMMON_OBS): Add progspace-and-thread.o.
10473         * breakpoint.c: Include "progspace-and-thread.h".
10474         (update_inserted_breakpoint_locations)
10475         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10476         Use scoped_restore_current_pspace_and_thread.
10477         (create_std_terminate_master_breakpoint): Use
10478         scoped_restore_current_program_space.
10479         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10480         (print_breakpoint_location): Use
10481         scoped_restore_current_program_space.
10482         (bp_loc_is_permanent): Use
10483         scoped_restore_current_pspace_and_thread.
10484         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10485         (download_tracepoint_locations): Use
10486         scoped_restore_current_pspace_and_thread.
10487         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10488         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10489         (enum step_over_calls_kind): Moved from inferior.h.
10490         (class scoped_restore_current_thread): New class.
10491         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10492         declaration.
10493         (scoped_restore_current_thread): New class.
10494         * infcmd.c: Include "common/gdb_optional.h".
10495         (continue_1, proceed_after_attach): Use
10496         scoped_restore_current_thread.
10497         (notice_new_inferior): Use scoped_restore_current_thread.
10498         * inferior.c: Include "progspace-and-thread.h".
10499         (restore_inferior, save_current_inferior): Delete.
10500         (add_inferior_command, clone_inferior_command): Use
10501         scoped_restore_current_pspace_and_thread.
10502         * inferior.h (scoped_restore_current_inferior): New class.
10503         * infrun.c: Include "progspace-and-thread.h" and
10504         "common/gdb_optional.h".
10505         (follow_fork_inferior): Use
10506         scoped_restore_current_pspace_and_thread.
10507         (scoped_restore_exited_inferior): New class.
10508         (handle_vfork_child_exec_or_exit): Use
10509         scoped_restore_exited_inferior,
10510         scoped_restore_current_pspace_and_thread,
10511         scoped_restore_current_thread and scoped_restore.
10512         (fetch_inferior_event): Use scoped_restore_current_thread.
10513         * linespec.c (decode_line_full, decode_line_1): Use
10514         scoped_restore_current_program_space.
10515         * mi/mi-main.c: Include "progspace-and-thread.h".
10516         (exec_continue): Use scoped_restore_current_thread.
10517         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10518         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10519         * proc-service.c (ps_pglobal_lookup): Use
10520         scoped_restore_current_program_space.
10521         * progspace-and-thread.c: New file.
10522         * progspace-and-thread.h: New file.
10523         * progspace.c (release_program_space, clone_program_space): Use
10524         scoped_restore_current_program_space.
10525         (restore_program_space, save_current_program_space)
10526         (save_current_space_and_thread): Delete.
10527         (switch_to_program_space_and_thread): Moved to
10528         progspace-and-thread.c.
10529         * progspace.h (save_current_program_space)
10530         (save_current_space_and_thread): Delete declarations.
10531         (scoped_restore_current_program_space): New class.
10532         * remote.c (remote_btrace_maybe_reopen): Use
10533         scoped_restore_current_thread.
10534         * symtab.c: Include "progspace-and-thread.h".
10535         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10536         * thread.c (print_thread_info_1): Use
10537         scoped_restore_current_thread.
10538         (struct current_thread_cleanup): Delete.
10539         (do_restore_current_thread_cleanup)
10540         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10541         (scoped_restore_current_thread::~scoped_restore_current_thread):
10542         ... this new dtor.
10543         (make_cleanup_restore_current_thread): Rename/convert to ...
10544         (scoped_restore_current_thread::scoped_restore_current_thread):
10545         ... this new ctor.
10546         (thread_apply_all_command): Use scoped_restore_current_thread.
10547         (thread_apply_command): Use scoped_restore_current_thread.
10548         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10549         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10550
10551 2017-05-04  Pedro Alves  <palves@redhat.com>
10552
10553         * thread.c (make_cleanup_restore_current_thread): Move
10554         find_thread_ptid call before the is_stopped call.  Assert that the
10555         thread is found.  Replace is_stopped call by checking the thread's
10556         state directly.  Remove unnecessary NULL-thread check.
10557
10558 2017-05-04  Pedro Alves  <palves@redhat.com>
10559
10560         * corelow.c (thread_section_name): New class.
10561         (get_core_register_section, get_core_siginfo): Use it.
10562
10563 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10564
10565         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10566         (get_core_register_section): Remove xfree of NULL pointer.
10567
10568 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10569
10570         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10571         * regcache.c (regcache::raw_supply_zeroed): New function.
10572         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10573
10574 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10575
10576         * gdbarch.sh: Remove commented out definition of
10577         TARGET_CHAR_BIT.
10578         * gdbarch.h: Re-generate.
10579
10580 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10581
10582         * configure: Regenerate.
10583
10584 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10585
10586         * solib-target.c (solib_target_relocate_section_addresses):
10587         Remove num_section_bases, num_bases, segment_bases variables.
10588
10589 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10590
10591         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10592
10593 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10594
10595         * solib-target.c: Include <vector>
10596         (struct lm_info_target) <~lm_info_target>: Remove.
10597         <segment_bases, section_bases>: Change type to
10598         std::vector<CORE_ADDR>.
10599         (library_list_start_segment, library_list_start_section,
10600         library_list_end_library,
10601         solib_target_relocate_section_addresses): Adjust.
10602
10603 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10604
10605         * gdbarch.sh (software_single_step): Change return type to
10606         std::vector<CORE_ADDR>.
10607         * gdbarch.c, gdbarch.h: Re-generate.
10608         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10609         Adjust.
10610         (arm_deal_with_atomic_sequence_raw): Adjust.
10611         (thumb_get_next_pcs_raw): Adjust.
10612         (arm_get_next_pcs_raw): Adjust.
10613         (arm_get_next_pcs): Adjust.
10614         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10615         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10616         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10617         (alpha_software_single_step): Adjust.
10618         * alpha-tdep.h (alpha_software_single_step): Adjust.
10619         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10620         * arm-tdep.c (arm_software_single_step): Adjust.
10621         (arm_breakpoint_kind_from_current_state): Adjust.
10622         * arm-tdep.h (arm_software_single_step): Adjust.
10623         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10624         * cris-tdep.c (cris_software_single_step): Adjust.
10625         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10626         (micromips_deal_with_atomic_sequence): Adjust.
10627         (deal_with_atomic_sequence): Adjust.
10628         (mips_software_single_step): Adjust.
10629         * mips-tdep.h (mips_software_single_step): Adjust.
10630         * moxie-tdep.c (moxie_software_single_step): Adjust.
10631         * nios2-tdep.c (nios2_software_single_step): Adjust.
10632         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10633         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10634         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10635         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10636         * sparc-tdep.c (sparc_software_single_step): Adjust.
10637         * spu-tdep.c (spu_software_single_step): Adjust.
10638         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10639
10640 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10641
10642         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10643         * gdbarch.h: Re-generate.
10644
10645 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10646
10647         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10648         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10649         * python/py-instruction.c, python/py-instruction.h: New file.
10650         * python/py-record.c: Add py-instruction.h include.
10651         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10652         gdb.RecordInstruction.
10653         * python/python-internal.h: Add gdbpy_initialize_instruction
10654         declaration.
10655         * python/python.c (do_start_initialization): Add
10656         gdbpy_initialize_instruction.
10657
10658 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10659
10660         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10661         Remove.
10662         (btrace_func_from_recpy_func): New function.
10663         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10664         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10665         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10666         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10667         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10668         Also, use new helper functions.
10669         (btpy_list_item): Use new helper functions.
10670         (recpy_bt_function_call_history): Use new type name.
10671         (btpy_call_getset): Remove.
10672         (gdbpy_initialize_btrace): Remove code to initialize
10673         gdb.BtraceFunctionCall.
10674         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10675         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10676         recpy_bt_func_prev, recpy_bt_func_next): New export.
10677         * python/py-record.c (recpy_func_type): New static object.
10678         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10679         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10680         recpy_func_next): New function.
10681         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10682         (recpy_func_getset): New static object.
10683         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10684         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10685
10686 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10687
10688         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10689         (btpy_object, btpy_insn_type, btpy_new): Remove.
10690         (btpy_list_object): Use gdb.RecordInstruction type instead of
10691         gdb.BtraceInstruction type.
10692         (btrace_insn_from_recpy_insn): New function.
10693         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10694         btpy_new.
10695         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10696         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10697         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10698         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10699         instead of btpy_object.
10700         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10701         btpy_insn_data, btpy_insn_decode): Rename to ...
10702         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10703         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10704         recpy_bt_insn_decode): This.  Also, use new helper functions.
10705         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10706         recpy_insn_type.
10707         (btpy_insn_getset): Remove.
10708         (gdbpy_initialize_btrace): Remove code to initialize
10709         gdb.BtraceInstruction.  Use recpy_element_object.
10710         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10711         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10712         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10713         * python/py-record.c (recpy_insn_type): New static object.
10714         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10715         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10716         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10717         New function.
10718         (recpy_insn_getset): New static object.
10719         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10720         * python/py-record.h (recpy_element_object): New typedef.
10721         (recpy_insn_type, recpy_insn_new): New export.
10722
10723 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10724
10725         * py-record-btrace.c (btpy_insn_new): Removed.
10726         (btpy_insn_or_gap_new): New function.
10727         (btpy_insn_error): Removed.
10728         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10729         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10730         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10731         btpy_insn_or_gap_new instead of btpy_insn_new.
10732         (btpy_insn_getset): Remove btpy_insn_error.
10733         * py-record.c (recpy_gap_type): New static object.
10734         (recpy_gap_object): New typedef.
10735         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10736         recpy_gap_reason_string): New function.
10737         (recpy_gap_getset): New static object.
10738         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10739         * py-record.h (recpy_gap_new): New export.
10740
10741 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10742
10743         * python/py-record.c (recpy_ptid): Remove.
10744         (recpy_record_getset): Remove recpy_ptid.
10745
10746 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10747
10748         * btrace.c (btrace_fetch): Set inferior_ptid.
10749         * python/py-record-btrace.c: Add "py-record.h" include.
10750         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10751         recpy_bt_end, recpy_bt_instruction_history,
10752         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10753         in gdb.Record object instead of current ptid.
10754         * python/py-record.c: Include new "py-record.h" file.
10755         (recpy_record_object): Moved to py-record.h.
10756         * python/py-record.h: New file.
10757
10758 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10759
10760         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10761         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10762         indentation.
10763
10764 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10765
10766         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10767         the past maintainers section.
10768
10769 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10770
10771         * infcmd.c (get_return_value): Use regcache ctor, and remove
10772         cleanup.
10773
10774 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10775             Pedro Alves  <palves@redhat.com>
10776
10777         * regcache.c (regcache::regcache): New tag dispatch ctor.
10778         (do_cooked_read): Moved above.
10779         (regcache_dup): Use the tag dispatch ctor..
10780         * regcache.h (regcache): Declare ctor, delete copy ctor and
10781         assignment operator, remove friend regcache_dup.
10782
10783 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10784
10785         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10786         call method save instead of regcache_cpy.
10787         * regcache.h (struct regcache): Make regcache_dup a friend.
10788
10789 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10790
10791         * regcache.c (struct regcache): Move to regcache.h
10792         (regcache::arch): New method.
10793         (regcache_get_ptid): Update.
10794         (get_regcache_arch): Call arch method.
10795         (get_regcache_aspace): Call method aspace.
10796         (register_buffer): Change it to method.
10797         (regcache_save): Change it to regcache::save.
10798         (regcache_restore): Likewise.
10799         (regcache_cpy_no_passthrough): Remove the declaration.
10800         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10801         (regcache_cpy_no_passthrough): Change it to method
10802         cpy_no_passthrough.
10803         (regcache_register_status): Change it to method
10804         get_register_status.
10805         (regcache_invalidate): Change it to method invalidate.
10806         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10807         (regcache_raw_update): Change it to method raw_update.
10808         (regcache_raw_read): Likewise.
10809         (regcache_raw_read_signed): Likewise.
10810         (regcache_raw_read_unsigned): Likewise.
10811         (regcache_raw_write_signed): Likewise.
10812         (regcache_raw_write_unsigned): Likewise.
10813         (regcache_cooked_read): Likewise.
10814         (regcache_cooked_read_value): Likewise.
10815         (regcache_cooked_read_signed): Likewise.
10816         (regcache_cooked_read_unsigned): Likewise.
10817         (regcache_cooked_write_signed): Likewise.
10818         (regcache_cooked_write_unsigned): Likewise.
10819         (regcache_raw_set_cached_value): Likewise.
10820         (regcache_raw_write): Likewise.
10821         (regcache_cooked_write): Likewise.
10822         (regcache_xfer_part): Likewise.
10823         (regcache_raw_read_part): Likewise.
10824         (regcache_raw_write_part): Likewise.
10825         (regcache_cooked_read_part): Likewise.
10826         (regcache_cooked_write_part): Likewise.
10827         (regcache_raw_supply): Likewise.
10828         (regcache_raw_collect): Likewise.
10829         (regcache_transfer_regset): Likewise.
10830         (regcache_supply_regset): Likewise.
10831         (regcache_collect_regset): Likewise.
10832         (regcache_debug_print_register): Likewise.
10833         (enum regcache_dump_what): Move it to regcache.h.
10834         (regcache_dump): Change it to method dump.
10835         * regcache.h (enum regcache_dump_what): New.
10836         (class regcache): New.
10837         * target.c (target_fetch_registers): Call method
10838         debug_print_register.
10839         (target_store_registers): Likewise.
10840
10841 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10842
10843         * windows-nat.c (struct lm_info_windows): Initialize field.
10844         (windows_make_so): Allocate lm_info_windows with new.
10845         (windows_free_so): Free lm_info_windows with delete.
10846
10847 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10848
10849         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10850         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10851         cleanup.
10852         (darwin_free_so): Free lm_info_darwin with delete.
10853
10854 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10855
10856         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10857         <l_addr_p>: Change type to bool.
10858         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10859         (svr4_free_so): Free lm_info_svr4 with delete.
10860         (svr4_copy_library_list): Replace memcpy with call to copy
10861         constructor.
10862         (library_list_start_library, svr4_default_sos): Allocate
10863         lm_info_svr4 with new.
10864
10865 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10866
10867         * solib-target.c (struct lm_info_target): Add destructor,
10868         initialize fields.
10869         <name>: Change type to std::string.
10870         (library_list_start_library): Allocate lm_info_target with new.
10871         (solib_target_free_library_list): Free lm_info_target with
10872         delete.
10873         (solib_target_current_sos): Adapt to std::string.
10874         (solib_target_free_so): Free lm_info_target with delete.
10875
10876 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10877
10878         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10879         fields.
10880         (frv_current_sos): Allocate lm_info_frv with new.
10881         (frv_relocate_main_executable): Free lm_info_frv with delete,
10882         allocate with new.
10883         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10884
10885 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10886
10887         * solib-frv.c (struct lm_info_frv): Fix indentation.
10888
10889 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10890
10891         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10892         map field.
10893         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10894         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10895         and allocate with new.
10896         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10897
10898 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10899
10900         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10901         <filename, member_name>: Change type to std::string.
10902         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10903         (library_list_start_library): Allocate lm_info_aix with new.
10904         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10905         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10906         with copy constructor.
10907
10908 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10909
10910         * solist.h (struct lm_info): Remove.
10911         (struct lm_info_base): New class.
10912         (struct so_list) <lm_info>: Change type to lm_info_base *.
10913         * nto-tdep.c (struct lm_info): Remove.
10914         (lm_addr): Adjust.
10915         * solib-aix.c (struct lm_info): Rename to ...
10916         (struct lm_info_aix): ... this.  Extend lm_info_base.
10917         (lm_info_p): Rename to ...
10918         (lm_info_aix_p): ... this, and adjust.
10919         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10920         solib_aix_parse_libraries, library_list_start_library,
10921         solib_aix_free_library_list, solib_aix_parse_libraries,
10922         solib_aix_get_library_list,
10923         solib_aix_relocate_section_addresses, solib_aix_free_so,
10924         solib_aix_get_section_offsets,
10925         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10926         Adjust.
10927         (struct solib_aix_inferior_data) <library_list>: Adjust.
10928         * solib-darwin.c (struct lm_info): Rename to ...
10929         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10930         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10931         * solib-dsbt.c (struct lm_info): Rename to ...
10932         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10933         (struct dsbt_info) <main_executable_lm_info): Adjust.
10934         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10935         dsbt_relocate_section_addresses): Adjust.
10936         * solib-frv.c (struct lm_info): Rename to ...
10937         (struct lm_info_frv): ... this.  Extend lm_info_base.
10938         (main_executable_lm_info): Adjust.
10939         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10940         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10941         find_canonical_descriptor_in_load_object,
10942         frv_fdpic_find_canonical_descriptor): Adjust.
10943         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10944         to lm_info_svr4.
10945         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10946         svr4_clear_so, svr4_copy_library_list,
10947         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10948         svr4_current_sos, svr4_fetch_objfile_link_map,
10949         solist_update_incremental): Adjust.
10950         * solib-svr4.h (struct lm_info_svr4): Move here from
10951         solib-svr4.c.
10952         * solib-target.c (struct lm_info): Rename to ...
10953         (struct lm_info_target): ... this.  Extend lm_info_base.
10954         (lm_info_p): Rename to ...
10955         (lm_info_target_p): ... this.
10956         (solib_target_parse_libraries, library_list_start_segment,
10957         library_list_start_section, library_list_start_library,
10958         library_list_end_library, solib_target_free_library_list,
10959         solib_target_current_sos, solib_target_free_so,
10960         solib_target_relocate_section_addresses): Adjust.
10961         * windows-nat.c (struct lm_info): Rename to ...
10962         (struct lm_info_windows): ... this.  Extend lm_info_base.
10963         (windows_make_so, handle_load_dll, handle_unload_dll,
10964         windows_xfer_shared_libraries): Adjust.
10965
10966 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10967
10968         * solib-darwin.c (struct darwin_so_list): Remove.
10969         (darwin_current_sos): Allocate an so_list object instead of a
10970         darwin_so_list, separately allocate an lm_info object.
10971         (darwin_free_so): Free lm_info.
10972
10973 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10974
10975         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10976         with fprintf_filtered.
10977
10978 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10979
10980         * regcache.c (regcache::regcache): New function.
10981         (regcache::~regcache): New function.
10982         (regcache_xmalloc_1): Remove.
10983         (regcache_xmalloc): Call new regcache.
10984         (regcache_xfree): Call delete regcache.
10985         (get_thread_arch_aspace_regcache): Call new regcache.
10986
10987 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10988
10989         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10990         lwp instead of ptid_get_lwp.
10991
10992 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10993
10994         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10995         lwp_info instead of getting from inferior_ptid.
10996
10997 2017-04-27  Keith Seitz  <keiths@redhat.com>
10998
10999         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11000         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11001         (CV_CONVERSION_BADNESS): Define.
11002         (rank_one_type): Remove overly restrictive rvalue reference
11003         rank checks.
11004         Add cv-qualifier checks and subranks for type equality.
11005         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11006         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11007         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11008
11009 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11010
11011         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11012         count when creating the object.
11013
11014 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11015             Ulrich Weigand  <uweigand@de.ibm.com>
11016
11017         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11018         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11019         is used in AIX.
11020         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11021         (process_xcoff_symbol): Likewise.
11022         (scan_xcoff_symtab): Likewise.
11023
11024 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11025
11026         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11027         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11028         (ia64_access_reg): Use get_frame_register_unsigned.
11029         (ia64_access_rse_reg): Likewise.
11030         (ia64_libunwind_frame_prev_register): Likewise.
11031
11032 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11033
11034         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11035         * gdbarch.c: Regenerated.
11036         * gdbarch.h: Regenerated.
11037         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11038         visibility external.
11039         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11040         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11041         (enum cfa_how_kind): Move to ...
11042         (struct dwarf2_frame_state_reg_info): Likewise.
11043         (struct dwarf2_frame_state): Likewise.
11044         * dwarf2-frame.h: ... here.
11045         (dwarf2_frame_state_alloc_regs): New declaration.
11046         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11047         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11048
11049 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11050
11051         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11052         regcache_raw_read_unsigned.
11053         (xtensa_pseudo_register_write): Likewise.
11054
11055 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11056
11057         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11058         (nds32_pseudo_register_write): Likewise.
11059
11060 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11061
11062         * regcache.c (struct regcache) <readonly_p>: Change its type
11063         to bool.
11064         (regcache_xmalloc_1): Update parameter type and callers update.
11065
11066 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11067
11068         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11069         set_gdbarch_wchar_bit.
11070         * arm-tdep.c (arm_gdbarch_init): Likewise.
11071
11072 2017-04-25  Pedro Alves  <palves@redhat.com>
11073
11074         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11075         (BothAreRelocatable, memcopy, memmove): Don't define.
11076         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11077         macros.
11078
11079 2017-04-25  Pedro Alves  <palves@redhat.com>
11080
11081         * common/common-defs.h: Include "common/poison.h".
11082         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11083         and adjust.
11084         * common/poison.h: New file.
11085         * common/traits.h: Include <type_traits>.
11086         (Not, Or, Requires): New, moved from common/function-view.h.
11087
11088 2017-04-25  Pedro Alves  <palves@redhat.com>
11089
11090         * breakpoint.h (struct breakpoint): In-class initialize all
11091         fields.  Make boolean fields "bool".
11092         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11093         memset call and initializations no longer necessary.
11094
11095 2017-04-25  Pedro Alves  <palves@redhat.com>
11096
11097         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11098         reference.
11099         (pt_btrace_insn): New function.
11100         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11101
11102 2017-04-25  Pedro Alves  <palves@redhat.com>
11103
11104         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11105         "base" field and inherit from "bp_location" instead.  Add
11106         non-default ctor.
11107         (allocate_location_exception): Use new non-default ctor.
11108         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11109         (init_bp_location): Convert to ...
11110         (bp_location::bp_location): ... this new ctor, and remove memset
11111         call.
11112         (base_breakpoint_allocate_location): Use the new non-default ctor.
11113         * breakpoint.h (bp_location): Now a class.  Declare default and
11114         non-default ctors.  In-class initialize all members.
11115         (init_bp_location): Remove declaration.
11116
11117 2017-04-25  Pedro Alves  <palves@redhat.com>
11118
11119         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11120         assignment operator.
11121
11122 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11123
11124         * doublest.c (convert_doublest_to_floatformat): Call
11125         floatformat_totalsize_bytes.
11126
11127 2017-04-22  Tom Tromey  <tom@tromey.com>
11128
11129         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11130         ui_out_emit_list.
11131         * stack.c (print_frame): Use ui_out_emit_list.
11132         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11133         ui_out_emit_list.
11134         * mi/mi-main.c (print_one_inferior)
11135         (mi_cmd_data_list_register_names)
11136         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11137         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11138         ui_out_emit_list.
11139         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11140         (mi_output_solib_attribs): Use ui_out_emit_list,
11141         ui_out_emit_tuple.
11142         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11143         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11144         (mi_cmd_stack_list_args, list_args_or_locals): Use
11145         ui_out_emit_list.
11146         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11147         * breakpoint.c (print_solib_event, output_thread_groups): Use
11148         ui_out_emit_list.
11149
11150 2017-04-22  Tom Tromey  <tom@tromey.com>
11151
11152         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11153         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11154         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11155
11156 2017-04-22  Tom Tromey  <tom@tromey.com>
11157
11158         * tracepoint.c (tvariables_info_1)
11159         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11160
11161 2017-04-22  Tom Tromey  <tom@tromey.com>
11162
11163         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11164         annotate_arg_emitter.
11165         * breakpoint.c (print_mention_watchpoint)
11166         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11167         * annotate.h (struct annotate_arg_emitter): New.
11168
11169 2017-04-22  Tom Tromey  <tom@tromey.com>
11170
11171         * record-btrace.c (record_btrace_insn_history)
11172         (record_btrace_insn_history_range, record_btrace_call_history)
11173         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11174         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11175         ui_out_emit_tuple.
11176         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11177         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11178         * skip.c (skip_info): Use ui_out_emit_tuple.
11179         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11180         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11181         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11182         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11183         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11184         ui_out_emit_tuple.
11185         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11186         (output_register, mi_cmd_data_read_memory)
11187         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11188         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11189         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11190         Use ui_out_emit_tuple.
11191         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11192         ui_out_emit_tuple.
11193         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11194         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11195         * linux-thread-db.c (info_auto_load_libthread_db): Use
11196         ui_out_emit_tuple.
11197         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11198         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11199         * disasm.c (do_mixed_source_and_assembly_deprecated)
11200         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11201         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11202         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11203         * breakpoint.c (print_one_breakpoint_location)
11204         (print_one_breakpoint): Use ui_out_emit_tuple.
11205         * auto-load.c (print_script, info_auto_load_cmd): Use
11206         ui_out_emit_tuple.
11207         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11208
11209 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11210
11211         * thread.c (print_thread_info_1): Remove dead code.
11212
11213 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11214
11215         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11216         GDB_SELF_TEST.
11217         * arm-tdep.c (selftests::arm_record_test): Likewise.
11218
11219 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11220
11221         * regcache.c (regcache_restore): Remove argument 2.  Replace
11222         argument 3 with regcache.  Get register status from
11223         src->register_status and get register contents from
11224         register_buffer (src, regnum).
11225         (regcache_cpy): Update.
11226
11227 2017-04-19  Pedro Alves  <palves@redhat.com>
11228
11229         * gdbthread.h (thread): Add missing closing parenthesis in
11230         comment.
11231
11232 2017-04-19  Pedro Alves  <palves@redhat.com>
11233
11234         * common/refcounted-object.h: New file.
11235         * gdbthread.h: Include "common/refcounted-object.h".
11236         (thread_info): Inherit from refcounted_object and add comments.
11237         (thread_info::incref, thread_info::decref)
11238         (thread_info::m_refcount): Delete.
11239         (thread_info::deletable): Use the refcounted_object::refcount()
11240         method.
11241         * inferior.c (current_inferior_): Add comment.
11242         (set_current_inferior): Increment/decrement refcounts.
11243         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11244         not-deletable instead of comparing with the current inferior.
11245         (initialize_inferiors): Increment the initial inferior's refcount.
11246         * inferior.h (struct inferior): Forward declare.
11247         Include "common/refcounted-object.h".
11248         (current_inferior, set_current_inferior): Move declaration to
11249         before struct inferior's definition, and fix comment.
11250         (inferior): Inherit from refcounted_object.  Add comments.
11251         * thread.c (switch_to_thread_no_regs): Reference the thread's
11252         inferior pointer directly instead of doing a ptid lookup.
11253         (switch_to_no_thread): New function.
11254         (switch_to_thread(thread_info *)): New function, factored out
11255         from ...
11256         (switch_to_thread(ptid_t)): ... this.
11257         (restore_current_thread): Delete.
11258         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11259         fields, and add 'inf' field.
11260         (do_restore_current_thread_cleanup): Check whether old->inf is
11261         alive instead of looking up an inferior by ptid.  Use
11262         switch_to_thread and switch_to_no_thread.
11263         (restore_current_thread_cleanup_dtor): Use old->inf directly
11264         instead of lookup up an inferior by id.  Decref the inferior.
11265         Don't restore 'removable'.
11266         (make_cleanup_restore_current_thread): Same the inferior pointer
11267         in old, instead of the inferior number.  Incref the inferior.
11268         Don't save/clear 'removable'.
11269
11270 2017-04-19  Pedro Alves  <palves@redhat.com>
11271
11272         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11273         unittests/scoped_restore-selftests.c.
11274         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11275         * common/scoped_restore.h (scoped_restore_base): Make "class".
11276         (scoped_restore_base::release): New public method.
11277         (scoped_restore_base::scoped_restore_base): New protected ctor.
11278         (scoped_restore_base::m_saved_var): New protected field.
11279         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11280         scoped_restore_base base class instead of m_saved_var directly.
11281         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11282         (scoped_restore_tmpl::scoped_restore_tmpl(const
11283         scoped_restore_tmpl<T>&)): Likewise.
11284         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11285         method.
11286         (scoped_restore_tmpl::saved_var): New method.
11287         (scoped_restore_tmpl::m_saved_var): Delete.
11288         * inferior.h (inferior::detaching): Now a bool.
11289         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11290         cleanup.
11291         * unittests/scoped_restore-selftests.c: New file.
11292
11293 2017-04-19  Pedro Alves  <palves@redhat.com>
11294
11295         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11296         Re-sort in alphabetic order.
11297
11298 2017-04-18  Pedro Alves  <palves@redhat.com>
11299
11300         * xml-support.c (obstack_xml_printf): Delete.
11301         * xml-support.h (obstack_xml_printf): Delete.
11302
11303 2017-04-18  Pedro Alves  <palves@redhat.com>
11304
11305         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11306         vdebug, verror, body_text, start_element, end_element, name,
11307         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11308         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11309         is_xinclude>: Make private and add m_ prefix.
11310         (gdb_xml_parser::body_text): New method, based on ...
11311         (gdb_xml_body_text): ... this.  Adjust.
11312         (gdb_xml_parser::vdebug): New method, based on ...
11313         (gdb_xml_debug): ... this.  Adjust.
11314         (gdb_xml_parser::verror): New method, based on ...
11315         (gdb_xml_error): ... this.  Adjust.
11316         (gdb_xml_parser::start_element): New method, based on ...
11317         (gdb_xml_start_element): ... this.  Adjust.
11318         (gdb_xml_start_element_wrapper): Defer to
11319         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11320         (gdb_xml_parser::end_element): New method, based on ...
11321         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11322         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11323         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11324         (gdb_xml_parser::use_dtd): New method, based on ...
11325         (gdb_xml_use_dtd): ... this.  Adjust.
11326         (gdb_xml_parser::parse): New method, based on ...
11327         (gdb_xml_parse): ... this.  Adjust.
11328         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11329         (xinclude_start_include): Adjust to call the parser's name method.
11330         (xml_xinclude_default, xml_xinclude_start_doctype)
11331         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11332         method.
11333         (xml_process_xincludes): Adjust to call parser methods.
11334         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11335         declarations.
11336
11337 2017-04-18  Pedro Alves  <palves@redhat.com>
11338
11339         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11340         gdb::optional<std::string>.
11341         * xml-support.c: Include <string>.
11342         (scope_level::scope_level(scope_level &&))
11343         (scope_level::~scope_level): Delete.
11344         (scope_level::body): Now a std::string.
11345         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11346         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11347         parameter.
11348         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11349         (xinclude_parsing_data::output): Now a std::string reference.
11350         (xinclude_start_include): Adjust.
11351         (xml_xinclude_default): Adjust.
11352         (xml_process_xincludes): Add 'output' parameter, and return bool.
11353         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11354         and return bool.
11355         * xml-tdesc.c: Include <unordered_map> and <string>.
11356         (tdesc_xml_cache): Delete.
11357         (tdesc_xml_cache_s): Delete.
11358         (xml_cache): Now an std::unordered_map.
11359         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11360         (target_fetch_description_xml): Change return type to
11361         gdb::optional<std::string>, and adjust.
11362         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11363         (target_fetch_description_xml): Change return type to
11364         gdb::optional<std::string>.
11365
11366 2017-04-18  Pedro Alves  <palves@redhat.com>
11367
11368         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11369         unittests/optional-selftests.c.
11370         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11371         * unittests/optional-selftests.c: New file.
11372         * unittests/optional/assignment/1.cc: New file.
11373         * unittests/optional/assignment/2.cc: New file.
11374         * unittests/optional/assignment/3.cc: New file.
11375         * unittests/optional/assignment/4.cc: New file.
11376         * unittests/optional/assignment/5.cc: New file.
11377         * unittests/optional/assignment/6.cc: New file.
11378         * unittests/optional/assignment/7.cc: New file.
11379         * unittests/optional/cons/copy.cc: New file.
11380         * unittests/optional/cons/default.cc: New file.
11381         * unittests/optional/cons/move.cc: New file.
11382         * unittests/optional/cons/value.cc: New file.
11383         * unittests/optional/in_place.cc: New file.
11384         * unittests/optional/observers/1.cc: New file.
11385         * unittests/optional/observers/2.cc: New file.
11386
11387 2017-04-18  Pedro Alves  <palves@redhat.com>
11388
11389         * common/gdb_optional.h: Include common/traits.h.
11390         (in_place_t): New type.
11391         (in_place): New constexpr variable.
11392         (optional::optional): Remove member initialization of
11393         m_instantiated.
11394         (optional::optional(in_place_t...)): New constructor.
11395         (optional::~optional): Use reset.
11396         (optional::optional(const optional&)): New.
11397         (optional::optional(const optional&&)): New.
11398         (optional::optional(T &)): New.
11399         (optional::optional(T &&)): New.
11400         (operator::operator=(const optional &)): New.
11401         (operator::operator=(optional &&)): New.
11402         (operator::operator= (const T &))
11403         (operator::operator= (T &&))
11404         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11405         (operator::reset): New.
11406         (operator::m_instantiated):: Add in-class initializer.
11407         * common/traits.h: Include <type_traits>.
11408         (struct And): New types.
11409
11410 2017-04-18  Pedro Alves  <palves@redhat.com>
11411
11412         * xml-support.c: Include <vector>.
11413         (scope_level::scope_level(const gdb_xml_element *))
11414         (scope_level::scope_level(scope_level&&)): New.
11415         (scope_level::~scope_level): New.
11416         (scope_level_s): Delete.
11417         (gdb_xml_parser::scopes): Now a std::vector.
11418         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11419         Use std::vector.
11420         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11421         scope cleanup code.
11422         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11423         of the scopes member.  Use std::vector::emplace_back.
11424
11425 2017-04-18  Pedro Alves  <palves@redhat.com>
11426
11427         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11428         a bool.
11429         (gdb_xml_end_element): Change type of first parameter.
11430         (gdb_xml_cleanup): Rename to ...
11431         (gdb_xml_parser::~gdb_xml_parser): ... this.
11432         (gdb_xml_create_parser_and_cleanup): Delete with ...
11433         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11434         to this new ctor.
11435         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11436         using gdb_xml_create_parser_and_cleanup.
11437         (xinclude_parsing_data): Add ctor/dtor.
11438         (xml_xinclude_cleanup): Delete.
11439         (xml_process_xincludes): Create a local xinclude_parsing_data
11440         instead of heap-allocating one.  Create a local gdb_xml_parser
11441         instead of heap-allocating one with
11442         gdb_xml_create_parser_and_cleanup.
11443
11444 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11445
11446         PR threads/20743
11447         * fbsd-nat.c (resume_one_thread_cb): Remove.
11448         (resume_all_threads_cb): Remove.
11449         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11450         iterate_over_threads.
11451
11452 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11453
11454         * NEWS: Create a new section for the next release branch.
11455         Rename the section of the current branch, now that it has
11456         been cut.
11457
11458 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11459
11460         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11461         * version.in: Bump version to 8.0.50.DATE-git.
11462
11463 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11464
11465         PR gdb/21385
11466         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11467         independently of the host, and fix build breakage on Cygwin.
11468
11469 2017-04-13  Pedro Alves  <palves@redhat.com>
11470
11471         * inferior.c (free_inferior): Convert to ...
11472         (inferior::~inferior): ... this dtor.
11473         (inferior::inferior): New ctor, factored out from ...
11474         (add_inferior_silent): ... here.  Allocate the inferior with a new
11475         expression.
11476         (delete_inferior): Call delete instead of free_inferior.
11477         * inferior.h (gdb_environ, continuation): Forward declare.
11478         (inferior): Now a class.  Add in-class initialization to all
11479         members.  Make boolean fields bool, except 'detaching'.
11480         (inferior::inferior): New explicit ctor.
11481         (inferior::~inferior): New.
11482
11483 2017-04-13  Pedro Alves  <palves@redhat.com>
11484
11485         * inferior.c (init_inferior_list): Delete.
11486         * inferior.h (init_inferior_list): Delete.
11487
11488 2017-04-13  Pedro Alves  <palves@redhat.com>
11489
11490         PR threads/13217
11491         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11492         (top level): Call it twice, with different thread sets.
11493
11494 2017-04-13  Pedro Alves  <palves@redhat.com>
11495
11496         * thread.c: Include <algorithm>.
11497         (thread_array_cleanup): Delete.
11498         (scoped_inc_dec_ref): New class.
11499         (live_threads_count): New function.
11500         (set_thread_refcount): Delete.
11501         (tp_array_compar_ascending): Now a bool.
11502         (tp_array_compar): Convert to a std::sort comparison function.
11503         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11504         and live_threads_count.
11505
11506 2017-04-13  Pedro Alves  <palves@redhat.com>
11507
11508         * infrun.c (follow_fork_inferior): Also switch the current
11509         inferior.
11510
11511 2017-04-13  Pedro Alves  <palves@redhat.com>
11512
11513         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11514         before calling create_internal_breakpoint.
11515
11516 2017-04-13  Pedro Alves  <palves@redhat.com>
11517
11518         * fork-child.c (execv_argv): New class.
11519         (breakup_args): Refactored as ...
11520         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11521         Copy arguments to storage and replace separators with NULL
11522         terminators in place.
11523         (escape_bang_in_quoted_argument): Adjust to return bool.
11524         (execv_argv::execv_argv): New ctor.
11525         (execv_argv::init_for_shell): New method, factored out from
11526         fork_inferior.  Don't strdup strings into the vector.
11527         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11528         Remove free_vector_argv call.
11529
11530 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11531
11532         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11533         tdep->rx_psw_type.
11534
11535 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11536
11537         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11538         * rx-tdep.c (rx_gdbarch_init): Likewise.
11539
11540 2017-04-13  Pedro Alves  <palves@redhat.com>
11541
11542         * breakpoint.h (struct breakpoint): Reindent.
11543
11544 2017-04-13  Pedro Alves  <palves@redhat.com>
11545
11546         * breakpoint.c (bp_location): Rename to ...
11547         (bp_locations): ... this.  All references updated.
11548         (bp_location_count): Rename to ...
11549         (bp_locations_count): ... this.  All references updated.
11550         (bp_location_placed_address_before_address_max): Rename to ...
11551         (bp_locations_placed_address_before_address_max): ... this.  All
11552         references updated.
11553         (bp_location_shadow_len_after_address_max): Rename to ...
11554         (bp_locations_shadow_len_after_address_max): ... this.  All
11555         references updated.
11556         (bp_location_compare_addrs): Rename to ...
11557         (bp_locations_compare_addrs): ... this.  All references updated.
11558         (bp_location_compare):Rename to ...
11559         (bp_locations_compare): ... this.  All references updated.
11560         (bp_location_target_extensions_update): Rename to ...
11561         (bp_locations_target_extensions_update): ... this.  All references
11562         updated.
11563
11564 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11565
11566         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11567         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11568         'sgtty.h'.
11569         * common/gdb_termios.h: New file, with parts of "terminal.h".
11570         * inflow.c: Include "gdb_termios.h".
11571         * ser-unix.c: Include "gdb_termios.h".
11572         * terminal.h: Move terminal-related defines to
11573         "common/gdb_termios.h".
11574
11575 2017-04-12  Tom Tromey  <tom@tromey.com>
11576
11577         * probe.c (parse_probes): Update.
11578         * location.h (delete_event_location): Don't declare.
11579         (event_location_deleter::operator()): Update.
11580         * location.c (event_location_deleter::operator()): Rename from
11581         delete_event_location.
11582         * linespec.h (linespec_result) <location>: Change type to
11583         event_location_up.
11584         * linespec.c (canonicalize_linespec, event_location_to_sals)
11585         (decode_objc): Update.
11586         (linespec_result): Don't call delete_event_location.
11587         * breakpoint.c (create_breakpoints_sal)
11588         (bkpt_probe_create_sals_from_location)
11589         (strace_marker_create_sals_from_location): Update.
11590
11591 2017-04-12  Tom Tromey  <tom@tromey.com>
11592
11593         * linespec.h (struct linespec_result): Add constructor and
11594         destructor.
11595         (init_linespec_result, destroy_linespec_result)
11596         (make_cleanup_destroy_linespec_result): Don't declare.
11597         * linespec.c (init_linespec_result): Remove.
11598         (linespec_result::~linespec_result): Rename from
11599         destroy_linespec_result.  Update.
11600         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11601         Remove.
11602         * breakpoint.c (create_breakpoint, break_range_command)
11603         (decode_location_default): Update.
11604         * ax-gdb.c (agent_command_1): Update.
11605
11606 2017-04-12  Tom Tromey  <tom@tromey.com>
11607
11608         * remote.c (remote_download_tracepoint): Update.
11609         * python/py-breakpoint.c (bppy_get_location): Update.
11610         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11611         (gdbscm_breakpoint_location): Update.
11612         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11613         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11614         Change type to event_location_up.
11615         * breakpoint.c (create_overlay_event_breakpoint)
11616         (create_longjmp_master_breakpoint)
11617         (create_std_terminate_master_breakpoint)
11618         (create_exception_master_breakpoint)
11619         (breakpoint_event_location_empty_p, print_breakpoint_location)
11620         (print_one_breakpoint_location, create_thread_event_breakpoint)
11621         (init_breakpoint_sal, create_breakpoint)
11622         (print_recreate_ranged_breakpoint, break_range_command)
11623         (init_ada_exception_breakpoint, say_where): Update.
11624         (base_breakpoint_dtor): Don't call delete_event_location.
11625         (bkpt_print_recreate, tracepoint_print_recreate)
11626         (dprintf_print_recreate, update_static_tracepoint)
11627         (breakpoint_re_set_default): Update.
11628
11629 2017-04-12  Tom Tromey  <tom@tromey.com>
11630
11631         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11632         type of "to_do".  Update.
11633         (compute_stack_depth): Use std::vector.
11634
11635 2017-04-12  Tom Tromey  <tom@tromey.com>
11636
11637         * printcmd.c (find_instruction_backward): Use std::vector.
11638
11639 2017-04-12  Tom Tromey  <tom@tromey.com>
11640
11641         * symfile.c (objfilep): Remove typedef.
11642         (reread_symbols): Use a std::vector.
11643
11644 2017-04-12  Tom Tromey  <tom@tromey.com>
11645
11646         * mi/mi-main.c (exec_direction_forward): Remove.
11647         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11648         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11649         scoped_restore.
11650         * guile/guile.c (guile_repl_command, guile_command)
11651         (gdbscm_execute_gdb_command): Use scoped_restore.
11652         * go-exp.y (go_parse): Use scoped_restore.
11653         * d-exp.y (d_parse): Use scoped_restore.
11654         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11655         * c-exp.y (c_parse): Use scoped_restore.
11656
11657 2017-04-12  Tom Tromey  <tom@tromey.com>
11658
11659         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11660         (mi_parse): Update return type.
11661         (mi_parse_free): Remove.
11662         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11663         (mi_parse::~mi_parse): Rename from mi_parse_free.
11664         (mi_parse_cleanup): Remove.
11665         (mi_parse): Return a unique_ptr.  Use new.
11666         * mi/mi-main.c (mi_execute_command): Update.
11667
11668 2017-04-12  Tom Tromey  <tom@tromey.com>
11669
11670         * location.c (explicit_location_lex_one): Return a
11671         unique_xmalloc_ptr.
11672         (string_to_explicit_location): Update.  Remove cleanups.
11673
11674 2017-04-12  Tom Tromey  <tom@tromey.com>
11675
11676         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11677         (compare_value_and_voffset): Change type.  Update.
11678         (compute_vtable_size): Change type of "offset_vec".
11679         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11680         (gnuv3_get_typeid): Remove extraneous declaration.
11681
11682 2017-04-12  Tom Tromey  <tom@tromey.com>
11683
11684         * charset.h (wchar_iterator): Fix comment.
11685
11686 2017-04-12  Tom Tromey  <tom@tromey.com>
11687
11688         * charset.c (iconv_wrapper): New class.
11689         (cleanup_iconv): Remove.
11690         (convert_between_encodings): Use it.
11691
11692 2017-04-12  Tom Tromey  <tom@tromey.com>
11693
11694         * symfile.h (increment_reading_symtab): Update type.
11695         * symfile.c (decrement_reading_symtab): Remove.
11696         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11697         * psymtab.c (psymtab_to_symtab): Update.
11698         * dwarf2read.c (dw2_instantiate_symtab): Update.
11699
11700 2017-04-12  Tom Tromey  <tom@tromey.com>
11701
11702         * jit.c (struct jit_reader): Declare separately.  Add constructor
11703         and destructor.  Change type of "handle".
11704         (loaded_jit_reader): Define separately.
11705         (jit_reader_load): Update.  New "new".
11706         (jit_reader_unload_command): Use "delete".
11707         * gdb-dlfcn.h (struct dlclose_deleter): New.
11708         (gdb_dlhandle_up): New typedef.
11709         (gdb_dlopen, gdb_dlsym): Update types.
11710         (gdb_dlclose): Remove.
11711         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11712         (gdb_dlsym): Change type of "handle".
11713         (make_cleanup_dlclose): Remove.
11714         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11715         * compile/compile-c-support.c (load_libcc): Update.
11716
11717 2017-04-12  Tom Tromey  <tom@tromey.com>
11718
11719         * symtab.h (find_pcs_for_symtab_line): Change return type.
11720         * symtab.c (find_pcs_for_symtab_line): Change return type.
11721         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11722         type of "vec".  Update.
11723         (ltpy_get_pcs_for_line): Update.
11724         * linespec.c (decode_digits_ordinary): Update.
11725
11726 2017-04-12  Tom Tromey  <tom@tromey.com>
11727
11728         * tracepoint.c (actions_command): Update.
11729         * python/python.c (python_command, python_interactive_command):
11730         Update.
11731         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11732         * guile/guile.c (guile_command): Update.
11733         * defs.h (read_command_lines, read_command_lines_1): Return
11734         command_line_up.
11735         (command_lines_deleter): New struct.
11736         (command_line_up): New typedef.
11737         * compile/compile.c (compile_code_command)
11738         (compile_print_command): Update.
11739         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11740         command_line_up.
11741         (make_cleanup_free_command_lines): Remove.
11742         * cli/cli-script.c (get_command_line, read_command_lines_1)
11743         (copy_command_lines): Return command_line_up.
11744         (while_command, if_command, read_command_lines, define_command)
11745         (document_command): Update.
11746         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11747         Remove.
11748         * breakpoint.h (breakpoint_set_commands): Change type of
11749         "commands".
11750         * breakpoint.c (breakpoint_set_commands): Change type of
11751         "commands".  Update.
11752         (do_map_commands_command, update_dprintf_command_list)
11753         (create_tracepoint_from_upload): Update.
11754
11755 2017-04-12  Tom Tromey  <tom@tromey.com>
11756
11757         * tracepoint.c (scope_info): Update.
11758         * spu-tdep.c (spu_catch_start): Update.
11759         * python/python.c (gdbpy_decode_line): Update.
11760         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11761         * python/py-breakpoint.c (bppy_init): Update.
11762         * probe.c (parse_probes): Update.
11763         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11764         * location.h (event_location_deleter): New struct.
11765         (event_location_up): New typedef.
11766         (new_linespec_location, new_address_location, new_probe_location)
11767         (new_explicit_location, copy_event_location)
11768         (string_to_event_location, string_to_event_location_basic)
11769         (string_to_explicit_location): Update return type.
11770         (make_cleanup_delete_event_location): Remove.
11771         * location.c (new_linespec_location, new_address_location)
11772         (new_probe_location, new_explicit_location, copy_event_location):
11773         Return event_location_up.
11774         (delete_event_location_cleanup)
11775         (make_cleanup_delete_event_location): Remove.
11776         (string_to_explicit_location, string_to_event_location_basic)
11777         (string_to_event_location): Return event_location_up.
11778         * linespec.c (canonicalize_linespec, event_location_to_sals)
11779         (decode_line_with_current_source)
11780         (decode_line_with_last_displayed, decode_objc): Update.
11781         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11782         * completer.c (location_completer): Update.
11783         * cli/cli-cmds.c (edit_command, list_command): Update.
11784         * breakpoint.c (create_overlay_event_breakpoint)
11785         (create_longjmp_master_breakpoint)
11786         (create_std_terminate_master_breakpoint)
11787         (create_exception_master_breakpoint)
11788         (create_thread_event_breakpoint): Update.
11789         (init_breakpoint_sal): Update.  Remove some dead code.
11790         (create_breakpoint_sal): Change type of "location".  Update.
11791         (create_breakpoints_sal, create_breakpoint, break_command_1)
11792         (dprintf_command, break_range_command, until_break_command)
11793         (init_ada_exception_breakpoint)
11794         (strace_marker_create_sals_from_location)
11795         (update_static_tracepoint, trace_command, ftrace_command)
11796         (strace_command, create_tracepoint_from_upload): Update.
11797         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11798         * ax-gdb.c (agent_command_1): Update.
11799
11800 2017-04-12  Pedro Alves  <palves@redhat.com>
11801
11802         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11803         * configure.tgt: Handle i[34567]86-*-go32* and
11804         i[34567]86-*-msdosdjgpp*.
11805         * i386-tdep.c (i386_svr4_reg_to_regnum):
11806         Make extern.
11807         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11808         i386-go32-tdep.c.
11809         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11810         * i386-go32-tdep.c: New file.
11811         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11812         declarations.
11813
11814 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11815
11816         * aix-thread.c (pd_status2str): Change return type to const char *.
11817
11818 2017-04-12  Pedro Alves  <palves@redhat.com>
11819
11820         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11821         calls to set_gdbarch_gnu_triplet_regexp.
11822
11823 2017-04-12  Pedro Alves  <palves@redhat.com>
11824
11825         PR gdb/21323
11826         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11827         New enum value.
11828         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11829         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11830         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11831         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11832         * gdbarch.h, gdbarch.c: Regenerate.
11833         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11834         gdbarch_wchar_bit and gdbarch_wchar_signed.
11835         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11836         * arm-tdep.c (arm_gdbarch_init): Likewise.
11837         * avr-tdep.c (avr_gdbarch_init): Likewise.
11838         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11839         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11840         * i386-tdep.c (i386_go32_init_abi): Likewise.
11841         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11842         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11843         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11844         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11845         * sh-tdep.c (sh_gdbarch_init): Likewise.
11846         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11847         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11848         * windows-tdep.c (windows_init_abi): Likewise.
11849         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11850
11851 2017-04-12  Pedro Alves  <palves@redhat.com>
11852
11853         PR c++/21323
11854         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11855         cplus_primitive_type_char32_t>: New enum values.
11856         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11857         and cplus_primitive_type_char32_t.
11858         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11859         32, use the archtecture's built-in type for char16_t and char32_t,
11860         respectively.  Otherwise, fallback to init_integer_type as before,
11861         but make the type unsigned, and issue a complaint.
11862         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11863
11864 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11865
11866         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11867         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11868
11869 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11870
11871         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11872         'const char *'.
11873
11874 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11875
11876         * common/common-utils.c (free_vector_argv): New function.
11877         * common/common-utils.h: Include <vector>.
11878         (free_vector_argv): New prototype.
11879         * darwin-nat.c (darwin_create_inferior): Rewrite function
11880         prototype in order to constify "exec_file" and accept a
11881         "std::string" for "allargs".
11882         * fork-child.c: Include <vector>.
11883         (breakup_args): Rewrite function, using C++.
11884         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11885         and accept "std::string" for "allargs".  Update the code to
11886         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11887         and "execvp".
11888         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11889         order to constify "exec_file" and accept a "std::string" for
11890         "allargs".
11891         * go32-nat.c (go32_create_inferior): Likewise.
11892         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11893         * infcmd.c (run_command_1): Constify "exec_file".  Use
11894         "std::string" for inferior arguments.
11895         * inferior.h (fork_inferior): Update prototype.
11896         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11897         prototype in order to constify "exec_file" and accept a
11898         "std::string" for "allargs".
11899         * nto-procfs.c (procfs_create_inferior): Likewise.
11900         * procfs.c (procfs_create_inferior): Likewise.
11901         * remote-sim.c (gdbsim_create_inferior): Likewise.
11902         * remote.c (extended_remote_run): Update code to accept
11903         "std::string" as argument.
11904         (extended_remote_create_inferior): Rewrite function prototype in
11905         order to constify "exec_file" and accept a "std::string" for
11906         "allargs".
11907         * rs6000-nat.c (super_create_inferior): Likewise.
11908         (rs6000_create_inferior): Likewise.
11909         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11910         * windows-nat.c (windows_create_inferior): Likewise.
11911
11912 2017-04-11  Pedro Alves  <palves@redhat.com>
11913
11914         * thread.c: Fix whitespace throughout.
11915
11916 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11917
11918         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11919
11920 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11921
11922         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11923
11924 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11925
11926         PR gdb/21364
11927         * osdata.c (info_osdata): Check if 'type' is an empty string
11928         instead of NULL.
11929
11930 2017-04-10  Pedro Alves  <palves@redhat.com>
11931
11932         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11933         (ptid_to_global_thread_id, in_thread_list)
11934         (do_captured_list_thread_ids, set_resumed, set_running)
11935         (set_executing, set_stop_requested, finish_thread_state)
11936         (validate_registers_access, can_access_registers_ptid)
11937         (print_thread_info_1, switch_to_thread)
11938         (do_restore_current_thread_cleanup)
11939         (make_cleanup_restore_current_thread, thread_command)
11940         (thread_name_command): Use operator== instead of ptid_equal.
11941
11942 2017-04-10  Pedro Alves  <palves@redhat.com>
11943
11944         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11945         (current_thread_cleanup_chain): Delete.
11946         (restore_current_thread_cleanup_dtor)
11947         (make_cleanup_restore_current_thread): Remove references to
11948         current_thread_cleanup_chain.
11949
11950 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11951
11952         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11953         REG_UNKNOWN.
11954
11955 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11956
11957         PR gdb/19942
11958         * gdbthread.h (thread_info::deletable): New method.
11959         (thread_info::incref): New method.
11960         (thread_info::decref): New method.
11961         (thread_info::refcount): Move it to private.
11962         * infrun.c (save_stop_context): Call inc_refcount.
11963         (release_stop_context_cleanup): Likewise.
11964         * thread.c (set_thread_exited): New function.
11965         (init_thread_list): Delete "tp" only it is deletable, otherwise
11966         call set_thread_exited.
11967         (delete_thread_1): Call set_thread_exited.
11968         (current_thread_cleanup) <inferior_pid>: Remove.
11969         <thread>: New field.
11970         (restore_current_thread_ptid_changed): Removed.
11971         (do_restore_current_thread_cleanup): Adjust.
11972         (restore_current_thread_cleanup_dtor): Don't call
11973         find_thread_ptid.
11974         (set_thread_refcount): Use dec_refcount.
11975         (make_cleanup_restore_current_thread): Adjust.
11976         (thread_apply_all_command): Call inc_refcount.
11977         (_initialize_thread): Don't call
11978         observer_attach_thread_ptid_changed.
11979
11980 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11981
11982         * thread.c (delete_thread_1): Hoist code on marking thread as
11983         exited.
11984
11985 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11986
11987         * windows-nat.c (windows_detach): Initialize ptid with
11988         minus_one_ptid.
11989
11990 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11991
11992         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11993
11994 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11995
11996         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11997         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11998         (bfin_pseudo_register_write): Likewise
11999
12000 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12001
12002         * common/ptid.h (struct ptid): Change to...
12003         (class ptid_t): ... this.
12004         <ptid_t>: New constructors.
12005         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12006         matches>: New methods.
12007         <make_null, make_minus_one>: New static methods.
12008         <pid>: Rename to...
12009         <m_pid>: ...this.
12010         <lwp>: Rename to...
12011         <m_lwp>: ...this.
12012         <tid>: Rename to...
12013         <m_tid>: ...this.
12014         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12015         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12016         as references, move comment to class ptid_t.
12017         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12018         ptid_t static methods.
12019         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12020         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12021         Take ptid arguments as references, implement using ptid_t methods.
12022         * unittests/ptid-selftests.c: New file.
12023         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12024         unittests/ptid-selftests.c.
12025         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12026
12027 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12028
12029         * python/python.c (python_run_simple_file): Cast mode literal to
12030         non-const char pointer as expected by PyFile_FromString.
12031
12032 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12033
12034         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12035         minus_one_ptid and null_ptid.
12036
12037 2017-04-05  Pedro Alves  <palves@redhat.com>
12038
12039         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12040         * configure: Regenerate.
12041
12042 2017-04-05  Pedro Alves  <palves@redhat.com>
12043
12044         * ada-exp.y (yyerror): Constify.
12045         * ada-lang.c (bound_name, get_selections)
12046         (ada_variant_discrim_type)
12047         (ada_variant_discrim_name, ada_value_struct_elt)
12048         (ada_lookup_struct_elt_type, is_unchecked_variant)
12049         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12050         (catch_ada_exception_command_split)
12051         (catch_ada_assert_command_split, catch_assert_command)
12052         (ada_op_name): Constify.
12053         * ada-lang.h (ada_yyerror, get_selections)
12054         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12055         * arc-tdep.c (arc_print_frame_cache): Constify.
12056         * arm-tdep.c (arm_skip_stub): Constify.
12057         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12058         (gen_aggregate_elt_ref): Constify.
12059         * bcache.c (print_bcache_statistics): Constify.
12060         * bcache.h (print_bcache_statistics): Constify.
12061         * break-catch-throw.c (catch_exception_command_1):
12062         * breakpoint.c (struct ep_type_description::description):
12063         Constify.
12064         (add_solib_catchpoint): Constify.
12065         (catch_fork_command_1): Add cast.
12066         (add_catch_command): Constify.
12067         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12068         Constify.
12069         * bsd-uthread.c (bsd_uthread_state): Constify.
12070         * buildsym.c (patch_subfile_names): Constify.
12071         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12072         Constify.
12073         * c-exp.y (yyerror): Constify.
12074         (token::oper): Constify.
12075         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12076         * c-varobj.c (cplus_describe_child): Constify.
12077         * charset.c (find_charset_names): Add cast.
12078         (find_charset_names): Constify array and add const_cast.
12079         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12080         (edit_command): Constify.
12081         * cli/cli-decode.c (lookup_cmd): Constify.
12082         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12083         Constify.
12084         (struct dump_context): Constify.
12085         (add_dump_command, restore_command): Constify.
12086         * cli/cli-script.c (get_command_line): Constify.
12087         * cli/cli-script.h (get_command_line): Constify.
12088         * cli/cli-utils.c (check_for_argument): Constify.
12089         * cli/cli-utils.h (check_for_argument): Constify.
12090         * coff-pe-read.c (struct read_pe_section_data): Constify.
12091         * command.h (lookup_cmd): Constify.
12092         * common/print-utils.c (decimal2str): Constify.
12093         * completer.c (gdb_print_filename): Constify.
12094         * corefile.c (set_gnutarget): Constify.
12095         * cp-name-parser.y (yyerror): Constify.
12096         * cp-valprint.c (cp_print_class_member): Constify.
12097         * cris-tdep.c (cris_register_name, crisv32_register_name):
12098         Constify.
12099         * d-exp.y (yyerror): Constify.
12100         (struct token::oper): Constify.
12101         * d-lang.h (d_yyerror): Constify.
12102         * dbxread.c (struct header_file_location::name): Constify.
12103         (add_old_header_file, add_new_header_file, last_function_name)
12104         (dbx_next_symbol_text, add_bincl_to_list)
12105         (find_corresponding_bincl_psymtab, set_namestring)
12106         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12107         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12108         * defs.h (command_line_input, print_address_symbolic)
12109         (deprecated_readline_begin_hook): Constify.
12110         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12111         Constify.
12112         * event-top.c (handle_line_of_input): Constify and add cast.
12113         * exceptions.c (catch_errors): Constify.
12114         * exceptions.h (catch_errors): Constify.
12115         * expprint.c (print_subexp_standard, op_string, op_name)
12116         (op_name_standard, dump_raw_expression, dump_raw_expression):
12117         * expression.h (op_name, op_string, dump_raw_expression):
12118         Constify.
12119         * f-exp.y (yyerror): Constify.
12120         (struct token::oper): Constify.
12121         (struct f77_boolean_val::name): Constify.
12122         * f-lang.c (f_word_break_characters): Constify.
12123         * f-lang.h (f_yyerror): Constify.
12124         * fork-child.c (fork_inferior): Add cast.
12125         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12126         (new_variant): Constify.
12127         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12128         * gdbarch.c: Regenerate.
12129         * gdbcore.h (set_gnutarget): Constify.
12130         * go-exp.y (yyerror): Constify.
12131         (token::oper): Constify.
12132         * go-lang.h (go_yyerror): Constify.
12133         * go32-nat.c (go32_sysinfo): Constify.
12134         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12135         * guile/scm-cmd.c (cmdscm_function): Constify.
12136         * guile/scm-param.c (pascm_param_value): Constify.
12137         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12138         (h8300sx_register_name): Constify.
12139         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12140         Constify.
12141         * ia64-tdep.c (ia64_register_names): Constify.
12142         * infcmd.c (construct_inferior_arguments): Constify.
12143         (path_command, attach_post_wait): Constify.
12144         * language.c (show_range_command, show_case_command)
12145         (unk_lang_error): Constify.
12146         * language.h (language_defn::la_error)
12147         (language_defn::la_name_of_this): Constify.
12148         * linespec.c (decode_line_2): Constify.
12149         * linux-thread-db.c (thread_db_err_str): Constify.
12150         * lm32-tdep.c (lm32_register_name): Constify.
12151         * m2-exp.y (yyerror): Constify.
12152         * m2-lang.h (m2_yyerror): Constify.
12153         * m32r-tdep.c (m32r_register_names): Constify and make static.
12154         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12155         * m88k-tdep.c (m88k_register_name): Constify.
12156         * macroexp.c (appendmem): Constify.
12157         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12158         (upgrade_type, parse_external, parse_partial_symbols)
12159         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12160         (new_symbol): Constify.
12161         * memattr.c (mem_info_command): Constify.
12162         * mep-tdep.c (register_name_from_keyword): Constify.
12163         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12164         Constify.
12165         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12166         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12167         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12168         cast.
12169         (mi_execute_async_cli_command): Constify.
12170         * mips-tdep.c (mips_register_name): Constify.
12171         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12172         (am33_register_name, am33_2_register_name)
12173         * moxie-tdep.c (moxie_register_names): Constify.
12174         * nat/linux-osdata.c (osdata_type): Constify fields.
12175         * nto-tdep.c (nto_parse_redirection): Constify.
12176         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12177         (lookup_child_selector): Constify.
12178         (objc_methcall::name): Constify.
12179         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12180         (lookup_struct_typedef): Constify.
12181         * objfiles.c (pc_in_section): Constify.
12182         * objfiles.h (pc_in_section): Constify.
12183         * p-exp.y (struct token::oper): Constify.
12184         (yyerror): Constify.
12185         * p-lang.h (pascal_yyerror): Constify.
12186         * parser-defs.h (op_name_standard): Constify.
12187         (op_print::string): Constify.
12188         (exp_descriptor::op_name): Constify.
12189         * printcmd.c (print_address_symbolic): Constify.
12190         * psymtab.c (print_partial_symbols): Constify.
12191         * python/py-breakpoint.c (stop_func): Constify.
12192         (bppy_get_expression): Constify.
12193         * python/py-cmd.c (cmdpy_completer::name): Constify.
12194         (cmdpy_function): Constify.
12195         * python/py-event.c (evpy_add_attribute)
12196         (gdbpy_initialize_event_generic): Constify.
12197         * python/py-event.h (evpy_add_attribute)
12198         (gdbpy_initialize_event_generic): Constify.
12199         * python/py-evts.c (add_new_registry): Constify.
12200         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12201         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12202         * python/py-inferior.c (get_buffer): Add cast.
12203         * python/py-param.c (parm_constant::name): Constify.
12204         * python/py-unwind.c (fprint_frame_id): Constify.
12205         * python/python.c (gdbpy_parameter_value): Constify.
12206         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12207         * remote.c (memory_packet_config::name): Constify.
12208         (show_packet_config_cmd, remote_write_bytes)
12209         (remote_buffer_add_string):
12210         * reverse.c (exec_reverse_once): Constify.
12211         * rs6000-tdep.c (variant::name, variant::description): Constify.
12212         * rust-exp.y (rustyyerror): Constify.
12213         * rust-lang.c (rust_op_name): Constify.
12214         * rust-lang.h (rustyyerror): Constify.
12215         * serial.h (serial_ops::name): Constify.
12216         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12217         (sh_sh3e_register_name, sh_sh2e_register_name)
12218         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12219         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12220         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12221         (sh_sh4al_dsp_register_name): Constify.
12222         * sh64-tdep.c (sh64_register_name): Constify.
12223         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12224         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12225         * stabsread.c (patch_block_stabs, read_type_number)
12226         (ref_map::stabs, ref_add, process_reference)
12227         (symbol_reference_defined, define_symbol, define_symbol)
12228         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12229         (read_one_struct_field, read_struct_fields, read_baseclasses)
12230         (read_tilde_fields, read_struct_type, read_array_type)
12231         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12232         (read_huge_number, read_range_type, read_args, common_block_start)
12233         (find_name_end): Constify.
12234         * stabsread.h (common_block_start, define_symbol)
12235         (process_one_symbol, symbol_reference_defined, ref_add):
12236         * symfile.c (get_section_index, add_symbol_file_command):
12237         * symfile.h (get_section_index): Constify.
12238         * target-descriptions.c (tdesc_type::name): Constify.
12239         (tdesc_free_type): Add cast.
12240         * target.c (find_default_run_target):
12241         (add_deprecated_target_alias, find_default_run_target)
12242         (target_announce_detach): Constify.
12243         (do_option): Constify.
12244         * target.h (add_deprecated_target_alias): Constify.
12245         * thread.c (print_thread_info_1): Constify.
12246         * top.c (deprecated_readline_begin_hook, command_line_input):
12247         Constify.
12248         (init_main): Add casts.
12249         * top.h (handle_line_of_input): Constify.
12250         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12251         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12252         (tfind_command): Rename to ...
12253         (tfind_command_1): ... this and constify.
12254         (tfind_command): New function.
12255         (tfind_end_command, tfind_start_command): Adjust.
12256         (encode_source_string): Constify.
12257         * tracepoint.h (encode_source_string): Constify.
12258         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12259         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12260         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12261         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12262         * tui/tui-win.c (parse_scrolling_args): Constify.
12263         * tui/tui-windata.c (tui_erase_data_content): Constify.
12264         * tui/tui-windata.h (tui_erase_data_content): Constify.
12265         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12266         * tui/tui.c (tui_enable): Add cast.
12267         * utils.c (defaulted_query): Constify.
12268         (init_page_info): Add cast.
12269         (puts_debug, subset_compare): Constify.
12270         * utils.h (subset_compare): Constify.
12271         * varobj.c (varobj_format_string): Constify.
12272         * varobj.h (varobj_format_string): Constify.
12273         * vax-tdep.c (vax_register_name): Constify.
12274         * windows-nat.c (windows_detach): Constify.
12275         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12276         * xml-support.c (gdb_xml_end_element): Constify.
12277         * xml-tdesc.c (tdesc_start_reg): Constify.
12278         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12279         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12280         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12281
12282 2017-04-05  Pedro Alves  <palves@redhat.com>
12283
12284         * proc-api.c (struct trans): Constify.
12285         (procfs_note): Constify.
12286         * proc-events.c (struct trans, syscall_table):
12287         * proc-flags.c (struct trans): Constify.
12288         * proc-utils.h (procfs_note): Constify.
12289         * proc-why.c (struct trans): Constify.
12290         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12291         (procfs_detach): Constify.
12292         * sol-thread.c (struct string_map): Constify.
12293         (td_err_string, td_state_string): Constify.
12294
12295 2017-04-05  Pedro Alves  <palves@redhat.com>
12296
12297         * proc-api.c (procfs_filename): Don't initialize
12298         procfs_filename.
12299         (prepare_to_trace): Assume procfs_filename is non-NULL.
12300         (_initialize_proc_api): Give procfs_filename a default value here.
12301
12302 2017-04-05  Pedro Alves  <palves@redhat.com>
12303
12304         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12305         'cond_string' parameter.
12306         (extract_exception_regexp): Constify 'string' parameter.
12307         (catch_exception_command_1): Constify.
12308         * breakpoint.c (init_catchpoint)
12309         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12310         parameter.
12311         (ep_parse_optional_if_clause, catch_fork_command_1)
12312         (catch_exec_command_1): Constify.
12313         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12314         parameter.
12315         (ep_parse_optional_if_clause): Constify.
12316         * cli/cli-utils.c (remove_trailing_whitespace)
12317         (check_for_argument): Constify.
12318         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12319         non-const overload.
12320         (check_for_argument): Likewise.
12321
12322 2017-04-05  Pedro Alves  <palves@redhat.com>
12323
12324         * event-top.c (command_line_handler): Add cast to execute_command
12325         call.
12326         * record-btrace.c (cmd_record_btrace_bts_start)
12327         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12328         (cmd_record_btrace_start): Add cast to execute_command call.
12329         * record-full.c (record_full_goto_insn):
12330         * record.c (record_start, record_stop): Add cast to
12331         execute_command_to_string calls.
12332         (cmd_record_start): Add cast to execute_command calls.
12333
12334 2017-04-05  Pedro Alves  <palves@redhat.com>
12335
12336         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12337         static inline function.
12338         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12339         array and use gdb_PyArg_ParseTupleAndKeywords.
12340         * python/py-cmd.c (cmdpy_init): Likewise.
12341         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12342         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12343         (infpy_search_memory): Likewise.
12344         * python/py-objfile.c (objfpy_add_separate_debug_file)
12345         (gdbpy_lookup_objfile): Likewise.
12346         * python/py-symbol.c (gdbpy_lookup_symbol)
12347         (gdbpy_lookup_global_symbol): Likewise.
12348         * python/py-type.c (gdbpy_lookup_type): Likewise.
12349         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12350         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12351         Likewise.
12352
12353 2017-04-05  Pedro Alves  <palves@redhat.com>
12354
12355         * python/python-internal.h (gdb_PyGetSetDef): New type.
12356         * python/py-block.c (block_object_getset)
12357         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12358         * python/py-event.c (event_object_getset)
12359         (finish_breakpoint_object_getset): Likewise.
12360         * python/py-inferior.c (inferior_object_getset): Likewise.
12361         * python/py-infthread.c (thread_object_getset): Likewise.
12362         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12363         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12364         * python/py-objfile.c (objfile_getset): Likewise.
12365         * python/py-progspace.c (pspace_getset): Likewise.
12366         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12367         Likewise.
12368         * python/py-record.c (recpy_record_getset): Likewise.
12369         * python/py-symbol.c (symbol_object_getset): Likewise.
12370         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12371         Likewise.
12372         * python/py-type.c (type_object_getset, field_object_getset):
12373         Likewise.
12374         * python/py-value.c (value_object_getset): Likewise.
12375
12376 2017-04-05  Pedro Alves  <palves@redhat.com>
12377
12378         * python/python-internal.h (gdb_PyObject_CallMethod)
12379         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12380         New functions.
12381         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12382         (PySys_GetObject, PySys_SetPath): New macros.
12383
12384 2017-04-05  Pedro Alves  <palves@redhat.com>
12385
12386         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12387         info_osdata_command.
12388         * osdata.c (info_osdata_command): Rename to ...
12389         (info_osdata): ... this.  Constify 'type' parameter, and remove
12390         the 'from_tty' parameter.  Accept NULL TYPE.
12391         (info_osdata_command): New function.
12392         * osdata.h (info_osdata_command): Remove declaration.
12393         (info_osdata): New declaration.
12394
12395 2017-04-05  Pedro Alves  <palves@redhat.com>
12396
12397         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12398         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12399         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12400         parameter.
12401         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12402         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12403         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12404         parameter.
12405         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12406         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12407         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12408         (mi_cmd_file_list_exec_source_files)
12409         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12410         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12411         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12412         parameter.
12413         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12414         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12415         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12416         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12417         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12418         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12419         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12420         'command' parameter.
12421         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12422         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12423         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12424         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12425         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12426         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12427         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12428         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12429         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12430         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12431         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12432         parameter.
12433         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12434         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12435         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12436         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12437         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12438         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12439         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12440         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12441         (mi_cmd_data_list_changed_registers)
12442         (mi_cmd_data_write_register_values)
12443         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12444         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12445         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12446         (mi_cmd_list_features, mi_cmd_list_target_features)
12447         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12448         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12449         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12450         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12451         (mi_cmd_trace_frame_collected): Constify 'command'
12452         parameter.
12453         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12454         'command' parameter.
12455
12456 2017-04-05  Pedro Alves  <palves@redhat.com>
12457
12458         * ada-lang.c (ada_completer_word_break_characters): Now a const
12459         array.
12460         (ada_get_gdb_completer_word_break_characters): Constify.
12461         * completer.c (gdb_completer_command_word_break_characters)
12462         (gdb_completer_file_name_break_characters)
12463         (gdb_completer_quote_characters): Now const arrays.
12464         (get_gdb_completer_quote_characters): Constify.
12465         (set_rl_completer_word_break_characters): New function.
12466         (set_gdb_completion_word_break_characters)
12467         (complete_line_internal): Use it.
12468         * completer.h (get_gdb_completer_quote_characters): Constify.
12469         (set_rl_completer_word_break_characters): Declare.
12470         * f-lang.c (f_word_break_characters): Constify.
12471         * language.c (default_word_break_characters): Constify.
12472         * language.h (language_defn::la_word_break_characters): Constify.
12473         (default_word_break_characters): Constify.
12474         * top.c (init_main): Use set_rl_completer_word_break_characters.
12475
12476 2017-04-05  Pedro Alves  <palves@redhat.com>
12477
12478         * aix-thread.c (aix_thread_pid_to_str)
12479         (aix_thread_extra_thread_info): Constify.
12480         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12481         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12482         (bsd_uthread_pid_to_str): Constify.
12483         * corelow.c (core_pid_to_str): Constify.
12484         * darwin-nat.c (darwin_pid_to_str): Constify.
12485         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12486         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12487         Constify.
12488         * gnu-nat.c (gnu_pid_to_str): Constify.
12489         * go32-nat.c (go32_pid_to_str): Constify.
12490         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12491         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12492         * inferior.c (inferior_pid_to_str): Constify.
12493         * linux-nat.c (linux_nat_pid_to_str): Constify.
12494         * linux-tdep.c (linux_core_pid_to_str): Constify.
12495         * linux-thread-db.c (thread_db_pid_to_str)
12496         (thread_db_extra_thread_info): Constify.
12497         * nto-tdep.c (nto_extra_thread_info): Constify.
12498         * nto-tdep.h (nto_extra_thread_info): Constify.
12499         * obsd-nat.c (obsd_pid_to_str): Constify.
12500         * procfs.c (procfs_pid_to_str): Constify.
12501         * ravenscar-thread.c (ravenscar_extra_thread_info)
12502         (ravenscar_pid_to_str): Constify.
12503         * remote-sim.c (gdbsim_pid_to_str): Constify.
12504         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12505         Constify.
12506         * sol-thread.c (solaris_pid_to_str): Constify.
12507         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12508         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12509         * target.c (default_pid_to_str, target_pid_to_str)
12510         (normal_pid_to_str, default_pid_to_str): Constify.
12511         * target.h (target_ops::to_pid_to_str)
12512         (target_ops::to_extra_thread_info): Constify.
12513         (target_pid_to_str, normal_pid_to_str): Constify.
12514         * windows-nat.c (windows_pid_to_str): Constify.
12515         * gdbarch.sh (core_pid_to_str): Constify.
12516         * target-delegates.c: Regenerate.
12517         * gdbarch.h, gdbarch.c: Regenerate.
12518
12519 2017-04-05  Pedro Alves  <palves@redhat.com>
12520
12521         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12522         the memory of the temporary warning_pre_print override.
12523         * utils.c (warning_pre_print): Constify.
12524         * utils.h (warning_pre_print): Constify.
12525
12526 2017-04-05  Pedro Alves  <palves@redhat.com>
12527
12528         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12529         (shell_command): New function.
12530         (make_command): Use std::string.
12531         (init_cli_cmds): Register shell_command instead of shell_escape.
12532
12533 2017-04-05  Pedro Alves  <palves@redhat.com>
12534
12535         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12536         * tracepoint.c (default_collect): Don't initialize.
12537
12538 2017-04-05  Pedro Alves  <palves@redhat.com>
12539
12540         * macroexp.c (macro_buffer::shared): Now a bool.
12541         (init_buffer): Update.
12542         (init_shared_buffer): Constify 'addr' parameter.
12543         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12544         casts.
12545
12546 2017-04-05  Pedro Alves  <palves@redhat.com>
12547
12548         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12549         * disasm.c (set_disassembler_options): Constify local.
12550         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12551
12552 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12553
12554         PR gdb/21352
12555         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12556         option.
12557
12558 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12559
12560         * frame.c (frame_unwind_register_unsigned): Call
12561         frame_unwind_register_value.
12562
12563 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12564
12565         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12566         Use gdb_test_multiple, and don't match anchor.
12567
12568 2017-04-05  Pedro Alves  <palves@redhat.com>
12569
12570         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12571         (Write After Approval): Remove Simon Marchi.
12572
12573 2017-04-05  Pedro Alves  <palves@redhat.com>
12574
12575         * common/gdb_optional.h (optional::optional): Make constexpr and
12576         initialize m_dummy.
12577
12578 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12579
12580         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12581         (amd64fbsd_jmp_buf_reg_offset): Remove.
12582         (amd64fbsd_supply_uthread): Remove function.
12583         (amd64fbsd_collect_uthread): Remove function.
12584         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12585         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12586         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12587         (fbsd-nat.c): Update comment.
12588         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12589         (i386fbsd_jmp_buf_reg_offset): Remove.
12590         (i386fbsd_supply_uthread): Remove function.
12591         (i386fbsd_collect_uthread): Remove function.
12592         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12593
12594 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12595
12596         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12597         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12598         * NEWS: Mention that support for FreeBSD/alpha was removed.
12599         * alpha-fbsd-tdep.c: Delete file.
12600         * config/alpha/fbsd.mh: Delete file.
12601         * configure.host: Delete alpha*-*-freebsd* and
12602         alpha*-*-kfreebsd*-gnu.
12603         * configure.tgt: Delete alpha*-*-freebsd* and
12604         alpha*-*-kfreebsd*-gnu.
12605
12606 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12607
12608         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12609         amd64bsd_store_inferior_registers): Use ptid from regcache.
12610
12611 2017-04-04  Pedro Alves  <palves@redhat.com>
12612
12613         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12614         data fields, make them private and add "m_" prefixes.
12615         (lnp_state_machine::lnp_state_machine): New ctor.
12616         (record_line, check_line_address, handle_set_discriminator)
12617         (handle_set_address, handle_advance_pc, handle_special_opcode)
12618         (handle_advance_line, handle_set_file, handle_negate_stmt)
12619         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12620         (end_sequence, advance_line): New methods.
12621         (m_gdbarch, m_record_lines_p): New fields.
12622         (lnp_reader_state): Delete.
12623         (dwarf_record_line): Rename to ...
12624         (lnp_state_machine::record_line): ... adjust.
12625         (init_lnp_state_machine): Delete.
12626         (lnp_state_machine::lnp_state_machine): New.
12627         (check_line_address): Rename to ...
12628         (lnp_state_machine::check_line_address): This.
12629         (dwarf_decode_lines_1): Remove reference to "reader_state".
12630         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12631         State machine internal state manipulation moved to
12632         lnp_state_machine methods.
12633
12634 2017-04-04  Pedro Alves  <palves@redhat.com>
12635
12636         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12637         unittests/offset-type-selftests.c.
12638         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12639         * common/offset-type.h: New file.
12640         * common/preprocessor.h: New file.
12641         * common/traits.h: New file.
12642         * common/valid-expr.h: New file.
12643         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12644         sect_offset and cu_offset strong typedefs throughout.
12645         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12646         typedefs throughout.
12647         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12648         sect_offset and cu_offset strong typedefs throughout.
12649         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12650         typedefs throughout.
12651         * gdbtypes.h: Include "common/offset-type.h".
12652         (cu_offset): Now an offset type (strong typedef) instead of a
12653         struct.
12654         (sect_offset): Likewise.
12655         (union call_site_parameter_u): Rename "param_offset" field to
12656         "param_cu_off".
12657         * unittests/offset-type-selftests.c: New file.
12658
12659 2017-04-04  Pedro Alves  <palves@redhat.com>
12660
12661         * common/underlying.h: New file.
12662         * dwarf2read.c: Include "common/gdb_optional.h" and
12663         "common/underlying.h".
12664         (dir_index, file_name_index): New types.
12665         (file_entry): Use them.
12666         (file_entry::include): Use to_underlying.
12667         (line_header::add_file_name): Use dir_index.
12668         (read_formatted_entries): Use gdb::optional.  Read form before
12669         writting to file_entry.
12670         (dwarf_decode_line_header): Use dir_index.
12671         (lnp_state_machine::current_file): Use to_underlying.
12672         (lnp_state_machine::file): Change type to file_name_index.
12673         (dwarf_record_line): Use to_underlying.
12674         (init_lnp_state_machine): Use file_name_index.
12675         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12676
12677 2017-04-04  Pedro Alves  <palves@redhat.com>
12678
12679         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12680         operator bool, has_value and get methods.
12681
12682 2017-04-04  Pedro Alves  <palves@redhat.com>
12683
12684         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12685         fields.
12686         (line_header): Initialize all data fields.  Change type of
12687         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12688         Change type of include_dirs to std::vector<const char *>.  Remove
12689         num_include_dirs, include_dirs_size.  Change type of file_names to
12690         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12691         (line_header::line_header): New.
12692         (line_header::add_include_dir, line_header::add_file_name): New
12693         methods.
12694         (line_header::include_dir_at): Remove NULL check.
12695         (line_header::file_name_at): Add const overload.
12696         (line_header_up): New unique_ptr typedef.
12697         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12698         std::vector.  Remove free_line_header call.
12699         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12700         free_line_header call.
12701         (free_cu_line_header): Delete.
12702         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12703         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12704         Adjust to use std::vector.
12705         (free_line_header): Delete.
12706         (free_line_header_voidp): Use delete.
12707         (add_include_dir): Replace with ...
12708         (line_header::add_include_dir): ... this method.  Use std::vector.
12709         (add_file_name): Replace with ...
12710         (line_header::add_file_name): ... this method.  Use std::vector.
12711         (add_include_dir_stub): Delete.
12712         (read_formatted_entries): Remove memset.
12713         (dwarf_decode_line_header): Return a line_header_up instead of a
12714         raw pointer.  Remove cleanup handling.  Pass lambdas to
12715         read_formatted_entries.  Adjust to use line_header methods.
12716         (dwarf_decode_lines_1): Adjust to use line_header methods.
12717         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12718         use std::vector.
12719
12720 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12721
12722         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12723         instead of struct ptid.
12724
12725 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12726
12727         * frame.c (get_frame_register_bytes): Unwind using value.
12728         (put_frame_register_bytes): Likewise.
12729
12730 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12731
12732         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12733         aggregate-like.
12734
12735 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12736
12737         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12738
12739 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12740
12741         * gdbthread.h (struct thread_info): Declare constructor and
12742         destructor.  Add some in-class member initializers.
12743         * thread.c (free_thread): Remove.
12744         (init_thread_list): Call delete instead of free_thread.
12745         (new_thread): Call thread_info constructor.
12746         (thread_info::thread_info): New function.
12747         (thread_info::~thread_info): New function.
12748         (delete_thread_1): Call delete instead of free_thread.
12749         (make_cleanup_restore_current_thread): Move tp and frame to
12750         inner block.
12751
12752 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12753
12754         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12755         (arc_skip_prologue): Likewise.
12756         (arc_make_frame_cache): Likewise.
12757         (arc_pv_get_operand): New function.
12758         (arc_is_in_prologue): Likewise.
12759         (arc_analyze_prologue): Likewise.
12760         (arc_print_frame_cache): Likewise.
12761         (MAX_PROLOGUE_LENGTH): New constant.
12762
12763 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12764
12765         * configure.tgt: Add arc-insn.o.
12766         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12767         (dump_arc_instruction_command): New function.
12768         (arc_fprintf_disasm): Likewise.
12769         (arc_disassemble_info): Likewise.
12770         (arc_insn_get_operand_value): Likewise.
12771         (arc_insn_get_operand_value_signed): Likewise.
12772         (arc_insn_get_memory_base_reg): Likewise.
12773         (arc_insn_get_memory_offset): Likewise.
12774         (arc_insn_get_branch_target): Likewise.
12775         (arc_insn_dump): Likewise.
12776         (arc_insn_get_linear_next_pc): Likewise.
12777         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12778         (arc_disassemble_info): Likewise.
12779         (arc_insn_get_branch_target): Likewise.
12780         (arc_insn_get_linear_next_pc): Likewise.
12781         * NEWS: Mention new "maint print arc arc-instruction".
12782
12783 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12784
12785         * arc-tdep (maintenance_print_arc_list): New variable.
12786         (maintenance_print_arc_command): New function.
12787
12788 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12789
12790         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12791         Add "limm" and "reserved".
12792         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12793         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12794         * arc-tdep.h (arc_regnum): Likewise.
12795
12796 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12797
12798         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12799         for THREADPTR register.
12800         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12801         register.
12802         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12803         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12804         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12805
12806 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12807
12808         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12809         registers above gdbarch_num_regs (gdbarch) as privileged in
12810         call0 ABI.
12811
12812 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12813
12814         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12815         for a single specified register or for all registers in
12816         a0_base..a0_base + C0_NREGS range.
12817         (supply_gregset_reg): Call regcache_raw_supply for a single
12818         specified register or for all registers in a0_base..a0_base +
12819         C0_NREGS range.
12820
12821 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12822
12823         * arch/xtensa.h (C0_NREGS): Add definition.
12824         * xtensa-tdep.c (C0_NREGS): Remove definition.
12825
12826 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12827
12828         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12829         Drop xtensa_default_isa initialization.
12830         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12831
12832 2017-03-27  Pedro Alves  <palves@redhat.com>
12833
12834         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12835         (file_entry::include_dir): New method.
12836         (line_header::include_dir_at, line_header::file_name_at): New
12837         methods.
12838         (setup_type_unit_groups, setup_type_unit_groups)
12839         (psymtab_include_file_name): Simplify using the new methods.
12840         (lnp_state_machine) <the_line_header>: New field.
12841         <file>: Add comment.
12842         (lnp_state_machine::current_file): New method.
12843         (dwarf_record_line): Simplify using the new methods.
12844         (init_lnp_state_machine): Initialize the "the_line_header" field.
12845         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12846         Simplify using the new methods.
12847
12848 2017-03-27  Pedro Alves  <palves@redhat.com>
12849
12850         * cp-name-parser.y (make_empty): Delete.
12851         (demangler_special, nested_name, ptr_operator, array_indicator)
12852         (direct_declarator, declarator_1): Use fill_comp instead of
12853         make_empty.
12854
12855 2017-03-27  Pedro Alves  <palves@redhat.com>
12856
12857         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12858         to ATTRIBUTE_PRINTF.
12859         * solib-target.c (library_list_start_list): Print "string" not
12860         "version".
12861         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12862         gdb_xml_error call.
12863
12864 2017-03-27  Pedro Alves  <palves@redhat.com>
12865
12866         * dwarf2read.c (struct file_and_directory): New.
12867         (dwarf2_get_dwz_file): Adjust to use std::string.
12868         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12869         (find_file_and_directory): Adjust to return a file_and_directory
12870         object.
12871         (read_file_scope): Adjust to use file_and_directory.  Remove
12872         make_cleanup/do_cleanups calls.
12873         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12874         make_cleanup/do_cleanups calls.
12875         * python/python.c (do_start_initialization): Adjust to ldirname
12876         returning a std::string.
12877         * utils.c (ldirname): Now returns a std::string.
12878         * utils.h (ldirname): Change return type to std::string.
12879         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12880         returning a std::string.
12881         * xml-tdesc.c (file_read_description_xml): Likewise.
12882
12883 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12884
12885         * regcache.c (regcache_debug_print_register): New function.
12886         * regcache.h (regcache_debug_print_register): New declaration.
12887         * target.c (debug_print_register): Remove.
12888         (target_fetch_registers): Call regcache_debug_print_register.
12889         (target_store_registers): Likewise.
12890
12891 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12892
12893         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12894         reference beyond the 'lh->include_dirs' array before accessing to
12895         it.
12896         (psymtab_include_file_name): Likewise.
12897         (dwarf_decode_lines_1): Likewise.
12898         (dwarf_decode_lines): Likewise.
12899         (file_file_name): Likewise.
12900
12901 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12902
12903         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12904         inferior_ptid.
12905         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12906         ps_lsetfpregs): Likewise.
12907         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12908         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12909         ps_lsetfpregs): Likewise.
12910         * target.c (target_fetch_registers, target_store_registers):
12911         Remove asserts.
12912
12913 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12914
12915         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12916
12917 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12918
12919         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12920         (_initialize_aarch64_tdep): Register it.
12921         (aarch64_record_load_store): Handle PRFM instruction.
12922         (aarch64_process_record_test): New function.
12923
12924 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12925
12926         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12927         indentation.
12928
12929 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12930
12931         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12932
12933 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12934
12935         python/python.c (do_start_initialization): Fix memory leak.
12936
12937 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12938
12939         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12940         using get_ptrace_pid.
12941         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12942         inferior_ptid.
12943         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12944         inferior_ptid instead of pid.
12945
12946 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12947
12948         * aarch64-tdep.c: Wrap locally used classes in anonymous
12949         namespace.
12950         * arm-tdep.c: Likewise.
12951         * linespec.c: Likewise.
12952         * ui-out.c: Likewise.
12953
12954 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12955
12956         PR gdb/19637
12957         * python/lib/gdb/printer/bound_registers.py: Import sys.
12958
12959 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12960
12961         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12962         windows_thread_info parameter and use it instead of
12963         current_thread.
12964         (windows_fetch_inferior_registers): Don't set current_thread,
12965         pass the thread to do_windows_fetch_inferior_registers.  Use
12966         ptid from regcache instead of inferior_ptid.
12967         (do_windows_store_inferior_registers): Add windows_thread_info
12968         parameter and use it instead of current_thread.
12969         (windows_store_inferior_registers): Don't set current_thread,
12970         pass the thread to do_windows_store_inferior_registers.  Use
12971         ptid from regcache instead of inferior_ptid.
12972
12973 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12974
12975         * ser-mingw.c (ser_windows_raw): Remove reference to
12976         struct serial::current_timeout.
12977
12978 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12979
12980         PR tdep/20928
12981         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12982         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12983         (sparc64_fsr_type): Fix %fsr decoding.
12984
12985 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12986
12987         * python/py-record-btrace.c (btpy_insn_data): Change return type
12988         for Python 2.
12989
12990 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12991
12992         * spu-linux-nat.c (spu_fetch_inferior_registers,
12993         spu_store_inferior_registers): Use ptid from regcache, set and
12994         restore inferior_ptid.
12995         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12996         Likewise.
12997
12998 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12999
13000         * i386-linux-nat.c (fetch_register, store_register,
13001         i386_linux_fetch_inferior_registers,
13002         i386_linux_store_inferior_registers): Use ptid from regcache.
13003         * ia64-linux-nat.c (ia64_linux_fetch_register,
13004         ia64_linux_store_register): Likewise.
13005         * inf-ptrace.c (inf_ptrace_fetch_register,
13006         inf_ptrace_store_register): Likewise.
13007         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13008         m32r_linux_store_inferior_registers): Likewise.
13009         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13010         m68kbsd_store_inferior_registers): Likewise.
13011         * m68k-linux-nat.c (fetch_register, store_register,
13012         m68k_linux_fetch_inferior_registers,
13013         m68k_linux_store_inferior_registers): Likewise.
13014         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13015         m88kbsd_store_inferior_registers): Likewise.
13016         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13017         mips_fbsd_store_inferior_registers): Likewise.
13018         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13019         mips64_linux_regsets_store_registers): Likewise.
13020         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13021         mipsnbsd_store_inferior_registers): Likewise.
13022         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13023         mips64obsd_store_inferior_registers): Likewise.
13024         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13025         Likewise.
13026         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13027         ppcfbsd_store_inferior_registers): Likewise.
13028         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13029         ppc_linux_store_inferior_registers): Likewise.
13030         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13031         ppcnbsd_store_inferior_registers): Likewise.
13032         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13033         ppcobsd_store_registers): Likewise.
13034         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13035         Likewise.
13036         * ravenscar-thread.c (ravenscar_fetch_registers,
13037         ravenscar_store_registers, ravenscar_prepare_to_store):
13038         Likewise.
13039         * record-btrace.c (record_btrace_fetch_registers,
13040         record_btrace_store_registers, record_btrace_prepare_to_store):
13041         Likewise.
13042         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13043         Lookup inferior using ptid from regcache, instead of
13044         current_inferior.
13045         * remote.c (remote_fetch_registers, remote_store_registers): Use
13046         ptid from regcache.
13047         * rs6000-nat.c (fetch_register, store_register): Likewise.
13048         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13049         s390_linux_store_inferior_registers): Likewise.
13050         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13051         shnbsd_store_inferior_registers): Likewise.
13052         * sol-thread.c (sol_thread_fetch_registers,
13053         sol_thread_store_registers): Likewise.
13054         * sparc-nat.c (sparc_fetch_inferior_registers,
13055         sparc_store_inferior_registers): Likewise.
13056         * tilegx-linux-nat.c (fetch_inferior_registers,
13057         store_inferior_registers): Likewise.
13058         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13059         vaxbsd_store_inferior_registers): Likewise.
13060         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13061         store_xtregs): Likewise.
13062
13063 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13064
13065         PR gdb/14441
13066         * NEWS: Mention support for rvalue references in GDB and python.
13067         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13068         supports both lvalue and rvalue references.
13069
13070 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13071
13072         PR gdb/14441
13073         * gdbtypes.c (rank_one_type): Implement overloading
13074         resolution rules regarding rvalue references.
13075
13076 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13077
13078         PR gdb/14441
13079         * aarch64-tdep.c (aarch64_type_align)
13080         (aarch64_extract_return_value, aarch64_store_return_value): Change
13081         lvalue reference type checks to general reference type checks.
13082         * amd64-tdep.c (amd64_classify): Likewise.
13083         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13084         Likewise.
13085         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13086         (arm_store_return_value): Likewise.
13087         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13088         * c-typeprint.c (c_print_type): Likewise.
13089         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13090         (cplus_number_of_children, cplus_describe_child): Likewise.
13091         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13092         * completer.c (expression_completer): Likewise.
13093         * cp-support.c (make_symbol_overload_list_adl_namespace):
13094         Likewise.
13095         * darwin-nat-info.c (info_mach_region_command): Likewise.
13096         * dwarf2loc.c (entry_data_value_coerce_ref)
13097         (value_of_dwarf_reg_entry): Likewise.
13098         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13099         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13100         Likewise.
13101         * findvar.c (extract_typed_address, store_typed_address):
13102         Likewise.
13103         * gdbtypes.c (rank_one_type): Likewise.
13104         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13105         * infcall.c (value_arg_coerce): Likewise.
13106         * language.c (pointer_type): Likewise.
13107         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13108         Likewise.
13109         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13110         * mn10300-tdep.c (mn10300_type_align): Likewise.
13111         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13112         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13113         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13114         Likewise.
13115         * printcmd.c (print_formatted, x_command): Likewise.
13116         * python/py-type.c (typy_get_composite, typy_template_argument):
13117         Likewise.
13118         * python/py-value.c (valpy_referenced_value)
13119         (valpy_get_dynamic_type, value_has_field): Likewise.
13120         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13121         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13122         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13123         * spu-tdep.c (spu_scalar_value_p): Likewise.
13124         * symtab.c (lookup_symbol_aux): Likewise.
13125         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13126         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13127         Likewise.
13128         * valops.c (value_cast_pointers, value_cast)
13129         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13130         (value_struct_elt, value_struct_elt_bitpos)
13131         (value_find_oload_method_list, find_overload_match)
13132         (value_rtti_indirect_type): Likewise.
13133         * valprint.c (val_print_scalar_type_p, generic_val_print):
13134         Likewise.
13135         * value.c (value_actual_type, value_as_address, unpack_long)
13136         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13137         (coerce_ref): Likewise.
13138         * varobj.c (varobj_get_value_type): Likewise.
13139
13140 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13141
13142         PR gdb/14441
13143         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13144         table of constants.
13145         * python/lib/gdb/command/explore.py: Support exploring values
13146         of rvalue reference types.
13147         * python/lib/gdb/types.py: Implement get_basic_type() for
13148         rvalue reference types.
13149         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13150         constant.
13151         * python/py-value.c (valpy_getitem): Add an rvalue reference
13152         check.
13153         (valpy_reference_value): Add new parameter "refcode".
13154         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13155         New wrappers for valpy_reference_value().
13156         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13157         (gdbpy_invoke_xmethod): Likewise.
13158
13159 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13160
13161         PR gdb/14441
13162         * dwarf2read.c (process_die, read_type_die_1): Handle the
13163         DW_TAG_rvalue_reference_type DIE.
13164         (read_tag_reference_type): Add new parameter "refcode".
13165
13166 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13167
13168         PR gdb/14441
13169         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13170         (c_type_print_modifier, c_type_print_varspec_suffix)
13171         (c_type_print_base): Support printing rvalue reference types.
13172         * c-valprint.c (c_val_print, c_value_print): Support printing
13173         rvalue reference values.
13174
13175 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13176
13177         PR gdb/14441
13178         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13179         typename.
13180         * cp-support.c (replace_typedefs): Handle
13181         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13182         * python/py-type.c (typy_lookup_type): Likewise.
13183
13184 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13185
13186         PR gdb/14441
13187         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13188         * parse.c (insert_type): Change assert statement.
13189         (follow_types): Handle rvalue reference types.
13190         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13191         constant.
13192
13193 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13194
13195         PR gdb/14441
13196         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13197         value_ref() interface.
13198         * c-valprint.c (c_value_print): Likewise.
13199         * infcall.c (value_arg_coerce): Likewise.
13200         * python/py-value.c (valpy_reference_value): Likewise.
13201         * valops.c (value_cast, value_reinterpret_cast)
13202         (value_dynamic_cast, typecmp): Likewise.
13203         (value_ref): Parameterize by kind of return value reference type.
13204         * value.h (value_ref): Add new parameter "refcode".
13205
13206 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13207
13208         PR gdb/14441
13209         * dwarf2read.c (read_tag_reference_type): Use
13210         lookup_lvalue_reference_type() instead of lookup_reference_type().
13211         * eval.c (evaluate_subexp_standard): Likewise.
13212         * f-exp.y: Likewise.
13213         * gdbtypes.c (make_reference_type, lookup_reference_type):
13214         Generalize with rvalue reference types.
13215         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13216         convenience wrappers for lookup_reference_type().
13217         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13218         reference kind parameter.
13219         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13220         wrappers for lookup_reference_type().
13221         * guile/scm-type.c (gdbscm_type_reference): Use
13222         lookup_lvalue_reference_type() instead of lookup_reference_type().
13223         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13224         * parse.c (follow_types): Likewise.
13225         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13226         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13227         Likewise.
13228         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13229         (gdbpy_invoke_xmethod): Likewise.
13230         * stabsread.c: Provide extra argument to make_reference_type()
13231         call.
13232         * valops.c (value_ref, value_rtti_indirect_type): Use
13233         lookup_lvalue_reference_type() instead of lookup_reference_type().
13234
13235 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13236
13237         PR gdb/14441
13238         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13239         (TYPE_IS_REFERENCE): New macro.
13240         (struct type): Add rvalue_reference_type field.
13241         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13242
13243 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13244
13245         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13246         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13247         New function definition.
13248         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13249         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13250         New function declaration.
13251         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13252         * mi/mi-interp.h: New file.
13253         * solib.c (info_sharedlibrary_command): Replace for loop with
13254         ALL_SO_LIBS macro
13255         * solib.h (update_solib_list): New function declaration.
13256         (so_list_head): Move macro.
13257         * solist.h (ALL_SO_LIBS): New macro.
13258
13259 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13260
13261         * infcmd.c (post_create_inferior): Remove unused argument in
13262         call to solib_add.
13263         * remote.c (remote_start_remote): Likewise.
13264         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13265         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13266         (enable_break): Likewise.
13267         * solib.c (update_solib_list): Remove unused target argument
13268         and its documentation.
13269         (solib_add): Remove unused target argument.  Remove unused
13270         argument in call to update_solib_list.
13271         (info_sharedlibrary_command): Remove unused argument in call
13272         to update_solib_list.
13273         (sharedlibrary_command): Remove unused argument in call to
13274         solib_add.
13275         (handle_solib_event): Likewise.
13276         (reload_shared_libraries): Likewise.
13277         * solib.h (solib_add): Remove unused target argument.
13278
13279 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13280
13281         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13282         (s390_displaced_step_fixup): Cover relative branches with the
13283         default fixup handling.  This fixes lack of support for some
13284         relative branch instructions.
13285
13286 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13287
13288         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13289         ptid from regcache.
13290
13291 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13292
13293         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13294         i386_darwin_store_inferior_registers): Use ptid from regcache.
13295
13296 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13297
13298         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13299         i386bsd_store_inferior_registers): Use ptid from regcache.
13300
13301 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13302
13303         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13304         hppaobsd_store_registers): Use ptid from regcache.
13305
13306 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13307
13308         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13309         hppanbsd_store_registers): Use ptid from regcache.
13310
13311 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13312
13313         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13314         from regcache.  Use get_ptrace_pid.
13315
13316 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13317
13318         * corelow.c (get_core_register_section): Use ptid from regcache,
13319         update doc.
13320
13321 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13322
13323         * bsd-uthread.c (bsd_uthread_fetch_registers,
13324         bsd_uthread_store_registers): Use ptid from regcache, set and
13325         restore inferior_ptid.
13326
13327 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13328
13329         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13330         fetch_fp_regs, store_register, store_regs, store_fp_register,
13331         store_fp_regs): Use ptid from regcache.
13332
13333 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13334
13335         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13336         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13337         store_vfp_regs): Use ptid from regcache.
13338
13339 2017-03-17  Pedro Alves  <palves@redhat.com>
13340
13341         PR remote/21188
13342         * ser-base.c (ser_base_wait_for): Add comment.
13343         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13344         version.
13345         * ser-unix.c (hardwire_raw): Remove reference to
13346         scb->current_timeout.
13347         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13348         (hardwire_ops): Install ser_base_readchar instead of
13349         hardwire_readchar.
13350         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13351         Remove fields.
13352
13353 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13354
13355         PR gdb/19637
13356         * python/lib/gdb/printer/bound_registers.py: Add support for
13357         Python 3.
13358
13359 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13360
13361         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13362         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13363         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13364         byte_offset to subobj_byte_offset.  Fix the handling of
13365         DWARF_VALUE_STACK on big-endian targets when coming via an
13366         implicit pointer.
13367         (dwarf2_evaluate_loc_desc): Adjust call to
13368         dwarf2_evaluate_loc_desc_full.
13369         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13370         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13371
13372 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13373
13374         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13375         and REVSH instructions.
13376
13377 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13378
13379         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13380         (arm_record_test): Declare.
13381         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13382         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13383         align with the manual.
13384         (thumb_record_misc): Adjust the code order to align with the
13385         manual.
13386         (thumb2_record_decode_insn_handler): Fix instruction matching.
13387         (instruction_reader_thumb): New class.
13388         (arm_record_test): New function.
13389
13390 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13391
13392         * arm-tdep.c (abstract_memory_reader): New class.
13393         (instruction_reader): New class.
13394         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13395         (decode_insn): Likewise.
13396
13397 2017-03-16  Doug Evans  <dje@google.com>
13398
13399         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13400         member.  Change type of TYPE member to SCM.  All uses updated.
13401         (lsscm_make_lazy_string_smob): Add assert.
13402         (lsscm_make_lazy_string): Flag bad length values.
13403         (lsscm_elt_type): New function.
13404         (gdbscm_lazy_string_to_value): Rewrite to use
13405         lsscm_safe_lazy_string_to_value.
13406         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13407         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13408         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13409         in incoming type.
13410         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13411         * guile/scm-type.c (tyscm_scm_to_type): New function.
13412
13413 2017-03-15  Doug Evans  <dje@google.com>
13414
13415         PR python/17728, python/18439, python/18779
13416         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13417         member.  Change type of TYPE member to PyObject *.  All uses updated.
13418         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13419         (gdbpy_create_lazy_string_object): Flag bad length values.
13420         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13421         Handle typedefs in incoming type.
13422         (stpy_lazy_string_elt_type): New function.
13423         (gdbpy_extract_lazy_string): Call it.
13424         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13425         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13426         typedefs in incoming type.
13427
13428 2017-03-16  Doug Evans  <dje@google.com>
13429
13430         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13431         * guile/scm-type.c (tyscm_scm_to_type): New function.
13432
13433 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13434
13435         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13436         "ULONGEST" for "skip".
13437
13438 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13439
13440         PR gdb/21220
13441         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13442         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13443         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13444         over ptrace peek/poke until end of buffer or error.
13445
13446 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13447
13448         * parse.c (length_of_subexp): Make static.
13449         * parser-defs.h (length_of_subexp): Remove.
13450
13451 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13452
13453         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13454         as well.
13455
13456 2017-03-14  Pedro Alves  <palves@redhat.com>
13457
13458         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13459         (main): Use std::unique_ptr.  Remove calls to
13460         cp_demangled_name_parse_free.
13461
13462 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13463
13464         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13465         alphabsd_store_inferior_registers): Use regcache->ptid instead
13466         of inferior_ptid.
13467
13468 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13469
13470         * aix-thread.c (aix_thread_fetch_registers,
13471         aix_thread_store_registers): Use regcache->ptid instead of
13472         inferior_ptid.
13473
13474 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13475
13476         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13477         store_gregs_to_thread, fetch_fpregs_from_thread,
13478         store_fpregs_to_thread): Use regcache->ptid instead of
13479         inferior_ptid.
13480
13481 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13482
13483         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13484         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13485         instead of inferior_ptid.
13486
13487 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13488
13489         * target.c (target_fetch_registers, target_store_registers): Add
13490         assert.
13491
13492 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13493
13494         * regcache.h (regcache_get_ptid): New function.
13495         * regcache.c (regcache_get_ptid): New function.
13496
13497 2017-03-13  Mark Wielaard  <mark@klomp.org>
13498
13499         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13500
13501 2017-03-10  Keith Seitz  <keiths@redhat.com>
13502
13503         PR c++/8218
13504         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13505
13506 2017-03-08  Pedro Alves  <palves@redhat.com>
13507
13508         PR gdb/18360
13509         * infrun.c (start_step_over, do_target_resume, resume)
13510         (restart_threads): Assert we're not resuming a thread that is
13511         meant to be stopped.
13512         (infrun_thread_stop_requested_callback): Delete.
13513         (infrun_thread_stop_requested): If the thread is internally
13514         stopped, queue a pending stop event and clear the thread's
13515         inline-frame state.
13516         (handle_stop_requested): New function.
13517         (handle_syscall_event, handle_inferior_event_1): Use
13518         handle_stop_requested.
13519         (handle_stop_requested): New function.
13520         (handle_signal_stop): Set the thread's stop_signal here instead of
13521         at caller.
13522         (finish_step_over): Clear step over info unconditionally.
13523         (handle_signal_stop): If the user had interrupted the event
13524         thread, consider the stop a random signal.
13525         (handle_signal_stop) <signal arrived while stepping over
13526         breakpoint>: Don't restart threads here.
13527         (stop_waiting): Don't clear step-over info here.
13528
13529 2017-03-08  Pedro Alves  <palves@redhat.com>
13530
13531         PR 21206
13532         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13533         goes to argument 2, not 1.
13534
13535 2017-03-08  Pedro Alves  <palves@redhat.com>
13536
13537         PR cli/21218
13538         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13539         display_gdb_prompt.
13540         (command_line_input): Add comment.
13541
13542 2017-03-08  Pedro Alves  <palves@redhat.com>
13543
13544         PR tui/21216
13545         * tui/tui-file.c (tui_file::write): New.
13546         * tui/tui-file.h (tui_file): Override "write".
13547         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13548         factored out from ...
13549         (tui_puts): ... here.
13550         (tui_putc): Use them.
13551         (tui_write): New function.
13552         * tui/tui-io.h (tui_write): Declare.
13553
13554 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13555
13556         * Makefile.in (SFILES): Replace "environ.c" with
13557         "common/environ.c".
13558         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13559         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13560         to...
13561         * common/environ.c: ... here.
13562         * environ.h: Moved to...
13563         * common/environ.h: ... here.
13564
13565 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13566
13567         * gdbarch.sh (pstring_ptr): New static function.
13568         (gdbarch_disassembler_options): Use it.
13569         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13570         not valid_disassembler_option->name.
13571         * gdbarch.c: Regenerate.
13572
13573 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13574
13575         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13576
13577 2017-03-07  Pedro Alves  <palves@redhat.com>
13578
13579         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13580
13581 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13582
13583         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13584         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13585         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13586         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13587
13588 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13589
13590         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13591
13592 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13593
13594         * remote.c (remote_add_target_side_commands): Use range-based
13595         for loop.
13596
13597 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13598
13599         PR gdb/21165
13600         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13601         value is lazy.
13602         * valprint.c (common_val_print): Likewise.
13603
13604 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13605
13606         * NEWS: Mention new set/show disassembler-options commands.
13607         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13608         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13609         (prospective_options): New static variable.
13610         (gdb_disassembler::gdb_disassembler): Initialize
13611         m_di.disassembler_options.
13612         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13613         (get_disassembler_options): New function.
13614         (set_disassembler_options): Likewise.
13615         (set_disassembler_options_sfunc): Likewise.
13616         (show_disassembler_options_sfunc): Likewise.
13617         (disassembler_options_completer): Likewise.
13618         (_initialize_disasm): Likewise.
13619         * disasm.h (get_disassembler_options): New prototype.
13620         (set_disassembler_options): Likewise.
13621         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13622         (gdbarch_verify_disassembler_options): Likewise.
13623         * gdbarch.c: Regenerate.
13624         * gdbarch.h: Likewise.
13625         * arm-tdep.c (num_disassembly_options): Delete.
13626         (set_disassembly_style): Likewise.
13627         (arm_disassembler_options): New static variable.
13628         (set_disassembly_style_sfunc): Convert short style name into long
13629         option name.  Call set_disassembler_options.
13630         (show_disassembly_style_sfunc): New function.
13631         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13632         set_gdbarch_verify_disassembler_options.
13633         (_initialize_arm_tdep): Delete regnames variable and update callers.
13634         (arm_disassembler_options): Initialize.
13635         (disasm_options): New variable.
13636         (num_disassembly_options): Rename from this...
13637         (num_disassembly_styles): ...to this.  Compute by scanning through
13638         disasm_options.
13639         (valid_disassembly_styles): Initialize using disasm_options.
13640         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13641         set_arm_regname_option.
13642         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13643         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13644         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13645         set_gdbarch_verify_disassembler_options.
13646         * s390-tdep.c (s390_disassembler_options): New static variable.
13647         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13648         set_gdbarch_verify_disassembler_options.
13649
13650 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13651
13652         * remote.c (remote_add_target_side_condition): Remove "struct"
13653         keyword from range-based for loop.
13654
13655 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13656
13657         * remote.c (remote_add_target_side_condition): Use range-based
13658         for loop.  Update comment.
13659
13660 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13661
13662         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13663
13664 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13665
13666         * regcache.c (regcache_raw_update): New function.
13667         (regcache_raw_read): Move code to regcache_raw_update.
13668         * regcache.h (regcache_raw_update): New declaration.
13669         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13670
13671 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13672
13673         * dwarf2read.c (create_debug_type_hash_table): Initialize
13674         header.signature and header.type_offset_in_tu.
13675
13676 2017-02-24  Pedro Alves  <palves@redhat.com>
13677
13678         * symtab.c (make_file_symbol_completion_list_1): Use
13679         add_symtab_completions.
13680
13681 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13682
13683         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13684
13685 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13686
13687         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13688         I386_MAX_REGISTER_SIZE.
13689         (i386_pseudo_register_write): Likewise.
13690         (i386_process_record): Likewise.
13691         * i387-tdep.c (i387_supply_xsave): Likewise.
13692         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13693         (store_register): Likewise.
13694
13695 2017-02-23  Pedro Alves  <palves@redhat.com>
13696
13697         * ada-lang.c: Include "common/function-view.h".
13698         (ada_iterate_over_symbols): Adjust to use function_view as
13699         callback type.
13700         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13701         (ada_make_symbol_completion_list): Use a lambda.
13702         (ada_exc_search_name_matches): Delete.
13703         (name_matches_regex): New.
13704         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13705         * compile/compile-c-support.c: Include "common/function-view.h".
13706         (print_one_macro): Change prototype to accept a ui_file pointer.
13707         (write_macro_definitions): Use a lambda.
13708         * dwarf2read.c: Include "common/function-view.h".
13709         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13710         (dw2_expand_symtabs_matching): Adjust to use function_view as
13711         callback type.
13712         * language.h: Include "common/function-view.h".
13713         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13714         function_view as callback type.
13715         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13716         * linespec.c: Include "common/function-view.h".
13717         (collect_info::add_symbol): New method.
13718         (struct symbol_and_data_callback, iterate_inline_only, struct
13719         symbol_matcher_data, iterate_name_matcher): Delete.
13720         (iterate_over_all_matching_symtabs): Adjust to use function_view
13721         as callback type and lambdas.
13722         (iterate_over_file_blocks): Adjust to use function_view as
13723         callback type.
13724         (decode_compound_collector): Now a class with private fields.
13725         (decode_compound_collector::release_symbols): New method.
13726         (collect_one_symbol): Rename to...
13727         (decode_compound_collector::operator()): ... this and adjust.
13728         (lookup_prefix_sym): decode_compound_collector construction bits
13729         move to decode_compound_collector ctor.  Pass the
13730         decode_compound_collector object directly as callback.  Remove
13731         cleanups and use decode_compound_collector::release_symbols
13732         instead.
13733         (symtab_collector): Now a class with private fields.
13734         (symtab_collector::release_symtabs): New method.
13735         (add_symtabs_to_list): Rename to...
13736         (symtab_collector::operator()): ... this and adjust.
13737         (collect_symtabs_from_filename): symtab_collector construction
13738         bits move to symtab_collector ctor.  Pass the symtab_collector
13739         object directly as callback.  Remove cleanups and use
13740         symtab_collector::release_symtabs instead.
13741         (collect_symbols): Delete.
13742         (add_matching_symbols_to_info): Use lambdas.
13743         * macrocmd.c (print_macro_callback): Delete.
13744         (info_macro_command): Use a lambda.
13745         (info_macros_command): Pass print_macro_definition as callable
13746         directly.
13747         (print_one_macro): Remove 'ignore' parameter.
13748         (macro_list_command): Adjust.
13749         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13750         (macro_for_each_data::user_data): Delete field.
13751         (foreach_macro): Adjust to call the function_view.
13752         (macro_for_each): Adjust to use function_view as callback type.
13753         (foreach_macro_in_scope): Adjust to call the function_view.
13754         (macro_for_each_in_scope): Adjust to use function_view as callback
13755         type.
13756         * macrotab.h: Include "common/function-view.h".
13757         (macro_callback_fn): Declare a prototype instead of a pointer.
13758         Remove "user_data" parameter.
13759         (macro_for_each, macro_for_each_in_scope): Adjust to use
13760         function_view as callback type.
13761         * psymtab.c (partial_map_expand_apply)
13762         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13763         Adjust to use function_view as callback type and to return bool.
13764         (psym_expand_symtabs_matching): Adjust to use function_view as
13765         callback types.
13766         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13767         to use function_view as callback type and to return bool.
13768         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13769         callback types.
13770         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13771         as callback types.
13772         * symfile.h: Include "common/function-view.h".
13773         (expand_symtabs_file_matcher_ftype)
13774         (expand_symtabs_symbol_matcher_ftype)
13775         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13776         return bool.
13777         (quick_symbol_functions::map_symtabs_matching_filename)
13778         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13779         function_view as callback type and return bool.
13780         (expand_symtabs_matching): Adjust to use function_view as callback
13781         type.
13782         (maintenance_expand_name_matcher)
13783         (maintenance_expand_file_matcher): Delete.
13784         (maintenance_expand_symtabs): Use lambdas.
13785         * symtab.c (iterate_over_some_symtabs): Adjust to use
13786         function_view as callback types and return bool.
13787         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13788         of a cleanup.
13789         (lookup_symtab_callback): Delete.
13790         (lookup_symtab): Use a lambda.
13791         (iterate_over_symbols): Adjust to use function_view as callback
13792         type.
13793         (struct search_symbols_data, search_symbols_file_matches)
13794         (search_symbols_name_matches): Delete.
13795         (search_symbols): Use a pair of lambdas.
13796         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13797         (symtab_expansion_callback): Delete.
13798         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13799         * symtab.h: Include "common/function-view.h".
13800         (iterate_over_some_symtabs): Adjust to use function_view as
13801         callback type and return bool.
13802         (iterate_over_symtabs): Adjust to use function_view as callback
13803         type.
13804         (symbol_found_callback_ftype): Remove 'data' parameter and return
13805         bool.
13806         (iterate_over_symbols): Adjust to use function_view as callback
13807         type.
13808
13809 2017-02-23  Pedro Alves  <palves@redhat.com>
13810
13811         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13812         (%.o) <unittests/%.c>: New pattern.
13813         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13814         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13815         * common/function-view.h: New file.
13816         * unittests/function-view-selftests.c: New file.
13817         * configure: Regenerate.
13818
13819 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13820
13821         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13822         inferior_ptid.
13823         * go32-nat.c (go32_thread_alive): Likewise.
13824
13825 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13826
13827         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13828         delete.
13829
13830 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13831
13832         * varobj.c (varobj_clear_saved_item): Use delete instead of
13833         xfree.
13834         (update_dynamic_varobj_children): Likewise.
13835
13836 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13837
13838         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13839
13840 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13841
13842         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13843         m_enum_value to 0 in default constructor.
13844
13845 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13846
13847         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13848         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13849         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13850         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13851         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13852         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13853         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13854         IS_STORE_CONDITIONAL_INSN.
13855
13856 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13857
13858         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13859
13860 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13861
13862         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13863
13864 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13865
13866         * dwarf2read.c (skip_one_die, read_attribute_value)
13867         (dwarf2_const_value_attr, dump_die_shallow)
13868         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13869         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13870
13871 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13872
13873         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13874         (dwarf_parse_macro_header): Accept DWARF version 5.
13875         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13876
13877 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13878
13879         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13880         DW_AT_GNU_*.
13881         * common/common-exceptions.h (enum errors): Likewise.
13882         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13883         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13884         (dwarf_expr_context::execute_stack_op): Likewise.
13885         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13886         Likewise.
13887         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13888         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13889         (show_entry_values_debug, call_site_to_target_addr)
13890         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13891         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13892         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13893         (value_of_dwarf_block_entry, indirect_pieced_value)
13894         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13895         (disassemble_dwarf_expression): Likewise.
13896         * dwarf2read.c (process_die, inherit_abstract_dies)
13897         (read_call_site_scope): Likewise.
13898         * gdbtypes.h (struct func_type, struct call_site_parameter)
13899         (struct call_site): Likewise.
13900         * stack.c (read_frame_arg): Likewise.
13901         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13902
13903 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13904
13905         * defs.h (read_unsigned_leb128): New declaration.
13906         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13907         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13908         (dwarf2_find_location_expression): Call also
13909         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13910         * dwarf2loc.h (dwarf2_version): New declaration.
13911         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13912         rnglists.
13913         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13914         .debug_rnglists.
13915         (struct dwop_section_names): Add loclists_dwo.
13916         (dwop_section_names): Add .debug_loclists.dwo.
13917         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13918         (struct dwarf2_per_cu_data): Add dwarf_version.
13919         (struct dwo_sections): Add loclists.
13920         (struct attr_abbrev): Add implicit_const.
13921         (read_indirect_line_string): New declaration.
13922         (read_unsigned_leb128): Delete declaration.
13923         (rcuh_kind): New definition.
13924         (read_and_check_comp_unit_head): Change parameter
13925         is_debug_types_section to section_kind.
13926         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13927         (read_comp_unit_head): Change parameter abfd to section, add parameter
13928         section_kind.  Handle DWARF-5.
13929         (error_check_comp_unit_head): Accept also DWARF version 5.
13930         (read_and_check_comp_unit_head): Change parameter
13931         is_debug_types_section to section_kind.
13932         (read_and_check_type_unit_head): Delete function.
13933         (read_abbrev_offset): Handle DWARF-5.
13934         (create_debug_type_hash_table): Add parameter section_kind.  Process
13935         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13936         comp_unit_head.
13937         (create_debug_types_hash_table): Update create_debug_type_hash_table
13938         caller.
13939         (create_all_type_units): Call create_debug_type_hash_table.
13940         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13941         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13942         caller.
13943         (skip_one_die): Handle DW_FORM_implicit_const.
13944         (dwarf2_rnglists_process): New function.
13945         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13946         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13947         (read_attribute_value): Handle DW_FORM_implicit_const,
13948         DW_FORM_line_strp.
13949         (read_attribute): Handle DW_FORM_implicit_const.
13950         (read_indirect_string_at_offset_from): New function from
13951         read_indirect_string_at_offset.
13952         (read_indirect_string_at_offset): Call
13953         read_indirect_string_at_offset_from.
13954         (read_indirect_line_string_at_offset): New function.
13955         (read_indirect_string): New function comment.
13956         (read_indirect_line_string): New function.
13957         (read_unsigned_leb128): Make it global.
13958         (dwarf2_string_attr): Handle DWARF-5.
13959         (add_include_dir_stub, read_formatted_entries): New functions.
13960         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13961         Handle DWARF-5.
13962         (per_cu_header_read_in): Update read_comp_unit_head caller.
13963         (dwarf2_version): New function.
13964         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13965         rnglists.
13966         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13967         fields.
13968
13969 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13970
13971         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13972
13973 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13974
13975         * dwarf2read.c (dwarf2_ranges_process): New function from
13976         dwarf2_ranges_read.
13977         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13978         dwarf2_ranges_process.
13979
13980 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13981
13982         * dwarf2read.c (create_debug_type_hash_table): New function from
13983         create_debug_types_hash_table.
13984         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13985         (create_all_type_units, open_and_init_dwo_file): Update
13986         create_debug_types_hash_table callers.
13987
13988 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13989
13990         PR gdb/16188
13991         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13992         refer to 'ap', not 'args'.
13993
13994 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13995             Pedro Alves  <palves@redhat.com>
13996
13997         PR gdb/16188
13998         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13999         calls succeeded.
14000         * fork-child.c (trace_start_error): New function.
14001         (trace_start_error_with_name): Likewise.
14002         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14003         * inf-ptrace.c (inf_ptrace_me): Likewise.
14004         * inferior.h (trace_start_error): New prototype.
14005         (trace_start_error_with_name): Likewise.
14006
14007 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14008
14009         PR gdb/21164
14010         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14011         NULL before using it.
14012         * symmisc.c (maintenance_print_symbols): Likewise.
14013         (maintenance_print_msymbols): Likewise.
14014
14015 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14016
14017         * NEWS: Add record Python bindings entry.
14018
14019 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14020
14021         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14022         py-record-full.o.
14023         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14024         * python/py-record-btrace.c, python/py-record-btrace.h,
14025         python/py-record-full.c, python/py-record-full.h: New file.
14026         * python/py-record.c: Add include for py-record-btrace.h and
14027         py-record-full.h.
14028         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14029         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14030         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14031         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14032         New definition.
14033         (gdbpy_initialize_btrace): New export.
14034         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14035
14036 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14037
14038         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14039         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14040         * python/py-record.c: New file.
14041         * python/python-internal.h (gdbpy_start_recording,
14042         gdbpy_current_recording, gdpy_stop_recording,
14043         gdbpy_initialize_record): New export.
14044         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14045         (python_GdbMethods): Add gdbpy_start_recording,
14046         gdbpy_current_recording and gdbpy_stop_recording.
14047
14048 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14049
14050         * record-btrace.c (record_btrace_record_method): New function.
14051         (init_record_btrace_ops): Initialize to_record_method.
14052         * record-full.c (record_full_record_method): New function.
14053         (init_record_full_ops, init_record_full_core_ops): Add
14054         record_full_record_method.
14055         * record.h (enum record_method): New enum.
14056         * target-debug.h (target_debug_print_enum_record_method: New define.
14057         * target-delegates.c: Regenerate.
14058         * target.c (target_record_method): New function.
14059         * target.h: Include record.h.
14060         (struct target_ops) <to_record_method>: New field.
14061         (target_record_method): New export.
14062
14063 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14064
14065         * record.h (record_start, record_stop): New export.
14066         * record.c (record_start, record_stop): New function.
14067
14068 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14069
14070         * btrace.c (btrace_fetch): Copy function call segments pointer
14071         into a vector.
14072         (btrace_clear): Clear the vector.
14073         (btrace_find_insn_by_number): Use binary search to find the correct
14074         function call segment.
14075         * btrace.h (brace_fun_p): New typedef.
14076         (struct btrace_thread_info) <functions>: New field.
14077
14078 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14079
14080         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14081         * btrace.c (btrace_decode_error): ... here.  New function.
14082         * btrace.h (btrace_decode_error): New export.
14083
14084 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14085
14086         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14087         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14088         btrace_find_insn_by_number): Remove special case for gaps.
14089         * btrace.h (btrace_insn_get_error): New export.
14090         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14091         * record-btrace.c (btrace_insn_history): Print number for gaps.
14092         (record_btrace_info, record_btrace_goto): Handle gaps.
14093
14094 2017-02-14  Tom Tromey  <tom@tromey.com>
14095
14096         PR python/13598:
14097         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14098         event.
14099         * python/py-evts.c (gdbpy_initialize_py_events): Add
14100         before_prompt registry.
14101         * python/py-events.h (events_object) <before_prompt>: New field.
14102
14103 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14104
14105         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14106
14107 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14108
14109         * symfile (_initialize_symfile): Add usage text to the load command's
14110         help text.
14111
14112 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14113
14114         * utils.c (defaulted_query): Don't query on secondary UIs.
14115
14116 2017-02-10  Tom Tromey  <tom@tromey.com>
14117
14118         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14119
14120 2017-02-10  Tom Tromey  <tom@tromey.com>
14121
14122         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14123         "cleanup" local.
14124         * python/py-type.c (typy_legacy_template_argument): Remove
14125         unnecessary "cleanup" local.
14126
14127 2017-02-10  Tom Tromey  <tom@tromey.com>
14128
14129         * python/python.c (do_start_initialization): New function, from
14130         _initialize_python.
14131         (_initialize_python): Call do_start_initialization.
14132         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14133         goto.
14134
14135 2017-02-10  Tom Tromey  <tom@tromey.com>
14136
14137         * python/py-prettyprint.c (pretty_print_one_value): Use
14138         gdbpy_ref.
14139
14140 2017-02-10  Tom Tromey  <tom@tromey.com>
14141
14142         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14143         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14144         gdbpy_ref.
14145         * python/py-type.c (field_new): Use gdbpy_ref.
14146         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14147         gdbpy_ref.
14148         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14149         (py_free_pspace): Likewise.
14150         (pspace_to_pspace_object): Likewise.
14151         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14152         (py_free_objfile): Likewise.
14153         (objfile_to_objfile_object): Likewise.
14154         * python/py-inferior.c (delete_thread_object): Use
14155         gdbpy_ref.
14156         (infpy_read_memory): Likewise.
14157         (py_free_inferior): Likewise.
14158         * python/py-evtregistry.c (create_eventregistry_object): Use
14159         gdbpy_ref.
14160         * python/py-event.c (create_event_object): Use gdbpy_ref.
14161
14162 2017-02-10  Tom Tromey  <tom@tromey.com>
14163
14164         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14165         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14166         used.
14167         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14168         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14169         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14170         python/py-framefilter.c, python/py-function.c,
14171         python/py-inferior.c, python/py-infevents.c,
14172         python/py-linetable.c, python/py-newobjfileevent.c,
14173         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14174         python/py-signalevent.c, python/py-stopevent.c,
14175         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14176         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14177         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14178         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14179
14180 2017-02-10  Tom Tromey  <tom@tromey.com>
14181
14182         * ui-out.h (ui_out_emit_type): New class.
14183         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14184         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14185         and ui_out_emit_tuple.
14186         (enumerate_locals): Likewise.
14187         (py_mi_print_variables, py_print_locals, py_print_args): Use
14188         ui_out_emit_list.
14189         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14190         ui_out_emit_list.
14191         * common/gdb_optional.h: New file.
14192
14193 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14194
14195         * MAINTAINERS (Write After Approval): Update my e-mail address.
14196
14197 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14198
14199         PR gdb/21122
14200         * breakpoint.c (_initialize_breakpoint): Update the help description
14201         of the 'commands' command to indicate that it takes a list argument.
14202
14203 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14204
14205         * interps.c (current_interp_set_logging): Remove "return".
14206
14207 2017-02-09  Gary Benson  <gbenson@redhat.com>
14208
14209         * symtab.c (add_symtab_completions): Prevent NULL pointer
14210         dereference.
14211
14212 2017-02-08  Pedro Alves  <palves@redhat.com>
14213
14214         * interps.c (interp::interp): Remove reference to quiet_p.
14215         (interp_set): Make static.  Remove dead "Switching to" output
14216         code.
14217         (interp_quiet_p, interp_set_quiet): Delete.
14218         (interpreter_exec_cmd): Don't set the interpreter quiet.
14219         * interps.h (interp_quiet_p): Make static.
14220         (class interp) <quiet_p>: Remove field
14221
14222 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14223
14224         * cli/cli-decode.c (find_command_name_length): Make it extern.
14225         * cli/cli-decode.h (find_command_name_length): Declare.
14226         * cli/cli-script.c (command_name_equals, line_first_arg):
14227         New functions.
14228         (process_next_line): Use cli-decode to parse command names.
14229         (build_command_line): Make args a constant pointer.
14230
14231 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14232
14233         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14234         Remove case-insensitive search.
14235
14236 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14237
14238         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14239         at the end of the line.  Avoids an ARI warning.
14240
14241 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14242
14243         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14244         rdseed instructions.
14245         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14246
14247 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14248
14249         PR tdep/20936
14250         Provide and use sparc32 and sparc64 target description XML files.
14251         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14252         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14253         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14254         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14255         * features/sparc/sparc32-solaris.xml: New file.
14256         * features/sparc/sparc64-solaris.xml: New file.
14257         * features/sparc/sparc32-solaris.c: Generated.
14258         * features/sparc/sparc64-solaris.c: Generated.
14259         * sparc-tdep.h: Account for differences in target descriptions.
14260         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14261         (sparc32_register_type): Use target provided registers.
14262         (validate_tdesc_registers): New function.
14263         (sparc32_gdbarch_init): Use tdesc_has_registers.
14264         Set pseudoregister functions.
14265         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14266         (sparc64_register_type): Use target provided registers.
14267         (sparc64_init_abi): Set pseudoregister functions.
14268
14269 2017-02-03  Tom Tromey  <tom@tromey.com>
14270
14271         PR rust/21097:
14272         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14273         with a single member.
14274
14275 2017-02-03  Pedro Alves  <palves@redhat.com>
14276
14277         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14278         (cli_interp_base::~cli_interp_base): New.
14279         (cli_interp): New struct.
14280         (as_cli_interp): Cast the interp itself to cli_interp.
14281         (cli_interpreter_pre_command_loop): Rename to ...
14282         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14283         parameter.
14284         (cli_interpreter_init): Rename to ...
14285         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14286         boolean.  Make extern.
14287         (cli_interpreter_resume): Rename to ...
14288         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14289         extern.
14290         (cli_interpreter_suspend): Rename to ...
14291         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14292         extern.
14293         (cli_interpreter_exec): Rename to ...
14294         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14295         extern.
14296         (cli_interpreter_supports_command_editing): Rename to ...
14297         (cli_interp_base::supports_command_editing): ... this.  Remove
14298         'interp' parameter.  Make extern.
14299         (cli_ui_out): Rename to ...
14300         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14301         Make extern.
14302         (cli_set_logging): Rename to ...
14303         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14304         parameter.  Make extern.
14305         (cli_interp_procs): Delete.
14306         (cli_interp_factory): Adjust to use "new".
14307         * cli/cli-interp.h: Include "interps.h".
14308         (struct cli_interp_base): New struct.
14309         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14310         (interp_new): Delete.
14311         (interp::interp, interp::~interp): New.
14312         (interp_set): Use bool, and return void.  Assume the interpreter
14313         has suspend, init and resume methods, and that the all return
14314         void.
14315         (set_top_level_interpreter): interp_set returns void.
14316         (interp_ui_out): Adapt.
14317         (current_interp_set_logging): Adapt.
14318         (interp_data): Delete.
14319         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14320         (interp_exec): Adapt.
14321         (top_level_interpreter_data): Delete.
14322         * interps.h (interp_init_ftype, interp_resume_ftype)
14323         (interp_suspend_ftype, interp_exec_ftype)
14324         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14325         (class interp): New.
14326         (interp_new): Delete.
14327         (interp_set): Now returns void.  Use bool.
14328         (interp_data, top_level_interpreter_data): Delete.
14329         * mi/mi-common.h: Include interps.h.
14330         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14331         init, resume, suspect, exec, interp_ui_out, set_logging and
14332         pre_command_loop methods.
14333         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14334         (mi_interpreter_init): Rename to ...
14335         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14336         bool, return void and make extern.  Adjust.
14337         (mi_interpreter_resume): ... Rename to ...
14338         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14339         return void and make extern.  Adjust.
14340         (mi_interpreter_suspend): ... Rename to ...
14341         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14342         return void and make extern.  Adjust.
14343         (mi_interpreter_exec): ... Rename to ...
14344         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14345         extern.  Adjust.
14346         (mi_interpreter_pre_command_loop): ... Rename to ...
14347         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14348         parameter and make extern.
14349         (mi_on_normal_stop_1): Adjust.
14350         (mi_ui_out): Rename to ...
14351         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14352         parameter and make extern.  Adjust.
14353         (mi_set_logging): Rename to ...
14354         (mi_interp::set_logging): ... this.  Remove the 'interp'
14355         parameter and make extern.  Adjust.
14356         (mi_interp_procs): Delete.
14357         (mi_interp_factory): Adjust to use 'new'.
14358         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14359         (mi_print_exception, mi_execute_command, mi_load_progress):
14360         Adjust.
14361         * tui/tui-interp.c (tui_interp): New class.
14362         (as_tui_interp): Return a tui_interp pointer.
14363         (tui_on_normal_stop, tui_on_signal_received)
14364         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14365         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14366         to use interp::interp_ui_out.
14367         (tui_init): Rename to ...
14368         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14369         bool, return void and make extern.  Adjust.
14370         (tui_resume): Rename to ...
14371         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14372         return void and make extern.  Adjust.
14373         (tui_suspend): Rename to ...
14374         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14375         return void and make extern.  Adjust.
14376         (tui_ui_out): Rename to ...
14377         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14378         parameter, and make extern.  Adjust.
14379         (tui_exec): Rename to ...
14380         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14381         make extern.
14382         (tui_interp_procs): Delete.
14383         (tui_interp_factory): Use "new".
14384
14385 2017-02-02  Tom Tromey  <tom@tromey.com>
14386
14387         * rust-exp.y (ends_raw_string, space_then_number)
14388         (rust_identifier_start_p): Return bool.
14389         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14390         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14391         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14392         (rust_chartype_p): Return bool.
14393         (val_print_struct, rust_print_struct_def, rust_print_type):
14394         Update.
14395         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14396         Return bool.
14397
14398 2017-02-02  Tom Tromey  <tom@tromey.com>
14399
14400         * rust-lang.c: Reindent.
14401
14402 2017-02-02  Tom Tromey  <tom@tromey.com>
14403
14404         * rust-lang.h (rust_crate_for_block): Update.
14405         * rust-lang.c (rust_crate_for_block): Return std::string.
14406         (rust_get_disr_info): Use std:;string, not
14407         gdb::unique_xmalloc_ptr.
14408         * rust-exp.y (crate_name): Update.
14409
14410 2017-02-02  Pedro Alves  <palves@redhat.com>
14411
14412         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14413         field out of gdb_disassembler_test and make it static.
14414
14415 2017-02-02  Pedro Alves  <palves@redhat.com>
14416
14417         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14418         mi1_interp and mi_interp fields.
14419
14420 2017-02-02  Pedro Alves  <palves@redhat.com>
14421
14422         * cli/cli-interp.c (struct saved_output_files, saved_output):
14423         Moved from cli/cli-logging.c.
14424         (cli_set_logging): New function.
14425         (cli_interp_procs): Install cli_set_logging.
14426         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14427         Declare.
14428         * cli/cli-logging.c (struct saved_output_files, saved_output):
14429         Moved to cli/cli-interp.c.
14430         (pop_output_files): Don't save outputs here.
14431         (make_logging_output): New function.
14432         (handle_redirections): Don't build tee nor save previous outputs
14433         here.
14434         * interps.c (current_interp_set_logging): Change prototype.
14435         Assume there's always a set_logging_proc method installed.
14436         * interps.h (interp_set_logging_ftype): Change prototype.
14437         (current_interp_set_logging): Change prototype and adjust comment.
14438         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14439         use make_logging_output.
14440         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14441 2017-02-02  Pedro Alves  <palves@redhat.com>
14442
14443         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14444         from ...
14445         (set_logging_overwrite): ... here.
14446         (logging_no_redirect_file): Delete.
14447         (set_logging_redirect): Don't handle redirection on the fly.
14448         Instead warn that "logging off" / "logging on" is necessary.
14449         (pop_output_files): Delete references to logging_no_redirect_file.
14450         (show_logging_command): Always speak in terms of what will happen
14451         once logging is reenabled.
14452
14453 2017-02-02  Pedro Alves  <palves@redhat.com>
14454
14455         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14456
14457 2017-02-02  Pedro Alves  <palves@redhat.com>
14458
14459         * disasm.c (gdb_pretty_print_insn): Rename to ...
14460         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14461         Remove gdbarch parameter.  Adapt to clear the object's buffers
14462         instead of allocating new buffers, and to print using the object's
14463         gdb_disassembler instead of calling gdb_print_insn.
14464         (dump_insns): Use gdb_pretty_print_disassembler.
14465         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14466         (gdb_pretty_print_disassembler): New class.
14467         * record-btrace.c (btrace_insn_history): Use
14468         gdb_pretty_print_disassembler.
14469
14470 2017-02-02  Pedro Alves  <palves@redhat.com>
14471
14472         * ada-lang.c (type_as_string): Use string_file.
14473         * ada-valprint.c (ada_print_floating): Use string_file.
14474         * ada-varobj.c (ada_varobj_scalar_image)
14475         (ada_varobj_get_value_image): Use string_file.
14476         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14477         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14478         * breakpoint.c (update_inserted_breakpoint_locations)
14479         (insert_breakpoint_locations, reattach_breakpoints)
14480         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14481         (print_it_watchpoint): Use string_file.
14482         (save_breakpoints): Use stdio_file.
14483         * c-exp.y (oper): Use string_file.
14484         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14485         tee_file.
14486         (pop_output_files): Use delete.
14487         (handle_redirections): Use stdio_file and tee_file.
14488         * cli/cli-setshow.c (do_show_command): Use string_file.
14489         * compile/compile-c-support.c (c_compute_program): Use
14490         string_file.
14491         * compile/compile-c-symbols.c (generate_vla_size): Take a
14492         'string_file &' instead of a 'ui_file *'.
14493         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14494         of a 'ui_file *'.  Use string_file.
14495         (generate_c_for_variable_locations): Take a 'string_file &'
14496         instead of a 'ui_file *'.
14497         * compile/compile-internal.h (generate_c_for_for_one_variable):
14498         Take a 'string_file &' instead of a 'ui_file *'.
14499         * compile/compile-loc2c.c (push, pushf, unary, binary)
14500         (print_label, pushf_register_address, pushf_register)
14501         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14502         'ui_file *'.  Adjust.
14503         * compile/compile.c (compile_to_object): Use string_file.
14504         * compile/compile.h (compile_dwarf_expr_to_c)
14505         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14506         'ui_file *'.
14507         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14508         (replace_typedefs_qualified_name): Use string_file and
14509         obstack_copy0.
14510         * disasm.c (gdb_pretty_print_insn): Use string_file.
14511         (gdb_disassembly): Adjust reference the null_stream global.
14512         (do_ui_file_delete): Delete.
14513         (gdb_insn_length): Use null_stream.
14514         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14515         * dwarf2loc.c (dwarf2_compile_property_to_c)
14516         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14517         'string_file &' instead of a 'ui_file *'.
14518         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14519         * dwarf2read.c (do_ui_file_peek_last): Delete.
14520         (dwarf2_compute_name): Use string_file.
14521         * event-top.c (gdb_setup_readline): Use stdio_file.
14522         * gdbarch.sh (verify_gdbarch): Use string_file.
14523         * gdbtypes.c (safe_parse_type): Use null_stream.
14524         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14525         string_file.
14526         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14527         'string_file *' instead of a 'ui_file *'.
14528         (gdbscm_arch_disassemble): Use string_file.
14529         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14530         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14531         inherits from ui_file.
14532         (ioscm_file_port_delete, ioscm_file_port_rewind)
14533         (ioscm_file_port_put): Delete.
14534         (ioscm_file_port_write): Rename to ...
14535         (ioscm_file_port::write): ... this.  Remove file_port_magic
14536         checks.
14537         (ioscm_file_port_new): Delete.
14538         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14539         ui_file_up.
14540         * guile/scm-type.c (tyscm_type_name): Use string_file.
14541         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14542         Use string_file.
14543         * infcmd.c (print_return_value_1): Use string_file.
14544         * infrun.c (print_target_wait_results): Use string_file.
14545         * language.c (add_language): Use string_file.
14546         * location.c (explicit_to_string_internal): Use string_file.
14547         * main.c (captured_main_1): Use null_file.
14548         * maint.c (maintenance_print_architecture): Use stdio_file.
14549         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14550         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14551         event_channel>: Change type to mi_console_file pointer.
14552         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14553         (mi_console_file_delete): Delete.
14554         (struct mi_console_file): Delete.
14555         (mi_console_file_magic): Delete.
14556         (mi_console_file_new): Delete.
14557         (mi_console_file::mi_console_file): New.
14558         (mi_console_file_delete): Delete.
14559         (mi_console_file_fputs): Delete.
14560         (mi_console_file::write): New.
14561         (mi_console_raw_packet): Delete.
14562         (mi_console_file::flush): New.
14563         (mi_console_file_flush): Delete.
14564         (mi_console_set_raw): Rename to ...
14565         (mi_console_file::set_raw): ... this.
14566         * mi/mi-console.h (class mi_console_file): New class.
14567         (mi_console_file_new, mi_console_set_raw): Delete.
14568         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14569         (mi_set_logging): Use delete and tee_file.  Adjust.
14570         * mi/mi-main.c (output_register): Use string_file.
14571         (mi_cmd_data_evaluate_expression): Use string_file.
14572         (mi_cmd_data_read_memory): Use string_file.
14573         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14574         * mi/mi-out.c (mi_ui_out::main_stream): New.
14575         (mi_ui_out::rewind): Use main_stream and
14576         string_file.
14577         (mi_ui_out::put): Use main_stream and string_file.
14578         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14579         Allocate a 'string_file' instead.
14580         (mi_out_new): Don't allocate a mem_fileopen stream here.
14581         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14582         (mi_ui_out::main_stream): Declare method.
14583         * printcmd.c (eval_command): Use string_file.
14584         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14585         * python/py-arch.c (archpy_disassemble): Use string_file.
14586         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14587         * python/py-frame.c (frapy_str): Use string_file.
14588         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14589         Use string_file.
14590         * python/py-type.c (typy_str): Use string_file.
14591         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14592         * python/py-value.c (valpy_str): Use string_file.
14593         * record-btrace.c (btrace_insn_history): Use string_file.
14594         * regcache.c (regcache_print): Use stdio_file.
14595         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14596         * remote.c (escape_buffer): Use string_file.
14597         * rust-lang.c (rust_get_disr_info): Use string_file.
14598         * serial.c (serial_open_ops_1): Use stdio_file.
14599         (do_serial_close): Use delete.
14600         * stack.c (print_frame_arg): Use string_file.
14601         (print_frame_args): Remove local mem_fileopen stream, not used.
14602         (print_frame): Use string_file.
14603         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14604         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14605         Take a 'string_file *' instead of a 'ui_file *'.
14606         * top.c (new_ui): Use stdio_file and stderr_file.
14607         (free_ui): Use delete.
14608         (execute_command_to_string): Use string_file.
14609         (quit_confirm): Use string_file.
14610         * tracepoint.c (collection_list::append_exp): Use string_file.
14611         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14612         * tui/tui-file.c: Don't include "ui-file.h".
14613         (enum streamtype, struct tui_stream): Delete.
14614         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14615         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14616         (tui_file::tui_file): New method.
14617         (tui_file_fputs): Delete.
14618         (tui_file_get_strbuf): Delete.
14619         (tui_file::puts): New method.
14620         (tui_file_adjust_strbuf): Delete.
14621         (tui_file_flush): Delete.
14622         (tui_file::flush): New method.
14623         * tui/tui-file.h: Tweak intro comment.
14624         Include ui-file.h.
14625         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14626         (tui_file_adjust_strbuf): Delete declarations.
14627         (class tui_file): New class.
14628         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14629         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14630         (tui_register_format): Use string_stream.
14631         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14632         (tui_get_function_from_frame): Use string_file.
14633         * typeprint.c (type_to_string): Use string_file.
14634         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14635         (null_stream): New global.
14636         (ui_file_delete): Delete.
14637         (ui_file::ui_file): New.
14638         (null_file_isatty): Delete.
14639         (ui_file::~ui_file): New.
14640         (null_file_rewind): Delete.
14641         (ui_file::printf): New.
14642         (null_file_put): Delete.
14643         (null_file_flush): Delete.
14644         (ui_file::putstr): New.
14645         (null_file_write): Delete.
14646         (ui_file::putstrn): New.
14647         (null_file_read): Delete.
14648         (ui_file::putc): New.
14649         (null_file_fputs): Delete.
14650         (null_file_write_async_safe): Delete.
14651         (ui_file::vprintf): New.
14652         (null_file_delete): Delete.
14653         (null_file::write): New.
14654         (null_file_fseek): Delete.
14655         (null_file::puts): New.
14656         (ui_file_data): Delete.
14657         (null_file::write_async_safe): New.
14658         (gdb_flush, ui_file_isatty): Adjust.
14659         (ui_file_put, ui_file_rewind): Delete.
14660         (ui_file_write): Adjust.
14661         (ui_file_write_for_put): Delete.
14662         (ui_file_write_async_safe, ui_file_read): Adjust.
14663         (ui_file_fseek): Delete.
14664         (fputs_unfiltered): Adjust.
14665         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14666         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14667         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14668         (set_ui_file_data): Delete.
14669         (string_file::~string_file, string_file::write)
14670         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14671         (do_ui_file_as_string, ui_file_as_string): Delete.
14672         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14673         (struct mem_file): Delete.
14674         (mem_file_new): Delete.
14675         (stdio_file::stdio_file): New.
14676         (mem_file_delete): Delete.
14677         (stdio_file::stdio_file): New.
14678         (mem_fileopen): Delete.
14679         (stdio_file::~stdio_file): New.
14680         (mem_file_rewind): Delete.
14681         (stdio_file::set_stream): New.
14682         (mem_file_put): Delete.
14683         (stdio_file::open): New.
14684         (mem_file_write): Delete.
14685         (stdio_file_magic, struct stdio_file): Delete.
14686         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14687         (stdio_file::flush): New.
14688         (stdio_file_read): Rename to ...
14689         (stdio_file::read): ... this.  Adjust.
14690         (stdio_file_write): Rename to ...
14691         (stdio_file::write): ... this.  Adjust.
14692         (stdio_file_write_async_safe): Rename to ...
14693         (stdio_file::write_async_safe) ... this.  Adjust.
14694         (stdio_file_fputs): Rename to ...
14695         (stdio_file::puts) ... this.  Adjust.
14696         (stdio_file_isatty): Delete.
14697         (stdio_file_fseek): Delete.
14698         (stdio_file::isatty): New.
14699         (stderr_file_write): Rename to ...
14700         (stderr_file::write) ... this.  Adjust.
14701         (stderr_file_fputs): Rename to ...
14702         (stderr_file::puts) ... this.  Adjust.
14703         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14704         (stderr_file::stderr_file): New.
14705         (tee_file_magic): Delete.
14706         (struct tee_file): Delete.
14707         (tee_file::tee_file): New.
14708         (tee_file_new): Delete.
14709         (tee_file::~tee_file): New.
14710         (tee_file_delete): Delete.
14711         (tee_file_flush): Rename to ...
14712         (tee_file::flush): ... this.  Adjust.
14713         (tee_file_write): Rename to ...
14714         (tee_file::write): ... this.  Adjust.
14715         (tee_file::write_async_safe): New.
14716         (tee_file_fputs): Rename to ...
14717         (tee_file::puts): ... this.  Adjust.
14718         (tee_file_isatty): Rename to ...
14719         (tee_file::isatty): ... this.  Adjust.
14720         * ui-file.h (struct obstack, struct ui_file): Don't
14721         forward-declare.
14722         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14723         (ui_file_write_ftype)
14724         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14725         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14726         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14727         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14728         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14729         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14730         (set_ui_file_fseek): Delete.
14731         (ui_file_data, ui_file_delete, ui_file_rewind)
14732         (struct ui_file): New.
14733         (ui_file_up): New.
14734         (class null_file): New.
14735         (null_stream): Declare.
14736         (ui_file_write_for_put, ui_file_put): Delete.
14737         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14738         Delete.
14739         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14740         (gdb_fopen, tee_file_new): Delete.
14741         (struct string_file): New.
14742         (struct stdio_file): New.
14743         (stdio_file_up): New.
14744         (struct stderr_file): New.
14745         (class tee_file): New.
14746         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14747         of a 'ui_file *'.  Adjust.
14748         * ui-out.h (class ui_out) <field_stream>: Likewise.
14749         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14750         (null_stream): Delete.
14751         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14752         Adjust.
14753         * utils.h (struct ui_file): Delete forward declaration..
14754         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14755         (error_stream): Take a 'string_file &' instead of a
14756         'ui_file *'.
14757         * varobj.c (varobj_value_get_print_value): Use string_file.
14758         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14759         * gdbarch.c: Regenerate.
14760
14761 2017-02-02  Pedro Alves  <palves@redhat.com>
14762
14763         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14764         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14765         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14766         Adjust to call gdb_print_insn instead of
14767         gdb_disassembler::print_insn.
14768         (dump_insns, do_mixed_source_and_assembly_deprecated)
14769         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14770         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14771         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14772         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14773         declaration.
14774         (gdb_pretty_print_insn): Re-add declaration.
14775         * record-btrace.c (btrace_insn_history): Don't allocate a
14776         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14777
14778 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14779
14780         * disasm.h (gdb_disassembly): Remove file_string parameter.
14781         * disasm.c (gdb_disassembly): Likewise.
14782         * cli/cli-cmds.c (print_disassembly): Adapt.
14783         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14784         * stack.c (do_gdb_disassembly): Likewise.
14785
14786 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14787
14788         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14789         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14790         targets.  And if the implicit value is longer than needed, extract
14791         the first bytes instead of the "least significant" ones.
14792
14793 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14794
14795         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14796         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14797         (btrace_fetch): Assert can_access_registers_ptid.
14798         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14799         validate_registers_access.
14800
14801 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14802
14803         * gdbthread.h (can_access_registers_ptid): New.
14804         * thread.c (can_access_registers_ptid): New.
14805
14806 2017-02-01  Pedro Alves  <palves@redhat.com>
14807
14808         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14809
14810 2017-01-31  Pedro Alves  <palves@redhat.com>
14811
14812         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14813         Fix typos.
14814
14815 2017-01-31  Pedro Alves  <palves@redhat.com>
14816
14817         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14818         not used.
14819
14820 2017-01-31  Pedro Alves  <palves@redhat.com>
14821
14822         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14823
14824 2017-01-31  Pedro Alves  <palves@redhat.com>
14825
14826         * common/scoped_restore.h
14827         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14828         change the value's parameter type to T2.
14829         (make_scoped_restore): Likewise.
14830
14831 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14832             Richard Henderson  <rth@redhat.com>
14833
14834         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14835         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14836         GS_BASE for older kernels.
14837         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14838         GS_BASE for older kernels.
14839         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14840         and GS_BASE to the offset table.
14841         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14842         system register group.
14843         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14844         for older kernels.
14845         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14846         amd64 ABI.
14847         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14848         AMD64_GSBASE_REGNUM.
14849         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14850         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14851         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14852         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14853         i386/64bit-segments.xml in those rules.
14854         * features/i386/64bit-segments.xml: New file.
14855         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14856         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14857         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14858         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14859         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14860         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14861         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14862         * features/i386/amd64-avx-linux.c: Regenerated.
14863         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14864         * features/i386/amd64-avx-mpx.c: Regenerated.
14865         * features/i386/amd64-avx512-linux.c: Regenerated.
14866         * features/i386/amd64-linux.c: Regenerated.
14867         * features/i386/amd64-mpx-linux.c: Regenerated.
14868         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14869         * features/i386/i386-avx-mpx.c: Regenerated.
14870         * features/i386/x32-avx-linux.c: Regenerated.
14871         * features/i386/x32-avx512-linux.c: Regenerated.
14872         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14873         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14874         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14875         * regformats/i386/amd64-linux.dat: Regenerated.
14876         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14877         * regformats/i386/x32-avx-linux.dat: Regenerated.
14878         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14879         * regformats/i386/x32-linux.dat: Regenerated.
14880
14881 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14882
14883         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14884         Set to AMD64_NUM_REGS.
14885
14886 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14887
14888         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14889         that checks validity of a register number.
14890
14891 2017-01-27  Kees Cook  <keescook@google.com>
14892
14893         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14894         fetch_fpregs if target has fpa registers.
14895         (arm_linux_store_inferior_registers): Call store_fpregs if target
14896         has fpa registers.
14897
14898 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14899
14900         * cris-tdep.c (cris_gdbarch_init): Remove check for
14901         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14902
14903 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14904
14905         * corelow.c (get_core_register_section): Check for regset
14906         existence before checking for REGSET_VARIABLE_SIZE.
14907
14908 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14909             Pedro Alves  <palves@redhat.com>
14910
14911         PR gdb/20939
14912         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14913         call memory_error, save memaddr instead.
14914         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14915         negative, cal memory_error.
14916         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14917
14918 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14919
14920         * disasm-selftests.c (memory_error_test): New function.
14921         (_initialize_disasm_selftests): Register memory_error_test.
14922
14923 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14924
14925         * Makefile.in (SFILES): Add disasm-selftests.c and
14926         selftest-arch.c.
14927         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14928         * disasm-selftests.c: New file.
14929         * selftest-arch.c: New file.
14930         * selftest-arch.h: New file.
14931
14932 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14933
14934         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14935         to bfd_arch_mep.  Don't return 0 if section is not
14936         found.  Call print_insn_mep.
14937
14938 2017-01-26  Pedro Alves  <palves@redhat.com>
14939             Yao Qi  <yao.qi@linaro.org>
14940
14941         * arm-tdep.c: Include "disasm.h".
14942         (gdb_print_insn_arm): Update code to get gdbarch.
14943         * disasm.c (dis_asm_read_memory): Change it to
14944         gdb_disassembler::dis_asm_read_memory.
14945         (dis_asm_memory_error): Likewise.
14946         (dis_asm_print_address): Likewise.
14947         (gdb_pretty_print_insn): Change it to
14948         gdb_disassembler::pretty_print_insn.
14949         (dump_insns): Add one argument gdb_disassemlber.  All
14950         callers updated.
14951         (do_mixed_source_and_assembly_deprecated): Likewise.
14952         (do_mixed_source_and_assembly): Likewise.
14953         (do_assembly_only): Likewise.
14954         (gdb_disassembler::gdb_disassembler): New.
14955         (gdb_disassembler::print_insn): New.
14956         * disasm.h (class gdb_disassembler): New.
14957         (gdb_pretty_print_insn): Remove declaration.
14958         (gdb_disassemble_info): Likewise.
14959         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14960         (gdbscm_disasm_read_memory_worker): Update.
14961         (gdbscm_disasm_read_memory): Update.
14962         (gdbscm_disasm_memory_error): Remove.
14963         (gdbscm_disasm_print_address): Remove.
14964         (gdbscm_disassembler::gdbscm_disassembler): New.
14965         (gdbscm_print_insn_from_port): Update.
14966         * mips-tdep.c: Include disasm.h.
14967         (gdb_print_insn_mips): Update code to get gdbarch.
14968         * record-btrace.c (btrace_insn_history): Update.
14969         * spu-tdep.c: Include disasm.h.
14970         (struct spu_dis_asm_data): Remove.
14971         (struct spu_dis_asm_info): New.
14972         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14973         SPU id.
14974         (gdb_print_insn_spu): Cast disassemble_info to
14975         spu_dis_asm_info.
14976
14977 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14978
14979         * disasm.c (do_ui_file_delete): Delete.
14980         (gdb_insn_length): Move code creating stream to ...
14981         * utils.c (null_stream): ... here.  New function.
14982         * utils.h (null_stream): Declare.
14983
14984 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14985
14986         * python/py-inferior.c (find_thread_object): Return directly
14987         from the loop.  Remove "found" variable.
14988
14989 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14990
14991         GDB 7.12.1 released.
14992
14993 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14994
14995         * python/py-function.c (fnpy_call): Reorder declarations to have
14996         the gdbpy_enter object declared first.
14997         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14998
14999 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15000
15001         PR python/21068
15002         * python/python-internal.h (PyMem_RawMalloc): Define for
15003         Python < 3.4.
15004         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15005         PyMem_RawMalloc instead of PyMem_Malloc.
15006
15007 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15008             Luis Machado  <lgustavo@codesourcery.com>
15009
15010         * NEWS (New commands): Mention flash-erase.
15011         (New MI commands): Mention target-flash-erase.
15012         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15013         command.
15014         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15015         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15016         * target.c (flash_erase_command): New function.
15017         (initialize_targets): Add new flash-erase command.
15018         * target.h (flash_erase_command): New declaration.
15019
15020 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15021
15022         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15023         HAVE_SYS_PROCFS_H is defined.
15024
15025 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15026
15027         * remote.c (struct cached_reg): Change data into a pointer.
15028         * (stop_reply_dtr): Free data pointers before deleting vector.
15029         (process_stop_reply): Likewise.
15030         (remote_parse_stop_reply): Allocate space for data
15031
15032 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15033
15034         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15035         MAX_REGISTER_SIZE.
15036         (amd64_pseudo_register_read_value): Likewise.
15037         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15038         (store_register_using_P): Likewise.
15039         * regcache.c (regcache_xfer_part): Likewise.
15040
15041 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15042
15043         Split real and pseudo registers.
15044         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15045         (sparc32_pseudo_regnum): New enum.
15046         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15047         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15048         (SPARC32_CP0_REGISTERS): New macro.
15049         (sparc32_pseudo_register_name): New function.
15050         (sparc32_register_name): Use sparc32_pseudo_register_name.
15051         (sparc32_pseudo_register_type): New function.
15052         (sparc32_register_type): Use sparc32_pseudo_register_type.
15053         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15054         pseudo register numbers.
15055         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15056         (SPARC64_CP0_REGISTERS): New macro.
15057         (sparc64_pseudo_register_name): New function.
15058         (sparc64_register_name): Use sparc64_pseudo_register_name.
15059         (sparc64_pseudo_register_type): New function.
15060         (sparc64_register_type): Use sparc64_pseudo_register_type.
15061         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15062         pseudo register numbers.
15063         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15064         sparc64_store_arguments): Handle pseudo register numbers.
15065
15066 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15067
15068         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15069         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15070         output.
15071         (getpkt_or_notif_sane_1): Likewise.
15072
15073 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15074
15075         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15076         of CC.  Pass "-x c++-header" instead of "-x c".
15077
15078 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15079
15080         * remote.c (remote_can_async_p): Update comment.
15081
15082 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15083
15084         * linux-nat.c (linux_nat_can_async_p): Update comment.
15085
15086 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15087
15088         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15089
15090 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15091
15092         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15093
15094 2017-01-10  Tom Tromey  <tom@tromey.com>
15095
15096         * python/py-type.c (typy_legacy_template_argument): Update.
15097         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15098         ~demangle_parse_info): Declare new members.
15099         (cp_demangled_name_to_comp): Return unique_ptr.
15100         (cp_demangled_name_parse_free)
15101         (make_cleanup_cp_demangled_name_parse_free)
15102         (cp_new_demangle_parse_info): Remove.
15103         * cp-support.c (do_demangled_name_parse_free_cleanup)
15104         (make_cleanup_cp_demangled_name_parse_free): Remove.
15105         (inspect_type, cp_canonicalize_string_full)
15106         (cp_canonicalize_string): Update.
15107         (mangled_name_to_comp): Change return type.
15108         (cp_class_name_from_physname, method_name_from_physname)
15109         (cp_func_name, cp_remove_params): Update.
15110         * cp-name-parser.y (demangle_parse_info): New constructor, from
15111         cp_new_demangle_parse_info.
15112         (~demangle_parse_info): New destructor, from
15113         cp_demangled_name_parse_free.
15114         (cp_merge_demangle_parse_infos): Update.
15115         (cp_demangled_name_to_comp): Change return type.
15116
15117 2017-01-10  Tom Tromey  <tom@tromey.com>
15118
15119         * top.c (prevent_dont_repeat): Change return type.
15120         * python/python.c (execute_gdb_command): Use std::string.
15121         Update.
15122         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15123         * command.h (prevent_dont_repeat): Change return type.
15124         * breakpoint.c (bpstat_do_actions_1): Update.
15125
15126 2017-01-10  Tom Tromey  <tom@tromey.com>
15127
15128         * value.h (scoped_value_mark::~scoped_value_mark): Call
15129         free_to_mark.
15130         (scoped_value_mark::free_to_mark): New method.
15131         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15132         scoped_value_mark.
15133
15134 2017-01-10  Tom Tromey  <tom@tromey.com>
15135
15136         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15137         (valpy_reference_value, valpy_const_value, valpy_get_address)
15138         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15139         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15140         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15141         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15142         scoped_value_mark.
15143         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15144         * value.h (scoped_value_mark): New class.
15145
15146 2017-01-10  Tom Tromey  <tom@tromey.com>
15147
15148         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15149         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15150         * psymtab.c (discard_psymtabs_upto): Remove.
15151         (make_cleanup_discard_psymtabs): Remove.
15152         (struct psymtab_state): Remove.
15153
15154 2017-01-10  Tom Tromey  <tom@tromey.com>
15155
15156         * record-full.c (record_full_save_cleanups): Remove.
15157         (record_full_save): Use gdb::unlinker.
15158         * gcore.c (do_bfd_delete_cleanup): Remove.
15159         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15160         cleanups.
15161         * dwarf2read.c (unlink_if_set): Remove.
15162         (write_psymtabs_to_index): Use gdb::unlinker.
15163         * common/gdb_unlinker.h: New file.
15164
15165 2017-01-10  Tom Tromey  <tom@tromey.com>
15166
15167         * windows-tdep.c (windows_xfer_shared_library): Update.
15168         * windows-nat.c (windows_make_so): Update.
15169         * utils.h (make_cleanup_bfd_unref): Remove.
15170         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15171         * symfile.h (symfile_bfd_open)
15172         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15173         * symfile.c (read_symbols, symbol_file_add)
15174         (separate_debug_file_exists): Update.
15175         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15176         (generic_load, reread_symbols): Update.
15177         * symfile-mem.c (symbol_file_add_from_memory): Update.
15178         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15179         (spu_symbol_file_add_from_memory): Update.
15180         * solist.h (struct target_so_ops) <bfd_open>: Return
15181         gdb_bfd_ref_ptr.
15182         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15183         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15184         gdb_bfd_ref_ptr.
15185         (solib_map_sections, reload_shared_libraries_1): Update.
15186         * solib-svr4.c (enable_break): Update.
15187         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15188         * solib-frv.c (enable_break2): Update.
15189         * solib-dsbt.c (enable_break): Update.
15190         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15191         gdb_bfd_ref_ptr.
15192         (darwin_solib_get_all_image_info_addr_at_init): Update.
15193         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15194         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15195         * record-full.c (record_full_save): Update.
15196         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15197         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15198         * minidebug.c (find_separate_debug_file_in_section): Return
15199         gdb_bfd_ref_ptr.
15200         * machoread.c (macho_add_oso_symfile): Change abfd to
15201         gdb_bfd_ref_ptr.
15202         (macho_symfile_read_all_oso): Update.
15203         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15204         (macho_symfile_read): Update.
15205         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15206         (jit_bfd_try_read_symtab): Update.
15207         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15208         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15209         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15210         gdb_bfd_ref_ptr.
15211         (gdb_bfd_ref_policy): New struct.
15212         (gdb_bfd_ref_ptr): New typedef.
15213         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15214         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15215         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15216         gdb_bfd_ref_ptr.
15217         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15218         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15219         (gcore_command): Update.
15220         * exec.c (exec_file_attach): Update.
15221         * elfread.c (elf_symfile_read): Update.
15222         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15223         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15224         (open_and_init_dwo_file): Update.
15225         (open_dwp_file): Return gdb_bfd_ref_ptr.
15226         (open_and_init_dwp_file): Update.
15227         * corelow.c (core_open): Update.
15228         * compile/compile-object-load.c (compile_object_load): Update.
15229         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15230         * coffread.c (coff_symfile_read): Update.
15231         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15232         gdb_bfd_ref_ptr.  Rename.
15233         (dump_bfd_file, restore_command): Update.
15234         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15235         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15236         (find_separate_debug_file_by_buildid): Update.
15237
15238 2017-01-10  Tom Tromey  <tom@tromey.com>
15239
15240         * common/gdb_ref_ptr.h: New file.
15241         * python/py-ref.h (struct gdbpy_ref_policy): New.
15242         (gdbpy_ref): Now a typedef.
15243
15244 2017-01-10  Tom Tromey  <tom@tromey.com>
15245
15246         * utils.h (make_cleanup_htab_delete): Don't declare.
15247         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15248         Remove.
15249         * linespec.c (decode_compound_collector): Add constructor,
15250         destructor.
15251         (lookup_prefix_sym): Remove cleanup.
15252         (symtab_collector): Add constructor, destructor.
15253         (collect_symtabs_from_filename): Remove cleanup.
15254         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15255         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15256         Use htab_up.
15257         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15258         * dwarf2read.c (dw2_expand_symtabs_matching)
15259         (dw2_map_symbol_filenames, dwarf_decode_macros)
15260         (write_psymtabs_to_index): Use htab_up.
15261         * dwarf2loc.c (func_verify_no_selftailcall)
15262         (call_site_find_chain_1, func_verify_no_selftailcall)
15263         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15264         std::vector, gdb::unique_xmalloc_ptr.
15265         (call_sitep): Remove typedef.
15266         (dwarf2_locexpr_baton_eval): Remove unused variable.
15267
15268 2017-01-10  Tom Tromey  <tom@tromey.com>
15269
15270         * python/python-internal.h (make_cleanup_py_decref)
15271         (make_cleanup_py_xdecref): Don't declare.
15272         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15273         (py_xdecref, make_cleanup_py_xdecref): Remove.
15274
15275 2017-01-10  Tom Tromey  <tom@tromey.com>
15276
15277         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15278         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15283
15284 2017-01-10  Tom Tromey  <tom@tromey.com>
15285
15286         * python/py-utils.c (unicode_to_encoded_string)
15287         (python_string_to_target_string)
15288         (python_string_to_target_python_string)
15289         (python_string_to_host_string, gdbpy_obj_to_string)
15290         (get_addr_from_python): Use gdbpy_ref.
15291
15292 2017-01-10  Tom Tromey  <tom@tromey.com>
15293
15294         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15295         gdbpy_ref.
15296
15297 2017-01-10  Tom Tromey  <tom@tromey.com>
15298
15299         * python/python.c (eval_python_command, gdbpy_decode_line)
15300         (gdbpy_run_events, gdbpy_start_type_printers)
15301         (gdbpy_apply_type_printers): Use gdbpy_ref.
15302
15303 2017-01-10  Tom Tromey  <tom@tromey.com>
15304
15305         * python/py-param.c (get_doc_string, compute_enum_values): Use
15306         gdbpy_ref.
15307
15308 2017-01-10  Tom Tromey  <tom@tromey.com>
15309
15310         * python/py-inferior.c (find_thread_object, build_inferior_list):
15311         Use gdbpy_ref.
15312
15313 2017-01-10  Tom Tromey  <tom@tromey.com>
15314
15315         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15320         gdbpy_ref.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15325         extra incref.
15326         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15327         Use gdbpy_ref.
15328
15329 2017-01-10  Tom Tromey  <tom@tromey.com>
15330
15331         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15332         gdbpy_ref.
15333
15334 2017-01-10  Tom Tromey  <tom@tromey.com>
15335
15336         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15337         decref results of PyArg_ParseTupleAndKeywords.
15338
15339 2017-01-10  Tom Tromey  <tom@tromey.com>
15340
15341         * python/python.c (python_run_simple_file): Use
15342         unique_xmalloc_ptr, gdbpy_ref.
15343
15344 2017-01-10  Tom Tromey  <tom@tromey.com>
15345
15346         * python/py-prettyprint.c (print_stack_unless_memory_error)
15347         (print_string_repr, print_children): Use gdbpy_ref.
15348         (dummy_python_frame): New class.
15349         (dummy_python_frame::dummy_python_frame): Rename from
15350         push_dummy_python_frame.
15351         (py_restore_tstate): Remove.
15352
15353 2017-01-10  Tom Tromey  <tom@tromey.com>
15354
15355         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15356
15357 2017-01-10  Tom Tromey  <tom@tromey.com>
15358
15359         * python/python.c (ensure_python_env, restore_python_env):
15360         Remove.
15361         * python/python-internal.h (ensure_python_env): Don't declare.
15362         * varobj.h (varobj_ensure_python_env): Don't declare.
15363         * varobj.c (varobj_ensure_python_env): Remove.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * varobj.c (varobj_value_get_print_value): Use
15368         gdbpy_enter_varobj.
15369
15370 2017-01-10  Tom Tromey  <tom@tromey.com>
15371
15372         * python/py-prettyprint.c (print_string_repr, print_children):
15373         Update.
15374         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15375         of "encoding".
15376         * varobj.c (varobj_value_get_print_value): Update.
15377         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15378
15379 2017-01-10  Tom Tromey  <tom@tromey.com>
15380
15381         * varobj.c (varobj_get_display_hint)
15382         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15383         (varobj_set_visualizer, free_variable): Use
15384         gdbpy_enter_varobj.
15385
15386 2017-01-10  Tom Tromey  <tom@tromey.com>
15387
15388         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15389         (do_finish_initialization): New function.  Use gdbpy_ref.
15390         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15391         do_finish_initialization.
15392
15393 2017-01-10  Tom Tromey  <tom@tromey.com>
15394
15395         * python/py-param.c (get_set_value, get_show_value): Use
15396         gdbpy_enter, gdbpy_ref.
15397
15398 2017-01-10  Tom Tromey  <tom@tromey.com>
15399
15400         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15401
15402 2017-01-10  Tom Tromey  <tom@tromey.com>
15403
15404         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15405
15406 2017-01-10  Tom Tromey  <tom@tromey.com>
15407
15408         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15409         Use gdbpy_enter_varobj.
15410
15411 2017-01-10  Tom Tromey  <tom@tromey.com>
15412
15413         * varobj.c (gdbpy_enter_varobj): New constructor.
15414         * python/python-internal.h (gdbpy_enter_varobj): New class.
15415         * python/py-varobj.c (py_varobj_get_iterator): Use
15416         gdbpy_enter_varobj.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15421         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15422         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15423         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15424         unique_xmalloc_ptr.
15425         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15426
15427 2017-01-10  Tom Tromey  <tom@tromey.com>
15428
15429         * python/py-xmethods.c (invoke_match_method): Use
15430         gdbpy_ref.
15431
15432 2017-01-10  Tom Tromey  <tom@tromey.com>
15433
15434         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15435         gdbpy_enter, gdbpy_ref.
15436
15437 2017-01-10  Tom Tromey  <tom@tromey.com>
15438
15439         * python/python.c (python_interactive_command): Use gdbpy_enter.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15444         gdbpy_ref.
15445
15446 2017-01-10  Tom Tromey  <tom@tromey.com>
15447
15448         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15449         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15450
15451 2017-01-10  Tom Tromey  <tom@tromey.com>
15452
15453         * utils.h (htab_deleter): New struct.
15454         (htab_up): New typedef.
15455         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15456         gdbpy_enter, gdbpy_ref, htab_up.
15457
15458 2017-01-10  Tom Tromey  <tom@tromey.com>
15459
15460         * python/py-unwind.c (pending_frame_invalidate): Remove.
15461         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15462
15463 2017-01-10  Tom Tromey  <tom@tromey.com>
15464
15465         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15466         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15467
15468 2017-01-10  Tom Tromey  <tom@tromey.com>
15469
15470         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15471
15472 2017-01-10  Tom Tromey  <tom@tromey.com>
15473
15474         * python/python.c (gdbpy_eval_from_control_command)
15475         (gdbpy_source_script, gdbpy_run_events)
15476         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15477         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15478         gdbpy_enter.
15479
15480 2017-01-10  Tom Tromey  <tom@tromey.com>
15481
15482         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15483
15484 2017-01-10  Tom Tromey  <tom@tromey.com>
15485
15486         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15487
15488 2017-01-10  Tom Tromey  <tom@tromey.com>
15489
15490         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15491         (python_on_inferior_call_pre, python_on_inferior_call_post)
15492         (python_on_memory_change, python_on_register_change)
15493         (python_inferior_exit, python_new_objfile, add_thread_object)
15494         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15495
15496 2017-01-10  Tom Tromey  <tom@tromey.com>
15497
15498         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15499         (bpfinishpy_handle_exit): Use gdbpy_enter.
15500
15501 2017-01-10  Tom Tromey  <tom@tromey.com>
15502
15503         * python/py-cmd.c (cmdpy_destroyer)
15504         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15505         gdbpy_enter.
15506
15507 2017-01-10  Tom Tromey  <tom@tromey.com>
15508
15509         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15510         gdbpy_enter.
15511         (gdbpy_breakpoint_has_cond): Likewise.
15512
15513 2017-01-10  Tom Tromey  <tom@tromey.com>
15514
15515         * python/python.c (gdbpy_enter): New constructor.
15516         (~gdbpy_enter): New destructor.
15517         (restore_python_env, ensure_python_env): Rewrite.
15518         * python/python-internal.h (gdbpy_enter): New class.
15519
15520 2017-01-10  Tom Tromey  <tom@tromey.com>
15521
15522         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15523
15524 2017-01-10  Tom Tromey  <tom@tromey.com>
15525
15526         * python/py-value.c (value_has_field, get_field_flag)
15527         (get_field_type, valpy_getitem, convert_value_from_python): Use
15528         gdbpy_ref.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15533         gdbpy_ref.
15534
15535 2017-01-10  Tom Tromey  <tom@tromey.com>
15536
15537         * python/py-prettyprint.c (search_pp_list)
15538         (find_pretty_printer_from_objfiles)
15539         (find_pretty_printer_from_progspace)
15540         (find_pretty_printer_from_gdb, find_pretty_printer)
15541         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15542         gdbpy_ref.
15543
15544 2017-01-10  Tom Tromey  <tom@tromey.com>
15545
15546         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15547
15548 2017-01-10  Tom Tromey  <tom@tromey.com>
15549
15550         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15551         (ltpy_get_all_source_lines): Use gdbpy_ref.
15552
15553 2017-01-10  Tom Tromey  <tom@tromey.com>
15554
15555         * python/py-framefilter.c (extract_sym, extract_value)
15556         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15557         gdbpy_ref.
15558
15559 2017-01-10  Tom Tromey  <tom@tromey.com>
15560
15561         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15562
15563 2017-01-10  Tom Tromey  <tom@tromey.com>
15564
15565         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15566
15567 2017-01-10  Tom Tromey  <tom@tromey.com>
15568
15569         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15570         gdbpy_ref.
15571
15572 2017-01-10  Tom Tromey  <tom@tromey.com>
15573
15574         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15575
15576 2017-01-10  Tom Tromey  <tom@tromey.com>
15577
15578         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15579         (typy_range): Use gdbpy_ref.
15580
15581 2017-01-10  Tom Tromey  <tom@tromey.com>
15582
15583         * python/py-threadevent.c (create_thread_event_object): Use
15584         gdbpy_ref.
15585         * python/py-stopevent.c (create_stop_event_object): Simplify.
15586         (emit_stop_event): Use gdbpy_ref.
15587         * python/py-signalevent.c (create_signal_event_object): Use
15588         gdbpy_ref.
15589         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15590         (emit_new_objfile_event, create_clear_objfiles_event_object)
15591         (emit_clear_objfiles_event): Use gdbpy_ref.
15592         * python/py-infevents.c (create_inferior_call_event_object)
15593         (create_register_changed_event_object)
15594         (create_memory_changed_event_object, emit_inferior_call_event)
15595         (emit_memory_changed_event, emit_register_changed_event): Use
15596         gdbpy_ref.
15597         * python/py-exitedevent.c (create_exited_event_object)
15598         (emit_exited_event): Use gdbpy_ref.
15599         * python/py-event.h (evpy_emit_event): Remove
15600         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15601         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15602         * python/py-continueevent.c (emit_continue_event): Use
15603         gdbpy_ref.
15604         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15605         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15606         gdbpy_ref.
15607         * python/py-bpevent.c (create_breakpoint_event_object): Use
15608         gdbpy_ref.
15609
15610 2017-01-10  Tom Tromey  <tom@tromey.com>
15611
15612         * python/py-ref.h: New file.
15613
15614 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15615
15616         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15617         void.
15618         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15619         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15620         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15621         * ui-out.c (ui_out::redirect): Likewise.
15622         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15623         * cli/cli-logging.c (set_logging_redirect): Update call site of
15624         ui_out::redirect.
15625         (handle_redirections): Likewise.
15626         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15627         * top.c (execute_command_to_string): Likewise.
15628         * utils.c (do_ui_out_redirect_pop): Likewise.
15629
15630 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15631
15632         * stack.c (_initialize_stack): Update "frame" command help message.
15633
15634 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15635
15636         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15637
15638 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15639
15640         * x86-linux-nat.h: Include gdb_proc_service.h.
15641
15642 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15643
15644         * ser-base.h: Include serial.h.
15645
15646 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15647
15648         * ppc-linux-tdep.h: Include ppc-tdep.h.
15649
15650 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15651
15652         * nat/amd64-linux-siginfo.h: Include signal.h.
15653
15654 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15655
15656         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15657
15658 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15659
15660         * mi/mi-parse.h: Include mi-cmds.h.
15661
15662 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15663
15664         * inf-loop.c: Don't include "target.h".
15665         * inf-loop.h: Include it here.
15666
15667 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15668
15669         * dfp.h: Include "dboulest.h" and "expression.h".
15670
15671 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15672
15673         * ax-gdb.h: Include "ax.h".
15674
15675 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15676
15677         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15678         with nat/gdb_ptrace.h.
15679
15680 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15681
15682         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15683         new line.
15684         (mips64_fbsd_sigframe_init): Likewise.
15685
15686 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15687
15688         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15689         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15690
15691 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15692
15693         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15694         * NEWS: Mention new FreeBSD/mips native configuration.
15695         * config/mips/fbsd.mh: New file.
15696         * configure.host: Add mips*-*-freebsd*.
15697         * mips-fbsd-nat.c: New file.
15698
15699 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15700
15701         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15702         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15703         * NEWS: Mention new FreeBSD/mips target.
15704         * configure.tgt: Add mips*-*-freebsd*.
15705         * mips-fbsd-tdep.c: New file.
15706         * mips-fbsd-tdep.h: New file.
15707
15708 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15709
15710         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15711         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15712
15713 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15714
15715         Update copyright year range in all GDB files.
15716
15717 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15718
15719         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15720
15721 For older changes see ChangeLog-2016.
15722 \f
15723 Local Variables:
15724 mode: change-log
15725 left-margin: 8
15726 fill-column: 74
15727 version-control: never
15728 coding: utf-8
15729 End: