Fix M68HC11_NUM_REGS
[external/binutils.git] / gdb / ChangeLog
1 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2
3         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
4         M68HC11_LAST_HARD_REG + 1.
5
6 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
7
8         PR gdb/22388
9         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
10         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
11         Return TARGET_XFER_EOF if size of returned data is 0.
12
13 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
14
15         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
16         memory-map-selftests.c.
17         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
18         * memory-map.c (memory_map_start_memory): Fix computation of hi
19         address.
20         * unittests/memory-map-selftests.c: New file.
21
22 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
23
24         * ada-lang.c: Fix some typos in the general command documenting
25         how Ada expressions are being evaluated and how their result
26         is printed.
27
28 2017-11-09  Tom Tromey  <tom@tromey.com>
29
30         * psymtab.c (psymbol_hash): Do not hash string contents.
31         (psymbol_compare): Add comment.
32
33 2017-11-09  Tom Tromey  <tom@tromey.com>
34
35         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
36
37 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
38
39         * ada-exp.y (write_var_from_sym): Remove parameter
40         "orig_left_context".  Update all callers.
41
42 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
43
44         * tracepoint.h (class collection_list) <stringify>: Return
45         std::vector<std::string>.
46         (encode_actions_rsp): Change parameters to
47         std::vector<std::string> *.
48         * tracepoint.c (collection_list::stringify): Return
49         std::vector<std::string> and adjust accordingly.
50         (encode_actions_rsp): Changee parameters to
51         std::vector<std::string> and adjust accordingly.
52         * remote.c (free_actions_list),
53         free_actions_list_cleanup_wrapper): Remove.
54         (remote_download_tracepoint): Adjust to std::vector.
55
56 2017-11-08  Tom Tromey  <tom@tromey.com>
57
58         * dwarf2read.c (symbolp): Remove typedef.
59         (read_func_scope): Use std::vector.
60         (process_structure_scope): Use std::vector.
61
62 2017-11-08  Pedro Alves  <palves@redhat.com>
63
64         * ada-lang.c (ada_make_symbol_completion_list): Use
65         completion_skip_symbol.
66         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
67         (symbol_is_function_or_method(symbol*)): New.
68         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
69         completion_skip_symbol.
70         (default_collect_symbol_completion_matches_break_on): Use
71         completion_skip_symbol.  Pass down mode.
72         (collect_file_symbol_completion_matches): Pass down mode.
73         * symtab.h (symbol_is_function_or_method): New declarations.
74         (completion_skip_symbol): New template function.
75
76 2017-11-08  Pedro Alves  <palves@redhat.com>
77
78         * linespec.c (iterate_over_all_matching_symtabs): Add
79         search_domain parameter.  Pass it down to expand_symtabs_matching.
80         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
81         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
82         search_domain.
83         (add_all_symbol_names_from_pspace): Add search_domain parameter.
84         Pass it down.
85         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
86         symbols.
87         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
88         it down.
89
90 2017-11-08  Pedro Alves  <palves@redhat.com>
91
92         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
93         text_len locals and don't pass them down.
94         * symtab.c (completion_list_add_name): Remove
95         sym_text/sym_text_len parameters and adjust.
96         (completion_list_add_symbol, completion_list_add_msymbol)
97         (completion_list_objc_symbol, completion_list_add_fields)
98         (add_symtab_completions): Likewise.
99         (default_collect_symbol_completion_matches_break_on)
100         (collect_file_symbol_completion_matches): Remove sym_text_len
101         local and don't pass it down.
102         * symtab.h (completion_list_add_name): Remove
103         sym_text/sym_text_len parameters.
104
105 2017-11-08  Pedro Alves  <palves@redhat.com>
106
107         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
108         unittests/lookup_name_info-selftests.c.
109         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
110         * cp-support.c: Include "selftest.h".
111         (cp_remove_params_1): Rename from cp_remove_params.  Add
112         'require_param' parameter, and handle it.
113         (cp_remove_params): Reimplement.
114         (cp_remove_params_if_any): New.
115         (selftests::quote): New.
116         (selftests::check_remove_params): New.
117         (selftests::test_cp_remove_params): New.
118         (_initialize_cp_support): Install
119         selftests::test_cp_remove_params.
120         * cp-support.h (cp_remove_params_if_any): Declare.
121         * dwarf2read.c :Include "selftest.h".
122         (dw2_expand_symtabs_matching_symbol): Use
123         lookup_name_info::make_ignore_params.
124         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
125         (selftests::dw2_expand_symtabs_matching::string_or_null)
126         (selftests::dw2_expand_symtabs_matching::check_match)
127         (selftests::dw2_expand_symtabs_matching::test_symbols)
128         (selftests::dw2_expand_symtabs_matching::run_test): New.
129         (_initialize_dwarf2_read): Register
130         selftests::dw2_expand_symtabs_matching::run_test.
131         * psymtab.c (psym_expand_symtabs_matching): Use
132         lookup_name_info::make_ignore_params.
133         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
134         If the lookup name wants to ignore parameters, strip them.
135         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
136         code handling '('.
137         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
138         (default_collect_symbol_completion_matches_break_on): Don't try to
139         strip parameters.
140         * symtab.h (lookup_name_info::lookup_name_info): Add
141         'ignore_parameters' parameter.
142         (lookup_name_info::ignore_parameters)
143         (lookup_name_info::make_ignore_params): New methods.
144         (lookup_name_info::m_ignore_parameters): New field.
145         * unittests/lookup_name_info-selftests.c: New file.
146
147 2017-11-08  Pedro Alves  <palves@redhat.com>
148
149         * dwarf2read.c (dw2_expand_marked_cus)
150         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
151         (dw2_expand_symtabs_matching): Move further below.
152         (dw2_expand_marked_cus): Reindent.
153
154 2017-11-08  Pedro Alves  <palves@redhat.com>
155
156         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
157         (struct name_component): New.
158         (mapped_index::name_components): New field.
159         (mapped_index::symbol_name_at): New method.
160         (dwarf2_read_index): Call mapped_index ctor.
161         (dw2_map_matching_symbols): Add comment about name_components
162         table.
163         (dw2_expand_symtabs_matching): Factor part to...
164         (dw2_expand_symtabs_matching_symbol): ... this new function.
165         Build name components table, and lookup symbols in it before
166         calling the name matcher.
167         (dw2_expand_marked_cus): New, factored out from
168         dw2_expand_symtabs_matching.
169         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
170
171 2017-11-08   Pedro Alves  <palves@redhat.com>
172
173         * ada-lang.c (ada_encode): Rename to ..
174         (ada_encode_1): ... this.  Add throw_errors parameter and handle
175         it.
176         (ada_encode): Reimplement.
177         (match_name): Delete, folded into full_name.
178         (resolve_subexp): No longer pass the encoded name to
179         ada_lookup_symbol_list.
180         (should_use_wild_match): Delete.
181         (name_match_type_from_name): New.
182         (ada_lookup_simple_minsym): Use lookup_name_info and the
183         language's symbol_name_matcher_ftype.
184         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
185         (ada_add_block_renamings): Adjust to use lookup_name_info.
186         (ada_lookup_name): New.
187         (add_nonlocal_symbols, ada_add_all_symbols)
188         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
189         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
190         (ada_name_for_lookup): Delete.
191         (ada_lookup_encoded_symbol): Construct a verbatim name.
192         (wild_match): Reverse sense of return type.  Use bool.
193         (full_match): Reverse sense of return type.  Inline bits of old
194         match_name here.
195         (ada_add_block_symbols): Adjust to use lookup_name_info.
196         (symbol_completion_match): Delete, folded into...
197         (ada_lookup_name_info::matches): ... .this new method.
198         (symbol_completion_add): Delete.
199         (ada_collect_symbol_completion_matches): Add name_match_type
200         parameter.  Adjust to use lookup_name_info and
201         completion_list_add_name.
202         (get_var_value, ada_add_global_exceptions): Adjust to use
203         lookup_name_info.
204         (ada_get_symbol_name_cmp): Delete.
205         (do_wild_match, do_full_match): New functions.
206         (ada_lookup_name_info::ada_lookup_name_info): New method.
207         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
208         functions.
209         (ada_language_defn): Install ada_get_symbol_name_matcher.
210         * ada-lex.l (processId): If name starts with '<', copy it
211         verbatim.
212         * block.c (block_iter_match_step, block_iter_match_first)
213         (block_iter_match_next, block_lookup_symbol)
214         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
215         lookup_name_info.
216         * block.h (block_iter_match_first, block_iter_match_next)
217         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
218         * c-lang.c (c_language_defn, cplus_language_defn)
219         (asm_language_defn, minimal_language_defn): Adjust comments to
220         refer to la_get_symbol_name_matcher.
221         * completer.c (complete_files_symbols)
222         (collect_explicit_location_matches, symbol_completer): Pass a
223         symbol_name_match_type down.
224         * completer.h (class completion_match, completion_match_result):
225         New classes.
226         (completion_tracker::reset_completion_match_result): New method.
227         (completion_tracker::m_completion_match_result): New field.
228         * cp-support.c (make_symbol_overload_list_block): Adjust to use
229         lookup_name_info.
230         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
231         functions.
232         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
233         * d-lang.c: Adjust comments to refer to
234         la_get_symbol_name_matcher.
235         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
236         Adjust to use lookup_name_info.
237         (dict_iter_match_first, dict_iter_match_next)
238         (iter_match_first_hashed, iter_match_next_hashed)
239         (iter_match_first_linear, iter_match_next_linear): Adjust to work
240         with a lookup_name_info.
241         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
242         Likewise.
243         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
244         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
245         (gdb_index_symbol_name_matcher): New class.
246         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
247         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
248         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
249         with a symbol_name_match_type.
250         (f_language_defn): Adjust comments to refer to
251         la_get_symbol_name_matcher.
252         * go-lang.c (go_language_defn): Adjust comments to refer to
253         la_get_symbol_name_matcher.
254         * language.c (default_symbol_name_matcher)
255         (language_get_symbol_name_matcher): New functions.
256         (unknown_language_defn, auto_language_defn): Adjust comments to
257         refer to la_get_symbol_name_matcher.
258         * language.h (symbol_name_cmp_ftype): Delete.
259         (language_defn) <la_collect_symbol_completion_matches>: Add match
260         type parameter.
261         <la_get_symbol_name_cmp>: Delete field.
262         <la_get_symbol_name_matcher>: New field.
263         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
264         (default_symbol_name_matcher, language_get_symbol_name_matcher):
265         Declare.
266         * linespec.c (iterate_over_all_matching_symtabs)
267         (iterate_over_file_blocks): Adjust to use lookup_name_info.
268         (find_methods): Add language parameter, and use lookup_name_info
269         and the language's symbol_name_matcher_ftype.
270         (linespec_complete_function): Adjust.
271         (lookup_prefix_sym): Use lookup_name_info.
272         (add_all_symbol_names_from_pspace): Adjust.
273         (find_superclass_methods): Add language parameter and pass it
274         down.
275         (find_method): Pass symbol language down.
276         (find_linespec_symbols): Don't demangle or Ada encode here.
277         (search_minsyms_for_name): Add lookup_name_info parameter.
278         (add_matching_symbols_to_info): Add name_match_type parameter.
279         Use lookup_name_info.
280         * m2-lang.c (m2_language_defn): Adjust comments to refer to
281         la_get_symbol_name_matcher.
282         * minsyms.c: Include <algorithm>.
283         (add_minsym_to_demangled_hash_table): Remove table parameter and
284         add objfile parameter.  Use search_name_hash, and add language to
285         demangled languages vector.
286         (struct found_minimal_symbols): New struct.
287         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
288         New functions.
289         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
290         input names here.  Use lookup_name_info instead.  Lookup up
291         demangled names once for each language in the demangled names
292         vector.
293         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
294         demangled names once for each language in the demangled names
295         vector.
296         (build_minimal_symbol_hash_tables): Adjust.
297         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
298         lookup_name_info.
299         * objc-lang.c (objc_language_defn): Adjust comment to refer to
300         la_get_symbol_name_matcher.
301         * objfiles.h: Include <vector>.
302         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
303         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
304         la_get_symbol_name_matcher.
305         * p-lang.c (pascal_language_defn): Adjust comment to refer to
306         la_get_symbol_name_matcher.
307         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
308         (match_partial_symbol): Use symbol_name_match_type,
309         lookup_name_info and psymbol_name_matches.
310         (lookup_partial_symbol): Use lookup_name_info.
311         (map_block): Use symbol_name_match_type and lookup_name_info.
312         (psym_map_matching_symbols): Use symbol_name_match_type.
313         (psymbol_name_matches): New.
314         (recursively_search_psymtabs): Use lookup_name_info and
315         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
316         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
317         'kind' parameter to 'domain'.
318         * rust-lang.c (rust_language_defn): Adjust comment to refer to
319         la_get_symbol_name_matcher.
320         * symfile-debug.c (debug_qf_map_matching_symbols)
321         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
322         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
323         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
324         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
325         Adjust to use symbol_name_match_type.
326         <expand_symtabs_matching>: Adjust to use lookup_name_info.
327         (expand_symtabs_matching): Adjust to use lookup_name_info.
328         * symmisc.c (maintenance_expand_symtabs): Use
329         lookup_name_info::match_any ().
330         * symtab.c (symbol_matches_search_name): New.
331         (eq_symbol_entry): Adjust to use lookup_name_info and the
332         language's matcher.
333         (demangle_for_lookup_info::demangle_for_lookup_info): New.
334         (lookup_name_info::match_any): New.
335         (iterate_over_symbols, search_symbols): Use lookup_name_info.
336         (compare_symbol_name): Add language, lookup_name_info and
337         completion_match_result parameters, and use them.
338         (completion_list_add_name): Make extern.  Add language and
339         lookup_name_info parameters.  Use them.
340         (completion_list_add_symbol, completion_list_add_msymbol)
341         (completion_list_objc_symbol): Add lookup_name_info parameters and
342         adjust.  Pass down language.
343         (completion_list_add_fields): Add lookup_name_info parameters and
344         adjust.  Pass down language.
345         (add_symtab_completions): Add lookup_name_info parameters and
346         adjust.
347         (default_collect_symbol_completion_matches_break_on): Add
348         name_match_type parameter, and use it.  Use lookup_name_info.
349         (default_collect_symbol_completion_matches)
350         (collect_symbol_completion_matches): Add name_match_type
351         parameter, and pass it down.
352         (collect_symbol_completion_matches_type): Adjust.
353         (collect_file_symbol_completion_matches): Add name_match_type
354         parameter, and use lookup_name_info.
355         * symtab.h: Include <string> and "common/gdb_optional.h".
356         (enum class symbol_name_match_type): New.
357         (class ada_lookup_name_info): New.
358         (struct demangle_for_lookup_info): New.
359         (class lookup_name_info): New.
360         (symbol_name_matcher_ftype): New.
361         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
362         (symbol_matches_search_name): Declare.
363         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
364         (default_collect_symbol_completion_matches)
365         (collect_symbol_completion_matches)
366         (collect_file_symbol_completion_matches): Add name_match_type
367         parameter.
368         (iterate_over_symbols): Use lookup_name_info.
369         (completion_list_add_name): Declare.
370         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
371         (strncmp_iw_with_mode): Now extern.
372         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
373         (strncmp_iw_with_mode): Declare.
374
375 2017-11-08  Keith Seitz  <keiths@redhat.com>
376             Pedro Alves  <palves@redhat.com>
377
378         * ada-lang.c (ada_language_defn): Install
379         default_search_name_hash.
380         * buildsym.c (struct buildsym_compunit): <language>: New field.
381         (finish_block_internal): Pass language when creating dictionaries.
382         (start_buildsym_compunit, start_symtab): New language parameters.
383         Use them.
384         (restart_symtab): Pass down compilation unit's language.
385         * buildsym.h (enum language): Forward declare.
386         (start_symtab): New 'language' parameter.
387         * c-lang.c (c_language_defn, cplus_language_defn)
388         (asm_language_defn, minimal_language_defn): Install
389         default_search_name_hash.
390         * coffread.c (coff_start_symtab): Adjust.
391         * d-lang.c (d_language_defn): Install default_search_name_hash.
392         * dbxread.c (struct symloc): Add 'pst_language' field.
393         (PST_LANGUAGE): Define.
394         (start_psymtab, read_ofile_symtab): Use it.
395         (process_one_symbol): New 'language' parameter.  Pass it down.
396         * dictionary.c (struct dictionary) <language>: New field.
397         (DICT_LANGUAGE): Define.
398         (dict_create_hashed, dict_create_hashed_expandable)
399         (dict_create_linear, dict_create_linear_expandable): New parameter
400         'language'.  Set the dictionary's language.
401         (iter_match_first_hashed): Adjust to rename.
402         (insert_symbol_hashed): Assert we don't see mismatching
403         languages.  Adjust to rename.
404         (dict_hash): Rename to ...
405         (default_search_name_hash): ... this and make extern.
406         * dictionary.h (struct language_defn): Forward declare.
407         (dict_create_hashed): New parameter 'language'.
408         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
409         * f-lang.c (f_language_defn): Install default_search_name_hash.
410         * go-lang.c (go_language_defn): Install default_search_name_hash.
411         * jit.c (finalize_symtab): Pass compunit's language to dictionary
412         creation.
413         * language.c (unknown_language_defn, auto_language_defn):
414         * language.h (language_defn::la_search_name_hash): New field.
415         (default_search_name_hash): Declare.
416         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
417         * mdebugread.c (new_block): New parameter 'language'.
418         * mdebugread.c (parse_symbol): Pass symbol language to block
419         allocation.
420         (psymtab_to_symtab_1): Pass down language.
421         (new_symtab): Pass compunit's language to block allocation.
422         * objc-lang.c (objc_language_defn): Install
423         default_search_name_hash.
424         * opencl-lang.c (opencl_language_defn):
425         * p-lang.c (pascal_language_defn): Install
426         default_search_name_hash.
427         * rust-lang.c (rust_language_defn): Install
428         default_search_name_hash.
429         * stabsread.h (enum language): Forward declare.
430         (process_one_symbol): Add 'language' parameter.
431         * symtab.c (search_name_hash): New function.
432         * symtab.h (search_name_hash): Declare.
433         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
434
435 2017-11-08  Pedro Alves  <palves@redhat.com>
436
437         * cp-name-parser.y (main): Don't initialize extra_chars.
438
439 2017-11-07  Tom Tromey  <tom@tromey.com>
440
441         * event-top.h (command_handler): Constify.
442         * record-full.c (cmd_record_full_start): Update.
443         * thread.c (thread_apply_all_command): Update.
444         * printcmd.c (eval_command): Update.
445         * mi/mi-main.c (mi_execute_cli_command): Update.
446         (mi_execute_async_cli_command): Update.
447         * tui/tui-stack.c (tui_update_command): Update.
448         * cli/cli-interp.c (safe_execute_command): Constify.
449         * record.c (record_start): Update.
450         (record_start, record_stop, cmd_record_start): Update.
451         * record-btrace.c (cmd_record_btrace_bts_start): Update.
452         (cmd_record_btrace_pt_start): Update.
453         (cmd_record_btrace_start): Update.
454         (cmd_record_btrace_start): Update.
455         * reverse.c (exec_reverse_once): Update.
456         * python/python.c (execute_gdb_command): Don't copy the command.
457         * event-top.c (command_line_handler): Update.
458         (command_handler): Constify.
459         * defs.h (deprecated_call_command_hook): Constify.
460         * cli/cli-script.h (execute_user_command): Constify.
461         * cli/cli-script.c (execute_user_command): Constify.
462         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
463         (enum command_control_type): Update.
464         * main.c (catch_command_errors): Remove non-const overload.
465         (catch_command_errors_ftype): Remove.
466         * python/py-cmd.c (cmdpy_function): Constify.
467         * guile/scm-cmd.c (cmdscm_function): Constify.
468         * cli/cli-dump.c (call_dump_func): Constify.
469         * cli/cli-decode.c (do_const_cfunc): Constify.
470         (do_sfunc): Constify.
471         (cmd_func): Constify.
472         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
473         * top.h (execute_command): Constify.
474         * top.c (execute_command): Constify.
475         (execute_command_to_string): Constify.
476         (deprecated_call_command_hook): Constify.
477         * command.h (cmd_func): Constify.
478         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
479
480 2017-11-07  Tom Tromey  <tom@tromey.com>
481
482         * ada-lang.c (catch_ada_exception_command): Constify.
483         (catch_assert_command): Constify.
484         * break-catch-throw.c (catch_catch_command, catch_throw_command)
485         (catch_rethrow_command): Constify.
486         (catch_exception_command_1): Constify.
487         * breakpoint.h (add_catch_command): Constify.
488         * break-catch-syscall.c (catch_syscall_command_1): Constify.
489         (catch_syscall_split_args): Constify.
490         * break-catch-sig.c (catch_signal_command): Constify.
491         (catch_signal_split_args): Constify.
492         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
493         cmd_const_sfunc_ftype.
494         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
495         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
496         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
497         (add_setshow_string_cmd, struct cmd_list_element)
498         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
499         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
500         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
501         Constify.
502         (set_cmd_sfunc): Constify.
503         (empty_sfunc): Constify.
504         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
505         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
506         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
507         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
508         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
509         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
510         Constify.
511         (set_cmd_sfunc): Constify.
512         (cmd_sfunc_ftype): Remove.
513         * compile/compile.c (set_compile_args): Constify.
514         * infrun.c (set_disable_randomization): Constify.
515         * infcmd.c (set_args_command, set_cwd_command): Constify.
516         * breakpoint.c (set_condition_evaluation_mode): Constify.
517         (add_catch_command): Constify.
518         (catch_fork_command_1, catch_exec_command_1)
519         (catch_load_command_1, catch_unload_command_1): Constify.
520         (catch_load_or_unload): Constify.
521         * guile/scm-param.c (pascm_set_func): Constify.
522         (add_setshow_generic): Constify.
523         * python/py-param.c (get_set_value): Constify.
524         * top.h (set_verbose): Constify.
525         * tui/tui-win.c (tui_set_var_cmd): Constify.
526         * mi/mi-main.c (set_mi_async_command): Constify.
527         * cli/cli-logging.c (set_logging_overwrite)
528         (set_logging_redirect): Constify.
529         * value.c (set_max_value_size): Constify.
530         * valprint.c (set_input_radix, set_output_radix): Constify.
531         * utils.c (set_width_command, set_height_command): Constify.
532         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
533         * tracepoint.c (set_disconnected_tracing)
534         (set_circular_trace_buffer, set_trace_buffer_size)
535         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
536         * top.c (set_history_size_command, set_verbose, set_editing)
537         (set_gdb_datadir, set_history_filename): Constify.
538         * target.c (set_targetdebug, maint_set_target_async_command)
539         (maint_set_target_non_stop_command, set_target_permissions)
540         (set_write_memory_permission): Constify.
541         (open_target): Constify.
542         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
543         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
544         * symtab.c (set_symbol_cache_size_handler): Constify.
545         * symfile.c (set_ext_lang_command): Constify.
546         * symfile-debug.c (set_debug_symfile): Constify.
547         * source.c (set_directories_command): Constify.
548         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
549         * serial.c (set_parity): Constify.
550         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
551         * remote.c (set_remote_exec_file, set_remotebreak)
552         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
553         * record.c (set_record_insn_history_size)
554         (set_record_call_history_size): Constify.
555         * record-full.c (set_record_full_insn_max_num): Constify.
556         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
557         * osabi.c (set_osabi): Constify.
558         * mips-tdep.c (set_mips64_transfers_32bit_regs)
559         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
560         * maint.c (maintenance_set_profile_cmd): Constify.
561         * linux-thread-db.c (set_libthread_db_search_path): Constify.
562         * language.c (set_language_command, set_range_command)
563         (set_case_command): Constify.
564         * infrun.c (set_non_stop, set_observer_mode)
565         (set_stop_on_solib_events, set_schedlock_func)
566         (set_exec_direction_func): Constify.
567         * infcmd.c (set_inferior_tty_command): Constify.
568         * disasm.c (set_disassembler_options_sfunc): Constify.
569         * demangle.c (set_demangling_command): Constify.
570         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
571         * cris-tdep.c (set_cris_version, set_cris_mode)
572         (set_cris_dwarf2_cfi): Constify.
573         * corefile.c (set_gnutarget_command): Constify.
574         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
575         (set_target_wide_charset_sfunc): Constify.
576         * breakpoint.c (update_dprintf_commands): Constify.
577         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
578         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
579         (set_disassembly_style_sfunc): Constify.
580         * arch-utils.c (set_endian, set_architecture): Constify.
581         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
582         * agent.c (set_can_use_agent): Constify.
583
584 2017-11-07  Tom Tromey  <tom@tromey.com>
585
586         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
587         (go32_pde, go32_pte, go32_pte_for_address): Constify.
588         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
589         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
590         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
591         (parse_int_arg, show_thread_default_detach_sc_cmd)
592         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
593         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
594         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
595         (show_task_pause_cmd, set_task_detach_sc_cmd)
596         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
597         (set_noninvasive_cmd, set_thread_pause_cmd)
598         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
599         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
600         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
601         * windows-nat.c (display_selectors): Constify.
602         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
603         non-const "cfunc".
604         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
605         (cmd_cfunc_eq): Likewise.
606         (struct cmd_list_element): Likewise.
607         (do_cfunc): Remove.
608         (cli_user_command_p): Update.
609         * command.h (add_cmd): Remove non-const overload.
610         (cmd_cfunc_ftype): Remove typedef.
611         (cmd_cfunc_eq): Remove non-const overload.
612         * value.c (show_values): Constify.
613         * thread.c (thread_apply_all_command): Constify.
614         * symfile.c (load_command): Constify.
615         * source.c (directory_command): Constify.
616         * maint.c (maintenance_internal_error)
617         (maintenance_demangler_warning, maintenance_space_display)
618         (maintenance_print_architecture, maintenance_translate_address)
619         (maintenance_info_selftests, maintenance_internal_warning):
620         Constify.
621         * breakpoint.c (disable_trace_command, enable_trace_command):
622         Constify.
623         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
624         Constify.
625         (add_auto_load_safe_path): Constify.
626         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
627         * top.h (show_commands): Constify.
628         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
629         * sparc64-tdep.c (adi_examine_command): Constify.
630         (adi_assign_command): Constify.
631
632 2017-11-07  Tom Tromey  <tom@tromey.com>
633
634         * frame.h (info_locals_command, info_args_command): Constify.
635         * auto-load.h (auto_load_info_scripts): Constify.
636         * inferior.h (registers_info): Constify.
637         * copying.c: Rebuild.
638         * copying.awk: Constify generated commands.
639         * auto-load.c (auto_load_info_scripts)
640         (info_auto_load_gdb_scripts): Constify.
641         * cli/cli-decode.c (struct cmd_list_element): Take a
642         cmd_const_cfunc_ftype.
643         * command.h (add_info): Take a cmd_const_cfunc_ftype.
644         * tui/tui-win.c (tui_all_windows_info): Constify.
645         * python/py-auto-load.c (info_auto_load_python_scripts):
646         Constify.
647         * cli/cli-cmds.c (show_command): Remove non-const overload.
648         * tracepoint.c (info_tvariables_command, info_scope_command):
649         Constify.
650         (info_static_tracepoint_markers_command): Constify.
651         * thread.c (info_threads_command): Constify.
652         (print_thread_info_1): Constify.
653         * target.c (info_target_command): Constify.
654         * symtab.c (info_sources_command, info_functions_command)
655         (info_types_command): Constify.
656         (info_variables_command): Remove non-const overload.
657         * symfile.c (info_ext_lang_command): Constify.
658         * stack.c (info_frame_command, info_locals_command)
659         (info_args_command): Constify.
660         (backtrace_command): Remove non-const overload.
661         * source.c (info_source_command, info_line_command): Constify.
662         * solib.c (info_sharedlibrary_command): Constify.
663         * skip.c (info_skip_command): Constify.
664         * ser-go32.c (info_serial_command): Constify.
665         * reverse.c (info_bookmarks_command): Constify.
666         * printcmd.c (info_symbol_command, info_address_command)
667         (info_display_command): Constify.
668         * osdata.c (info_osdata_command): Constify.
669         * objc-lang.c (info_selectors_command, info_classes_command):
670         Constify.
671         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
672         * memattr.c (info_mem_command): Constify.
673         * macrocmd.c (info_macro_command, info_macros_command): Constify.
674         * linux-fork.c (info_checkpoints_command): Constify.
675         * infrun.c (info_signals_command): Constify.
676         * inflow.c (info_terminal_command): Constify.
677         * inferior.c (info_inferiors_command): Constify.
678         (print_inferior): Constify.
679         * infcmd.c (info_program_command, info_all_registers_command)
680         (info_registers_command, info_vector_command)
681         (info_float_command): Constify.
682         (registers_info): Constify.
683         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
684         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
685         Constify.
686         * f-valprint.c (info_common_command): Constify.
687         * dcache.c (info_dcache_command): Constify.
688         (dcache_info_1): Constify.
689         * darwin-nat-info.c (info_mach_tasks_command)
690         (info_mach_task_command, info_mach_ports_command)
691         (info_mach_port_command, info_mach_threads_command)
692         (info_mach_thread_command, info_mach_regions_command)
693         (info_mach_regions_recurse_command, info_mach_region_command)
694         (info_mach_exceptions_command): Constify.
695         (get_task_from_args): Constify.
696         * cp-support.c (info_vtbl_command): Constify.
697         * breakpoint.c (info_watchpoints_command)
698         (info_tracepoints_command): Constify.
699         (info_breakpoints_command): Remove non-const overload.
700         * avr-tdep.c (avr_io_reg_read_command): Constify.
701         * auxv.c (info_auxv_command): Constify.
702         * ada-tasks.c (info_tasks_command): Constify.
703         (info_task): Constify.
704         * ada-lang.c (info_exceptions_command): Constify.
705
706 2017-11-07  Tom Tromey  <tom@tromey.com>
707
708         * solib.h (no_shared_libraries): Constify.
709         * frame.h (return_command): Constify.
710         * cli/cli-cmds.h (quit_command): Constify.
711         * top.h (quit_command, execute_command): Constify.
712         * target.h (flash_erase_command): Constify.
713         * inferior.h (set_inferior_args, attach_command): Constify.
714         * tracepoint.h (start_tracing, stop_tracing): Constify.
715         * breakpoint.h (break_command, tbreak_command)
716         (hbreak_command_wrapper, thbreak_command_wrapper)
717         (rbreak_command_wrapper, watch_command_wrapper)
718         (awatch_command_wrapper, rwatch_command_wrapper)
719         (get_tracepoint_by_number): Constify.
720         * symtab.c (info_variables_command, rbreak_command)
721         (symtab_symbol_info): Constify.
722         (info_variables_command): Add non-const overload.
723         * top.c (dont_repeat_command): Constify.
724         * breakpoint.c (ignore_command, commands_command)
725         (condition_command, tbreak_command, hbreak_command)
726         (thbreak_command, clear_command, break_command)
727         (info_breakpoints_command, watch_command, rwatch_command)
728         (awatch_command, trace_command, ftrace_command, strace_command)
729         (trace_pass_command, break_range_command, dprintf_command)
730         (agent_printf_command, get_tracepoint_by_number)
731         (watch_maybe_just_location, trace_pass_command): Constify.
732         (info_breakpoints_command): Add non-const overload.
733         * tracefile.c (tsave_command): Constify.
734         * infcmd.c (attach_command, disconnect_command, signal_command)
735         (queue_signal_command, stepi_command, nexti_command)
736         (finish_command, next_command, step_command, until_command)
737         (advance_command, jump_command, continue_command, run_command)
738         (start_command, starti_command, interrupt_command)
739         (run_command_1, set_inferior_args, step_1): Constify.
740         * inferior.c (add_inferior_command, remove_inferior_command)
741         (clone_inferior_command): Constify.
742         * linux-fork.c (checkpoint_command, restart_command): Constify.
743         * windows-nat.c (signal_event_command): Constify.
744         * guile/guile.c (guile_repl_command, guile_command): Constify.
745         * printcmd.c (x_command, display_command, printf_command)
746         (output_command, set_command, call_command, print_command)
747         (eval_command): Constify.
748         (non_const_set_command): Remove.
749         (_initialize_printcmd): Update.
750         * source.c (forward_search_command, reverse_search_command):
751         Constify.
752         * jit.c (jit_reader_load_command, jit_reader_unload_command):
753         Constify.
754         * infrun.c (handle_command): Constify.
755         * memattr.c (mem_command): Constify.
756         * stack.c (return_command, up_command, up_silently_command)
757         (down_command, down_silently_command, frame_command)
758         (backtrace_command, func_command, backtrace_command_1): Constify.
759         (backtrace_command): Add non-const overload.
760         * remote-sim.c (simulator_command): Constify.
761         * exec.c (set_section_command): Constify.
762         * tracepoint.c (tdump_command, trace_variable_command)
763         (tstatus_command, tstop_command, tstart_command)
764         (end_actions_pseudocommand, while_stepping_pseudocommand)
765         (collect_pseudocommand, teval_pseudocommand, actions_command)
766         (start_tracing, stop_tracing): Constify.
767         * value.c (init_if_undefined_command): Constify.
768         * tui/tui-stack.c (tui_update_command): Constify.
769         * tui/tui-win.c (tui_refresh_all_command)
770         (tui_set_tab_width_command, tui_set_win_height_command)
771         (tui_set_focus_command, tui_scroll_forward_command)
772         (tui_scroll_backward_command, tui_scroll_left_command)
773         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
774         (tui_set_win_height): Constify.
775         * tui/tui-layout.c (tui_layout_command): Constify.
776         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
777         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
778         (proc_untrace_sysexit_cmd): Constify.
779         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
780         (threadset_test_cmd, threadlist_update_test_cmd)
781         (threadalive_test): Constify.
782         * objc-lang.c (print_object_command): Constify.
783         * command.h (add_com): Constify.
784         * cli/cli-dump.c (restore_command): Constify.
785         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
786         (help_command, complete_command, shell_command, edit_command)
787         (list_command, disassemble_command, make_command)
788         (apropos_command, alias_command): Constify.
789         * cli/cli-script.c (document_command, define_command)
790         (while_command, if_command, validate_comname): Constify.
791         * cli/cli-decode.c (struct cmd_list_element): Change type of
792         "fun".
793         * target.c (do_monitor_command, flash_erase_command): Constify.
794         * regcache.c (reg_flush_command): Constify.
795         * reverse.c (reverse_step, reverse_next, reverse_stepi)
796         (reverse_nexti, reverse_continue, reverse_finish)
797         (save_bookmark_command, goto_bookmark_command)
798         (exec_reverse_once): Constify.
799         * python/python.c (python_interactive_command, python_command):
800         Constify.
801         * typeprint.c (ptype_command, whatis_command, whatis_exp):
802         Constify.
803         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
804         * gcore.c (gcore_command): Constify.
805
806 2017-11-07  Tom Tromey  <tom@tromey.com>
807
808         * printcmd.c (x_command): Call set_repeat_arguments.
809         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
810         * top.c (repeat_arguments): New global.
811         (set_repeat_arguments): New function.
812         (execute_command): Handle repeat_arguments.
813         (show_commands): Calls set_repeat_arguments.
814         * command.h (set_repeat_arguments): Declare.
815
816 2017-11-07  Tom Tromey  <tom@tromey.com>
817
818         * stack.c (backtrace_command): Use std::string.
819         (backtrace_command_1): Make "count_exp" const.
820
821 2017-11-07  Tom Tromey  <tom@tromey.com>
822
823         * source.c (directory_switch, mod_path, add_path): Constify.
824         * defs.h (add_path, mod_path, directory_switch): Constify.
825         * mi/mi-cmd-env.c (env_mod_path): Constify.
826
827 2017-11-07  Tom Tromey  <tom@tromey.com>
828
829         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
830         (run_command_1, continue_command, step_1, jump_command)
831         (signal_command, until_command, advance_command, finish_command)
832         (attach_command): Update.
833
834 2017-11-07  Tom Tromey  <tom@tromey.com>
835
836         * command.h (set_cmd_cfunc): Don't declare.
837         * cli/cli-decode.c (set_cmd_cfunc): Now static.
838
839 2017-11-07  Tom Tromey  <tom@tromey.com>
840
841         * stack.c (select_frame_command): Constify.
842         * cli/cli-decode.c (add_com_suppress_notification): Constify.
843         * command.h (add_com_suppress_notification): Constify.
844
845 2017-11-07  Tom Tromey  <tom@tromey.com>
846
847         * breakpoint.c (stop_command): Constify.
848         * cli/cli-decode.c (struct cmd_list_element): Constify.
849         * command.h (add_abbrev_prefix_cmd): Constify.
850
851 2017-11-07  Pedro Alves  <palves@redhat.com>
852
853         * breakpoint.c (extract_bp_kind): New enum.
854         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
855         factored out from ...
856         (extract_bp_number_and_location): ... here.
857         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
858
859 2017-11-07  Pedro Alves  <palves@redhat.com>
860
861         * breakpoint.c (extract_bp_number_and_location): Change return
862         type to void.  Throw error instead of warning.
863         (enable_disable_command): Adjust.
864
865 2017-11-07  Xavier Roirand  <roirand@adacore.com>
866             Pedro Alves  <palves@redhat.com>
867
868         * breakpoint.c (map_breakpoint_number_range): New, factored out
869         from ...
870         (map_breakpoint_numbers): ... here.
871         (find_location_by_number): Change parameters from string to
872         breakpoint number and location.
873         (extract_bp_number_and_location): New function.
874         (enable_disable_bp_num_loc)
875         (enable_disable_breakpoint_location_range)
876         (enable_disable_command): New functions, factored out ...
877         (enable_command, disable_command): ... these functions, and
878         adjusted to support ranges.
879         * NEWS: Document enable/disable breakpoint location range feature.
880
881 2017-11-06  Luis Machado  <luis.machado@linaro.org>
882
883         * MAINTAINERS (Write After Approval): Update my e-mail address.
884
885 2017-11-06  Pedro Alves  <palves@redhat.com>
886
887         * gnu-nat.c (gnu_terminal_init): Delete.
888         (gnu_target): Don't install gnu_terminal_init.
889         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
890         (child_terminal_init): ... this function.
891
892 2017-11-06  Pedro Alves  <palves@redhat.com>
893
894         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
895         sgtty.h.
896         * config.in, configure: Regenerate.
897
898 2017-11-06  Pedro Alves  <palves@redhat.com>
899
900         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
901         (async_init_signals): Adjust.
902         (handle_stop_sig): Rename to ...
903         (handle_sigtstp): ... this.
904         (async_stop_sig): Rename to ...
905         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
906         SIGTSTP path.
907         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
908         instead of STOP_SIGNAL thoughout.
909         (handle_stop_sig): Rename to ...
910         (handle_sigtstp): ... this.
911         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
912
913 2017-11-06  Pedro Alves  <palves@redhat.com>
914
915         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
916         longer set flags twice in row.
917
918 2017-11-06  Pedro Alves  <palves@redhat.com>
919
920         * Makefile.in (SER_HARDWIRE): Update comment.
921         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
922         * common/gdb_termios.h: Delete file.
923         * common/job-control.c: Include termios.h and unistd.h instead of
924         gdb_termios.h.
925         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
926         check.
927         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
928         Remove sgtty code.
929         * configure.ac: No longer check for termio.h and sgtty.h.
930         * configure: Regenerate.
931         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
932         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
933         Replace PROCESS_GROUP_TYPE references with pid_t references
934         throughout.
935         (gdb_getpgrp): Delete.
936         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
937         (child_terminal_inferior): Remove comment.  Remove sgtty code.
938         (child_terminal_ours_1): Use tcgetpgrp directly instead of
939         gdb_getpgrp.  Use serial_set_tty_state instead aof
940         serial_noflush_set_tty_state.  Remove sgtty code.
941         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
942         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
943         (inferior_process_group): Now returns pid_t.
944         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
945         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
946         * ser-event.c (serial_event_ops): Update.
947         * ser-go32.c (dos_noflush_set_tty_state): Delete.
948         (dos_ops): Update.
949         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
950         * ser-pipe.c (pipe_ops): Update.
951         * ser-tcp.c (tcp_ops): Update.
952         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
953         HAVE_TERMIOS checks.
954         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
955         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
956         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
957         assume termios.
958         (hardwire_noflush_set_tty_state): Delete.
959         (hardwire_print_tty_state, hardwire_drain_output)
960         (hardwire_flush_output, hardwire_flush_input)
961         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
962         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
963         code, and assume termios.
964         (hardwire_ops): Update.
965         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
966         * serial.c (serial_noflush_set_tty_state): Delete.
967         * serial.h (serial_noflush_set_tty_state): Delete.
968         (serial_ops::noflush_set_tty_state): Delete.
969
970 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
971
972         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
973         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
974         (COMMON_OBS): Remove doublest.o and dfp.o.
975         Do not build target-float.c (instead of doublest.c)
976         with -Wformat-nonliteral.
977
978         * doublest.c: Remove file.
979         * doublest.h: Remove file.
980         * dfp.c: Remove file.
981         * dfp.h: Remove file.
982
983         * target-float.c: Do not include "doublest.h" and "dfp.h".
984         (DOUBLEST): Move here from doublest.h.
985         (enum float_kind): Likewise.
986         (FLOATFORMAT_CHAR_BIT): Likewise.
987         (FLOATFORMAT_LARGEST_BYTES): Likewise.
988         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
989         (floatformat_precision): Likewise.
990         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
991         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
992         Likewise.
993         (host_float_format, host_double_format, host_long_double_format):
994         Likewise.
995         (floatformat_to_string, floatformat_from_string): Likewise.
996         (floatformat_to_doublest): Likewise.  Also, inline the original
997         convert_floatformat_to_doublest.
998         (floatformat_from_doublest): Likewise.  Also, inline the original
999         convert_floatformat_from_doublest.
1000
1001         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1002         (MAX_DECIMAL_STRING): Move here from dfp.c.
1003         (match_endianness): Likewise.
1004         (set_decnumber_context, decimal_check_errors): Likewise.
1005         (decimal_from_number, decimal_to_number): Likewise.
1006         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1007         (decimal_from_longest, decimal_from_ulongest): Likewise.
1008         (decimal_to_longest): Likewise.
1009         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1010         (decimal_convert): Likewise.
1011
1012 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1013
1014         * doublest.c: Do not include "gdbtypes.h".
1015         (extract_typed_floating): Remove.
1016         (store_typed_floating): Remove.
1017         (convert_typed_floating): Remove.
1018         * doublest.h (struct type): Remove.
1019         (DOUBLEST_PRINT_FORMAT): Remove.
1020         (DOUBLEST_SCAN_FORMAT): Remove.
1021         (extract_typed_floating): Remove.
1022         (store_typed_floating): Remove.
1023         (convert_typed_floating): Remove.
1024
1025         * dfp.c (decimal_from_doublest): Remove.
1026         (decimal_to_doublest): Remove.
1027         * dfp.h: Do not include "doublest.h".
1028         (decimal_from_doublest): Remove.
1029         (decimal_to_doublest): Remove.
1030
1031         * value.c: Do not include "doublest.h" and "dfp.h".
1032         (value_as_double): Remove.
1033         (unpack_double): Remove.
1034         (value_from_double): Remove.
1035         (value_from_decfloat): Remove.
1036         * value.h: Do not include "doublest.h".
1037         (value_as_double): Remove.
1038         (unpack_double): Remove.
1039         (value_from_double): Remove.
1040         (value_from_decfloat): Remove.
1041
1042 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1043
1044         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1045         (i386_extract_return_value): Use target_float_convert.
1046         (i386_store_return_value): Likewise.
1047         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1048         (i387_value_to_register): Likewise.
1049         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1050         (ia64_register_to_value): Use target_float_convert.
1051         (ia64_value_to_register): Likewise.
1052         (ia64_extract_return_value): Likewise.
1053         (ia64_store_return_value): Likewise.
1054         (ia64_push_dummy_call): Likewise.
1055         * m68k-tdep.c: Include "target-float.h".
1056         (m68k_register_to_value): Use target_float_convert.
1057         (m68k_value_to_register): Likewise.
1058         (m68k_svr4_extract_return_value): Likewise.
1059         (m68k_svr4_store_return_value): Likewise.
1060         * ppc-sysv-tdep.c: Include "target-float.h".
1061         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1062         (do_ppc_sysv_return_value): Likewise.
1063         (ppc64_sysv_abi_push_freg): Likewise.
1064         (ppc64_sysv_abi_return_value_base): Likewise.
1065         * rs6000-aix-tdep.c: Include "target-float.h".
1066         (rs6000_push_dummy_call): Use target_float_convert.
1067         (rs6000_return_value): Likewise.
1068         * rs6000-lynx178-tdep.c: Include "target-float.h".
1069         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1070         (rs6000_lynx178_return_value): Likewise.
1071         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1072         (rs6000_register_to_value): Use target_float_convert.
1073         (rs6000_value_to_register): Likewise.
1074         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1075         (arm_extract_return_value): Use target_float_convert.
1076         (arm_store_return_value): Likewise.
1077         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1078         (sh_register_convert_to_virtual): Use target_float_convert.
1079         (sh_register_convert_to_raw): Likewise.
1080         * sh64-tdep.c: Include "target-float.h".
1081         (sh64_extract_return_value): Use target_float_convert.
1082         (sh64_register_convert_to_virtual): Likewise.
1083         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1084
1085 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1086
1087         * target-float.c (floatformat_to_host_double): New function.
1088         (floatformat_from_host_double): Likewise.
1089         (target_float_to_host_double): Likewise.
1090         (target_float_from_host_double): Likewise.
1091         * target-float.h (target_float_to_host_double): Add prototype.
1092         (target_float_from_host_double): Likewise.
1093
1094         * guile/scm-value.c: Include "target-float.h".
1095         (gdbscm_value_to_real): Use target_float_to_host_double.
1096         Handle integer source values via value_as_long.
1097         * guile/scm-math.c: Include "target-float.h".  Do not include
1098         "doublest.h", "dfp.h", and "expression.h".
1099         (vlscm_convert_typed_number): Use target_float_from_host_double.
1100         (vlscm_convert_number): Likewise.
1101
1102         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1103         (convert_value_from_python): Use target_float_from_host_double.
1104
1105 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1106
1107         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1108         (cast_from_fixed): Likewise.
1109         (ada_scaling_type): New function.
1110         (ada_delta): Return value instead of DOUBLEST.  Perform target
1111         arithmetic instead of host arithmetic.
1112         (scaling_factor): Rename to ...
1113         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1114         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1115         (ada_fixed_to_float): Remove.
1116         (ada_float_to_fixed): Remove.
1117         * ada-lang.h (ada_fixed_to_float): Remove.
1118         (ada_float_to_fixed): Remove.
1119         (ada_delta): Return value instead of DOUBLEST.
1120         (ada_scaling_factor): Add prototype.
1121
1122         * ada-typeprint.c: Include "target-float.h".
1123         (print_fixed_point_type): Perform target arithmetic instead of
1124         host arithmetic.
1125         * ada-valprint.c: Include "target-float.h".
1126         (ada_val_print_num): Perform target arithmetic instead of
1127         host arithmetic for fixed-point types.
1128
1129 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1130
1131         * target-float.c: Include <math.h>.
1132         (floatformat_binop): New function.
1133         (floatformat_compare): Likewise.
1134         (target_float_binop): Likewise.
1135         (target_float_compare): Likewise.
1136         * target-float.h: Include "expression.h".
1137         (target_float_binop): Add prototype.
1138         (target_float_compare): Likewise.
1139
1140         * valarith.c: Do not include "doublest.h" and "dfp.h".
1141         Include "common/byte-vector.h".
1142         (value_args_as_decimal): Remove, replace by ...
1143         (value_args_as_target_float): ... this function.  Handle both
1144         binary and decimal target floating-point formats.
1145         (scalar_binop): Handle both binary and decimal FP using
1146         value_args_as_target_float and target_float_binop.
1147         (value_equal): Handle both binary and decimal FP using
1148         value_args_as_target_float and target_float_compare.
1149         (value_less): Likewise.
1150         (value_pos): Handle all scalar types as simple copy.
1151         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1152         * dfp.c (decimal_binop): Throw error instead of internal_error
1153         when called with an unsupported operation code.
1154
1155 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1156
1157         * target-float.c (target_float_to_string): New function.
1158         (target_float_from_string): New function.
1159         * target-float.h (target_float_to_string): Add prototype.
1160         (target_float_from_string): Add prototype.
1161
1162         * valprint.c: Include "target-float.h".  Do not include
1163         "doublest.h" and "dfp.h".
1164         (print_floating): Use target_float_to_string.
1165         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1166         (printf_floating): Use target_float_to_string.
1167         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1168         (print_i387_value): Use target_float_to_string.
1169         * mips-tdep.c: Include "target-float.h".
1170         (mips_print_fp_register): Use target_float_to_string.
1171         * sh64-tdep.c: Include "target-float.h".
1172         (sh64_do_fp_register): Use target_float_to_string.
1173
1174         * parse.c: Include "target-float.h".  Do not include
1175         "doublest.h" and "dfp.h".
1176         (parse_float): Use target_float_from_string.
1177         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1178         (define_symbol): Use target_float_from_string.
1179         * gdbarch-selftests.c: Include "target-float.h".
1180         (register_to_value_test): Use target_float_from_string.
1181
1182 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1183
1184         * Makefile.c (SFILES): Add target-float.c.
1185         (HFILES_NO_SRCDIR): Add target-float.h.
1186         (COMMON_OBS): Add target-float.o.
1187         * target-float.h: New file.
1188         * target-float.c: New file.
1189
1190         * doublest.c (floatformat_classify): Fix detection of float_zero.
1191
1192         * gdbtypes.c (is_floating_type): New function.
1193         * gdbtypes.h (is_floating_type): Add prototype.
1194
1195         * value.c: Do not include "floatformat.h".
1196         (unpack_double): Use target_float_is_valid.
1197         (is_floating_value): New function.
1198         * value.h (is_floating_value): Add prototype-
1199
1200         * valarith.c: Include "target-float.h".
1201         (value_logical_not): Use target_float_is_zero.
1202
1203         * python/py-value.c: Include "target-float.h".
1204         (valpy_nonzero): Use target_float_is_zero.
1205
1206 2017-11-04  Tom Tromey  <tom@tromey.com>
1207
1208         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1209
1210 2017-11-04  Tom Tromey  <tom@tromey.com>
1211
1212         * breakpoint.c (set_momentary_breakpoint): Return
1213         breakpoint_up.
1214         (until_break_command): Update.
1215         (new_until_break_fsm): Change argument types to
1216         breakpoint_up.
1217         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1218         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1219         Remove.
1220         * infcmd.c (finish_forward): Update.
1221         * breakpoint.h (set_momentary_breakpoint)
1222         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1223         (make_cleanup_delete_breakpoint): Remove.
1224         (struct breakpoint_deleter): New.
1225         (breakpoint_up): New typedef.
1226         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1227         (insert_exception_resume_breakpoint): Update.
1228         (insert_exception_resume_from_probe): Update.
1229         (insert_longjmp_resume_breakpoint): Update.
1230         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1231         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1232         * infcall.c (call_function_by_hand_dummy): Update
1233
1234 2017-11-04  Tom Tromey  <tom@tromey.com>
1235
1236         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1237
1238 2017-11-04  Tom Tromey  <tom@tromey.com>
1239
1240         * linux-tdep.c (linux_core_info_proc_mappings): Use
1241         gdb::def_vector.
1242         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1243         "size" argument.
1244         (linux_corefile_thread): Update.
1245         (linux_make_corefile_notes): Remove unused variable.
1246
1247 2017-11-04  Tom Tromey  <tom@tromey.com>
1248
1249         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1250         gdb::byte_vector.
1251
1252 2017-11-04  Tom Tromey  <tom@tromey.com>
1253
1254         * objfiles.c (do_free_objfile_cleanup): Remove.
1255         * compile/compile-object-load.c (compile_object_load): Update.
1256         * objfiles.h (make_cleanup_free_objfile): Remove.
1257
1258 2017-11-04  Tom Tromey  <tom@tromey.com>
1259
1260         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1261         (adi_read_versions): Change "tags" to "gdb_byte *".
1262         (adi_print_versions): Likewise.
1263
1264 2017-11-04  Tom Tromey  <tom@tromey.com>
1265
1266         * breakpoint.c
1267         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1268         from start_rbreak_breakpoints.
1269         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1270         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1271         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1272         * symtab.c (do_end_rbreak_breakpoints): Remove.
1273         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1274
1275 2017-11-04  Tom Tromey  <tom@tromey.com>
1276
1277         * cp-namespace.c (reset_directive_searched): Remove.
1278         (cp_lookup_symbol_via_imports): Use scoped_restore.
1279         * cp-support.c (reset_directive_searched): Remove.
1280         (make_symbol_overload_list_using): Use scoped_restore.
1281         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1282         (reset_directive_searched): Remove.
1283
1284 2017-11-04  Tom Tromey  <tom@tromey.com>
1285
1286         * symfile.c (find_separate_debug_file_by_debuglink): Use
1287         unique_xmalloc_ptr.
1288
1289 2017-11-04  Tom Tromey  <tom@tromey.com>
1290
1291         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1292         type of "info".
1293         (compute_stack_depth): Likewise.
1294         (do_compile_dwarf_expr_to_c): Use std::vector.
1295
1296 2017-11-04  Tom Tromey  <tom@tromey.com>
1297
1298         * compile/compile-object-load.c (link_callbacks_einfo): Use
1299         std::string.
1300
1301 2017-11-04  Tom Tromey  <tom@tromey.com>
1302
1303         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1304         Use scoped_free_pendings.
1305         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1306         scoped_free_pendings.
1307         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1308         (xcoff_initial_scan): Likewise.
1309         * buildsym.c (reset_symtab_globals): Update comment.
1310         (scoped_free_pendings): Rename from really_free_pendings.
1311         (prepare_for_building): Update comment.
1312         (buildsym_init): Likewise.
1313         * buildsym.h (class scoped_free_pendings): New class.
1314         (really_free_pendings): Don't declare.
1315
1316 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1317
1318         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1319         output when converting a zero value to a special byteorder format.
1320
1321 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1322
1323         * frame.c (do_frame_register_read): Remove aspace.
1324         * jit.c (jit_frame_sniffer): Likwise.
1325         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1326         * regcache.c (regcache::regcache): Pass nullptr.
1327         (regcache_print): Caller updated.
1328         * regcache.h (regcache::regcache): Remove one constructor
1329         parameter aspace.
1330
1331 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1332
1333         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1334
1335 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1336
1337         * breakpoint.c (insert_single_step_breakpoints): Update.
1338         * frame.c (struct frame_info) <aspace>: Add const.
1339         (frame_save_as_regcache): Add const.
1340         (get_frame_address_space): Return const address_space *.
1341         * frame.h (get_frame_address_space): Update declaration.
1342         * infrun.c (struct step_over_info) <aspace>: Add const.
1343         (set_step_over_info): Make aspace const.
1344         (displaced_step_prepare_throw): Change variable const.
1345         (resume): Likewise.
1346         (proceed): Likewise.
1347         (adjust_pc_after_break): Likewise.
1348         (save_waitstatus): Likewise.
1349         (handle_signal_stop): Likewise.
1350         (keep_going_pass_signal): Likewise.
1351         * jit.c (jit_frame_sniffer): Add const.
1352         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1353         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1354         * record-full.c (record_full_wait_1): Likewise.
1355         * regcache.c (regcache::regcache): Change parameter to const.
1356         * regcache.h (regcache::regcache): Likewise.
1357         (regcache::aspace): Return const address_space *.
1358         (regcache) <m_aspace>: Add const.
1359
1360 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1361
1362         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1363         * frame.c (create_sentinel_frame): Likewise.
1364         * infrun.c (displaced_step_prepare_throw): Likewise.
1365         (resume): Likewise.
1366         (thread_still_needs_step_over_bp): Likewise.
1367         (proceed): Likewise.
1368         (do_target_wait): Likewise.
1369         (adjust_pc_after_break): Likewise.
1370         (handle_syscall_event): Likewise.
1371         (save_waitstatus): Likewise.
1372         (handle_inferior_event_1): Likewise.
1373         (handle_signal_stop): Likewise.
1374         (keep_going_pass_signal): Likewise.
1375         * linux-nat.c (status_callback): Likewise.
1376         (save_stop_reason): Likewise.
1377         (resume_stopped_resumed_lwps): Likewise.
1378         * record-full.c (record_full_exec_insn): Likewise.
1379         (record_full_wait_1): Likewise.
1380         * regcache.c (get_regcache_aspace): Remove.
1381         * regcache.h (get_regcache_aspace): Remove.
1382
1383 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1384
1385         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1386         (init_regcache_descr): Use gdbarch_num_regs.
1387         (regcache::regcache): Likewise.
1388         (regcache::get_register_status): Likewise.
1389         (regcache::assert_raw_regnum): Likewise.
1390         (regcache::cooked_read): Likewise.
1391         (regcache::cooked_read_value): Likewise.
1392         (regcache::cooked_write): Likewise.
1393         (regcache::dump): Likewise.
1394         (regcache::num_raw_registers): New method.
1395         * regcache.h (class regcache) <num_raw_registers>: New.
1396
1397 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1398
1399         * regcache.c (regcache::assert_regnum): New method.
1400         (regcache::invalidate): Call assert_regnum.
1401         (regcache::raw_update): Likewise.
1402         (regcache::raw_write): Likewise.
1403         (regcache::raw_read_part): Likewise.
1404         (regcache::raw_write_part): Likewise.
1405         (regcache::raw_supply): Likewise.
1406         (regcache::raw_supply_integer): Likewise.
1407         (regcache::raw_supply_zeroed): Likewise.
1408         (regcache::raw_collect): Likewise.
1409         (regcache::raw_collect_integer): Likewise.
1410         * regcache.h (regcache::assert_regnum): Declare.
1411
1412 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1413
1414         * regcache.c (regcache::dump): Remove code.
1415
1416 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1417
1418         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1419         Remove.
1420         <sizeof_cooked_register_status>: Remove.
1421         (init_regcache_descr): Update.
1422         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1423         (regcache::save): Likewise.
1424         (regcache::dump): Likewise.
1425
1426 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1427
1428         * ft32-tdep.c (ft32_fetch_instruction): New function.
1429         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1430
1431 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1432
1433         * cli/cli-script.c (execute_control_command): Rename to ...
1434         (execute_control_command_1): ... this.
1435         (execute_control_command): New function.
1436
1437 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1438
1439         * tracepoint.c (tfind_command): Remove const_cast.
1440
1441 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1442
1443         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1444
1445 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1446
1447         * common/common-utils.h (in_inclusive_range): New function.
1448         * arm-tdep.c (arm_record_extension_space): Use
1449         in_inclusive_range.
1450         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1451         * cris-tdep.c (cris_spec_reg_applicable): Use
1452         in_inclusive_range.
1453
1454 2017-10-30  Pedro Alves  <palves@redhat.com>
1455             Simon Marchi <simon.marchi@ericsson.com>
1456
1457         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1458         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1459
1460 2017-10-30  Pedro Alves  <palves@redhat.com>
1461
1462         * common/common-utils.c (string_appendf, string_vappendf): New
1463         functions.
1464         * common/common-utils.h (string_appendf, string_vappendf): New
1465         declarations.
1466         * unittests/common-utils-selftests.c (string_appendf_func)
1467         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1468         (string_vappendf_tests): New functions.
1469         (_initialize_common_utils_selftests): Register "string_appendf" and
1470         "string_vappendf tests".
1471
1472 2017-10-30  Pedro Alves  <palves@redhat.com>
1473
1474         * unittests/common-utils-selftests.c (format_func): New typedef.
1475         (string_printf_tests, string_vprintf_tests): Tests factored out
1476         and merged to ...
1477         (test_format_func): ... this new function.
1478         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1479         test_format_func.
1480
1481 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1482
1483         * darwin-nat.c: Remove include of gdb.h.
1484
1485 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1486
1487         * xtensa-xtregs.c: Fix formatting issues.
1488
1489 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1490
1491         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1492
1493 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1494
1495         PR python/21213
1496         * python/py-infthread.c (thpy_get_inferior): Increment reference
1497         of inferior before returning it.
1498
1499 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1500
1501         * unittests/common-utils-selftests.c (format): Add
1502         ATTRIBUTE_PRINTF.
1503
1504 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1505
1506         * xml-syscall.c (struct syscall_desc): Add constructor.
1507         <name>: Change type to std::string.
1508         (syscall_desc_up): New typedef.
1509         (syscall_desc_p): Remove typeder.
1510         (DEF_VEC_P(syscall_desc_p)): Remove.
1511         (struct syscall_group_desc): Add constructor.
1512         <name>: Change type to std::string.
1513         <syscalls>: Change type to std::vector.
1514         (syscall_group_desc_up): New typedef.
1515         (syscall_group_desc_p): Remove typedef.
1516         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1517         (struct syscalls_info) <syscalls>: Change type to std::vector of
1518         unique_ptr.
1519         <groups>: Likewise.
1520         <my_gdb_datadir>: Change type to std::string.
1521         (syscalls_info_up): New typedef.
1522         (allocate_syscalls_info): Remove.
1523         (syscalls_info_free_syscalls_desc): Remove.
1524         (syscalls_info_free_syscall_group_desc): Remove.
1525         (free_syscalls_info): Remove.
1526         (make_cleanup_free_syscalls_info): Remove.
1527         (syscall_group_create_syscall_group_desc): Adjust.
1528         (syscall_group_add_syscall): Adjust.
1529         (syscall_create_syscall_desc): Adjust.
1530         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1531         (init_syscalls_info): Adjust.
1532         (syscall_group_get_group_by_name): Adjust.
1533         (xml_get_syscall_number): Adjust.
1534         (xml_get_syscall_name): Adjust.
1535         (xml_list_of_syscalls): Adjust.
1536         (xml_list_syscalls_by_group): Adjust.
1537         (xml_list_of_groups): Adjust.
1538
1539 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1540
1541         * probe.h: Don't include gdb_vecs.h.
1542         (DEF_VEC_P (probe_p)): Remove.
1543         (find_probes_in_objfile): Return an std::vector.
1544         * probe.c (find_probes_in_objfile): Likewise.
1545         * breakpoint.c (breakpoint_objfile_data)
1546         <longjmp_probes>: Change type to std::vector.
1547         <exception_probes>: Likewise.
1548         (free_breakpoint_probes): Don't manually free vectors.
1549         (create_longjmp_master_breakpoint): Adjust.
1550         (create_exception_master_breakpoint): Adjust.
1551         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1552         parameter type, adjust.
1553         (svr4_create_solib_event_breakpoints): Adjust.
1554
1555 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1556
1557         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1558         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1559         with new.
1560         (free_breakpoint_probes): Rename to ...
1561         (free_breakpoint_objfile_data): ... this, and call delete on
1562         bp_objfile_data..
1563
1564 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1565
1566         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1567         (loaded_script_ptr): Remove typedef.
1568         (DEF_VEC_P (loaded_script_ptr)): Remove.
1569         (struct collect_matching_scripts_data): Add constructor.
1570         <scripts_p>: Change type to (pointer to) std::vector.
1571         (collect_matching_scripts_data): Adjust.
1572         (sort_scripts_by_name): Make suitable for std::sort.
1573         (print_scripts): Don't sort vector, adjust to std::vector.
1574         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1575
1576 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1577
1578         * symfile.c (filename_language): Make struct, not typedef.  Add
1579         constructor.
1580         <ext>: Change type to std::string.
1581         (DEF_VEC_O (filename_language)): Remove.
1582         (filename_language_table): Change type to std::vector.
1583         (add_filename_language): Adjust.
1584         (set_ext_lang_command): Adjust.
1585         (info_ext_lang_command): Adjust.
1586         (deduce_language_from_filename): Adjust.
1587         (class scoped_restore_filename_language_table): Remove.
1588         (test_filename_language): Use scoped_restore.
1589         (test_set_ext_lang_command): Use scoped_restore, adjust to
1590         std::vector change.
1591
1592 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1593
1594         * symfile.c: Include selftest.h.
1595         (class scoped_restore_filename_language_table): New.
1596         (test_filename_language): New test.
1597         (test_set_ext_lang_command): New test.
1598         (_initialize_symfile): Register tests.
1599
1600 2017-10-27  Keith Seitz  <keiths@redhat.com>
1601
1602         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1603         in the bp_location, falling back to find_pc_sect_function when
1604         needed.
1605         (add_location_to_breakpoint): Save sal->symbol.
1606         * breakpoint.h (struct bp_location) <symbol>: New field.
1607         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1608         * symtab.h (struct symtab_and_line) <symbol>: New field.
1609
1610 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1611
1612         PR gdb/13669
1613         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1614         to rewind obstack.
1615
1616 2017-10-26  Pedro Alves  <palves@redhat.com>
1617
1618         * remote.c (remote_async_terminal_ours_p): Delete.
1619         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1620         Remove references to 'remote_async_terminal_ours_p'.
1621
1622 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1623
1624         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1625
1626 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1627
1628         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1629         aspace const.
1630         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1631         Likewise.
1632         * breakpoint.c (bpstat_check_location): Remove cast.
1633         (breakpoint_hit_catch_fork): Make aspce const.
1634         (breakpoint_hit_catch_solib): Likewise.
1635         (breakpoint_hit_catch_exec): Likewise.
1636         (breakpoint_hit_ranged_breakpoint): Likewise.
1637         (breakpoint_hit_watchpoint): Likewise.
1638         (base_breakpoint_breakpoint_hit): Likewise.
1639         (bkpt_breakpoint_hit): Likewise.
1640         (dprintf_breakpoint_hit): Likewise.
1641         (tracepoint_breakpoint_hit): Likewise.
1642         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1643
1644 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1645
1646         * breakpoint.c (breakpoint_location_address_match): Change
1647         "struct address_space *" to "const address_space".
1648         (breakpoint_location_address_range_overlap): Likewise.
1649         (breakpoint_here_p): Likewise.
1650         (breakpoint_in_range_p): Likewise.
1651         (moribund_breakpoint_here_p): Likewise.
1652         (bp_location_inserted_here_p): Likewise.
1653         (software_breakpoint_inserted_here_p): Likewise.
1654         (hardware_breakpoint_inserted_here_p): Likewise.
1655         (hardware_watchpoint_inserted_in_range): Likewise.
1656         (bpstat_check_location): Likewise.
1657         (bpstat_stop_status): Likewise.
1658         (breakpoint_address_match): Likewise.
1659         (breakpoint_address_match_range): Likewise.
1660         (breakpoint_location_address_match): Likewise.
1661         (breakpoint_location_address_range_overlap): Likewise.
1662         (insert_single_step_breakpoint): Likewise.
1663         (breakpoint_has_location_inserted_here): Likewise.
1664         (single_step_breakpoint_inserted_here_p): Likewise.
1665         (pc_at_non_inline_function): Likewise.
1666         * breakpoint.h (bpstat_stop_status): Update declaration.
1667         (breakpoint_here_p): Likewise.
1668         (breakpoint_in_range_p): Likewise.
1669         (moribund_breakpoint_here_p): Likewise.
1670         (breakpoint_inserted_here_p): Likewise.
1671         (software_breakpoint_inserted_here_p): Likewise.
1672         (hardware_breakpoint_inserted_here_p): Likewise.
1673         (breakpoint_has_location_inserted_here): Likewise.
1674         (single_step_breakpoint_inserted_here_p): Likewise.
1675         (hardware_watchpoint_inserted_in_range): Likewise.
1676         (breakpoint_address_match): Likewise.
1677         (insert_single_step_breakpoint): Likewise.
1678         (pc_at_non_inline_function): Likewise.
1679         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1680         * record.c (record_check_stopped_by_breakpoint): Likewise.
1681         * record.h (record_check_stopped_by_breakpoint): Likewise.
1682         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1683
1684 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1685
1686         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1687         regcache->arch () instead get_regcache_arch.
1688         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1689         Likewise.
1690         (aarch64_fbsd_store_inferior_registers): Likewise.
1691         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1692         (store_gregs_to_thread): Likewise.
1693         (fetch_fpregs_from_thread): Likewise.
1694         (store_fpregs_to_thread): Likewise.
1695         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1696         (aarch64_store_return_value): Likewise.
1697         (aarch64_software_single_step): Likewise.
1698         * aix-thread.c (aix_thread_wait): Likewise.
1699         (supply_reg32): Likewise.
1700         (supply_sprs64): Likewise.
1701         (supply_sprs32): Likewise.
1702         (fill_gprs64): Likewise.
1703         (fill_gprs32): Likewise.
1704         (fill_sprs64): Likewise.
1705         (fill_sprs32): Likewise.
1706         (store_regs_user_thread): Likewise.
1707         (store_regs_kernel_thread): Likewise.
1708         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1709         (alphabsd_store_inferior_registers): Likewise.
1710         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1711         (alpha_store_return_value): Likewise.
1712         (alpha_deal_with_atomic_sequence): Likewise.
1713         (alpha_next_pc): Likewise.
1714         (alpha_software_single_step): Likewise.
1715         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1716         (amd64bsd_store_inferior_registers): Likewise.
1717         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1718         Likewise.
1719         (amd64_linux_store_inferior_registers): Likewise.
1720         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1721         (amd64_collect_native_gregset): Likewise.
1722         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1723         (amd64obsd_collect_uthread): Likewise.
1724         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1725         (amd64_collect_fpregset): Likewise.
1726         (amd64_supply_fxsave): Likewise.
1727         (amd64_supply_xsave): Likewise.
1728         (amd64_collect_fxsave): Likewise.
1729         (amd64_collect_xsave): Likewise.
1730         * arc-tdep.c (arc_write_pc): Likewise.
1731         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1732         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1733         (arm_fbsd_store_inferior_registers): Likewise.
1734         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1735         (store_vfp_regs): Likewise.
1736         (arm_linux_fetch_inferior_registers): Likewise.
1737         (arm_linux_store_inferior_registers): Likewise.
1738         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1739         (arm_linux_sigreturn_next_pc): Likewise.
1740         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1741         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1742         (fetch_register): Likewise.
1743         (store_register): Likewise.
1744         * arm-tdep.c (arm_is_thumb): Likewise.
1745         (displaced_in_arm_mode): Likewise.
1746         (bx_write_pc): Likewise.
1747         (arm_get_next_pcs_addr_bits_remove): Likewise.
1748         (arm_software_single_step): Likewise.
1749         (arm_extract_return_value): Likewise.
1750         (arm_store_return_value): Likewise.
1751         (arm_write_pc): Likewise.
1752         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1753         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1754         (bsd_uthread_store_registers): Likewise.
1755         * core-regset.c (fetch_core_registers): Likewise.
1756         * corelow.c (get_core_registers): Likewise.
1757         * cris-tdep.c (cris_store_return_value): Likewise.
1758         (cris_extract_return_value): Likewise.
1759         (find_step_target): Likewise.
1760         (find_step_target): Likewise.
1761         (cris_software_single_step): Likewise.
1762         * ctf.c (ctf_fetch_registers): Likewise.
1763         * darwin-nat.c (cancel_breakpoint): Likewise.
1764         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1765         * frv-tdep.c (frv_extract_return_value): Likewise.
1766         * ft32-tdep.c (ft32_store_return_value): Likewise.
1767         (ft32_extract_return_value): Likewise.
1768         * go32-nat.c (fetch_register): Likewise.
1769         (go32_fetch_registers): Likewise.
1770         (go32_store_registers): Likewise.
1771         (store_register): Likewise.
1772         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1773         (h8300_store_return_value): Likewise.
1774         * hppa-linux-nat.c (fetch_register): Likewise.
1775         (store_register): Likewise.
1776         (hppa_linux_fetch_inferior_registers): Likewise.
1777         (hppa_linux_store_inferior_registers): Likewise.
1778         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1779         (i386_darwin_store_inferior_registers): Likewise.
1780         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1781         (gnu_store_registers): Likewise.
1782         * i386-linux-nat.c (fetch_register): Likewise.
1783         (store_register): Likewise.
1784         (supply_gregset): Likewise.
1785         (fill_gregset): Likewise.
1786         (i386_linux_fetch_inferior_registers): Likewise.
1787         (i386_linux_store_inferior_registers): Likewise.
1788         (i386_linux_resume): Likewise.
1789         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1790         Likewise.
1791         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1792         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1793         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1794         (i386obsd_collect_uthread): Likewise.
1795         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1796         (i386_supply_gregset): Likewise.
1797         (i386_collect_gregset): Likewise.
1798         (i386_supply_fpregset): Likewise.
1799         (i386_collect_fpregset): Likewise.
1800         (i386_mpx_bd_base): Likewise.
1801         * i386-v4-nat.c (supply_fpregset): Likewise.
1802         (fill_fpregset): Likewise.
1803         * i387-tdep.c (i387_supply_fsave): Likewise.
1804         (i387_collect_fsave): Likewise.
1805         (i387_supply_fxsave): Likewise.
1806         (i387_collect_fxsave): Likewise.
1807         (i387_supply_xsave): Likewise.
1808         (i387_collect_xsave): Likewise.
1809         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1810         (ia64_linux_store_registers): Likewise.
1811         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1812         (ia64_extract_return_value): Likewise.
1813         (ia64_store_return_value): Likewise.
1814         (find_func_descr): Likewise.
1815         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1816         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1817         (inf_ptrace_store_registers): Likewise.
1818         * infrun.c (use_displaced_stepping): Likewise.
1819         (displaced_step_prepare_throw): Likewise.
1820         (resume): Likewise.
1821         (proceed): Likewise.
1822         (do_target_wait): Likewise.
1823         (adjust_pc_after_break): Likewise.
1824         (handle_inferior_event_1): Likewise.
1825         (handle_signal_stop): Likewise.
1826         (save_infcall_suspend_state): Likewise.
1827         (restore_infcall_suspend_state): Likewise.
1828         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1829         * jit.c (jit_frame_prev_register): Likewise.
1830         * linux-nat.c (save_stop_reason): Likewise.
1831         (linux_nat_wait_1): Likewise.
1832         (resume_stopped_resumed_lwps): Likewise.
1833         * linux-record.c (record_linux_sockaddr): Likewise.
1834         (record_linux_msghdr): Likewise.
1835         (record_linux_system_call): Likewise.
1836         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1837         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1838         (lm32_store_return_value): Likewise.
1839         * m32c-tdep.c (m32c_read_flg): Likewise.
1840         (m32c_pseudo_register_read): Likewise.
1841         (m32c_pseudo_register_write): Likewise.
1842         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1843         (m32r_linux_collect_gregset): Likewise.
1844         * m32r-tdep.c (m32r_store_return_value): Likewise.
1845         (m32r_extract_return_value): Likewise.
1846         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1847         (m68kbsd_collect_fpregset): Likewise.
1848         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1849         * m68k-linux-nat.c (fetch_register): Likewise.
1850         (old_fetch_inferior_registers): Likewise.
1851         (old_store_inferior_registers): Likewise.
1852         (store_regs): Likewise.
1853         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1854         (m68k_svr4_store_return_value): Likewise.
1855         * m88k-tdep.c (m88k_store_arguments): Likewise.
1856         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1857         (mi_cmd_data_write_register_values): Likewise.
1858         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1859         (mips_fbsd_store_inferior_registers): Likewise.
1860         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1861         (mips_fbsd_supply_gregs): Likewise.
1862         (mips_fbsd_collect_fpregs): Likewise.
1863         (mips_fbsd_collect_gregs): Likewise.
1864         (mips_fbsd_supply_fpregset): Likewise.
1865         (mips_fbsd_collect_fpregset): Likewise.
1866         (mips_fbsd_supply_gregset): Likewise.
1867         (mips_fbsd_collect_gregset): Likewise.
1868         * mips-linux-nat.c (supply_gregset): Likewise.
1869         (fill_gregset): Likewise.
1870         (supply_fpregset): Likewise.
1871         (fill_fpregset): Likewise.
1872         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1873         (mips_fill_gregset): Likewise.
1874         (mips_supply_fpregset): Likewise.
1875         (mips_fill_fpregset): Likewise.
1876         (mips64_supply_gregset): Likewise.
1877         (micromips_linux_sigframe_validate): Likewise.
1878         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1879         (mipsnbsd_fetch_inferior_registers): Likewise.
1880         (mipsnbsd_store_inferior_registers): Likewise.
1881         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1882         (mipsnbsd_supply_gregset): Likewise.
1883         (mipsnbsd_iterate_over_regset_sections): Likewise.
1884         (mipsnbsd_supply_reg): Likewise.
1885         (mipsnbsd_supply_fpreg): Likewise.
1886         * mips-tdep.c (mips_in_frame_stub): Likewise.
1887         (mips_dummy_id): Likewise.
1888         (is_octeon_bbit_op): Likewise.
1889         (micromips_bc1_pc): Likewise.
1890         (extended_mips16_next_pc): Likewise.
1891         (mips16_next_pc): Likewise.
1892         (deal_with_atomic_sequence): Likewise.
1893         * moxie-tdep.c (moxie_process_readu): Likewise.
1894         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1895         * nto-procfs.c (procfs_store_registers): Likewise.
1896         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1897         (ppcfbsd_store_inferior_registers): Likewise.
1898         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1899         (fetch_altivec_register): Likewise.
1900         (get_spe_registers): Likewise.
1901         (fetch_spe_register): Likewise.
1902         (fetch_altivec_registers): Likewise.
1903         (fetch_all_gp_regs): Likewise.
1904         (fetch_all_fp_regs): Likewise.
1905         (store_vsx_register): Likewise.
1906         (store_altivec_register): Likewise.
1907         (set_spe_registers): Likewise.
1908         (store_spe_register): Likewise.
1909         (store_altivec_registers): Likewise.
1910         (store_all_gp_regs): Likewise.
1911         (store_all_fp_regs): Likewise.
1912         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1913         (ppc_linux_collect_gregset): Likewise.
1914         (ppc_canonicalize_syscall): Likewise.
1915         (ppc_linux_record_signal): Likewise.
1916         (ppu2spu_prev_register): Likewise.
1917         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1918         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1919         (ppcobsd_store_registers): Likewise.
1920         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1921         Likewise.
1922         (ppc_ravenscar_generic_store_registers): Likewise.
1923         * procfs.c (procfs_fetch_registers): Likewise.
1924         (procfs_store_registers): Likewise.
1925         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1926         (ravenscar_store_registers): Likewise.
1927         (ravenscar_prepare_to_store): Likewise.
1928         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1929         * record-full.c (record_full_wait_1): Likewise.
1930         (record_full_registers_change): Likewise.
1931         (record_full_store_registers): Likewise.
1932         (record_full_core_fetch_registers): Likewise.
1933         (record_full_save): Likewise.
1934         (record_full_goto_insn): Likewise.
1935         * regcache.c (regcache_register_size): Likewise.
1936         (get_regcache_arch): Remove.
1937         (regcache_read_pc): Likewise.
1938         * regcache.h (get_regcache_arch): Remove.
1939         * remote-sim.c (gdbsim_fetch_register): Likewise.
1940         (gdbsim_store_register): Likewise.
1941         * remote.c (fetch_register_using_p): Likewise.
1942         (send_g_packet): Likewise.
1943         (remote_prepare_to_store): Likewise.
1944         (store_registers_using_G): Likewise.
1945         * reverse.c (save_bookmark_command): Likewise.
1946         (goto_bookmark_command): Likewise.
1947         * rs6000-aix-tdep.c (branch_dest): Likewise.
1948         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1949         (fetch_register): Likewise.
1950         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1951         (ppc_collect_reg): Likewise.
1952         (ppc_collect_gregset): Likewise.
1953         (ppc_collect_fpregset): Likewise.
1954         (ppc_collect_vsxregset): Likewise.
1955         (ppc_collect_vrregset): Likewise.
1956         (ppc_displaced_step_hw_singlestep): Likewise.
1957         (rs6000_pseudo_register_read): Likewise.
1958         (rs6000_pseudo_register_write): Likewise.
1959         * s390-linux-nat.c (supply_gregset): Likewise.
1960         (fill_gregset): Likewise.
1961         (s390_linux_fetch_inferior_registers): Likewise.
1962         * s390-linux-tdep.c (s390_write_pc): Likewise.
1963         (s390_software_single_step): Likewise.
1964         (s390_all_but_pc_registers_record): Likewise.
1965         (s390_linux_syscall_record): Likewise.
1966         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1967         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1968         (shnbsd_store_inferior_registers): Likewise.
1969         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1970         (sh_extract_return_value_fpu): Likewise.
1971         (sh_store_return_value_nofpu): Likewise.
1972         (sh_corefile_supply_regset): Likewise.
1973         (sh_corefile_collect_regset): Likewise.
1974         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1975         (sh64_store_return_value): Likewise.
1976         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1977         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1978         (sparc_store_inferior_registers): Likewise.
1979         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1980         (sparc_ravenscar_prepare_to_store): Likewise.
1981         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1982         (sparc_analyze_control_transfer): Likewise.
1983         (sparc_step_trap): Likewise.
1984         (sparc_software_single_step): Likewise.
1985         (sparc32_gdbarch_init): Likewise.
1986         (sparc_supply_rwindow): Likewise.
1987         (sparc_collect_rwindow): Likewise.
1988         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1989         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1990         (sparc64nbsd_collect_gregset): Likewise.
1991         (sparc64nbsd_supply_fpregset): Likewise.
1992         (sparc64nbsd_collect_fpregset): Likewise.
1993         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1994         (sparc64_supply_gregset): Likewise.
1995         (sparc64_collect_gregset): Likewise.
1996         (sparc64_supply_fpregset): Likewise.
1997         (sparc64_collect_fpregset): Likewise.
1998         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1999         * spu-tdep.c (spu_unwind_sp): Likewise.
2000         (spu2ppu_prev_register): Likewise.
2001         (spu_memory_remove_breakpoint): Likewise.
2002         * stack.c (return_command): Likewise.
2003         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2004         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2005         * tracefile.c (trace_save_ctf): Likewise.
2006         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2007         (do_windows_store_inferior_registers): Likewise.
2008         (windows_resume): Likewise.
2009         * xtensa-linux-nat.c (fill_gregset): Likewise.
2010         (supply_gregset_reg): Likewise.
2011         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2012         (xtensa_register_read_masked): Likewise.
2013         (xtensa_supply_gregset): Likewise.
2014         (xtensa_extract_return_value): Likewise.
2015         (xtensa_store_return_value): Likewise.
2016
2017 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2018
2019         * doublest.c (floatformat_from_string): New function.
2020         * doublest.h (floatformat_from_string): Add prototype.
2021
2022         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2023         (OP_FLOAT): ... this.
2024         * expression.h: Do not include "doublest.h".
2025         (union exp_element): Replace doubleconst and decfloatconst by
2026         new element floatconst.
2027         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2028         (ada_evaluate_subexp): Likewise.
2029         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2030         OP_DOUBLE and OP_DECFLOAT.
2031         * expprint.c (print_subexp_standard): Likewise.
2032         (dump_subexp_body_standard): Likewise.
2033         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2034
2035         * parse.c: Include "dfp.h".
2036         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2037         (write_exp_elt_floatcst): New function.
2038         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2039         and OP_DECFLOAT.
2040         (operator_check_standard): Likewise.
2041         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2042         Return target format buffer instead of host DOUBLEST.
2043         Use floatformat_from_string and decimal_from_string to parse
2044         either binary or decimal floating-point types.
2045         (parse_c_float): Remove.
2046         * parser-defs.h: Do not include "doublest.h".
2047         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2048         (write_exp_elt_floatcst): Add prototype.
2049         (parse_float): Update prototype.
2050         (parse_c_float): Remove.
2051
2052         * c-exp.y: Do not include "dfp.h".
2053         (typed_val_float): Use byte buffer instead of DOUBLEST.
2054         (typed_val_decfloat): Remove.
2055         (DECFLOAT): Remove.
2056         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2057         (parse_number): Update to new parse_float interface.
2058         Parse suffixes and determine type before calling parse_float.
2059         Handle decimal and binary FP types the same way.
2060
2061         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2062         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2063         (parse_number): Update to new parse_float interface.
2064         Parse suffixes and determine type before calling parse_float.
2065
2066         * f-exp.y: Replace dval by typed_val_float.
2067         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2068         (parse_number): Use parse_float instead of atof.
2069
2070         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2071         (parse_go_float): Remove.
2072         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2073         (parse_number): Call parse_float instead of parse_go_float.
2074         Parse suffixes and determine type before calling parse_float.
2075
2076         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2077         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2078         (parse_number): Update to new parse_float interface.
2079         Parse suffixes and determine type before calling parse_float.
2080
2081         * m2-exp.y: Replace dval by byte buffer val.
2082         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2083         (parse_number): Call parse_float instead of atof.
2084
2085         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2086         (lex_number): Call parse_float instead of strtod.
2087         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2088         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2089         Use write_exp_elt_floatcst.
2090         (unit_testing): Remove static variable.
2091         (rust_type): Do not check unit_testing.
2092         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2093
2094         * ada-exp.y (type_float, type_double): Remove.
2095         (typed_val_float): Use byte buffer instead of DOUBLEST.
2096         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2097         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2098
2099 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2100
2101         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2102         * arch/aarch64.h: New file.
2103
2104 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2105
2106         * dfp.h (decimal_from_string): Use const reference for argument.
2107         * dfp.c (decimal_from_string): Likewise.
2108
2109 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2110
2111         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2112         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2113         * mips-tdep.c (mips_print_fp_register): Likewise.
2114
2115 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2116
2117         * common/format.h (enum argclass): Replace decfloat_arg by
2118         dec32float_arg, dec64float_arg, and dec128float_arg.
2119         * common/format.c (parse_format_string): Update to return
2120         new decimal float argument classes.
2121
2122         * printcmd.c (printf_decfloat): Rename to ...
2123         (printf_floating): ... this.  Add argclass argument, and use it
2124         instead of parsing the format string again.  Add support for
2125         binary floating-point values, using floatformat_to_string.
2126         Convert value to the target format if it doesn't already match.
2127         (ui_printf): Call printf_floating instead of printf_decfloat,
2128         also for double_arg / long_double_arg.  Pass argclass.
2129
2130         * dfp.c (decimal_to_string): Add format string argument.
2131         * dfp.h (decimal_to_string): Likewise.
2132
2133         * doublest.c (floatformat_to_string): Add format string argument.
2134         * doublest.h (floatformat_to_string): Likewise.
2135
2136 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2137
2138         * doublest.c (floatformat_precision): New routine.
2139         (floatformat_to_string): Likewise.
2140         * doublest.c (floatformat_to_string): Add prototype.
2141
2142         * printcmd.c (print_scalar_formatted): Only call print_floating
2143         on floating-point types.
2144         * valprint.c: Do not include "floatformat.h".
2145         (generic_val_print_decfloat): Remove.
2146         (generic_val_print): Call generic_val_print_float for both
2147         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2148         (print_floating): Use floatformat_to_string.  Handle decimal float.
2149         (print_decimal_floating): Remove, merge into floatformat_to_string.
2150         * value.h (print_decimal_floating): Remove.
2151
2152         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2153
2154 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2155
2156         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2157
2158 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2159
2160         * memattr.h: Don't include vec.h.
2161         (struct mem_attrib): Initialize fields.
2162         <unknown>: New static method.
2163         (struct mem_region): Add constructors, operator<, initialize
2164         fields.
2165         * memattr.c: Include algorithm.
2166         (default_mem_attrib, unknown_mem_attrib): Remove.
2167         (user_mem_region_list): New global.
2168         (target_mem_region_list, mem_region_list): Change type to
2169         std::vector<mem_region>.
2170         (mem_use_target): Now a function.
2171         (target_mem_regions_valid): Change type to bool.
2172         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2173         (require_user_regions): Adjust.
2174         (require_target_regions): Adjust.
2175         (create_mem_region): Adjust.
2176         (lookup_mem_region): Adjust.
2177         (invalidate_target_mem_regions): Adjust.
2178         (mem_clear): Rename to...
2179         (user_mem_clear): ... this, and adjust.
2180         (mem_command): Adjust.
2181         (info_mem_command): Adjust.
2182         (mem_enable, enable_mem_command, mem_disable,
2183         disable_mem_command): Adjust.
2184         (mem_delete): Adjust.
2185         (delete_mem_command): Adjust.
2186         * memory-map.h (parse_memory_map): Return an std::vector.
2187         * memory-map.c (parse_memory_map): Likewise.
2188         (struct memory_map_parsing_data): Add constructor.
2189         <memory_map>: Point to std::vector.
2190         (memory_map_start_memory): Adjust.
2191         (memory_map_end_memory): Adjust.
2192         (memory_map_end_property): Adjust.
2193         (clear_result): Remove.
2194         * remote.c (remote_memory_map): Return an std::vector.
2195         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2196         Remove.
2197         (target_debug_print_mem_region_vector): New.
2198         * target-delegates.c: Regenerate.
2199         * target.h (mem_region_vector): New typedef.
2200         (to_memory_map): Return mem_region_vector.
2201         (target_memory_map): Return an std::vector.
2202         * target.c (target_memory_map): Return an std::vector.
2203         (flash_erase_command): Adjust.
2204
2205 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2206
2207         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2208         Change type to std::string.
2209         (memory_map_start_property): Adjust.
2210         (memory_map_end_property): Adjust.
2211
2212 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2213
2214         * infrun.h: Include common/byte-vector.h.
2215         (struct displaced_step_closure): New struct.
2216         (struct buf_displaced_step_closure): New struct.
2217         * infrun.c (displaced_step_closure::~displaced_step_closure):
2218         Provide default implementation.
2219         (displaced_step_clear): Deallocate step closure with delete.
2220         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2221         (aarch64_displaced_step_closure): ... this, extend
2222         displaced_step_closure.
2223         (aarch64_displaced_step_data) <dsc>: Change type to
2224         aarch64_displaced_step_closure.
2225         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2226         unique_ptr.
2227         (aarch64_displaced_step_fixup): Add cast for displaced step
2228         closure.
2229         * amd64-tdep.c (displaced_step_closure): Rename to ...
2230         (amd64_displaced_step_closure): ... this, extend
2231         displaced_step_closure.
2232         <insn_buf>: Change type to std::vector<gdb_byte>.
2233         <max_len>: Remove.
2234         (fixup_riprel): Change type of DSC parameter, adjust to type
2235         change of insn_buf.
2236         (fixup_displaced_copy): Change type of DSC parameter.
2237         (amd64_displaced_step_copy_insn): Instantiate
2238         amd64_displaced_step_closure.
2239         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2240         to type change of insn_buf.
2241         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2242         parameter DSC.
2243         (arm_linux_copy_svc): Likewise.
2244         (cleanup_kernel_helper_return): Likewise.
2245         (arm_catch_kernel_helper_return): Likewise.
2246         (arm_linux_displaced_step_copy_insn): Instantiate
2247         arm_displaced_step_closure.
2248         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2249         (displaced_read_reg): Change type of parameter DSC.
2250         (branch_write_pc): Likewise.
2251         (load_write_pc): Likewise.
2252         (alu_write_pc): Likewise.
2253         (displaced_write_reg): Likewise.
2254         (arm_copy_unmodified): Likewise.
2255         (thumb_copy_unmodified_32bit): Likewise.
2256         (thumb_copy_unmodified_16bit): Likewise.
2257         (cleanup_preload): Likewise.
2258         (install_preload): Likewise.
2259         (arm_copy_preload): Likewise.
2260         (thumb2_copy_preload): Likewise.
2261         (install_preload_reg): Likewise.
2262         (arm_copy_preload_reg): Likewise.
2263         (cleanup_copro_load_store): Likewise.
2264         (install_copro_load_store): Likewise.
2265         (arm_copy_copro_load_store) Likewise.
2266         (thumb2_copy_copro_load_store): Likewise.
2267         (cleanup_branch): Likewise.
2268         (install_b_bl_blx): Likewise.
2269         (arm_copy_b_bl_blx): Likewise.
2270         (thumb2_copy_b_bl_blx): Likewise.
2271         (thumb_copy_b): Likewise.
2272         (install_bx_blx_reg): Likewise.
2273         (arm_copy_bx_blx_reg): Likewise.
2274         (thumb_copy_bx_blx_reg): Likewise.
2275         (cleanup_alu_imm): Likewise.
2276         (arm_copy_alu_imm): Likewise.
2277         (thumb2_copy_alu_imm): Likewise.
2278         (cleanup_alu_reg): Likewise.
2279         (install_alu_reg): Likewise.
2280         (arm_copy_alu_reg): Likewise.
2281         (thumb_copy_alu_reg): Likewise.
2282         (cleanup_alu_shifted_reg): Likewise.
2283         (install_alu_shifted_reg): Likewise.
2284         (arm_copy_alu_shifted_reg): Likewise.
2285         (cleanup_load): Likewise.
2286         (cleanup_store): Likewise.
2287         (arm_copy_extra_ld_st): Likewise.
2288         (install_load_store): Likewise.
2289         (thumb2_copy_load_literal): Likewise.
2290         (thumb2_copy_load_reg_imm): Likewise.
2291         (arm_copy_ldr_str_ldrb_strb): Likewise.
2292         (cleanup_block_load_all): Likewise.
2293         (cleanup_block_store_pc): Likewise.
2294         (cleanup_block_load_pc): Likewise.
2295         (arm_copy_block_xfer): Likewise.
2296         (thumb2_copy_block_xfer): Likewise.
2297         (cleanup_svc): Likewise.
2298         (install_svc): Likewise.
2299         (arm_copy_svc): Likewise.
2300         (thumb_copy_svc): Likewise.
2301         (arm_copy_undef): Likewise.
2302         (thumb_32bit_copy_undef): Likewise.
2303         (arm_copy_unpred): Likewise.
2304         (arm_decode_misc_memhint_neon): Likewise.
2305         (arm_decode_unconditional): Likewise.
2306         (arm_decode_miscellaneous): Likewise.
2307         (arm_decode_dp_misc): Likewise.
2308         (arm_decode_ld_st_word_ubyte): Likewise.
2309         (arm_decode_media): Likewise.
2310         (arm_decode_b_bl_ldmstm): Likewise.
2311         (arm_decode_ext_reg_ld_st): Likewise.
2312         (thumb2_decode_dp_shift_reg): Likewise.
2313         (thumb2_decode_ext_reg_ld_st): Likewise.
2314         (arm_decode_svc_copro): Likewise.
2315         (thumb2_decode_svc_copro): Likewise.
2316         (install_pc_relative): Likewise.
2317         (thumb_copy_pc_relative_16bit): Likewise.
2318         (thumb_decode_pc_relative_16bit): Likewise.
2319         (thumb_copy_pc_relative_32bit): Likewise.
2320         (thumb_copy_16bit_ldr_literal): Likewise.
2321         (thumb_copy_cbnz_cbz): Likewise.
2322         (thumb2_copy_table_branch): Likewise.
2323         (cleanup_pop_pc_16bit_all): Likewise.
2324         (thumb_copy_pop_pc_16bit): Likewise.
2325         (thumb_process_displaced_16bit_insn): Likewise.
2326         (decode_thumb_32bit_ld_mem_hints): Likewise.
2327         (thumb_process_displaced_32bit_insn): Likewise.
2328         (thumb_process_displaced_insn): Likewise.
2329         (arm_process_displaced_insn): Likewise.
2330         (arm_displaced_init_closure): Likewise.
2331         (arm_displaced_step_fixup): Add cast for closure.
2332         * arm-tdep.h: Include infrun.h.
2333         (displaced_step_closure): Rename to ...
2334         (arm_displaced_step_closure): ... this, extend
2335         displaced_step_closure.
2336         <u::svc::copy_svc_os>: Change type of parameter DSC.
2337         <cleanup>: Likewise.
2338         (arm_process_displaced_insn): Likewise.
2339         (arm_displaced_init_closure): Likewise.
2340         (displaced_read_reg): Likewise.
2341         (displaced_write_reg): Likewise.
2342         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2343         Adjust.
2344         * i386-tdep.h: Include infrun.h.
2345         (i386_displaced_step_closure): New typedef.
2346         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2347         i386_displaced_step_closure.
2348         (i386_displaced_step_fixup): Adjust.
2349         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2350         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2351         and unique_ptr.
2352         (ppc_displaced_step_fixup): Adjust.
2353         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2354         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2355         and unique_ptr.
2356         (s390_displaced_step_fixup): Adjust.
2357
2358 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2359
2360         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2361         Remove declarations.
2362
2363 2017-10-20  Tom Tromey  <tom@tromey.com>
2364
2365         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2366         std::vector.
2367         (gdb_bfd_record_inclusion): Update.
2368         (bfdp): Remove typedef.
2369
2370 2017-10-20  Tom Tromey  <tom@tromey.com>
2371
2372         * gdb_bfd.c (gdb_bfd_ref): Use new.
2373         (struct gdb_bfd_data): Add constructor, destructor, and member
2374         initializers.
2375         (gdb_bfd_unref): Use delete.
2376
2377 2017-10-20  Tom Tromey  <tom@tromey.com>
2378
2379         * exec.c (exec_file_attach): Use new_bfd_ref.
2380         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2381         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2382         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2383         new_bfd_ref.
2384         * gdb_bfd.h (new_bfd_ref): New function.
2385
2386 2017-10-20  Pedro Alves  <palves@redhat.com>
2387
2388         * main.c (captured_command_loop): Add attribute noinline.
2389
2390 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * interps.c (struct interp_factory): Add constructor.
2393         (interp_factory_p): Remove typedef.
2394         (DEF_VEC_P(interp_factory_p)): Remove.
2395         (interpreter_factories): Change type to std::vector.
2396         (interp_factory_register): Adjust.
2397         (interp_lookup): Adjust.
2398         (interpreter_completer): Adjust.
2399
2400 2017-10-19  Tom Tromey  <tom@tromey.com>
2401
2402         * break-catch-syscall.c (catch_syscall_completer): Use
2403         std::string, gdb::unique_xmalloc_ptr.
2404
2405 2017-10-19  Tom Tromey  <tom@tromey.com>
2406
2407         * infcall.c (call_function_by_hand_dummy): Use std::string.
2408
2409 2017-10-19  Tom Tromey  <tom@tromey.com>
2410
2411         * mi/mi-main.c (mi_cmd_execute): Update.
2412         * top.h (prepare_execute_command): Return scoped_value_mark.
2413         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2414         Add move constructor.
2415         * top.c (prepare_execute_command): Return scoped_value_mark.
2416         (execute_command): Update.
2417
2418 2017-10-19  Pedro Alves  <palves@redhat.com>
2419
2420         * xml-support.c (xml_fetch_content_from_file): Check fread's
2421         return.
2422
2423 2017-10-19  Pedro Alves  <palves@redhat.com>
2424
2425         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2426         async.
2427         (handle_error_fd): New function.
2428         (ser_base_async): Add/delete an event loop file handler for
2429         error_fd.
2430
2431 2017-10-19  Pedro Alves  <palves@redhat.com>
2432
2433         * xml-support.c (xml_fetch_content_from_file): Don't read in
2434         chunks.  Instead use fseek to determine the file's size, and read
2435         it in one go.
2436
2437 2017-11-18  Keith Seitz  <keiths@redhat.com>
2438
2439         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2440         types.
2441         Add whitespace to front of type name.
2442
2443 2017-10-18  Keith Seitz  <keiths@redhat.com>
2444
2445         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2446         DW_AT_accessibility.
2447
2448 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2449
2450         * features/tic6x-c62x-linux.c: Remove.
2451
2452 2017-10-17  Tom Tromey  <tom@tromey.com>
2453
2454         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2455         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2456         (do_mixed_source_and_assembly): Likewise.
2457
2458 2017-10-17  Tom Tromey  <tom@tromey.com>
2459
2460         * regcache.c (regcache::xfer_part): Remove assertion.
2461
2462 2017-10-17  Pedro Alves  <palves@redhat.com>
2463
2464         * xml-support.c (xml_fetch_content_from_file): Call
2465         unique_ptr::release() instead unique_ptr::get() when passing
2466         through xrealloc.
2467
2468 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2469
2470         * regcache.c (regcache::xfer_part): Remove parameters read and
2471         write, add parameter is_raw.  All callers are updated.
2472
2473 2017-10-16  Keith Seitz  <keiths@redhat.com>
2474
2475         * c-typeprint.c (enum access_specifier): Moved here from
2476         c_type_print_base.
2477         (output_access_specifier): New function.
2478         (c_type_print_base): Consider typedefs when assessing
2479         whether access labels are needed.
2480         Use output_access_specifier as needed.
2481         Output access specifier for typedefs, if needed.
2482         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2483         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2484         fields.
2485         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2486         accessor macros.
2487
2488 2017-10-16  Tom Tromey  <tom@tromey.com>
2489
2490         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2491         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2492         * target.c (target_fileio_read_stralloc): Update.
2493         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2494         * target.h (target_fileio_read_stralloc): Return
2495         unique_xmalloc_ptr.
2496
2497 2017-10-16  Tom Tromey  <tom@tromey.com>
2498
2499         * xml-syscall.c (xml_init_syscalls_info): Update.
2500         * xml-support.c (xinclude_start_include): Update.
2501         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2502         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2503         (xml_fetch_content_from_file): Likewise.
2504         * osdata.c (get_osdata): Update.
2505         * target.h (target_read_stralloc, target_get_osdata): Return
2506         unique_xmalloc_ptr.
2507         * solib-aix.c (solib_aix_get_library_list): Update.
2508         * solib-target.c (solib_target_current_sos): Update.
2509         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2510         * xml-tdesc.c (fetch_available_features_from_target): Update.
2511         (target_fetch_description_xml): Update.
2512         (file_read_description_xml): Update.
2513         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2514         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2515         (remote_pid_to_exec_file): Update.
2516         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2517         (target_get_osdata): Likewise.
2518
2519 2017-10-16  Tom Tromey  <tom@tromey.com>
2520
2521         * remote.c (remote_register_number_and_offset): Use std::vector.
2522         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2523         (putpkt_binary): Use gdb::def_vector.
2524         (compare_sections_command): Use gdb::byte_vector.
2525
2526 2017-10-16  Tom Tromey  <tom@tromey.com>
2527
2528         * ppc-linux-nat.c (hwdebug_insert_point): Use
2529         gdb::unique_xmalloc_ptr, XDUP.
2530
2531 2017-10-16  Tom Tromey  <tom@tromey.com>
2532
2533         * probe.c (parse_probes): Use std::string.
2534         (info_probes_for_ops, enable_probes_command)
2535         (disable_probes_command): Remove cleanups.
2536
2537 2017-10-16  Tom Tromey  <tom@tromey.com>
2538
2539         * buildsym.c (block_compar): Remove.
2540         (end_symtab_get_static_block): Use std::vector.
2541
2542 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2543
2544         * memrange.h (struct mem_range): Define operator< and operator==.
2545         (mem_range_s): Remove.
2546         (DEF_VEC_O (mem_range_s)): Remove.
2547         (normalize_mem_ranges): Change parameter type to std::vector.
2548         * memrange.c (compare_mem_ranges): Remove.
2549         (normalize_mem_ranges): Change parameter type to std::vector,
2550         adjust to vector change.
2551         * exec.c (section_table_available_memory): Return vector, remove
2552         parameter.
2553         (section_table_read_available_memory): Adjust to std::vector
2554         change.
2555         * remote.c (remote_read_bytes): Adjust to std::vector
2556         change.
2557         * tracepoint.h (traceframe_available_memory): Change parameter
2558         type to std::vector.
2559         * tracepoint.c (traceframe_available_memory): Change parameter
2560         type to std::vector, adjust.
2561         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2562         std::vector change.
2563         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2564         unittests/memrange-selftests.c.
2565         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2566         * gdb/unittests/memrange-selftests.c: New file.
2567
2568 2017-10-16  Pedro Alves  <palves@redhat.com>
2569
2570         * elfread.c (probe_key_free): Rename range-for variable.
2571         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2572         (find_probe_by_pc, collect_probes): Rename range-for variable.
2573
2574 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2575
2576         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2577         * features/tic6x-c62x.c: Remove.
2578         * features/tic6x-c64x-linux.c: Remove.
2579         * features/tic6x-c64x.c: Remove.
2580         * features/tic6x-c64xp-linux.c: Remove.
2581         * features/tic6x-c64xp.c: Remove.
2582         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2583         initialize_tdesc_tic6x_*_linux functions.
2584         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2585         initialize_tdesc_tic6x_* functions.
2586
2587 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2588
2589         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2590         tic6x-c62x.
2591         * regformats/tic6x-c62x.dat: Remove.
2592         * regformats/tic6x-c64x.dat: Remove.
2593         * regformats/tic6x-c64xp.dat: Remove.
2594
2595 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2596
2597         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2598         (the !HAVE_LIBEXPAT version).
2599
2600 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2601
2602         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2603         const.
2604
2605 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2606
2607         * target.h: Include tracepoint.h.
2608         (enum trace_find_type): Move to tracepoint.h.
2609         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2610         * tracepoint.h: Don't include target.h
2611         (enum trace_find_type): Move from target.h.
2612         (parse_traceframe_info): Return a unique ptr.
2613         * tracepoint.c (current_traceframe_info): Change type to unique
2614         ptr.
2615         (free_traceframe_info): Remove.
2616         (clear_traceframe_info): Don't manually free
2617         current_traceframe_info.
2618         (free_result): Remove.
2619         (parse_traceframe_info): Return a unique ptr.
2620         (get_traceframe_info): Adjust to unique ptr.
2621         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2622         * remote.c (remote_traceframe_info): Return a unique ptr.
2623         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2624         ptr.
2625         * target-debug.h (target_debug_print_traceframe_info_up): New
2626         macro.
2627         * target-delegates.c: Regenerate.
2628
2629 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2630
2631         * memrange.h (struct mem_range): Add constructors.
2632         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2633         std::vector<mem_range>.
2634         * tracepoint.c (free_traceframe_info): Don't manually free
2635         vector.
2636         (traceframe_info_start_memory): Adjust to vector change.
2637         (traceframe_available_memory): Likewise.
2638         * tracefile-tfile.c (build_traceframe_info): Likewise.
2639         * ctf.c (ctf_traceframe_info): Likewise.
2640
2641 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2642
2643         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2644         std::vector<int>.
2645         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2646         (traceframe_info_start_tvar): Adjust to vector change.
2647         (parse_traceframe_info): Allocate with new.
2648         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2649         vector change.
2650         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2651         change.
2652         tfile_traceframe_info): Allocate with new.
2653         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2654         change.
2655
2656 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2657
2658         * tracepoint.c (traceframe_info): Rename to...
2659         (current_traceframe_info): ...this.
2660         (clear_traceframe_info): Adjust.
2661         (get_traceframe_info): Adjust.
2662
2663 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2664
2665         * nat/linux-osdata.c: Include algorithm.
2666         (compare_processes): Remove.
2667         (struct pid_pgid_entry): New struct.
2668         (linux_xfer_osdata_processgroups): Use std::vector instead of
2669         XNEWVEC.
2670
2671 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2672
2673         * objfiles.h: Don't include symfile.h.
2674         (struct partial_symbol): Remove forward-declaration.
2675         (struct objfile) <global_psymbols, static_psymbols>: Change type
2676         to std::vector<partial_symbol *>.
2677         * objfiles.c (objfile::objfile): Don't memset those fields.
2678         (objfile::~objfile): Don't free those fields.
2679         * psympriv.h (struct psymbol_allocation_list): Remove
2680         forward-declaration.
2681         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2682         to std::vector.
2683         (start_psymtab_common): Change parameters to std::vector.
2684         * psymtab.c: Include algorithm.
2685         (require_partial_symbols): Call shrink_to_fit.
2686         (find_pc_sect_psymbol): Adjust to vector change.
2687         (match_partial_symbol): Likewise.
2688         (lookup_partial_symbol): Likewise.
2689         (psym_relocate): Likewise.
2690         (dump_psymtab): Likewise.
2691         (recursively_search_psymtabs): Likewise.
2692         (compare_psymbols): Remove.
2693         (sort_pst_symbols): Adjust to vector change.
2694         (start_psymtab_common): Likewise.
2695         (end_psymtab_common): Likewise.
2696         (psymbol_bcache_full): De-constify return value.
2697         (add_psymbol_to_bcache): Likewise.
2698         (extend_psymbol_list): Remove.
2699         (append_psymbol_to_list): Adjust to vector change.
2700         (add_psymbol_to_list): Likewise.
2701         (init_psymbol_list): Likewise.
2702         (maintenance_info_psymtabs): Likewise.
2703         (maintenance_check_psymtabs): Likewise.
2704         * symfile.h (struct psymbol_allocation_list): Remove.
2705         * symfile.c (reread_symbols): Adjust to vector change.
2706         * dbxread.c (start_psymtab): Change type of parameters.
2707         (dbx_symfile_read): Adjust to vector change.
2708         (read_dbx_symtab): Likewise.
2709         (start_psymtab): Change type of parameters.
2710         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2711         (create_partial_symtab): Likewise.
2712         (add_partial_symbol): Likewise.
2713         (write_one_signatured_type): Likewise.
2714         (recursively_write_psymbols): Likewise.
2715         * mdebugread.c (parse_partial_symbols): Likewise.
2716         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2717         (scan_xcoff_symtab): Adjust to vector change.
2718         (xcoff_initial_scan): Likewise.
2719
2720 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2721
2722         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2723
2724 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2725
2726         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2727         Remove s390x-*-expedite, add s390x-expedite.
2728
2729 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2730
2731         * features/s390-gs-linux64.c: Regenerated.
2732         * features/s390x-gs-linux64.c: Regenerated.
2733
2734 2017-10-13  Tom Tromey  <tom@tromey.com>
2735
2736         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2737         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2738         delete.
2739         * symfile.c (symbol_file_add_with_addrs): Use new.
2740         (symbol_file_add_separate): Update comment.
2741         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2742         * jit.c (jit_object_close_impl): Use new.
2743         (jit_unregister_code): Use delete.
2744         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2745         (~objfile): Rename from free_objfile.
2746         (free_objfile_separate_debug, do_free_objfile_cleanup)
2747         (free_all_objfiles, objfile_purge_solibs): Use delete.
2748         * objfiles.h (struct objfile): Add constructor and destructor.
2749         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2750         (allocate_objfile, free_objfile): Don't declare.
2751         (struct objstats): Add initializers.
2752
2753 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2754
2755         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2756         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2757         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2758         * gdbarch.h: Regenerate.
2759         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2760         Adjust comment.
2761         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2762         (i386_displaced_step_fixup): Adjust comment.
2763         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2764
2765 2017-10-12  Tom Tromey  <tom@tromey.com>
2766
2767         * prologue-value.h (pv_area::store_would_trash): Return bool.
2768         (pv_area::find_reg): Likewise.
2769         * prologue-value.c (pv_area::store_would_trash): Return bool.
2770         (pv_area::find_reg): Likewise.
2771
2772 2017-10-12  Tom Tromey  <tom@tromey.com>
2773
2774         * s390-linux-tdep.c (s390_store, s390_load)
2775         (s390_check_for_saved, s390_analyze_prologue): Update.
2776         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2777         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2778         * prologue-value.h (class pv_area): Move from prologue-value.c.
2779         Change names of members.  Add constructor, destructor, member
2780         functions.
2781         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2782         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2783         (pv_area_fetch, pv_area_scan): Don't declare.
2784         * prologue-value.c (struct pv_area::area_entry): Now member of
2785         pv_area.
2786         (struct pv_area): Move to prologue-value.h.
2787         (pv_area::pv_area): Rename from make_pv_area.
2788         (pv_area::~pv_area): Rename from free_pv_area.
2789         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2790         (clear_entries, find_entry, overlaps, store_would_trash, store)
2791         (fetch, find_reg, scan): Now member of pv_area.
2792         Remove "area" argument.  Update.
2793         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2794         Update.
2795         * mn10300-tdep.c (push_reg, check_for_saved)
2796         (mn10300_analyze_prologue): Update.
2797         * mep-tdep.c (is_arg_spill, check_for_saved)
2798         (mep_analyze_prologue): Update.
2799         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2800         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2801         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2802         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2803         Update.
2804         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2805         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2806
2807 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2808
2809         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2810         * linux-nat.c (linux_nat_delete_thread): New variable.
2811         (lwp_free): Invoke linux_nat_delete_thread if set.
2812         (linux_nat_set_delete_thread): New function.
2813         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2814         thread delete callback.
2815         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2816         (_initialize_arm_linux_nat): Assign thread delete callback.
2817         * s390-linux-nat.c (s390_delete_thread): New function.
2818         (_initialize_s390_nat): Assign thread delete callback.
2819         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2820         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2821         function.
2822         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2823         declaration.
2824         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2825         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2826
2827 2017-10-09  Tom Tromey  <tom@tromey.com>
2828
2829         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2830         std::string.
2831         * tui/tui-layout.c (enum tui_status): Use std::string.
2832
2833 2017-10-11  Tom Tromey  <tom@tromey.com>
2834
2835         * gdbthread.h (thread_command): Constify.
2836         * inferior.h (detach_command): Constify.
2837         * top.h (set_history, show_history): Constify.
2838         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2839         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2840         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2841         * printcmd.c (set_command): Constify.
2842         (non_const_set_command): New function.
2843         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2844         * breakpoint.c (enable_command, disable_command, delete_command)
2845         (catch_command, tcatch_command, set_breakpoint_cmd)
2846         (show_breakpoint_cmd): Constify.
2847         * macrocmd.c (macro_command): Constify.
2848         * infcmd.c (unset_command, kill_command, detach_command)
2849         (info_proc_cmd): Constify.
2850         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2851         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2852         (info_auto_load_cmd): Constify.
2853         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2854         (unset_tdesc_cmd): Constify.
2855         * ada-lang.c (set_ada_command, show_ada_command)
2856         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2857         * guile/guile.c (set_guile_command, show_guile_command)
2858         (info_guile_command): Constify.
2859         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2860         Constify.
2861         * skip.c (skip_command): Constify.
2862         * compile/compile.c (_initialize_compile): Constify.
2863         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2864         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2865         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2866         (maint_btrace_pt_show_cmd): Constify.
2867         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2868         Constify.
2869         * python/python.c (user_show_python, user_set_python): Constify.
2870         * mips-tdep.c (set_mips_command, show_mips_command)
2871         (set_mipsfpu_command): Constify.
2872         * record-btrace.c (cmd_record_btrace_start)
2873         (cmd_set_record_btrace, cmd_show_record_btrace)
2874         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2875         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2876         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2877         Constify.
2878         * symfile.c (overlay_command): Constify.
2879         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2880         * cli/cli-logging.c (set_logging_command, show_logging_command):
2881         Constify.
2882         * cli/cli-dump.c (dump_command, append_command)
2883         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2884         (tekhex_dump_command, binary_dump_command)
2885         (binary_append_command): Constify.
2886         * cli/cli-decode.c (struct cmd_list_element): Change type of
2887         "fun".
2888         * cli/cli-cmds.c (info_command, show_command, set_debug)
2889         (show_debug): Constify.
2890         (show_command): Add non-const overload.
2891         * top.c (set_history, show_history): Constify.
2892         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2893         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2894         * target.c (target_command): Constify.
2895         * sparc64-tdep.c (info_adi_command): Constify.
2896         * record-full.c (cmd_record_full_start): Constify.
2897         (set_record_full_command): Constify.  Fix typo.
2898         (show_record_full_command): Constify.
2899         * thread.c (thread_command, thread_apply_command): Constify.
2900         * memattr.c (dummy_cmd): Constify.
2901         * value.c (function_command): Constify.
2902         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2903         * probe.c (info_probes_command): Constify.
2904         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2905         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2906         (show_thread_cmd, set_thread_default_cmd)
2907         (show_thread_default_cmd): Constify.
2908         (check_empty): Constify.
2909         * tracepoint.c (tfind_command): Constify.
2910         * cp-support.c (maint_cplus_command): Constify.
2911         * windows-tdep.c (info_w32_command): Constify.
2912         * record.c (cmd_record_start, set_record_command)
2913         (show_record_command, info_record_command, cmd_record_goto):
2914         Constify.
2915         * ravenscar-thread.c (set_ravenscar_command)
2916         (show_ravenscar_command): Constify.
2917         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2918         Constify.
2919         (add_internal_problem_command): Remove casts.
2920         * arc-tdep.c (maintenance_print_arc_command): Constify.
2921         * valprint.c (set_print, show_print, set_print_raw)
2922         (show_print_raw): Constify.
2923         * maint.c (maintenance_command, maintenance_info_command)
2924         (maintenance_print_command, maintenance_set_cmd)
2925         (maintenance_show_cmd, set_per_command_cmd)
2926         (show_per_command_cmd, maintenance_check_command): Constify.
2927         * language.c (set_check, show_check): Constify.
2928         * typeprint.c (show_print_type, set_print_type): Constify.
2929         * go32-nat.c (go32_info_dos_command): Constify.
2930
2931 2017-10-11  Tom Tromey  <tom@tromey.com>
2932
2933         * breakpoint.c (prepare_re_set_context): Remove.
2934         (breakpoint_re_set_one): Update.  Don't use cleanups.
2935         (breakpoint_re_set): Use scoped_restore, std::string, and
2936         scoped_restore_current_language.
2937
2938 2017-10-11  Tom Tromey  <tom@tromey.com>
2939
2940         * breakpoint.c (commands_command_1): Use std::string.
2941         (cleanup_executing_breakpoints): Remove.
2942         (bpstat_do_actions_1): Use scoped_restore.
2943         (bpstat_check_watchpoint): Use std::string.
2944         (decode_static_tracepoint_spec): Likewise.
2945         (break_range_command): Likewise.
2946         (watch_command_1): Likewise.
2947         (compare_breakpoints): Change argument types.
2948         (clear_command): Use std::vector.
2949         (cleanup_executing_breakpoints): Remove.
2950         (update_global_location_list): Use unique_xmalloc_ptr.
2951         (strace_command): Remove unused declaration.
2952
2953 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2954
2955         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2956         * NEWS: Mention new FreeBSD/arm native configuration.
2957         * configure.host: Add arm*-*-freebsd*.
2958         * configure.nat: Likewise.
2959         * arm-fbsd-nat.c: New file.
2960
2961 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2962
2963         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2964         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2965         * NEWS: Mention new FreeBSD/arm target.
2966         * configure.tgt: Add arm*-*-freebsd*.
2967         * arm-fbsd-tdep.c: New file.
2968         * arm-fbsd-tdep.h: New file.
2969
2970 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2971
2972         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2973         `gdbarch_elfcore_write_linux_prpsinfo'.
2974         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2975         method.
2976         (elf_internal_linux_prpsinfo): Remove declaration.
2977         * gdbarch.h: Regenerate.
2978         * gdbarch.c: Regenerate.
2979
2980 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2981
2982         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2983         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2984
2985 2017-10-11  Pedro Alves  <palves@redhat.com>
2986
2987         * breakpoint.c (reattach_breakpoints): Delete.
2988         * breakpoint.h (reattach_breakpoints): Delete.
2989
2990 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2991
2992         * symfile.c (registered_sym_fns): Make struct, not typedef.
2993         (DEF_VEC_O (registered_sym_fns)): Remove.
2994         (symtab_fns): Change type to std::vector.
2995         (add_symtab_fns): Adjust.
2996         (find_sym_fns): Adjust.
2997
2998 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2999
3000         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3001         * arc-tdep.h (arc_arch_is_em): New function.
3002         (arc_arch_is_hs): Likewise.
3003
3004 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3005
3006         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3007         parentheses in the declaration.
3008         (macro_lookup_inclusion): Likewise.
3009         (macro_lookup_definition): Likewise.
3010         * p-lang.h (pascal_builtin_types): Likewise.
3011         * tui/tui-data.c (tui_win_list): Likewise.
3012         * tui/tui-data.h (tui_win_list): Likewise.
3013         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3014
3015 2017-10-11  Mark Rages  <markrages@gmail.com>
3016
3017         * target-memory.c (block_boundaries): Fix for block address not
3018         aligned on block size.
3019
3020 2017-10-10  Pedro Alves <palves@redhat.com>
3021             Tom Tromey  <tom@tromey.com>
3022
3023         * breakpoint.c (struct captured_breakpoint_query_args)
3024         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3025         (print_breakpoint): New.
3026         * breakpoint.h (print_breakpoint): Declare.
3027         * common/common-exceptions.h (enum return_reason): Remove
3028         references to catch_exceptions.
3029         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3030         Delete.
3031         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3032         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3033         * gdb.h: Delete.
3034         * gdbthread.h (thread_select): Declare.
3035         * mi/mi-cmd-break.c: Don't include gdb.h.
3036         (breakpoint_notify): Use print_breakpoint.
3037         * mi/mi-cmd-catch.c: Don't include gdb.h.
3038         * mi/mi-interp.c: Don't include gdb.h.
3039         (mi_print_breakpoint_for_event): New.
3040         (mi_breakpoint_created, mi_breakpoint_modified): Use
3041         mi_print_breakpoint_for_event.
3042         * mi/mi-main.c: Don't include gdb.h.
3043         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3044         thread_select instead of gdb_thread_select.
3045         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3046         of using gdb_list_thread_ids.
3047         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3048         FILEIO_ENOSYS here.
3049         (remote_fileio_request): Use TRY/CATCH instead of
3050         catch_exceptions.
3051         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3052         (symbol_file_add_from_memory_wrapper): Delete.
3053         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3054         * thread.c: Don't include gdb.h.
3055         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3056         (thread_alive): Use thread_select.
3057         (do_captured_thread_select): Delete, parts salvaged as ...
3058         (thread_select): ... this new function.
3059         (gdb_thread_select): Delete.
3060
3061 2017-10-10  Pedro Alves  <palves@redhat.com>
3062             Tom Tromey  <tom@tromey.com>
3063
3064         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3065         and reverse logic.
3066         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3067         No longer macros.  Instead ...
3068         (enum wp_check_result): They're now values of this new
3069         enumeration.
3070         (watchpoint_check): Change return type to wp_check_result and
3071         parameter type to bpstat.
3072         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3073         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3074         catch_errors.  Reverse logic of watchpoint_check call.
3075         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3076         pointer as parameter.
3077         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3078         * common/common-exceptions.c (throw_exception_sjlj): Update
3079         comments to avoid mentioning catch_errors.
3080         * exceptions.c (catch_errors): Delete.
3081         * exceptions.h: Update comments to avoid mentioning catch_errors.
3082         (catch_errors_ftype, catch_errors): Delete.
3083         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3084         (hook_stop_stub): Delete.
3085         (restore_selected_frame): Change return type to void, and
3086         parameter type to const frame_id &.
3087         (restore_infcall_control_state): Use TRY/CATCH instead of
3088         catch_errors.
3089         * main.c (captured_command_loop): Return void and remove
3090         parameter.  Remove references to catch_errors.
3091         (captured_main): Use TRY/CATCH instead of catch_errors.
3092         * objc-lang.c (objc_submethod_helper_data)
3093         (find_objc_msgcall_submethod_helper): Delete.
3094         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3095         catch_errors.
3096         * record-full.c (record_full_message): Return void.
3097         (record_full_message_args, record_full_message_wrapper): Delete.
3098         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3099         instead of catch_errors.
3100         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3101         parameter type to int.
3102         * solib-darwin.c (open_symbol_file_object): Ditto.
3103         * solib-dsbt.c (open_symbol_file_object): Ditto.
3104         * solib-frv.c (open_symbol_file_object): Ditto.
3105         * solib-svr4.c (open_symbol_file_object): Ditto.
3106         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3107         * solib.c (update_solib_list): Use TRY/CATCH instead of
3108         catch_errors.
3109         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3110         Change type.
3111         * symmisc.c (struct print_symbol_args): Remove.
3112         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3113         (print_symbol): Change type.
3114         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3115         and remove parameters.
3116         (catch_errors): New.
3117         (get_windows_debug_event): Adjust.
3118
3119 2017-10-09  Tom Tromey  <tom@tromey.com>
3120
3121         * mi/mi-main.c (free_splay_tree): Remove.
3122         (list_available_thread_groups): Use splay_tree_up.
3123         * common/gdb_splay_tree.h: New file.
3124
3125 2017-10-09  Tom Tromey  <tom@tromey.com>
3126
3127         * mi/mi-main.c (do_nothing): Remove.
3128         (list_available_thread_groups): Update.
3129
3130 2017-10-09  Pedro Alves  <palves@redhat.com>
3131
3132         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3133         reading registers when switching context.
3134
3135 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3136
3137         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3138         (fbsd_convert_siginfo): Likewise.
3139         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3140
3141 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3142
3143         * configure.ac (try_guile_versions): Remove guile-2.2.
3144         * configure: Regenerate.
3145
3146 2017-10-09  Tom Tromey  <tom@tromey.com>
3147
3148         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3149         (COMPILE.pre): Use $(CXX).
3150
3151 2017-10-09  Pedro Alves  <palves@redhat.com>
3152
3153         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3154         Use bool.
3155         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3156         * cp-support.h (cp_remove_params): Now returns a
3157         gdb::unique_xmalloc_ptr.
3158         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3159         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3160         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3161         returning a gdb::unique_xmalloc_ptr.
3162         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3163         * stack.c (find_frame_funname): Adjust to cp_remove_params
3164         returning a gdb::unique_xmalloc_ptr.
3165
3166 2017-10-08  Tom Tromey  <tom@tromey.com>
3167
3168         * dwarf2read.c (dwarf2_get_dwz_file): Use
3169         gdb::unique_xmalloc_ptr.
3170         (find_slot_in_mapped_hash): Likewise.
3171         (dwarf2_physname): Likewise.
3172         (create_dwo_unit_in_dwp_v1): Use std::string.
3173         (create_dwo_unit_in_dwp_v2): Likewise.
3174         (lookup_dwo_cutu): Likewise.
3175         (inherit_abstract_dies): Use std::vector.
3176         (read_array_type): Likewise.
3177         (dwarf_decode_macros): Remove unused declaration.
3178         (unsigned_int_compar): Remove.
3179         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3180         (psymtabs_addrmap_cleanup): Remove.
3181
3182 2017-10-08  Tom Tromey  <tom@tromey.com>
3183
3184         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3185         * frame.h (frame_cleanup_after_sniffer): Declare.
3186         (frame_prepare_for_sniffer): Return void.
3187         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3188         type of argument.
3189         (frame_prepare_for_sniffer): Return void.
3190
3191 2017-10-08  Tom Tromey  <tom@tromey.com>
3192
3193         * utils.h (make_cleanup_value_free): Remove.
3194         * utils.c (do_value_free, struct cleanup): Remove.
3195         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3196         Use gdb_value_up.
3197         * value.h (struct value_deleter): New.
3198         (gdb_value_up): New typedef.
3199
3200 2017-10-08  Tom Tromey  <tom@tromey.com>
3201
3202         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3203         (make_cleanup_free_search_symbols): Remove.
3204         (search_symbols): Return std::vector.
3205         (symbol_search::compare_search_syms): Now member of
3206         symbol_search.  Change arguments.
3207         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3208         (symtab_symbol_info, rbreak_command): Update.
3209         * symtab.h (struct symbol_search) <next>: Remove.
3210         Add constructors.
3211         (symbol_search::operator<): New function.
3212         (symbol_search::operator==): New function.
3213         (search_symbols): Remove std::vector.
3214         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3215         (symbol_search::compare_search_syms): Declare.
3216
3217 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3218
3219         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3220         arch/aarch64-insn.o.
3221         Remove one rule.
3222         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3223
3224 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3225
3226         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3227         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3228         arch/arm-linux.o respectively.
3229         * configure.tgt: Likewise.
3230
3231 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3232
3233         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3234         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3235
3236 2017-10-06  Pedro Alves  <palves@redhat.com>
3237
3238         * windows-nat.c: Include <algorithm>.
3239
3240 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3241
3242         * configure.tgt (i386_tobjs): New variable.
3243         (amd64_tobjs): New variable.
3244         Set $cpu_obs and $os_obs.
3245
3246 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3247
3248         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3249         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3250         (clean): Remove object files and dependency files.
3251         (distclean): Remove the directory.
3252         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3253         * configure: Re-generated.
3254         * configure.tgt: Replace amd64.o with arch/amd64.o.
3255
3256 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3257
3258         PR build/22188
3259         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3260         and SETEND.
3261
3262 2017-10-05  Pedro Alves  <palves@redhat.com>
3263
3264         * linux-nat.c (linux_child_follow_fork): When following the parent
3265         and detaching the child, consult the parent thread's architecture
3266         instead of the child's.
3267
3268 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3269
3270         * ax.h: Do not include "doublest.h".
3271         (union agent_val): Remove.
3272
3273 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3274
3275         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3276         (decimal_to_string): Return std::string object.
3277         (decimal_from_string): Accept std::string object.  Return bool.
3278         (decimal_from_integral, decimal_from_doublest): Remove.
3279         (decimal_from_longest): Add prototype.
3280         (decimal_from_ulongest): Likewise.
3281         (decimal_to_longest): Likewise.
3282         (decimal_from_doublest): Likewise.
3283         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3284         (MAX_DECIMAL_STRING): Move here.
3285         (decimal_to_string): Return std::string object.
3286         (decimal_from_string): Accept std::string object.  Return bool.
3287         (decimal_from_integral): Remove, replace by ...
3288         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3289         (decimal_to_longest): New function.
3290         (decimal_from_floating): Remove, replace by ...
3291         (decimal_from_doublest): ... this new function.
3292         (decimal_to_doublest): Update to new decimal_to_string interface.
3293
3294         * value.c (unpack_long): Use decimal_to_longest.
3295         * valops.c (value_cast): Use decimal_from_doublest instead of
3296         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3297         decimal_from_integral.
3298         * valarith.c (value_args_as_decimal): Likewise.
3299         * valprint.c (print_decimal_floating): Update to new
3300         decimal_to_string interface.
3301         * printcmd.c (printf_decfloat): Likewise.
3302         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3303
3304 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3305
3306         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3307         * gdbtypes.c: Include "floatformat.h".
3308         * value.c: Likewise.
3309         * m68k-tdep.c: Likewise.
3310
3311         * findvar.c: Do not include "floatformat.h".
3312         * amd64-darwin-tdep.c: Likewise.
3313         * arm-linux-tdep.c: Likewise.
3314         * i386-darwin-tdep.c: Likewise.
3315         * i387-tdep.c: Likewise.
3316         * m68k-linux-tdep.c: Likewise.
3317         * mep-tdep.c: Likewise.
3318         * mips-tdep.c: Likewise.
3319         * nios2-tdep.c: Likewise.
3320         * s390-linux-tdep.c: Likewise.
3321         * sparc-obsd-tdep.c: Likewise.
3322         * sparc-tdep.c: Likewise.
3323         * sparc64-tdep.c: Likewise.
3324         * spu-tdep.c: Likewise.
3325         * tic6x-tdep.c: Likewise.
3326         * tilegx-tdep.c: Likewise.
3327         * vax-tdep.c: Likewise.
3328         * xstormy16-tdep.c: Likewise.
3329         * xtensa-tdep.c: Likewise.
3330
3331         * top.c: Do not include "doublest.h".
3332         * aarch64-tdep.c: Likewise.
3333         * alpha-tdep.c: Likewise.
3334         * arm-linux-tdep.c: Likewise.
3335         * m68k-linux-tdep.c: Likewise.
3336         * tilegx-tdep.c: Likewise.
3337         * xstormy16-tdep.c: Likewise.
3338
3339 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3340
3341         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3342         (mipsn32_fbsd_sigframe): Define.
3343         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3344         for FreeBSD/mipsn32.
3345
3346 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3347
3348         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3349         AT_HWCAP.
3350
3351 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3352
3353         * MAINTAINERS (Misc): Update my email address.
3354
3355 2017-10-04  Pedro Alves  <palves@redhat.com>
3356
3357         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3358         it instead of target_gdbarch.
3359         (get_remote_state, get_remote_packet_size): Adjust
3360         get_remote_arch_state calls, passing down target_gdbarch
3361         explicitly.
3362         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3363         'gdbarch' and use it instead of target_gdbarch.
3364         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3365         passing down target_gdbarch explicitly.
3366         (struct stop_reply) <arch>: New field.
3367         (remote_parse_stop_reply): Use the stopped thread's architecture,
3368         not the current inferior's.  Save the architecture in the
3369         stop_reply.
3370         (process_stop_reply): Use the stop reply's architecture.
3371         (process_g_packet, remote_fetch_registers)
3372         (remote_prepare_to_store, store_registers_using_G)
3373         (remote_store_registers): Adjust get_remote_arch_state calls,
3374         using the regcache's architecture.
3375         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3376         passing down target_gdbarch explicitly.
3377         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3378         beneath instead of calling target_gdbarch.
3379         * target.c (default_thread_architecture): Use the specified
3380         inferior's architecture, instead of the current inferior's
3381         architecture (via target_gdbarch).
3382
3383 2017-10-04  Pedro Alves  <palves@redhat.com>
3384
3385         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3386         case.
3387         (regcache_print): Handle !target_has_registers here instead.
3388
3389 2017-10-04  Pedro Alves  <palves@redhat.com>
3390
3391         * frame.c (create_test_frame): Delete.
3392         * frame.h (create_test_frame): Delete.
3393         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3394         (class regcache_test): Delete.
3395         (test_target_has_registers, test_target_has_stack)
3396         (test_target_has_memory, test_target_prepare_to_store)
3397         (test_target_store_registers): New functions.
3398         (test_target_ops): New class.
3399         (register_to_value_test): Error out if there's already a
3400         process_stratum (or higher) target pushed.  Create a fuller mock
3401         environment, with mock target_ops, inferior, address space, thread
3402         and inferior_ptid.
3403         * progspace.c (struct address_space): Move to ...
3404         * progspace.h (struct address_space): ... here.
3405         * regcache.h (regcache::~regcache, regcache::raw_write)
3406         [GDB_SELF_TEST]: No longer virtual.
3407
3408 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3409
3410         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3411
3412 2017-10-04  Pedro Alves  <palves@redhat.com>
3413
3414         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3415         out of 'between TRY and CATCH'.
3416
3417 2017-10-04  Pedro Alves  <palves@redhat.com>
3418
3419         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3420         * common/common-exceptions.h (TRY): Open an outermost scope.
3421         Expand intro comment.
3422         (CATCH): Reindent.
3423         (END_CATCH): Close the outermost scope.
3424         * completer.c (complete_line_internal): Add missing END_CATCH.
3425
3426 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3427
3428         * NEWS (Changes since GDB 8.0): Add entry about new
3429         'set-cwd-on-gdbserver' feature.
3430         (New remote packets): Add entry for QSetWorkingDir.
3431         * common/common-inferior.h (set_inferior_cwd): New prototype.
3432         * infcmd.c (set_inferior_cwd): Remove "static".
3433         (show_cwd_command): Expand text to include remote debugging.
3434         * remote.c: Add PACKET_QSetWorkingDir.
3435         (remote_protocol_features) <QSetWorkingDir>: New entry for
3436         PACKET_QSetWorkingDir.
3437         (extended_remote_set_inferior_cwd): New function.
3438         (extended_remote_create_inferior): Call
3439         "extended_remote_set_inferior_cwd".
3440         (_initialize_remote): Call "add_packet_config_cmd" for
3441         QSetWorkingDir.
3442
3443 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3444
3445         * NEWS (New commands): Mention "set/show cwd".
3446         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3447         "cd" command's help text.
3448         * common/common-inferior.h (get_inferior_cwd): New prototype.
3449         * infcmd.c (inferior_cwd_scratch): New global variable.
3450         (set_inferior_cwd): New function.
3451         (get_inferior_cwd): Likewise.
3452         (set_cwd_command): Likewise.
3453         (show_cwd_command): Likewise.
3454         (_initialize_infcmd): Add "set/show cwd" commands.
3455         * inferior.h (class inferior) <cwd>: New field.
3456         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3457         (fork_inferior): Change inferior's cwd before its execution.
3458         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3459         to CreateProcess.
3460
3461 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3462
3463         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3464         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3465         (COMMON_OBS): Add gdb_tilde_expand.o.
3466         * common/gdb_tilde_expand.c: New file.
3467         * common/gdb_tilde_expand.h: Likewise.
3468
3469 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3470
3471         * gdbarch.sh (objfile): Remove duplicate declaration.
3472         * gdbarch.h: Regenerate.
3473
3474 2017-10-03  Tom Tromey  <tom@tromey.com>
3475
3476         * utils.c (internal_vproblem): Use string_vprintf.
3477
3478 2017-10-03  Tom Tromey  <tom@tromey.com>
3479
3480         * printcmd.c (info_symbol_command): Use std::string.
3481
3482 2017-10-03  Tom Tromey  <tom@tromey.com>
3483
3484         * top.c (gdb_safe_append_history): Use std::string.
3485
3486 2017-10-03  Tom Tromey  <tom@tromey.com>
3487
3488         * event-top.c (stdin_event_handler): Update.
3489         * main.c (captured_main_1): Update.
3490         * top.h (make_delete_ui_cleanup): Remove.
3491         (struct ui): Add constructor and destructor.
3492         (new_ui, delete_ui): Remove.
3493         * top.c (make_delete_ui_cleanup): Remove.
3494         (new_ui_command): Use std::unique_ptr.
3495         (delete_ui_cleanup): Remove.
3496         (ui::ui): Rename from new_ui.  Update.
3497         (free_ui): Remove.
3498         (ui::~ui): Rename from delete_ui.  Update.
3499
3500 2017-10-03  Tom Tromey  <tom@tromey.com>
3501
3502         * symfile.c (load_progress): Use gdb::byte_vector.
3503
3504 2017-10-03  Tom Tromey  <tom@tromey.com>
3505
3506         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3507         declaration.
3508         * printcmd.c (x_command): Remove unused declaration.
3509         * symfile.c (symbol_file_command): Remove unused declaration.
3510
3511 2017-10-03  Tom Tromey  <tom@tromey.com>
3512
3513         * utils.c (internal_vproblem): Use std::string.
3514         (defaulted_query): Likewise.
3515
3516 2017-10-03  Tom Tromey  <tom@tromey.com>
3517
3518         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3519         * top.c (execute_command_to_string): Update.
3520         * utils.c (make_cleanup_restore_page_info): Remove.
3521         (do_restore_page_info_cleanup): Remove.
3522         (set_batch_flag_and_restore_page_info):
3523         New.
3524         (make_cleanup_restore_page_info): Remove.
3525         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3526         (~set_batch_flag_and_restore_page_info): New
3527         (make_cleanup_restore_uinteger): Remove.
3528         (make_cleanup_restore_integer): Remove.
3529         (struct restore_integer_closure): Remove.
3530         (restore_integer): Remove.
3531         * utils.h (struct set_batch_flag_and_restore_page_info): New
3532         class.
3533         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3534         (make_cleanup_restore_page_info): Remove.
3535         (make_cleanup_restore_uinteger) Remove.
3536         (make_cleanup_restore_integer) Remove.
3537
3538 2017-10-03  Tom Tromey  <tom@tromey.com>
3539
3540         * record-full.h (record_full_gdb_operation_disable_set): Return
3541         scoped_restore_tmpl<int>.
3542         * infrun.c (adjust_pc_after_break): Update.
3543         (handle_signal_stop): Update.
3544         * record-full.c (record_full_gdb_operation_disable_set): Return
3545         scoped_restore_tmpl<int>.
3546         (record_full_wait_1, record_full_insert_breakpoint)
3547         (record_full_remove_breakpoint, record_full_save)
3548         (record_full_goto_insn): Update.
3549
3550 2017-10-02  Tom Tromey  <tom@tromey.com>
3551
3552         PR rust/22236:
3553         * rust-lang.c (rust_val_print_str): New function.
3554         (val_print_struct): Call it.
3555         (rust_subscript): Preserve name of slice type.
3556
3557 2017-10-02  Tom Tromey  <tom@tromey.com>
3558
3559         * rust-lang.c (rust_subscript): Handle slices in
3560         EVAL_AVOID_SIDE_EFFECTS case.
3561
3562 2017-10-02  Tom Tromey  <tom@tromey.com>
3563
3564         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3565
3566 2017-10-02  Tom Tromey  <tom@tromey.com>
3567
3568         * rust-lang.h (rust_slice_type): Add "extern".
3569
3570 2017-10-02  Tom Tromey  <tom@tromey.com>
3571             Pedro Alves  <palves@redhat.com>
3572
3573         * ada-lang.h (ada_exc_info::operator<): Make const.
3574         (ada_exc_info::operator==): Make const.
3575         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3576         Make const.
3577
3578 2017-09-29  Tom Tromey  <tom@tromey.com>
3579
3580         * target.c (read_whatever_is_readable): Change type of "result".
3581         Update.
3582         (free_memory_read_result_vector): Remove.
3583         (read_memory_robust): Change return type.  Update.
3584         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3585         bin2hex, std::string.
3586         * target.h (memory_read_result_s): Remove typedef.
3587         (free_memory_read_result_vector): Remove.
3588         (read_memory_robust): Return std::vector.
3589
3590 2017-09-29  Tom Tromey  <tom@tromey.com>
3591
3592         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3593
3594 2017-09-29  Tom Tromey  <tom@tromey.com>
3595
3596         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3597         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3598         operator< and operator==.
3599         (ada_exceptions_list): Return a std::vector.
3600         * ada-lang.c (ada_exc_info::operator<): Rename from
3601         compare_ada_exception_info.
3602         (ada_exc_info::operator==): New.
3603         (sort_remove_dups_ada_exceptions_list): Change type of
3604         "exceptions".
3605         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3606         (ada_add_global_exceptions): Likewise.
3607         (ada_exceptions_list_1): Return a std::vector.
3608         (ada_exceptions_list): Likewise.
3609
3610 2017-09-29  Tom Tromey  <tom@tromey.com>
3611
3612         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3613         'std::set *'.
3614         (print_one_inferior): Update.
3615         (free_vector_of_ints): Remove.
3616         (list_available_thread_groups): Change "ids" to std::set.
3617         (mi_cmd_list_thread_groups): Update.
3618         (struct collect_cores_data) <core>: Now a std::set.
3619         (collect_cores): Update.
3620         (unique): Remove.
3621         (print_one_inferior): Update.
3622
3623 2017-09-29  Tom Tromey  <tom@tromey.com>
3624
3625         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3626         (mi_execute_async_cli_command): Likewise.
3627         (mi_cmd_trace_frame_collected): Use field_fmt.
3628
3629 2017-09-29  Tom Tromey  <tom@tromey.com>
3630
3631         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3632         gdb::byte_vector.
3633
3634 2017-09-29  Tom Tromey  <tom@tromey.com>
3635
3636         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3637
3638 2017-09-29  Tom Tromey  <tom@tromey.com>
3639
3640         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3641
3642 2017-09-29  Tom Tromey  <tom@tromey.com>
3643
3644         * varobj.h (varobj_gen_name): Return std::string.
3645         * varobj.c (varobj_gen_name): Return std::string.
3646         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3647         (mi_cmd_var_delete): Don't copy "name".
3648
3649 2017-09-29  Tom Tromey  <tom@tromey.com>
3650
3651         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3652         (mi_cmd_break_insert_1): Update.
3653
3654 2017-09-29  Tom Tromey  <tom@tromey.com>
3655
3656         * target.h (make_scoped_defer_target_commit_resume): Update.
3657         * target.c (make_scoped_defer_target_commit_resume): Rename from
3658         make_cleanup_defer_target_commit_resume.  Return a
3659         scoped_restore.
3660         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3661
3662 2017-09-29  Tom Tromey  <tom@tromey.com>
3663
3664         * main.c (captured_main_1): Remove unused declaration.
3665         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3666
3667 2017-09-29  Tom Tromey  <tom@tromey.com>
3668
3669         * symtab.c (search_symbols): Remove unused outer cleanup.
3670         (make_source_files_completion_list): Remove unused declaration.
3671
3672 2017-09-29  Tom Tromey  <tom@tromey.com>
3673
3674         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3675
3676 2017-09-29  Tom Tromey  <tom@tromey.com>
3677
3678         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3679         gdb::byte_vector.
3680
3681 2017-09-29  Tom Tromey  <tom@tromey.com>
3682
3683         * complaints.c (vcomplaint): Use std::string.
3684
3685 2017-09-29  Tom Tromey  <tom@tromey.com>
3686
3687         * tracepoint.c (trace_variable_command): Use std::string.
3688         (encode_actions_1): Remove unused declarations.
3689         (create_tsv_from_upload): Use std::string.
3690
3691 2017-09-29  Tom Tromey  <tom@tromey.com>
3692
3693         * cp-support.c (gdb_demangle): Use std::string.
3694
3695 2017-09-29  Tom Tromey  <tom@tromey.com>
3696
3697         * stack.c (parse_frame_specification): Use std::string
3698         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3699
3700 2017-09-29  Tom Tromey  <tom@tromey.com>
3701
3702         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3703
3704 2017-09-29  Tom Tromey  <tom@tromey.com>
3705
3706         * utils.c (vfprintf_maybe_filtered): Use std::string.
3707         (vfprintf_unfiltered): Likewise.
3708
3709 2017-09-29  Tom Tromey  <tom@tromey.com>
3710
3711         * event-top.c (top_level_prompt): Return std::string.
3712         (display_gdb_prompt): Update.
3713
3714 2017-09-29  Tom Tromey  <tom@tromey.com>
3715
3716         * unittests/common-utils-selftests.c (format): New function.
3717         (string_vprintf_tests): New function.
3718         (_initialize_common_utils_selftests): Register new tests.
3719         * common/common-utils.c (string_vprintf): New function.
3720         * common/common-utils.h (string_vprintf): Declare.
3721
3722 2017-09-29  Pedro Alves  <palves@redhat.com>
3723
3724         * common/rsp-low.c (unpack_varlen_hex): Constify.
3725         * common/rsp-low.h (unpack_varlen_hex): Constify.
3726         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3727         Constify.
3728         * remote.c (remote_set_permissions, read_ptid)
3729         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3730         (remote_static_tracepoint_marker_at)
3731         (remote_static_tracepoint_markers_by_strid)
3732         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3733         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3734         (parse_tracepoint_definition, parse_tsv_definition)
3735         (parse_static_tracepoint_marker_definition): Constify.
3736         * tracepoint.h (parse_static_tracepoint_marker_definition)
3737         (parse_trace_status, parse_tracepoint_status)
3738         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3739
3740 2017-09-29  Pedro Alves  <palves@redhat.com>
3741
3742         * remote.c (target_buf, target_buf_size): Delete.
3743         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3744         Use the connection's packet buffer instead.
3745         All callers adjusted.
3746         (_initialize_remote): Remove references to target_buf and
3747         target_buf_size.
3748
3749 2017-09-28  Pedro Alves  <palves@redhat.com>
3750
3751         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3752         unittests/common-utils-selftests.c.
3753         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3754         (COMMON_OBS): Remove utils-selftests.o.
3755         * utils-selftests.c: Move to ...
3756         * unittests/common-utils-selftests.c: ... here and rename self
3757         test to "string_printf".
3758
3759 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3760
3761         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3762         having NULL cus or tus.
3763
3764 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3765
3766         * arm-tdep.c: (convert_from_extended): Remove.
3767         (convert_to_extended): Likewise.
3768         (arm_extract_return_value): Use convert_typed_floating.
3769         (arm_store_return_value): Likewise.
3770
3771         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3772         * sh-tdep.c: Do not include "floatformat.h".
3773         (sh_littlebyte_bigword_type): New function.
3774         (sh_register_convert_to_virtual): Use convert_typed_floating.
3775         (sh_register_convert_to_raw): Likewise.
3776         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3777         (sh64_littlebyte_bigword_type): New function.
3778         (sh64_extract_return_value): Use convert_typed_floating.
3779         (sh64_register_convert_to_virtual): Likewise.
3780         (sh64_register_convert_to_raw): Likewise.
3781
3782 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3783
3784         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3785         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3786
3787         * gdbtypes.h (union type_specific): Make field floatformat hold
3788         just a single struct floatformat, not an array.
3789         (floatformat_from_type): Move here.
3790         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3791         changed TYPE_FLOATFORMAT definition.
3792         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3793         (recursive_dump_type): Likewise.
3794         (init_float_type): Install correct floatformat for byte order.
3795         (arch_float_type): Likewise.
3796
3797 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3798
3799         * gdbtypes.c (init_type): Change incoming argument from
3800         length-in-bytes to length-in-bits.  Assert length is a
3801         multiple of TARGET_CHAR_BITS.
3802         (arch_type, arch_flags_type): Likewise.
3803         (init_integer_type): Update call to init_type.
3804         (init_character_type): Likewise.
3805         (init_boolean_type): Likewise.
3806         (init_float_type): Likewise.
3807         (init_decfloat_type): Likewise.
3808         (init_complex_type): Likewise.
3809         (init_pointer_type): Likewise.
3810         (objfile_type): Likewise.
3811         (arch_integer_type): Update call to arch_type.
3812         (arch_character_type): Likewise.
3813         (arch_boolean_type): Likewise.
3814         (arch_float_type): Likewise.
3815         (arch_decfloat_type): Likewise.
3816         (arch_complex_type): Likewise.
3817         (arch_pointer_type): Likewise.
3818         (gdbtypes_post_init): Likewise.
3819
3820         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3821         (read_base_type): Likewise.
3822         * mdebugread.c (basic_type): Likewise.
3823         * stabsread.c (dbx_init_float_type): Likewise.
3824         (rs6000_builtin_type): Likewise.
3825         (read_range_type): Likewise.  Also, fix call to init_integer_type
3826         with erroneous length argument.
3827
3828         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3829         * d-lang.c (build_d_types): Likewise.
3830         * f-lang.c (build_fortran_types): Likewise.
3831         * go-lang.c (build_go_types): Likewise.
3832         * opencl-lang.c (build_opencl_types): Likewise.
3833         * jit.c (finalize_symtab): Likewise.
3834         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3835         (build_std_type_info_type): Likewise.
3836         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3837         update call to arch_flags_type.
3838
3839         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3840         arch_type.
3841         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3842         * windows-tdep.c (windows_get_tlb_type): Likewise.
3843
3844         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3845         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3846         * m32c-tdep.c (make_types): Likewise.
3847         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3848         (rl78_psw_type): Update call to arch_flags_type.
3849         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3850         * rx-tdep.c (rx_psw_type): Likewise.
3851         (rx_fpsw_type): Likewise.
3852         * sparc-tdep.c (sparc_psr_type): Likewise.
3853         (sparc_fsr_type): Likewise.
3854         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3855         (sparc64_ccr_type): Likewise.
3856         (sparc64_fsr_type): Likewise.
3857         (sparc64_fprs_type): Likewise.
3858
3859 2017-09-27  Tom Tromey  <tom@tromey.com>
3860
3861         * findcmd.c (find_command): Constify.
3862
3863 2017-09-27  Tom Tromey  <tom@tromey.com>
3864
3865         * ada-tasks.c (task_command_1, task_command): Constify.
3866
3867 2017-09-27  Tom Tromey  <tom@tromey.com>
3868
3869         * symtab.c (maintenance_print_symbol_cache)
3870         (maintenance_flush_symbol_cache)
3871         (maintenance_print_symbol_cache_statistics): Constify.
3872
3873 2017-09-27  Tom Tromey  <tom@tromey.com>
3874
3875         * inferior.c (detach_inferior_command, kill_inferior_command)
3876         (inferior_command): Constify.
3877
3878 2017-09-27  Tom Tromey  <tom@tromey.com>
3879
3880         * regcache.c (regcache_print, maintenance_print_registers)
3881         (maintenance_print_raw_registers)
3882         (maintenance_print_cooked_registers)
3883         (maintenance_print_register_groups)
3884         (maintenance_print_remote_registers): Constify.
3885
3886 2017-09-27  Tom Tromey  <tom@tromey.com>
3887
3888         * printcmd.c (map_display_numbers, undisplay_command)
3889         (enable_disable_display_command, enable_display_command)
3890         (disable_display_command): Constify.
3891
3892 2017-09-27  Tom Tromey  <tom@tromey.com>
3893
3894         * breakpoint.h (delete_command): Don't declare.
3895         * breakpoint.c (delete_command, enable_once_command)
3896         (enable_count_command, enable_delete_command, breakpoint_1)
3897         (maintenance_info_breakpoints, stopin_command, stopat_command)
3898         (delete_command, delete_trace_command, save_breakpoints)
3899         (save_breakpoints_command, save_tracepoints_command): Constify.
3900
3901 2017-09-27  Tom Tromey  <tom@tromey.com>
3902
3903         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3904         (skip_ws, extract_identifier, macro_define_command)
3905         (macro_undef_command, macro_list_command): Constify.
3906
3907 2017-09-27  Tom Tromey  <tom@tromey.com>
3908
3909         * infcmd.c (environment_info, set_environment_command)
3910         (unset_environment_command, path_info, info_proc_cmd_1)
3911         (info_proc_cmd_mappings, info_proc_cmd_stat)
3912         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3913         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3914
3915 2017-09-27  Tom Tromey  <tom@tromey.com>
3916
3917         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3918         Constify.
3919
3920 2017-09-27  Tom Tromey  <tom@tromey.com>
3921
3922         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3923
3924 2017-09-27  Tom Tromey  <tom@tromey.com>
3925
3926         * demangle.c (demangle_command): Constify.
3927
3928 2017-09-27  Tom Tromey  <tom@tromey.com>
3929
3930         * progspace.c (maintenance_info_program_spaces_command):
3931         Constify.
3932
3933 2017-09-27  Tom Tromey  <tom@tromey.com>
3934
3935         * compile/compile.c (check_raw_argument, compile_file_command)
3936         (compile_code_command, compile_print_command): Constify.
3937
3938 2017-09-27  Tom Tromey  <tom@tromey.com>
3939
3940         * reggroups.c (maintenance_print_reggroups): Constify.
3941
3942 2017-09-27  Tom Tromey  <tom@tromey.com>
3943
3944         * dwarf2read.c (save_gdb_index_command): Constify.
3945
3946 2017-09-27  Tom Tromey  <tom@tromey.com>
3947
3948         * stap-probe.c (info_probes_stap_command): Constify.
3949
3950 2017-09-27  Tom Tromey  <tom@tromey.com>
3951
3952         * fork-child.c (unset_exec_wrapper_command): Constify.
3953
3954 2017-09-27  Tom Tromey  <tom@tromey.com>
3955
3956         * btrace.c (get_uint, get_context_size, no_chunk)
3957         (maint_btrace_packet_history_cmd)
3958         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3959         (maint_info_btrace_cmd): Constify.
3960
3961 2017-09-27  Tom Tromey  <tom@tromey.com>
3962
3963         * reverse.c (delete_bookmark_command): Constify.
3964
3965 2017-09-27  Tom Tromey  <tom@tromey.com>
3966
3967         * remote.c (set_memory_packet_size)
3968         (set_memory_write_packet_size, show_memory_write_packet_size)
3969         (set_memory_read_packet_size, show_memory_read_packet_size)
3970         (compare_sections_command, packet_command, remote_put_command)
3971         (remote_get_command, remote_delete_command): Constify.
3972
3973 2017-09-27  Tom Tromey  <tom@tromey.com>
3974
3975         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3976         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3977         (set_mipsfpu_auto_command): Constify.
3978
3979 2017-09-27  Tom Tromey  <tom@tromey.com>
3980
3981         * cli/cli-cmds.h (cd_command): Constify.
3982         * cli/cli-cmds.c (cd_command): Constify.
3983
3984 2017-09-27  Tom Tromey  <tom@tromey.com>
3985
3986         * thread.c (thread_name_command, thread_find_command): Constify.
3987
3988 2017-09-27  Tom Tromey  <tom@tromey.com>
3989
3990         * probe.c (enable_probes_command, disable_probes_command):
3991         Constify.
3992
3993 2017-09-27  Tom Tromey  <tom@tromey.com>
3994
3995         * symfile.c (symbol_file_command): Constify.
3996         * gdbcore.h (deprecated_file_changed_hook): Constify.
3997         * exec.c (deprecated_file_changed_hook, exec_file_command)
3998         (file_command): Constify.
3999         * defs.h (symbol_file_command): Constify.
4000
4001 2017-09-27  Tom Tromey  <tom@tromey.com>
4002
4003         * remote-fileio.c (set_system_call_allowed)
4004         (show_system_call_allowed): Constify.
4005
4006 2017-09-27  Tom Tromey  <tom@tromey.com>
4007
4008         * tracepoint.c (delete_trace_variable_command)
4009         (tfind_end_command, tfind_start_command, tfind_pc_command)
4010         (tfind_tracepoint_command, tfind_line_command)
4011         (tfind_range_command, tfind_outside_command): Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * ax-gdb.c (maint_agent_printf_command, agent_command)
4016         (agent_eval_command): Constify.
4017
4018 2017-09-27  Tom Tromey  <tom@tromey.com>
4019
4020         * tracepoint.c (info_scope_command): Constify.
4021         * python/python.c (gdbpy_decode_line): Constify.
4022         * python/py-breakpoint.c (bppy_init): Constify.
4023         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4024         * location.h: (new_linespec_location)
4025         (string_to_event_location_basic, string_to_event_location):
4026         Constify.
4027         * location.c (new_linespec_location)
4028         (string_to_event_location_basic, string_to_event_location):
4029         Constify.
4030         * linespec.h (decode_line_with_current_source)
4031         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4032         * linespec.c (linespec_lex_to_end)
4033         (decode_line_with_current_source)
4034         (decode_line_with_last_displayed): Constify.
4035         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4036         Constify.
4037         * cli/cli-cmds.c (edit_command, list_command): Constify.
4038         * breakpoint.h (until_break_command, watch_command_wrapper)
4039         (awatch_command_wrapper, rwatch_command_wrapper)
4040         (init_ada_exception_breakpoint): Constify.
4041         * breakpoint.c (break_command_1, dprintf_command)
4042         (break_range_command, watch_command_wrapper)
4043         (rwatch_command_wrapper, awatch_command_wrapper)
4044         (until_break_command, init_ada_exception_breakpoint)
4045         (strace_marker_create_sals_from_location, trace_command)
4046         (ftrace_command, strace_command, struct tracepoint): Constify.
4047         * ax-gdb.c (agent_command_1): Constify.
4048         * ada-lang.c (ada_exception_sal): Constify.
4049
4050 2017-09-27  Tom Tromey  <tom@tromey.com>
4051
4052         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4053         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4054         (get_context_size, no_chunk, get_insn_history_modifiers)
4055         (cmd_record_insn_history, get_call_history_modifiers)
4056         (cmd_record_call_history): Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * source.c (show_substitute_path_command)
4061         (unset_substitute_path_command, set_substitute_path_command):
4062         Constify.
4063
4064 2017-09-27  Tom Tromey  <tom@tromey.com>
4065
4066         * typeprint.c (maintenance_print_type): Constify.
4067         * maint.c (maintenance_dump_me, maintenance_demangle)
4068         (maintenance_time_display, maintenance_info_sections)
4069         (maintenance_print_statistics, maintenance_deprecate)
4070         (maintenance_undeprecate): Constify.
4071         (maintenance_do_deprecate): Constify.  Use std::string.
4072         (maintenance_selftest): Constify.
4073         * gdbtypes.h (maintenance_print_type): Constify.
4074
4075 2017-09-27  Tom Tromey  <tom@tromey.com>
4076
4077         * hppa-tdep.c (unwind_command): Constify.
4078
4079 2017-09-27  Tom Tromey  <tom@tromey.com>
4080
4081         * target-descriptions.c (unset_tdesc_filename_cmd)
4082         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4083         Constify.
4084
4085 2017-09-27  Tom Tromey  <tom@tromey.com>
4086
4087         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4088
4089 2017-09-27  Tom Tromey  <tom@tromey.com>
4090
4091         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4092
4093 2017-09-27  Tom Tromey  <tom@tromey.com>
4094
4095         * tui/tui-regs.c (tui_reg_command): Constify.
4096
4097 2017-09-27  Tom Tromey  <tom@tromey.com>
4098
4099         * skip.c (skip_file_command, skip_function_command)
4100         (skip_enable_command, skip_disable_command, skip_delete_command):
4101         Constify.
4102
4103 2017-09-27  Tom Tromey  <tom@tromey.com>
4104
4105         * record-btrace.c (cmd_record_btrace_bts_start)
4106         (cmd_record_btrace_pt_start): Constify.
4107
4108 2017-09-27  Tom Tromey  <tom@tromey.com>
4109
4110         * symmisc.c (maintenance_print_symbols)
4111         (maintenance_print_msymbols, maintenance_print_objfiles)
4112         (maintenance_info_symtabs, maintenance_check_symtabs)
4113         (maintenance_expand_symtabs, maintenance_info_line_tables):
4114         Constify.
4115
4116 2017-09-27  Tom Tromey  <tom@tromey.com>
4117
4118         * top.c (new_ui_command): Constify.
4119
4120 2017-09-27  Tom Tromey  <tom@tromey.com>
4121
4122         * symfile.c (add_symbol_file_command)
4123         (remove_symbol_file_command, list_overlays_command)
4124         (map_overlay_command, unmap_overlay_command)
4125         (overlay_auto_command, overlay_manual_command)
4126         (overlay_off_command, overlay_load_command): Constify.
4127
4128 2017-09-27  Tom Tromey  <tom@tromey.com>
4129
4130         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4131         (info_spu_mailbox_command, info_spu_dma_command)
4132         (info_spu_proxydma_command): Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4137
4138 2017-09-27  Tom Tromey  <tom@tromey.com>
4139
4140         * cli/cli-script.c (user_defined_command): Constify.
4141
4142 2017-09-27  Tom Tromey  <tom@tromey.com>
4143
4144         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4145         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4146         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4147         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4148         (dump_binary_value, append_binary_memory, append_binary_value):
4149         Constify.
4150         (struct dump_context) <func>: Constify.
4151         (add_dump_command): Update.
4152
4153 2017-09-27  Tom Tromey  <tom@tromey.com>
4154
4155         * cli/cli-cmds.c (show_version, show_configuration)
4156         (source_command, show_user): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * target.c (maintenance_print_target_stack): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * interps.c (interpreter_exec_cmd): Constify.
4165
4166 2017-09-27  Tom Tromey  <tom@tromey.com>
4167
4168         * record-full.c (cmd_record_full_restore): Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * memattr.c (enable_mem_command, disable_mem_command)
4173         (delete_mem_command): Constify.
4174
4175 2017-09-27  Tom Tromey  <tom@tromey.com>
4176
4177         * value.c (show_convenience): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * gdbcore.h (core_file_command): Update.
4182         * corefile.c (core_file_command): Constify.
4183
4184 2017-09-27  Tom Tromey  <tom@tromey.com>
4185
4186         * user-regs.c (maintenance_print_user_registers): Constify.
4187
4188 2017-09-27  Tom Tromey  <tom@tromey.com>
4189
4190         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4191
4192 2017-09-27  Tom Tromey  <tom@tromey.com>
4193
4194         * cp-support.c (first_component_command): Constify.
4195
4196 2017-09-27  Tom Tromey  <tom@tromey.com>
4197
4198         * psymtab.c (maintenance_print_psymbols)
4199         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4200         Constify.
4201
4202 2017-09-27  Tom Tromey  <tom@tromey.com>
4203
4204         * windows-tdep.c (display_tib): Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * linux-fork.c (delete_checkpoint_command)
4209         (detach_checkpoint_command): Constify.
4210
4211 2017-09-27  Tom Tromey  <tom@tromey.com>
4212
4213         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * arc-tdep.c (dump_arc_instruction_command): Constify.
4218
4219 2017-09-27  Tom Tromey  <tom@tromey.com>
4220
4221         * valprint.c (set_radix, show_radix): Constify.
4222
4223 2017-09-27  Tom Tromey  <tom@tromey.com>
4224
4225         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4226
4227 2017-09-27  Tom Tromey  <tom@tromey.com>
4228
4229         * command.h (not_just_help_class_command): Update.
4230         * cli/cli-decode.h (not_just_help_class_command): Update.
4231         * cli/cli-decode.c (not_just_help_class_command): Constify.
4232
4233 2017-09-27  Tom Tromey  <tom@tromey.com>
4234
4235         * gdb_bfd.c (maintenance_info_bfds): Constify.
4236
4237 2017-09-27  Tom Tromey  <tom@tromey.com>
4238
4239         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4240         overloads.
4241         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4242         (do_const_cfunc): New function.
4243         (cmd_cfunc_eq): New overload.
4244         (cli_user_command_p): Check do_const_cfunc.
4245         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4246         const_cfunc.
4247         * command.h (add_cmd): Add const overload and no-function
4248         overload.
4249         (set_cmd_cfunc): Add const overload.
4250         (cmd_const_cfunc_ftype): Declare.
4251         (cmd_cfunc_eq): Add const overload.
4252         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4253         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4254         overload.
4255
4256 2017-09-27  Tom Tromey  <tom@tromey.com>
4257
4258         * macroexp.c (get_next_token_for_substitution): New function.
4259         (substitute_args): Call it.  Check for __VA_OPT__.
4260
4261 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4262             Pedro Alves <palves@redhat.com>
4263
4264         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4265         producer_is_icc_lt_14.
4266         (producer_is_icc_lt_14): New function.
4267         (check_producer): Add code for checking version of ICC.
4268         (producer_is_icc): Move to producer.c.
4269         (read_structure_type): Restrict ICC workaround to ICC<14.
4270         * producer.c: Include selftest.h.
4271         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4272         New functions.
4273         * producer.h (producer_is_icc): New declaration.
4274
4275 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4276
4277         * Makefile.in (SFILES): Add producer.c.
4278         (COMMON_OBS): Add producer.o
4279         * amd64-tdep.c (producer.h): Add new include.
4280         * dwarf2read.c (producer.h): Add new include.
4281         * producer.c: New file.
4282         * producer.h: New file.
4283         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4284         producer.c.
4285         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4286         producer.h.
4287
4288 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4289
4290         * configure.ac: Search ncursesw before ncurses.
4291         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4292         * gdb_curses.h: Include <ncursesw/ncurses.h>
4293         * config.in, configure: Regenerate.
4294
4295 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4296
4297         PR gdb/22185
4298         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4299         obsolete.
4300         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4301         Remove i386sol2 support.
4302         * configure.nat <i386sol2>: Remove.
4303         <sol2-64>: Fold into ...
4304         <sol2>: ... this.
4305         Move common settings to default section.
4306         Add sol-thread.o.
4307         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4308         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4309         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4310         <i[34567]86-*-solaris*>: Remove.
4311         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4312
4313         * configure.ac: Remove wctype in libw check.
4314         (_MSE_INT_H): Don't define on Solaris 7-9.
4315         <solaris*>: Remove libthread_db.so.1 check.
4316         * configure: Regenerate.
4317         * config.in: Regenerate.
4318
4319         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4320         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4321         (gdb_ps_size_t): Remove.
4322         Use base types in users.
4323         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4324
4325         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4326
4327 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4328
4329         PR build/22206
4330         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4331         (adi_is_addr_mapped): Likewise.
4332         (PSR_ICC): Don't redefine.
4333         (PSR_IMPL): Likewise.
4334
4335 2017-09-25  Tom Tromey  <tom@tromey.com>
4336
4337         * regcache.c (regcache::dump): Use string_printf.
4338
4339 2017-09-25  Tom Tromey  <tom@tromey.com>
4340
4341         * regcache.c (class regcache_invalidator): New.
4342         (struct register_to_invalidate): Remove.
4343         (make_cleanup_regcache_invalidate): Remove.
4344         (regcache::raw_write): Use regcache_invalidator.
4345
4346 2017-09-25  Tom Tromey  <tom@tromey.com>
4347
4348         * spu-tdep.c (spu2ppu_sniffer): Update.
4349         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4350         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4351         Remove.
4352         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4353         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4354         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4355         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4356         (frame_pop): Update.
4357
4358 2017-09-25  Tom Tromey  <tom@tromey.com>
4359
4360         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4361         * regcache.h (regcache_xfree): Don't declare.
4362         * regcache.c (regcache_xfree): Remove.
4363         (do_regcache_xfree): Use delete.
4364         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4365         * linux-fork.c (free_fork): Use delete.
4366         (fork_save_infrun_state): Likewise.
4367         * jit.c (jit_dealloc_cache): Use delete.
4368         * infrun.c (discard_infcall_suspend_state): Use delete.
4369
4370 2017-09-25  Tom Tromey  <tom@tromey.com>
4371
4372         * regcache.h (regcache_xmalloc): Don't declare.
4373         (regcache_raw_set_cached_value): Update comment.
4374         * regcache.c (regcache_xmalloc): Remove.
4375         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4376         * jit.c (jit_frame_sniffer): Use new.
4377         * frame.c (frame_save_as_regcache): Use new.
4378
4379 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4380
4381         * NEWS: Advertise support for guarded-storage registers on IBM z.
4382
4383 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4384
4385         * s390-linux-nat.c (have_regset_gs): New static variable.
4386         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4387         control block and guarded-storage broadcast control regsets.
4388         (s390_read_description): Detect whether the target has
4389         guarded-storage support, return appropriate tdesc.
4390         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4391         (features/s390x-gs-linux64.c): Likewise.
4392         (struct gdbarch_tdep) <have_gs>: New field.
4393         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4394         (s390_gsbc_regset): New variables.
4395         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4396         and s390_gsbc_regset, if applicable.
4397         (s390_core_read_description): Check whether core file was from a
4398         target with guarded-storage support; include appropriate regsets.
4399         (s390_gdbarch_init): Add registers for guarded-storage support.
4400         (_initialize_s390_tdep): Initialize new target descriptions that
4401         include registers for guarded-storage support.
4402         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4403         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4404         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4405         (S390_NUM_REGS): Adjust macro definition.
4406         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4407         (tdesc_s390x_gs_linux64): New declarations.
4408
4409 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4410
4411         * features/s390-gs-linux64.xml: New file.
4412         * features/s390-gs.xml: New file.
4413         * features/s390-gsbc.xml: New file.
4414         * features/s390x-gs-linux64.xml: New file.
4415         * features/Makefile (WHICH): Add s390-gs-linux64 and
4416         s390x-gs-linux64.
4417         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4418         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4419         * features/s390-gs-linux64.c: New generated file.
4420         * features/s390x-gs-linux64.c: New file.
4421         * regformats/s390-gs-linux64.dat: New file.
4422         * regformats/s390x-gs-linux64.dat: New file.
4423
4424 2017-09-23  Tom Tromey  <tom@tromey.com>
4425
4426         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4427
4428 2017-09-22  Tom Tromey  <tom@tromey.com>
4429
4430         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4431         type to scoped_restore_tmpl.
4432         <scoped_input_handler>: Initialize m_quit_handler directly.
4433
4434 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4435
4436         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4437         (cd_command): Likewise.  Free "current_directory" before
4438         assigning to it.
4439         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4440         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4441         * top.c (gdb_dirbuf): Remove global declaration.
4442         * top.h (gdb_dirbuf): Likewise.
4443
4444 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4445
4446         * gnulib/aclocal.m4: Regenerate.
4447         * gnulib/config.in: Regenerate.
4448         * gnulib/configure: Regenerate.
4449         * gnulib/import/Makefile.am: Regenerate.
4450         * gnulib/import/Makefile.in: Regenerate.
4451         * gnulib/import/assure.h: New file.
4452         * gnulib/import/at-func.c: Likewise
4453         * gnulib/import/chdir-long.c: New file.
4454         * gnulib/import/chdir-long.h: New file.
4455         * gnulib/import/cloexec.c: New file.
4456         * gnulib/import/cloexec.h: New file.
4457         * gnulib/import/close.c: New file.
4458         * gnulib/import/closedir.c: New file.
4459         * gnulib/import/dirent-private.h: New file.
4460         * gnulib/import/dup-safer.c: New file.
4461         * gnulib/import/dup.c: New file.
4462         * gnulib/import/dup2.c: New file.
4463         * gnulib/import/error.c: New file.
4464         * gnulib/import/error.h: New file.
4465         * gnulib/import/exitfail.c: New file.
4466         * gnulib/import/exitfail.h: New file.
4467         * gnulib/import/fchdir.c: New file.
4468         * gnulib/import/fcntl.c: New file.
4469         * gnulib/import/fcntl.in.h: New file.
4470         * gnulib/import/fd-hook.c: New file.
4471         * gnulib/import/fd-hook.h: New file.
4472         * gnulib/import/fd-safer.c: New file.
4473         * gnulib/import/fdopendir.c: New file.
4474         * gnulib/import/filename.h: New file.
4475         * gnulib/import/filenamecat-lgpl.c: New file.
4476         * gnulib/import/filenamecat.h: New file.
4477         * gnulib/import/fstat.c: New file.
4478         * gnulib/import/fstatat.c: New file.
4479         * gnulib/import/getcwd-lgpl.c: New file.
4480         * gnulib/import/getcwd.c: New file.
4481         * gnulib/import/getdtablesize.c: New file.
4482         * gnulib/import/getlogin_r.c: New file.
4483         * gnulib/import/getprogname.c: New file.
4484         * gnulib/import/getprogname.h: New file.
4485         * gnulib/import/gettext.h: New file.
4486         * gnulib/import/glob-libc.h: New file.
4487         * gnulib/import/glob.c: New file.
4488         * gnulib/import/glob.in.h: New file.
4489         * gnulib/import/intprops.h: New file.
4490         * gnulib/import/m4/chdir-long.m4: New file.
4491         * gnulib/import/m4/close.m4: New file.
4492         * gnulib/import/m4/closedir.m4: New file.
4493         * gnulib/import/m4/d-ino.m4: New file.
4494         * gnulib/import/m4/d-type.m4: New file.
4495         * gnulib/import/m4/dup.m4: New file.
4496         * gnulib/import/m4/dup2.m4: New file.
4497         * gnulib/import/m4/error.m4: New file.
4498         * gnulib/import/m4/fchdir.m4: New file.
4499         * gnulib/import/m4/fcntl.m4: New file.
4500         * gnulib/import/m4/fcntl_h.m4: New file.
4501         * gnulib/import/m4/fdopendir.m4: New file.
4502         * gnulib/import/m4/filenamecat.m4: New file.
4503         * gnulib/import/m4/fstat.m4: New file.
4504         * gnulib/import/m4/fstatat.m4: New file.
4505         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4506         * gnulib/import/m4/getcwd-path-max.m4: New file.
4507         * gnulib/import/m4/getcwd.m4: New file.
4508         * gnulib/import/m4/getdtablesize.m4: New file.
4509         * gnulib/import/m4/getlogin_r.m4: New file.
4510         * gnulib/import/m4/getprogname.m4: New file.
4511         * gnulib/import/m4/glob.m4: New file.
4512         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4513         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4514         * gnulib/import/m4/mempcpy.m4: New file.
4515         * gnulib/import/m4/memrchr.m4: New file.
4516         * gnulib/import/m4/mode_t.m4: New file.
4517         * gnulib/import/m4/msvc-inval.m4: New file.
4518         * gnulib/import/m4/msvc-nothrow.m4: New file.
4519         * gnulib/import/m4/open.m4: New file.
4520         * gnulib/import/m4/openat.m4: New file.
4521         * gnulib/import/m4/opendir.m4: New file.
4522         * gnulib/import/m4/readdir.m4: New file.
4523         * gnulib/import/m4/realloc.m4: New file.
4524         * gnulib/import/m4/rewinddir.m4: New file.
4525         * gnulib/import/m4/save-cwd.m4: New file.
4526         * gnulib/import/m4/strdup.m4: New file.
4527         * gnulib/import/m4/strerror.m4: New file.
4528         * gnulib/import/m4/unistd-safer.m4: New file.
4529         * gnulib/import/mempcpy.c: New file.
4530         * gnulib/import/memrchr.c: New file.
4531         * gnulib/import/msvc-inval.c: New file.
4532         * gnulib/import/msvc-inval.h: New file.
4533         * gnulib/import/msvc-nothrow.c: New file.
4534         * gnulib/import/msvc-nothrow.h: New file.
4535         * gnulib/import/open.c: New file.
4536         * gnulib/import/openat-die.c: New file.
4537         * gnulib/import/openat-priv.h: New file.
4538         * gnulib/import/openat-proc.c: New file.
4539         * gnulib/import/openat.c: New file.
4540         * gnulib/import/openat.h: New file.
4541         * gnulib/import/opendir.c: New file.
4542         * gnulib/import/pipe-safer.c: New file.
4543         * gnulib/import/readdir.c: New file.
4544         * gnulib/import/realloc.c: New file.
4545         * gnulib/import/rewinddir.c: New file.
4546         * gnulib/import/save-cwd.c: New file.
4547         * gnulib/import/save-cwd.h: New file.
4548         * gnulib/import/strdup.c: New file.
4549         * gnulib/import/strerror-override.c: New file.
4550         * gnulib/import/strerror-override.h: New file.
4551         * gnulib/import/strerror.c: New file.
4552         * gnulib/import/unistd--.h: New file.
4553         * gnulib/import/unistd-safer.h: New file.
4554         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4555         "getcwd" and "glob".
4556         * ser-tcp.c: Undefine "close" before redefining it.
4557
4558 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4559
4560         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4561         get rid of res_val.
4562
4563 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4564
4565         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4566         <sol2,sparc>: Likewise.
4567         <sol2-64,i386>: Likewise.
4568
4569         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4570         -Wdeprecated-declarations on *-*-solaris*.
4571         * configure: Regenerate.
4572
4573         * procfs.c: Include "nat/inferior.h".
4574         (procfs_info_proc): Fix typo.
4575
4576 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4577
4578         * remote.c (vector): Include.
4579         (struct private_thread_info): Add field, thread_handle.
4580         (free_private_thread_info): Deallocate storage associated with
4581         thread handle.
4582         (get_private_info_thread): Initialize `thread_handle' field.
4583         (struct thread_item): Add field, thread_handle.
4584         (clear_threads_listing_context): Deallocate storage associated
4585         with thread handle.
4586         (start_thread): Add support for "handle" attribute.
4587         (thread_attributes): Add "handle".
4588         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4589         field.
4590         (remote_update_thread_list): Update thread_handle.
4591         (remote_thread_handle_to_thread_info): New function.
4592         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4593
4594 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4595
4596         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4597         function.
4598         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4599         * python/python-internal.h (thread_object_type): Declare.
4600
4601 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4602
4603         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4604         (target_thread_handle_to_thread_info): Declare.
4605         * target.c (target_thread_handle_to_thread_info): New function.
4606         * target-delegates.c: Regenerate.
4607         * gdbthread.h (find_thread_by_handle): Declare.
4608         * thread.c (find_thread_by_handle): New function.
4609         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4610         function.
4611         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4612
4613 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4614
4615         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4616
4617 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4618
4619         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4620
4621 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4622
4623         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4624         to gdb_target_obs.
4625
4626 2017-09-20  Tom Tromey  <tom@tromey.com>
4627
4628         * breakpoint.c (struct counted_command_line): Remove.
4629         (breakpoint_commands): Update.
4630         (alloc_counted_command_line, incref_counted_command_line)
4631         (decref_counted_command_line, do_cleanup_counted_command_line)
4632         (make_cleanup_decref_counted_command_line): Remove.
4633         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4634         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4635         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4636         (save_breakpoints): Update.
4637         * breakpoint.h (counted_command_line): Now a typedef to
4638         shared_ptr.
4639         (struct breakpoint) <commands>: Now a counted_command_line.
4640         (struct bpstats) <command>: Likewise.
4641
4642 2017-09-20  Tom Tromey  <tom@tromey.com>
4643
4644         * breakpoint.c (struct commands_info, do_map_commands_command):
4645         Remove.
4646         (commands_command_1): Update.
4647         (iterate_over_related_breakpoints): Take a function_view.
4648         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4649         (delete_command): Update.
4650         (map_breakpoint_numbers): Take a function_view.
4651         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4652         (disable_command): Update.
4653         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4654         (enable_command): Update.
4655         (struct disp_data, do_enable_breakpoint_disp)
4656         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4657         (do_map_enable_delete_breakpoint): Remove.
4658         (enable_once_command, enable_count_command, enable_delete_command)
4659         (delete_trace_variable_command): Update.
4660
4661 2017-09-20  Tom Tromey  <tom@tromey.com>
4662
4663         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4664         (bpstat_clear): Use delete.
4665         (bpstats): New constructors.
4666         (bpstat_copy, bpstat_stop_status): Use new.
4667         (dprintf_after_condition_true): Update.
4668         * breakpoint.h (bpstats::bpstats): Add constructors.
4669         (bpstats::~bpstats): Add destructor.
4670
4671 2017-09-20  Pedro Alves  <palves@redhat.com>
4672
4673         * eval.c (make_params): Delete, refactored as ...
4674         (class fake_method): ... this new type's ctor.
4675         (fake_method::~fake_method): New.
4676         (evaluate_subexp_standard): Use 'fake_method'.
4677
4678 2017-09-20  Tom Tromey  <tom@tromey.com>
4679
4680         * windows-nat.c (get_windows_debug_event, windows_wait)
4681         (do_initial_windows_stuff, windows_attach): Update.
4682         * utils.c (vwarning, internal_vproblem): Update.
4683         (ui_unregister_input_event_handler_cleanup)
4684         (prepare_to_handle_input): Remove.
4685         (class scoped_input_handler): New.
4686         (defaulted_query, prompt_for_continue): Update.
4687         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4688         Update.
4689         * top.c (undo_terminal_modifications_before_exit): Update.
4690         * target/target.h (target_terminal_init, target_terminal_inferior)
4691         (target_terminal_ours): Don't declare.
4692         (class target_terminal): New.
4693         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4694         (target_terminal_ours_for_output)
4695         (make_cleanup_restore_target_terminal): Don't declare.
4696         (target_terminal_info): Remove.
4697         * target.c (enum terminal_state, terminal_state): Remove.
4698         (target_terminal::terminal_state): Define.
4699         (target_terminal::init): Rename from target_terminal_init.
4700         (target_terminal::inferior): Rename from
4701         target_terminal_inferior.
4702         (target_terminal::ours): Rename from target_terminal_ours.
4703         (target_terminal::ours_for_output): Rename from
4704         target_terminal_ours_for_output.
4705         (target_terminal::info): New method.
4706         (cleanup_restore_target_terminal)
4707         (make_cleanup_restore_target_terminal): Remove.
4708         * solib.c (handle_solib_event): Update.
4709         * remote.c (remote_serial_quit_handler): Update.
4710         (remote_terminal_inferior, remote_wait_as): Update.
4711         * record-full.c (record_full_wait_1): Update.
4712         * nto-procfs.c (procfs_create_inferior): Update.
4713         * nat/fork-inferior.c (startup_inferior): Update.
4714         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4715         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4716         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4717         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4718         (mi_breakpoint_created, mi_breakpoint_deleted)
4719         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4720         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4721         (mi_user_selected_context_changed, report_initial_inferior):
4722         Update.
4723         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4724         (linux_nat_terminal_inferior): Update.
4725         * infrun.c (follow_fork_inferior)
4726         (handle_vfork_child_exec_or_exit, do_target_resume)
4727         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4728         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4729         Update.
4730         * inflow.c (child_terminal_init, info_terminal_command): Update.
4731         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4732         (attach_command): Update.
4733         * infcall.c (call_thread_fsm_should_stop): Update.
4734         * gnu-nat.c (gnu_attach): Update.
4735         * extension.c (struct active_ext_lang_state)
4736         (restore_active_ext_lang): Update.
4737         * exceptions.c (print_flush): Update.
4738         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4739         (struct quit_handler_cleanup_data, restore_quit_handler)
4740         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4741         Remove.
4742         * cp-support.c (gdb_demangle): Update.
4743         * breakpoint.c (update_inserted_breakpoint_locations)
4744         (insert_breakpoint_locations, handle_jit_event)
4745         (disable_breakpoints_in_unloaded_shlib): Update.
4746         * annotate.c (annotate_breakpoints_invalid)
4747         (annotate_frames_invalid): Update.
4748
4749 2017-09-20  Tom Tromey  <tom@tromey.com>
4750
4751         * main.c (catch_command_errors): Rename from
4752         catch_command_errors_const.
4753         (captured_main_1): Update.
4754
4755 2017-09-20  Pedro Alves  <palves@redhat.com>
4756
4757         * cli/cli-cmds.c (list_command): Use print_sal_location.
4758         (print_sal_location): New function.
4759         (ambiguous_line_spec): Use print_sal_location.
4760         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4761         * symtab.c (find_function_start_sal): Likewise.
4762         * symtab.h (symtab_and_line::symbol): New field.
4763
4764 2017-09-20  Pedro Alves  <palves@redhat.com>
4765
4766         * linespec.c (minsym_found): Handle non-text minsyms.
4767         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4768
4769 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4770
4771         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4772         backslash.
4773
4774 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4775
4776         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4777         vmovups instead vmovaps.
4778         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4779
4780 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4781
4782         * NEWS (Changes since GDB 8.0): Add starti.
4783         * infcmd.c (enum run_break): New.
4784         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4785         case.
4786         (run_command): Use enum run_how.
4787         (start_command): Likewise.
4788         (starti_command): New function.
4789         (RUN_ARGS_HELP): New macro.
4790         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4791         commands.  Add starti command.
4792
4793 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4794
4795         * Makefile.in (monitor.o): Remove the rule.
4796
4797 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4798
4799         * annotate.h (struct annotate_arg_emitter): Use
4800         DISABLE_COPY_AND_ASSIGN.
4801         * common/refcounted-object.h (refcounted_object): Likewise.
4802         * completer.h (struct completion_result): Likewise.
4803         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4804         * filename-seen-cache.h (filename_seen_cache): Likewise.
4805         * gdbcore.h (thread_section_name): Likewise.
4806         * gdb_regex.h (compiled_regex): Likewise.
4807         * gdbthread.h (scoped_restore_current_thread): Likewise.
4808         * inferior.h (scoped_restore_current_inferior): Likewise.
4809         * jit.c (jit_reader): Likewise.
4810         * linespec.h (struct linespec_result): Likewise.
4811         * mi/mi-parse.h (struct mi_parse): Likewise.
4812         * nat/fork-inferior.c (execv_argv): Likewise.
4813         * progspace.h (scoped_restore_current_program_space): Likewise.
4814         * python/python-internal.h (class gdbpy_enter): Likewise.
4815         * regcache.h (regcache): Likewise.
4816         * target-descriptions.c (struct tdesc_reg): Likewise.
4817         (struct tdesc_type): Likewise.
4818         (struct tdesc_feature): Likewise.
4819         * ui-out.h (ui_out_emit_type): Likewise.
4820
4821 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4822
4823         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4824         label abort_expression.
4825
4826 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4827
4828         * common/buffer.c (buffer_xml_printf): Adjust.
4829         * common/xml-utils.c (xml_escape_text): Change return type to
4830         std::string, update code accordingly.
4831         * common/xml-utils.h (xml_escape_text): Change return type to
4832         std::string.
4833         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4834         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4835         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4836         Adjust.
4837
4838 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4839
4840         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4841         (SUBDIR_UNITTESTS_OBS): Add new object file.
4842         * unittests/xml-utils-selftests.c: New file.
4843
4844 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4845
4846         * common/selftest.h (selftest): New struct/interface.
4847         (register_test): Add name parameter, add new overload.
4848         (run_tests): Add filter parameter.
4849         (for_each_selftest_ftype): New typedef.
4850         (for_each_selftest): New declaration.
4851         * common/selftest.c (tests): Change type to
4852         map<string, unique_ptr<selftest>>.
4853         (simple_selftest): New struct.
4854         (register_test): New function.
4855         (register_test): Add name parameter and use it.
4856         (run_tests): Add filter parameter and use it.  Add prints.
4857         Adjust to vector -> map change.
4858         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4859         registering selftests.
4860         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4861         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4862         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4863         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4864         * findvar.c (_initialize_findvar): Likewise.
4865         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4866         * maint.c (maintenance_selftest): Update call to run_tests.
4867         (maintenance_info_selftests): New function.
4868         (_initialize_maint_cmds): Register "maintenance info selftests"
4869         command.  Update "maintenance selftest" doc.
4870         * regcache.c (_initialize_regcache): Add names when registering
4871         selftests.
4872         * rust-exp.y (_initialize_rust_exp): Likewise.
4873         * selftest-arch.c (gdbarch_selftest): New struct.
4874         (gdbarch_tests): Remove.
4875         (register_test_foreach_arch): Add name parameter.  Call
4876         register_test.
4877         (tests_with_arch): Remove, move most content to
4878         gdbarch_selftest::operator().
4879         (_initialize_selftests_foreach_arch): Remove.
4880         * selftest-arch.h (register_test_foreach_arch): Add name
4881         parameter.
4882         (run_tests_with_arch): New declaration.
4883         * utils-selftests.c (_initialize_utils_selftests): Add names
4884         when registering selftests.
4885         * utils.c (_initialize_utils): Likewise.
4886         * unittests/array-view-selftests.c
4887         (_initialize_array_view_selftests): Likewise.
4888         * unittests/environ-selftests.c (_initialize_environ_selftests):
4889         Likewise.
4890         * unittests/function-view-selftests.c
4891         (_initialize_function_view_selftests): Likewise.
4892         * unittests/offset-type-selftests.c
4893         (_initialize_offset_type_selftests): Likewise.
4894         * unittests/optional-selftests.c
4895         (_initialize_optional_selftests): Likewise.
4896         * unittests/scoped_restore-selftests.c
4897         (_initialize_scoped_restore_selftests): Likewise.
4898         * NEWS: Document "maintenance selftest" and "maint info
4899         selftests".
4900
4901 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4902
4903         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4904         scoped_restore.
4905
4906 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4907
4908         * mi/mi-main.c (mi_load_progress): Make uiout variable
4909         a unique_ptr.
4910
4911 2017-09-15  Pedro Alves  <palves@redhat.com>
4912
4913         * compile/compile-c-types.c (convert_enum, convert_int)
4914         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4915
4916 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4917
4918         * dwarf2read.c (copy_string): Remove.
4919         (parse_macro_definition): Replace copy_string with savestring.
4920
4921 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4922
4923         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4924         gdb_target_obs.
4925         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4926         Likewise.
4927         (i[34567]86-*-linux*): Likewise.
4928
4929 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4930
4931         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4932         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4933         <stack>: Change type to std::vector.
4934         <stack_len, stack_allocated>: Remove.
4935         <grow_stack>: Remove.
4936         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4937         (dwarf_expr_context::~dwarf_expr_context): Remove.
4938         (dwarf_expr_context::grow_stack): Remove.
4939         (dwarf_expr_context::push): Adjust.
4940         (dwarf_expr_context::pop): Adjust.
4941         (dwarf_expr_context::fetch): Adjust.
4942         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4943         (dwarf_expr_context::stack_empty_p): Adjust.
4944         (dwarf_expr_context::execute_stack_op): Adjust.
4945
4946 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4947
4948         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4949         return type to bool.
4950         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4951
4952 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4953
4954         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4955         Change type to bool.
4956         (dwarf_stack_value) <in_stack_memory>: Likewise.
4957         (dwarf_expr_context) <push_address>: Change parameter type to
4958         bool.
4959         <fetch_in_stack_memory>: Change return type to bool.
4960         <push>: Change parameter type to bool.
4961         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4962         to bool.
4963         (dwarf_expr_context::push_address): Likewise.
4964         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4965         to bool.
4966         (dwarf_expr_context::execute_stack_op): Adjust.
4967         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4968
4969 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4970
4971         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4972         (struct dwarf_expr_context) <n_pieces>: Remove.
4973         <pieces>: Change type to std::vector.
4974         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4975         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4976         pieces.
4977         (dwarf_expr_context::add_piece): Adjust.
4978         * dwarf2loc.c (struct piece_closure): Initialize fields.
4979         <n_pieces>: Remove.
4980         <pieces>: Change type to std::vector.
4981         (allocate_piece_closure): Adjust, change parameter to
4982         std::vector rvalue and std::move it to piece_closure.
4983         (rw_pieced_value): Adjust.
4984         (check_pieced_synthetic_pointer): Adjust.
4985         (indirect_synthetic_pointer): Adjust.
4986         (coerce_pieced_ref): Adjust.
4987         (free_pieced_value_closure):  Adjust.  Use delete to free
4988         piece_closure.
4989         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4990         to allocate_piece_closure.
4991         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4992
4993 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4994
4995         * probe.h (probe_ops_cp): Remove typedef.
4996         (DEF_VEC_P (probe_ops_cp)): Remove.
4997         (all_probe_ops): Change type to std::vector.
4998         * probe.c (info_probes_for_ops): Adjust to vector change.
4999         (probe_linespec_to_ops): Likewise.
5000         (all_probe_ops): Change type to std::vector.
5001         (_initialize_probe): Adjust to vector change.
5002         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5003         * elfread.c (elf_get_probes): Likewise.
5004         * stap-probe.c (_initialize_stap_probe): Likewise.
5005
5006 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5007
5008         * probe.h (struct bound_probe): Define constructors.
5009         * probe.c (bound_probe_s): Remove typedef.
5010         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5011         (collect_probes): Change return type to std::vector, remove
5012         cleanup.
5013         (compare_probes): Return bool, change parameter type.  Change
5014         semantic to "less than".
5015         (gen_ui_out_table_header_info): Change parameter to std::vector
5016         and update.
5017         (exists_probe_with_pops): Likewise.
5018         (info_probes_for_ops): Update to std::vector change.
5019         (enable_probes_command): Likewise.
5020         (disable_probes_command): Likewise.
5021
5022 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5023
5024         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5025         vec to std::vector.
5026         * probe.c (parse_probes_in_pspace): Update.
5027         (find_probes_in_objfile): Update.
5028         (find_probe_by_pc): Update.
5029         (collect_probes): Update.
5030         (probe_any_get_probes): Update.
5031         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5032         return type to reference to std::vector.
5033         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5034         std::vector and update.
5035         (dtrace_process_dof): Likewise.
5036         (dtrace_get_probes): Likewise.
5037         * elfread.c (elf_get_probes): Change return type to std::vector,
5038         store an std::vector in bfd_data.
5039         (probe_key_free): Update to std::vector.
5040         * stap-probe.c (handle_stap_probe): Change parameter to
5041         std::vector and update.
5042         (stap_get_probes): Likewise.
5043         * symfile-debug.c (debug_sym_get_probes): Change return type to
5044         std::vector and update.
5045
5046 2017-09-11  Tom Tromey  <tom@tromey.com>
5047
5048         * breakpoint.c (program_breakpoint_here_p): Update.
5049         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5050         from make_show_memory_breakpoints_cleanup.  Return a
5051         scoped_restore_tmpl<int>.
5052         (restore_show_memory_breakpoints): Remove.
5053         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5054         * mem-break.c (memory_validate_breakpoint): Update.
5055         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5056         (ia64_memory_remove_breakpoint): Update.
5057         (ia64_breakpoint_from_pc): Update.
5058         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5059         from make_show_memory_breakpoints_cleanup.
5060
5061 2017-09-11  Tom Tromey  <tom@tromey.com>
5062
5063         * d-namespace.c (d_lookup_symbol): Use std::string.
5064         (find_symbol_in_baseclass): Likewise.
5065
5066 2017-09-11  Tom Tromey  <tom@tromey.com>
5067
5068         * ctf.c (ctf_start): Use std::string.
5069
5070 2017-09-11  Tom Tromey  <tom@tromey.com>
5071
5072         * ada-lang.c (is_known_support_routine): Update.
5073         (ada_unhandled_exception_name_addr_from_raise): Update.
5074         * guile/scm-frame.c (gdbscm_frame_name): Update.
5075         * python/py-frame.c (frapy_name): Update.
5076         (frapy_function): Update.
5077         * stack.h (find_frame_funname): Update.
5078         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5079         (print_frame): Update.
5080
5081 2017-09-11  Tom Tromey  <tom@tromey.com>
5082
5083         * findcmd.c (put_bits): Take a gdb::byte_vector.
5084         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5085         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5086         cleanups.
5087         (find_command): Update.
5088
5089 2017-09-11  Tom Tromey  <tom@tromey.com>
5090
5091         * cli/cli-script.c (class scoped_restore_hook_in): New.
5092         (clear_hook_in_cleanup): Remove.
5093         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5094         scoped_restore_hook_in.
5095
5096 2017-09-11  Tom Tromey  <tom@tromey.com>
5097
5098         * cli/cli-script.c (restore_interp): Remove.
5099         (read_command_lines): Use scoped_restore_interp.
5100         * interps.c (scoped_restore_interp::set_temp): Rename from
5101         interp_set_temp.
5102         * interps.h (class scoped_restore_interp): New.
5103         (interp_set_temp): Remove.
5104
5105 2017-09-11  Tom Tromey  <tom@tromey.com>
5106
5107         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5108         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5109         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5110         scoped_restore.
5111         (mi_cmd_break_insert_1): Update.
5112         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5113         scoped_restore.
5114
5115 2017-09-11  Tom Tromey  <tom@tromey.com>
5116
5117         * demangle.c (demangle_command): Update.
5118         * breakpoint.c (disable_command): Update.
5119         (enable_command): Update.
5120         (find_location_by_number): Make "number" const.  Use
5121         get_number_trailer.
5122         * cli/cli-utils.c (extract_arg): Return std::string.
5123         * probe.c (parse_probe_linespec): Update.  Change types.
5124         (collect_probes): Take string arguments.
5125         (parse_probe_linespec): Likewise.
5126         (info_probes_for_ops): Update.
5127         (enable_probes_command): Update.
5128         (disable_probes_command): Update.
5129         * break-catch-sig.c (catch_signal_split_args): Update.
5130         * mi/mi-parse.c (mi_parse): Update.
5131
5132 2017-09-11  Tom Tromey  <tom@tromey.com>
5133
5134         * language.h (language_enum): Make argument const.
5135         * language.c (language_enum): Make argument const.
5136
5137 2017-09-11  Tom Tromey  <tom@tromey.com>
5138
5139         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5140         as function.
5141         (skip_to_space): Rename from skip_to_space_const.
5142         * common/common-utils.c (skip_to_space): New function.
5143         (skip_to_space): Rename from skip_to_space_const.
5144         * cli/cli-utils.h (get_number): Rename from get_number_const.
5145         (extract_arg): Rename from extract_arg_const.
5146         * cli/cli-utils.c (get_number): Rename from get_number_const.
5147         (extract_arg): Rename from extract_arg_const.
5148         (number_or_range_parser::get_number): Use ::get_number.
5149         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5150         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5151         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5152         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5153         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5154         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5155         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5156         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5157
5158 2017-09-11  Tom Tromey  <tom@tromey.com>
5159
5160         * python/python.c (do_start_initialization): Use
5161         py-event-types.def to initialize types.
5162         Define all object type structures.
5163         * python/python-internal.h: Don't declare event initialization
5164         functions.
5165         * python/py-threadevent.c (thread_event_object_type): Don't
5166         define.
5167         * python/py-stopevent.c (stop_event_object_type): Don't define.
5168         * python/py-signalevent.c (signal_event_object_type): Don't
5169         declare or define.
5170         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5171         (clear_objfiles_event_object_type): Don't declare or define.
5172         * python/py-infevents.c (inferior_call_pre_event_object_type)
5173         (inferior_call_post_event_object_type)
5174         (register_changed_event_object_type)
5175         (memory_changed_event_object_type): Don't declare or define.
5176         * python/py-inferior.c (new_thread_event_object_type)
5177         (new_inferior_event_object_type)
5178         (inferior_deleted_event_object_type): Don't declare or define.
5179         * python/py-exitedevent.c (exited_event_object_type): Don't
5180         declare or define.
5181         * python/py-evts.c (gdbpy_initialize_py_events): Use
5182         py-all-events.def.
5183         * python/py-events.h (thread_event_object_type): Don't declare.
5184         (events_object): Use py-all-events.def.
5185         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5186         py-event-types.def.
5187         * python/py-event-types.def: New file.
5188         * python/py-continueevent.c (create_continue_event_object): Don't
5189         declare or define.
5190         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5191         declare or define.
5192         * python/py-all-events.def: New file.
5193
5194 2017-09-11  Tom Tromey  <tom@tromey.com>
5195
5196         * python/py-threadevent.c (create_thread_event_object): Return
5197         gdbpy_ref.
5198         * python/py-stopevent.h (create_stop_event_object)
5199         (create_breakpoint_event_object, create_signal_event_object):
5200         Update.
5201         * python/py-stopevent.c (create_stop_event_object): Return
5202         gdbpy_ref.
5203         (emit_stop_event): Update.
5204         * python/py-signalevent.c (create_signal_event_object): Return
5205         gdbpy_ref.
5206         * python/py-infevents.c (create_inferior_call_event_object):
5207         Update.
5208         * python/py-event.h (create_event_object)
5209         (create_thread_event_object): Update.
5210         * python/py-event.c (create_event_object): Return gdbpy_ref.
5211         * python/py-continueevent.c: Return gdbpy_ref.
5212         * python/py-bpevent.c (create_breakpoint_event_object): Return
5213         gdbpy_ref.
5214
5215 2017-09-11  Tom Tromey  <tom@tromey.com>
5216
5217         PR python/15622:
5218         * NEWS: Add entry.
5219         * python/python.c (do_start_initialization): Initialize new event
5220         types.
5221         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5222         (gdbpy_initialize_inferior_deleted_event)
5223         (gdbpy_initialize_new_thread_event): Declare.
5224         * python/py-threadevent.c (create_thread_event_object): Add option
5225         "thread" parameter.
5226         * python/py-inferior.c (new_thread_event_object_type)
5227         (new_inferior_event_object_type)
5228         (inferior_deleted_event_object_type): Declare.
5229         (python_new_inferior, python_inferior_deleted): New functions.
5230         (add_thread_object): Emit new_thread event.
5231         (gdbpy_initialize_inferior): Attach new functions to corresponding
5232         observers.
5233         (new_thread, new_inferior, inferior_deleted): Define new event
5234         types.
5235         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5236         registries.
5237         * python/py-events.h (events_object) <new_inferior,
5238         inferior_deleted, new_thread>: New fields.
5239         * python/py-event.h (create_thread_event_breakpoint): Add optional
5240         "thread" parameter.
5241
5242 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5243
5244         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5245         check current_ui instead.
5246         (internal_vproblem): Likewise.
5247
5248 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5249
5250         * thread.c (print_thread_info_1): Remove unnecessary calls to
5251         uiout->is_mi_like_p.
5252
5253 2017-09-09  Tom Tromey  <tom@tromey.com>
5254
5255         * namespace.h (add_using_directive): Update.
5256         * namespace.c (add_using_directive): Change type of excludes to
5257         std::vector.
5258         * dwarf2read.c (read_import_statement): Use std::vector.
5259         (read_namespace): Update.
5260         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5261
5262 2017-09-09  Tom Tromey  <tom@tromey.com>
5263
5264         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5265
5266 2017-09-09  Tom Tromey  <tom@tromey.com>
5267
5268         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5269
5270 2017-09-09  Tom Tromey  <tom@tromey.com>
5271
5272         * stack.c (func_command): Use gdb::def_vector.
5273
5274 2017-09-09  Tom Tromey  <tom@tromey.com>
5275
5276         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5277         ui_out_emit_list, ui_out_emit_tuple.
5278         (mi_cmd_var_update): Likewise.
5279
5280 2017-09-09  Tom Tromey  <tom@tromey.com>
5281
5282         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5283         ui_out_redirect_pop.
5284         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5285         ui_out_redirect_pop.
5286         * utils.c (do_ui_out_redirect_pop)
5287         (make_cleanup_ui_out_redirect_pop): Remove.
5288         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5289         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5290         * ui-out.h (ui_out_redirect_pop): New class.
5291
5292 2017-09-09  Tom Tromey  <tom@tromey.com>
5293
5294         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5295         (list_available_thread_groups, mi_cmd_list_thread_groups)
5296         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5297         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5298         Likewise.
5299
5300 2017-09-09  Tom Tromey  <tom@tromey.com>
5301
5302         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5303         ui_out_emit_tuple.
5304
5305 2017-09-09  Tom Tromey  <tom@tromey.com>
5306
5307         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5308         * stack.c (print_frame): Use ui_out_emit_tuple.
5309         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5310         (info_spu_mailbox_command, info_spu_dma_command)
5311         (info_spu_proxydma_command): Likewise.
5312         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5313         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5314         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5315         ui_out_emit_tuple.
5316         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5317
5318 2017-09-09  Tom Tromey  <tom@tromey.com>
5319
5320         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5321         (class ui_out_emit_table): Update comment.
5322         * ui-out.c (do_cleanup_table_end)
5323         (make_cleanup_ui_out_table_begin_end): Remove.
5324         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5325         (info_spu_dma_cmdlist): Likewise.
5326         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5327         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5328         ui_out_emit_table.
5329
5330 2017-09-09  Tom Tromey  <tom@tromey.com>
5331
5332         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5333         ui_out_emit_list, gdb::optional.
5334
5335 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5336
5337         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5338         prototype.
5339         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5340         prototype.
5341         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5342         prototype.
5343         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5344         * ada-exp.y: Remove _initialize_ada_exp prototype.
5345         * ada-lang.c: Remove _initialize_ada_language prototype.
5346         * ada-tasks.c: Remove _initialize_tasks prototype.
5347         * addrmap.c: Remove _initialize_addrmap prototype.
5348         * agent.c: Remove _initialize_agent prototype.
5349         * aix-thread.c: Remove _initialize_aix_thread prototype.
5350         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5351         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5352         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5353         prototype.
5354         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5355         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5356         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5357         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5358         prototype.
5359         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5360         prototype.
5361         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5362         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5363         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5364         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5365         prototype.
5366         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5367         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5368         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5369         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5370         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5371         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5372         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5373         prototype.
5374         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5375         prototype.
5376         * annotate.c: Remove _initialize_annotate prototype.
5377         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5378         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5379         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5380         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5381         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5382         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5383         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5384         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5385         prototype.
5386         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5387         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5388         * auto-load.c: Remove _initialize_auto_load prototype.
5389         * auxv.c: Remove _initialize_auxv prototype.
5390         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5391         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5392         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5393         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5394         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5395         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5396         prototype.
5397         * break-catch-throw.c: Remove _initialize_break_catch_throw
5398         prototype.
5399         * breakpoint.c: Remove _initialize_breakpoint prototype.
5400         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5401         * btrace.c: Remove _initialize_btrace prototype.
5402         * charset.c: Remove _initialize_charset prototype.
5403         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5404         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5405         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5406         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5407         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5408         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5409         * coffread.c: Remove _initialize_coffread prototype.
5410         * compile/compile.c: Remove _initialize_compile prototype.
5411         * complaints.c: Remove _initialize_complaints prototype.
5412         * completer.c: Remove _initialize_completer prototype.
5413         * copying.awk: Remove _initialize_copying prototype.
5414         * copying.c: Regenerate.
5415         * core-regset.c: Remove _initialize_core_regset prototype.
5416         * corefile.c: Remove _initialize_core prototype.
5417         * corelow.c: Remove _initialize_corelow prototype.
5418         * cp-abi.c: Remove _initialize_cp_abi prototype.
5419         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5420         * cp-support.c: Remove _initialize_cp_support prototype.
5421         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5422         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5423         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5424         * ctf.c: Remove _initialize_ctf prototype.
5425         * d-lang.c: Remove _initialize_d_language prototype.
5426         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5427         prototype.
5428         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5429         * dbxread.c: Remove _initialize_dbxread prototype.
5430         * dcache.c: Remove _initialize_dcache prototype.
5431         * demangle.c: Remove _initialize_demangler prototype.
5432         * disasm-selftests.c: Remove _initialize_disasm_selftests
5433         prototype.
5434         * disasm.c: Remove _initialize_disasm prototype.
5435         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5436         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5437         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5438         prototype.
5439         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5440         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5441         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5442         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5443         * elfread.c: Remove _initialize_elfread prototype.
5444         * exec.c: Remove _initialize_exec prototype.
5445         * extension.c: Remove _initialize_extension prototype.
5446         * f-lang.c: Remove _initialize_f_language prototype.
5447         * f-valprint.c: Remove _initialize_f_valprint prototype.
5448         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5449         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5450         * filesystem.c: Remove _initialize_filesystem prototype.
5451         * findcmd.c: Remove _initialize_mem_search prototype.
5452         * fork-child.c: Remove _initialize_fork_child prototype.
5453         * frame-base.c: Remove _initialize_frame_base prototype.
5454         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5455         * frame.c: Remove _initialize_frame prototype.
5456         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5457         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5458         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5459         * gcore.c: Remove _initialize_gcore prototype.
5460         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5461         * gdbarch.c: Regenerate.
5462         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5463         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5464         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5465         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5466         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5467         * go-lang.c: Remove _initialize_go_language prototype.
5468         * go32-nat.c: Remove _initialize_go32_nat prototype.
5469         * guile/guile.c: Remove _initialize_guile prototype.
5470         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5471         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5472         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5473         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5474         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5475         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5476         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5477         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5478         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5479         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5480         prototype.
5481         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5482         prototype.
5483         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5484         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5485         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5486         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5487         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5488         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5489         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5490         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5491         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5492         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5493         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5494         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5495         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5496         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5497         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5498         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5499         prototype.
5500         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5501         prototype.
5502         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5503         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5504         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5505         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5506         * infcall.c: Remove _initialize_infcall prototype.
5507         * infcmd.c: Remove _initialize_infcmd prototype.
5508         * inferior.c: Remove _initialize_inferiors prototype.
5509         * inflow.c: Remove _initialize_inflow prototype.
5510         * infrun.c: Remove _initialize_infrun prototype.
5511         * interps.c: Remove _initialize_interpreter prototype.
5512         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5513         * jit.c: Remove _initialize_jit prototype.
5514         * language.c: Remove _initialize_language prototype.
5515         * linux-fork.c: Remove _initialize_linux_fork prototype.
5516         * linux-nat.c: Remove _initialize_linux_nat prototype.
5517         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5518         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5519         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5520         * m2-lang.c: Remove _initialize_m2_language prototype.
5521         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5522         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5523         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5524         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5525         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5526         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5527         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5528         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5529         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5530         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5531         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5532         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5533         * machoread.c: Remove _initialize_machoread prototype.
5534         * macrocmd.c: Remove _initialize_macrocmd prototype.
5535         * macroscope.c: Remove _initialize_macroscope prototype.
5536         * maint.c: Remove _initialize_maint_cmds prototype.
5537         * mdebugread.c: Remove _initialize_mdebugread prototype.
5538         * memattr.c: Remove _initialize_mem prototype.
5539         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5540         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5541         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5542         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5543         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5544         * microblaze-linux-tdep.c: Remove
5545         _initialize_microblaze_linux_tdep prototype.
5546         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5547         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5548         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5549         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5550         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5551         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5552         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5553         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5554         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5555         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5556         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5557         prototype.
5558         * mipsread.c: Remove _initialize_mipsread prototype.
5559         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5560         prototype.
5561         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5562         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5563         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5564         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5565         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5566         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5567         prototype.
5568         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5569         * nto-procfs.c: Remove _initialize_procfs prototype.
5570         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5571         * objc-lang.c: Remove _initialize_objc_language prototype.
5572         * objfiles.c: Remove _initialize_objfiles prototype.
5573         * observer.c: Remove observer_test_first_notification_function,
5574         observer_test_second_notification_function,
5575         observer_test_third_notification_function, and
5576         _initialize_observer prototypes.
5577         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5578         * osabi.c: Remove _initialize_gdb_osabi prototype.
5579         * osdata.c: Remove _initialize_osdata prototype.
5580         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5581         * parse.c: Remove _initialize_parse prototype.
5582         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5583         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5584         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5585         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5586         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5587         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5588         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5589         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5590         * printcmd.c: Remove _initialize_printcmd prototype.
5591         * probe.c: Remove _initialize_probe prototype.
5592         * proc-api.c: Remove _initialize_proc_api prototype.
5593         * proc-events.c: Remove _initialize_proc_events prototype.
5594         * proc-service.c: Remove _initialize_proc_service prototype.
5595         * procfs.c: Remove _initialize_procfs prototype.
5596         * psymtab.c: Remove _initialize_psymtab prototype.
5597         * python/python.c: Remove _initialize_python prototype.
5598         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5599         * record-btrace.c: Remove _initialize_record_btrace prototype.
5600         * record-full.c: Remove _initialize_record_full prototype.
5601         * record.c: Remove _initialize_record prototype.
5602         * regcache.c: Remove _initialize_regcache prototype.
5603         * reggroups.c: Remove _initialize_reggroup prototype.
5604         * remote-notif.c: Remove _initialize_notif prototype.
5605         * remote-sim.c: Remove _initialize_remote_sim prototype.
5606         * remote.c: Remove _initialize_remote prototype.
5607         * reverse.c: Remove _initialize_reverse prototype.
5608         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5609         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5610         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5611         prototype.
5612         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5613         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5614         * rust-exp.y: Remove _initialize_rust_exp prototype.
5615         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5616         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5617         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5618         * score-tdep.c: Remove _initialize_score_tdep prototype.
5619         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5620         prototype.
5621         * ser-go32.c: Remove _initialize_ser_dos prototype.
5622         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5623         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5624         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5625         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5626         * serial.c: Remove _initialize_serial prototype.
5627         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5628         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5629         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5630         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5631         * skip.c: Remove _initialize_step_skip prototype.
5632         * sol-thread.c: Remove _initialize_sol_thread prototype.
5633         * solib-aix.c: Remove _initialize_solib_aix prototype.
5634         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5635         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5636         * solib-frv.c: Remove _initialize_frv_solib prototype.
5637         * solib-spu.c: Remove _initialize_spu_solib prototype.
5638         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5639         * solib-target.c: Remove _initialize_solib_target prototype.
5640         * solib.c: Remove _initialize_solib prototype.
5641         * source.c: Remove _initialize_source prototype.
5642         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5643         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5644         prototype.
5645         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5646         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5647         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5648         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5649         prototype.
5650         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5651         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5652         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5653         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5654         prototype.
5655         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5656         prototype.
5657         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5658         prototype.
5659         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5660         prototype.
5661         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5662         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5663         prototype.
5664         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5665         prototype.
5666         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5667         prototype.
5668         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5669         prototype.
5670         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5671         prototype.
5672         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5673         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5674         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5675         * stabsread.c: Remove _initialize_stabsread prototype.
5676         * stack.c: Remove _initialize_stack prototype.
5677         * stap-probe.c: Remove _initialize_stap_probe prototype.
5678         * std-regs.c: Remove _initialize_frame_reg prototype.
5679         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5680         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5681         * symfile.c: Remove _initialize_symfile prototype.
5682         * symmisc.c: Remove _initialize_symmisc prototype.
5683         * symtab.c: Remove _initialize_symtab prototype.
5684         * target-dcache.c: Remove _initialize_target_dcache prototype.
5685         * target-descriptions.c: Remove _initialize_target_descriptions
5686         prototype.
5687         * thread.c: Remove _initialize_thread prototype.
5688         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5689         prototype.
5690         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5691         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5692         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5693         prototype.
5694         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5695         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5696         * tracefile.c: Remove _initialize_tracefile prototype.
5697         * tracepoint.c: Remove _initialize_tracepoint prototype.
5698         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5699         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5700         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5701         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5702         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5703         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5704         * tui/tui.c: Remove _initialize_tui prototype.
5705         * typeprint.c: Remove _initialize_typeprint prototype.
5706         * user-regs.c: Remove _initialize_user_regs prototype.
5707         * utils.c: Remove _initialize_utils prototype.
5708         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5709         * valarith.c: Remove _initialize_valarith prototype.
5710         * valops.c: Remove _initialize_valops prototype.
5711         * valprint.c: Remove _initialize_valprint prototype.
5712         * value.c: Remove _initialize_values prototype.
5713         * varobj.c: Remove _initialize_varobj prototype.
5714         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5715         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5716         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5717         * windows-nat.c: Remove _initialize_windows_nat,
5718         _initialize_check_for_gdb_ini, and _initialize_loadable
5719         prototypes.
5720         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5721         * xcoffread.c: Remove _initialize_xcoffread prototype.
5722         * xml-support.c: Remove _initialize_xml_support prototype.
5723         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5724         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5725         prototype.
5726         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5727         prototype.
5728         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5729
5730 2017-09-08  Keith Seitz  <keiths@redhat.com>
5731
5732         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5733         field.
5734
5735 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5736
5737         * f-valprint.c (f_val_print): Remove check for one byte
5738         sized integers. Remove printing of character type.
5739
5740 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5741             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5742             Bernhard Heckel  <bernhard.heckel@intel.com>
5743
5744         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5745         to maintain proper indentation when printing pointers/refs.
5746
5747 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5748
5749         GDB 8.0.1 released.
5750
5751 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5752
5753         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5754
5755 2017-09-05  Tom Tromey  <tom@tromey.com>
5756
5757         * parse.c (funcall_chain): Now a std::vector.
5758         (start_arglist, end_arglist): Simplify.
5759         (free_funcalls): Remove.
5760         (parse_exp_in_context_1): Remove cleanup.
5761
5762 2017-09-05  Tom Tromey  <tom@tromey.com>
5763
5764         * go-exp.y (go_parse): Don't create a cleanup.
5765
5766 2017-09-05  Tom Tromey  <tom@tromey.com>
5767
5768         * d-exp.y (PrimaryExpression): Use std::string.
5769         (d_parse): Don't create a cleanup.
5770
5771 2017-09-05  Tom Tromey  <tom@tromey.com>
5772
5773         * utils.c (do_clear_parser_state): Remove.
5774         (make_cleanup_clear_parser_state): Remove.
5775         * p-exp.y (pascal_parse): Use scoped_restore.
5776         * m2-exp.y (m2_parse): Use scoped_restore.
5777         * f-exp.y (f_parse): Use scoped_restore.
5778         * d-exp.y (d_parse): Use scoped_restore.
5779         * c-exp.y (c_parse): Use scoped_restore.
5780         * ada-exp.y (ada_parse): Use scoped_restore.
5781         * utils.h (make_cleanup_clear_parser_state): Remove.
5782
5783 2017-09-06  Keith Seitz  <keiths@redhat.com>
5784
5785         * dwarf2read.c (dw2_linkage_name_attr): New function.
5786         (dw2_linkage_name): New function.
5787         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5788         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5789         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5790
5791 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5792
5793         * config/djgpp/djconfig.sh: Correct shell portability issue.
5794
5795 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5796
5797         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5798
5799 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5800
5801         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5802         * NEWS: Mention new FreeBSD/mips native configuration.
5803         * configure.host: Add aarch64*-*-freebsd*.
5804         * configure.nat: Likewise.
5805         * aarch64-fbsd-nat.c: New file.
5806
5807 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5808
5809         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5810         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5811         * NEWS: Mention new FreeBSD/aarch64 target.
5812         * configure.tgt: Add aarch64*-*-freebsd*.
5813         * aarch64-fbsd-tdep.c: New file.
5814         * aarch64-fbsd-tdep.h: New file.
5815
5816 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5817
5818         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5819
5820 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5821
5822         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5823         of TLS symbols.
5824
5825 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5826
5827         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5828         call.
5829
5830 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5831
5832         * infrun.c (follow_exec): Call add_thread after
5833         target_find_description.
5834
5835 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5836
5837         * infrun.c (handle_inferior_event_1): When exec'ing, read
5838         stop_pc after follow_exec.
5839
5840 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5841
5842         * remote.c (process_g_packet): Update error message.
5843
5844 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5845
5846         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5847         targets.
5848
5849 2017-09-05  Pedro Alves  <palves@redhat.com>
5850
5851         * eval.c (eval_call, evaluate_funcall): New functions, factored
5852         out from ...
5853         (evaluate_subexp_standard): ... this.
5854
5855 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5856
5857         * amd64-tdep.c (amd64_target_description): Create target
5858         descriptions.
5859         (_initialize_amd64_tdep): Don't call functions
5860         initialize_tdesc_amd64_*.  Add self tests.
5861         * arch/amd64.c (amd64_create_target_description): Add parameter
5862         is_linux.  Call set_tdesc_osabi if is_linux is true.
5863         * arch/amd64.h (amd64_create_target_description): Update the
5864         declaration.
5865         * arch/i386.c (i386_create_target_description): Add parameter
5866         is_linux.  Call set_tdesc_osabi if is_linux is true.
5867         * arch/i386.h (i386_create_target_description): Update
5868         declaration.
5869         * configure.tgt: Add i386.o to gdb_target_obs.
5870         * features/Makefile (XMLTOC): Remove i386/*.xml.
5871         * features/i386/amd64-avx-avx512.c: Remove.
5872         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5873         * features/i386/amd64-avx-mpx.c: Remove.
5874         * features/i386/amd64-avx.c: Remove.
5875         * features/i386/amd64-mpx.c: Remove.
5876         * features/i386/amd64.c: Remove.
5877         * features/i386/i386-avx-avx512.c: Remove.
5878         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5879         * features/i386/i386-avx-mpx.c: Remove.
5880         * features/i386/i386-avx.c: Remove.
5881         * features/i386/i386-mmx.c: Remove.
5882         * features/i386/i386-mpx.c: Remove.
5883         * features/i386/i386.c: Remove.
5884         * i386-tdep.c: Don't include features/i386/i386*.c., include
5885         target-descriptions.h and arch/i386.h.
5886         (i386_target_description): Create target descriptions.
5887         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5888         functions.  Do self tests.
5889
5890 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5891
5892         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5893         * features/i386/amd64-avx-avx512-linux.c: Removed.
5894         * features/i386/amd64-avx-linux.c: Removed.
5895         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5896         * features/i386/amd64-avx-mpx-linux.c: Removed.
5897         * features/i386/amd64-linux.c: Removed.
5898         * features/i386/amd64-mpx-linux.c: Removed.
5899         * features/i386/x32-avx-avx512-linux.c: Removed.
5900         * features/i386/x32-avx-linux.c: Removed.
5901         * features/i386/x32-linux.c: Removed.
5902
5903 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5904
5905         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5906         features/i386/*.c.
5907         (amd64_linux_read_description): Call
5908         amd64_create_target_description.
5909         * arch/amd64.c: New file.
5910         * arch/amd64.h: New file.
5911         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5912         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5913
5914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5915
5916         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5917         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5918         (amd64_linux_read_description): Create target descriptions.
5919         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5920         functions.  Add unit tests.
5921         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5922         x32-core.xml.
5923         * features/i386/64bit-avx.c: Generated.
5924         * features/i386/64bit-avx512.c: Generated.
5925         * features/i386/64bit-core.c: Generated.
5926         * features/i386/64bit-linux.c: Generated.
5927         * features/i386/64bit-mpx.c: Generated.
5928         * features/i386/64bit-pkeys.c: Generated.
5929         * features/i386/64bit-segments.c: Generated.
5930         * features/i386/64bit-sse.c: Generated.
5931         * features/i386/x32-core.c: Generated.
5932         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5933         c files for amd64-linux and x32-linux.
5934
5935 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5936
5937         * amd64-linux-tdep.c (amd64_linux_read_description): New
5938         function.
5939         (amd64_linux_core_read_description): Call
5940         amd64_linux_read_description.
5941         (amd64_linux_init_abi): Likewise.
5942         (amd64_x32_linux_init_abi): Likewise.
5943         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5944         * x86-linux-nat.c (x86_linux_read_description): Call
5945         amd64_linux_read_description.
5946
5947 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5948
5949         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5950         comments.
5951
5952 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5953
5954         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5955         * features/i386/i386-avx-avx512-linux.c: Remove.
5956         * features/i386/i386-avx-linux.c: Remove.
5957         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5958         * features/i386/i386-avx-mpx-linux.c: Remove.
5959         * features/i386/i386-linux.c: Remove.
5960         * features/i386/i386-mmx-linux.c: Remove.
5961         * features/i386/i386-mpx-linux.c: Remove.
5962
5963 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5964
5965         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5966         (SFILES): Add arch/i386.c.
5967         (HFILES_NO_SRCDIR): Add arch/i386.h.
5968         * arch/i386.c: New file.
5969         * arch/i386.h: New file.
5970         * arch/tdesc.h (allocate_target_description): Declare.
5971         (set_tdesc_architecture): Declare.
5972         (set_tdesc_osabi): Declare.
5973         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5974         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5975         include arch/i386.h.
5976         (i386_linux_read_description): Remove code and call
5977         i386_create_target_description.
5978         (set_tdesc_architecture): New function.
5979         (set_tdesc_osabi): New function.
5980         * target-descriptions.h (allocate_target_description): Remove.
5981
5982 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5983
5984         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5985         * target-descriptions.c (tdesc_create_feature): Likewise, and
5986         adjust code.
5987         * features/i386/32bit-avx.c: Re-generated.
5988         * features/i386/32bit-avx512.c: Re-generated.
5989         * features/i386/32bit-core.c: Re-generated.
5990         * features/i386/32bit-linux.c: Re-generated.
5991         * features/i386/32bit-mpx.c: Re-generated.
5992         * features/i386/32bit-pkeys.c: Re-generated.
5993         * features/i386/32bit-sse.c: Re-generated.
5994
5995 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5996
5997         * regformats/regdef.h (struct reg): Override operator == and !=.
5998
5999 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6000
6001         * arch/tdesc.h: New file.
6002         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6003         * target-descriptions.c: Update comments.
6004         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6005         declarations.
6006         * features/i386/32bit-avx.c: Re-generated.
6007         * features/i386/32bit-avx512.c: Re-generated.
6008         * features/i386/32bit-core.c: Re-generated.
6009         * features/i386/32bit-linux.c: Re-generated.
6010         * features/i386/32bit-mpx.c: Re-generated.
6011         * features/i386/32bit-pkeys.c: Re-generated.
6012         * features/i386/32bit-sse.c: Re-generated.
6013
6014 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6015
6016         * regformats/regdat.sh: Update generated code.
6017
6018 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6019
6020         * regformats/regdat.sh: Adjust code order.
6021
6022 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6023
6024         * expprint.c (dump_subexp_body_standard): Use constant format
6025         string in fprintf_filtered call.
6026
6027 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6028
6029         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6030         NetBSD/i386.
6031         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6032
6033 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6034
6035         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6036
6037 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6038
6039         * bsd-kvm.o: Define _KMEMUSER.
6040         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6041         * configure: Regenerate.
6042
6043 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6044
6045         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6046         * i386-fbsd-nat.c: Likewise.
6047
6048 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6049
6050         * unittests/array-view-selftests.c: Add include of <array>.
6051
6052 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6053
6054         * spu-tdep.c (flush_ea_cache): Add missing argument to
6055         call_function_by_hand.
6056
6057 2017-09-04  Pedro Alves  <palves@redhat.com>
6058
6059         * NEWS (Safer support for debugging with no debug info): New.
6060
6061 2017-09-04  Pedro Alves  <palves@redhat.com>
6062
6063         * c-exp.y (function_method, function_method_void): Add current
6064         instance flags to TYPE_INSTANCE.
6065         * dwarf2read.c (check_modifier): New.
6066         (compute_delayed_physnames): Assert that only C++ adds delayed
6067         physnames.  Mark fn_fields as const/volatile depending on
6068         physname.
6069         * eval.c (make_params): New type_instance_flags parameter.  Use
6070         it as the new type's instance flags.
6071         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6072         flags element and pass it to make_params.
6073         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6074         instance flags element.
6075         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6076         * gdbtypes.h: Include "enum-flags.h".
6077         (type_instance_flags): New enum-flags type.
6078         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6079         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6080         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6081         (follow_type_instance_flags): New function.
6082         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6083         * parser-defs.h (follow_type_instance_flags): Declare.
6084         * valops.c (value_struct_elt_for_reference): const/volatile must
6085         match too.
6086
6087 2017-09-04  Pedro Alves  <palves@redhat.com>
6088
6089         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6090         function/method scopes; lookup the nested name as a function local
6091         static variable.
6092
6093 2017-09-04  Pedro Alves  <palves@redhat.com>
6094
6095         (%type <voidval>): Add function_method.
6096         * c-exp.y (exp): New production for calls with no arguments.
6097         (function_method, function_method_void_or_typelist): New
6098         productions.
6099         (exp): New production for "method()::static_var".
6100         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6101         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6102         Handle OP_FUNC_STATIC_VAR.
6103         * parse.c (operator_length_standard):
6104         Handle OP_FUNC_STATIC_VAR.
6105
6106 2017-09-04  Pedro Alves  <palves@redhat.com>
6107
6108         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6109         handling.
6110         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6111         Ditto.
6112         * parse.c (operator_length_standard, operator_check_standard):
6113         Ditto.
6114         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6115
6116 2017-09-04  Pedro Alves  <palves@redhat.com>
6117
6118         * ax-gdb.c: Include "typeprint.h".
6119         (gen_expr_for_cast): New function.
6120         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6121         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6122         type is unknown.
6123         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6124         nodebug_data_symbol.
6125         * eval.c: Include "typeprint.h".
6126         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6127         Error out if symbol has unknown type.
6128         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6129         evaluate_subexp_for_cast.
6130         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6131         OP_VAR_MSYM_VALUE.
6132         (evaluate_subexp_for_cast): New function.
6133         * gdbtypes.c (init_nodebug_var_type): New function.
6134         (objfile_type): Use it to initialize types of variables with no
6135         debug info.
6136         * typeprint.c (error_unknown_type): New.
6137         * typeprint.h (error_unknown_type): New declaration.
6138         * compile/compile-c-types.c (convert_type_basic): Handle
6139         TYPE_CODE_ERROR; warn and fallback to int for variables with
6140         unknown type.
6141
6142 2017-09-04  Pedro Alves  <palves@redhat.com>
6143
6144         * eval.c (evaluate_var_value): New function, factored out from ...
6145         (evaluate_subexp_standard): ... here.
6146
6147 2017-09-04  Pedro Alves  <palves@redhat.com>
6148
6149         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6150         Remove useless assignments to 'op'.
6151
6152 2017-09-04  Pedro Alves  <palves@redhat.com>
6153
6154         * eval.c (eval_skip_value): New function.
6155         (evaluate_subexp_standard): Use it.
6156
6157 2017-09-04  Pedro Alves  <palves@redhat.com>
6158
6159         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6160         function name from symbol/minsym and pass it to
6161         error_call_unknown_return_type.
6162
6163 2017-09-04  Pedro Alves  <palves@redhat.com>
6164
6165         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6166         * ax-gdb.c (gen_msym_var_ref): New function.
6167         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6168         * eval.c (evaluate_var_msym_value): New function.
6169         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6170         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6171         to call_function_by_hand.
6172         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6173         Handle OP_VAR_MSYM_VALUE.
6174         (union exp_element) <msymbol>: New field.
6175         * minsyms.h (struct type): Forward declare.
6176         (find_minsym_type_and_address): Declare.
6177         * parse.c (write_exp_elt_msym): New function.
6178         (write_exp_msymbol): Delete, refactored as ...
6179         (find_minsym_type_and_address): ... this new function.
6180         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6181         (operator_length_standard, operator_check_standard): Handle
6182         OP_VAR_MSYM_VALUE.
6183         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6184
6185 2017-09-04  Pedro Alves  <palves@redhat.com>
6186
6187         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6188         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6189         unknown.
6190         * ada-typeprint.c (print_func_type): Handle functions with unknown
6191         return type.
6192         * c-typeprint.c (c_type_print_base): Handle functions and methods
6193         with unknown return type.
6194         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6195         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6196         * compile/compile-c-types.c: Include "objfiles.h".
6197         (convert_func): For functions with unknown return type, warn and
6198         default to int.
6199         * compile/compile-object-run.c (compile_object_run): Adjust call
6200         to call_function_by_hand_dummy.
6201         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6202         call_function_by_hand.
6203         * eval.c (evaluate_subexp_standard): Adjust calls to
6204         call_function_by_hand.  Handle functions and methods with unknown
6205         return type.  Pass expect_type to call_function_by_hand.
6206         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6207         return type.
6208         * gcore.c (call_target_sbrk): Adjust call to
6209         call_function_by_hand.
6210         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6211         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6212         an integer address type instead of nodebug.
6213         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6214         call_function_by_hand.
6215         * infcall.c (error_call_unknown_return_type): New function.
6216         (call_function_by_hand): New "default_return_type" parameter.
6217         Pass it down.
6218         (call_function_by_hand_dummy): New "default_return_type"
6219         parameter.  Use it instead of defaulting to int.  If there's no
6220         default and the return type is unknown, throw an error.  If
6221         there's a default return type, and the called function has no
6222         debug info, then assume the function is prototyped.
6223         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6224         New "default_return_type" parameter.
6225         (error_call_unknown_return_type): New declaration.
6226         * linux-fork.c (call_lseek): Cast return type of lseek.
6227         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6228         call_function_by_hand.
6229         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6230         calls to call_function_by_hand.
6231         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6232         return type.
6233         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6234         (value_nsstring, print_object_command): Adjust calls to
6235         call_function_by_hand.
6236         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6237         functions with unknown return type.
6238         (pascal_type_print_func_varspec_suffix): New function.
6239         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6240         TYPE_CODE_METHOD>: Use it.
6241         * python/py-value.c (valpy_call): Adjust call to
6242         call_function_by_hand.
6243         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6244         call_function_by_hand.
6245         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6246         call_function_by_hand.
6247         * valops.c (value_allocate_space_in_inferior): Adjust call to
6248         call_function_by_hand.
6249         * typeprint.c (type_print_unknown_return_type): New function.
6250         * typeprint.h (type_print_unknown_return_type): New declaration.
6251
6252 2017-09-04  Pedro Alves  <palves@redhat.com>
6253
6254         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6255         types with more than one parameter as prototyped.
6256
6257 2017-09-04  Pedro Alves  <palves@redhat.com>
6258
6259         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6260         (disassemble_command): Use gdb_disassembly_flags instead of bare
6261         int.
6262         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6263         (dump_insns, do_mixed_source_and_assembly_deprecated)
6264         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6265         Use gdb_disassembly_flags instead of bare int.
6266         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6267         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6268         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6269         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6270         (enum gdb_disassembly_flag): ... values of this new enumeration.
6271         (gdb_disassembly_flags): Define.
6272         (gdb_disassembly)
6273         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6274         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6275         gdb_disassembly_flags instead of bare int.
6276         * record-btrace.c (btrace_insn_history)
6277         (record_btrace_insn_history, record_btrace_insn_history_range)
6278         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6279         instead of bare int.
6280         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6281         Use gdb_disassembly_flags instead of bare int.
6282         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6283         Define.
6284         * target-delegates.c: Regenerate.
6285         * target.c (target_insn_history, target_insn_history_from)
6286         (target_insn_history_range): Use gdb_disassembly_flags instead of
6287         bare int.
6288         * target.h: Include "disasm.h".
6289         (struct target_ops) <to_insn_history, to_insn_history_from,
6290         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6291         int.
6292         (target_insn_history, target_insn_history_from)
6293         (target_insn_history_range): Use gdb_disassembly_flags instead of
6294         bare int.
6295
6296 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6297
6298         * cli/cli-script.c (build_command_line): For if/while commands,
6299         check whether args is empty.
6300
6301 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6302
6303         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6304         (enum command_control_type): Likewise.
6305         (struct command_line): Likewise.
6306         (free_command_lines): Likewise.
6307         (struct command_lines_deleter): Likewise.
6308         (command_line_up): Likewise.
6309         (read_command_lines): Likewise.
6310         (read_command_lines_1): Likewise.
6311         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6312         (enum command_control_type): Likewise.
6313         (struct command_line): Likewise.
6314         (free_command_lines): Likewise.
6315         (struct command_lines_deleter): Likewise.
6316         (command_line_up): Likewise.
6317         (read_command_lines): Likewise.
6318         (read_command_lines_1): Likewise.
6319         * breakpoint.h: Include cli/cli-script.h.
6320         * extension-priv.h: Likewise.
6321         * gdbcmd.h: Likewise.
6322
6323 2017-09-04  Pedro Alves  <palves@redhat.com>
6324
6325         * ada-lang.c (is_known_support_routine): Move sal declaration to
6326         where it is initialized.
6327         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6328         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6329         (clear_command, update_static_tracepoint): Remove init_sal
6330         references.  Move declarations closer to initializations.
6331         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6332         initializations.
6333         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6334         references.  Move sal declarations closer to initializations.
6335         * frame.c (find_frame_sal): Return a symtab_and_line via function
6336         return instead of output parameter.  Remove init_sal references.
6337         * frame.h (find_frame_sal): Return a symtab_and_line via function
6338         return instead of output parameter.
6339         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6340         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6341         instead of memset.
6342         (gdbscm_find_pc_line): Remove init_sal reference.
6343         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6344         references.  Move declarations closer to initializations.
6345         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6346         initializations.
6347         (finish_backward): Remove init_sal references.  Move declarations
6348         closer to initializations.
6349         * infrun.c (process_event_stop_test, handle_step_into_function)
6350         (insert_hp_step_resume_breakpoint_at_frame)
6351         (insert_step_resume_breakpoint_at_caller): Likewise.
6352         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6353         (symbol_to_sal): Likewise.
6354         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6355         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6356         to its initialization.
6357         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6358         init_sal references.  Move declarations closer to initializations.
6359         * source.c (get_current_source_symtab_and_line): Remove brace
6360         initialization.
6361         (set_current_source_symtab_and_line): Now takes the sal by const
6362         reference.  Remove brace initialization.
6363         (line_info): Remove init_sal reference.
6364         * source.h (set_current_source_symtab_and_line): Now takes a
6365         symtab_and_line via const reference.
6366         * stack.c (set_current_sal_from_frame): Adjust.
6367         (print_frame_info): Adjust.
6368         (get_last_displayed_sal): Return the sal via function return
6369         instead of via output parameter.  Simplify.
6370         (frame_info): Adjust.
6371         * stack.h (get_last_displayed_sal): Return the sal via function
6372         return instead of via output parameter.
6373         * symtab.c (init_sal): Delete.
6374         (find_pc_sect_line): Remove init_sal references.  Move
6375         declarations closer to initializations.
6376         (find_function_start_sal): Remove init_sal references.  Move
6377         declarations closer to initializations.
6378         * symtab.h (struct symtab_and_line): In-class initialize all
6379         fields.
6380         * tracepoint.c (set_traceframe_context)
6381         (print_one_static_tracepoint_marker): Remove init_sal references.
6382         Move declarations closer to initializations.
6383         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6384         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6385         declarations closer to initializations.
6386         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6387         init_sal references.  Adjust.
6388
6389 2017-09-04  Pedro Alves  <palves@redhat.com>
6390
6391         * ax-gdb.c (agent_command_1): Use range-for.
6392         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6393         * breakpoint.c: Include "common/array-view.h".
6394         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6395         parameter from struct symtabs_and_lines to
6396         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6397         (breakpoint_sals_to_pc): Change sals parameter from struct
6398         symtabs_and_lines to std::vector reference.
6399         (check_fast_tracepoint_sals): Change sals parameter from struct
6400         symtabs_and_lines to std::array_view.  Use range-for.
6401         (decode_static_tracepoint_spec): Return a std::vector instead of
6402         symtabs_and_lines.  Update.
6403         (create_breakpoint): Update.
6404         (break_range_command, until_break_command, clear_command): Update.
6405         (base_breakpoint_decode_location, bkpt_decode_location)
6406         (bkpt_probe_create_sals_from_location)
6407         (bkpt_probe_decode_location, tracepoint_decode_location)
6408         (tracepoint_probe_decode_location)
6409         (strace_marker_create_sals_from_location): Return a std::vector
6410         instead of symtabs_and_lines.
6411         (strace_marker_create_breakpoints_sal): Update.
6412         (strace_marker_decode_location): Return a std::vector instead of
6413         symtabs_and_lines.  Update.
6414         (update_breakpoint_locations): Change struct symtabs_and_lines
6415         parameters to gdb::array_view.  Adjust.
6416         (location_to_sals): Return a std::vector instead of
6417         symtabs_and_lines.  Update.
6418         (breakpoint_re_set_default): Use std::vector instead of struct
6419         symtabs_and_lines.
6420         (decode_location_default): Return a std::vector instead of
6421         symtabs_and_lines.  Update.
6422         * breakpoint.h: Include "common/array-view.h".
6423         (struct breakpoint_ops) <decode_location>: Now returns a
6424         std::vector instead of returning a symtabs_and_lines via output
6425         parameter.
6426         (update_breakpoint_locations): Change sals parameters to use
6427         gdb::array_view.
6428         * cli/cli-cmds.c (edit_command, list_command): Update to use
6429         std::vector and gdb::array_view.
6430         (ambiguous_line_spec): Adjust to use gdb::array_view and
6431         range-for.
6432         (compare_symtabs): Rename to ...
6433         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6434         const reference and adjust.
6435         (filter_sals): Rewrite using std::vector and standard algorithms.
6436         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6437         (jump_command): Update to use std::vector.
6438         * linespec.c (struct linespec_state) <canonical_names>: Update
6439         comment.
6440         (add_sal_to_sals_basic): Delete.
6441         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6442         (decode_line_2, create_sals_line_offset)
6443         (convert_address_location_to_sals, convert_linespec_to_sals)
6444         (convert_explicit_location_to_sals, parse_linespec)
6445         (event_location_to_sals, decode_line_full, decode_line_1)
6446         (decode_line_with_current_source)
6447         (decode_line_with_last_displayed, decode_objc)
6448         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6449         (linespec_result::~linespec_result): Adjust to use std::vector
6450         instead of symtabs_and_lines.
6451         * linespec.h (linespec_sals::sals): Now a std::vector.
6452         (struct linespec_result): Use std::vector, bool, and in-class
6453         initialization.
6454         (decode_line_1, decode_line_with_current_source)
6455         (decode_line_with_last_displayed): Return std::vector.
6456         * macrocmd.c (info_macros_command): Use std::vector.
6457         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6458         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6459         std::vector.
6460         * probe.h (parse_probes): Return a std::vector.
6461         * python/python.c (gdbpy_decode_line): Use std::vector and
6462         gdb::array_view.
6463         * source.c (select_source_symtab, line_info): Use std::vector.
6464         * stack.c (func_command): Use std::vector.
6465         * symtab.h (struct symtabs_and_lines): Delete.
6466         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6467
6468 2017-09-04  Pedro Alves  <palves@redhat.com>
6469
6470         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6471         unittests/array-view-selftests.c.
6472         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6473         * common/array-view.h: New file.
6474         * unittests/array-view-selftests.c: New file.
6475
6476 2017-09-04  Pedro Alves  <palves@redhat.com>
6477
6478         * cli/cli-cmds.c (edit_command): Pass message to
6479         ambiguous_line_spec.
6480         (list_command): Pass message to ambiguous_line_spec.  Say
6481         "first"/"last" instead of "start" and "end" to be consistent with
6482         the manual.
6483         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6484         them to print formatted message.
6485
6486 2017-09-04  Pedro Alves  <palves@redhat.com>
6487
6488         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6489         ftrace_update_insns by reference instead of pointer.
6490
6491 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6492
6493         * i386-go32-tdep.c: Include x86-xstate.h.
6494         (i386_go32_init_abi): Call i386_target_description.
6495         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6496         if xcr0 is X86_XSTATE_X87_MASK.
6497         * i386-tdep.h (tdesc_i386): Remove the declaration.
6498         (tdesc_i386_mmx): Likewise.
6499
6500 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6501
6502         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6503         X86_XSTATE_SSE_MASK instead of 0.
6504
6505 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6506
6507         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6508         i386_target_description.
6509         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6510         i386_target_description.
6511         * i386-tdep.c (i386_gdbarch_init): Likewise.
6512
6513 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6514
6515         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6516         (x86_darwin_init_abi_64): Call amd64_target_description.
6517         * amd64-dicos-tdep.c: Likewise.
6518         * amd64-fbsd-nat.c: Likewise.
6519         * amd64-fbsd-tdep.c: Likewise.
6520         * amd64-nbsd-tdep.c: Likewise.
6521         * amd64-obsd-tdep.c: Likewise.
6522         * amd64-sol2-tdep.c: Likewise.
6523         * amd64-windows-tdep.c: Likewise.
6524         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6525
6526 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6527
6528         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6529         (btrace_function) <insn>: Change type to use std::vector.
6530         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6531         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6532         ftrace_update_insns, ftrace_compute_global_level_offset,
6533         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6534         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6535         change to std::vector.
6536         (ftrace_update_insns): Adjust to change to std::vector, change
6537         type of INSN parameter.
6538         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6539         * record-btrace.c (btrace_call_history_insn_range,
6540         btrace_compute_src_line_range,
6541         record_btrace_frame_prev_register): Adjust to change to
6542         std::vector.
6543         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6544         to change to std::vector.
6545
6546 2017-09-03  Tom Tromey  <tom@tromey.com>
6547
6548         * corefile.c (reopen_exec_file): Use std::string.
6549
6550 2017-09-03  Tom Tromey  <tom@tromey.com>
6551
6552         * compile/compile.c (compile_register_name_mangled): Return
6553         std::string.
6554         * compile/compile-loc2c.c (pushf_register_address): Update.
6555         (pushf_register): Update.
6556         * compile/compile-c-types.c (convert_array): Update.
6557         * compile/compile-c-symbols.c (generate_vla_size): Update.
6558         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6559         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6560         (convert_one_symbol): Update.
6561         (generate_c_for_for_one_variable): Update.
6562         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6563         std::string.
6564         (generate_register_struct): Update.
6565         * compile/compile-internal.h (c_get_range_decl_name): Return a
6566         std::string.
6567         (compile_register_name_mangled): Return std::string.
6568
6569 2017-09-03  Tom Tromey  <tom@tromey.com>
6570
6571         * utils.c (perror_string): Return a std::string.
6572         (throw_perror_with_name, perror_warning_with_name): Update.
6573
6574 2017-09-03  Tom Tromey  <tom@tromey.com>
6575
6576         * demangle.c (demangle_command): Use std::string,
6577         unique_xmalloc_ptr.
6578
6579 2017-09-03  Tom Tromey  <tom@tromey.com>
6580
6581         * cli/cli-setshow.c (do_set_command): Use std::string.
6582
6583 2017-09-03  Tom Tromey  <tom@tromey.com>
6584
6585         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6586
6587 2017-09-03  Tom Tromey  <tom@tromey.com>
6588
6589         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6590
6591 2017-09-03  Tom Tromey  <tom@tromey.com>
6592
6593         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6594         gdb::unique_xmalloc_ptr.
6595
6596 2017-09-03  Tom Tromey  <tom@tromey.com>
6597
6598         * thread.c (print_thread_info_1): Use string_printf.
6599         (thread_apply_command, thread_apply_all_command): Use
6600         std::string.
6601
6602 2017-09-03  Tom Tromey  <tom@tromey.com>
6603
6604         * valprint.c (val_print_string): Update.
6605         * gdbcore.h (memory_error_message): Return std::string.
6606         * corefile.c (memory_error_message): Return std::string.
6607         (memory_error): Update.
6608         * breakpoint.c (insert_bp_location): Update.
6609
6610 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6611
6612         * target/waitstatus.h (target_waitstatus_to_string): Change
6613         return type to std::string.
6614         * target/waitstatus.c (target_waitstatus_to_string): Return
6615         std::string.
6616         * target.h (target_waitstatus_to_string): Remove declaration.
6617         * infrun.c (resume, clear_proceed_status_thread,
6618         print_target_wait_results, do_target_wait, save_waitstatus,
6619         stop_all_threads): Adjust.
6620         * record-btrace.c (record_btrace_wait): Adjust.
6621         * target-debug.h
6622         (target_debug_print_struct_target_waitstatus_p): Adjust.
6623
6624 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6625
6626         PR gdb/22046
6627         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6628         detection.
6629
6630 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6631
6632         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6633         for setting/unsetting environment variables on the remote target.
6634         (New remote packets): Add entries for QEnvironmentHexEncoded,
6635         QEnvironmentUnset and QEnvironmentReset.
6636         * common/environ.c (gdb_environ::operator=): Extend method to
6637         handle m_user_set_env_list and m_user_unset_env_list.
6638         (gdb_environ::clear): Likewise.
6639         (match_var_in_string): Change type of first parameter from 'char
6640         *' to 'const char *'.
6641         (gdb_environ::set): Extend method to handle
6642         m_user_set_env_list and m_user_unset_env_list.
6643         (gdb_environ::unset): Likewise.
6644         (gdb_environ::clear_user_set_env): New method.
6645         (gdb_environ::user_set_envp): Likewise.
6646         (gdb_environ::user_unset_envp): Likewise.
6647         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6648         m_user_unset_env_list on move constructor/assignment.
6649         (unset): Add new default parameter 'update_unset_list = true'.
6650         (clear_user_set_env): New method.
6651         (user_set_envp): Likewise.
6652         (user_unset_envp): Likewise.
6653         (m_user_set_env_list): New std::set.
6654         (m_user_unset_env_list): Likewise.
6655         * common/rsp-low.c (hex2str): New function.
6656         (bin2hex): New overload for bin2hex function.
6657         * common/rsp-low.c (hex2str): New prototype.
6658         (str2hex): New overload prototype.
6659         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6660         QEnvironmentUnset and QEnvironmentReset.
6661         (remote_protocol_features): Add QEnvironmentHexEncoded,
6662         QEnvironmentUnset and QEnvironmentReset packets.
6663         (send_environment_packet): New function.
6664         (extended_remote_environment_support): Likewise.
6665         (extended_remote_create_inferior): Call
6666         extended_remote_environment_support.
6667         (_initialize_remote): Add QEnvironmentHexEncoded,
6668         QEnvironmentUnset and QEnvironmentReset packet configs.
6669         * unittests/environ-selftests.c (gdb_selftest_env_var):
6670         New variable.
6671         (test_vector_initialization): New function.
6672         (test_init_from_host_environ): Likewise.
6673         (test_reinit_from_host_environ): Likewise.
6674         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6675         Likewise.
6676         (test_unset_set_empty_vector): Likewise.
6677         (test_vector_clear): Likewise.
6678         (test_std_move): Likewise.
6679         (test_move_constructor):
6680         (test_self_move): Likewise.
6681         (test_set_unset_reset): Likewise.
6682         (run_tests): Rewrite in terms of the functions above.
6683
6684 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6685
6686         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6687         (adi_available): Use a temp variable of type CORE_ADDR as argument
6688         3 when calling target_auxv_search.
6689         (adi_normalize_address): Use masks and xor operators to calculate
6690         normalized address.
6691         (adi_read_versions, adi_write_versions, adi_print_versions)
6692         (do_examine, do_assign): Use paddress.
6693
6694 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6695
6696         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6697         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6698         out of loop and add supply of FIR.
6699         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6700         add collect of FIR.
6701
6702 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6703
6704         PR gdb/21827
6705         * cli/cli-script.c (define_command): Don't convert command name
6706         to lower case.
6707
6708 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6709
6710         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6711         Update all callers accordingly. Remove all code blocks handling
6712         the case where DISPP is not NULL.
6713
6714 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6715
6716         PR symtab/22003
6717         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6718         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6719         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6720
6721 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6722
6723         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6724         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6725         (read_comp_units_from_section): New parameter abbrev_section, use
6726         read_and_check_comp_unit_head, allocate signatured_type if needed.
6727         (create_all_comp_units): Update read_comp_units_from_section caller.
6728
6729 2017-08-23  Pedro Alves  <palves@redhat.com>
6730
6731         PR remote/21852
6732         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6733         to null_ptid and switch to thread without reading the registers
6734         after adding the inferior.
6735
6736 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6737
6738         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6739         compile-gcc.
6740         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6741         (compile_to_object): Implement compile_gcc.
6742         (_initialize_compile): Install "set compile-gcc".  Initialize
6743         compile_gcc.
6744
6745 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6746
6747         * compile/compile.c (compile_to_object): Conditionally call
6748         set_verbose.  Conditionally call compile or compile_v0.
6749
6750 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6751
6752         * sparc64-tdep.h: (adi_normalize_address): New export.
6753         * sparc-nat.h: (open_adi_tag_fd): New export.
6754         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6755         * sparc64-linux-tdep.c:
6756         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6757         (sparc64_linux_handle_segmentation_fault): New function.
6758         (sparc64_linux_init_abi): Register
6759         sparc64_linux_handle_segmentation_fault
6760         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6761         (sparc64_addr_bits_remove): New function.
6762         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6763         (MAX_PROC_NAME_SIZE): New macro.
6764         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6765         (sparc64adilist): New variable.
6766         (adi_proc_list): New variable.
6767         (find_adi_info): New function.
6768         (add_adi_info): New function.
6769         (get_adi_info_proc): New function.
6770         (get_adi_info): New function.
6771         (info_adi_command): New function.
6772         (read_maps_entry): New function.
6773         (adi_available): New function.
6774         (adi_normalize_address): New function.
6775         (adi_align_address): New function.
6776         (adi_convert_byte_count): New function.
6777         (adi_tag_fd): New function.
6778         (adi_is_addr_mapped): New function.
6779         (adi_read_versions): New function.
6780         (adi_write_versions): New function.
6781         (adi_print_versions): New function.
6782         (do_examine): New function.
6783         (do_assign): New function.
6784         (adi_examine_command): New function.
6785         (adi_assign_command): New function.
6786         (_initialize_sparc64_adi_tdep): New function.
6787
6788 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6789
6790         * breakpoint.c (breakpoints_info): Rename to ...
6791         (info_breakpoints_command): ... this.
6792         (watchpoints_info): Rename to ...
6793         (info_watchpoints_command): ... this.
6794         (tracepoints_info): Rename to ...
6795         (info_tracepoints_command): ... this.
6796         (_initialize_breakpoint): Adjust.
6797         * dcache.c (dcache_info): Rename to ...
6798         (info_display_command): ... this.
6799         (_initialize_dcache): Adjust.
6800         * frame.h (args_info): Rename to ...
6801         (info_args_command): ... this.
6802         (locals_info): Rename to ...
6803         (info_locals_command): ... this.
6804         * infcmd.c (nofp_registers_info): Rename to ...
6805         (info_registers_command): ... this.
6806         (float_info): Rename to ...
6807         (info_float_command): ... this.
6808         (program_info): Rename to ...
6809         (info_program_command): ... this.
6810         (all_registers_info): Rename to ...
6811         (info_all_registers_command): ... this.
6812         (vector_info): Rename to ...
6813         (info_vector_command): ... this.
6814         (float_info): Rename to ...
6815         (info_float_command): ... this.
6816         (_initialize_infcmd): Adjust.
6817         * inferior.h (term_info): Rename to ...
6818         (info_terminal_command): ... this.
6819         * inflow.c (term_info): Rename to ...
6820         (info_terminal_command): ... this.
6821         (_initialize_inflow): Adjust.
6822         * infrun.c (signals_info): Rename to ...
6823         (info_signals_command): ... this.
6824         (_initialize_infrun): Adjust.
6825         * objc-lang.c (classes_info): Rename to ...
6826         (info_classes_command): ... this.
6827         (selectors_info): Rename to ...
6828         (info_selectors_command): ... this.
6829         (_initialize_objc_language): Adjust.
6830         * printcmd.c (sym_info): Rename to ...
6831         (info_symbol_command): ... this.
6832         (address_info): Rename to ...
6833         (info_address_command): ... this.
6834         (display_info): Rename to ...
6835         (info_display_command): ... this.
6836         (_initialize_printcmd): Adjust.
6837         * reverse.c (bookmarks_info): Rename to ...
6838         (info_breakpoints_command): ... this.
6839         (_initialize_reverse): Adjust.
6840         * ser-go32.c (dos_info): Rename to ...
6841         (info_serial_command): ... this.
6842         (_initialize_ser_dos): Adjust.
6843         * skip.c (skip_info): Rename to ...
6844         (info_skip_command): ... this.
6845         (_initialize_step_skip): Adjust.
6846         * source.c (line_info): Rename to ...
6847         (info_line_command): ... this.
6848         (source_info): Rename to ...
6849         (info_source_command)
6850         * stack.c (frame_info): Rename to ...
6851         (info_frame_command): ... this.
6852         (locals_info): Rename to ...
6853         (info_locals_command): ... this.
6854         (args_info): Rename to ...
6855         (info_args_command): ... this.
6856         (_initialize_stack): Adjust.
6857         * symtab.c (sources_info): Rename to ...
6858         (info_sources_command): ... this.
6859         (variables_info): Rename to ...
6860         (info_variables_command): ... this.
6861         (functions_info): Rename to ...
6862         (info_functions_command): ... this.
6863         (types_info): Rename to ...
6864         (info_types_command): ... this.
6865         (_initialize_symtab): Adjust.
6866         * target.c (target_info): Rename to ...
6867         (info_target_command): ... this.
6868         (initialize_targets): Adjust.
6869         * tracepoint.c (tvariables_info): Rename to ...
6870         (info_tvariables_command): ... this.
6871         (scope_info): Rename to ...
6872         (info_scope_command): ... this.
6873         (trace_dump_actions): Adjust.
6874         (_initialize_tracepoint): Adjust.
6875
6876 2017-08-22  Tom Tromey  <tom@tromey.com>
6877
6878         * breakpoint.h (install_breakpoint): Update.
6879         * breakpoint.c (add_solib_catchpoint): Update.
6880         (install_breakpoint): Change argument to a std::unique_ptr.
6881         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6882         (create_breakpoint_sal, create_breakpoint): Update.
6883         (watch_command_1, catch_exec_command_1)
6884         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6885         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6886         Return the breakpoint.
6887         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6888         (new_single_step_breakpoint): Update.
6889         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6890         std::unique_ptr.
6891         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6892         std::unique_ptr.
6893         * break-catch-sig.c (create_signal_catchpoint): Use
6894         std::unique_ptr.
6895         * ada-lang.c (create_ada_exception_catchpoint): Use
6896         std::unique_ptr.
6897
6898 2017-08-22  Tom Tromey  <tom@tromey.com>
6899
6900         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6901
6902 2017-08-22  Tom Tromey  <tom@tromey.com>
6903
6904         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6905         (lookup_partial_symbol): Update.
6906
6907 2017-08-22  Tom Tromey  <tom@tromey.com>
6908
6909         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6910         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6911         (find_and_open_source, symtab_to_fullname): Update.
6912         * psymtab.c (psymtab_to_fullname): Update.
6913
6914 2017-08-22  Tom Tromey  <tom@tromey.com>
6915
6916         * exec.c (exec_file_attach): Update.
6917         * linux-thread-db.c (try_thread_db_load): Update.
6918         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6919         * utils.c (gdb_realpath): Change return type.
6920         (gdb_realpath_keepfile): Update.
6921         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6922         (_initialize_utils): Register the new self test.
6923         * source.c (openp): Update.
6924         (find_and_open_source): Update.
6925         * nto-tdep.c (nto_find_and_open_solib): Update.
6926         * main.c (set_gdb_data_directory): Update.
6927         (captured_main_1): Update.
6928         * dwarf2read.c (dwarf2_get_dwz_file): Update
6929         (dw2_map_symbol_filenames): Update.
6930         * auto-load.c (auto_load_safe_path_vec_update): Update.
6931         (filename_is_in_auto_load_safe_path_vec): Change type of
6932         "filename_realp".
6933         (auto_load_objfile_script): Update.
6934         (file_is_auto_load_safe): Update.  Use std::string.
6935         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6936
6937 2017-08-22  Tom Tromey  <tom@tromey.com>
6938
6939         * utils.c (gdb_realpath_keepfile): Return a
6940         gdb::unique_xmalloc_ptr.
6941         * exec.c (exec_file_attach): Update.
6942         * utils.h (gdb_realpath_keepfile): Return a
6943         gdb::unique_xmalloc_ptr.
6944
6945 2017-08-22  Tom Tromey  <tom@tromey.com>
6946
6947         * compile/compile.c (compile_file_command): Use
6948         gdb::unique_xmalloc_ptr, std::string.
6949         * utils.c (gdb_abspath): Change return type.
6950         * source.c (openp): Update.
6951         * objfiles.c (allocate_objfile): Update.
6952         * main.c (set_gdb_data_directory): Update.
6953         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6954
6955 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6956
6957         * cli-cmds.c (list_commands): List actual code around more than
6958         one location.
6959
6960 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6961
6962         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6963
6964 2017-08-21  Pedro Alves  <palves@redhat.com>
6965
6966         PR gdb/19487
6967         * c-exp.y (variable production): Handle function aliases.
6968         * minsyms.c (msymbol_is_text): New function.
6969         * minsyms.h (msymbol_is_text): Declare.
6970         * symtab.c (find_function_alias_target): New function.
6971         * symtab.h (find_function_alias_target): Declare.
6972
6973 2017-08-21  Pedro Alves  <palves@redhat.com>
6974
6975         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6976         typedefs.
6977         * typeprint.c (whatis_exp): If handling "whatis", and expression
6978         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6979         typedefs here.
6980         * valops.c (value_cast): Save "to" type before resolving
6981         stubs/typedefs.  Use that type as resulting value's type.
6982
6983 2017-08-18  Tom Tromey  <tom@tromey.com>
6984             Pedro Alves  <palves@redhat.com>
6985
6986         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6987         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6988         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6989         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6990         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6991         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6992         (linux_get_siginfo_data): Add "thread" argument.  Use
6993         scoped_restore.
6994         * linux-nat.c (linux_child_follow_fork)
6995         (check_stopped_by_watchpoint): Use scoped_restore.
6996         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6997         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6998         (restore_inferior_ptid, save_inferior_ptid): Remove.
6999         * btrace.c (btrace_fetch): Use scoped_restore.
7000         * bsd-uthread.c (bsd_uthread_fetch_registers)
7001         (bsd_uthread_store_registers): Use scoped_restore.
7002         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7003         scoped_restore.
7004         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7005         (aix_thread_xfer_partial): Use scoped_restore.
7006         * inferior.h (save_inferior_ptid): Remove.
7007
7008 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7009
7010         PR tdep/21818
7011         * arm-tdep.c (gdb_print_insn_arm): Mark
7012         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7013
7014 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7015
7016         * NEWS: Mention GDBserver's new option "--selftest".
7017         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7018         * selftest.c: Move it to common/selftest.c.
7019         * selftest.h: Move it to common/selftest.h.
7020         * selftest-arch.c (reset): New function.
7021         (tests_with_arch): Call reset.
7022
7023 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7024
7025         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7026         instead of exception_fprintf and printf_filtered.
7027
7028 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7029
7030         * selftest.c (register_self_test): Rename it to
7031         selftests::register_test.
7032         (run_self_tests): selftest::run_tests.
7033         * selftest.h: Update declarations.
7034         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7035         selftests::register_test_foreach_arch.
7036         * selftest-arch.h: Update declaration.
7037         * aarch64-tdep.c: Update.
7038         * arm-tdep.c: Likewise.
7039         * disasm-selftests.c: Likewise.
7040         * dwarf2loc.c: Likewise.
7041         * dwarf2-frame.c: Likewise.
7042         * findvar.c: Likewise.
7043         * gdbarch-selftests.c: Likewise.
7044         * maint.c (maintenance_selftest): Likewise.
7045         * regcache.c: Likewise.
7046         * rust-exp.y: Likewise.
7047         * selftest-arch.c: Likewise.
7048         * unittests/environ-selftests.c: Likewise.
7049         * unittests/function-view-selftests.c: Likewise.
7050         * unittests/offset-type-selftests.c: Likewise.
7051         * unittests/optional-selftests.c: Likewise.
7052         * unittests/scoped_restore-selftests.c: Likewise.
7053         * utils-selftests.c: Likewise.
7054
7055 2017-08-17  Pedro Alves  <palves@redhat.com>
7056
7057         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7058         local.
7059
7060 2017-08-17  Pedro Alves  <palves@redhat.com>
7061
7062         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7063         field.
7064         (reset_die_in_process): Delete, replaced by ...
7065         (process_die_scope): ... this new class.  Make it responsible for
7066         freeing cu->line_header too.
7067         (process_die): Use process_die_scope.
7068         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7069         cu->line_header_die_owner.  Don't release the line header if it's
7070         owned by the CU.
7071         (setup_type_unit_groups): Make the CU/DIE own the line header.
7072         Don't release the line header here.
7073
7074 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7075
7076         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7077
7078 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7079
7080         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7081         Single-Key mode
7082
7083 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7084
7085         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7086         mode command list.
7087
7088 2017-08-15  Stafford Horne  <shorne@gmail.com>
7089
7090         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7091
7092 2017-08-15  Stafford Horne  <shorne@gmail.com>
7093
7094         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7095
7096 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7097
7098         PR gdb/21954
7099         * infcmd.c (unset_environment_command): Use the 'clear' method on
7100         the environment instead of resetting it.
7101
7102 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7103
7104         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7105         platforms.
7106
7107 2017-08-14  Tom Tromey  <tom@tromey.com>
7108
7109         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7110         (print_binary_chars): Likewise.
7111         (BITS_IN_BYTES): Remove.
7112
7113 2017-08-14  Tom Tromey  <tom@tromey.com>
7114
7115         PR gdb/21675
7116         * valprint.c (LOW_ZERO): Change value to 034.
7117         (print_octal_chars): Add static_asserts for octal constants.
7118         * printcmd.c (print_scalar_formatted): Add 'd' case.
7119
7120 2017-08-11  Tom Tromey  <tom@tromey.com>
7121
7122         * symfile.c (add_symbol_file_command): Use std::vector.
7123
7124 2017-08-14  Tom Tromey  <tom@tromey.com>
7125
7126         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7127         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7128         std::move.
7129         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7130
7131 2017-08-11  Pedro Alves  <palves@redhat.com>
7132
7133         * infrun.c (process_event_stop_test): Adjust
7134         function_name_is_marked_for_skip call.
7135         * skip.c: Include <list>.
7136         (skiplist_entry): Make it a class with private fields, and
7137         getters/setters.
7138         (skiplist_entry_chain): Delete.
7139         (skiplist_entries): New.
7140         (skiplist_entry_count): Delete.
7141         (highest_skiplist_entry_num): New.
7142         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7143         (add_skiplist_entry): Delete.
7144         (skiplist_entry::skiplist_entry): New.
7145         (skiplist_entry::add_entry): New.
7146         (skip_file_command, skip_function): Adjust.
7147         (compile_skip_regexp): Delete.
7148         (skip_command): Don't compile regexp here.  Adjust to use
7149         skiplist_entry::add_entry.
7150         (skip_info): Adjust to use range-for and getters.
7151         (skip_enable_command, skip_disable_command): Adjust to use
7152         range-for and setters.
7153         (skip_delete_command): Adjust to use std::list.
7154         (add_skiplist_entry): Delete.
7155         (skip_file_p): Delete, refactored as ...
7156         (skiplist_entry::do_skip_file_p): ... this new method.
7157         (skip_gfile_p): Delete, refactored as ...
7158         (skiplist_entry::do_gskip_file_p): ... this new method.
7159         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7160         (skiplist_entry::skip_function_p): ... this new method.
7161         (function_name_is_marked_for_skip): Now returns bool, and takes
7162         the function sal by const reference.  Adjust to use range-for and
7163         skiplist_entry methods.
7164         (_initialize_step_skip): Remove references to
7165         skiplist_entry_chain, skiplist_entry_count.
7166         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7167         takes the function sal by const reference.
7168
7169 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7170
7171         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7172         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7173         (dwarf2_frame_cache):
7174         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7175         RETURN_MASK_ALL and set *this_case to NULL.
7176         * frame-unwind.h: Update comments.
7177
7178 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7179
7180         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7181         (dwarf2_frame_state_copy_regs): Remove.
7182         (dwarf2_frame_state_free_regs): Remove.
7183         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7184         (dwarf2_restore_rule): Call method .alloc_regs instead of
7185         dwarf2_frame_state_alloc_regs.
7186         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7187         constructor.  Call std::move.
7188         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7189         (dwarf2_frame_cache): Likewise.
7190
7191         [GDB_SELF_TEST]: Include selftest.h and
7192         selftest-arch.h.
7193         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7194         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7195         execute_cfa_program_test.
7196
7197         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7198         copy ctor, assignment operator, move assignment.
7199         <alloc_regs>: New method.
7200         <swap>: New method.
7201         (struct dwarf2_frame_state): Delete dtor.
7202         (dwarf2_frame_state_alloc_regs): Remove declaration.
7203         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7204         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7205
7206 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7207
7208         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7209         (dwarf2_frame_state::dwarf2_frame_state): New.
7210         (dwarf2_frame_state::~dwarf2_frame_state): New.
7211         (dwarf2_fetch_cfa_info): Update.
7212         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7213         rather than a pointer.  Update code.
7214         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7215         dtor.
7216         <data_align, code_align, retaddr_column>: Change them to const.
7217         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7218         to bool.
7219
7220 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7221
7222         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7223         <loc.exp>: New field.
7224         * dwarf2-frame.c (execute_cfa_program): Update.
7225         (dwarf2_frame_prev_register): Update.
7226
7227 2017-08-10  Pedro Alves  <palves@redhat.com>
7228
7229         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7230
7231 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7232
7233         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7234         (fbsd_pending_children): Use std::list.
7235         (fbsd_remember_child): Likewise.
7236         (fbsd_is_child_pending): Likewise.
7237         (fbsd_pending_vfork_done): Use std::forward_list.
7238         (fbsd_add_vfork_done): Likewise.
7239         (fbsd_is_vfork_done_pending): Likewise.
7240         (fbsd_next_vfork_done): Likewise.
7241
7242 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7243
7244         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7245         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7246         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7247         for `mapfilename'.
7248         (fbsd_xfer_partial): Use gdb::byte_vector.
7249         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7250
7251 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7252
7253         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7254         "filestuff.h".
7255         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7256
7257 2017-08-09  Tom Tromey  <tom@tromey.com>
7258
7259         * skip.c (skiplist_entry): New constructor.
7260         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7261         (skiplist_entry::file_is_glob): Now bool.
7262         (skiplist_entry::file, skiplist_entry::function): Now
7263         std::string.
7264         (make_skip_entry): Return a unique_ptr.  Use new.
7265         (free_skiplist_entry, free_skiplist_entry_cleanup)
7266         (make_free_skiplist_entry_cleanup): Remove.
7267         (skip_command, skip_disable_command, add_skiplist_entry)
7268         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7269         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7270         (function_name_is_marked_for_skip): Update.
7271         (skip_delete_command): Update.  Use delete.
7272
7273 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7274
7275         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7276         (aarch64_linux_core_read_description): New function.
7277         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7278
7279 2017-08-09  Pedro Alves  <palves@redhat.com>
7280
7281         * cp-name-parser.y (cp_comp_to_string): Return a
7282         gdb::unique_xmalloc_ptr<char>.
7283         * cp-support.c (replace_typedefs_qualified_name)
7284         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7285         (cp_canonicalize_string_full): Use op= instead of explicit
7286         convertion.
7287         (cp_class_name_from_physname, method_name_from_physname)
7288         (cp_func_name, cp_remove_params): Adjust to use
7289         gdb::unique_xmalloc_ptr<char>.
7290         * cp-support.h (cp_comp_to_string): Return a
7291         gdb::unique_xmalloc_ptr<char>.
7292         * python/py-type.c (typy_lookup_type): Adjust to use
7293         gdb::unique_xmalloc_ptr<char>.
7294
7295 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7296
7297         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7298
7299 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7300             Yao Qi  <yao.qi@linaro.org>
7301
7302         * cp-support.c (cp_canonicalize_string_full): Use
7303         gdb::unique_xmalloc_ptr<char>.
7304         (cp_canonicalize_string): Likewise.
7305
7306 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7307
7308         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7309         * regformats/i386/amd64-avx-avx512.dat: Remove.
7310         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7311         * regformats/i386/amd64-avx-mpx.dat:Remove.
7312         * regformats/i386/amd64-avx.dat: Remove.
7313         * regformats/i386/amd64-mpx.dat: Remove.
7314         * regformats/i386/i386-avx-avx512.dat: Remove.
7315         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7316         * regformats/i386/i386-avx-mpx.dat: Remove.
7317         * regformats/i386/i386-mmx.dat: Remove.
7318         * regformats/i386/i386-mpx.dat: Remove.
7319
7320 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7321
7322         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7323         * amd64-tdep.c: Don't include features/i386/x32*.c.
7324         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7325         functions.
7326         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7327         and i386/x32-avx-avx512.
7328         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7329         and i386/x32.xml.
7330         * features/i386/x32-avx-avx512.c: Removed.
7331         * features/i386/x32-avx-avx512.xml: Removed.
7332         * features/i386/x32-avx.c: Removed.
7333         * features/i386/x32-avx.xml: Removed.
7334         * features/i386/x32.c: Removed.
7335         * features/i386/x32.xml: Removed.
7336         * regformats/i386/x32-avx-avx512.dat: Removed.
7337         * regformats/i386/x32-avx.dat: Removed.
7338         * regformats/i386/x32.dat: Removed.
7339
7340 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7341
7342         PR breakpoints/21886
7343         * mem-break.c (default_memory_insert_breakpoint): Use
7344         `->placed_address' rather than `->reqstd_address' for the
7345         breakpoint location.
7346
7347 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7348
7349         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7350         assertions.
7351
7352 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7353
7354         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7355         a union of `tdep_info', `tdesc_data' and `id'.
7356         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7357         rather than `info.tdep_info'.
7358         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7359         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7360         * i386-tdep.c (i386_gdbarch_init): Likewise.
7361         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7362         * mips-tdep.c (mips_gdbarch_init): Likewise.
7363         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7364         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7365         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7366         `info.tdep_info'.
7367         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7368         `info.tdep_info'.
7369         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7370         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7371         `info.tdep_info'.
7372         * spu-tdep.c (spu_gdbarch_init): Likewise.
7373         * gdbarch.h: Regenerate.
7374
7375 2017-08-07  Leszek Swirski  <leszeks@google.com>
7376
7377         PR symtab/20899
7378         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7379
7380 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7381
7382         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7383         (gdbsim_open): Rename gdb_argv args object to argv.
7384
7385 2017-08-05  Tom Tromey  <tom@tromey.com>
7386
7387         * compile/compile-object-load.c (compile_object_load): Use
7388         gdb::unique_xmalloc_ptr.
7389         * cli/cli-dump.c (scan_filename): Rename from
7390         scan_filename_with_cleanup.  Change return type.
7391         (scan_expression): Rename from scan_expression_with_cleanup.
7392         Change return type.
7393         (dump_memory_to_file, dump_value_to_file, restore_command):
7394         Use gdb::unique_xmalloc_ptr.  Update.
7395         * cli/cli-cmds.c (find_and_open_script): Use
7396         gdb::unique_xmalloc_ptr.
7397         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7398         * symmisc.c (maintenance_print_symbols)
7399         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7400         * symfile.c (symfile_bfd_open, generic_load)
7401         (add_symbol_file_command, remove_symbol_file_command): Use
7402         gdb::unique_xmalloc_ptr.
7403         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7404         * psymtab.c (maintenance_print_psymbols): Use
7405         gdb::unique_xmalloc_ptr.
7406         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7407         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7408         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7409         (reload_shared_libraries_1): Likewise.
7410
7411 2017-08-05  Tom Tromey  <tom@tromey.com>
7412
7413         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7414         (rust_op_vector, rust_set_vector): New typedefs.
7415         (current_parser): New global.
7416         (work_obstack): Change to pointer type.  Update all users.
7417         (rust_ast, pstate): Remove globals.
7418         (struct rust_parser): New.
7419         (%union) <params, field_inits>: Change type.
7420         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7421         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7422         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7423         (convert_params_to_types, convert_params_to_expression): Change
7424         type of "params".
7425         (ast_string): Change type of "fields".
7426         (rust_parse): Make a rust_parser.  Remove cleanups.
7427         (rust_lex_tests): Make and install an auto_obstack.
7428
7429 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7430
7431         * configure.srv (ipa_x32_linux_regobj): New.
7432         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7433         instead of X86_TDESC_AVX512.
7434         (initialize_low_tracepoint): Call
7435         init_registers_x32_avx_avx512_linux.
7436
7437 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7438
7439         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7440
7441 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7442
7443         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7444
7445 2017-08-03  Tom Tromey  <tom@tromey.com>
7446
7447         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7448         Remove.
7449         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7450
7451 2017-08-03  Tom Tromey  <tom@tromey.com>
7452
7453         * python/py-param.c (compute_enum_values): Use gdb_argv.
7454
7455 2017-08-03  Tom Tromey  <tom@tromey.com>
7456
7457         * utils.h (struct gdb_argv_deleter): New.
7458         (gdb_argv): New class.
7459         * utils.c (gdb_argv::reset): New method.
7460         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7461         * tracefile.c (tsave_command): Use gdb_argv.
7462         * top.c (new_ui_command): Use gdb_argv.
7463         * symmisc.c (maintenance_print_symbols)
7464         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7465         * symfile.c (symbol_file_command, generic_load)
7466         (remove_symbol_file_command): Use gdb_argv.
7467         * stack.c (backtrace_command): Use gdb_argv.
7468         * source.c (add_path, show_substitute_path_command)
7469         (unset_substitute_path_command, set_substitute_path_command):
7470         Use gdb_argv.
7471         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7472         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7473         * remote.c (extended_remote_run, remote_put_command)
7474         (remote_get_command, remote_delete_command): Use gdb_argv.
7475         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7476         (gdbsim_open): Use gdb_argv.
7477         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7478         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7479         * procfs.c (procfs_info_proc): Use gdb_argv.
7480         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7481         * infrun.c (handle_command): Use gdb_argv.
7482         * inferior.c (add_inferior_command, clone_inferior_command):
7483         Use gdb_argv.
7484         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7485         * exec.c (exec_file_command): Use gdb_argv.
7486         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7487         * compile/compile.c (build_argc_argv): Use gdb_argv.
7488
7489 2017-08-03  Tom Tromey  <tom@tromey.com>
7490
7491         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7492
7493 2017-08-03  Tom Tromey  <tom@tromey.com>
7494
7495         * python/python.c (compute_python_string): Return std::string.
7496         (gdbpy_eval_from_control_command): Update.
7497         (do_start_initialization): Use std::string.
7498         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7499         xstrprintf.
7500         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7501         xstrprintf.
7502
7503 2017-08-03  Tom Tromey  <tom@tromey.com>
7504
7505         * top.h (do_restore_instream_cleanup): Remove.
7506         * top.c (do_restore_instream_cleanup): Remove.
7507         (read_command_file): Use scoped_restore.
7508         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7509
7510 2017-08-03  Tom Tromey  <tom@tromey.com>
7511
7512         * cli/cli-script.c (execute_user_command)
7513         (execute_control_command): Use scoped_restore.
7514
7515 2017-08-03  Tom Tromey  <tom@tromey.com>
7516
7517         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7518         (execute_user_command): Remove user_call_depth; use
7519         user_args_stack's size instead.
7520
7521 2017-08-03  Tom Tromey  <tom@tromey.com>
7522
7523         * top.h (in_user_command): Remove.
7524         * top.c (in_user_command): Remove.
7525         * cli/cli-script.c (do_restore_user_call_depth)
7526         (execute_user_command): Update.
7527
7528 2017-08-03  Tom Tromey  <tom@tromey.com>
7529
7530         * valops.c (search_struct_method): Use gdb::byte_vector.
7531         * valarith.c (value_concat): Use std::vector.
7532         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7533         (simple_search_memory): Likewise.
7534         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7535         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7536         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7537         * elfread.c (elf_rel_plt_read): Use std::string.
7538         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7539         * cli/cli-dump.c (restore_section_callback): Use
7540         gdb::byte_vector.
7541
7542 2017-08-03  Tom Tromey  <tom@tromey.com>
7543
7544         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7545
7546 2017-08-03  Tom Tromey  <tom@tromey.com>
7547
7548         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7549         (tui_register_format): Use scoped_restore.
7550
7551 2017-08-03  Tom Tromey  <tom@tromey.com>
7552
7553         * reverse.c (exec_direction_default): Remove.
7554         (exec_reverse_once): Use scoped_restore.
7555         * remote.c (restore_remote_timeout): Remove.
7556         (remote_flash_erase, remote_flash_write, remote_flash_done)
7557         (readchar, remote_serial_write): Use scoped_restore.
7558         * cli/cli-script.c (struct source_cleanup_lines_args)
7559         (source_cleanup_lines): Remove.
7560         (script_from_file): Use scoped_restore.
7561         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7562         (source_command): Use scoped_restore.
7563
7564 2017-08-03  Tom Tromey  <tom@tromey.com>
7565
7566         * utils.h (make_cleanup_free_so): Remove.
7567         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7568         * solist.h (struct so_deleter): New.
7569         (so_list_up): New typedef.
7570         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7571
7572 2017-08-03  Tom Tromey  <tom@tromey.com>
7573
7574         * utils.h (make_cleanup_restore_current_language): Remove.
7575         * utils.c (do_restore_current_language)
7576         (make_cleanup_restore_current_language): Remove.
7577         * parse.c (parse_exp_in_context_1)
7578         (parse_expression_with_language): Use
7579         scoped_restore_current_language.
7580         * mi/mi-main.c (mi_cmd_execute): Use
7581         scoped_restore_current_language.
7582         * language.h (scoped_restore_current_language): New class.
7583
7584 2017-08-03  Tom Tromey  <tom@tromey.com>
7585
7586         * compile/compile.c (cleanup_unlink_file): Remove.
7587         (compile_to_object): Use gdb::unlinker.
7588         (eval_compile_command): Likewise.
7589
7590 2017-08-03  Tom Tromey  <tom@tromey.com>
7591
7592         * utils.h (make_cleanup_fclose): Remove.
7593         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7594
7595 2017-08-03  Tom Tromey  <tom@tromey.com>
7596
7597         * top.c (open_terminal_stream): Return gdb_file_up.
7598         (new_ui_command): Update.
7599
7600 2017-08-03  Tom Tromey  <tom@tromey.com>
7601
7602         * source.c (print_source_lines_base, forward_search_command)
7603         (reverse_search_command): Use gdb_file_up.
7604
7605 2017-08-03  Tom Tromey  <tom@tromey.com>
7606
7607         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7608
7609 2017-08-03  Tom Tromey  <tom@tromey.com>
7610
7611         * cli/cli-cmds.c (find_and_open_script): Change return type.
7612         Remove "streamp" and "full_path" parameters.
7613         (source_script_with_search): Update.
7614         * auto-load.c (source_script_file): Update.
7615         * cli/cli-cmds.h (find_and_open_script): Change type.
7616         (open_script): New struct.
7617
7618 2017-08-03  Tom Tromey  <tom@tromey.com>
7619
7620         * xml-support.c (xml_fetch_content_from_file): Update.
7621         * ui-file.c (stdio_file::open): Update.
7622         * tracefile-tfile.c (tfile_start): Update.
7623         * remote.c (remote_file_put, remote_file_get): Update.
7624         * nat/linux-procfs.c (linux_proc_get_int)
7625         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7626         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7627         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7628         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7629         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7630         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7631         * linux-nat.c (linux_proc_pending_signals): Update.
7632         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7633         (file_closer): Remove.
7634         * compile/compile.c (compile_to_object): Update.
7635         * common/filestuff.h (struct gdb_file_deleter): New.
7636         (gdb_file_up): New typedef.
7637         (gdb_fopen_cloexec): Change return type.
7638         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7639         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7640         (dump_binary_file, restore_binary_file): Update.
7641         * auto-load.c (auto_load_objfile_script_1): Update.
7642
7643 2017-08-03  Tom Tromey  <tom@tromey.com>
7644
7645         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7646         (info_static_tracepoint_markers_command): Likewise.
7647         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7648         * skip.c (skip_info): Use ui_out_emit_table.
7649         * progspace.c (print_program_space): Use ui_out_emit_table.
7650         * osdata.c (info_osdata): Use ui_out_emit_table.
7651         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7652         ui_out_emit_table.
7653         * linux-thread-db.c (info_auto_load_libthread_db): Use
7654         ui_out_emit_table.
7655         * inferior.c (print_inferior): Use ui_out_emit_table.
7656         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7657         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7658         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7659         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7660         * ui-out.h (class ui_out_emit_table): New.
7661
7662 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7663
7664         * mips-tdep.c (mips_fpu_type_str): New function.
7665         (mips_dump_tdep): Call it.
7666
7667 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7668
7669         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7670         `->mips_fpu_type'.
7671
7672 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7673
7674         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7675
7676 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7677
7678         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7679
7680 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7681
7682         * cli/cli-cmds.c (maintenancechecklist): New variable.
7683         * gdbcmd.h (maintenancechecklist): Declare it.
7684         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7685         Call i386_linux_read_description with different masks.
7686         * maint.c (maintenance_check_command): New function.
7687         (_initialize_maint_cmds): Call add_prefix_cmd.
7688         * target-descriptions.c (tdesc_reg): override operator != and ==.
7689         (tdesc_type): Likewise.
7690         (tdesc_feature): Likewise.
7691         (target_desc): Likewise.
7692         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7693         (maintenance_check_xml_descriptions): New function.
7694         (_initialize_target_descriptions) Add command "xml-descriptions".
7695         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7696
7697 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7698
7699         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7700         Include features/i386/32bit-*.c.
7701         (i386_linux_read_description): Generate target description if it
7702         doesn't exist.
7703         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7704         functions.
7705         * features/i386/32bit-linux.c: Re-generated.
7706         * features/i386/32bit-sse.c: Likewise.
7707         * target-descriptions.c (print_c_feature::visit): Print code to
7708         set register number if needed.
7709         (print_c_feature) <m_next_regnum>: New field.
7710
7711 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7712
7713         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7714         (FEATURE_XMLFILES): New.
7715         (FEATURE_CFILES): New.
7716         New rules.
7717         (clean-cfiles): Remove generated c files.
7718         * features/i386/32bit-avx.c: Generated.
7719         * features/i386/32bit-avx512.c: Generated.
7720         * features/i386/32bit-core.c: Generated.
7721         * features/i386/32bit-linux.c: Generated.
7722         * features/i386/32bit-mpx.c: Generated.
7723         * features/i386/32bit-pkeys.c: Generated.
7724         * features/i386/32bit-sse.c: Generated.
7725         * target-descriptions.c: Include algorithm.
7726         (tdesc_element_visitor): Add method visit_end.
7727         (print_c_tdesc): Implement visit_end.
7728         (print_c_tdesc:: m_filename_after_features): Move it to
7729         protected.
7730         (print_c_feature): New class.
7731         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7732         name starts with "i386/32bit-".
7733
7734 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7735
7736         * target-descriptions.c (tdesc_element_visitor): New class.
7737         (tdesc_element): New class.
7738         (tdesc_reg): Inherit from tdesc_element.
7739         (tdesc_reg::accept): New function.
7740         (tdesc_type): Inherit from tdesc_element.
7741         (tdesc_type::accept): New function.
7742         (tdesc_feature): Inherit from tdesc_element.
7743         (tdesc_feature::accept): New function.
7744         (target_desc): Inherit from tdesc_element.
7745         (target_desc::target_desc): New.
7746         (target_desc::~target_desc): New.
7747         (target_desc::accept): New.
7748         (allocate_target_description): Use new.
7749         (free_target_description): Use delete.
7750         (print_c_tdesc): New class.
7751         (maint_print_c_tdesc_cmd): Adjust.
7752
7753         * features/aarch64.c: Re-generated.
7754         * features/arc-arcompact.c: Re-generated.
7755         * features/arc-v2.c: Re-generated.
7756         * features/arm/arm-with-iwmmxt.c: Re-generated.
7757         * features/arm/arm-with-m.c: Re-generated.
7758         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7759         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7760         * features/arm/arm-with-neon.c: Re-generated.
7761         * features/arm/arm-with-vfpv2.c: Re-generated.
7762         * features/arm/arm-with-vfpv3.c: Re-generated.
7763         * features/i386/amd64-avx-avx512.c: Re-generated.
7764         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7765         * features/i386/amd64-avx.c: Re-generated.
7766         * features/i386/amd64-avx-linux.c: Re-generated.
7767         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7768         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7769         * features/i386/amd64-avx-mpx.c: Re-generated.
7770         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7771         * features/i386/amd64.c: Re-generated.
7772         * features/i386/amd64-linux.c: Re-generated.
7773         * features/i386/amd64-mpx.c: Re-generated.
7774         * features/i386/amd64-mpx-linux.c: Re-generated.
7775         * features/i386/i386-avx-avx512.c: Re-generated.
7776         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7777         * features/i386/i386-avx.c: Re-generated.
7778         * features/i386/i386-avx-linux.c: Re-generated.
7779         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7780         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7781         * features/i386/i386-avx-mpx.c: Re-generated.
7782         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7783         * features/i386/i386.c: Re-generated.
7784         * features/i386/i386-linux.c: Re-generated.
7785         * features/i386/i386-mmx.c: Re-generated.
7786         * features/i386/i386-mmx-linux.c: Re-generated.
7787         * features/i386/i386-mpx.c: Re-generated.
7788         * features/i386/i386-mpx-linux.c: Re-generated.
7789         * features/i386/x32-avx-avx512.c: Re-generated.
7790         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7791         * features/i386/x32-avx.c: Re-generated.
7792         * features/i386/x32-avx-linux.c: Re-generated.
7793         * features/i386/x32.c: Re-generated.
7794         * features/i386/x32-linux.c: Re-generated.
7795         * features/microblaze.c: Re-generated.
7796         * features/microblaze-with-stack-protect.c: Re-generated.
7797         * features/mips64-dsp-linux.c: Re-generated.
7798         * features/mips64-linux.c: Re-generated.
7799         * features/mips-dsp-linux.c: Re-generated.
7800         * features/mips-linux.c: Re-generated.
7801         * features/nds32.c: Re-generated.
7802         * features/nios2.c: Re-generated.
7803         * features/nios2-linux.c: Re-generated.
7804         * features/rs6000/powerpc-32.c: Re-generated.
7805         * features/rs6000/powerpc-32l.c: Re-generated.
7806         * features/rs6000/powerpc-403.c: Re-generated.
7807         * features/rs6000/powerpc-403gc.c : Re-generated.
7808         * features/rs6000/powerpc-405.c: Re-generated.
7809         * features/rs6000/powerpc-505.c: Re-generated.
7810         * features/rs6000/powerpc-601.c: Re-generated.
7811         * features/rs6000/powerpc-602.c: Re-generated.
7812         * features/rs6000/powerpc-603.c: Re-generated.
7813         * features/rs6000/powerpc-604.c: Re-generated.
7814         * features/rs6000/powerpc-64.c: Re-generated.
7815         * features/rs6000/powerpc-64l.c: Re-generated.
7816         * features/rs6000/powerpc-7400.c: Re-generated.
7817         * features/rs6000/powerpc-750.c: Re-generated.
7818         * features/rs6000/powerpc-860.c: Re-generated.
7819         * features/rs6000/powerpc-altivec32.c: Re-generated.
7820         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7821         * features/rs6000/powerpc-altivec64.c: Re-generated.
7822         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7823         * features/rs6000/powerpc-cell32l.c: Re-generated.
7824         * features/rs6000/powerpc-cell64l.c: Re-generated.
7825         * features/rs6000/powerpc-e500.c: Re-generated.
7826         * features/rs6000/powerpc-e500l.c: Re-generated.
7827         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7828         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7829         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7830         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7831         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7832         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7833         * features/rs6000/powerpc-vsx32.c: Re-generated.
7834         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7835         * features/rs6000/powerpc-vsx64.c: Re-generated.
7836         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7837         * features/rs6000/rs6000.c: Re-generated.
7838         * features/s390-linux32.c: Re-generated.
7839         * features/s390-linux32v1.c: Re-generated.
7840         * features/s390-linux32v2.c: Re-generated.
7841         * features/s390-linux64.c: Re-generated.
7842         * features/s390-linux64v1.c: Re-generated.
7843         * features/s390-linux64v2.c: Re-generated.
7844         * features/s390-te-linux64.c: Re-generated.
7845         * features/s390-tevx-linux64.c: Re-generated.
7846         * features/s390-vx-linux64.c: Re-generated.
7847         * features/s390x-linux64.c: Re-generated.
7848         * features/s390x-linux64v1.c: Re-generated.
7849         * features/s390x-linux64v2.c: Re-generated.
7850         * features/s390x-te-linux64.c: Re-generated.
7851         * features/s390x-tevx-linux64.c: Re-generated.
7852         * features/s390x-vx-linux64.c: Re-generated.
7853         * features/sparc/sparc32-solaris.c: Re-generated.
7854         * features/sparc/sparc64-solaris.c: Re-generated.
7855         * features/tic6x-c62x.c: Re-generated.
7856         * features/tic6x-c62x-linux.c: Re-generated.
7857         * features/tic6x-c64x.c: Re-generated.
7858         * features/tic6x-c64x-linux.c: Re-generated.
7859         * features/tic6x-c64xp.c: Re-generated.
7860         * features/tic6x-c64xp-linux.c: Re-generated.
7861
7862 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7863
7864         * i386-linux-tdep.c (i386_linux_read_description): New function.
7865         (i386_linux_core_read_description): Call
7866         i386_linux_read_description.
7867         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7868         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7869         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7870         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7871         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7872         * x86-linux-nat.c (x86_linux_read_description): Call
7873         i386_linux_read_description.
7874
7875 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7876
7877         * NEWS: Mention it.
7878         * features/Makefile (%.c: %.xml): Pass the xml file name to
7879         command "maint print c-tdesc".
7880         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7881         name from 'arg'.
7882
7883 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7884
7885         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7886         in-class initialization.
7887         (tdesc_create_feature): Call new instead of XCNEW.
7888         (free_target_description): Ue delete.
7889
7890 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7891
7892         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7893
7894 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7895
7896         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7897         constant.
7898         (amd64_x32_init_abi): Likewise.
7899         * amd64-tdep.h (amd64_init_abi): Update declaration.
7900         (amd64_x32_init_abi): Likewise.
7901
7902 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7903
7904         PR tdep/21717
7905         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7906         condition for FPSCR.
7907         (arm_linux_store_inferior_registers): Likewise.
7908
7909 2017-07-22  Tom Tromey  <tom@tromey.com>
7910
7911         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7912         <syscalls_counts>: Now a std::vector.
7913         (get_catch_syscall_inferior_data): Use "new".
7914         (catch_syscall_inferior_data_cleanup): Use "delete".
7915         (insert_catch_syscall, remove_catch_syscall)
7916         (clear_syscall_counts): Update.
7917
7918 2017-07-22  Tom Tromey  <tom@tromey.com>
7919
7920         * break-catch-syscall.c (syscall_catchpoint)
7921         <syscalls_to_be_caught>: Now a std::vector<int>
7922         (~syscall_catchpoint): Remove.
7923         (insert_catch_syscall, remove_catch_syscall)
7924         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7925         (print_mention_catch_syscall, print_recreate_catch_syscall):
7926         Update.
7927         (create_syscall_event_catchpoint): Change type of "filter"
7928         parameter.
7929         (catch_syscall_split_args): Return a std::vector.
7930         (catch_syscall_command_1, catching_syscall_number_1): Update.
7931
7932 2017-07-22  Tom Tromey  <tom@tromey.com>
7933
7934         * break-catch-throw.c (struct exception_catchpoint)
7935         <exception_rx>: Now a std::string.
7936         (~exception_catchpoint): Remove.
7937         (print_one_detail_exception_catchpoint): Update.
7938         (handle_gnu_v3_exceptions): Change type of except_rx.
7939         (extract_exception_regexp): Return a std::string.
7940         (catch_exception_command_1): Update.
7941
7942 2017-07-22  Tom Tromey  <tom@tromey.com>
7943
7944         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7945         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7946         std::vector.
7947         <catch_all>: Now a bool.
7948         (~signal_catchpoint): Remove.
7949         (signal_catchpoint_insert_location)
7950         (signal_catchpoint_remove_location)
7951         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7952         (signal_catchpoint_print_mention)
7953         (signal_catchpoint_print_recreate)
7954         (signal_catchpoint_explains_signal): Update.
7955         (create_signal_catchpoint): Change type of "filter" and
7956         "catch_all".
7957         (catch_signal_split_args): Return a std::vector.  Change type of
7958         "catch_all".
7959         (catch_signal_command): Update.
7960
7961 2017-07-20  Pedro Alves  <palves@redhat.com>
7962
7963         * ada-lang.c (ada_language_defn): Make extern.
7964         (_initialize_ada_language): Remove add_language call.
7965         * c-lang.c (c_language_defn, cplus_language_defn)
7966         (asm_language_defn, minimal_language_defn): Make extern.
7967         (_initialize_c_language): Delete.
7968         * completer.c (compare_cstrings): Delete, moved to utils.h.
7969         * d-lang.c (d_language_defn): Make extern.
7970         (_initialize_d_language): Remove add_language calls.
7971         * defs.h (enum language): Add comment.
7972         * f-lang.c (f_language_defn): Make extern.
7973         (_initialize_f_language): Remove add_language call.
7974         * go-lang.c (go_language_defn): Make extern.
7975         (_initialize_go_language): Remove add_language call.
7976         * language.c: Include <algorithm>.
7977         (languages): Redefine as const array.
7978         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7979         (set_language_command): Handle "local".  Use for-range loop.
7980         (set_language): Remove loop.
7981         (language_enum): Rewrite.
7982         (language_def, language_str): Remove loops.
7983         (add_language): Delete.
7984         (add_set_language_command): New, based on add_languages.
7985         (skip_language_trampoline): Adjust.
7986         (local_language_defn): Delete.
7987         (language_gdbarch_post_init): Adjust.
7988         (_initialize_language): Remove add_language calls.  Call
7989         add_set_language_command.
7990         * language.h (add_language): Delete.
7991         (auto_language_defn)
7992         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7993         (asm_language_defn, c_language_defn, cplus_language_defn)
7994         (d_language_defn, f_language_defn, go_language_defn)
7995         (m2_language_defn, objc_language_defn, opencl_language_defn)
7996         (pascal_language_defn, rust_language_defn): Declare.
7997         * m2-lang.c (m2_language_defn): Make extern.
7998         (_initialize_m2_language): Remove add_language call.
7999         * objc-lang.c (objc_language_defn): Make extern.
8000         (_initialize_objc_language): Remove add_language call.
8001         * opencl-lang.c (opencl_language_defn): Make extern.
8002         (_initialize_opencl_language): Remove add_language call.
8003         * p-lang.c (pascal_language_defn): Make extern.
8004         (_initialize_pascal_language): Delete.
8005         * rust-lang.c (rust_language_defn): Make extern.
8006         (_initialize_rust_language): Delete.
8007         * utils.h (compare_cstrings): New static inline function.
8008
8009 2017-07-20  Pedro Alves  <palves@redhat.com>
8010
8011         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8012         (get_var_value): Constify parameters.
8013         (get_int_var_value): Change prototype.
8014         (to_fixed_range_type): Adjust.
8015         * ada-lang.h (get_int_var_value): Change prototype.
8016
8017 2017-07-20  Pedro Alves  <palves@redhat.com>
8018
8019         * dwarf2read.c (dw2_lookup_symbol): Use
8020         SYMBOL_MATCHES_SEARCH_NAME.
8021         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8022
8023 2017-07-20  Pedro Alves  <palves@redhat.com>
8024
8025         * block.c (block_iter_name_step, block_iter_name_first)
8026         (block_iter_name_next): Delete.
8027         (block_lookup_symbol_primary): Adjust to use
8028         dict_iter_match_first/dict_iter_match_next.
8029         * block.h (block_iter_name_first, block_iter_name_next): Delete
8030         declarations.
8031         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8032         dict_iter_match_first/dict_iter_match_next.
8033
8034 2017-07-20  Pedro Alves  <palves@redhat.com>
8035
8036         * cp-support.c (cp_find_first_component_aux): Add missing case for
8037         end of string.
8038
8039 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8040
8041         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8042         of dwo_cu's dwo_file.
8043
8044 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8045
8046         * remote.c (store_registers_using_G): Remove one line comment.
8047
8048 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8049
8050         * regcache.c (regcache_cpy): Simplify it.
8051         (regcache::cpy_no_passthrough): Remove it.
8052         * regcache.h (cpy_no_passthrough): Remove it.
8053         (regcache_dup, regcache_cpy): Update comments.
8054
8055 2017-07-18  Pedro Alves  <palves@redhat.com>
8056
8057         * remote-sim.c (sim_command_completer): Adjust to work with a
8058         completion_tracker instead of a VEC.
8059
8060 2017-07-17  Pedro Alves  <palves@redhat.com>
8061
8062         * completer.c (complete_source_filenames): New function.
8063         (complete_address_and_linespec_locations): New function.
8064         (location_completer): Use complete_address_and_linespec_locations.
8065         (completion_tracker::build_completion_result): Honor the tracker's
8066         request to suppress append.
8067         * completer.h (completion_tracker::suppress_append_ws)
8068         (completion_tracker::set_suppress_append_ws): New methods.
8069         (completion_tracker::m_suppress_append_ws): New field.
8070         (complete_source_filenames): New declaration.
8071         * linespec.c (linespec_complete_what): New.
8072         (struct ls_parser) <complete_what, completion_word,
8073         completion_quote_char, completion_quote_end, completion_tracker>:
8074         New fields.
8075         (string_find_incomplete_keyword_at_end): New.
8076         (linespec_lexer_lex_string): Record quote char.  If in completion
8077         mode, don't throw.
8078         (linespec_lexer_consume_token): Advance the completion word point.
8079         (linespec_lexer_peek_token): Save/restore completion info.
8080         (save_stream_and_consume_token): New.
8081         (set_completion_after_number): New.
8082         (linespec_parse_basic): Set what to complete next depending on
8083         token.  Handle function and label completions specially.
8084         (parse_linespec): Disable objc shortcut in completion mode.  Set
8085         what to complete next depending on token type.  Skip keyword if in
8086         completion mode.
8087         (complete_linespec_component, linespec_complete): New.
8088         * linespec.h (linespec_complete): Declare.
8089
8090 2017-07-17  Pedro Alves  <palves@redhat.com>
8091
8092         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8093         Handle 'operator<' / 'operator<<'.
8094
8095 2017-07-17  Pedro Alves  <palves@redhat.com>
8096
8097         * completer.c (collect_explicit_location_matches): Handle
8098         MATCH_LABEL.
8099         (convert_explicit_location_to_linespec): New, factored out from
8100         ...
8101         (convert_explicit_location_to_sals): ... this.
8102         (complete_label): New.
8103         (linespec_complete_label, find_label_symbols_in_block): New.
8104         (find_label_symbols): Add completion_mode parameter and adjust to
8105         call find_label_symbols_in_block.
8106         * linespec.h (linespec_complete_label): Declare.
8107
8108 2017-07-17  Pedro Alves  <palves@redhat.com>
8109
8110         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8111         complete_symbol_mode parameter.
8112         * cli/cli-cmds.c (complete_command): Get the completion result out
8113         of the handle_brkchars tracker if used a custom word point.
8114         * completer.c: Include "linespec.h".
8115         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8116         (advance_to_expression_complete_word_point): New.
8117         (completion_tracker::completes_to_completion_word): New.
8118         (complete_files_symbols): Pass down
8119         complete_symbol_mode::EXPRESSION.
8120         (explicit_options, probe_options): New.
8121         (collect_explicit_location_matches): Complete on the
8122         explictit_loc->foo instead of word.  Use
8123         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8124         keyword and options completions.
8125         (backup_text_ptr): Delete.
8126         (skip_keyword): New.
8127         (complete_explicit_location): Remove 'word' parameter.  Add
8128         language, quoted_arg_start and quoted_arg_end parameters.
8129         Rewrite, parsing left to right.
8130         (location_completer): Rewrite.
8131         (location_completer_handle_brkchars): New function.
8132         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8133         (enum complete_line_internal_reason): Adjust comments.
8134         (completion_tracker::discard_completions): New.
8135         (completer_handle_brkchars_func_for_completer): Handle
8136         location_completer.
8137         (gdb_custom_word_point_brkchars)
8138         (gdb_org_rl_basic_quote_characters): New.
8139         (gdb_completion_word_break_characters_throw)
8140         (completion_find_completion_word): Handle trackers that use a
8141         custom word point.
8142         (completion_tracker::advance_custom_word_point_by): New.
8143         (completion_tracker::build_completion_result): Don't rely on
8144         readline appending the quote char.
8145         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8146         use a custom word point.
8147         (gdb_rl_attempted_completion_function): Restore
8148         rl_basic_quote_characters.
8149         * completer.h (class completion_tracker): Extend intro comment.
8150         (completion_tracker::set_quote_char)
8151         (completion_tracker::quote_char)
8152         (completion_tracker::set_use_custom_word_point)
8153         (completion_tracker::use_custom_word_point)
8154         (completion_tracker::custom_word_point)
8155         (completion_tracker::set_custom_word_point)
8156         (completion_tracker::advance_custom_word_point_by)
8157         (completion_tracker::completes_to_completion_word)
8158         (completion_tracker::discard_completions): New methods.
8159         (completion_tracker::m_quote_char)
8160         (completion_tracker::m_use_custom_word_point)
8161         (completion_tracker::m_custom_word_point): New fields.
8162         (advance_to_expression_complete_word_point): Declare.
8163         * f-lang.c (f_collect_symbol_completion_matches): Add
8164         complete_symbol_mode parameter.
8165         * language.h (struct language_defn)
8166         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8167         parameter.
8168         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8169         (linespec_complete_function): New function.
8170         (linespec_lexer_lex_keyword): Adjust.
8171         * linespec.h (linespec_keywords, linespec_complete_function): New
8172         declarations.
8173         * location.c (find_end_quote): New function.
8174         (explicit_location_lex_one): Add explicit_completion_info
8175         parameter.  Save quoting info.  Don't throw if being called for
8176         completion.  Don't handle Ada operators here.
8177         (is_cp_operator, skip_op_false_positives, first_of)
8178         (explicit_location_lex_one_function): New function.
8179         (string_to_explicit_location): Replace 'dont_throw' parameter with
8180         an explicit_completion_info pointer parameter.  Handle it.  Don't
8181         use explicit_location_lex_one to lex function names.  Use
8182         explicit_location_lex_one_function instead.
8183         * location.h (struct explicit_completion_info): New.
8184         (string_to_explicit_location): Replace 'dont_throw' parameter with
8185         an explicit_completion_info pointer parameter.
8186         * symtab.c (default_collect_symbol_completion_matches_break_on):
8187         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8188         (default_collect_symbol_completion_matches)
8189         (collect_symbol_completion_matches): Add complete_symbol_mode
8190         parameter.
8191         (collect_symbol_completion_matches_type): Pass down
8192         complete_symbol_mode::EXPRESSION.
8193         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8194         parameter.  Handle LINESPEC mode.
8195         * symtab.h (complete_symbol_mode): New.
8196         (default_collect_symbol_completion_matches_break_on)
8197         (default_collect_symbol_completion_matches)
8198         (collect_symbol_completion_matches)
8199         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8200         parameter.
8201
8202 2017-07-17  Pedro Alves  <palves@redhat.com>
8203
8204         * utils.c (enum class strncmp_iw_mode): New.
8205         (strcmp_iw): Rename to ...
8206         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8207         parameters.  Handle them.
8208         (strncmp_iw): New.
8209         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8210         * utils.h (strncmp_iw): Declare.
8211         (strcmp_iw): Move describing comments here.
8212
8213 2017-07-17  Pedro Alves  <palves@redhat.com>
8214
8215         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8216         CP_OPERATOR_STR.
8217         * c-typeprint.c (is_type_conversion_operator): Use
8218         CP_OPERATOR_STR.
8219         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8220         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8221         CP_OPERATOR_LEN.
8222         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8223         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8224         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8225         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8226         CP_OPERATOR_STR.
8227         * location.c: Include "cp-support.h".
8228         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8229         CP_OPERATOR_STR.
8230         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8231         CP_OPERATOR_LEN.
8232
8233 2017-07-17  Pedro Alves  <palves@redhat.com>
8234
8235         * cli/cli-cmds.c (complete_command): Use a completion tracker
8236         along with completion_find_completion_word for handle_brkchars
8237         phase.
8238         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8239         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8240         (struct gdb_rl_completion_word_info): New.
8241         (gdb_rl_find_completion_word): New.
8242         (completion_find_completion_word): New.
8243         * completer.h (completion_find_completion_word): Declare.
8244
8245 2017-07-17  Pedro Alves  <palves@redhat.com>
8246
8247         * ada-lang.c (symbol_completion_match): Adjust comments.
8248         (symbol_completion_add): Replace vector parameter with
8249         completion_tracker parameter.  Use it.
8250         (ada_make_symbol_completion_list): Rename to...
8251         (ada_collect_symbol_completion_matches): ... this.  Add
8252         completion_tracker parameter and use it.
8253         (ada_language_defn): Adjust.
8254         * break-catch-syscall.c (catch_syscall_completer): Adjust
8255         prototype and work with completion_tracker instead of VEC.
8256         * breakpoint.c (condition_completer): Adjust prototype and work
8257         with completion_tracker instead of VEC.
8258         * c-lang.c (c_language_defn, cplus_language_defn)
8259         (asm_language_defn, minimal_language_defn): Adjust to renames.
8260         * cli/cli-cmds.c (complete_command): Rework using
8261         completion_tracker.  Catch exceptions when completing.
8262         * cli/cli-decode.c (integer_unlimited_completer)
8263         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8264         with completion_tracker instead of VEC.
8265         * command.h (struct completion_tracker): Forward declare.
8266         (completer_ftype, completer_handle_brkchars_ftype): Change
8267         types.
8268         (complete_on_cmdlist, complete_on_enum): Adjust.
8269         * completer.c: Include <algorithm>.
8270         (struct gdb_completer_state): New.
8271         (current_completion): New global.
8272         (readline_line_completion_function): Delete.
8273         (noop_completer, filename_completer)
8274         (filename_completer_handle_brkchars, complete_files_symbols)
8275         (linespec_location_completer): Adjust to work with a
8276         completion_tracker instead of a VEC.
8277         (string_or_empty): New.
8278         (collect_explicit_location_matches): Adjust to work with a
8279         completion_tracker instead of a VEC.
8280         (explicit_location_completer): Rename to ...
8281         (complete_explicit_location): ... this and adjust to work with a
8282         completion_tracker instead of a VEC.
8283         (location_completer): Adjust to work with a completion_tracker
8284         instead of a VEC.
8285         (add_struct_fields): Adjust to work with a completion_list instead
8286         of VEC.
8287         (expression_completer): Rename to ...
8288         (complete_expression): ... this and adjust to work with a
8289         completion_tracker instead of a VEC.  Use complete_files_symbols.
8290         (expression_completer): Reimplement on top of complete_expression.
8291         (symbol_completer): Adjust to work with a completion_tracker
8292         instead of a VEC.
8293         (enum complete_line_internal_reason): Add describing comments.
8294         (complete_line_internal_normal_command): Adjust to work with a
8295         completion_tracker instead of a VEC.
8296         (complete_line_internal): Rename to ...
8297         (complete_line_internal_1): ... this and adjust to work with a
8298         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8299         handle_brkchars phase.
8300         (new_completion_tracker): Delete.
8301         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8302         complete_line_internal_1.
8303         (free_completion_tracker): Delete.
8304         (INITIAL_COMPLETION_HTAB_SIZE): New.
8305         (completion_tracker::completion_tracker)
8306         (completion_tracker::~completion_tracker): New.
8307         (maybe_add_completion): Delete.
8308         (completion_tracker::maybe_add_completion)
8309         (completion_tracker::add_completion)
8310         (completion_tracker::add_completions): New.
8311         (throw_max_completions_reached_error): Delete.
8312         (complete_line): Adjust to work with a completion_tracker instead
8313         of a VEC.  Don't create a completion_tracker_t or check for max
8314         completions here.
8315         (command_completer, command_completer_handle_brkchars)
8316         (signal_completer, reg_or_group_completer_1)
8317         (reg_or_group_completer, default_completer_handle_brkchars):
8318         Adjust to work with a completion_tracker.
8319         (gdb_completion_word_break_characters_throw): New.
8320         (gdb_completion_word_break_characters): Reimplement.
8321         (line_completion_function): Delete.
8322         (completion_tracker::recompute_lowest_common_denominator)
8323         (expand_preserving_ws)
8324         (completion_tracker::build_completion_result)
8325         (completion_result::completion_result)
8326         (completion_result::completion_result)
8327         (completion_result::~completion_result)
8328         (completion_result::completion_result)
8329         (completion_result::release_match_list, compare_cstrings)
8330         (completion_result::sort_match_list)
8331         (completion_result::reset_match_list)
8332         (gdb_rl_attempted_completion_function_throw)
8333         (gdb_rl_attempted_completion_function): New.
8334         * completer.h (completion_list, struct completion_result)
8335         (class completion_tracker): New.
8336         (complete_line): Add completion_tracker parameter.
8337         (readline_line_completion_function): Delete.
8338         (gdb_rl_attempted_completion_function): New.
8339         (noop_completer, filename_completer, expression_completer)
8340         (location_completer, symbol_completer, command_completer)
8341         (signal_completer, reg_or_group_completer): Update prototypes.
8342         (completion_tracker_t, new_completion_tracker)
8343         (make_cleanup_free_completion_tracker): Delete.
8344         (enum maybe_add_completion_enum): Delete.
8345         (maybe_add_completion): Delete.
8346         (throw_max_completions_reached_error): Delete.
8347         * corefile.c (complete_set_gnutarget): Adjust to work with a
8348         completion_tracker instead of a VEC.
8349         * cp-abi.c (cp_abi_completer): Adjust to work with a
8350         completion_tracker instead of a VEC.
8351         * d-lang.c (d_language_defn): Adjust.
8352         * disasm.c (disassembler_options_completer): Adjust to work with a
8353         completion_tracker instead of a VEC.
8354         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8355         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8356         with a completion_tracker instead of a VEC.
8357         (f_language_defn): Adjust.
8358         * go-lang.c (go_language_defn): Adjust.
8359         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8360         Adjust to work with a completion_tracker instead of a VEC.
8361         * infrun.c (handle_completer): Likewise.
8362         * interps.c (interpreter_completer): Likewise.
8363         * interps.h (interpreter_completer): Likewise.
8364         * language.c (unknown_language_defn, auto_language_defn)
8365         (local_language_defn): Adjust.
8366         * language.h (language_defn::la_make_symbol_completion_list):
8367         Rename to ...
8368         (language_defn::la_collect_symbol_completion_matches): ... this
8369         and adjust to work with a completion_tracker instead of a VEC.
8370         * m2-lang.c (m2_language_defn): Adjust.
8371         * objc-lang.c (objc_language_defn): Adjust.
8372         * opencl-lang.c (opencl_language_defn): Adjust.
8373         * p-lang.c (pascal_language_defn): Adjust.
8374         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8375         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8376         with a completion_tracker.
8377         * rust-lang.c (rust_language_defn): Adjust.
8378         * symtab.c (free_completion_list, do_free_completion_list)
8379         (return_val, completion_tracker): Delete.
8380         (completion_list_add_name, completion_list_add_symbol)
8381         (completion_list_add_msymbol, completion_list_objc_symbol)
8382         (completion_list_add_fields, add_symtab_completions): Add
8383         completion_tracker parameter and use it.
8384         (default_make_symbol_completion_list_break_on_1): Rename to...
8385         (default_collect_symbol_completion_matches_break_on): ... this.
8386         Add completion_tracker parameter and use it instead of allocating
8387         a completion tracker here.
8388         (default_make_symbol_completion_list_break_on): Delete old
8389         implementation.
8390         (default_make_symbol_completion_list): Delete.
8391         (default_collect_symbol_completion_matches): New.
8392         (make_symbol_completion_list): Delete.
8393         (collect_symbol_completion_matches): New.
8394         (make_symbol_completion_type): Rename to ...
8395         (collect_symbol_completion_matches_type): ... this.  Add
8396         completion_tracker parameter and use it instead of VEC.
8397         (make_file_symbol_completion_list_1): Rename to...
8398         (collect_file_symbol_completion_matches): ... this.  Add
8399         completion_tracker parameter and use it instead of VEC.
8400         (make_file_symbol_completion_list): Delete.
8401         (add_filename_to_list): Use completion_list instead of a VEC.
8402         (add_partial_filename_data::list): Now a completion_list.
8403         (make_source_files_completion_list): Work with a completion_list
8404         instead of a VEC.
8405         * symtab.h: Include "completer.h".
8406         (default_make_symbol_completion_list_break_on)
8407         (default_make_symbol_completion_list, make_symbol_completion_list)
8408         (make_symbol_completion_type, make_file_symbol_completion_list)
8409         (make_source_files_completion_list): Delete.
8410         (default_collect_symbol_completion_matches_break_on)
8411         (default_collect_symbol_completion_matches)
8412         (collect_symbol_completion_matches)
8413         (collect_symbol_completion_matches_type)
8414         (collect_file_symbol_completion_matches)
8415         (make_source_files_completion_list): New.
8416         * top.c (init_main): Don't install a rl_completion_entry_function
8417         hook.  Install a rl_attempted_completion_function hook instead.
8418         * tui/tui-layout.c (layout_completer): Adjust to work with a
8419         completion_tracker.
8420         * tui/tui-regs.c (tui_reggroup_completer):
8421         * tui/tui-win.c (window_name_completer, focus_completer)
8422         (winheight_completer): Adjust to work with a completion_tracker.
8423         * value.c: Include "completer.h".
8424         (complete_internalvar): Adjust to work with a completion_tracker.
8425         * value.h (complete_internalvar): Likewise.
8426
8427 2017-07-17  Pedro Alves  <palves@redhat.com>
8428
8429         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8430         renames.
8431         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8432         comments to completer_ftype's declaration.
8433         <completer_handle_brkchars>: Change type to
8434         completer_handle_brkchars_ftype.
8435         * command.h (completer_ftype): Add describing comment and give
8436         names to parameters.
8437         (completer_ftype_void): Rename to ...
8438         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8439         (set_cmd_completer_handle_brkchars): Adjust.
8440         * completer.c (filename_completer_handle_brkchars): New function.
8441         (complete_line_internal_normal_command): New function, factored
8442         out from ...
8443         (complete_line_internal): ... here.
8444         (command_completer_handle_brkchars)
8445         (default_completer_handle_brkchars)
8446         (completer_handle_brkchars_func_for_completer): New functions.
8447         * completer.h (set_gdb_completion_word_break_characters): Delete
8448         declaration.
8449         (completer_handle_brkchars_func_for_completer): New declaration.
8450         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8451         completer_handle_brkchars_func_for_completer.
8452
8453 2017-07-17  Pedro Alves  <palves@redhat.com>
8454
8455         * completer.c (symbol_completer): New function, based on
8456         make_symbol_completion_list_fn.
8457         * completer.h (symbol_completer): New declaration.
8458         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8459         * python/py-cmd.c (completers): Adjust.
8460         * symtab.c (make_symbol_completion_list_fn): Delete.
8461         * symtab.h (make_symbol_completion_list_fn): Delete.
8462         * cli/cli-decode.c (add_cmd): Adjust.
8463
8464 2017-07-17  Pedro Alves  <palves@redhat.com>
8465
8466         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8467         * dwarf2read.c: Include "filename-seen-cache.h".
8468         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8469         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8470         * filename-seen-cache.c: New file.
8471         * filename-seen-cache.h: New file.
8472         * symtab.c: Include "filename-seen-cache.h".
8473         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8474         (create_filename_seen_cache, clear_filename_seen_cache)
8475         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8476         to filename-seen-cache.h/filename-seen-cache.c.
8477         (output_source_filename, sources_info)
8478         (maybe_add_partial_symtab_filename)
8479         (make_source_files_completion_list): Adjust to use
8480         filename_seen_cache.
8481
8482 2017-07-17  Pedro Alves  <palves@redhat.com>
8483
8484         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8485         fields.
8486         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8487         dwarf2_debug_sections*)): New.
8488         (dwarf2_per_objfile::dwarf2_per_objfile(const
8489         dwarf2_per_objfile&)): Declare as deleted.
8490         (dwarf2_per_objfile::operator=): Declare as deleted.
8491         (dwarf2_per_objfile::dwarf2_per_objfile)
8492         (dwarf2_per_objfile::~dwarf2_per_objfile)
8493         (dwarf2_per_objfile::free_cached_comp_units): New.
8494         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8495         ctor.  Call dwarf2_per_objfile's ctor manually.
8496         (dwarf2_locate_sections): Deleted/refactored as ...
8497         (dwarf2_per_objfile::locate_sections): ... this new method.
8498         (free_cached_comp_units): Defer to
8499         dwarf2_per_objfile::free_cached_comp_units.
8500         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8501
8502 2017-07-14  Tom Tromey  <tom@tromey.com>
8503
8504         PR rust/21764:
8505         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8506         parameter.
8507         <UNOP_SIZEOF>: Split into separate case.
8508         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8509
8510 2017-07-14  Tom Tromey  <tom@tromey.com>
8511
8512         PR rust/21763:
8513         * symtab.c (symbol_matches_domain): Add language_rust to special
8514         case.
8515         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8516         treat LOC_TYPEDEF symbols as variables.
8517
8518 2017-07-14  Pedro Alves  <palves@redhat.com>
8519
8520         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8521         symtabs matching all symtabs with SRCFILE as file name instead of
8522         only considering the first hit, with lookup_symtab.
8523
8524 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8525
8526         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8527         operator_name parameters.
8528         (gen_expr): Update function call.
8529
8530 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8531
8532         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8533         parameter.
8534         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8535         Likewise.
8536         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8537         parameter, use agent_expr::gdbarch instead, update function
8538         calls.
8539         (locexpr_tracepoint_var_ref): Likewise.
8540         (loclist_tracepoint_var_ref): Likewise.
8541         * ax-gdb.c (gen_trace_static_fields): Likewise.
8542         (gen_traced_pop): Likewise.
8543         (gen_frame_args_address): Likewise.
8544         (gen_frame_locals_address): Likewise.
8545         (gen_var_ref): Likewise.
8546         (gen_struct_ref_recursive): Likewise.
8547         (gen_static_field): Likewise.
8548         (gen_maybe_namespace_elt): Likewise.
8549         (gen_expr): Likewise.
8550         (gen_trace_for_var): Likewise.
8551         (gen_trace_for_expr): Likewise.
8552         (gen_trace_for_return_address): Likewise.
8553
8554 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8555
8556         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8557         parameter.
8558         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8559
8560 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8561
8562         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8563         from ax, update calls.
8564         (gen_usual_arithmetic): Likewise.
8565         (gen_integral_promotions): Likewise.
8566         (gen_bitfield_ref): Likewise.
8567         (gen_primitive_field): Likewise.
8568         (gen_struct_ref_recursive): Likewise.
8569         (gen_struct_ref): Likewise.
8570         (gen_maybe_namespace_elt): Likewise.
8571         (gen_struct_elt_for_reference): Likewise.
8572         (gen_namespace_elt): Likewise.
8573         (gen_aggregate_elt_ref): Likewise.
8574         (gen_expr): Get gdbarch from ax, update calls.
8575         (gen_expr_binop_rest): Likewise.
8576
8577 2017-07-13  Pedro Alves  <palves@redhat.com>
8578
8579         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8580         as default tdesc.
8581         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8582         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8583         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8584         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8585         tdep.
8586         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8587         Get final tdesc from the tdep.
8588         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8589         default tdesc.
8590         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8591         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8592         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8593         Use it as default tdesc.
8594         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8595         down to amd_init_abi.  No longer handle fallback tdesc here.
8596         * amd64-tdep.h (tdesc_x32): Declare.
8597         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8598         parameter.
8599         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8600         as default tdesc.
8601
8602 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8603
8604         * s390-linux-tdep.c (s390_process_record): Add support for
8605         instructions new in arch12.
8606
8607 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8608
8609         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8610         PT_GETFSBASE and PT_GETGSBASE.
8611         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8612         PT_SETGSBASE.
8613
8614 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8615
8616         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8617         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8618         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8619         those rules.
8620         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8621         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8622         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8623         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8624         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8625         * features/i386/amd64.xml: Add 64bit-segments.xml.
8626         * features/i386/amd64-avx-avx512.c: Regenerated.
8627         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8628         * features/i386/amd64-avx-mpx.c: Regenerated.
8629         * features/i386/amd64-avx.c: Regenerated.
8630         * features/i386/amd64-mpx.c: Regenerated.
8631         * features/i386/amd64.c: Regenerated.
8632         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8633         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8634         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8635         * regformats/i386/amd64-avx.dat: Regenerated.
8636         * regformats/i386/amd64-mpx.dat: Regenerated.
8637         * regformats/i386/amd64.dat: Regenerated.
8638
8639 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8640
8641         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8642         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8643
8644 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8645
8646         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8647         unsetenv.
8648         * gnulib/aclocal.m4: Regenerate.
8649         * gnulib/config.in: Regenerate.
8650         * gnulib/configure: Regenerate.
8651         * gnulib/import/Makefile.am: Regenerate.
8652         * gnulib/import/Makefile.in: Regenerate.
8653         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8654         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8655         * gnulib/import/m4/environ.m4: New file.
8656         * gnulib/import/m4/setenv.m4: New file.
8657         * gnulib/import/setenv.c: New file.
8658         * gnulib/import/unsetenv.c: New file.
8659
8660 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8661
8662         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8663         address when op is DW_OP_addr.
8664
8665 2017-07-09  Tom Tromey  <tom@tromey.com>
8666
8667         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8668         check and apply to outer type.
8669
8670 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8671
8672         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8673         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8674         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8675         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8676
8677 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8678
8679         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8680
8681 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8682
8683         * corelow.c (get_core_siginfo): Remove.
8684         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8685         instead of get_core_siginfo.
8686         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8687         * gdbarch.h: Re-generate.
8688         * gdbarch.c: Re-generate.
8689         * linux-tdep.c (linux_core_xfer_siginfo): New.
8690         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8691
8692 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8693
8694         * corelow.c (thread_section_name): Move to ...
8695         * gdbcore.h (thread_section_name): ... here.
8696
8697 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8698
8699         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8700         (struct siginfo32): New.
8701         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8702         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8703         via ptrace(PT_LWPINFO).
8704
8705 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8706
8707         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8708         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8709         (fbsd_get_siginfo_type): New.
8710         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8711         (_initialize_fbsd_tdep): New.
8712
8713 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8714
8715         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8716         a singular dwo_unit*) to support multiple CUs in the same way that
8717         multiple TUs are supported.
8718         (create_cus_hash_table): Replace create_dwo_cu with a function for
8719         parsing multiple CUs from a DWO file.
8720         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8721         create_dwo_cu.
8722         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8723         htab_find, rather than comparing the signature to a singleton CU in
8724         the dwo_file.
8725
8726 2017-07-06  Pedro Alves  <palves@redhat.com>
8727
8728         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8729
8730 2017-07-04  Pedro Alves  <palves@redhat.com>
8731
8732         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8733         * gdbtypes.h (TYPE_STATIC): Delete.
8734         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8735         is_synchronized, is_native>: Delete.
8736         <dummy>: Bump.
8737         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8738         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8739         (TYPE_FN_FIELD_ABSTRACT): Delete.
8740
8741 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8742
8743         * buffer.h (buffer_finish): Fix spelling mistakes.
8744
8745 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8746
8747         * .dir-locals.el: Automatically switch to C-style comments in
8748         versions of Emacs that support the feature.
8749
8750 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8751             Pedro Alves  <palves@redhat.com>
8752
8753         PR cli/21688
8754         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8755         (process_next_line): New variable 'inline_cmd'.
8756         Adjust 'if' clauses for "python", "compile" and "guile" to use
8757         'command_name_equals' and check for '!inline_cmd'.
8758
8759 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8760
8761         PR cli/21688
8762         * cli/cli-script.c (command_name_equals_not_inline): New function.
8763         (process_next_line): Adjust 'if' clauses for "python", "compile"
8764         and "guile" to use command_name_equals_not_inline.
8765
8766 2017-06-29  Pedro Alves  <palves@redhat.com>
8767
8768         * completer.c (expression_completer): Call
8769         linespec_location_completer instead of location_completer.
8770
8771 2017-06-29  Pedro Alves  <palves@redhat.com>
8772
8773         * completer.c (expression_completer): Remove code that recomputes
8774         'text' from 'word'.
8775
8776 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8777
8778         * regformats/regdat.sh: Generate code with
8779         "ifndef IN_PROCESS_AGENT".
8780
8781 2017-06-28  Pedro Alves  <palves@redhat.com>
8782
8783         * command.h: Include "common/scoped_restore.h".
8784
8785 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8786
8787         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8788         instead of obstack_grow.
8789
8790 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8791
8792         PR gdb/21337
8793         * symfile.c (reread_symbols): Call objfiles_changed just before
8794         read_symbols.
8795
8796 2017-06-27  Pedro Alves  <palves@redhat.com>
8797
8798         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8799         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8800         (completion_list_add_symbol, completion_list_add_msymbol):
8801         ... these new functions.
8802         (add_symtab_completions)
8803         (default_make_symbol_completion_list_break_on_1): Adjust.
8804
8805 2017-06-27  Pedro Alves  <palves@redhat.com>
8806
8807         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8808         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8809         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8810         dtor.
8811         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8812         'storage_obstack' field an auto_obstack.  In-class initialize all
8813         non-bitfield fields.  Make minsyms_read bool.
8814         * symfile.c (read_symbols): Adjust.
8815
8816 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8817
8818         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8819         (gdbsim_store_register): Likewise.
8820
8821 2017-06-27  Pedro Alves  <palves@redhat.com>
8822
8823         * c-exp.y (name_obstack): Now an auto_obstack.
8824         (yylex): Use auto_obstack::clear.
8825         (c_parse): Use auto_obstack::clear instead of reinitializing and
8826         freeing the obstack.
8827         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8828         * d-exp.y (name_obstack): Now an auto_obstack.
8829         (yylex): Use auto_obstack::clear.
8830         (d_parse): Use auto_obstack::clear instead of reinitializing and
8831         freeing the obstack.
8832         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8833         auto_obstack.
8834         * dwarf2read.c (create_addrmap_from_index)
8835         (dwarf2_build_psymtabs_hard)
8836         (update_enumeration_type_from_children): Likewise.
8837         * gdb_obstack.h (auto_obstack): New type.
8838         * go-exp.y (name_obstack): Now an auto_obstack.
8839         (build_packaged_name): Use auto_obstack::clear.
8840         (go_parse): Use auto_obstack::clear instead of reinitializing and
8841         freeing the obstack.
8842         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8843         auto_obstack.
8844         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8845         * rust-exp.y (work_obstack): Now an auto_obstack.
8846         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8847         reinitializing and freeing the obstack.
8848         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8849         (host_char_to_target): Use auto_obstack.
8850         * utils.h (make_cleanup_obstack_free): Delete declaration.
8851         * valprint.c (generic_emit_char, generic_printstr): Use
8852         auto_obstack.
8853
8854 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8855
8856         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8857         thread.
8858         (darwin_init_thread_list): Don't update dummy thread.
8859         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8860
8861 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8862
8863         * record-full.c (netorder16): Remove.
8864
8865 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8866
8867         * common/diagnostics.h: Define macros for GCC.
8868         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8869         * common/vec.h: Include diagnostics.h.
8870         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8871         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8872         warning.
8873
8874 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8875
8876         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8877         New macro.
8878         * ada-lex.l: Ignore deprecated register warnings.
8879
8880 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8881
8882         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8883         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8884
8885 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8886
8887         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8888         its own line.
8889
8890 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8891
8892         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8893
8894 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8895
8896         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8897         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8898         (xtensa_register_read_masked): Likewise.
8899
8900 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8901
8902         * common/environ.c (gdb_environ::unset): Update comment.
8903
8904 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8905
8906         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8907         registers.
8908
8909 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8910
8911         * record-full.c (record_full_exec_insn): Use byte_vector.
8912
8913 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8914
8915         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8916         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8917
8918 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8919
8920         * remote.c (cached_reg): Move from here...
8921         * regcache.h (cached_reg): ...to here.
8922         * python/py-unwind.c (struct reg_info): Remove.
8923         (cached_frame_info): Use cached_reg_t.
8924         (pyuw_prev_register): Likewise.
8925         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8926         (pyuw_dealloc_cache): Free all registers.
8927
8928 2017-06-22  Pedro Alves  <palves@redhat.com>
8929             Simon Marchi  <simon.marchi@ericsson.com>
8930
8931         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8932         warning.
8933         * common/diagnostics.h: New file.
8934
8935 2017-06-22  Pedro Alves  <palves@redhat.com>
8936
8937         * common/agent.h: Add include guards.
8938
8939 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8940
8941         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8942         talk about addressable units instead of bytes.
8943
8944 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8945
8946         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8947         of '::const_iterator'.
8948
8949 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8950
8951         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8952         'unittests/environ-selftests.c'.
8953         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8954         * charset.c (find_charset_names): Declare object 'iconv_env'.
8955         Update code to use 'iconv_env' object.  Remove call to
8956         'free_environ'.
8957         * common/environ.c: Include <utility>.
8958         (make_environ): Delete function.
8959         (free_environ): Delete function.
8960         (gdb_environ::clear): New function.
8961         (gdb_environ::operator=): New function.
8962         (gdb_environ::get): Likewise.
8963         (environ_vector): Delete function.
8964         (set_in_environ): Delete function.
8965         (gdb_environ::set): New function.
8966         (unset_in_environ): Delete function.
8967         (gdb_environ::unset): New function.
8968         (gdb_environ::envp): Likewise.
8969         * common/environ.h: Include <vector>.
8970         (struct gdb_environ): Delete; transform into...
8971         (class gdb_environ): ... this class.
8972         (free_environ): Delete prototype.
8973         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8974         environ_vector): Likewise.
8975         * infcmd.c (run_command_1): Update code to call
8976         'envp' from 'gdb_environ' class.
8977         (environment_info): Update code to call methods from 'gdb_environ'
8978         class.
8979         (unset_environment_command): Likewise.
8980         (path_info): Likewise.
8981         (path_command): Likewise.
8982         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8983         (inferior::inferior): Initialize 'environment' using the host's
8984         information.
8985         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8986         Include "environ.h".
8987         (class inferior) <environment>: Change type from 'struct
8988         gdb_environ' to 'gdb_environ'.
8989         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8990         methods from 'gdb_environ' class.
8991         * solib.c (solib_find_1): Likewise
8992         * unittests/environ-selftests.c: New file.
8993
8994 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8995
8996         * features/i386/i386-linux.xml: Exchange the order of including
8997         32bit-linux.xml and 32bit-sse.xml.
8998         * features/i386/i386-linux.c: Regenerated.
8999
9000 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9001
9002         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9003         Delete copy ctor and assignment operator.
9004         (tdesc_type): Likewise.
9005         (tdesc_feature): Likewise.
9006         (tdesc_free_reg): Remove.
9007         (tdesc_create_reg): Use new.
9008         (tdesc_free_type): Remove.
9009         (tdesc_create_vector): Use new.
9010         (tdesc_create_union): Likewise.
9011         (tdesc_create_flags): Likewise.
9012         (tdesc_create_enum): Likewise.
9013         (tdesc_free_feature): Delete.
9014         (free_target_description): Use delete.
9015
9016 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9017
9018         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9019         registers.
9020
9021 2017-06-19  Pedro Alves  <palves@redhat.com>
9022
9023         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9024         after gdb::unlinker.
9025
9026 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9027
9028         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9029         gdb_environ to access an environment variable.
9030
9031 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9032
9033         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9034         gdb_byte*.
9035
9036 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9037
9038         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9039
9040 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9041
9042         * configure: Re-generate.
9043         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9044
9045 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9046
9047         * configure: Re-generate.
9048         * warning.m4: Pass -Werror to compiler when checking for
9049         supported warning flags.
9050
9051 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9052
9053         * Makefile.in (COMPILE.pre): Add "-x c++".
9054
9055 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9056             Pedro Alves  <palves@redhat.com>
9057             Yao Qi  <yao.qi@linaro.org>
9058
9059         * defs.h (RequireLongest): New.
9060         (extract_integer): Declare function template.
9061         (extract_signed_integer): Remove the declaration, but define it
9062         static inline.
9063         (extract_unsigned_integer): Likewise.
9064         (store_integer): Declare function template.
9065         (store_signed_integer): Remove the declaration, but define it
9066         static inline.
9067         (store_unsigned_integer): Likewise.
9068         * findvar.c (extract_integer): New function template.
9069         (extract_signed_integer): Remove.
9070         (extract_unsigned_integer): Remove.
9071         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9072         instantiations.
9073         (store_integer): New function template.
9074         (store_signed_integer): Remove.
9075         (store_unsigned_integer): Remove.
9076         (store_integer): Explicit instantiations.
9077         * regcache.c (regcache_raw_read_signed): Update.
9078         (regcache::raw_read): New function.
9079         (regcache::raw_read_signed): Remove.
9080         (regcache::raw_read_unsigned): Remove.
9081         (regcache_raw_read_unsigned): Update.
9082         (regcache_raw_write_unsigned): Update.
9083         (regcache::raw_write_signed): Remove.
9084         (regcache::raw_write): New function.
9085         (regcache_cooked_read_signed): Update.
9086         (regcache::raw_write_unsigned): Remove.
9087         (regcache::cooked_read_signed): Remove.
9088         (regcache_cooked_read_unsigned): Update.
9089         (regcache::cooked_read_unsigned): Remove.
9090         (regcache_cooked_write_signed): Update.
9091         (regcache_cooked_write_unsigned): Update.
9092         * regcache.h (regcache) <raw_read_signed>: Remove.
9093         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9094         <raw_read, raw_write>: New.
9095         <cooked_read_signed, cooked_write_signed>: Remove.
9096         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9097         <cooked_read, cooked_write>: New.
9098         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9099         (sh64_pseudo_register_write): Update.
9100
9101 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9102
9103         * arc-tdep.c (arc_disassembler_options): New variable.
9104         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9105         of default_print_insn.
9106         (arc_delayed_print_insn): Set info->section when needed,
9107         use default_print_insn to retrieve a disassembler.
9108
9109 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9110
9111         PR gdb/21574
9112         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9113         to mention $SHELL and startup-with-shell.
9114
9115 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9116
9117         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9118
9119 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9120
9121         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9122         default_print_insn instead of print_insn_aarch64.
9123         * arm-tdep.c (gdb_print_insn_arm): Call
9124         default_print_insn instead of print_insn_big_arm
9125         and print_insn_little_arm.
9126         * i386-tdep.c (i386_print_insn): Call default_print_insn
9127         instead of print_insn_i386.
9128         * ia64-tdep.c (ia64_print_insn): Call
9129         default_print_insn instead of print_insn_ia64.
9130         * mips-tdep.c (gdb_print_insn_mips): Call
9131         default_print_insn instead of print_insn_big_mips
9132         and print_insn_little_mips.
9133         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9134         instead of print_insn_spu.
9135
9136 2017-06-14  Pedro Alves  <palves@redhat.com>
9137
9138         * ada-lang.c: Include "common/byte-vector.h".
9139         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9140         * charset.c (wchar_iterator::iterate): Resize the vector instead
9141         of reserving it.
9142         * common/byte-vector.h: Include "common/def-vector.h".
9143         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9144         * cli/cli-dump.c: Include "common/byte-vector.h".
9145         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9146         * common/byte-vector.h: New file.
9147         * common/def-vector.h: New file.
9148         * common/default-init-alloc.h: New file.
9149         * dwarf2loc.c: Include "common/byte-vector.h".
9150         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9151         instead of reserving it.
9152         * dwarf2read.c: Include "common/byte-vector.h".
9153         (data_buf::m_vec): Now a gdb::byte_vector.
9154         * gdb_regex.c: Include "common/def-vector.h".
9155         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9156         * mi/mi-main.c: Include "common/byte-vector.h".
9157         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9158         * printcmd.c: Include "common/byte-vector.h".
9159         (print_scalar_formatted): Use gdb::byte_vector.
9160         * valprint.c: Include "common/byte-vector.h".
9161         (maybe_negate_by_bytes, print_decimal_chars): Use
9162         gdb::byte_vector.
9163
9164 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9165
9166         * darwin-nat.c: Include "nat/fork-inferior.h".
9167
9168 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9169
9170         * configure.nat: Factor out Darwin bits that are not
9171         architecture-specific.  Add fork-inferior.o.
9172
9173 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9174
9175         * configure.nat: Factor out AIX bits that are not
9176         architecture-specific.  Add fork-inferior.o.
9177
9178 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9179
9180         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9181         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9182         wrappers that just call rw_pieced_value.
9183
9184 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9185
9186         * dwarf2loc.c (write_pieced_value): When writing the data for a
9187         memory piece, use write_memory_with_notification instead of
9188         write_memory.
9189
9190 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9191
9192         * valops.c (read_value_memory): Change embedded_offset to
9193         represent a bit offset instead of a byte offset.
9194         * value.h (read_value_memory): Adjust comment.
9195
9196 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9197
9198         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9199         dest_offset_bits and source_offset_bits.
9200         (write_pieced_value): Likewise.
9201
9202 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9203
9204         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9205         given by DW_OP_bit_piece.
9206         (write_pieced_value): Likewise.
9207
9208 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9209
9210         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9211         some other preparations to the places where sufficient information
9212         is available.
9213         (write_pieced_value): Likewise.
9214
9215 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9216
9217         * dwarf2loc.c (bits_to_bytes): New function.
9218         (read_pieced_value): Fix offset calculations for register pieces
9219         on big-endian targets.
9220         (write_pieced_value): Likewise.
9221
9222 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9223
9224         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9225         (write_pieced_value): Likewise.
9226
9227 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9228
9229         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9230         transfer the source value's least significant bits, instead of its
9231         lowest-addressed ones.  Rename type_len to max_offset.
9232         (read_pieced_value): Mirror above changes to write_pieced_value as
9233         applicable.
9234
9235 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9236
9237         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9238         truncate full bytes from dest_offset_bits before using it as an
9239         offset into the buffer.
9240
9241 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9242
9243         * dwarf2loc.c (write_pieced_value): Include transfer size in
9244         byte-wise check.
9245
9246 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9247
9248         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9249         calculation of this_size.
9250
9251 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9252
9253         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9254         when targeting a bit-field.
9255         (write_pieced_value): Likewise.
9256
9257 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9258
9259         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9260         (allocate_piece_closure): Drop addr_size parameter.
9261         (dwarf2_evaluate_loc_desc_full): Adjust call to
9262         allocate_piece_closure.
9263
9264 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         PR gdb/21226
9267         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9268         the LSB end, independent of endianness.
9269
9270 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9271
9272         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9273         size capping.
9274
9275 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9276
9277         * mips-linux-nat.c: Move include features/mips*-linux.c to
9278         mips-linux-tdep.c.
9279         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9280         to mips-linux-tdep.c.
9281         * mips-linux-tdep.c: Include features/mips*-linux.c
9282         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9283         functions.
9284         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9285         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9286         (tdesc_mips64_dsp_linux): Declare.
9287
9288 2017-06-12  Tom Tromey  <tom@tromey.com>
9289
9290         * valprint.h (val_print_type_code_int): Remove.
9291         * valprint.c (generic_val_print_int): Always call
9292         val_print_scalar_formatted.
9293         (val_print_type_code_int): Remove.
9294         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9295         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9296         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9297         * ada-valprint.c (ada_val_print_num): Use
9298         val_print_scalar_formatted.
9299
9300 2017-06-12  Tom Tromey  <tom@tromey.com>
9301
9302         * printcmd.c (print_scalar_formatted): Unify the two switches.
9303         Don't convert scalars to LONGEST.
9304
9305 2017-06-12  Tom Tromey  <tom@tromey.com>
9306
9307         PR exp/16225:
9308         * valprint.h (print_decimal_chars): Update.
9309         * valprint.c (maybe_negate_by_bytes): New function.
9310         (print_decimal_chars): Add "is_signed" argument.
9311         * printcmd.c (print_scalar_formatted): Update.
9312
9313 2017-06-12  Tom Tromey  <tom@tromey.com>
9314
9315         PR exp/16225:
9316         * valprint.h (print_binary_chars, print_hex_chars): Update.
9317         * valprint.c (val_print_type_code_int): Update.
9318         (print_binary_chars): Add "zero_pad" argument.
9319         (emit_octal_digit): New function.
9320         (print_octal_chars): Don't zero-pad.
9321         (print_decimal_chars): Likewise.
9322         (print_hex_chars): Add "zero_pad" argument.
9323         * sh64-tdep.c (sh64_do_fp_register): Update.
9324         * regcache.c (regcache::dump): Update.
9325         * printcmd.c (print_scalar_formatted): Update.
9326         * infcmd.c (default_print_one_register_info): Update.
9327
9328 2017-06-12  Pedro Alves  <palves@redhat.com>
9329             Alan Hayward  <alan.hayward@arm.com>
9330
9331         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9332         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9333         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9334         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9335         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9336
9337 2017-06-12  Pedro Alves  <palves@redhat.com>
9338
9339         * dwarf2read.c (mapped_symtab::data): Now a vector of
9340         symtab_index_entry instead of vector of
9341         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9342         whether an element's name is NULL instead of checking whether the
9343         element itself is NULL.
9344         (find_slot): Change return type.  Adjust.
9345         (hash_expand, , add_index_entry, uniquify_cu_indices)
9346         (write_hash_table): Adjust.
9347
9348 2017-06-12  Pedro Alves  <palves@redhat.com>
9349
9350         * dwarf2read.c (recursively_count_psymbols): New function.
9351         (write_psymtabs_to_index): Call it to compute number of psyms and
9352         pass estimate size of psyms_seen to unordered_set's ctor.
9353
9354 2017-06-12  Pedro Alves  <palves@redhat.com>
9355
9356         * dwarf2read.c (write_hash_table): Check if key already exists
9357         before emplacing.
9358
9359 2017-06-12  Pedro Alves  <palves@redhat.com>
9360
9361         * dwarf2read.c (data_buf::append_space): Rename to...
9362         (data_buf::grow): ... this, and make private.  Adjust all callers.
9363         (data_buf::append_uint): New method.
9364         (add_address_entry, write_one_signatured_type)
9365         (write_psymtabs_to_index): Use it.
9366
9367 2017-06-12  Pedro Alves  <palves@redhat.com>
9368
9369         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9370         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9371         (data_buf::file_write): Call ::fwrite directly.
9372
9373 2017-06-12  Pedro Alves  <palves@redhat.com>
9374
9375         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9376         std::vector::erase.
9377
9378 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9379
9380         Code cleanup: C++ify .gdb_index producer.
9381         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9382         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9383         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9384         (create_strtab, add_string): Remove.
9385         (file_write, data_buf): New.
9386         (struct symtab_index_entry): Use std::vector for cu_indices.
9387         (struct mapped_symtab): Use std::vector for data.
9388         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9389         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9390         Remove.
9391         (find_slot): Change return type.  Update it to the new data structures.
9392         (hash_expand, add_index_entry): Update it to the new data structures.
9393         (offset_type_compare): Remove.
9394         (uniquify_cu_indices): Update it to the new data structures.
9395         (c_str_view, c_str_view_hasher, vector_hasher): New.
9396         (add_indices_to_cpool): Remove.
9397         (write_hash_table): Update it to the new data structures.
9398         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9399         (eq_psymtab_cu_index): Remove.
9400         (psym_index_map): New typedef.
9401         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9402         reference and std::unordered_map for cu_index_htab.
9403         (add_address_entry, add_address_entry_worker, write_address_map)
9404         (write_psymbols): Update it to the new data structures.
9405         (write_obstack): Remove.
9406         (struct signatured_type_index_data): Change types_list to a data_buf
9407         reference and psyms_seen to a std::unordered_set reference.
9408         (write_one_signatured_type, recursively_write_psymbols)
9409         (write_psymtabs_to_index): Update it to the new data structures.
9410
9411 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9412
9413         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9414         separate-debug-file commands.
9415         * symfile.h (separate_debug_file_debug): New global.
9416         * symfile.c (separate_debug_file_debug): New global.
9417         (separate_debug_file_exists, find_separate_debug_file): Add
9418         debug output.
9419         (_initialize_symfile): Add "set debug separate-debug-file"
9420         command.
9421         * build-id.c (build_id_to_debug_bfd,
9422         find_separate_debug_file_by_buildid): Add debug output.
9423
9424 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9425
9426         * gdbarch.sh (displaced_step_free_closure): Remove.
9427         * gdbarch.h, gdbarch.c: Re-generate.
9428         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9429         displaced_step_free_closure.
9430         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9431         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9432         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9433         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9434         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9435         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9436         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9437         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9438         * infrun.c (displaced_step_clear): Call xfree instead of
9439         gdbarch_displaced_step_free_closure.
9440
9441 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9442
9443         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9444         NULL".
9445
9446 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9447
9448         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9449         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9450         (mn10300_push_dummy_call): Likewise.
9451
9452 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9453
9454         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9455
9456 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9457
9458         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9459
9460 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9461
9462         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9463         able to start inferiors using a shell.
9464         (New remote packets): Announce new packet "QStartupWithShell".
9465         * remote.c: Add PACKET_QStartupWithShell.
9466         (extended_remote_create_inferior): Handle new
9467         PACKET_QStartupWithShell.
9468         (remote_protocol_features) <QStartupWithShell>: New entry for
9469         PACKET_QStartupWithShell.
9470         (_initialize_remote): Call "add_packet_config_cmd" for
9471         QStartupShell.
9472
9473 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9474             Pedro Alves  <palves@redhat.com>
9475
9476         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9477         and "nat/fork-inferior.h".
9478         * common/common-inferior.h: New file, with contents from
9479         "gdb/inferior.h".
9480         * commom/common-utils.c: Include "common-utils.h".
9481         (stringify_argv): New function.
9482         * common/common-utils.h (stringify_argv): New prototype.
9483         * configure.nat: Add "fork-inferior.o" as a dependency for
9484         "*linux*", "fbsd*" and "nbsd*" hosts.
9485         * corefile.c (get_exec_file): Update comment.
9486         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9487         instead of "startup_inferior".
9488         (darwin_create_inferior): Call "add_thread_silent" after
9489         "fork_inferior".
9490         * fork-child.c: Cleanup unnecessary includes.
9491         (SHELL_FILE): Move to "common/common-fork-child.c".
9492         (environ): Likewise.
9493         (exec_wrapper): Initialize.
9494         (get_exec_wrapper): New function.
9495         (breakup_args): Move to "common/common-fork-child.c"; rename to
9496         "breakup_args_for_exec".
9497         (escape_bang_in_quoted_argument): Move to
9498         "common/common-fork-child.c".
9499         (saved_ui): New variable.
9500         (prefork_hook): New function.
9501         (postfork_hook): Likewise.
9502         (postfork_child_hook): Likewise.
9503         (gdb_startup_inferior): Likewise.
9504         (fork_inferior): Move to "common/common-fork-child.c".  Update
9505         function to support gdbserver.
9506         (startup_inferior): Likewise.
9507         * gdbcore.h (get_exec_file): Remove declaration.
9508         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9509         instead of "startup_inferior".  Call "add_thread_silent" after
9510         "fork_inferior".
9511         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9512         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9513         instead of "startup_inferior".  Call "add_thread_silent" after
9514         "fork_inferior".
9515         * inferior.h: Include "common-inferior.h".
9516         (trace_start_error): Move to "common/common-utils.h".
9517         (trace_start_error_with_name): Likewise.
9518         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9519         (startup_inferior): Likewise.
9520         (gdb_startup_inferior): New prototype.
9521         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9522         * nat/fork-inferior.h: New file.
9523         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9524         instead of "startup_inferior".  Call "add_thread_silent" after
9525         "fork_inferior".
9526         * target.h (target_terminal_init): Move prototype to
9527         "target/target.h".
9528         (target_terminal_inferior): Likewise.
9529         (target_terminal_ours): Likewise.
9530         * target/target.h (target_terminal_init): New prototype, moved
9531         from "target.h".
9532         (target_terminal_inferior): Likewise.
9533         (target_terminal_ours): Likewise.
9534         * utils.c (gdb_flush_out_err): New function.
9535
9536 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9537
9538         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9539         * common/common-gdbthread.h: New file, with parts from
9540         "gdb/gdbthread.h".
9541         * gdbthread.h: Include "common-gdbthread.h".
9542         (switch_to_thread): Moved to "common/common-gdbthread.h".
9543
9544 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9545
9546         * Makefile.in (SFILES): Add "common/job-control.c".
9547         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9548         (COMMON_OBS): Add "job-control.o".
9549         * common/job-control.c: New file, with contents from
9550         "gdb/inflow.c".
9551         * common/job-control.h: New file, with contents from "terminal.h".
9552         * fork-child.c: Include "job-control.h".
9553         * inflow.c: Include "job-control.h".
9554         (gdb_setpgid): Move to "common/common-inflow.c".
9555         (_initialize_inflow): Move setting of "job_control" to
9556         "handle_job_control".
9557         * terminal.h (job_control): Moved to "common/common-terminal.h".
9558         (gdb_setpgid): Likewise.
9559         * top.c: Include "job_control.h".
9560         * utils.c: Likewise.
9561         (job_control): Moved to "job-control.c".
9562
9563 2017-06-07  Pedro Alves  <palves@redhat.com>
9564
9565         * Makefile.in (SFILES): Add gdb_regex.c.
9566         (COMMON_OBS): Add gdb_regex.o.
9567         * ada-lang.c (ada_add_standard_exceptions)
9568         (ada_add_exceptions_from_frame, name_matches_regex)
9569         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9570         parameter type to compiled_regex.  Adjust.
9571         (ada_exceptions_list): Use compiled_regex.
9572         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9573         std::unique_ptr<compiled_regex>.
9574         (exception_catchpoint::~exception_catchpoint): Remove regfree
9575         call.
9576         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9577         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9578         * breakpoint.c (solib_catchpoint::compiled): Now a
9579         std::unique_ptr<compiled_regex>.
9580         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9581         (check_status_catch_solib): Adjust to use compiled_regex.
9582         (add_solib_catchpoint): Adjust to use compiled_regex.
9583         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9584         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9585         compiled_regex reference.  Adjust to use it.
9586         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9587         declaration.  Include "gdb_regex.h".
9588         (apropos_cmd): Change regex parameter to compiled_regex reference.
9589         * gdb_regex.c: New file.
9590         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9591         declarations.
9592         (class compiled_regex): New.
9593         * linux-tdep.c: Include "common/gdb_optional.h".
9594         (struct mapping_regexes): New, factored out from
9595         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9596         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9597         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9598         * probe.c: Include "common/gdb_optional.h".
9599         (collect_probes): Use compiled_regex and gdb::optional and remove
9600         cleanups.
9601         * skip.c: Include "common/gdb_optional.h".
9602         (skiplist_entry::compiled_function_regexp): Now a
9603         gdb::optional<compiled_regex>.
9604         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9605         (free_skiplist_entry): Remove regfree call.
9606         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9607         compiled_regex and gdb::optional.
9608         * symtab.c: Include "common/gdb_optional.h".
9609         (search_symbols): Use compiled_regex and gdb::optional.
9610         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9611         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9612         to gdb_regex.c.
9613
9614 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9615
9616         * regcache.c (regcache::save): Avoid buffer use.
9617         (regcache::dump): Likewise.
9618
9619 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9620
9621         * sh-tdep.c (sh_pseudo_register_read): Remove
9622         MAX_REGISTER_SIZE.
9623         (sh_pseudo_register_write): Likewise.
9624         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9625         (sh64_pseudo_register_write): Likewise
9626
9627 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9628
9629         * aarch64-tdep.c (aarch64_store_return_value): Use
9630         V_REGISTER_SIZE.
9631         (aarch64_pseudo_read_value): Likewise.
9632         (aarch64_pseudo_write): Likewise.
9633
9634 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9635
9636         * regformats/regdef.h (set_register_cache): Remove the
9637         declaration.
9638
9639 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9640
9641         * frame.c (frame_unwind_register_signed): Use
9642         frame_unwind_register_value.
9643
9644 2017-06-06  Pedro Alves  <palves@redhat.com>
9645
9646         PR breakpoints/21553
9647         * breakpoint.c (create_breakpoints_sal_default)
9648         (init_breakpoint_sal, create_breakpoint_sal): Use
9649         gdb::unique_xmalloc_ptr for string parameters.
9650         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9651         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9652         (base_breakpoint_create_breakpoints_sal)
9653         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9654         (strace_marker_create_breakpoints_sal)
9655         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9656         string parameters.
9657         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9658         gdb::unique_xmalloc_ptr for string parameters.
9659         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9660         parameters.
9661
9662 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9663
9664         * alpha-tdep.c (alpha_register_to_value): Use
9665         get_frame_register_value.
9666         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9667
9668 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9669
9670         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9671         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9672         (ia64_value_to_register): Likewise.
9673         (ia64_extract_return_value): Likewise.
9674         (ia64_store_return_value): Likewise.
9675         (ia64_push_dummy_call): Likewise.
9676
9677 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9678
9679         GDB 8.0 released.
9680
9681 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9682
9683         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9684
9685 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9686
9687         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9688         parameter.
9689         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9690
9691 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9692
9693         * event-loop.c (poll_timers): Unallocate timer using delete
9694         instead of xfree.
9695
9696 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9697
9698         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9699         (struct breakpoint) <~breakpoint>: New.
9700         (struct watchpoint): Inherit from breakpoint.
9701         <~watchpoint>: New.
9702         <base>: Remove.
9703         (struct tracepoint): Inherit from breakpoint.
9704         <base>: Remove.
9705         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9706         (struct longjmp_breakpoint): Inherit from breakpoint.
9707         <~longjmp_breakpoint>: New.
9708         <base>: Remove.
9709         (new_breakpoint_from_type): Remove casts.
9710         (watchpoint_in_thread_scope): Remove reference to base field.
9711         (watchpoint_del_at_next_stop): Likewise.
9712         (update_watchpoint): Likewise.
9713         (watchpoint_check): Likewise.
9714         (bpstat_check_watchpoint): Likewise.
9715         (set_longjmp_breakpoint): Likewise.
9716         (struct fork_catchpoint): Inherit from breakpoint.
9717         <base>: Remove.
9718         (struct solib_catchpoint): Inherit from breakpoint.
9719         <~solib_catchpoint>: New.
9720         <base>: Remove.
9721         (dtor_catch_solib): Change to ...
9722         (solib_catchpoint::~solib_catchpoint): ... this.
9723         (breakpoint_hit_catch_solib): Remove reference to base field.
9724         (add_solib_catchpoint): Likewise.
9725         (create_fork_vfork_event_catchpoint): Likewise.
9726         (struct exec_catchpoint): Inherit from breakpoint.
9727         <~exec_catchpoint>: New.
9728         <base>: Remove.
9729         (dtor_catch_exec): Change to ...
9730         (exec_catchpoint::~exec_catchpoint): ... this.
9731         (dtor_watchpoint): Change to ...
9732         (watchpoint::~watchpoint): ... this.
9733         (watch_command_1): Remove reference to base field.
9734         (catch_exec_command_1): Likewise.
9735         (base_breakpoint_dtor): Change to ...
9736         (breakpoint::~breakpoint): ... this.
9737         (base_breakpoint_ops): Remove dtor field value.
9738         (longjmp_bkpt_dtor): Change to ...
9739         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9740         (strace_marker_create_breakpoints_sal): Remove reference to base
9741         field.
9742         (delete_breakpoint): Don't manually call breakpoint destructor.
9743         (create_tracepoint_from_upload): Remove reference to base field.
9744         (trace_pass_set_count): Likewise.
9745         (initialize_breakpoint_ops): Don't initialize
9746         momentary_breakpoint_ops, don't set dtors.
9747         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9748         <~ada_catchpoint>: New.
9749         <base>: Remove.
9750         (create_excep_cond_exprs): Remove reference to base field.
9751         (dtor_exception): Change to ...
9752         (ada_catchpoint::~ada_catchpoint): ... this.
9753         (dtor_catch_exception): Remove.
9754         (dtor_catch_exception_unhandled): Remove.
9755         (dtor_catch_assert): Remove.
9756         (create_ada_exception_catchpoint): Remove reference to base
9757         field.
9758         (initialize_ada_catchpoint_ops): Don't set dtors.
9759         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9760         breakpoint.
9761         <~signal_catchpoint>: New.
9762         <base>: Remove.
9763         (signal_catchpoint_dtor): Change to ...
9764         (signal_catchpoint::~signal_catchpoint): ... this.
9765         (create_signal_catchpoint): Remove reference to base field.
9766         (initialize_signal_catchpoint_ops): Don't set dtor.
9767         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9768         from breakpoint.
9769         <~syscall_catchpoint>: New.
9770         <base>: Remove.
9771         (dtor_catch_syscall): Change to ...
9772         (syscall_catchpoint::~syscall_catchpoint): ... this.
9773         (create_syscall_event_catchpoint): Remove reference to base
9774         field.
9775         (initialize_syscall_catchpoint_ops): Don't set dtor.
9776         * break-catch-throw.c (struct exception_catchpoint): Inherit
9777         from breakpoint.
9778         <~exception_catchpoint>: New.
9779         <base>: Remove.
9780         (dtor_exception_catchpoint): Change to ...
9781         (exception_catchpoint::~exception_catchpoint): ... this.
9782         (handle_gnu_v3_exceptions): Remove reference to base field.
9783         (initialize_throw_catchpoint_ops): Don't set dtor.
9784         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9785         field.
9786         * remote.c (remote_get_tracepoint_status): Likewise.
9787         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9788         * tracefile.c (tracefile_fetch_registers): Likewise.
9789         * tracepoint.c (actions_command): Likewise.
9790         (validate_actionline): Likewise.
9791         (tfind_1): Likewise.
9792         (get_traceframe_location): Likewise.
9793         (find_matching_tracepoint_location): Likewise.
9794         (parse_tracepoint_status): Likewise.
9795         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9796
9797 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9798
9799         * breakpoint.c (struct longjmp_breakpoint): New struct.
9800         (is_tracepoint_type): Change return type to bool.
9801         (is_longjmp_type): New function.
9802         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9803         (set_raw_breakpoint_without_location): Use
9804         new_breakpoint_from_type.
9805         (set_raw_breakpoint): Likewise.
9806
9807 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9808
9809         * breakpoint.c (new_breakpoint_from_type): New function.
9810         (create_breakpoint_sal): Use new_breakpoint_from_type and
9811         unique_ptr.
9812         (create_breakpoint): Likewise.
9813
9814 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9815
9816         * memattr.c (mem_info_command): Rename to ...
9817         (info_mem_command): ... this.
9818         (mem_enable_command): Rename to ...
9819         (enable_mem_command): ... this.
9820         (mem_disable_command): Rename to ...
9821         (disable_mem_command): ... this.
9822         (mem_delete_command): Rename to ...
9823         (delete_mem_command): ... this.
9824         (_initialize_mem): Adjust function names.
9825
9826 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9827
9828         * btrace.c (handle_pt_insn_events): New.
9829         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9830         STATUS.  Split into this and ...
9831         (handle_pt_insn_event_flags): ... this.
9832
9833 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9834
9835         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9836         and struct pt_insn.resynced.
9837         * configure: Regenerated.
9838         * config.in: Regenerated.
9839
9840 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9841
9842         * btrace.c (ftrace_find_call_by_number): New function.
9843         (ftrace_new_function): Store objects, not pointers.
9844         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9845         ftrace_new_gap, ftrace_update_function,
9846         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9847         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9848         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9849         btrace_ends_with_single_insn, btrace_call_get): Account for
9850         btrace_thread_info::functions now storing objects.
9851         * btrace.h (struct btrace_thread_info): Add constructor.
9852         (struct btrace_thread_info) <functions>: Make std::vector.
9853         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9854         Initialize with default values.
9855         * record-btrace.c (record_btrace_frame_sniffer): Account for
9856         btrace_thread_info::functions now storing objects.
9857
9858 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9859
9860         * btrace.c: Remove typedef bfun_s.
9861         (ftrace_new_gap): Directly add gaps to the list of gaps.
9862         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9863         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9864         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9865         instead of gdb VEC.
9866
9867 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9868
9869         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9870         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9871         with btrace_thread_info::next_segment and
9872         btrace_thread_info::prev_segment.
9873         * btrace.h: Remove struct btrace_func_link.
9874         (struct btrace_function): Replace pair of function segment pointers
9875         with pair of indices.
9876         * python/py-record-btrace.c (btpy_call_prev_sibling,
9877         btpy_call_next_sibling): Replace references to
9878         btrace_thread_info::segment with btrace_thread_info::next_segment and
9879         btrace_thread_info::prev_segment.
9880         * record-btrace.c (record_btrace_frame_this_id): Use
9881         btrace_find_call_by_number.
9882
9883 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9884
9885         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9886         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9887         btrace_insn_next, btrace_insn_prev): Remove references to
9888         btrace_thread_info::flow.
9889         * btrace.h (struct btrace_function): Remove FLOW.
9890
9891 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9892
9893         * btrace.c (ftrace_find_call_by_number): New function.
9894         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9895         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9896         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9897         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9898         index.
9899         * btrace.h (struct btrace_function): Turn UP into an index.
9900         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9901         as an index.
9902         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9903         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9904         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9905
9906 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9907
9908         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9909         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9910         ftrace_update_function, ftrace_compute_global_level_offset,
9911         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9912         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9913         btrace_insn_end, btrace_is_empty): Remove references to
9914         btrace_thread_info::begin and btrace_thread_info::end.
9915         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9916         (struct btrace_thread_info) <functions>: Adjust comment.
9917         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9918         btrace_thread_info::begin.
9919
9920 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9921
9922         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9923         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9924         ftrace_update_function): Remove arguments that implicitly were always
9925         BTINFO->END.
9926         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9927         Don't pass BTINFO->END.
9928
9929 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9930
9931         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9932         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9933         btrace_find_insn_by_number): Replace function segment pointer with
9934         index.
9935         (btrace_insn_cmp): Simplify.
9936         * btrace.h: (struct btrace_insn_iterator) Rename index to
9937         insn_index.  Replace function segment pointer with index into function
9938         segment vector.
9939         * record-btrace.c (record_btrace_call_history): Replace function
9940         segment pointer use with index.
9941         (record_btrace_frame_sniffer): Retrieve function call segment through
9942         vector.
9943         (record_btrace_set_replay): Remove defunc't safety check.
9944
9945 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9946
9947         * btrace.c (btrace_ends_with_single_insn): New function.
9948         (btrace_call_get, btrace_call_number, btrace_call_begin,
9949         btrace_call_end, btrace_call_next, btrace_call_prev,
9950         btrace_find_call_by_number): Use index into call segment vector
9951         instead of pointer.
9952         (btrace_call_cmp): Simplify.
9953         * btrace.h (struct btrace_call_iterator): Replace function call segment
9954         pointer with index into vector.
9955         * record-btrace.c (record_btrace_call_history): Use index instead of
9956         pointer.
9957
9958 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9959
9960         * btrace.c (btrace_insn_begin, btrace_insn_end,
9961         btrace_find_insn_by_number): Add btinfo to iterator.
9962         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9963
9964 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9965
9966         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9967         and save pointers directly.
9968         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9969         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9970         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9971         changed signature of functions.
9972         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9973         (btrace_fetch): Remove code that adds btrace_function pointers to
9974         vector of btrace_functions.
9975         (btrace_clear): Simplify freeing vector of btrace_functions.
9976
9977 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9978
9979         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9980         Replace VEC_* with std::vector functions.
9981         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9982         (struct btrace_thread_info)<functions>: Change type to std::vector.
9983
9984 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9985
9986         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9987         "Removed targets and native configurations" up.  Merge duplicate
9988         "New commands" sub-sections.  Add "New options" sub-sections.
9989
9990 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9991
9992         * defs.h (copy_integer_to_size): New declaration.
9993         * findvar.c (copy_integer_to_size): New function.
9994         (do_cint_test): New selftest function.
9995         (copy_integer_to_size_test): Likewise.
9996         (_initialize_findvar): Likewise.
9997         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9998         (mips_fbsd_collect_reg): Use raw_collect_integer.
9999         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10000         (mips64_fill_gregset): Use raw_collect_integer
10001         (mips64_fill_fpregset): Use raw_supply_integer.
10002         * regcache.c (regcache::raw_supply_integer): New function.
10003         (regcache::raw_collect_integer): Likewise.
10004         * regcache.h: (regcache::raw_supply_integer): New declaration.
10005         (regcache::raw_collect_integer): Likewise.
10006
10007 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10008
10009         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10010         (COMMON_OBS): Add gdbarch-selftests.o.
10011         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10012         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10013         * gdbarch-selftests.c: New file.
10014         * regcache.h (regcache) <~regcache>: Mark it virtual if
10015         GDB_SELF_TEST.
10016         <raw_write>: Likewise.
10017
10018 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10019
10020         * regcache.c (current_regcache): Change it to
10021         regcache::current_regcache.
10022         (regcache_observer_target_changed): Update.
10023         (regcache_thread_ptid_changed): Make it a regcache static
10024         method.
10025         (regcache_thread_ptid_changed): Update.
10026         (class regcache_access): New.
10027         (current_regcache_test): Update.
10028         (_initialize_regcache): Update.
10029         * regcache.h: Include forward_list.
10030         (regcache): Declare regcache_thread_ptid_changed and declare
10031         registers_changed_ptid as friend.
10032
10033 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10034
10035         * i387-tdep.c (i387_register_to_value): Use register_size
10036         instead of TYPE_LENGTH.
10037         * m68k-tdep.c (m68k_register_to_value): Likewise.
10038
10039 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10040
10041         * i387-tdep.c (i387_convert_register_p): Return false if type
10042         code isn't TYPE_CODE_FLT.
10043
10044 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10045
10046         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10047         length is 4.
10048         (alpha_register_to_value): Remove type length check.
10049         (alpha_value_to_register): Likewise.
10050
10051 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10052
10053         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10054         TYPE_CODE_FLT.
10055
10056 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10057
10058         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10059         TYPE_CODE_FLT or not.
10060
10061 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10062
10063         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10064         * avr-tdep.c (avr_gdbarch_init): Likewise.
10065         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10066         * cris-tdep.c (cris_gdbarch_init): Likewise.
10067         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10068         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10069         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10070         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10071         * mep-tdep.c (mep_gdbarch_init): Likewise.
10072         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10073         * mips-tdep.c (mips_gdbarch_init): Likewise.
10074         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10075         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10076         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10077         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10078         * v850-tdep.c (v850_gdbarch_init): Likewise.
10079
10080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10081
10082         * selftest-arch.c (tests_with_arch): Call registers_changed
10083         and reinit_frame_cache.
10084         * selftest.c (run_self_tests): Likewise.
10085
10086 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10087
10088         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10089         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10090
10091 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10092
10093         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10094         set_gdbarch_print_insn.
10095
10096 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10097
10098         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10099         set_gdbarch_print_insn.
10100
10101 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10102
10103         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10104         set_gdbarch_print_insn.
10105         * arc-tdep.c (arc_gdbarch_init): Likewise.
10106         * arch-utils.c: include dis-asm.h.
10107         (default_print_insn): New function.
10108         * arch-utils.h (default_print_insn): Declare.
10109         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10110         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10111         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10112         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10113         * frv-tdep.c (frv_gdbarch_init): Likewise.
10114         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10115         * gdbarch.sh (print_insn): Use default_print_insn.
10116         * gdbarch.c: Regenerated.
10117         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10118         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10119         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10120         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10121         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10122         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10123         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10124         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10125         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10126         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10127         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10128         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10129         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10130         * mt-tdep.c (mt_gdbarch_init): Likewise.
10131         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10132         * nios2-tdep.c (nios2_print_insn): Remove.
10133         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10134         * rx-tdep.c (rx_gdbarch_init): Likewise.
10135         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10136         * score-tdep.c (score_print_insn): Remove.
10137         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10138         * sh-tdep.c (sh_gdbarch_init): Likewise.
10139         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10140         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10141         * tic6x-tdep.c (tic6x_print_insn): Remove.
10142         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10143         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10144         * v850-tdep.c (v850_gdbarch_init): Likewise.
10145         * vax-tdep.c (vax_gdbarch_init): Likewise.
10146         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10147         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10148
10149 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10150
10151         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10152         (MIPS_FP0_REGNUM): Remove.
10153         (MIPS_FSR_REGNUM): Remove.
10154         (mips_fbsd_supply_fpregs): Use mips_regnum.
10155         (mips_fbsd_supply_gregs): Likewise.
10156         (mips_fbsd_collect_fpregs): Likewise.
10157         (mips_fbsd_collect_gregs): Likewise.
10158
10159 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10160
10161         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10162         (getpfpregs_supplies): New function.
10163         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10164         getfpregs_supplies.
10165         (mips_fbsd_store_inferior_registers): Likewise.
10166
10167 2017-05-22  Pedro Alves <palves@redhat.com>
10168
10169         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10170         maintainer.
10171
10172 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10173
10174         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10175         (store_register): Likewise.
10176         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10177         (get_decimal_float_return_value): Likewise.
10178         (do_ppc_sysv_return_value): Likewise.
10179         (ppc64_sysv_abi_push_integer): Likewise.
10180         (ppc64_sysv_abi_push_freg): Likewise.
10181         (ppc64_sysv_abi_return_value_base): Likewise.
10182         (ppc64_sysv_abi_return_value): Likewise.
10183         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10184         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10185         * rs6000-nat.c: Likewise.
10186         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10187         (rs6000_value_to_register): Likewise.
10188         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10189
10190 2017-05-21  Tom Tromey  <tom@tromey.com>
10191
10192         PR rust/21466:
10193         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10194         arrays as "[T]", not "[T; ]".
10195
10196 2017-05-19  Tom Tromey  <tom@tromey.com>
10197
10198         PR rust/21484:
10199         * rust-lang.c (exp_descriptor_rust): New function.
10200         (rust_language_defn): Use it.
10201         * p-lang.c (pascal_language_defn): Update.
10202         * opencl-lang.c (opencl_language_defn): Update.
10203         * objc-lang.c (objc_language_defn): Update.
10204         * m2-lang.c (m2_language_defn): Update.
10205         * language.h (struct language_defn)
10206         <la_watch_location_expression>: New member.
10207         * language.c (unknown_language_defn, auto_language_defn)
10208         (local_language_defn): Update.
10209         * go-lang.c (go_language_defn): Update.
10210         * f-lang.c (f_language_defn): Update.
10211         * d-lang.c (d_language_defn): Update.
10212         * c-lang.h (c_watch_location_expression): Declare.
10213         * c-lang.c (c_watch_location_expression): New function.
10214         (c_language_defn, cplus_language_defn, asm_language_defn)
10215         (minimal_language_defn): Use it.
10216         * breakpoint.c (watch_command_1): Call
10217         la_watch_location_expression.
10218         * ada-lang.c (ada_language_defn): Update.
10219
10220 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10221
10222         PR tui/21482
10223         * gdb_curses.h (NOMACROS): Define.
10224         (NCURSES_NOMACROS): Define.
10225
10226 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10227
10228         PR tui/21482
10229         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10230         arg to char *.
10231         * tui/tui-wingeneral.c (box_win): Likewise.
10232         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10233         (tui_show_source_line): Likewise.
10234         (tui_show_exec_info_content): Likewise.
10235
10236 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10237
10238         * sparc-tdep.c (sparc_structure_return_p)
10239         (sparc_arg_on_registers_p): New functions.
10240         (sparc32_store_arguments): Use them.
10241         * sparc64-tdep.c (sparc64_16_byte_align_p)
10242         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10243         Handle TYPE_CODE_ARRAY.
10244
10245 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10246
10247         * cli/cli-decode.c (add_alias_cmd): New function.
10248         * command.h (add_alias_cmd): Declare.
10249         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10250         instead call add_alias_cmd.
10251
10252 2017-05-17  Pedro Alves  <palves@redhat.com>
10253
10254         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10255         (nat_makefile_frag): ... this.  All references updated.
10256         * configure.ac: Likewise.
10257         * configure.nat: Likewise.  Enhance comments.
10258         * configure: Regenerate.
10259
10260 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10261
10262         * procfs.c (procfs_create_inferior): Change prototype to match
10263         definition.
10264
10265 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10266
10267         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10268         C++ compiler warning.
10269
10270 2017-05-12  Tom Tromey  <tom@tromey.com>
10271
10272         PR rust/21483:
10273         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10274         recurse, just call value_struct_elt directly.
10275
10276 2017-05-12  Tom Tromey  <tom@tromey.com>
10277
10278         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10279         OP_RUST_ARRAY>: Fix.
10280
10281 2017-05-12  Tom Tromey  <tom@tromey.com>
10282
10283         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10284
10285 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10286
10287         * regcache.c: Include <forward_list>.
10288         (struct regcache_list): Remove.
10289         (current_regcache): Update.
10290         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10291         (regcache_thread_ptid_changed): Likewise.
10292         (registers_changed_ptid): Likewise.
10293         (current_regcache_size): Likewise.
10294
10295 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10296
10297         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10298         (current_regcache_size): New function.
10299         (current_regcache_test): New function.
10300         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10301
10302 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10303
10304         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10305         (print_gp_register_row): Use get_frame_register_value.
10306
10307 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10308
10309         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10310         (mips_supply_fpregset): Likewise.
10311         (mips64_supply_gregset): Likewise.
10312
10313 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10314
10315         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10316         regcache->raw_supply_zeroed.
10317
10318 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10319
10320         * configure.nat: Rearrange 'case' statements to match
10321         host before cpu.
10322
10323 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10324
10325         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10326         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10327         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10328         "@nat_extra_makefile_frag@".
10329         (Makefile): Remove dependency on "@frags@".
10330         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10331         (data-directory/Makefile): Likewise.
10332         * config/aarch64/linux.mh: Deleted; moved contents to
10333         "gdb/configure.nat".
10334         * config/alpha/alpha-linux.mh: Likewise.
10335         * config/alpha/nbsd.mh: Likewise.
10336         * config/arm/linux.mh: Likewise.
10337         * config/arm/nbsdelf.mh: Likewise.
10338         * config/i386/cygwin.mh: Likewise.
10339         * config/i386/cygwin64.mh: Likewise.
10340         * config/i386/darwin.mh: Likewise.
10341         * config/i386/fbsd.mh: Likewise.
10342         * config/i386/fbsd64.mh: Likewise.
10343         * config/i386/go32.mh: Likewise.
10344         * config/i386/i386gnu.mh: Likewise.
10345         * config/i386/i386sol2.mh: Likewise.
10346         * config/i386/linux.mh: Likewise.
10347         * config/i386/linux64.mh: Likewise.
10348         * config/i386/mingw.mh: Likewise.
10349         * config/i386/mingw64.mh: Likewise.
10350         * config/i386/nbsd64.mh: Likewise.
10351         * config/i386/nbsdelf.mh: Likewise.
10352         * config/i386/nto.mh: Likewise.
10353         * config/i386/obsd.mh: Likewise.
10354         * config/i386/obsd64.mh: Likewise.
10355         * config/i386/sol2-64.mh: Likewise.
10356         * config/ia64/linux.mh: Likewise.
10357         * config/m32r/linux.mh: Likewise.
10358         * config/m68k/linux.mh: Likewise.
10359         * config/m68k/nbsdelf.mh: Likewise.
10360         * config/m68k/obsd.mh: Likewise.
10361         * config/m88k/obsd.mh: Likewise.
10362         * config/mips/fbsd.mh: Likewise.
10363         * config/mips/linux.mh: Likewise.
10364         * config/mips/nbsd.mh: Likewise.
10365         * config/mips/obsd64.mh: Likewise.
10366         * config/pa/linux.mh: Likewise.
10367         * config/pa/nbsd.mh: Likewise.
10368         * config/pa/obsd.mh: Likewise.
10369         * config/powerpc/aix.mh: Likewise.
10370         * config/powerpc/fbsd.mh: Likewise.
10371         * config/powerpc/linux.mh: Likewise.
10372         * config/powerpc/nbsd.mh: Likewise.
10373         * config/powerpc/obsd.mh: Likewise.
10374         * config/powerpc/ppc64-linux.mh: Likewise.
10375         * config/powerpc/spu-linux.mh: Likewise.
10376         * config/s390/linux.mh: Likewise.
10377         * config/sh/nbsd.mh: Likewise.
10378         * config/sparc/fbsd.mh: Likewise.
10379         * config/sparc/linux.mh: Likewise.
10380         * config/sparc/linux64.mh: Likewise.
10381         * config/sparc/nbsd64.mh: Likewise.
10382         * config/sparc/nbsdelf.mh: Likewise.
10383         * config/sparc/obsd64.mh: Likewise.
10384         * config/sparc/sol2.mh: Likewise.
10385         * config/tilegx/linux.mh: Likewise.
10386         * config/vax/nbsdelf.mh: Likewise.
10387         * config/vax/obsd.mh: Likewise.
10388         * config/xtensa/linux.mh: Likewise.
10389         * config/i386/i386gnu.mn: New file, with excerpts from
10390         "config/i386/i386gnu.mh".
10391         * configure: Regenerate.
10392         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10393         *.mh files under "gdb/config".
10394         * configure.nat: New file, with contents from the
10395         "gdb/config/*/*.mh" files.
10396
10397 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10398
10399         * btrace.c (btrace_clear): Free insn vector.
10400
10401 2017-05-05  Pedro Alves  <palves@redhat.com>
10402
10403         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10404         * configure: Regenerate.
10405
10406 2017-05-04  Pedro Alves  <palves@redhat.com>
10407
10408         * Makefile.in (SFILES): Add progspace-and-thread.c.
10409         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10410         (COMMON_OBS): Add progspace-and-thread.o.
10411         * breakpoint.c: Include "progspace-and-thread.h".
10412         (update_inserted_breakpoint_locations)
10413         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10414         Use scoped_restore_current_pspace_and_thread.
10415         (create_std_terminate_master_breakpoint): Use
10416         scoped_restore_current_program_space.
10417         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10418         (print_breakpoint_location): Use
10419         scoped_restore_current_program_space.
10420         (bp_loc_is_permanent): Use
10421         scoped_restore_current_pspace_and_thread.
10422         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10423         (download_tracepoint_locations): Use
10424         scoped_restore_current_pspace_and_thread.
10425         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10426         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10427         (enum step_over_calls_kind): Moved from inferior.h.
10428         (class scoped_restore_current_thread): New class.
10429         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10430         declaration.
10431         (scoped_restore_current_thread): New class.
10432         * infcmd.c: Include "common/gdb_optional.h".
10433         (continue_1, proceed_after_attach): Use
10434         scoped_restore_current_thread.
10435         (notice_new_inferior): Use scoped_restore_current_thread.
10436         * inferior.c: Include "progspace-and-thread.h".
10437         (restore_inferior, save_current_inferior): Delete.
10438         (add_inferior_command, clone_inferior_command): Use
10439         scoped_restore_current_pspace_and_thread.
10440         * inferior.h (scoped_restore_current_inferior): New class.
10441         * infrun.c: Include "progspace-and-thread.h" and
10442         "common/gdb_optional.h".
10443         (follow_fork_inferior): Use
10444         scoped_restore_current_pspace_and_thread.
10445         (scoped_restore_exited_inferior): New class.
10446         (handle_vfork_child_exec_or_exit): Use
10447         scoped_restore_exited_inferior,
10448         scoped_restore_current_pspace_and_thread,
10449         scoped_restore_current_thread and scoped_restore.
10450         (fetch_inferior_event): Use scoped_restore_current_thread.
10451         * linespec.c (decode_line_full, decode_line_1): Use
10452         scoped_restore_current_program_space.
10453         * mi/mi-main.c: Include "progspace-and-thread.h".
10454         (exec_continue): Use scoped_restore_current_thread.
10455         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10456         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10457         * proc-service.c (ps_pglobal_lookup): Use
10458         scoped_restore_current_program_space.
10459         * progspace-and-thread.c: New file.
10460         * progspace-and-thread.h: New file.
10461         * progspace.c (release_program_space, clone_program_space): Use
10462         scoped_restore_current_program_space.
10463         (restore_program_space, save_current_program_space)
10464         (save_current_space_and_thread): Delete.
10465         (switch_to_program_space_and_thread): Moved to
10466         progspace-and-thread.c.
10467         * progspace.h (save_current_program_space)
10468         (save_current_space_and_thread): Delete declarations.
10469         (scoped_restore_current_program_space): New class.
10470         * remote.c (remote_btrace_maybe_reopen): Use
10471         scoped_restore_current_thread.
10472         * symtab.c: Include "progspace-and-thread.h".
10473         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10474         * thread.c (print_thread_info_1): Use
10475         scoped_restore_current_thread.
10476         (struct current_thread_cleanup): Delete.
10477         (do_restore_current_thread_cleanup)
10478         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10479         (scoped_restore_current_thread::~scoped_restore_current_thread):
10480         ... this new dtor.
10481         (make_cleanup_restore_current_thread): Rename/convert to ...
10482         (scoped_restore_current_thread::scoped_restore_current_thread):
10483         ... this new ctor.
10484         (thread_apply_all_command): Use scoped_restore_current_thread.
10485         (thread_apply_command): Use scoped_restore_current_thread.
10486         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10487         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10488
10489 2017-05-04  Pedro Alves  <palves@redhat.com>
10490
10491         * thread.c (make_cleanup_restore_current_thread): Move
10492         find_thread_ptid call before the is_stopped call.  Assert that the
10493         thread is found.  Replace is_stopped call by checking the thread's
10494         state directly.  Remove unnecessary NULL-thread check.
10495
10496 2017-05-04  Pedro Alves  <palves@redhat.com>
10497
10498         * corelow.c (thread_section_name): New class.
10499         (get_core_register_section, get_core_siginfo): Use it.
10500
10501 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10502
10503         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10504         (get_core_register_section): Remove xfree of NULL pointer.
10505
10506 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10507
10508         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10509         * regcache.c (regcache::raw_supply_zeroed): New function.
10510         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10511
10512 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10513
10514         * gdbarch.sh: Remove commented out definition of
10515         TARGET_CHAR_BIT.
10516         * gdbarch.h: Re-generate.
10517
10518 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10519
10520         * configure: Regenerate.
10521
10522 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10523
10524         * solib-target.c (solib_target_relocate_section_addresses):
10525         Remove num_section_bases, num_bases, segment_bases variables.
10526
10527 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10528
10529         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10530
10531 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10532
10533         * solib-target.c: Include <vector>
10534         (struct lm_info_target) <~lm_info_target>: Remove.
10535         <segment_bases, section_bases>: Change type to
10536         std::vector<CORE_ADDR>.
10537         (library_list_start_segment, library_list_start_section,
10538         library_list_end_library,
10539         solib_target_relocate_section_addresses): Adjust.
10540
10541 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10542
10543         * gdbarch.sh (software_single_step): Change return type to
10544         std::vector<CORE_ADDR>.
10545         * gdbarch.c, gdbarch.h: Re-generate.
10546         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10547         Adjust.
10548         (arm_deal_with_atomic_sequence_raw): Adjust.
10549         (thumb_get_next_pcs_raw): Adjust.
10550         (arm_get_next_pcs_raw): Adjust.
10551         (arm_get_next_pcs): Adjust.
10552         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10553         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10554         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10555         (alpha_software_single_step): Adjust.
10556         * alpha-tdep.h (alpha_software_single_step): Adjust.
10557         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10558         * arm-tdep.c (arm_software_single_step): Adjust.
10559         (arm_breakpoint_kind_from_current_state): Adjust.
10560         * arm-tdep.h (arm_software_single_step): Adjust.
10561         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10562         * cris-tdep.c (cris_software_single_step): Adjust.
10563         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10564         (micromips_deal_with_atomic_sequence): Adjust.
10565         (deal_with_atomic_sequence): Adjust.
10566         (mips_software_single_step): Adjust.
10567         * mips-tdep.h (mips_software_single_step): Adjust.
10568         * moxie-tdep.c (moxie_software_single_step): Adjust.
10569         * nios2-tdep.c (nios2_software_single_step): Adjust.
10570         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10571         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10572         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10573         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10574         * sparc-tdep.c (sparc_software_single_step): Adjust.
10575         * spu-tdep.c (spu_software_single_step): Adjust.
10576         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10577
10578 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10579
10580         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10581         * gdbarch.h: Re-generate.
10582
10583 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10584
10585         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10586         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10587         * python/py-instruction.c, python/py-instruction.h: New file.
10588         * python/py-record.c: Add py-instruction.h include.
10589         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10590         gdb.RecordInstruction.
10591         * python/python-internal.h: Add gdbpy_initialize_instruction
10592         declaration.
10593         * python/python.c (do_start_initialization): Add
10594         gdbpy_initialize_instruction.
10595
10596 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10597
10598         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10599         Remove.
10600         (btrace_func_from_recpy_func): New function.
10601         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10602         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10603         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10604         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10605         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10606         Also, use new helper functions.
10607         (btpy_list_item): Use new helper functions.
10608         (recpy_bt_function_call_history): Use new type name.
10609         (btpy_call_getset): Remove.
10610         (gdbpy_initialize_btrace): Remove code to initialize
10611         gdb.BtraceFunctionCall.
10612         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10613         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10614         recpy_bt_func_prev, recpy_bt_func_next): New export.
10615         * python/py-record.c (recpy_func_type): New static object.
10616         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10617         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10618         recpy_func_next): New function.
10619         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10620         (recpy_func_getset): New static object.
10621         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10622         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10623
10624 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10625
10626         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10627         (btpy_object, btpy_insn_type, btpy_new): Remove.
10628         (btpy_list_object): Use gdb.RecordInstruction type instead of
10629         gdb.BtraceInstruction type.
10630         (btrace_insn_from_recpy_insn): New function.
10631         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10632         btpy_new.
10633         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10634         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10635         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10636         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10637         instead of btpy_object.
10638         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10639         btpy_insn_data, btpy_insn_decode): Rename to ...
10640         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10641         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10642         recpy_bt_insn_decode): This.  Also, use new helper functions.
10643         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10644         recpy_insn_type.
10645         (btpy_insn_getset): Remove.
10646         (gdbpy_initialize_btrace): Remove code to initialize
10647         gdb.BtraceInstruction.  Use recpy_element_object.
10648         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10649         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10650         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10651         * python/py-record.c (recpy_insn_type): New static object.
10652         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10653         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10654         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10655         New function.
10656         (recpy_insn_getset): New static object.
10657         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10658         * python/py-record.h (recpy_element_object): New typedef.
10659         (recpy_insn_type, recpy_insn_new): New export.
10660
10661 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10662
10663         * py-record-btrace.c (btpy_insn_new): Removed.
10664         (btpy_insn_or_gap_new): New function.
10665         (btpy_insn_error): Removed.
10666         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10667         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10668         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10669         btpy_insn_or_gap_new instead of btpy_insn_new.
10670         (btpy_insn_getset): Remove btpy_insn_error.
10671         * py-record.c (recpy_gap_type): New static object.
10672         (recpy_gap_object): New typedef.
10673         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10674         recpy_gap_reason_string): New function.
10675         (recpy_gap_getset): New static object.
10676         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10677         * py-record.h (recpy_gap_new): New export.
10678
10679 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10680
10681         * python/py-record.c (recpy_ptid): Remove.
10682         (recpy_record_getset): Remove recpy_ptid.
10683
10684 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10685
10686         * btrace.c (btrace_fetch): Set inferior_ptid.
10687         * python/py-record-btrace.c: Add "py-record.h" include.
10688         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10689         recpy_bt_end, recpy_bt_instruction_history,
10690         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10691         in gdb.Record object instead of current ptid.
10692         * python/py-record.c: Include new "py-record.h" file.
10693         (recpy_record_object): Moved to py-record.h.
10694         * python/py-record.h: New file.
10695
10696 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10697
10698         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10699         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10700         indentation.
10701
10702 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10703
10704         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10705         the past maintainers section.
10706
10707 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10708
10709         * infcmd.c (get_return_value): Use regcache ctor, and remove
10710         cleanup.
10711
10712 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10713             Pedro Alves  <palves@redhat.com>
10714
10715         * regcache.c (regcache::regcache): New tag dispatch ctor.
10716         (do_cooked_read): Moved above.
10717         (regcache_dup): Use the tag dispatch ctor..
10718         * regcache.h (regcache): Declare ctor, delete copy ctor and
10719         assignment operator, remove friend regcache_dup.
10720
10721 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10722
10723         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10724         call method save instead of regcache_cpy.
10725         * regcache.h (struct regcache): Make regcache_dup a friend.
10726
10727 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10728
10729         * regcache.c (struct regcache): Move to regcache.h
10730         (regcache::arch): New method.
10731         (regcache_get_ptid): Update.
10732         (get_regcache_arch): Call arch method.
10733         (get_regcache_aspace): Call method aspace.
10734         (register_buffer): Change it to method.
10735         (regcache_save): Change it to regcache::save.
10736         (regcache_restore): Likewise.
10737         (regcache_cpy_no_passthrough): Remove the declaration.
10738         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10739         (regcache_cpy_no_passthrough): Change it to method
10740         cpy_no_passthrough.
10741         (regcache_register_status): Change it to method
10742         get_register_status.
10743         (regcache_invalidate): Change it to method invalidate.
10744         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10745         (regcache_raw_update): Change it to method raw_update.
10746         (regcache_raw_read): Likewise.
10747         (regcache_raw_read_signed): Likewise.
10748         (regcache_raw_read_unsigned): Likewise.
10749         (regcache_raw_write_signed): Likewise.
10750         (regcache_raw_write_unsigned): Likewise.
10751         (regcache_cooked_read): Likewise.
10752         (regcache_cooked_read_value): Likewise.
10753         (regcache_cooked_read_signed): Likewise.
10754         (regcache_cooked_read_unsigned): Likewise.
10755         (regcache_cooked_write_signed): Likewise.
10756         (regcache_cooked_write_unsigned): Likewise.
10757         (regcache_raw_set_cached_value): Likewise.
10758         (regcache_raw_write): Likewise.
10759         (regcache_cooked_write): Likewise.
10760         (regcache_xfer_part): Likewise.
10761         (regcache_raw_read_part): Likewise.
10762         (regcache_raw_write_part): Likewise.
10763         (regcache_cooked_read_part): Likewise.
10764         (regcache_cooked_write_part): Likewise.
10765         (regcache_raw_supply): Likewise.
10766         (regcache_raw_collect): Likewise.
10767         (regcache_transfer_regset): Likewise.
10768         (regcache_supply_regset): Likewise.
10769         (regcache_collect_regset): Likewise.
10770         (regcache_debug_print_register): Likewise.
10771         (enum regcache_dump_what): Move it to regcache.h.
10772         (regcache_dump): Change it to method dump.
10773         * regcache.h (enum regcache_dump_what): New.
10774         (class regcache): New.
10775         * target.c (target_fetch_registers): Call method
10776         debug_print_register.
10777         (target_store_registers): Likewise.
10778
10779 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10780
10781         * windows-nat.c (struct lm_info_windows): Initialize field.
10782         (windows_make_so): Allocate lm_info_windows with new.
10783         (windows_free_so): Free lm_info_windows with delete.
10784
10785 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10786
10787         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10788         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10789         cleanup.
10790         (darwin_free_so): Free lm_info_darwin with delete.
10791
10792 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10793
10794         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10795         <l_addr_p>: Change type to bool.
10796         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10797         (svr4_free_so): Free lm_info_svr4 with delete.
10798         (svr4_copy_library_list): Replace memcpy with call to copy
10799         constructor.
10800         (library_list_start_library, svr4_default_sos): Allocate
10801         lm_info_svr4 with new.
10802
10803 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10804
10805         * solib-target.c (struct lm_info_target): Add destructor,
10806         initialize fields.
10807         <name>: Change type to std::string.
10808         (library_list_start_library): Allocate lm_info_target with new.
10809         (solib_target_free_library_list): Free lm_info_target with
10810         delete.
10811         (solib_target_current_sos): Adapt to std::string.
10812         (solib_target_free_so): Free lm_info_target with delete.
10813
10814 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10815
10816         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10817         fields.
10818         (frv_current_sos): Allocate lm_info_frv with new.
10819         (frv_relocate_main_executable): Free lm_info_frv with delete,
10820         allocate with new.
10821         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10822
10823 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10824
10825         * solib-frv.c (struct lm_info_frv): Fix indentation.
10826
10827 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10828
10829         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10830         map field.
10831         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10832         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10833         and allocate with new.
10834         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10835
10836 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10837
10838         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10839         <filename, member_name>: Change type to std::string.
10840         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10841         (library_list_start_library): Allocate lm_info_aix with new.
10842         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10843         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10844         with copy constructor.
10845
10846 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10847
10848         * solist.h (struct lm_info): Remove.
10849         (struct lm_info_base): New class.
10850         (struct so_list) <lm_info>: Change type to lm_info_base *.
10851         * nto-tdep.c (struct lm_info): Remove.
10852         (lm_addr): Adjust.
10853         * solib-aix.c (struct lm_info): Rename to ...
10854         (struct lm_info_aix): ... this.  Extend lm_info_base.
10855         (lm_info_p): Rename to ...
10856         (lm_info_aix_p): ... this, and adjust.
10857         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10858         solib_aix_parse_libraries, library_list_start_library,
10859         solib_aix_free_library_list, solib_aix_parse_libraries,
10860         solib_aix_get_library_list,
10861         solib_aix_relocate_section_addresses, solib_aix_free_so,
10862         solib_aix_get_section_offsets,
10863         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10864         Adjust.
10865         (struct solib_aix_inferior_data) <library_list>: Adjust.
10866         * solib-darwin.c (struct lm_info): Rename to ...
10867         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10868         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10869         * solib-dsbt.c (struct lm_info): Rename to ...
10870         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10871         (struct dsbt_info) <main_executable_lm_info): Adjust.
10872         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10873         dsbt_relocate_section_addresses): Adjust.
10874         * solib-frv.c (struct lm_info): Rename to ...
10875         (struct lm_info_frv): ... this.  Extend lm_info_base.
10876         (main_executable_lm_info): Adjust.
10877         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10878         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10879         find_canonical_descriptor_in_load_object,
10880         frv_fdpic_find_canonical_descriptor): Adjust.
10881         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10882         to lm_info_svr4.
10883         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10884         svr4_clear_so, svr4_copy_library_list,
10885         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10886         svr4_current_sos, svr4_fetch_objfile_link_map,
10887         solist_update_incremental): Adjust.
10888         * solib-svr4.h (struct lm_info_svr4): Move here from
10889         solib-svr4.c.
10890         * solib-target.c (struct lm_info): Rename to ...
10891         (struct lm_info_target): ... this.  Extend lm_info_base.
10892         (lm_info_p): Rename to ...
10893         (lm_info_target_p): ... this.
10894         (solib_target_parse_libraries, library_list_start_segment,
10895         library_list_start_section, library_list_start_library,
10896         library_list_end_library, solib_target_free_library_list,
10897         solib_target_current_sos, solib_target_free_so,
10898         solib_target_relocate_section_addresses): Adjust.
10899         * windows-nat.c (struct lm_info): Rename to ...
10900         (struct lm_info_windows): ... this.  Extend lm_info_base.
10901         (windows_make_so, handle_load_dll, handle_unload_dll,
10902         windows_xfer_shared_libraries): Adjust.
10903
10904 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10905
10906         * solib-darwin.c (struct darwin_so_list): Remove.
10907         (darwin_current_sos): Allocate an so_list object instead of a
10908         darwin_so_list, separately allocate an lm_info object.
10909         (darwin_free_so): Free lm_info.
10910
10911 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10912
10913         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10914         with fprintf_filtered.
10915
10916 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10917
10918         * regcache.c (regcache::regcache): New function.
10919         (regcache::~regcache): New function.
10920         (regcache_xmalloc_1): Remove.
10921         (regcache_xmalloc): Call new regcache.
10922         (regcache_xfree): Call delete regcache.
10923         (get_thread_arch_aspace_regcache): Call new regcache.
10924
10925 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10926
10927         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10928         lwp instead of ptid_get_lwp.
10929
10930 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10931
10932         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10933         lwp_info instead of getting from inferior_ptid.
10934
10935 2017-04-27  Keith Seitz  <keiths@redhat.com>
10936
10937         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10938         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10939         (CV_CONVERSION_BADNESS): Define.
10940         (rank_one_type): Remove overly restrictive rvalue reference
10941         rank checks.
10942         Add cv-qualifier checks and subranks for type equality.
10943         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10944         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10945         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10946
10947 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10948
10949         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10950         count when creating the object.
10951
10952 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10953             Ulrich Weigand  <uweigand@de.ibm.com>
10954
10955         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10956         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10957         is used in AIX.
10958         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10959         (process_xcoff_symbol): Likewise.
10960         (scan_xcoff_symtab): Likewise.
10961
10962 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10963
10964         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10965         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10966         (ia64_access_reg): Use get_frame_register_unsigned.
10967         (ia64_access_rse_reg): Likewise.
10968         (ia64_libunwind_frame_prev_register): Likewise.
10969
10970 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10971
10972         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10973         * gdbarch.c: Regenerated.
10974         * gdbarch.h: Regenerated.
10975         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10976         visibility external.
10977         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10978         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10979         (enum cfa_how_kind): Move to ...
10980         (struct dwarf2_frame_state_reg_info): Likewise.
10981         (struct dwarf2_frame_state): Likewise.
10982         * dwarf2-frame.h: ... here.
10983         (dwarf2_frame_state_alloc_regs): New declaration.
10984         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10985         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10986
10987 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10988
10989         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10990         regcache_raw_read_unsigned.
10991         (xtensa_pseudo_register_write): Likewise.
10992
10993 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10994
10995         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10996         (nds32_pseudo_register_write): Likewise.
10997
10998 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10999
11000         * regcache.c (struct regcache) <readonly_p>: Change its type
11001         to bool.
11002         (regcache_xmalloc_1): Update parameter type and callers update.
11003
11004 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11005
11006         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11007         set_gdbarch_wchar_bit.
11008         * arm-tdep.c (arm_gdbarch_init): Likewise.
11009
11010 2017-04-25  Pedro Alves  <palves@redhat.com>
11011
11012         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11013         (BothAreRelocatable, memcopy, memmove): Don't define.
11014         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11015         macros.
11016
11017 2017-04-25  Pedro Alves  <palves@redhat.com>
11018
11019         * common/common-defs.h: Include "common/poison.h".
11020         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11021         and adjust.
11022         * common/poison.h: New file.
11023         * common/traits.h: Include <type_traits>.
11024         (Not, Or, Requires): New, moved from common/function-view.h.
11025
11026 2017-04-25  Pedro Alves  <palves@redhat.com>
11027
11028         * breakpoint.h (struct breakpoint): In-class initialize all
11029         fields.  Make boolean fields "bool".
11030         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11031         memset call and initializations no longer necessary.
11032
11033 2017-04-25  Pedro Alves  <palves@redhat.com>
11034
11035         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11036         reference.
11037         (pt_btrace_insn): New function.
11038         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11039
11040 2017-04-25  Pedro Alves  <palves@redhat.com>
11041
11042         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11043         "base" field and inherit from "bp_location" instead.  Add
11044         non-default ctor.
11045         (allocate_location_exception): Use new non-default ctor.
11046         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11047         (init_bp_location): Convert to ...
11048         (bp_location::bp_location): ... this new ctor, and remove memset
11049         call.
11050         (base_breakpoint_allocate_location): Use the new non-default ctor.
11051         * breakpoint.h (bp_location): Now a class.  Declare default and
11052         non-default ctors.  In-class initialize all members.
11053         (init_bp_location): Remove declaration.
11054
11055 2017-04-25  Pedro Alves  <palves@redhat.com>
11056
11057         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11058         assignment operator.
11059
11060 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11061
11062         * doublest.c (convert_doublest_to_floatformat): Call
11063         floatformat_totalsize_bytes.
11064
11065 2017-04-22  Tom Tromey  <tom@tromey.com>
11066
11067         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11068         ui_out_emit_list.
11069         * stack.c (print_frame): Use ui_out_emit_list.
11070         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11071         ui_out_emit_list.
11072         * mi/mi-main.c (print_one_inferior)
11073         (mi_cmd_data_list_register_names)
11074         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11075         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11076         ui_out_emit_list.
11077         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11078         (mi_output_solib_attribs): Use ui_out_emit_list,
11079         ui_out_emit_tuple.
11080         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11081         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11082         (mi_cmd_stack_list_args, list_args_or_locals): Use
11083         ui_out_emit_list.
11084         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11085         * breakpoint.c (print_solib_event, output_thread_groups): Use
11086         ui_out_emit_list.
11087
11088 2017-04-22  Tom Tromey  <tom@tromey.com>
11089
11090         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11091         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11092         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11093
11094 2017-04-22  Tom Tromey  <tom@tromey.com>
11095
11096         * tracepoint.c (tvariables_info_1)
11097         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11098
11099 2017-04-22  Tom Tromey  <tom@tromey.com>
11100
11101         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11102         annotate_arg_emitter.
11103         * breakpoint.c (print_mention_watchpoint)
11104         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11105         * annotate.h (struct annotate_arg_emitter): New.
11106
11107 2017-04-22  Tom Tromey  <tom@tromey.com>
11108
11109         * record-btrace.c (record_btrace_insn_history)
11110         (record_btrace_insn_history_range, record_btrace_call_history)
11111         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11112         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11113         ui_out_emit_tuple.
11114         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11115         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11116         * skip.c (skip_info): Use ui_out_emit_tuple.
11117         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11118         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11119         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11120         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11121         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11122         ui_out_emit_tuple.
11123         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11124         (output_register, mi_cmd_data_read_memory)
11125         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11126         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11127         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11128         Use ui_out_emit_tuple.
11129         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11130         ui_out_emit_tuple.
11131         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11132         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11133         * linux-thread-db.c (info_auto_load_libthread_db): Use
11134         ui_out_emit_tuple.
11135         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11136         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11137         * disasm.c (do_mixed_source_and_assembly_deprecated)
11138         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11139         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11140         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11141         * breakpoint.c (print_one_breakpoint_location)
11142         (print_one_breakpoint): Use ui_out_emit_tuple.
11143         * auto-load.c (print_script, info_auto_load_cmd): Use
11144         ui_out_emit_tuple.
11145         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11146
11147 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11148
11149         * thread.c (print_thread_info_1): Remove dead code.
11150
11151 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11152
11153         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11154         GDB_SELF_TEST.
11155         * arm-tdep.c (selftests::arm_record_test): Likewise.
11156
11157 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11158
11159         * regcache.c (regcache_restore): Remove argument 2.  Replace
11160         argument 3 with regcache.  Get register status from
11161         src->register_status and get register contents from
11162         register_buffer (src, regnum).
11163         (regcache_cpy): Update.
11164
11165 2017-04-19  Pedro Alves  <palves@redhat.com>
11166
11167         * gdbthread.h (thread): Add missing closing parenthesis in
11168         comment.
11169
11170 2017-04-19  Pedro Alves  <palves@redhat.com>
11171
11172         * common/refcounted-object.h: New file.
11173         * gdbthread.h: Include "common/refcounted-object.h".
11174         (thread_info): Inherit from refcounted_object and add comments.
11175         (thread_info::incref, thread_info::decref)
11176         (thread_info::m_refcount): Delete.
11177         (thread_info::deletable): Use the refcounted_object::refcount()
11178         method.
11179         * inferior.c (current_inferior_): Add comment.
11180         (set_current_inferior): Increment/decrement refcounts.
11181         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11182         not-deletable instead of comparing with the current inferior.
11183         (initialize_inferiors): Increment the initial inferior's refcount.
11184         * inferior.h (struct inferior): Forward declare.
11185         Include "common/refcounted-object.h".
11186         (current_inferior, set_current_inferior): Move declaration to
11187         before struct inferior's definition, and fix comment.
11188         (inferior): Inherit from refcounted_object.  Add comments.
11189         * thread.c (switch_to_thread_no_regs): Reference the thread's
11190         inferior pointer directly instead of doing a ptid lookup.
11191         (switch_to_no_thread): New function.
11192         (switch_to_thread(thread_info *)): New function, factored out
11193         from ...
11194         (switch_to_thread(ptid_t)): ... this.
11195         (restore_current_thread): Delete.
11196         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11197         fields, and add 'inf' field.
11198         (do_restore_current_thread_cleanup): Check whether old->inf is
11199         alive instead of looking up an inferior by ptid.  Use
11200         switch_to_thread and switch_to_no_thread.
11201         (restore_current_thread_cleanup_dtor): Use old->inf directly
11202         instead of lookup up an inferior by id.  Decref the inferior.
11203         Don't restore 'removable'.
11204         (make_cleanup_restore_current_thread): Same the inferior pointer
11205         in old, instead of the inferior number.  Incref the inferior.
11206         Don't save/clear 'removable'.
11207
11208 2017-04-19  Pedro Alves  <palves@redhat.com>
11209
11210         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11211         unittests/scoped_restore-selftests.c.
11212         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11213         * common/scoped_restore.h (scoped_restore_base): Make "class".
11214         (scoped_restore_base::release): New public method.
11215         (scoped_restore_base::scoped_restore_base): New protected ctor.
11216         (scoped_restore_base::m_saved_var): New protected field.
11217         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11218         scoped_restore_base base class instead of m_saved_var directly.
11219         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11220         (scoped_restore_tmpl::scoped_restore_tmpl(const
11221         scoped_restore_tmpl<T>&)): Likewise.
11222         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11223         method.
11224         (scoped_restore_tmpl::saved_var): New method.
11225         (scoped_restore_tmpl::m_saved_var): Delete.
11226         * inferior.h (inferior::detaching): Now a bool.
11227         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11228         cleanup.
11229         * unittests/scoped_restore-selftests.c: New file.
11230
11231 2017-04-19  Pedro Alves  <palves@redhat.com>
11232
11233         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11234         Re-sort in alphabetic order.
11235
11236 2017-04-18  Pedro Alves  <palves@redhat.com>
11237
11238         * xml-support.c (obstack_xml_printf): Delete.
11239         * xml-support.h (obstack_xml_printf): Delete.
11240
11241 2017-04-18  Pedro Alves  <palves@redhat.com>
11242
11243         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11244         vdebug, verror, body_text, start_element, end_element, name,
11245         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11246         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11247         is_xinclude>: Make private and add m_ prefix.
11248         (gdb_xml_parser::body_text): New method, based on ...
11249         (gdb_xml_body_text): ... this.  Adjust.
11250         (gdb_xml_parser::vdebug): New method, based on ...
11251         (gdb_xml_debug): ... this.  Adjust.
11252         (gdb_xml_parser::verror): New method, based on ...
11253         (gdb_xml_error): ... this.  Adjust.
11254         (gdb_xml_parser::start_element): New method, based on ...
11255         (gdb_xml_start_element): ... this.  Adjust.
11256         (gdb_xml_start_element_wrapper): Defer to
11257         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11258         (gdb_xml_parser::end_element): New method, based on ...
11259         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11260         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11261         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11262         (gdb_xml_parser::use_dtd): New method, based on ...
11263         (gdb_xml_use_dtd): ... this.  Adjust.
11264         (gdb_xml_parser::parse): New method, based on ...
11265         (gdb_xml_parse): ... this.  Adjust.
11266         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11267         (xinclude_start_include): Adjust to call the parser's name method.
11268         (xml_xinclude_default, xml_xinclude_start_doctype)
11269         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11270         method.
11271         (xml_process_xincludes): Adjust to call parser methods.
11272         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11273         declarations.
11274
11275 2017-04-18  Pedro Alves  <palves@redhat.com>
11276
11277         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11278         gdb::optional<std::string>.
11279         * xml-support.c: Include <string>.
11280         (scope_level::scope_level(scope_level &&))
11281         (scope_level::~scope_level): Delete.
11282         (scope_level::body): Now a std::string.
11283         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11284         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11285         parameter.
11286         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11287         (xinclude_parsing_data::output): Now a std::string reference.
11288         (xinclude_start_include): Adjust.
11289         (xml_xinclude_default): Adjust.
11290         (xml_process_xincludes): Add 'output' parameter, and return bool.
11291         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11292         and return bool.
11293         * xml-tdesc.c: Include <unordered_map> and <string>.
11294         (tdesc_xml_cache): Delete.
11295         (tdesc_xml_cache_s): Delete.
11296         (xml_cache): Now an std::unordered_map.
11297         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11298         (target_fetch_description_xml): Change return type to
11299         gdb::optional<std::string>, and adjust.
11300         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11301         (target_fetch_description_xml): Change return type to
11302         gdb::optional<std::string>.
11303
11304 2017-04-18  Pedro Alves  <palves@redhat.com>
11305
11306         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11307         unittests/optional-selftests.c.
11308         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11309         * unittests/optional-selftests.c: New file.
11310         * unittests/optional/assignment/1.cc: New file.
11311         * unittests/optional/assignment/2.cc: New file.
11312         * unittests/optional/assignment/3.cc: New file.
11313         * unittests/optional/assignment/4.cc: New file.
11314         * unittests/optional/assignment/5.cc: New file.
11315         * unittests/optional/assignment/6.cc: New file.
11316         * unittests/optional/assignment/7.cc: New file.
11317         * unittests/optional/cons/copy.cc: New file.
11318         * unittests/optional/cons/default.cc: New file.
11319         * unittests/optional/cons/move.cc: New file.
11320         * unittests/optional/cons/value.cc: New file.
11321         * unittests/optional/in_place.cc: New file.
11322         * unittests/optional/observers/1.cc: New file.
11323         * unittests/optional/observers/2.cc: New file.
11324
11325 2017-04-18  Pedro Alves  <palves@redhat.com>
11326
11327         * common/gdb_optional.h: Include common/traits.h.
11328         (in_place_t): New type.
11329         (in_place): New constexpr variable.
11330         (optional::optional): Remove member initialization of
11331         m_instantiated.
11332         (optional::optional(in_place_t...)): New constructor.
11333         (optional::~optional): Use reset.
11334         (optional::optional(const optional&)): New.
11335         (optional::optional(const optional&&)): New.
11336         (optional::optional(T &)): New.
11337         (optional::optional(T &&)): New.
11338         (operator::operator=(const optional &)): New.
11339         (operator::operator=(optional &&)): New.
11340         (operator::operator= (const T &))
11341         (operator::operator= (T &&))
11342         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11343         (operator::reset): New.
11344         (operator::m_instantiated):: Add in-class initializer.
11345         * common/traits.h: Include <type_traits>.
11346         (struct And): New types.
11347
11348 2017-04-18  Pedro Alves  <palves@redhat.com>
11349
11350         * xml-support.c: Include <vector>.
11351         (scope_level::scope_level(const gdb_xml_element *))
11352         (scope_level::scope_level(scope_level&&)): New.
11353         (scope_level::~scope_level): New.
11354         (scope_level_s): Delete.
11355         (gdb_xml_parser::scopes): Now a std::vector.
11356         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11357         Use std::vector.
11358         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11359         scope cleanup code.
11360         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11361         of the scopes member.  Use std::vector::emplace_back.
11362
11363 2017-04-18  Pedro Alves  <palves@redhat.com>
11364
11365         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11366         a bool.
11367         (gdb_xml_end_element): Change type of first parameter.
11368         (gdb_xml_cleanup): Rename to ...
11369         (gdb_xml_parser::~gdb_xml_parser): ... this.
11370         (gdb_xml_create_parser_and_cleanup): Delete with ...
11371         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11372         to this new ctor.
11373         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11374         using gdb_xml_create_parser_and_cleanup.
11375         (xinclude_parsing_data): Add ctor/dtor.
11376         (xml_xinclude_cleanup): Delete.
11377         (xml_process_xincludes): Create a local xinclude_parsing_data
11378         instead of heap-allocating one.  Create a local gdb_xml_parser
11379         instead of heap-allocating one with
11380         gdb_xml_create_parser_and_cleanup.
11381
11382 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11383
11384         PR threads/20743
11385         * fbsd-nat.c (resume_one_thread_cb): Remove.
11386         (resume_all_threads_cb): Remove.
11387         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11388         iterate_over_threads.
11389
11390 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11391
11392         * NEWS: Create a new section for the next release branch.
11393         Rename the section of the current branch, now that it has
11394         been cut.
11395
11396 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11397
11398         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11399         * version.in: Bump version to 8.0.50.DATE-git.
11400
11401 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11402
11403         PR gdb/21385
11404         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11405         independently of the host, and fix build breakage on Cygwin.
11406
11407 2017-04-13  Pedro Alves  <palves@redhat.com>
11408
11409         * inferior.c (free_inferior): Convert to ...
11410         (inferior::~inferior): ... this dtor.
11411         (inferior::inferior): New ctor, factored out from ...
11412         (add_inferior_silent): ... here.  Allocate the inferior with a new
11413         expression.
11414         (delete_inferior): Call delete instead of free_inferior.
11415         * inferior.h (gdb_environ, continuation): Forward declare.
11416         (inferior): Now a class.  Add in-class initialization to all
11417         members.  Make boolean fields bool, except 'detaching'.
11418         (inferior::inferior): New explicit ctor.
11419         (inferior::~inferior): New.
11420
11421 2017-04-13  Pedro Alves  <palves@redhat.com>
11422
11423         * inferior.c (init_inferior_list): Delete.
11424         * inferior.h (init_inferior_list): Delete.
11425
11426 2017-04-13  Pedro Alves  <palves@redhat.com>
11427
11428         PR threads/13217
11429         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11430         (top level): Call it twice, with different thread sets.
11431
11432 2017-04-13  Pedro Alves  <palves@redhat.com>
11433
11434         * thread.c: Include <algorithm>.
11435         (thread_array_cleanup): Delete.
11436         (scoped_inc_dec_ref): New class.
11437         (live_threads_count): New function.
11438         (set_thread_refcount): Delete.
11439         (tp_array_compar_ascending): Now a bool.
11440         (tp_array_compar): Convert to a std::sort comparison function.
11441         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11442         and live_threads_count.
11443
11444 2017-04-13  Pedro Alves  <palves@redhat.com>
11445
11446         * infrun.c (follow_fork_inferior): Also switch the current
11447         inferior.
11448
11449 2017-04-13  Pedro Alves  <palves@redhat.com>
11450
11451         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11452         before calling create_internal_breakpoint.
11453
11454 2017-04-13  Pedro Alves  <palves@redhat.com>
11455
11456         * fork-child.c (execv_argv): New class.
11457         (breakup_args): Refactored as ...
11458         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11459         Copy arguments to storage and replace separators with NULL
11460         terminators in place.
11461         (escape_bang_in_quoted_argument): Adjust to return bool.
11462         (execv_argv::execv_argv): New ctor.
11463         (execv_argv::init_for_shell): New method, factored out from
11464         fork_inferior.  Don't strdup strings into the vector.
11465         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11466         Remove free_vector_argv call.
11467
11468 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11469
11470         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11471         tdep->rx_psw_type.
11472
11473 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11474
11475         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11476         * rx-tdep.c (rx_gdbarch_init): Likewise.
11477
11478 2017-04-13  Pedro Alves  <palves@redhat.com>
11479
11480         * breakpoint.h (struct breakpoint): Reindent.
11481
11482 2017-04-13  Pedro Alves  <palves@redhat.com>
11483
11484         * breakpoint.c (bp_location): Rename to ...
11485         (bp_locations): ... this.  All references updated.
11486         (bp_location_count): Rename to ...
11487         (bp_locations_count): ... this.  All references updated.
11488         (bp_location_placed_address_before_address_max): Rename to ...
11489         (bp_locations_placed_address_before_address_max): ... this.  All
11490         references updated.
11491         (bp_location_shadow_len_after_address_max): Rename to ...
11492         (bp_locations_shadow_len_after_address_max): ... this.  All
11493         references updated.
11494         (bp_location_compare_addrs): Rename to ...
11495         (bp_locations_compare_addrs): ... this.  All references updated.
11496         (bp_location_compare):Rename to ...
11497         (bp_locations_compare): ... this.  All references updated.
11498         (bp_location_target_extensions_update): Rename to ...
11499         (bp_locations_target_extensions_update): ... this.  All references
11500         updated.
11501
11502 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11503
11504         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11505         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11506         'sgtty.h'.
11507         * common/gdb_termios.h: New file, with parts of "terminal.h".
11508         * inflow.c: Include "gdb_termios.h".
11509         * ser-unix.c: Include "gdb_termios.h".
11510         * terminal.h: Move terminal-related defines to
11511         "common/gdb_termios.h".
11512
11513 2017-04-12  Tom Tromey  <tom@tromey.com>
11514
11515         * probe.c (parse_probes): Update.
11516         * location.h (delete_event_location): Don't declare.
11517         (event_location_deleter::operator()): Update.
11518         * location.c (event_location_deleter::operator()): Rename from
11519         delete_event_location.
11520         * linespec.h (linespec_result) <location>: Change type to
11521         event_location_up.
11522         * linespec.c (canonicalize_linespec, event_location_to_sals)
11523         (decode_objc): Update.
11524         (linespec_result): Don't call delete_event_location.
11525         * breakpoint.c (create_breakpoints_sal)
11526         (bkpt_probe_create_sals_from_location)
11527         (strace_marker_create_sals_from_location): Update.
11528
11529 2017-04-12  Tom Tromey  <tom@tromey.com>
11530
11531         * linespec.h (struct linespec_result): Add constructor and
11532         destructor.
11533         (init_linespec_result, destroy_linespec_result)
11534         (make_cleanup_destroy_linespec_result): Don't declare.
11535         * linespec.c (init_linespec_result): Remove.
11536         (linespec_result::~linespec_result): Rename from
11537         destroy_linespec_result.  Update.
11538         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11539         Remove.
11540         * breakpoint.c (create_breakpoint, break_range_command)
11541         (decode_location_default): Update.
11542         * ax-gdb.c (agent_command_1): Update.
11543
11544 2017-04-12  Tom Tromey  <tom@tromey.com>
11545
11546         * remote.c (remote_download_tracepoint): Update.
11547         * python/py-breakpoint.c (bppy_get_location): Update.
11548         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11549         (gdbscm_breakpoint_location): Update.
11550         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11551         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11552         Change type to event_location_up.
11553         * breakpoint.c (create_overlay_event_breakpoint)
11554         (create_longjmp_master_breakpoint)
11555         (create_std_terminate_master_breakpoint)
11556         (create_exception_master_breakpoint)
11557         (breakpoint_event_location_empty_p, print_breakpoint_location)
11558         (print_one_breakpoint_location, create_thread_event_breakpoint)
11559         (init_breakpoint_sal, create_breakpoint)
11560         (print_recreate_ranged_breakpoint, break_range_command)
11561         (init_ada_exception_breakpoint, say_where): Update.
11562         (base_breakpoint_dtor): Don't call delete_event_location.
11563         (bkpt_print_recreate, tracepoint_print_recreate)
11564         (dprintf_print_recreate, update_static_tracepoint)
11565         (breakpoint_re_set_default): Update.
11566
11567 2017-04-12  Tom Tromey  <tom@tromey.com>
11568
11569         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11570         type of "to_do".  Update.
11571         (compute_stack_depth): Use std::vector.
11572
11573 2017-04-12  Tom Tromey  <tom@tromey.com>
11574
11575         * printcmd.c (find_instruction_backward): Use std::vector.
11576
11577 2017-04-12  Tom Tromey  <tom@tromey.com>
11578
11579         * symfile.c (objfilep): Remove typedef.
11580         (reread_symbols): Use a std::vector.
11581
11582 2017-04-12  Tom Tromey  <tom@tromey.com>
11583
11584         * mi/mi-main.c (exec_direction_forward): Remove.
11585         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11586         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11587         scoped_restore.
11588         * guile/guile.c (guile_repl_command, guile_command)
11589         (gdbscm_execute_gdb_command): Use scoped_restore.
11590         * go-exp.y (go_parse): Use scoped_restore.
11591         * d-exp.y (d_parse): Use scoped_restore.
11592         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11593         * c-exp.y (c_parse): Use scoped_restore.
11594
11595 2017-04-12  Tom Tromey  <tom@tromey.com>
11596
11597         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11598         (mi_parse): Update return type.
11599         (mi_parse_free): Remove.
11600         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11601         (mi_parse::~mi_parse): Rename from mi_parse_free.
11602         (mi_parse_cleanup): Remove.
11603         (mi_parse): Return a unique_ptr.  Use new.
11604         * mi/mi-main.c (mi_execute_command): Update.
11605
11606 2017-04-12  Tom Tromey  <tom@tromey.com>
11607
11608         * location.c (explicit_location_lex_one): Return a
11609         unique_xmalloc_ptr.
11610         (string_to_explicit_location): Update.  Remove cleanups.
11611
11612 2017-04-12  Tom Tromey  <tom@tromey.com>
11613
11614         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11615         (compare_value_and_voffset): Change type.  Update.
11616         (compute_vtable_size): Change type of "offset_vec".
11617         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11618         (gnuv3_get_typeid): Remove extraneous declaration.
11619
11620 2017-04-12  Tom Tromey  <tom@tromey.com>
11621
11622         * charset.h (wchar_iterator): Fix comment.
11623
11624 2017-04-12  Tom Tromey  <tom@tromey.com>
11625
11626         * charset.c (iconv_wrapper): New class.
11627         (cleanup_iconv): Remove.
11628         (convert_between_encodings): Use it.
11629
11630 2017-04-12  Tom Tromey  <tom@tromey.com>
11631
11632         * symfile.h (increment_reading_symtab): Update type.
11633         * symfile.c (decrement_reading_symtab): Remove.
11634         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11635         * psymtab.c (psymtab_to_symtab): Update.
11636         * dwarf2read.c (dw2_instantiate_symtab): Update.
11637
11638 2017-04-12  Tom Tromey  <tom@tromey.com>
11639
11640         * jit.c (struct jit_reader): Declare separately.  Add constructor
11641         and destructor.  Change type of "handle".
11642         (loaded_jit_reader): Define separately.
11643         (jit_reader_load): Update.  New "new".
11644         (jit_reader_unload_command): Use "delete".
11645         * gdb-dlfcn.h (struct dlclose_deleter): New.
11646         (gdb_dlhandle_up): New typedef.
11647         (gdb_dlopen, gdb_dlsym): Update types.
11648         (gdb_dlclose): Remove.
11649         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11650         (gdb_dlsym): Change type of "handle".
11651         (make_cleanup_dlclose): Remove.
11652         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11653         * compile/compile-c-support.c (load_libcc): Update.
11654
11655 2017-04-12  Tom Tromey  <tom@tromey.com>
11656
11657         * symtab.h (find_pcs_for_symtab_line): Change return type.
11658         * symtab.c (find_pcs_for_symtab_line): Change return type.
11659         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11660         type of "vec".  Update.
11661         (ltpy_get_pcs_for_line): Update.
11662         * linespec.c (decode_digits_ordinary): Update.
11663
11664 2017-04-12  Tom Tromey  <tom@tromey.com>
11665
11666         * tracepoint.c (actions_command): Update.
11667         * python/python.c (python_command, python_interactive_command):
11668         Update.
11669         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11670         * guile/guile.c (guile_command): Update.
11671         * defs.h (read_command_lines, read_command_lines_1): Return
11672         command_line_up.
11673         (command_lines_deleter): New struct.
11674         (command_line_up): New typedef.
11675         * compile/compile.c (compile_code_command)
11676         (compile_print_command): Update.
11677         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11678         command_line_up.
11679         (make_cleanup_free_command_lines): Remove.
11680         * cli/cli-script.c (get_command_line, read_command_lines_1)
11681         (copy_command_lines): Return command_line_up.
11682         (while_command, if_command, read_command_lines, define_command)
11683         (document_command): Update.
11684         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11685         Remove.
11686         * breakpoint.h (breakpoint_set_commands): Change type of
11687         "commands".
11688         * breakpoint.c (breakpoint_set_commands): Change type of
11689         "commands".  Update.
11690         (do_map_commands_command, update_dprintf_command_list)
11691         (create_tracepoint_from_upload): Update.
11692
11693 2017-04-12  Tom Tromey  <tom@tromey.com>
11694
11695         * tracepoint.c (scope_info): Update.
11696         * spu-tdep.c (spu_catch_start): Update.
11697         * python/python.c (gdbpy_decode_line): Update.
11698         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11699         * python/py-breakpoint.c (bppy_init): Update.
11700         * probe.c (parse_probes): Update.
11701         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11702         * location.h (event_location_deleter): New struct.
11703         (event_location_up): New typedef.
11704         (new_linespec_location, new_address_location, new_probe_location)
11705         (new_explicit_location, copy_event_location)
11706         (string_to_event_location, string_to_event_location_basic)
11707         (string_to_explicit_location): Update return type.
11708         (make_cleanup_delete_event_location): Remove.
11709         * location.c (new_linespec_location, new_address_location)
11710         (new_probe_location, new_explicit_location, copy_event_location):
11711         Return event_location_up.
11712         (delete_event_location_cleanup)
11713         (make_cleanup_delete_event_location): Remove.
11714         (string_to_explicit_location, string_to_event_location_basic)
11715         (string_to_event_location): Return event_location_up.
11716         * linespec.c (canonicalize_linespec, event_location_to_sals)
11717         (decode_line_with_current_source)
11718         (decode_line_with_last_displayed, decode_objc): Update.
11719         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11720         * completer.c (location_completer): Update.
11721         * cli/cli-cmds.c (edit_command, list_command): Update.
11722         * breakpoint.c (create_overlay_event_breakpoint)
11723         (create_longjmp_master_breakpoint)
11724         (create_std_terminate_master_breakpoint)
11725         (create_exception_master_breakpoint)
11726         (create_thread_event_breakpoint): Update.
11727         (init_breakpoint_sal): Update.  Remove some dead code.
11728         (create_breakpoint_sal): Change type of "location".  Update.
11729         (create_breakpoints_sal, create_breakpoint, break_command_1)
11730         (dprintf_command, break_range_command, until_break_command)
11731         (init_ada_exception_breakpoint)
11732         (strace_marker_create_sals_from_location)
11733         (update_static_tracepoint, trace_command, ftrace_command)
11734         (strace_command, create_tracepoint_from_upload): Update.
11735         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11736         * ax-gdb.c (agent_command_1): Update.
11737
11738 2017-04-12  Pedro Alves  <palves@redhat.com>
11739
11740         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11741         * configure.tgt: Handle i[34567]86-*-go32* and
11742         i[34567]86-*-msdosdjgpp*.
11743         * i386-tdep.c (i386_svr4_reg_to_regnum):
11744         Make extern.
11745         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11746         i386-go32-tdep.c.
11747         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11748         * i386-go32-tdep.c: New file.
11749         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11750         declarations.
11751
11752 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11753
11754         * aix-thread.c (pd_status2str): Change return type to const char *.
11755
11756 2017-04-12  Pedro Alves  <palves@redhat.com>
11757
11758         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11759         calls to set_gdbarch_gnu_triplet_regexp.
11760
11761 2017-04-12  Pedro Alves  <palves@redhat.com>
11762
11763         PR gdb/21323
11764         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11765         New enum value.
11766         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11767         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11768         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11769         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11770         * gdbarch.h, gdbarch.c: Regenerate.
11771         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11772         gdbarch_wchar_bit and gdbarch_wchar_signed.
11773         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11774         * arm-tdep.c (arm_gdbarch_init): Likewise.
11775         * avr-tdep.c (avr_gdbarch_init): Likewise.
11776         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11777         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11778         * i386-tdep.c (i386_go32_init_abi): Likewise.
11779         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11780         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11781         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11782         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11783         * sh-tdep.c (sh_gdbarch_init): Likewise.
11784         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11785         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11786         * windows-tdep.c (windows_init_abi): Likewise.
11787         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11788
11789 2017-04-12  Pedro Alves  <palves@redhat.com>
11790
11791         PR c++/21323
11792         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11793         cplus_primitive_type_char32_t>: New enum values.
11794         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11795         and cplus_primitive_type_char32_t.
11796         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11797         32, use the archtecture's built-in type for char16_t and char32_t,
11798         respectively.  Otherwise, fallback to init_integer_type as before,
11799         but make the type unsigned, and issue a complaint.
11800         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11801
11802 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11803
11804         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11805         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11806
11807 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11808
11809         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11810         'const char *'.
11811
11812 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11813
11814         * common/common-utils.c (free_vector_argv): New function.
11815         * common/common-utils.h: Include <vector>.
11816         (free_vector_argv): New prototype.
11817         * darwin-nat.c (darwin_create_inferior): Rewrite function
11818         prototype in order to constify "exec_file" and accept a
11819         "std::string" for "allargs".
11820         * fork-child.c: Include <vector>.
11821         (breakup_args): Rewrite function, using C++.
11822         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11823         and accept "std::string" for "allargs".  Update the code to
11824         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11825         and "execvp".
11826         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11827         order to constify "exec_file" and accept a "std::string" for
11828         "allargs".
11829         * go32-nat.c (go32_create_inferior): Likewise.
11830         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11831         * infcmd.c (run_command_1): Constify "exec_file".  Use
11832         "std::string" for inferior arguments.
11833         * inferior.h (fork_inferior): Update prototype.
11834         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11835         prototype in order to constify "exec_file" and accept a
11836         "std::string" for "allargs".
11837         * nto-procfs.c (procfs_create_inferior): Likewise.
11838         * procfs.c (procfs_create_inferior): Likewise.
11839         * remote-sim.c (gdbsim_create_inferior): Likewise.
11840         * remote.c (extended_remote_run): Update code to accept
11841         "std::string" as argument.
11842         (extended_remote_create_inferior): Rewrite function prototype in
11843         order to constify "exec_file" and accept a "std::string" for
11844         "allargs".
11845         * rs6000-nat.c (super_create_inferior): Likewise.
11846         (rs6000_create_inferior): Likewise.
11847         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11848         * windows-nat.c (windows_create_inferior): Likewise.
11849
11850 2017-04-11  Pedro Alves  <palves@redhat.com>
11851
11852         * thread.c: Fix whitespace throughout.
11853
11854 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11855
11856         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11857
11858 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11859
11860         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11861
11862 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11863
11864         PR gdb/21364
11865         * osdata.c (info_osdata): Check if 'type' is an empty string
11866         instead of NULL.
11867
11868 2017-04-10  Pedro Alves  <palves@redhat.com>
11869
11870         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11871         (ptid_to_global_thread_id, in_thread_list)
11872         (do_captured_list_thread_ids, set_resumed, set_running)
11873         (set_executing, set_stop_requested, finish_thread_state)
11874         (validate_registers_access, can_access_registers_ptid)
11875         (print_thread_info_1, switch_to_thread)
11876         (do_restore_current_thread_cleanup)
11877         (make_cleanup_restore_current_thread, thread_command)
11878         (thread_name_command): Use operator== instead of ptid_equal.
11879
11880 2017-04-10  Pedro Alves  <palves@redhat.com>
11881
11882         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11883         (current_thread_cleanup_chain): Delete.
11884         (restore_current_thread_cleanup_dtor)
11885         (make_cleanup_restore_current_thread): Remove references to
11886         current_thread_cleanup_chain.
11887
11888 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11889
11890         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11891         REG_UNKNOWN.
11892
11893 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11894
11895         PR gdb/19942
11896         * gdbthread.h (thread_info::deletable): New method.
11897         (thread_info::incref): New method.
11898         (thread_info::decref): New method.
11899         (thread_info::refcount): Move it to private.
11900         * infrun.c (save_stop_context): Call inc_refcount.
11901         (release_stop_context_cleanup): Likewise.
11902         * thread.c (set_thread_exited): New function.
11903         (init_thread_list): Delete "tp" only it is deletable, otherwise
11904         call set_thread_exited.
11905         (delete_thread_1): Call set_thread_exited.
11906         (current_thread_cleanup) <inferior_pid>: Remove.
11907         <thread>: New field.
11908         (restore_current_thread_ptid_changed): Removed.
11909         (do_restore_current_thread_cleanup): Adjust.
11910         (restore_current_thread_cleanup_dtor): Don't call
11911         find_thread_ptid.
11912         (set_thread_refcount): Use dec_refcount.
11913         (make_cleanup_restore_current_thread): Adjust.
11914         (thread_apply_all_command): Call inc_refcount.
11915         (_initialize_thread): Don't call
11916         observer_attach_thread_ptid_changed.
11917
11918 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11919
11920         * thread.c (delete_thread_1): Hoist code on marking thread as
11921         exited.
11922
11923 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11924
11925         * windows-nat.c (windows_detach): Initialize ptid with
11926         minus_one_ptid.
11927
11928 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11929
11930         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11931
11932 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11933
11934         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11935         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11936         (bfin_pseudo_register_write): Likewise
11937
11938 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11939
11940         * common/ptid.h (struct ptid): Change to...
11941         (class ptid_t): ... this.
11942         <ptid_t>: New constructors.
11943         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11944         matches>: New methods.
11945         <make_null, make_minus_one>: New static methods.
11946         <pid>: Rename to...
11947         <m_pid>: ...this.
11948         <lwp>: Rename to...
11949         <m_lwp>: ...this.
11950         <tid>: Rename to...
11951         <m_tid>: ...this.
11952         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11953         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11954         as references, move comment to class ptid_t.
11955         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11956         ptid_t static methods.
11957         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11958         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11959         Take ptid arguments as references, implement using ptid_t methods.
11960         * unittests/ptid-selftests.c: New file.
11961         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11962         unittests/ptid-selftests.c.
11963         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11964
11965 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11966
11967         * python/python.c (python_run_simple_file): Cast mode literal to
11968         non-const char pointer as expected by PyFile_FromString.
11969
11970 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11971
11972         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11973         minus_one_ptid and null_ptid.
11974
11975 2017-04-05  Pedro Alves  <palves@redhat.com>
11976
11977         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11978         * configure: Regenerate.
11979
11980 2017-04-05  Pedro Alves  <palves@redhat.com>
11981
11982         * ada-exp.y (yyerror): Constify.
11983         * ada-lang.c (bound_name, get_selections)
11984         (ada_variant_discrim_type)
11985         (ada_variant_discrim_name, ada_value_struct_elt)
11986         (ada_lookup_struct_elt_type, is_unchecked_variant)
11987         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11988         (catch_ada_exception_command_split)
11989         (catch_ada_assert_command_split, catch_assert_command)
11990         (ada_op_name): Constify.
11991         * ada-lang.h (ada_yyerror, get_selections)
11992         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11993         * arc-tdep.c (arc_print_frame_cache): Constify.
11994         * arm-tdep.c (arm_skip_stub): Constify.
11995         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11996         (gen_aggregate_elt_ref): Constify.
11997         * bcache.c (print_bcache_statistics): Constify.
11998         * bcache.h (print_bcache_statistics): Constify.
11999         * break-catch-throw.c (catch_exception_command_1):
12000         * breakpoint.c (struct ep_type_description::description):
12001         Constify.
12002         (add_solib_catchpoint): Constify.
12003         (catch_fork_command_1): Add cast.
12004         (add_catch_command): Constify.
12005         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12006         Constify.
12007         * bsd-uthread.c (bsd_uthread_state): Constify.
12008         * buildsym.c (patch_subfile_names): Constify.
12009         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12010         Constify.
12011         * c-exp.y (yyerror): Constify.
12012         (token::oper): Constify.
12013         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12014         * c-varobj.c (cplus_describe_child): Constify.
12015         * charset.c (find_charset_names): Add cast.
12016         (find_charset_names): Constify array and add const_cast.
12017         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12018         (edit_command): Constify.
12019         * cli/cli-decode.c (lookup_cmd): Constify.
12020         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12021         Constify.
12022         (struct dump_context): Constify.
12023         (add_dump_command, restore_command): Constify.
12024         * cli/cli-script.c (get_command_line): Constify.
12025         * cli/cli-script.h (get_command_line): Constify.
12026         * cli/cli-utils.c (check_for_argument): Constify.
12027         * cli/cli-utils.h (check_for_argument): Constify.
12028         * coff-pe-read.c (struct read_pe_section_data): Constify.
12029         * command.h (lookup_cmd): Constify.
12030         * common/print-utils.c (decimal2str): Constify.
12031         * completer.c (gdb_print_filename): Constify.
12032         * corefile.c (set_gnutarget): Constify.
12033         * cp-name-parser.y (yyerror): Constify.
12034         * cp-valprint.c (cp_print_class_member): Constify.
12035         * cris-tdep.c (cris_register_name, crisv32_register_name):
12036         Constify.
12037         * d-exp.y (yyerror): Constify.
12038         (struct token::oper): Constify.
12039         * d-lang.h (d_yyerror): Constify.
12040         * dbxread.c (struct header_file_location::name): Constify.
12041         (add_old_header_file, add_new_header_file, last_function_name)
12042         (dbx_next_symbol_text, add_bincl_to_list)
12043         (find_corresponding_bincl_psymtab, set_namestring)
12044         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12045         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12046         * defs.h (command_line_input, print_address_symbolic)
12047         (deprecated_readline_begin_hook): Constify.
12048         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12049         Constify.
12050         * event-top.c (handle_line_of_input): Constify and add cast.
12051         * exceptions.c (catch_errors): Constify.
12052         * exceptions.h (catch_errors): Constify.
12053         * expprint.c (print_subexp_standard, op_string, op_name)
12054         (op_name_standard, dump_raw_expression, dump_raw_expression):
12055         * expression.h (op_name, op_string, dump_raw_expression):
12056         Constify.
12057         * f-exp.y (yyerror): Constify.
12058         (struct token::oper): Constify.
12059         (struct f77_boolean_val::name): Constify.
12060         * f-lang.c (f_word_break_characters): Constify.
12061         * f-lang.h (f_yyerror): Constify.
12062         * fork-child.c (fork_inferior): Add cast.
12063         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12064         (new_variant): Constify.
12065         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12066         * gdbarch.c: Regenerate.
12067         * gdbcore.h (set_gnutarget): Constify.
12068         * go-exp.y (yyerror): Constify.
12069         (token::oper): Constify.
12070         * go-lang.h (go_yyerror): Constify.
12071         * go32-nat.c (go32_sysinfo): Constify.
12072         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12073         * guile/scm-cmd.c (cmdscm_function): Constify.
12074         * guile/scm-param.c (pascm_param_value): Constify.
12075         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12076         (h8300sx_register_name): Constify.
12077         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12078         Constify.
12079         * ia64-tdep.c (ia64_register_names): Constify.
12080         * infcmd.c (construct_inferior_arguments): Constify.
12081         (path_command, attach_post_wait): Constify.
12082         * language.c (show_range_command, show_case_command)
12083         (unk_lang_error): Constify.
12084         * language.h (language_defn::la_error)
12085         (language_defn::la_name_of_this): Constify.
12086         * linespec.c (decode_line_2): Constify.
12087         * linux-thread-db.c (thread_db_err_str): Constify.
12088         * lm32-tdep.c (lm32_register_name): Constify.
12089         * m2-exp.y (yyerror): Constify.
12090         * m2-lang.h (m2_yyerror): Constify.
12091         * m32r-tdep.c (m32r_register_names): Constify and make static.
12092         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12093         * m88k-tdep.c (m88k_register_name): Constify.
12094         * macroexp.c (appendmem): Constify.
12095         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12096         (upgrade_type, parse_external, parse_partial_symbols)
12097         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12098         (new_symbol): Constify.
12099         * memattr.c (mem_info_command): Constify.
12100         * mep-tdep.c (register_name_from_keyword): Constify.
12101         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12102         Constify.
12103         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12104         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12105         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12106         cast.
12107         (mi_execute_async_cli_command): Constify.
12108         * mips-tdep.c (mips_register_name): Constify.
12109         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12110         (am33_register_name, am33_2_register_name)
12111         * moxie-tdep.c (moxie_register_names): Constify.
12112         * nat/linux-osdata.c (osdata_type): Constify fields.
12113         * nto-tdep.c (nto_parse_redirection): Constify.
12114         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12115         (lookup_child_selector): Constify.
12116         (objc_methcall::name): Constify.
12117         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12118         (lookup_struct_typedef): Constify.
12119         * objfiles.c (pc_in_section): Constify.
12120         * objfiles.h (pc_in_section): Constify.
12121         * p-exp.y (struct token::oper): Constify.
12122         (yyerror): Constify.
12123         * p-lang.h (pascal_yyerror): Constify.
12124         * parser-defs.h (op_name_standard): Constify.
12125         (op_print::string): Constify.
12126         (exp_descriptor::op_name): Constify.
12127         * printcmd.c (print_address_symbolic): Constify.
12128         * psymtab.c (print_partial_symbols): Constify.
12129         * python/py-breakpoint.c (stop_func): Constify.
12130         (bppy_get_expression): Constify.
12131         * python/py-cmd.c (cmdpy_completer::name): Constify.
12132         (cmdpy_function): Constify.
12133         * python/py-event.c (evpy_add_attribute)
12134         (gdbpy_initialize_event_generic): Constify.
12135         * python/py-event.h (evpy_add_attribute)
12136         (gdbpy_initialize_event_generic): Constify.
12137         * python/py-evts.c (add_new_registry): Constify.
12138         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12139         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12140         * python/py-inferior.c (get_buffer): Add cast.
12141         * python/py-param.c (parm_constant::name): Constify.
12142         * python/py-unwind.c (fprint_frame_id): Constify.
12143         * python/python.c (gdbpy_parameter_value): Constify.
12144         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12145         * remote.c (memory_packet_config::name): Constify.
12146         (show_packet_config_cmd, remote_write_bytes)
12147         (remote_buffer_add_string):
12148         * reverse.c (exec_reverse_once): Constify.
12149         * rs6000-tdep.c (variant::name, variant::description): Constify.
12150         * rust-exp.y (rustyyerror): Constify.
12151         * rust-lang.c (rust_op_name): Constify.
12152         * rust-lang.h (rustyyerror): Constify.
12153         * serial.h (serial_ops::name): Constify.
12154         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12155         (sh_sh3e_register_name, sh_sh2e_register_name)
12156         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12157         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12158         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12159         (sh_sh4al_dsp_register_name): Constify.
12160         * sh64-tdep.c (sh64_register_name): Constify.
12161         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12162         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12163         * stabsread.c (patch_block_stabs, read_type_number)
12164         (ref_map::stabs, ref_add, process_reference)
12165         (symbol_reference_defined, define_symbol, define_symbol)
12166         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12167         (read_one_struct_field, read_struct_fields, read_baseclasses)
12168         (read_tilde_fields, read_struct_type, read_array_type)
12169         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12170         (read_huge_number, read_range_type, read_args, common_block_start)
12171         (find_name_end): Constify.
12172         * stabsread.h (common_block_start, define_symbol)
12173         (process_one_symbol, symbol_reference_defined, ref_add):
12174         * symfile.c (get_section_index, add_symbol_file_command):
12175         * symfile.h (get_section_index): Constify.
12176         * target-descriptions.c (tdesc_type::name): Constify.
12177         (tdesc_free_type): Add cast.
12178         * target.c (find_default_run_target):
12179         (add_deprecated_target_alias, find_default_run_target)
12180         (target_announce_detach): Constify.
12181         (do_option): Constify.
12182         * target.h (add_deprecated_target_alias): Constify.
12183         * thread.c (print_thread_info_1): Constify.
12184         * top.c (deprecated_readline_begin_hook, command_line_input):
12185         Constify.
12186         (init_main): Add casts.
12187         * top.h (handle_line_of_input): Constify.
12188         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12189         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12190         (tfind_command): Rename to ...
12191         (tfind_command_1): ... this and constify.
12192         (tfind_command): New function.
12193         (tfind_end_command, tfind_start_command): Adjust.
12194         (encode_source_string): Constify.
12195         * tracepoint.h (encode_source_string): Constify.
12196         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12197         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12198         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12199         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12200         * tui/tui-win.c (parse_scrolling_args): Constify.
12201         * tui/tui-windata.c (tui_erase_data_content): Constify.
12202         * tui/tui-windata.h (tui_erase_data_content): Constify.
12203         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12204         * tui/tui.c (tui_enable): Add cast.
12205         * utils.c (defaulted_query): Constify.
12206         (init_page_info): Add cast.
12207         (puts_debug, subset_compare): Constify.
12208         * utils.h (subset_compare): Constify.
12209         * varobj.c (varobj_format_string): Constify.
12210         * varobj.h (varobj_format_string): Constify.
12211         * vax-tdep.c (vax_register_name): Constify.
12212         * windows-nat.c (windows_detach): Constify.
12213         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12214         * xml-support.c (gdb_xml_end_element): Constify.
12215         * xml-tdesc.c (tdesc_start_reg): Constify.
12216         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12217         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12218         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12219
12220 2017-04-05  Pedro Alves  <palves@redhat.com>
12221
12222         * proc-api.c (struct trans): Constify.
12223         (procfs_note): Constify.
12224         * proc-events.c (struct trans, syscall_table):
12225         * proc-flags.c (struct trans): Constify.
12226         * proc-utils.h (procfs_note): Constify.
12227         * proc-why.c (struct trans): Constify.
12228         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12229         (procfs_detach): Constify.
12230         * sol-thread.c (struct string_map): Constify.
12231         (td_err_string, td_state_string): Constify.
12232
12233 2017-04-05  Pedro Alves  <palves@redhat.com>
12234
12235         * proc-api.c (procfs_filename): Don't initialize
12236         procfs_filename.
12237         (prepare_to_trace): Assume procfs_filename is non-NULL.
12238         (_initialize_proc_api): Give procfs_filename a default value here.
12239
12240 2017-04-05  Pedro Alves  <palves@redhat.com>
12241
12242         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12243         'cond_string' parameter.
12244         (extract_exception_regexp): Constify 'string' parameter.
12245         (catch_exception_command_1): Constify.
12246         * breakpoint.c (init_catchpoint)
12247         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12248         parameter.
12249         (ep_parse_optional_if_clause, catch_fork_command_1)
12250         (catch_exec_command_1): Constify.
12251         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12252         parameter.
12253         (ep_parse_optional_if_clause): Constify.
12254         * cli/cli-utils.c (remove_trailing_whitespace)
12255         (check_for_argument): Constify.
12256         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12257         non-const overload.
12258         (check_for_argument): Likewise.
12259
12260 2017-04-05  Pedro Alves  <palves@redhat.com>
12261
12262         * event-top.c (command_line_handler): Add cast to execute_command
12263         call.
12264         * record-btrace.c (cmd_record_btrace_bts_start)
12265         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12266         (cmd_record_btrace_start): Add cast to execute_command call.
12267         * record-full.c (record_full_goto_insn):
12268         * record.c (record_start, record_stop): Add cast to
12269         execute_command_to_string calls.
12270         (cmd_record_start): Add cast to execute_command calls.
12271
12272 2017-04-05  Pedro Alves  <palves@redhat.com>
12273
12274         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12275         static inline function.
12276         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12277         array and use gdb_PyArg_ParseTupleAndKeywords.
12278         * python/py-cmd.c (cmdpy_init): Likewise.
12279         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12280         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12281         (infpy_search_memory): Likewise.
12282         * python/py-objfile.c (objfpy_add_separate_debug_file)
12283         (gdbpy_lookup_objfile): Likewise.
12284         * python/py-symbol.c (gdbpy_lookup_symbol)
12285         (gdbpy_lookup_global_symbol): Likewise.
12286         * python/py-type.c (gdbpy_lookup_type): Likewise.
12287         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12288         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12289         Likewise.
12290
12291 2017-04-05  Pedro Alves  <palves@redhat.com>
12292
12293         * python/python-internal.h (gdb_PyGetSetDef): New type.
12294         * python/py-block.c (block_object_getset)
12295         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12296         * python/py-event.c (event_object_getset)
12297         (finish_breakpoint_object_getset): Likewise.
12298         * python/py-inferior.c (inferior_object_getset): Likewise.
12299         * python/py-infthread.c (thread_object_getset): Likewise.
12300         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12301         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12302         * python/py-objfile.c (objfile_getset): Likewise.
12303         * python/py-progspace.c (pspace_getset): Likewise.
12304         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12305         Likewise.
12306         * python/py-record.c (recpy_record_getset): Likewise.
12307         * python/py-symbol.c (symbol_object_getset): Likewise.
12308         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12309         Likewise.
12310         * python/py-type.c (type_object_getset, field_object_getset):
12311         Likewise.
12312         * python/py-value.c (value_object_getset): Likewise.
12313
12314 2017-04-05  Pedro Alves  <palves@redhat.com>
12315
12316         * python/python-internal.h (gdb_PyObject_CallMethod)
12317         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12318         New functions.
12319         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12320         (PySys_GetObject, PySys_SetPath): New macros.
12321
12322 2017-04-05  Pedro Alves  <palves@redhat.com>
12323
12324         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12325         info_osdata_command.
12326         * osdata.c (info_osdata_command): Rename to ...
12327         (info_osdata): ... this.  Constify 'type' parameter, and remove
12328         the 'from_tty' parameter.  Accept NULL TYPE.
12329         (info_osdata_command): New function.
12330         * osdata.h (info_osdata_command): Remove declaration.
12331         (info_osdata): New declaration.
12332
12333 2017-04-05  Pedro Alves  <palves@redhat.com>
12334
12335         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12336         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12337         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12338         parameter.
12339         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12340         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12341         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12342         parameter.
12343         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12344         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12345         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12346         (mi_cmd_file_list_exec_source_files)
12347         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12348         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12349         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12350         parameter.
12351         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12352         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12353         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12354         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12355         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12356         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12357         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12358         'command' parameter.
12359         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12360         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12361         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12362         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12363         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12364         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12365         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12366         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12367         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12368         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12369         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12370         parameter.
12371         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12372         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12373         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12374         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12375         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12376         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12377         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12378         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12379         (mi_cmd_data_list_changed_registers)
12380         (mi_cmd_data_write_register_values)
12381         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12382         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12383         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12384         (mi_cmd_list_features, mi_cmd_list_target_features)
12385         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12386         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12387         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12388         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12389         (mi_cmd_trace_frame_collected): Constify 'command'
12390         parameter.
12391         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12392         'command' parameter.
12393
12394 2017-04-05  Pedro Alves  <palves@redhat.com>
12395
12396         * ada-lang.c (ada_completer_word_break_characters): Now a const
12397         array.
12398         (ada_get_gdb_completer_word_break_characters): Constify.
12399         * completer.c (gdb_completer_command_word_break_characters)
12400         (gdb_completer_file_name_break_characters)
12401         (gdb_completer_quote_characters): Now const arrays.
12402         (get_gdb_completer_quote_characters): Constify.
12403         (set_rl_completer_word_break_characters): New function.
12404         (set_gdb_completion_word_break_characters)
12405         (complete_line_internal): Use it.
12406         * completer.h (get_gdb_completer_quote_characters): Constify.
12407         (set_rl_completer_word_break_characters): Declare.
12408         * f-lang.c (f_word_break_characters): Constify.
12409         * language.c (default_word_break_characters): Constify.
12410         * language.h (language_defn::la_word_break_characters): Constify.
12411         (default_word_break_characters): Constify.
12412         * top.c (init_main): Use set_rl_completer_word_break_characters.
12413
12414 2017-04-05  Pedro Alves  <palves@redhat.com>
12415
12416         * aix-thread.c (aix_thread_pid_to_str)
12417         (aix_thread_extra_thread_info): Constify.
12418         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12419         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12420         (bsd_uthread_pid_to_str): Constify.
12421         * corelow.c (core_pid_to_str): Constify.
12422         * darwin-nat.c (darwin_pid_to_str): Constify.
12423         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12424         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12425         Constify.
12426         * gnu-nat.c (gnu_pid_to_str): Constify.
12427         * go32-nat.c (go32_pid_to_str): Constify.
12428         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12429         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12430         * inferior.c (inferior_pid_to_str): Constify.
12431         * linux-nat.c (linux_nat_pid_to_str): Constify.
12432         * linux-tdep.c (linux_core_pid_to_str): Constify.
12433         * linux-thread-db.c (thread_db_pid_to_str)
12434         (thread_db_extra_thread_info): Constify.
12435         * nto-tdep.c (nto_extra_thread_info): Constify.
12436         * nto-tdep.h (nto_extra_thread_info): Constify.
12437         * obsd-nat.c (obsd_pid_to_str): Constify.
12438         * procfs.c (procfs_pid_to_str): Constify.
12439         * ravenscar-thread.c (ravenscar_extra_thread_info)
12440         (ravenscar_pid_to_str): Constify.
12441         * remote-sim.c (gdbsim_pid_to_str): Constify.
12442         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12443         Constify.
12444         * sol-thread.c (solaris_pid_to_str): Constify.
12445         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12446         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12447         * target.c (default_pid_to_str, target_pid_to_str)
12448         (normal_pid_to_str, default_pid_to_str): Constify.
12449         * target.h (target_ops::to_pid_to_str)
12450         (target_ops::to_extra_thread_info): Constify.
12451         (target_pid_to_str, normal_pid_to_str): Constify.
12452         * windows-nat.c (windows_pid_to_str): Constify.
12453         * gdbarch.sh (core_pid_to_str): Constify.
12454         * target-delegates.c: Regenerate.
12455         * gdbarch.h, gdbarch.c: Regenerate.
12456
12457 2017-04-05  Pedro Alves  <palves@redhat.com>
12458
12459         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12460         the memory of the temporary warning_pre_print override.
12461         * utils.c (warning_pre_print): Constify.
12462         * utils.h (warning_pre_print): Constify.
12463
12464 2017-04-05  Pedro Alves  <palves@redhat.com>
12465
12466         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12467         (shell_command): New function.
12468         (make_command): Use std::string.
12469         (init_cli_cmds): Register shell_command instead of shell_escape.
12470
12471 2017-04-05  Pedro Alves  <palves@redhat.com>
12472
12473         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12474         * tracepoint.c (default_collect): Don't initialize.
12475
12476 2017-04-05  Pedro Alves  <palves@redhat.com>
12477
12478         * macroexp.c (macro_buffer::shared): Now a bool.
12479         (init_buffer): Update.
12480         (init_shared_buffer): Constify 'addr' parameter.
12481         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12482         casts.
12483
12484 2017-04-05  Pedro Alves  <palves@redhat.com>
12485
12486         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12487         * disasm.c (set_disassembler_options): Constify local.
12488         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12489
12490 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12491
12492         PR gdb/21352
12493         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12494         option.
12495
12496 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12497
12498         * frame.c (frame_unwind_register_unsigned): Call
12499         frame_unwind_register_value.
12500
12501 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12502
12503         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12504         Use gdb_test_multiple, and don't match anchor.
12505
12506 2017-04-05  Pedro Alves  <palves@redhat.com>
12507
12508         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12509         (Write After Approval): Remove Simon Marchi.
12510
12511 2017-04-05  Pedro Alves  <palves@redhat.com>
12512
12513         * common/gdb_optional.h (optional::optional): Make constexpr and
12514         initialize m_dummy.
12515
12516 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12517
12518         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12519         (amd64fbsd_jmp_buf_reg_offset): Remove.
12520         (amd64fbsd_supply_uthread): Remove function.
12521         (amd64fbsd_collect_uthread): Remove function.
12522         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12523         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12524         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12525         (fbsd-nat.c): Update comment.
12526         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12527         (i386fbsd_jmp_buf_reg_offset): Remove.
12528         (i386fbsd_supply_uthread): Remove function.
12529         (i386fbsd_collect_uthread): Remove function.
12530         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12531
12532 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12533
12534         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12535         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12536         * NEWS: Mention that support for FreeBSD/alpha was removed.
12537         * alpha-fbsd-tdep.c: Delete file.
12538         * config/alpha/fbsd.mh: Delete file.
12539         * configure.host: Delete alpha*-*-freebsd* and
12540         alpha*-*-kfreebsd*-gnu.
12541         * configure.tgt: Delete alpha*-*-freebsd* and
12542         alpha*-*-kfreebsd*-gnu.
12543
12544 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12545
12546         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12547         amd64bsd_store_inferior_registers): Use ptid from regcache.
12548
12549 2017-04-04  Pedro Alves  <palves@redhat.com>
12550
12551         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12552         data fields, make them private and add "m_" prefixes.
12553         (lnp_state_machine::lnp_state_machine): New ctor.
12554         (record_line, check_line_address, handle_set_discriminator)
12555         (handle_set_address, handle_advance_pc, handle_special_opcode)
12556         (handle_advance_line, handle_set_file, handle_negate_stmt)
12557         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12558         (end_sequence, advance_line): New methods.
12559         (m_gdbarch, m_record_lines_p): New fields.
12560         (lnp_reader_state): Delete.
12561         (dwarf_record_line): Rename to ...
12562         (lnp_state_machine::record_line): ... adjust.
12563         (init_lnp_state_machine): Delete.
12564         (lnp_state_machine::lnp_state_machine): New.
12565         (check_line_address): Rename to ...
12566         (lnp_state_machine::check_line_address): This.
12567         (dwarf_decode_lines_1): Remove reference to "reader_state".
12568         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12569         State machine internal state manipulation moved to
12570         lnp_state_machine methods.
12571
12572 2017-04-04  Pedro Alves  <palves@redhat.com>
12573
12574         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12575         unittests/offset-type-selftests.c.
12576         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12577         * common/offset-type.h: New file.
12578         * common/preprocessor.h: New file.
12579         * common/traits.h: New file.
12580         * common/valid-expr.h: New file.
12581         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12582         sect_offset and cu_offset strong typedefs throughout.
12583         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12584         typedefs throughout.
12585         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12586         sect_offset and cu_offset strong typedefs throughout.
12587         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12588         typedefs throughout.
12589         * gdbtypes.h: Include "common/offset-type.h".
12590         (cu_offset): Now an offset type (strong typedef) instead of a
12591         struct.
12592         (sect_offset): Likewise.
12593         (union call_site_parameter_u): Rename "param_offset" field to
12594         "param_cu_off".
12595         * unittests/offset-type-selftests.c: New file.
12596
12597 2017-04-04  Pedro Alves  <palves@redhat.com>
12598
12599         * common/underlying.h: New file.
12600         * dwarf2read.c: Include "common/gdb_optional.h" and
12601         "common/underlying.h".
12602         (dir_index, file_name_index): New types.
12603         (file_entry): Use them.
12604         (file_entry::include): Use to_underlying.
12605         (line_header::add_file_name): Use dir_index.
12606         (read_formatted_entries): Use gdb::optional.  Read form before
12607         writting to file_entry.
12608         (dwarf_decode_line_header): Use dir_index.
12609         (lnp_state_machine::current_file): Use to_underlying.
12610         (lnp_state_machine::file): Change type to file_name_index.
12611         (dwarf_record_line): Use to_underlying.
12612         (init_lnp_state_machine): Use file_name_index.
12613         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12614
12615 2017-04-04  Pedro Alves  <palves@redhat.com>
12616
12617         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12618         operator bool, has_value and get methods.
12619
12620 2017-04-04  Pedro Alves  <palves@redhat.com>
12621
12622         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12623         fields.
12624         (line_header): Initialize all data fields.  Change type of
12625         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12626         Change type of include_dirs to std::vector<const char *>.  Remove
12627         num_include_dirs, include_dirs_size.  Change type of file_names to
12628         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12629         (line_header::line_header): New.
12630         (line_header::add_include_dir, line_header::add_file_name): New
12631         methods.
12632         (line_header::include_dir_at): Remove NULL check.
12633         (line_header::file_name_at): Add const overload.
12634         (line_header_up): New unique_ptr typedef.
12635         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12636         std::vector.  Remove free_line_header call.
12637         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12638         free_line_header call.
12639         (free_cu_line_header): Delete.
12640         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12641         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12642         Adjust to use std::vector.
12643         (free_line_header): Delete.
12644         (free_line_header_voidp): Use delete.
12645         (add_include_dir): Replace with ...
12646         (line_header::add_include_dir): ... this method.  Use std::vector.
12647         (add_file_name): Replace with ...
12648         (line_header::add_file_name): ... this method.  Use std::vector.
12649         (add_include_dir_stub): Delete.
12650         (read_formatted_entries): Remove memset.
12651         (dwarf_decode_line_header): Return a line_header_up instead of a
12652         raw pointer.  Remove cleanup handling.  Pass lambdas to
12653         read_formatted_entries.  Adjust to use line_header methods.
12654         (dwarf_decode_lines_1): Adjust to use line_header methods.
12655         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12656         use std::vector.
12657
12658 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12659
12660         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12661         instead of struct ptid.
12662
12663 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12664
12665         * frame.c (get_frame_register_bytes): Unwind using value.
12666         (put_frame_register_bytes): Likewise.
12667
12668 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12669
12670         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12671         aggregate-like.
12672
12673 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12674
12675         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12676
12677 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12678
12679         * gdbthread.h (struct thread_info): Declare constructor and
12680         destructor.  Add some in-class member initializers.
12681         * thread.c (free_thread): Remove.
12682         (init_thread_list): Call delete instead of free_thread.
12683         (new_thread): Call thread_info constructor.
12684         (thread_info::thread_info): New function.
12685         (thread_info::~thread_info): New function.
12686         (delete_thread_1): Call delete instead of free_thread.
12687         (make_cleanup_restore_current_thread): Move tp and frame to
12688         inner block.
12689
12690 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12691
12692         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12693         (arc_skip_prologue): Likewise.
12694         (arc_make_frame_cache): Likewise.
12695         (arc_pv_get_operand): New function.
12696         (arc_is_in_prologue): Likewise.
12697         (arc_analyze_prologue): Likewise.
12698         (arc_print_frame_cache): Likewise.
12699         (MAX_PROLOGUE_LENGTH): New constant.
12700
12701 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12702
12703         * configure.tgt: Add arc-insn.o.
12704         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12705         (dump_arc_instruction_command): New function.
12706         (arc_fprintf_disasm): Likewise.
12707         (arc_disassemble_info): Likewise.
12708         (arc_insn_get_operand_value): Likewise.
12709         (arc_insn_get_operand_value_signed): Likewise.
12710         (arc_insn_get_memory_base_reg): Likewise.
12711         (arc_insn_get_memory_offset): Likewise.
12712         (arc_insn_get_branch_target): Likewise.
12713         (arc_insn_dump): Likewise.
12714         (arc_insn_get_linear_next_pc): Likewise.
12715         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12716         (arc_disassemble_info): Likewise.
12717         (arc_insn_get_branch_target): Likewise.
12718         (arc_insn_get_linear_next_pc): Likewise.
12719         * NEWS: Mention new "maint print arc arc-instruction".
12720
12721 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12722
12723         * arc-tdep (maintenance_print_arc_list): New variable.
12724         (maintenance_print_arc_command): New function.
12725
12726 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12727
12728         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12729         Add "limm" and "reserved".
12730         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12731         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12732         * arc-tdep.h (arc_regnum): Likewise.
12733
12734 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12735
12736         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12737         for THREADPTR register.
12738         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12739         register.
12740         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12741         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12742         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12743
12744 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12745
12746         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12747         registers above gdbarch_num_regs (gdbarch) as privileged in
12748         call0 ABI.
12749
12750 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12751
12752         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12753         for a single specified register or for all registers in
12754         a0_base..a0_base + C0_NREGS range.
12755         (supply_gregset_reg): Call regcache_raw_supply for a single
12756         specified register or for all registers in a0_base..a0_base +
12757         C0_NREGS range.
12758
12759 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12760
12761         * arch/xtensa.h (C0_NREGS): Add definition.
12762         * xtensa-tdep.c (C0_NREGS): Remove definition.
12763
12764 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12765
12766         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12767         Drop xtensa_default_isa initialization.
12768         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12769
12770 2017-03-27  Pedro Alves  <palves@redhat.com>
12771
12772         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12773         (file_entry::include_dir): New method.
12774         (line_header::include_dir_at, line_header::file_name_at): New
12775         methods.
12776         (setup_type_unit_groups, setup_type_unit_groups)
12777         (psymtab_include_file_name): Simplify using the new methods.
12778         (lnp_state_machine) <the_line_header>: New field.
12779         <file>: Add comment.
12780         (lnp_state_machine::current_file): New method.
12781         (dwarf_record_line): Simplify using the new methods.
12782         (init_lnp_state_machine): Initialize the "the_line_header" field.
12783         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12784         Simplify using the new methods.
12785
12786 2017-03-27  Pedro Alves  <palves@redhat.com>
12787
12788         * cp-name-parser.y (make_empty): Delete.
12789         (demangler_special, nested_name, ptr_operator, array_indicator)
12790         (direct_declarator, declarator_1): Use fill_comp instead of
12791         make_empty.
12792
12793 2017-03-27  Pedro Alves  <palves@redhat.com>
12794
12795         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12796         to ATTRIBUTE_PRINTF.
12797         * solib-target.c (library_list_start_list): Print "string" not
12798         "version".
12799         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12800         gdb_xml_error call.
12801
12802 2017-03-27  Pedro Alves  <palves@redhat.com>
12803
12804         * dwarf2read.c (struct file_and_directory): New.
12805         (dwarf2_get_dwz_file): Adjust to use std::string.
12806         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12807         (find_file_and_directory): Adjust to return a file_and_directory
12808         object.
12809         (read_file_scope): Adjust to use file_and_directory.  Remove
12810         make_cleanup/do_cleanups calls.
12811         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12812         make_cleanup/do_cleanups calls.
12813         * python/python.c (do_start_initialization): Adjust to ldirname
12814         returning a std::string.
12815         * utils.c (ldirname): Now returns a std::string.
12816         * utils.h (ldirname): Change return type to std::string.
12817         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12818         returning a std::string.
12819         * xml-tdesc.c (file_read_description_xml): Likewise.
12820
12821 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12822
12823         * regcache.c (regcache_debug_print_register): New function.
12824         * regcache.h (regcache_debug_print_register): New declaration.
12825         * target.c (debug_print_register): Remove.
12826         (target_fetch_registers): Call regcache_debug_print_register.
12827         (target_store_registers): Likewise.
12828
12829 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12830
12831         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12832         reference beyond the 'lh->include_dirs' array before accessing to
12833         it.
12834         (psymtab_include_file_name): Likewise.
12835         (dwarf_decode_lines_1): Likewise.
12836         (dwarf_decode_lines): Likewise.
12837         (file_file_name): Likewise.
12838
12839 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12840
12841         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12842         inferior_ptid.
12843         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12844         ps_lsetfpregs): Likewise.
12845         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12846         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12847         ps_lsetfpregs): Likewise.
12848         * target.c (target_fetch_registers, target_store_registers):
12849         Remove asserts.
12850
12851 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12852
12853         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12854
12855 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12856
12857         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12858         (_initialize_aarch64_tdep): Register it.
12859         (aarch64_record_load_store): Handle PRFM instruction.
12860         (aarch64_process_record_test): New function.
12861
12862 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12863
12864         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12865         indentation.
12866
12867 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12868
12869         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12870
12871 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12872
12873         python/python.c (do_start_initialization): Fix memory leak.
12874
12875 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12876
12877         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12878         using get_ptrace_pid.
12879         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12880         inferior_ptid.
12881         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12882         inferior_ptid instead of pid.
12883
12884 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12885
12886         * aarch64-tdep.c: Wrap locally used classes in anonymous
12887         namespace.
12888         * arm-tdep.c: Likewise.
12889         * linespec.c: Likewise.
12890         * ui-out.c: Likewise.
12891
12892 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12893
12894         PR gdb/19637
12895         * python/lib/gdb/printer/bound_registers.py: Import sys.
12896
12897 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12898
12899         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12900         windows_thread_info parameter and use it instead of
12901         current_thread.
12902         (windows_fetch_inferior_registers): Don't set current_thread,
12903         pass the thread to do_windows_fetch_inferior_registers.  Use
12904         ptid from regcache instead of inferior_ptid.
12905         (do_windows_store_inferior_registers): Add windows_thread_info
12906         parameter and use it instead of current_thread.
12907         (windows_store_inferior_registers): Don't set current_thread,
12908         pass the thread to do_windows_store_inferior_registers.  Use
12909         ptid from regcache instead of inferior_ptid.
12910
12911 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12912
12913         * ser-mingw.c (ser_windows_raw): Remove reference to
12914         struct serial::current_timeout.
12915
12916 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12917
12918         PR tdep/20928
12919         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12920         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12921         (sparc64_fsr_type): Fix %fsr decoding.
12922
12923 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12924
12925         * python/py-record-btrace.c (btpy_insn_data): Change return type
12926         for Python 2.
12927
12928 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12929
12930         * spu-linux-nat.c (spu_fetch_inferior_registers,
12931         spu_store_inferior_registers): Use ptid from regcache, set and
12932         restore inferior_ptid.
12933         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12934         Likewise.
12935
12936 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12937
12938         * i386-linux-nat.c (fetch_register, store_register,
12939         i386_linux_fetch_inferior_registers,
12940         i386_linux_store_inferior_registers): Use ptid from regcache.
12941         * ia64-linux-nat.c (ia64_linux_fetch_register,
12942         ia64_linux_store_register): Likewise.
12943         * inf-ptrace.c (inf_ptrace_fetch_register,
12944         inf_ptrace_store_register): Likewise.
12945         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12946         m32r_linux_store_inferior_registers): Likewise.
12947         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12948         m68kbsd_store_inferior_registers): Likewise.
12949         * m68k-linux-nat.c (fetch_register, store_register,
12950         m68k_linux_fetch_inferior_registers,
12951         m68k_linux_store_inferior_registers): Likewise.
12952         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12953         m88kbsd_store_inferior_registers): Likewise.
12954         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12955         mips_fbsd_store_inferior_registers): Likewise.
12956         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12957         mips64_linux_regsets_store_registers): Likewise.
12958         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12959         mipsnbsd_store_inferior_registers): Likewise.
12960         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12961         mips64obsd_store_inferior_registers): Likewise.
12962         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12963         Likewise.
12964         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12965         ppcfbsd_store_inferior_registers): Likewise.
12966         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12967         ppc_linux_store_inferior_registers): Likewise.
12968         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12969         ppcnbsd_store_inferior_registers): Likewise.
12970         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12971         ppcobsd_store_registers): Likewise.
12972         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12973         Likewise.
12974         * ravenscar-thread.c (ravenscar_fetch_registers,
12975         ravenscar_store_registers, ravenscar_prepare_to_store):
12976         Likewise.
12977         * record-btrace.c (record_btrace_fetch_registers,
12978         record_btrace_store_registers, record_btrace_prepare_to_store):
12979         Likewise.
12980         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12981         Lookup inferior using ptid from regcache, instead of
12982         current_inferior.
12983         * remote.c (remote_fetch_registers, remote_store_registers): Use
12984         ptid from regcache.
12985         * rs6000-nat.c (fetch_register, store_register): Likewise.
12986         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12987         s390_linux_store_inferior_registers): Likewise.
12988         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12989         shnbsd_store_inferior_registers): Likewise.
12990         * sol-thread.c (sol_thread_fetch_registers,
12991         sol_thread_store_registers): Likewise.
12992         * sparc-nat.c (sparc_fetch_inferior_registers,
12993         sparc_store_inferior_registers): Likewise.
12994         * tilegx-linux-nat.c (fetch_inferior_registers,
12995         store_inferior_registers): Likewise.
12996         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12997         vaxbsd_store_inferior_registers): Likewise.
12998         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12999         store_xtregs): Likewise.
13000
13001 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13002
13003         PR gdb/14441
13004         * NEWS: Mention support for rvalue references in GDB and python.
13005         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13006         supports both lvalue and rvalue references.
13007
13008 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13009
13010         PR gdb/14441
13011         * gdbtypes.c (rank_one_type): Implement overloading
13012         resolution rules regarding rvalue references.
13013
13014 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13015
13016         PR gdb/14441
13017         * aarch64-tdep.c (aarch64_type_align)
13018         (aarch64_extract_return_value, aarch64_store_return_value): Change
13019         lvalue reference type checks to general reference type checks.
13020         * amd64-tdep.c (amd64_classify): Likewise.
13021         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13022         Likewise.
13023         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13024         (arm_store_return_value): Likewise.
13025         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13026         * c-typeprint.c (c_print_type): Likewise.
13027         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13028         (cplus_number_of_children, cplus_describe_child): Likewise.
13029         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13030         * completer.c (expression_completer): Likewise.
13031         * cp-support.c (make_symbol_overload_list_adl_namespace):
13032         Likewise.
13033         * darwin-nat-info.c (info_mach_region_command): Likewise.
13034         * dwarf2loc.c (entry_data_value_coerce_ref)
13035         (value_of_dwarf_reg_entry): Likewise.
13036         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13037         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13038         Likewise.
13039         * findvar.c (extract_typed_address, store_typed_address):
13040         Likewise.
13041         * gdbtypes.c (rank_one_type): Likewise.
13042         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13043         * infcall.c (value_arg_coerce): Likewise.
13044         * language.c (pointer_type): Likewise.
13045         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13046         Likewise.
13047         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13048         * mn10300-tdep.c (mn10300_type_align): Likewise.
13049         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13050         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13051         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13052         Likewise.
13053         * printcmd.c (print_formatted, x_command): Likewise.
13054         * python/py-type.c (typy_get_composite, typy_template_argument):
13055         Likewise.
13056         * python/py-value.c (valpy_referenced_value)
13057         (valpy_get_dynamic_type, value_has_field): Likewise.
13058         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13059         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13060         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13061         * spu-tdep.c (spu_scalar_value_p): Likewise.
13062         * symtab.c (lookup_symbol_aux): Likewise.
13063         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13064         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13065         Likewise.
13066         * valops.c (value_cast_pointers, value_cast)
13067         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13068         (value_struct_elt, value_struct_elt_bitpos)
13069         (value_find_oload_method_list, find_overload_match)
13070         (value_rtti_indirect_type): Likewise.
13071         * valprint.c (val_print_scalar_type_p, generic_val_print):
13072         Likewise.
13073         * value.c (value_actual_type, value_as_address, unpack_long)
13074         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13075         (coerce_ref): Likewise.
13076         * varobj.c (varobj_get_value_type): Likewise.
13077
13078 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13079
13080         PR gdb/14441
13081         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13082         table of constants.
13083         * python/lib/gdb/command/explore.py: Support exploring values
13084         of rvalue reference types.
13085         * python/lib/gdb/types.py: Implement get_basic_type() for
13086         rvalue reference types.
13087         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13088         constant.
13089         * python/py-value.c (valpy_getitem): Add an rvalue reference
13090         check.
13091         (valpy_reference_value): Add new parameter "refcode".
13092         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13093         New wrappers for valpy_reference_value().
13094         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13095         (gdbpy_invoke_xmethod): Likewise.
13096
13097 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13098
13099         PR gdb/14441
13100         * dwarf2read.c (process_die, read_type_die_1): Handle the
13101         DW_TAG_rvalue_reference_type DIE.
13102         (read_tag_reference_type): Add new parameter "refcode".
13103
13104 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13105
13106         PR gdb/14441
13107         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13108         (c_type_print_modifier, c_type_print_varspec_suffix)
13109         (c_type_print_base): Support printing rvalue reference types.
13110         * c-valprint.c (c_val_print, c_value_print): Support printing
13111         rvalue reference values.
13112
13113 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13114
13115         PR gdb/14441
13116         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13117         typename.
13118         * cp-support.c (replace_typedefs): Handle
13119         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13120         * python/py-type.c (typy_lookup_type): Likewise.
13121
13122 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13123
13124         PR gdb/14441
13125         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13126         * parse.c (insert_type): Change assert statement.
13127         (follow_types): Handle rvalue reference types.
13128         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13129         constant.
13130
13131 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13132
13133         PR gdb/14441
13134         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13135         value_ref() interface.
13136         * c-valprint.c (c_value_print): Likewise.
13137         * infcall.c (value_arg_coerce): Likewise.
13138         * python/py-value.c (valpy_reference_value): Likewise.
13139         * valops.c (value_cast, value_reinterpret_cast)
13140         (value_dynamic_cast, typecmp): Likewise.
13141         (value_ref): Parameterize by kind of return value reference type.
13142         * value.h (value_ref): Add new parameter "refcode".
13143
13144 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13145
13146         PR gdb/14441
13147         * dwarf2read.c (read_tag_reference_type): Use
13148         lookup_lvalue_reference_type() instead of lookup_reference_type().
13149         * eval.c (evaluate_subexp_standard): Likewise.
13150         * f-exp.y: Likewise.
13151         * gdbtypes.c (make_reference_type, lookup_reference_type):
13152         Generalize with rvalue reference types.
13153         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13154         convenience wrappers for lookup_reference_type().
13155         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13156         reference kind parameter.
13157         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13158         wrappers for lookup_reference_type().
13159         * guile/scm-type.c (gdbscm_type_reference): Use
13160         lookup_lvalue_reference_type() instead of lookup_reference_type().
13161         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13162         * parse.c (follow_types): Likewise.
13163         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13164         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13165         Likewise.
13166         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13167         (gdbpy_invoke_xmethod): Likewise.
13168         * stabsread.c: Provide extra argument to make_reference_type()
13169         call.
13170         * valops.c (value_ref, value_rtti_indirect_type): Use
13171         lookup_lvalue_reference_type() instead of lookup_reference_type().
13172
13173 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13174
13175         PR gdb/14441
13176         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13177         (TYPE_IS_REFERENCE): New macro.
13178         (struct type): Add rvalue_reference_type field.
13179         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13180
13181 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13182
13183         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13184         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13185         New function definition.
13186         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13187         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13188         New function declaration.
13189         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13190         * mi/mi-interp.h: New file.
13191         * solib.c (info_sharedlibrary_command): Replace for loop with
13192         ALL_SO_LIBS macro
13193         * solib.h (update_solib_list): New function declaration.
13194         (so_list_head): Move macro.
13195         * solist.h (ALL_SO_LIBS): New macro.
13196
13197 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13198
13199         * infcmd.c (post_create_inferior): Remove unused argument in
13200         call to solib_add.
13201         * remote.c (remote_start_remote): Likewise.
13202         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13203         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13204         (enable_break): Likewise.
13205         * solib.c (update_solib_list): Remove unused target argument
13206         and its documentation.
13207         (solib_add): Remove unused target argument.  Remove unused
13208         argument in call to update_solib_list.
13209         (info_sharedlibrary_command): Remove unused argument in call
13210         to update_solib_list.
13211         (sharedlibrary_command): Remove unused argument in call to
13212         solib_add.
13213         (handle_solib_event): Likewise.
13214         (reload_shared_libraries): Likewise.
13215         * solib.h (solib_add): Remove unused target argument.
13216
13217 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13218
13219         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13220         (s390_displaced_step_fixup): Cover relative branches with the
13221         default fixup handling.  This fixes lack of support for some
13222         relative branch instructions.
13223
13224 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13225
13226         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13227         ptid from regcache.
13228
13229 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13230
13231         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13232         i386_darwin_store_inferior_registers): Use ptid from regcache.
13233
13234 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13235
13236         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13237         i386bsd_store_inferior_registers): Use ptid from regcache.
13238
13239 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13240
13241         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13242         hppaobsd_store_registers): Use ptid from regcache.
13243
13244 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13245
13246         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13247         hppanbsd_store_registers): Use ptid from regcache.
13248
13249 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13250
13251         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13252         from regcache.  Use get_ptrace_pid.
13253
13254 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13255
13256         * corelow.c (get_core_register_section): Use ptid from regcache,
13257         update doc.
13258
13259 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13260
13261         * bsd-uthread.c (bsd_uthread_fetch_registers,
13262         bsd_uthread_store_registers): Use ptid from regcache, set and
13263         restore inferior_ptid.
13264
13265 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13266
13267         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13268         fetch_fp_regs, store_register, store_regs, store_fp_register,
13269         store_fp_regs): Use ptid from regcache.
13270
13271 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13272
13273         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13274         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13275         store_vfp_regs): Use ptid from regcache.
13276
13277 2017-03-17  Pedro Alves  <palves@redhat.com>
13278
13279         PR remote/21188
13280         * ser-base.c (ser_base_wait_for): Add comment.
13281         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13282         version.
13283         * ser-unix.c (hardwire_raw): Remove reference to
13284         scb->current_timeout.
13285         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13286         (hardwire_ops): Install ser_base_readchar instead of
13287         hardwire_readchar.
13288         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13289         Remove fields.
13290
13291 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13292
13293         PR gdb/19637
13294         * python/lib/gdb/printer/bound_registers.py: Add support for
13295         Python 3.
13296
13297 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13298
13299         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13300         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13301         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13302         byte_offset to subobj_byte_offset.  Fix the handling of
13303         DWARF_VALUE_STACK on big-endian targets when coming via an
13304         implicit pointer.
13305         (dwarf2_evaluate_loc_desc): Adjust call to
13306         dwarf2_evaluate_loc_desc_full.
13307         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13308         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13309
13310 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13311
13312         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13313         and REVSH instructions.
13314
13315 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13316
13317         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13318         (arm_record_test): Declare.
13319         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13320         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13321         align with the manual.
13322         (thumb_record_misc): Adjust the code order to align with the
13323         manual.
13324         (thumb2_record_decode_insn_handler): Fix instruction matching.
13325         (instruction_reader_thumb): New class.
13326         (arm_record_test): New function.
13327
13328 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13329
13330         * arm-tdep.c (abstract_memory_reader): New class.
13331         (instruction_reader): New class.
13332         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13333         (decode_insn): Likewise.
13334
13335 2017-03-16  Doug Evans  <dje@google.com>
13336
13337         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13338         member.  Change type of TYPE member to SCM.  All uses updated.
13339         (lsscm_make_lazy_string_smob): Add assert.
13340         (lsscm_make_lazy_string): Flag bad length values.
13341         (lsscm_elt_type): New function.
13342         (gdbscm_lazy_string_to_value): Rewrite to use
13343         lsscm_safe_lazy_string_to_value.
13344         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13345         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13346         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13347         in incoming type.
13348         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13349         * guile/scm-type.c (tyscm_scm_to_type): New function.
13350
13351 2017-03-15  Doug Evans  <dje@google.com>
13352
13353         PR python/17728, python/18439, python/18779
13354         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13355         member.  Change type of TYPE member to PyObject *.  All uses updated.
13356         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13357         (gdbpy_create_lazy_string_object): Flag bad length values.
13358         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13359         Handle typedefs in incoming type.
13360         (stpy_lazy_string_elt_type): New function.
13361         (gdbpy_extract_lazy_string): Call it.
13362         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13363         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13364         typedefs in incoming type.
13365
13366 2017-03-16  Doug Evans  <dje@google.com>
13367
13368         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13369         * guile/scm-type.c (tyscm_scm_to_type): New function.
13370
13371 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13372
13373         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13374         "ULONGEST" for "skip".
13375
13376 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13377
13378         PR gdb/21220
13379         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13380         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13381         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13382         over ptrace peek/poke until end of buffer or error.
13383
13384 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13385
13386         * parse.c (length_of_subexp): Make static.
13387         * parser-defs.h (length_of_subexp): Remove.
13388
13389 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13390
13391         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13392         as well.
13393
13394 2017-03-14  Pedro Alves  <palves@redhat.com>
13395
13396         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13397         (main): Use std::unique_ptr.  Remove calls to
13398         cp_demangled_name_parse_free.
13399
13400 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13401
13402         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13403         alphabsd_store_inferior_registers): Use regcache->ptid instead
13404         of inferior_ptid.
13405
13406 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13407
13408         * aix-thread.c (aix_thread_fetch_registers,
13409         aix_thread_store_registers): Use regcache->ptid instead of
13410         inferior_ptid.
13411
13412 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13413
13414         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13415         store_gregs_to_thread, fetch_fpregs_from_thread,
13416         store_fpregs_to_thread): Use regcache->ptid instead of
13417         inferior_ptid.
13418
13419 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13420
13421         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13422         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13423         instead of inferior_ptid.
13424
13425 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13426
13427         * target.c (target_fetch_registers, target_store_registers): Add
13428         assert.
13429
13430 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13431
13432         * regcache.h (regcache_get_ptid): New function.
13433         * regcache.c (regcache_get_ptid): New function.
13434
13435 2017-03-13  Mark Wielaard  <mark@klomp.org>
13436
13437         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13438
13439 2017-03-10  Keith Seitz  <keiths@redhat.com>
13440
13441         PR c++/8218
13442         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13443
13444 2017-03-08  Pedro Alves  <palves@redhat.com>
13445
13446         PR gdb/18360
13447         * infrun.c (start_step_over, do_target_resume, resume)
13448         (restart_threads): Assert we're not resuming a thread that is
13449         meant to be stopped.
13450         (infrun_thread_stop_requested_callback): Delete.
13451         (infrun_thread_stop_requested): If the thread is internally
13452         stopped, queue a pending stop event and clear the thread's
13453         inline-frame state.
13454         (handle_stop_requested): New function.
13455         (handle_syscall_event, handle_inferior_event_1): Use
13456         handle_stop_requested.
13457         (handle_stop_requested): New function.
13458         (handle_signal_stop): Set the thread's stop_signal here instead of
13459         at caller.
13460         (finish_step_over): Clear step over info unconditionally.
13461         (handle_signal_stop): If the user had interrupted the event
13462         thread, consider the stop a random signal.
13463         (handle_signal_stop) <signal arrived while stepping over
13464         breakpoint>: Don't restart threads here.
13465         (stop_waiting): Don't clear step-over info here.
13466
13467 2017-03-08  Pedro Alves  <palves@redhat.com>
13468
13469         PR 21206
13470         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13471         goes to argument 2, not 1.
13472
13473 2017-03-08  Pedro Alves  <palves@redhat.com>
13474
13475         PR cli/21218
13476         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13477         display_gdb_prompt.
13478         (command_line_input): Add comment.
13479
13480 2017-03-08  Pedro Alves  <palves@redhat.com>
13481
13482         PR tui/21216
13483         * tui/tui-file.c (tui_file::write): New.
13484         * tui/tui-file.h (tui_file): Override "write".
13485         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13486         factored out from ...
13487         (tui_puts): ... here.
13488         (tui_putc): Use them.
13489         (tui_write): New function.
13490         * tui/tui-io.h (tui_write): Declare.
13491
13492 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13493
13494         * Makefile.in (SFILES): Replace "environ.c" with
13495         "common/environ.c".
13496         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13497         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13498         to...
13499         * common/environ.c: ... here.
13500         * environ.h: Moved to...
13501         * common/environ.h: ... here.
13502
13503 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13504
13505         * gdbarch.sh (pstring_ptr): New static function.
13506         (gdbarch_disassembler_options): Use it.
13507         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13508         not valid_disassembler_option->name.
13509         * gdbarch.c: Regenerate.
13510
13511 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13512
13513         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13514
13515 2017-03-07  Pedro Alves  <palves@redhat.com>
13516
13517         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13518
13519 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13520
13521         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13522         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13523         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13524         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13525
13526 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13527
13528         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13529
13530 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13531
13532         * remote.c (remote_add_target_side_commands): Use range-based
13533         for loop.
13534
13535 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13536
13537         PR gdb/21165
13538         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13539         value is lazy.
13540         * valprint.c (common_val_print): Likewise.
13541
13542 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13543
13544         * NEWS: Mention new set/show disassembler-options commands.
13545         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13546         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13547         (prospective_options): New static variable.
13548         (gdb_disassembler::gdb_disassembler): Initialize
13549         m_di.disassembler_options.
13550         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13551         (get_disassembler_options): New function.
13552         (set_disassembler_options): Likewise.
13553         (set_disassembler_options_sfunc): Likewise.
13554         (show_disassembler_options_sfunc): Likewise.
13555         (disassembler_options_completer): Likewise.
13556         (_initialize_disasm): Likewise.
13557         * disasm.h (get_disassembler_options): New prototype.
13558         (set_disassembler_options): Likewise.
13559         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13560         (gdbarch_verify_disassembler_options): Likewise.
13561         * gdbarch.c: Regenerate.
13562         * gdbarch.h: Likewise.
13563         * arm-tdep.c (num_disassembly_options): Delete.
13564         (set_disassembly_style): Likewise.
13565         (arm_disassembler_options): New static variable.
13566         (set_disassembly_style_sfunc): Convert short style name into long
13567         option name.  Call set_disassembler_options.
13568         (show_disassembly_style_sfunc): New function.
13569         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13570         set_gdbarch_verify_disassembler_options.
13571         (_initialize_arm_tdep): Delete regnames variable and update callers.
13572         (arm_disassembler_options): Initialize.
13573         (disasm_options): New variable.
13574         (num_disassembly_options): Rename from this...
13575         (num_disassembly_styles): ...to this.  Compute by scanning through
13576         disasm_options.
13577         (valid_disassembly_styles): Initialize using disasm_options.
13578         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13579         set_arm_regname_option.
13580         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13581         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13582         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13583         set_gdbarch_verify_disassembler_options.
13584         * s390-tdep.c (s390_disassembler_options): New static variable.
13585         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13586         set_gdbarch_verify_disassembler_options.
13587
13588 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13589
13590         * remote.c (remote_add_target_side_condition): Remove "struct"
13591         keyword from range-based for loop.
13592
13593 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13594
13595         * remote.c (remote_add_target_side_condition): Use range-based
13596         for loop.  Update comment.
13597
13598 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13599
13600         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13601
13602 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13603
13604         * regcache.c (regcache_raw_update): New function.
13605         (regcache_raw_read): Move code to regcache_raw_update.
13606         * regcache.h (regcache_raw_update): New declaration.
13607         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13608
13609 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13610
13611         * dwarf2read.c (create_debug_type_hash_table): Initialize
13612         header.signature and header.type_offset_in_tu.
13613
13614 2017-02-24  Pedro Alves  <palves@redhat.com>
13615
13616         * symtab.c (make_file_symbol_completion_list_1): Use
13617         add_symtab_completions.
13618
13619 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13620
13621         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13622
13623 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13624
13625         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13626         I386_MAX_REGISTER_SIZE.
13627         (i386_pseudo_register_write): Likewise.
13628         (i386_process_record): Likewise.
13629         * i387-tdep.c (i387_supply_xsave): Likewise.
13630         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13631         (store_register): Likewise.
13632
13633 2017-02-23  Pedro Alves  <palves@redhat.com>
13634
13635         * ada-lang.c: Include "common/function-view.h".
13636         (ada_iterate_over_symbols): Adjust to use function_view as
13637         callback type.
13638         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13639         (ada_make_symbol_completion_list): Use a lambda.
13640         (ada_exc_search_name_matches): Delete.
13641         (name_matches_regex): New.
13642         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13643         * compile/compile-c-support.c: Include "common/function-view.h".
13644         (print_one_macro): Change prototype to accept a ui_file pointer.
13645         (write_macro_definitions): Use a lambda.
13646         * dwarf2read.c: Include "common/function-view.h".
13647         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13648         (dw2_expand_symtabs_matching): Adjust to use function_view as
13649         callback type.
13650         * language.h: Include "common/function-view.h".
13651         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13652         function_view as callback type.
13653         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13654         * linespec.c: Include "common/function-view.h".
13655         (collect_info::add_symbol): New method.
13656         (struct symbol_and_data_callback, iterate_inline_only, struct
13657         symbol_matcher_data, iterate_name_matcher): Delete.
13658         (iterate_over_all_matching_symtabs): Adjust to use function_view
13659         as callback type and lambdas.
13660         (iterate_over_file_blocks): Adjust to use function_view as
13661         callback type.
13662         (decode_compound_collector): Now a class with private fields.
13663         (decode_compound_collector::release_symbols): New method.
13664         (collect_one_symbol): Rename to...
13665         (decode_compound_collector::operator()): ... this and adjust.
13666         (lookup_prefix_sym): decode_compound_collector construction bits
13667         move to decode_compound_collector ctor.  Pass the
13668         decode_compound_collector object directly as callback.  Remove
13669         cleanups and use decode_compound_collector::release_symbols
13670         instead.
13671         (symtab_collector): Now a class with private fields.
13672         (symtab_collector::release_symtabs): New method.
13673         (add_symtabs_to_list): Rename to...
13674         (symtab_collector::operator()): ... this and adjust.
13675         (collect_symtabs_from_filename): symtab_collector construction
13676         bits move to symtab_collector ctor.  Pass the symtab_collector
13677         object directly as callback.  Remove cleanups and use
13678         symtab_collector::release_symtabs instead.
13679         (collect_symbols): Delete.
13680         (add_matching_symbols_to_info): Use lambdas.
13681         * macrocmd.c (print_macro_callback): Delete.
13682         (info_macro_command): Use a lambda.
13683         (info_macros_command): Pass print_macro_definition as callable
13684         directly.
13685         (print_one_macro): Remove 'ignore' parameter.
13686         (macro_list_command): Adjust.
13687         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13688         (macro_for_each_data::user_data): Delete field.
13689         (foreach_macro): Adjust to call the function_view.
13690         (macro_for_each): Adjust to use function_view as callback type.
13691         (foreach_macro_in_scope): Adjust to call the function_view.
13692         (macro_for_each_in_scope): Adjust to use function_view as callback
13693         type.
13694         * macrotab.h: Include "common/function-view.h".
13695         (macro_callback_fn): Declare a prototype instead of a pointer.
13696         Remove "user_data" parameter.
13697         (macro_for_each, macro_for_each_in_scope): Adjust to use
13698         function_view as callback type.
13699         * psymtab.c (partial_map_expand_apply)
13700         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13701         Adjust to use function_view as callback type and to return bool.
13702         (psym_expand_symtabs_matching): Adjust to use function_view as
13703         callback types.
13704         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13705         to use function_view as callback type and to return bool.
13706         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13707         callback types.
13708         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13709         as callback types.
13710         * symfile.h: Include "common/function-view.h".
13711         (expand_symtabs_file_matcher_ftype)
13712         (expand_symtabs_symbol_matcher_ftype)
13713         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13714         return bool.
13715         (quick_symbol_functions::map_symtabs_matching_filename)
13716         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13717         function_view as callback type and return bool.
13718         (expand_symtabs_matching): Adjust to use function_view as callback
13719         type.
13720         (maintenance_expand_name_matcher)
13721         (maintenance_expand_file_matcher): Delete.
13722         (maintenance_expand_symtabs): Use lambdas.
13723         * symtab.c (iterate_over_some_symtabs): Adjust to use
13724         function_view as callback types and return bool.
13725         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13726         of a cleanup.
13727         (lookup_symtab_callback): Delete.
13728         (lookup_symtab): Use a lambda.
13729         (iterate_over_symbols): Adjust to use function_view as callback
13730         type.
13731         (struct search_symbols_data, search_symbols_file_matches)
13732         (search_symbols_name_matches): Delete.
13733         (search_symbols): Use a pair of lambdas.
13734         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13735         (symtab_expansion_callback): Delete.
13736         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13737         * symtab.h: Include "common/function-view.h".
13738         (iterate_over_some_symtabs): Adjust to use function_view as
13739         callback type and return bool.
13740         (iterate_over_symtabs): Adjust to use function_view as callback
13741         type.
13742         (symbol_found_callback_ftype): Remove 'data' parameter and return
13743         bool.
13744         (iterate_over_symbols): Adjust to use function_view as callback
13745         type.
13746
13747 2017-02-23  Pedro Alves  <palves@redhat.com>
13748
13749         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13750         (%.o) <unittests/%.c>: New pattern.
13751         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13752         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13753         * common/function-view.h: New file.
13754         * unittests/function-view-selftests.c: New file.
13755         * configure: Regenerate.
13756
13757 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13758
13759         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13760         inferior_ptid.
13761         * go32-nat.c (go32_thread_alive): Likewise.
13762
13763 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13764
13765         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13766         delete.
13767
13768 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13769
13770         * varobj.c (varobj_clear_saved_item): Use delete instead of
13771         xfree.
13772         (update_dynamic_varobj_children): Likewise.
13773
13774 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13775
13776         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13777
13778 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13779
13780         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13781         m_enum_value to 0 in default constructor.
13782
13783 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13784
13785         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13786         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13787         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13788         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13789         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13790         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13791         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13792         IS_STORE_CONDITIONAL_INSN.
13793
13794 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13795
13796         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13797
13798 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13799
13800         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13801
13802 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13803
13804         * dwarf2read.c (skip_one_die, read_attribute_value)
13805         (dwarf2_const_value_attr, dump_die_shallow)
13806         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13807         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13808
13809 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13810
13811         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13812         (dwarf_parse_macro_header): Accept DWARF version 5.
13813         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13814
13815 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13816
13817         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13818         DW_AT_GNU_*.
13819         * common/common-exceptions.h (enum errors): Likewise.
13820         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13821         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13822         (dwarf_expr_context::execute_stack_op): Likewise.
13823         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13824         Likewise.
13825         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13826         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13827         (show_entry_values_debug, call_site_to_target_addr)
13828         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13829         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13830         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13831         (value_of_dwarf_block_entry, indirect_pieced_value)
13832         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13833         (disassemble_dwarf_expression): Likewise.
13834         * dwarf2read.c (process_die, inherit_abstract_dies)
13835         (read_call_site_scope): Likewise.
13836         * gdbtypes.h (struct func_type, struct call_site_parameter)
13837         (struct call_site): Likewise.
13838         * stack.c (read_frame_arg): Likewise.
13839         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13840
13841 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13842
13843         * defs.h (read_unsigned_leb128): New declaration.
13844         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13845         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13846         (dwarf2_find_location_expression): Call also
13847         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13848         * dwarf2loc.h (dwarf2_version): New declaration.
13849         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13850         rnglists.
13851         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13852         .debug_rnglists.
13853         (struct dwop_section_names): Add loclists_dwo.
13854         (dwop_section_names): Add .debug_loclists.dwo.
13855         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13856         (struct dwarf2_per_cu_data): Add dwarf_version.
13857         (struct dwo_sections): Add loclists.
13858         (struct attr_abbrev): Add implicit_const.
13859         (read_indirect_line_string): New declaration.
13860         (read_unsigned_leb128): Delete declaration.
13861         (rcuh_kind): New definition.
13862         (read_and_check_comp_unit_head): Change parameter
13863         is_debug_types_section to section_kind.
13864         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13865         (read_comp_unit_head): Change parameter abfd to section, add parameter
13866         section_kind.  Handle DWARF-5.
13867         (error_check_comp_unit_head): Accept also DWARF version 5.
13868         (read_and_check_comp_unit_head): Change parameter
13869         is_debug_types_section to section_kind.
13870         (read_and_check_type_unit_head): Delete function.
13871         (read_abbrev_offset): Handle DWARF-5.
13872         (create_debug_type_hash_table): Add parameter section_kind.  Process
13873         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13874         comp_unit_head.
13875         (create_debug_types_hash_table): Update create_debug_type_hash_table
13876         caller.
13877         (create_all_type_units): Call create_debug_type_hash_table.
13878         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13879         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13880         caller.
13881         (skip_one_die): Handle DW_FORM_implicit_const.
13882         (dwarf2_rnglists_process): New function.
13883         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13884         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13885         (read_attribute_value): Handle DW_FORM_implicit_const,
13886         DW_FORM_line_strp.
13887         (read_attribute): Handle DW_FORM_implicit_const.
13888         (read_indirect_string_at_offset_from): New function from
13889         read_indirect_string_at_offset.
13890         (read_indirect_string_at_offset): Call
13891         read_indirect_string_at_offset_from.
13892         (read_indirect_line_string_at_offset): New function.
13893         (read_indirect_string): New function comment.
13894         (read_indirect_line_string): New function.
13895         (read_unsigned_leb128): Make it global.
13896         (dwarf2_string_attr): Handle DWARF-5.
13897         (add_include_dir_stub, read_formatted_entries): New functions.
13898         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13899         Handle DWARF-5.
13900         (per_cu_header_read_in): Update read_comp_unit_head caller.
13901         (dwarf2_version): New function.
13902         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13903         rnglists.
13904         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13905         fields.
13906
13907 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13908
13909         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13910
13911 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13912
13913         * dwarf2read.c (dwarf2_ranges_process): New function from
13914         dwarf2_ranges_read.
13915         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13916         dwarf2_ranges_process.
13917
13918 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13919
13920         * dwarf2read.c (create_debug_type_hash_table): New function from
13921         create_debug_types_hash_table.
13922         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13923         (create_all_type_units, open_and_init_dwo_file): Update
13924         create_debug_types_hash_table callers.
13925
13926 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13927
13928         PR gdb/16188
13929         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13930         refer to 'ap', not 'args'.
13931
13932 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13933             Pedro Alves  <palves@redhat.com>
13934
13935         PR gdb/16188
13936         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13937         calls succeeded.
13938         * fork-child.c (trace_start_error): New function.
13939         (trace_start_error_with_name): Likewise.
13940         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13941         * inf-ptrace.c (inf_ptrace_me): Likewise.
13942         * inferior.h (trace_start_error): New prototype.
13943         (trace_start_error_with_name): Likewise.
13944
13945 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13946
13947         PR gdb/21164
13948         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13949         NULL before using it.
13950         * symmisc.c (maintenance_print_symbols): Likewise.
13951         (maintenance_print_msymbols): Likewise.
13952
13953 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13954
13955         * NEWS: Add record Python bindings entry.
13956
13957 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13958
13959         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13960         py-record-full.o.
13961         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13962         * python/py-record-btrace.c, python/py-record-btrace.h,
13963         python/py-record-full.c, python/py-record-full.h: New file.
13964         * python/py-record.c: Add include for py-record-btrace.h and
13965         py-record-full.h.
13966         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13967         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13968         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13969         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13970         New definition.
13971         (gdbpy_initialize_btrace): New export.
13972         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13973
13974 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13975
13976         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13977         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13978         * python/py-record.c: New file.
13979         * python/python-internal.h (gdbpy_start_recording,
13980         gdbpy_current_recording, gdpy_stop_recording,
13981         gdbpy_initialize_record): New export.
13982         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13983         (python_GdbMethods): Add gdbpy_start_recording,
13984         gdbpy_current_recording and gdbpy_stop_recording.
13985
13986 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13987
13988         * record-btrace.c (record_btrace_record_method): New function.
13989         (init_record_btrace_ops): Initialize to_record_method.
13990         * record-full.c (record_full_record_method): New function.
13991         (init_record_full_ops, init_record_full_core_ops): Add
13992         record_full_record_method.
13993         * record.h (enum record_method): New enum.
13994         * target-debug.h (target_debug_print_enum_record_method: New define.
13995         * target-delegates.c: Regenerate.
13996         * target.c (target_record_method): New function.
13997         * target.h: Include record.h.
13998         (struct target_ops) <to_record_method>: New field.
13999         (target_record_method): New export.
14000
14001 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14002
14003         * record.h (record_start, record_stop): New export.
14004         * record.c (record_start, record_stop): New function.
14005
14006 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14007
14008         * btrace.c (btrace_fetch): Copy function call segments pointer
14009         into a vector.
14010         (btrace_clear): Clear the vector.
14011         (btrace_find_insn_by_number): Use binary search to find the correct
14012         function call segment.
14013         * btrace.h (brace_fun_p): New typedef.
14014         (struct btrace_thread_info) <functions>: New field.
14015
14016 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14017
14018         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14019         * btrace.c (btrace_decode_error): ... here.  New function.
14020         * btrace.h (btrace_decode_error): New export.
14021
14022 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14023
14024         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14025         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14026         btrace_find_insn_by_number): Remove special case for gaps.
14027         * btrace.h (btrace_insn_get_error): New export.
14028         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14029         * record-btrace.c (btrace_insn_history): Print number for gaps.
14030         (record_btrace_info, record_btrace_goto): Handle gaps.
14031
14032 2017-02-14  Tom Tromey  <tom@tromey.com>
14033
14034         PR python/13598:
14035         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14036         event.
14037         * python/py-evts.c (gdbpy_initialize_py_events): Add
14038         before_prompt registry.
14039         * python/py-events.h (events_object) <before_prompt>: New field.
14040
14041 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14042
14043         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14044
14045 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14046
14047         * symfile (_initialize_symfile): Add usage text to the load command's
14048         help text.
14049
14050 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14051
14052         * utils.c (defaulted_query): Don't query on secondary UIs.
14053
14054 2017-02-10  Tom Tromey  <tom@tromey.com>
14055
14056         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14057
14058 2017-02-10  Tom Tromey  <tom@tromey.com>
14059
14060         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14061         "cleanup" local.
14062         * python/py-type.c (typy_legacy_template_argument): Remove
14063         unnecessary "cleanup" local.
14064
14065 2017-02-10  Tom Tromey  <tom@tromey.com>
14066
14067         * python/python.c (do_start_initialization): New function, from
14068         _initialize_python.
14069         (_initialize_python): Call do_start_initialization.
14070         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14071         goto.
14072
14073 2017-02-10  Tom Tromey  <tom@tromey.com>
14074
14075         * python/py-prettyprint.c (pretty_print_one_value): Use
14076         gdbpy_ref.
14077
14078 2017-02-10  Tom Tromey  <tom@tromey.com>
14079
14080         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14081         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14082         gdbpy_ref.
14083         * python/py-type.c (field_new): Use gdbpy_ref.
14084         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14085         gdbpy_ref.
14086         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14087         (py_free_pspace): Likewise.
14088         (pspace_to_pspace_object): Likewise.
14089         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14090         (py_free_objfile): Likewise.
14091         (objfile_to_objfile_object): Likewise.
14092         * python/py-inferior.c (delete_thread_object): Use
14093         gdbpy_ref.
14094         (infpy_read_memory): Likewise.
14095         (py_free_inferior): Likewise.
14096         * python/py-evtregistry.c (create_eventregistry_object): Use
14097         gdbpy_ref.
14098         * python/py-event.c (create_event_object): Use gdbpy_ref.
14099
14100 2017-02-10  Tom Tromey  <tom@tromey.com>
14101
14102         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14103         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14104         used.
14105         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14106         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14107         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14108         python/py-framefilter.c, python/py-function.c,
14109         python/py-inferior.c, python/py-infevents.c,
14110         python/py-linetable.c, python/py-newobjfileevent.c,
14111         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14112         python/py-signalevent.c, python/py-stopevent.c,
14113         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14114         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14115         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14116         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14117
14118 2017-02-10  Tom Tromey  <tom@tromey.com>
14119
14120         * ui-out.h (ui_out_emit_type): New class.
14121         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14122         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14123         and ui_out_emit_tuple.
14124         (enumerate_locals): Likewise.
14125         (py_mi_print_variables, py_print_locals, py_print_args): Use
14126         ui_out_emit_list.
14127         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14128         ui_out_emit_list.
14129         * common/gdb_optional.h: New file.
14130
14131 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14132
14133         * MAINTAINERS (Write After Approval): Update my e-mail address.
14134
14135 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14136
14137         PR gdb/21122
14138         * breakpoint.c (_initialize_breakpoint): Update the help description
14139         of the 'commands' command to indicate that it takes a list argument.
14140
14141 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14142
14143         * interps.c (current_interp_set_logging): Remove "return".
14144
14145 2017-02-09  Gary Benson  <gbenson@redhat.com>
14146
14147         * symtab.c (add_symtab_completions): Prevent NULL pointer
14148         dereference.
14149
14150 2017-02-08  Pedro Alves  <palves@redhat.com>
14151
14152         * interps.c (interp::interp): Remove reference to quiet_p.
14153         (interp_set): Make static.  Remove dead "Switching to" output
14154         code.
14155         (interp_quiet_p, interp_set_quiet): Delete.
14156         (interpreter_exec_cmd): Don't set the interpreter quiet.
14157         * interps.h (interp_quiet_p): Make static.
14158         (class interp) <quiet_p>: Remove field
14159
14160 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14161
14162         * cli/cli-decode.c (find_command_name_length): Make it extern.
14163         * cli/cli-decode.h (find_command_name_length): Declare.
14164         * cli/cli-script.c (command_name_equals, line_first_arg):
14165         New functions.
14166         (process_next_line): Use cli-decode to parse command names.
14167         (build_command_line): Make args a constant pointer.
14168
14169 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14170
14171         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14172         Remove case-insensitive search.
14173
14174 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14175
14176         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14177         at the end of the line.  Avoids an ARI warning.
14178
14179 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14180
14181         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14182         rdseed instructions.
14183         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14184
14185 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14186
14187         PR tdep/20936
14188         Provide and use sparc32 and sparc64 target description XML files.
14189         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14190         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14191         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14192         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14193         * features/sparc/sparc32-solaris.xml: New file.
14194         * features/sparc/sparc64-solaris.xml: New file.
14195         * features/sparc/sparc32-solaris.c: Generated.
14196         * features/sparc/sparc64-solaris.c: Generated.
14197         * sparc-tdep.h: Account for differences in target descriptions.
14198         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14199         (sparc32_register_type): Use target provided registers.
14200         (validate_tdesc_registers): New function.
14201         (sparc32_gdbarch_init): Use tdesc_has_registers.
14202         Set pseudoregister functions.
14203         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14204         (sparc64_register_type): Use target provided registers.
14205         (sparc64_init_abi): Set pseudoregister functions.
14206
14207 2017-02-03  Tom Tromey  <tom@tromey.com>
14208
14209         PR rust/21097:
14210         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14211         with a single member.
14212
14213 2017-02-03  Pedro Alves  <palves@redhat.com>
14214
14215         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14216         (cli_interp_base::~cli_interp_base): New.
14217         (cli_interp): New struct.
14218         (as_cli_interp): Cast the interp itself to cli_interp.
14219         (cli_interpreter_pre_command_loop): Rename to ...
14220         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14221         parameter.
14222         (cli_interpreter_init): Rename to ...
14223         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14224         boolean.  Make extern.
14225         (cli_interpreter_resume): Rename to ...
14226         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14227         extern.
14228         (cli_interpreter_suspend): Rename to ...
14229         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14230         extern.
14231         (cli_interpreter_exec): Rename to ...
14232         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14233         extern.
14234         (cli_interpreter_supports_command_editing): Rename to ...
14235         (cli_interp_base::supports_command_editing): ... this.  Remove
14236         'interp' parameter.  Make extern.
14237         (cli_ui_out): Rename to ...
14238         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14239         Make extern.
14240         (cli_set_logging): Rename to ...
14241         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14242         parameter.  Make extern.
14243         (cli_interp_procs): Delete.
14244         (cli_interp_factory): Adjust to use "new".
14245         * cli/cli-interp.h: Include "interps.h".
14246         (struct cli_interp_base): New struct.
14247         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14248         (interp_new): Delete.
14249         (interp::interp, interp::~interp): New.
14250         (interp_set): Use bool, and return void.  Assume the interpreter
14251         has suspend, init and resume methods, and that the all return
14252         void.
14253         (set_top_level_interpreter): interp_set returns void.
14254         (interp_ui_out): Adapt.
14255         (current_interp_set_logging): Adapt.
14256         (interp_data): Delete.
14257         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14258         (interp_exec): Adapt.
14259         (top_level_interpreter_data): Delete.
14260         * interps.h (interp_init_ftype, interp_resume_ftype)
14261         (interp_suspend_ftype, interp_exec_ftype)
14262         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14263         (class interp): New.
14264         (interp_new): Delete.
14265         (interp_set): Now returns void.  Use bool.
14266         (interp_data, top_level_interpreter_data): Delete.
14267         * mi/mi-common.h: Include interps.h.
14268         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14269         init, resume, suspect, exec, interp_ui_out, set_logging and
14270         pre_command_loop methods.
14271         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14272         (mi_interpreter_init): Rename to ...
14273         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14274         bool, return void and make extern.  Adjust.
14275         (mi_interpreter_resume): ... Rename to ...
14276         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14277         return void and make extern.  Adjust.
14278         (mi_interpreter_suspend): ... Rename to ...
14279         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14280         return void and make extern.  Adjust.
14281         (mi_interpreter_exec): ... Rename to ...
14282         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14283         extern.  Adjust.
14284         (mi_interpreter_pre_command_loop): ... Rename to ...
14285         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14286         parameter and make extern.
14287         (mi_on_normal_stop_1): Adjust.
14288         (mi_ui_out): Rename to ...
14289         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14290         parameter and make extern.  Adjust.
14291         (mi_set_logging): Rename to ...
14292         (mi_interp::set_logging): ... this.  Remove the 'interp'
14293         parameter and make extern.  Adjust.
14294         (mi_interp_procs): Delete.
14295         (mi_interp_factory): Adjust to use 'new'.
14296         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14297         (mi_print_exception, mi_execute_command, mi_load_progress):
14298         Adjust.
14299         * tui/tui-interp.c (tui_interp): New class.
14300         (as_tui_interp): Return a tui_interp pointer.
14301         (tui_on_normal_stop, tui_on_signal_received)
14302         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14303         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14304         to use interp::interp_ui_out.
14305         (tui_init): Rename to ...
14306         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14307         bool, return void and make extern.  Adjust.
14308         (tui_resume): Rename to ...
14309         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14310         return void and make extern.  Adjust.
14311         (tui_suspend): Rename to ...
14312         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14313         return void and make extern.  Adjust.
14314         (tui_ui_out): Rename to ...
14315         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14316         parameter, and make extern.  Adjust.
14317         (tui_exec): Rename to ...
14318         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14319         make extern.
14320         (tui_interp_procs): Delete.
14321         (tui_interp_factory): Use "new".
14322
14323 2017-02-02  Tom Tromey  <tom@tromey.com>
14324
14325         * rust-exp.y (ends_raw_string, space_then_number)
14326         (rust_identifier_start_p): Return bool.
14327         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14328         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14329         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14330         (rust_chartype_p): Return bool.
14331         (val_print_struct, rust_print_struct_def, rust_print_type):
14332         Update.
14333         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14334         Return bool.
14335
14336 2017-02-02  Tom Tromey  <tom@tromey.com>
14337
14338         * rust-lang.c: Reindent.
14339
14340 2017-02-02  Tom Tromey  <tom@tromey.com>
14341
14342         * rust-lang.h (rust_crate_for_block): Update.
14343         * rust-lang.c (rust_crate_for_block): Return std::string.
14344         (rust_get_disr_info): Use std:;string, not
14345         gdb::unique_xmalloc_ptr.
14346         * rust-exp.y (crate_name): Update.
14347
14348 2017-02-02  Pedro Alves  <palves@redhat.com>
14349
14350         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14351         field out of gdb_disassembler_test and make it static.
14352
14353 2017-02-02  Pedro Alves  <palves@redhat.com>
14354
14355         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14356         mi1_interp and mi_interp fields.
14357
14358 2017-02-02  Pedro Alves  <palves@redhat.com>
14359
14360         * cli/cli-interp.c (struct saved_output_files, saved_output):
14361         Moved from cli/cli-logging.c.
14362         (cli_set_logging): New function.
14363         (cli_interp_procs): Install cli_set_logging.
14364         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14365         Declare.
14366         * cli/cli-logging.c (struct saved_output_files, saved_output):
14367         Moved to cli/cli-interp.c.
14368         (pop_output_files): Don't save outputs here.
14369         (make_logging_output): New function.
14370         (handle_redirections): Don't build tee nor save previous outputs
14371         here.
14372         * interps.c (current_interp_set_logging): Change prototype.
14373         Assume there's always a set_logging_proc method installed.
14374         * interps.h (interp_set_logging_ftype): Change prototype.
14375         (current_interp_set_logging): Change prototype and adjust comment.
14376         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14377         use make_logging_output.
14378         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14379 2017-02-02  Pedro Alves  <palves@redhat.com>
14380
14381         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14382         from ...
14383         (set_logging_overwrite): ... here.
14384         (logging_no_redirect_file): Delete.
14385         (set_logging_redirect): Don't handle redirection on the fly.
14386         Instead warn that "logging off" / "logging on" is necessary.
14387         (pop_output_files): Delete references to logging_no_redirect_file.
14388         (show_logging_command): Always speak in terms of what will happen
14389         once logging is reenabled.
14390
14391 2017-02-02  Pedro Alves  <palves@redhat.com>
14392
14393         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14394
14395 2017-02-02  Pedro Alves  <palves@redhat.com>
14396
14397         * disasm.c (gdb_pretty_print_insn): Rename to ...
14398         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14399         Remove gdbarch parameter.  Adapt to clear the object's buffers
14400         instead of allocating new buffers, and to print using the object's
14401         gdb_disassembler instead of calling gdb_print_insn.
14402         (dump_insns): Use gdb_pretty_print_disassembler.
14403         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14404         (gdb_pretty_print_disassembler): New class.
14405         * record-btrace.c (btrace_insn_history): Use
14406         gdb_pretty_print_disassembler.
14407
14408 2017-02-02  Pedro Alves  <palves@redhat.com>
14409
14410         * ada-lang.c (type_as_string): Use string_file.
14411         * ada-valprint.c (ada_print_floating): Use string_file.
14412         * ada-varobj.c (ada_varobj_scalar_image)
14413         (ada_varobj_get_value_image): Use string_file.
14414         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14415         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14416         * breakpoint.c (update_inserted_breakpoint_locations)
14417         (insert_breakpoint_locations, reattach_breakpoints)
14418         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14419         (print_it_watchpoint): Use string_file.
14420         (save_breakpoints): Use stdio_file.
14421         * c-exp.y (oper): Use string_file.
14422         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14423         tee_file.
14424         (pop_output_files): Use delete.
14425         (handle_redirections): Use stdio_file and tee_file.
14426         * cli/cli-setshow.c (do_show_command): Use string_file.
14427         * compile/compile-c-support.c (c_compute_program): Use
14428         string_file.
14429         * compile/compile-c-symbols.c (generate_vla_size): Take a
14430         'string_file &' instead of a 'ui_file *'.
14431         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14432         of a 'ui_file *'.  Use string_file.
14433         (generate_c_for_variable_locations): Take a 'string_file &'
14434         instead of a 'ui_file *'.
14435         * compile/compile-internal.h (generate_c_for_for_one_variable):
14436         Take a 'string_file &' instead of a 'ui_file *'.
14437         * compile/compile-loc2c.c (push, pushf, unary, binary)
14438         (print_label, pushf_register_address, pushf_register)
14439         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14440         'ui_file *'.  Adjust.
14441         * compile/compile.c (compile_to_object): Use string_file.
14442         * compile/compile.h (compile_dwarf_expr_to_c)
14443         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14444         'ui_file *'.
14445         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14446         (replace_typedefs_qualified_name): Use string_file and
14447         obstack_copy0.
14448         * disasm.c (gdb_pretty_print_insn): Use string_file.
14449         (gdb_disassembly): Adjust reference the null_stream global.
14450         (do_ui_file_delete): Delete.
14451         (gdb_insn_length): Use null_stream.
14452         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14453         * dwarf2loc.c (dwarf2_compile_property_to_c)
14454         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14455         'string_file &' instead of a 'ui_file *'.
14456         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14457         * dwarf2read.c (do_ui_file_peek_last): Delete.
14458         (dwarf2_compute_name): Use string_file.
14459         * event-top.c (gdb_setup_readline): Use stdio_file.
14460         * gdbarch.sh (verify_gdbarch): Use string_file.
14461         * gdbtypes.c (safe_parse_type): Use null_stream.
14462         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14463         string_file.
14464         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14465         'string_file *' instead of a 'ui_file *'.
14466         (gdbscm_arch_disassemble): Use string_file.
14467         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14468         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14469         inherits from ui_file.
14470         (ioscm_file_port_delete, ioscm_file_port_rewind)
14471         (ioscm_file_port_put): Delete.
14472         (ioscm_file_port_write): Rename to ...
14473         (ioscm_file_port::write): ... this.  Remove file_port_magic
14474         checks.
14475         (ioscm_file_port_new): Delete.
14476         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14477         ui_file_up.
14478         * guile/scm-type.c (tyscm_type_name): Use string_file.
14479         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14480         Use string_file.
14481         * infcmd.c (print_return_value_1): Use string_file.
14482         * infrun.c (print_target_wait_results): Use string_file.
14483         * language.c (add_language): Use string_file.
14484         * location.c (explicit_to_string_internal): Use string_file.
14485         * main.c (captured_main_1): Use null_file.
14486         * maint.c (maintenance_print_architecture): Use stdio_file.
14487         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14488         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14489         event_channel>: Change type to mi_console_file pointer.
14490         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14491         (mi_console_file_delete): Delete.
14492         (struct mi_console_file): Delete.
14493         (mi_console_file_magic): Delete.
14494         (mi_console_file_new): Delete.
14495         (mi_console_file::mi_console_file): New.
14496         (mi_console_file_delete): Delete.
14497         (mi_console_file_fputs): Delete.
14498         (mi_console_file::write): New.
14499         (mi_console_raw_packet): Delete.
14500         (mi_console_file::flush): New.
14501         (mi_console_file_flush): Delete.
14502         (mi_console_set_raw): Rename to ...
14503         (mi_console_file::set_raw): ... this.
14504         * mi/mi-console.h (class mi_console_file): New class.
14505         (mi_console_file_new, mi_console_set_raw): Delete.
14506         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14507         (mi_set_logging): Use delete and tee_file.  Adjust.
14508         * mi/mi-main.c (output_register): Use string_file.
14509         (mi_cmd_data_evaluate_expression): Use string_file.
14510         (mi_cmd_data_read_memory): Use string_file.
14511         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14512         * mi/mi-out.c (mi_ui_out::main_stream): New.
14513         (mi_ui_out::rewind): Use main_stream and
14514         string_file.
14515         (mi_ui_out::put): Use main_stream and string_file.
14516         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14517         Allocate a 'string_file' instead.
14518         (mi_out_new): Don't allocate a mem_fileopen stream here.
14519         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14520         (mi_ui_out::main_stream): Declare method.
14521         * printcmd.c (eval_command): Use string_file.
14522         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14523         * python/py-arch.c (archpy_disassemble): Use string_file.
14524         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14525         * python/py-frame.c (frapy_str): Use string_file.
14526         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14527         Use string_file.
14528         * python/py-type.c (typy_str): Use string_file.
14529         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14530         * python/py-value.c (valpy_str): Use string_file.
14531         * record-btrace.c (btrace_insn_history): Use string_file.
14532         * regcache.c (regcache_print): Use stdio_file.
14533         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14534         * remote.c (escape_buffer): Use string_file.
14535         * rust-lang.c (rust_get_disr_info): Use string_file.
14536         * serial.c (serial_open_ops_1): Use stdio_file.
14537         (do_serial_close): Use delete.
14538         * stack.c (print_frame_arg): Use string_file.
14539         (print_frame_args): Remove local mem_fileopen stream, not used.
14540         (print_frame): Use string_file.
14541         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14542         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14543         Take a 'string_file *' instead of a 'ui_file *'.
14544         * top.c (new_ui): Use stdio_file and stderr_file.
14545         (free_ui): Use delete.
14546         (execute_command_to_string): Use string_file.
14547         (quit_confirm): Use string_file.
14548         * tracepoint.c (collection_list::append_exp): Use string_file.
14549         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14550         * tui/tui-file.c: Don't include "ui-file.h".
14551         (enum streamtype, struct tui_stream): Delete.
14552         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14553         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14554         (tui_file::tui_file): New method.
14555         (tui_file_fputs): Delete.
14556         (tui_file_get_strbuf): Delete.
14557         (tui_file::puts): New method.
14558         (tui_file_adjust_strbuf): Delete.
14559         (tui_file_flush): Delete.
14560         (tui_file::flush): New method.
14561         * tui/tui-file.h: Tweak intro comment.
14562         Include ui-file.h.
14563         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14564         (tui_file_adjust_strbuf): Delete declarations.
14565         (class tui_file): New class.
14566         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14567         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14568         (tui_register_format): Use string_stream.
14569         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14570         (tui_get_function_from_frame): Use string_file.
14571         * typeprint.c (type_to_string): Use string_file.
14572         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14573         (null_stream): New global.
14574         (ui_file_delete): Delete.
14575         (ui_file::ui_file): New.
14576         (null_file_isatty): Delete.
14577         (ui_file::~ui_file): New.
14578         (null_file_rewind): Delete.
14579         (ui_file::printf): New.
14580         (null_file_put): Delete.
14581         (null_file_flush): Delete.
14582         (ui_file::putstr): New.
14583         (null_file_write): Delete.
14584         (ui_file::putstrn): New.
14585         (null_file_read): Delete.
14586         (ui_file::putc): New.
14587         (null_file_fputs): Delete.
14588         (null_file_write_async_safe): Delete.
14589         (ui_file::vprintf): New.
14590         (null_file_delete): Delete.
14591         (null_file::write): New.
14592         (null_file_fseek): Delete.
14593         (null_file::puts): New.
14594         (ui_file_data): Delete.
14595         (null_file::write_async_safe): New.
14596         (gdb_flush, ui_file_isatty): Adjust.
14597         (ui_file_put, ui_file_rewind): Delete.
14598         (ui_file_write): Adjust.
14599         (ui_file_write_for_put): Delete.
14600         (ui_file_write_async_safe, ui_file_read): Adjust.
14601         (ui_file_fseek): Delete.
14602         (fputs_unfiltered): Adjust.
14603         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14604         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14605         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14606         (set_ui_file_data): Delete.
14607         (string_file::~string_file, string_file::write)
14608         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14609         (do_ui_file_as_string, ui_file_as_string): Delete.
14610         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14611         (struct mem_file): Delete.
14612         (mem_file_new): Delete.
14613         (stdio_file::stdio_file): New.
14614         (mem_file_delete): Delete.
14615         (stdio_file::stdio_file): New.
14616         (mem_fileopen): Delete.
14617         (stdio_file::~stdio_file): New.
14618         (mem_file_rewind): Delete.
14619         (stdio_file::set_stream): New.
14620         (mem_file_put): Delete.
14621         (stdio_file::open): New.
14622         (mem_file_write): Delete.
14623         (stdio_file_magic, struct stdio_file): Delete.
14624         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14625         (stdio_file::flush): New.
14626         (stdio_file_read): Rename to ...
14627         (stdio_file::read): ... this.  Adjust.
14628         (stdio_file_write): Rename to ...
14629         (stdio_file::write): ... this.  Adjust.
14630         (stdio_file_write_async_safe): Rename to ...
14631         (stdio_file::write_async_safe) ... this.  Adjust.
14632         (stdio_file_fputs): Rename to ...
14633         (stdio_file::puts) ... this.  Adjust.
14634         (stdio_file_isatty): Delete.
14635         (stdio_file_fseek): Delete.
14636         (stdio_file::isatty): New.
14637         (stderr_file_write): Rename to ...
14638         (stderr_file::write) ... this.  Adjust.
14639         (stderr_file_fputs): Rename to ...
14640         (stderr_file::puts) ... this.  Adjust.
14641         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14642         (stderr_file::stderr_file): New.
14643         (tee_file_magic): Delete.
14644         (struct tee_file): Delete.
14645         (tee_file::tee_file): New.
14646         (tee_file_new): Delete.
14647         (tee_file::~tee_file): New.
14648         (tee_file_delete): Delete.
14649         (tee_file_flush): Rename to ...
14650         (tee_file::flush): ... this.  Adjust.
14651         (tee_file_write): Rename to ...
14652         (tee_file::write): ... this.  Adjust.
14653         (tee_file::write_async_safe): New.
14654         (tee_file_fputs): Rename to ...
14655         (tee_file::puts): ... this.  Adjust.
14656         (tee_file_isatty): Rename to ...
14657         (tee_file::isatty): ... this.  Adjust.
14658         * ui-file.h (struct obstack, struct ui_file): Don't
14659         forward-declare.
14660         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14661         (ui_file_write_ftype)
14662         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14663         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14664         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14665         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14666         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14667         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14668         (set_ui_file_fseek): Delete.
14669         (ui_file_data, ui_file_delete, ui_file_rewind)
14670         (struct ui_file): New.
14671         (ui_file_up): New.
14672         (class null_file): New.
14673         (null_stream): Declare.
14674         (ui_file_write_for_put, ui_file_put): Delete.
14675         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14676         Delete.
14677         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14678         (gdb_fopen, tee_file_new): Delete.
14679         (struct string_file): New.
14680         (struct stdio_file): New.
14681         (stdio_file_up): New.
14682         (struct stderr_file): New.
14683         (class tee_file): New.
14684         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14685         of a 'ui_file *'.  Adjust.
14686         * ui-out.h (class ui_out) <field_stream>: Likewise.
14687         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14688         (null_stream): Delete.
14689         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14690         Adjust.
14691         * utils.h (struct ui_file): Delete forward declaration..
14692         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14693         (error_stream): Take a 'string_file &' instead of a
14694         'ui_file *'.
14695         * varobj.c (varobj_value_get_print_value): Use string_file.
14696         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14697         * gdbarch.c: Regenerate.
14698
14699 2017-02-02  Pedro Alves  <palves@redhat.com>
14700
14701         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14702         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14703         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14704         Adjust to call gdb_print_insn instead of
14705         gdb_disassembler::print_insn.
14706         (dump_insns, do_mixed_source_and_assembly_deprecated)
14707         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14708         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14709         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14710         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14711         declaration.
14712         (gdb_pretty_print_insn): Re-add declaration.
14713         * record-btrace.c (btrace_insn_history): Don't allocate a
14714         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14715
14716 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14717
14718         * disasm.h (gdb_disassembly): Remove file_string parameter.
14719         * disasm.c (gdb_disassembly): Likewise.
14720         * cli/cli-cmds.c (print_disassembly): Adapt.
14721         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14722         * stack.c (do_gdb_disassembly): Likewise.
14723
14724 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14725
14726         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14727         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14728         targets.  And if the implicit value is longer than needed, extract
14729         the first bytes instead of the "least significant" ones.
14730
14731 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14732
14733         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14734         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14735         (btrace_fetch): Assert can_access_registers_ptid.
14736         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14737         validate_registers_access.
14738
14739 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14740
14741         * gdbthread.h (can_access_registers_ptid): New.
14742         * thread.c (can_access_registers_ptid): New.
14743
14744 2017-02-01  Pedro Alves  <palves@redhat.com>
14745
14746         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14747
14748 2017-01-31  Pedro Alves  <palves@redhat.com>
14749
14750         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14751         Fix typos.
14752
14753 2017-01-31  Pedro Alves  <palves@redhat.com>
14754
14755         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14756         not used.
14757
14758 2017-01-31  Pedro Alves  <palves@redhat.com>
14759
14760         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14761
14762 2017-01-31  Pedro Alves  <palves@redhat.com>
14763
14764         * common/scoped_restore.h
14765         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14766         change the value's parameter type to T2.
14767         (make_scoped_restore): Likewise.
14768
14769 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14770             Richard Henderson  <rth@redhat.com>
14771
14772         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14773         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14774         GS_BASE for older kernels.
14775         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14776         GS_BASE for older kernels.
14777         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14778         and GS_BASE to the offset table.
14779         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14780         system register group.
14781         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14782         for older kernels.
14783         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14784         amd64 ABI.
14785         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14786         AMD64_GSBASE_REGNUM.
14787         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14788         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14789         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14790         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14791         i386/64bit-segments.xml in those rules.
14792         * features/i386/64bit-segments.xml: New file.
14793         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14794         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14795         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14796         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14797         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14798         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14799         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14800         * features/i386/amd64-avx-linux.c: Regenerated.
14801         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14802         * features/i386/amd64-avx-mpx.c: Regenerated.
14803         * features/i386/amd64-avx512-linux.c: Regenerated.
14804         * features/i386/amd64-linux.c: Regenerated.
14805         * features/i386/amd64-mpx-linux.c: Regenerated.
14806         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14807         * features/i386/i386-avx-mpx.c: Regenerated.
14808         * features/i386/x32-avx-linux.c: Regenerated.
14809         * features/i386/x32-avx512-linux.c: Regenerated.
14810         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14811         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14812         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14813         * regformats/i386/amd64-linux.dat: Regenerated.
14814         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14815         * regformats/i386/x32-avx-linux.dat: Regenerated.
14816         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14817         * regformats/i386/x32-linux.dat: Regenerated.
14818
14819 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14820
14821         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14822         Set to AMD64_NUM_REGS.
14823
14824 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14825
14826         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14827         that checks validity of a register number.
14828
14829 2017-01-27  Kees Cook  <keescook@google.com>
14830
14831         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14832         fetch_fpregs if target has fpa registers.
14833         (arm_linux_store_inferior_registers): Call store_fpregs if target
14834         has fpa registers.
14835
14836 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14837
14838         * cris-tdep.c (cris_gdbarch_init): Remove check for
14839         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14840
14841 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14842
14843         * corelow.c (get_core_register_section): Check for regset
14844         existence before checking for REGSET_VARIABLE_SIZE.
14845
14846 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14847             Pedro Alves  <palves@redhat.com>
14848
14849         PR gdb/20939
14850         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14851         call memory_error, save memaddr instead.
14852         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14853         negative, cal memory_error.
14854         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14855
14856 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14857
14858         * disasm-selftests.c (memory_error_test): New function.
14859         (_initialize_disasm_selftests): Register memory_error_test.
14860
14861 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14862
14863         * Makefile.in (SFILES): Add disasm-selftests.c and
14864         selftest-arch.c.
14865         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14866         * disasm-selftests.c: New file.
14867         * selftest-arch.c: New file.
14868         * selftest-arch.h: New file.
14869
14870 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14871
14872         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14873         to bfd_arch_mep.  Don't return 0 if section is not
14874         found.  Call print_insn_mep.
14875
14876 2017-01-26  Pedro Alves  <palves@redhat.com>
14877             Yao Qi  <yao.qi@linaro.org>
14878
14879         * arm-tdep.c: Include "disasm.h".
14880         (gdb_print_insn_arm): Update code to get gdbarch.
14881         * disasm.c (dis_asm_read_memory): Change it to
14882         gdb_disassembler::dis_asm_read_memory.
14883         (dis_asm_memory_error): Likewise.
14884         (dis_asm_print_address): Likewise.
14885         (gdb_pretty_print_insn): Change it to
14886         gdb_disassembler::pretty_print_insn.
14887         (dump_insns): Add one argument gdb_disassemlber.  All
14888         callers updated.
14889         (do_mixed_source_and_assembly_deprecated): Likewise.
14890         (do_mixed_source_and_assembly): Likewise.
14891         (do_assembly_only): Likewise.
14892         (gdb_disassembler::gdb_disassembler): New.
14893         (gdb_disassembler::print_insn): New.
14894         * disasm.h (class gdb_disassembler): New.
14895         (gdb_pretty_print_insn): Remove declaration.
14896         (gdb_disassemble_info): Likewise.
14897         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14898         (gdbscm_disasm_read_memory_worker): Update.
14899         (gdbscm_disasm_read_memory): Update.
14900         (gdbscm_disasm_memory_error): Remove.
14901         (gdbscm_disasm_print_address): Remove.
14902         (gdbscm_disassembler::gdbscm_disassembler): New.
14903         (gdbscm_print_insn_from_port): Update.
14904         * mips-tdep.c: Include disasm.h.
14905         (gdb_print_insn_mips): Update code to get gdbarch.
14906         * record-btrace.c (btrace_insn_history): Update.
14907         * spu-tdep.c: Include disasm.h.
14908         (struct spu_dis_asm_data): Remove.
14909         (struct spu_dis_asm_info): New.
14910         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14911         SPU id.
14912         (gdb_print_insn_spu): Cast disassemble_info to
14913         spu_dis_asm_info.
14914
14915 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14916
14917         * disasm.c (do_ui_file_delete): Delete.
14918         (gdb_insn_length): Move code creating stream to ...
14919         * utils.c (null_stream): ... here.  New function.
14920         * utils.h (null_stream): Declare.
14921
14922 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14923
14924         * python/py-inferior.c (find_thread_object): Return directly
14925         from the loop.  Remove "found" variable.
14926
14927 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14928
14929         GDB 7.12.1 released.
14930
14931 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14932
14933         * python/py-function.c (fnpy_call): Reorder declarations to have
14934         the gdbpy_enter object declared first.
14935         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14936
14937 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14938
14939         PR python/21068
14940         * python/python-internal.h (PyMem_RawMalloc): Define for
14941         Python < 3.4.
14942         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14943         PyMem_RawMalloc instead of PyMem_Malloc.
14944
14945 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14946             Luis Machado  <lgustavo@codesourcery.com>
14947
14948         * NEWS (New commands): Mention flash-erase.
14949         (New MI commands): Mention target-flash-erase.
14950         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14951         command.
14952         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14953         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14954         * target.c (flash_erase_command): New function.
14955         (initialize_targets): Add new flash-erase command.
14956         * target.h (flash_erase_command): New declaration.
14957
14958 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14959
14960         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14961         HAVE_SYS_PROCFS_H is defined.
14962
14963 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14964
14965         * remote.c (struct cached_reg): Change data into a pointer.
14966         * (stop_reply_dtr): Free data pointers before deleting vector.
14967         (process_stop_reply): Likewise.
14968         (remote_parse_stop_reply): Allocate space for data
14969
14970 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14971
14972         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14973         MAX_REGISTER_SIZE.
14974         (amd64_pseudo_register_read_value): Likewise.
14975         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14976         (store_register_using_P): Likewise.
14977         * regcache.c (regcache_xfer_part): Likewise.
14978
14979 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14980
14981         Split real and pseudo registers.
14982         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14983         (sparc32_pseudo_regnum): New enum.
14984         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14985         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14986         (SPARC32_CP0_REGISTERS): New macro.
14987         (sparc32_pseudo_register_name): New function.
14988         (sparc32_register_name): Use sparc32_pseudo_register_name.
14989         (sparc32_pseudo_register_type): New function.
14990         (sparc32_register_type): Use sparc32_pseudo_register_type.
14991         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14992         pseudo register numbers.
14993         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14994         (SPARC64_CP0_REGISTERS): New macro.
14995         (sparc64_pseudo_register_name): New function.
14996         (sparc64_register_name): Use sparc64_pseudo_register_name.
14997         (sparc64_pseudo_register_type): New function.
14998         (sparc64_register_type): Use sparc64_pseudo_register_type.
14999         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15000         pseudo register numbers.
15001         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15002         sparc64_store_arguments): Handle pseudo register numbers.
15003
15004 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15005
15006         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15007         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15008         output.
15009         (getpkt_or_notif_sane_1): Likewise.
15010
15011 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15012
15013         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15014         of CC.  Pass "-x c++-header" instead of "-x c".
15015
15016 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15017
15018         * remote.c (remote_can_async_p): Update comment.
15019
15020 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15021
15022         * linux-nat.c (linux_nat_can_async_p): Update comment.
15023
15024 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15025
15026         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15027
15028 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15029
15030         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15031
15032 2017-01-10  Tom Tromey  <tom@tromey.com>
15033
15034         * python/py-type.c (typy_legacy_template_argument): Update.
15035         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15036         ~demangle_parse_info): Declare new members.
15037         (cp_demangled_name_to_comp): Return unique_ptr.
15038         (cp_demangled_name_parse_free)
15039         (make_cleanup_cp_demangled_name_parse_free)
15040         (cp_new_demangle_parse_info): Remove.
15041         * cp-support.c (do_demangled_name_parse_free_cleanup)
15042         (make_cleanup_cp_demangled_name_parse_free): Remove.
15043         (inspect_type, cp_canonicalize_string_full)
15044         (cp_canonicalize_string): Update.
15045         (mangled_name_to_comp): Change return type.
15046         (cp_class_name_from_physname, method_name_from_physname)
15047         (cp_func_name, cp_remove_params): Update.
15048         * cp-name-parser.y (demangle_parse_info): New constructor, from
15049         cp_new_demangle_parse_info.
15050         (~demangle_parse_info): New destructor, from
15051         cp_demangled_name_parse_free.
15052         (cp_merge_demangle_parse_infos): Update.
15053         (cp_demangled_name_to_comp): Change return type.
15054
15055 2017-01-10  Tom Tromey  <tom@tromey.com>
15056
15057         * top.c (prevent_dont_repeat): Change return type.
15058         * python/python.c (execute_gdb_command): Use std::string.
15059         Update.
15060         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15061         * command.h (prevent_dont_repeat): Change return type.
15062         * breakpoint.c (bpstat_do_actions_1): Update.
15063
15064 2017-01-10  Tom Tromey  <tom@tromey.com>
15065
15066         * value.h (scoped_value_mark::~scoped_value_mark): Call
15067         free_to_mark.
15068         (scoped_value_mark::free_to_mark): New method.
15069         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15070         scoped_value_mark.
15071
15072 2017-01-10  Tom Tromey  <tom@tromey.com>
15073
15074         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15075         (valpy_reference_value, valpy_const_value, valpy_get_address)
15076         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15077         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15078         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15079         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15080         scoped_value_mark.
15081         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15082         * value.h (scoped_value_mark): New class.
15083
15084 2017-01-10  Tom Tromey  <tom@tromey.com>
15085
15086         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15087         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15088         * psymtab.c (discard_psymtabs_upto): Remove.
15089         (make_cleanup_discard_psymtabs): Remove.
15090         (struct psymtab_state): Remove.
15091
15092 2017-01-10  Tom Tromey  <tom@tromey.com>
15093
15094         * record-full.c (record_full_save_cleanups): Remove.
15095         (record_full_save): Use gdb::unlinker.
15096         * gcore.c (do_bfd_delete_cleanup): Remove.
15097         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15098         cleanups.
15099         * dwarf2read.c (unlink_if_set): Remove.
15100         (write_psymtabs_to_index): Use gdb::unlinker.
15101         * common/gdb_unlinker.h: New file.
15102
15103 2017-01-10  Tom Tromey  <tom@tromey.com>
15104
15105         * windows-tdep.c (windows_xfer_shared_library): Update.
15106         * windows-nat.c (windows_make_so): Update.
15107         * utils.h (make_cleanup_bfd_unref): Remove.
15108         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15109         * symfile.h (symfile_bfd_open)
15110         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15111         * symfile.c (read_symbols, symbol_file_add)
15112         (separate_debug_file_exists): Update.
15113         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15114         (generic_load, reread_symbols): Update.
15115         * symfile-mem.c (symbol_file_add_from_memory): Update.
15116         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15117         (spu_symbol_file_add_from_memory): Update.
15118         * solist.h (struct target_so_ops) <bfd_open>: Return
15119         gdb_bfd_ref_ptr.
15120         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15121         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15122         gdb_bfd_ref_ptr.
15123         (solib_map_sections, reload_shared_libraries_1): Update.
15124         * solib-svr4.c (enable_break): Update.
15125         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15126         * solib-frv.c (enable_break2): Update.
15127         * solib-dsbt.c (enable_break): Update.
15128         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15129         gdb_bfd_ref_ptr.
15130         (darwin_solib_get_all_image_info_addr_at_init): Update.
15131         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15132         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15133         * record-full.c (record_full_save): Update.
15134         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15135         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15136         * minidebug.c (find_separate_debug_file_in_section): Return
15137         gdb_bfd_ref_ptr.
15138         * machoread.c (macho_add_oso_symfile): Change abfd to
15139         gdb_bfd_ref_ptr.
15140         (macho_symfile_read_all_oso): Update.
15141         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15142         (macho_symfile_read): Update.
15143         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15144         (jit_bfd_try_read_symtab): Update.
15145         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15146         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15147         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15148         gdb_bfd_ref_ptr.
15149         (gdb_bfd_ref_policy): New struct.
15150         (gdb_bfd_ref_ptr): New typedef.
15151         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15152         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15153         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15154         gdb_bfd_ref_ptr.
15155         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15156         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15157         (gcore_command): Update.
15158         * exec.c (exec_file_attach): Update.
15159         * elfread.c (elf_symfile_read): Update.
15160         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15161         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15162         (open_and_init_dwo_file): Update.
15163         (open_dwp_file): Return gdb_bfd_ref_ptr.
15164         (open_and_init_dwp_file): Update.
15165         * corelow.c (core_open): Update.
15166         * compile/compile-object-load.c (compile_object_load): Update.
15167         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15168         * coffread.c (coff_symfile_read): Update.
15169         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15170         gdb_bfd_ref_ptr.  Rename.
15171         (dump_bfd_file, restore_command): Update.
15172         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15173         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15174         (find_separate_debug_file_by_buildid): Update.
15175
15176 2017-01-10  Tom Tromey  <tom@tromey.com>
15177
15178         * common/gdb_ref_ptr.h: New file.
15179         * python/py-ref.h (struct gdbpy_ref_policy): New.
15180         (gdbpy_ref): Now a typedef.
15181
15182 2017-01-10  Tom Tromey  <tom@tromey.com>
15183
15184         * utils.h (make_cleanup_htab_delete): Don't declare.
15185         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15186         Remove.
15187         * linespec.c (decode_compound_collector): Add constructor,
15188         destructor.
15189         (lookup_prefix_sym): Remove cleanup.
15190         (symtab_collector): Add constructor, destructor.
15191         (collect_symtabs_from_filename): Remove cleanup.
15192         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15193         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15194         Use htab_up.
15195         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15196         * dwarf2read.c (dw2_expand_symtabs_matching)
15197         (dw2_map_symbol_filenames, dwarf_decode_macros)
15198         (write_psymtabs_to_index): Use htab_up.
15199         * dwarf2loc.c (func_verify_no_selftailcall)
15200         (call_site_find_chain_1, func_verify_no_selftailcall)
15201         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15202         std::vector, gdb::unique_xmalloc_ptr.
15203         (call_sitep): Remove typedef.
15204         (dwarf2_locexpr_baton_eval): Remove unused variable.
15205
15206 2017-01-10  Tom Tromey  <tom@tromey.com>
15207
15208         * python/python-internal.h (make_cleanup_py_decref)
15209         (make_cleanup_py_xdecref): Don't declare.
15210         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15211         (py_xdecref, make_cleanup_py_xdecref): Remove.
15212
15213 2017-01-10  Tom Tromey  <tom@tromey.com>
15214
15215         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15216         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15217
15218 2017-01-10  Tom Tromey  <tom@tromey.com>
15219
15220         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15221
15222 2017-01-10  Tom Tromey  <tom@tromey.com>
15223
15224         * python/py-utils.c (unicode_to_encoded_string)
15225         (python_string_to_target_string)
15226         (python_string_to_target_python_string)
15227         (python_string_to_host_string, gdbpy_obj_to_string)
15228         (get_addr_from_python): Use gdbpy_ref.
15229
15230 2017-01-10  Tom Tromey  <tom@tromey.com>
15231
15232         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15233         gdbpy_ref.
15234
15235 2017-01-10  Tom Tromey  <tom@tromey.com>
15236
15237         * python/python.c (eval_python_command, gdbpy_decode_line)
15238         (gdbpy_run_events, gdbpy_start_type_printers)
15239         (gdbpy_apply_type_printers): Use gdbpy_ref.
15240
15241 2017-01-10  Tom Tromey  <tom@tromey.com>
15242
15243         * python/py-param.c (get_doc_string, compute_enum_values): Use
15244         gdbpy_ref.
15245
15246 2017-01-10  Tom Tromey  <tom@tromey.com>
15247
15248         * python/py-inferior.c (find_thread_object, build_inferior_list):
15249         Use gdbpy_ref.
15250
15251 2017-01-10  Tom Tromey  <tom@tromey.com>
15252
15253         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15254
15255 2017-01-10  Tom Tromey  <tom@tromey.com>
15256
15257         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15258         gdbpy_ref.
15259
15260 2017-01-10  Tom Tromey  <tom@tromey.com>
15261
15262         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15263         extra incref.
15264         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15265         Use gdbpy_ref.
15266
15267 2017-01-10  Tom Tromey  <tom@tromey.com>
15268
15269         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15270         gdbpy_ref.
15271
15272 2017-01-10  Tom Tromey  <tom@tromey.com>
15273
15274         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15275         decref results of PyArg_ParseTupleAndKeywords.
15276
15277 2017-01-10  Tom Tromey  <tom@tromey.com>
15278
15279         * python/python.c (python_run_simple_file): Use
15280         unique_xmalloc_ptr, gdbpy_ref.
15281
15282 2017-01-10  Tom Tromey  <tom@tromey.com>
15283
15284         * python/py-prettyprint.c (print_stack_unless_memory_error)
15285         (print_string_repr, print_children): Use gdbpy_ref.
15286         (dummy_python_frame): New class.
15287         (dummy_python_frame::dummy_python_frame): Rename from
15288         push_dummy_python_frame.
15289         (py_restore_tstate): Remove.
15290
15291 2017-01-10  Tom Tromey  <tom@tromey.com>
15292
15293         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15294
15295 2017-01-10  Tom Tromey  <tom@tromey.com>
15296
15297         * python/python.c (ensure_python_env, restore_python_env):
15298         Remove.
15299         * python/python-internal.h (ensure_python_env): Don't declare.
15300         * varobj.h (varobj_ensure_python_env): Don't declare.
15301         * varobj.c (varobj_ensure_python_env): Remove.
15302
15303 2017-01-10  Tom Tromey  <tom@tromey.com>
15304
15305         * varobj.c (varobj_value_get_print_value): Use
15306         gdbpy_enter_varobj.
15307
15308 2017-01-10  Tom Tromey  <tom@tromey.com>
15309
15310         * python/py-prettyprint.c (print_string_repr, print_children):
15311         Update.
15312         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15313         of "encoding".
15314         * varobj.c (varobj_value_get_print_value): Update.
15315         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * varobj.c (varobj_get_display_hint)
15320         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15321         (varobj_set_visualizer, free_variable): Use
15322         gdbpy_enter_varobj.
15323
15324 2017-01-10  Tom Tromey  <tom@tromey.com>
15325
15326         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15327         (do_finish_initialization): New function.  Use gdbpy_ref.
15328         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15329         do_finish_initialization.
15330
15331 2017-01-10  Tom Tromey  <tom@tromey.com>
15332
15333         * python/py-param.c (get_set_value, get_show_value): Use
15334         gdbpy_enter, gdbpy_ref.
15335
15336 2017-01-10  Tom Tromey  <tom@tromey.com>
15337
15338         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15339
15340 2017-01-10  Tom Tromey  <tom@tromey.com>
15341
15342         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15343
15344 2017-01-10  Tom Tromey  <tom@tromey.com>
15345
15346         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15347         Use gdbpy_enter_varobj.
15348
15349 2017-01-10  Tom Tromey  <tom@tromey.com>
15350
15351         * varobj.c (gdbpy_enter_varobj): New constructor.
15352         * python/python-internal.h (gdbpy_enter_varobj): New class.
15353         * python/py-varobj.c (py_varobj_get_iterator): Use
15354         gdbpy_enter_varobj.
15355
15356 2017-01-10  Tom Tromey  <tom@tromey.com>
15357
15358         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15359         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15360         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15361         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15362         unique_xmalloc_ptr.
15363         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * python/py-xmethods.c (invoke_match_method): Use
15368         gdbpy_ref.
15369
15370 2017-01-10  Tom Tromey  <tom@tromey.com>
15371
15372         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15373         gdbpy_enter, gdbpy_ref.
15374
15375 2017-01-10  Tom Tromey  <tom@tromey.com>
15376
15377         * python/python.c (python_interactive_command): Use gdbpy_enter.
15378
15379 2017-01-10  Tom Tromey  <tom@tromey.com>
15380
15381         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15382         gdbpy_ref.
15383
15384 2017-01-10  Tom Tromey  <tom@tromey.com>
15385
15386         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15387         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15388
15389 2017-01-10  Tom Tromey  <tom@tromey.com>
15390
15391         * utils.h (htab_deleter): New struct.
15392         (htab_up): New typedef.
15393         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15394         gdbpy_enter, gdbpy_ref, htab_up.
15395
15396 2017-01-10  Tom Tromey  <tom@tromey.com>
15397
15398         * python/py-unwind.c (pending_frame_invalidate): Remove.
15399         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15400
15401 2017-01-10  Tom Tromey  <tom@tromey.com>
15402
15403         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15404         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15405
15406 2017-01-10  Tom Tromey  <tom@tromey.com>
15407
15408         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15409
15410 2017-01-10  Tom Tromey  <tom@tromey.com>
15411
15412         * python/python.c (gdbpy_eval_from_control_command)
15413         (gdbpy_source_script, gdbpy_run_events)
15414         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15415         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15416         gdbpy_enter.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15421
15422 2017-01-10  Tom Tromey  <tom@tromey.com>
15423
15424         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15425
15426 2017-01-10  Tom Tromey  <tom@tromey.com>
15427
15428         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15429         (python_on_inferior_call_pre, python_on_inferior_call_post)
15430         (python_on_memory_change, python_on_register_change)
15431         (python_inferior_exit, python_new_objfile, add_thread_object)
15432         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15433
15434 2017-01-10  Tom Tromey  <tom@tromey.com>
15435
15436         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15437         (bpfinishpy_handle_exit): Use gdbpy_enter.
15438
15439 2017-01-10  Tom Tromey  <tom@tromey.com>
15440
15441         * python/py-cmd.c (cmdpy_destroyer)
15442         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15443         gdbpy_enter.
15444
15445 2017-01-10  Tom Tromey  <tom@tromey.com>
15446
15447         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15448         gdbpy_enter.
15449         (gdbpy_breakpoint_has_cond): Likewise.
15450
15451 2017-01-10  Tom Tromey  <tom@tromey.com>
15452
15453         * python/python.c (gdbpy_enter): New constructor.
15454         (~gdbpy_enter): New destructor.
15455         (restore_python_env, ensure_python_env): Rewrite.
15456         * python/python-internal.h (gdbpy_enter): New class.
15457
15458 2017-01-10  Tom Tromey  <tom@tromey.com>
15459
15460         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15461
15462 2017-01-10  Tom Tromey  <tom@tromey.com>
15463
15464         * python/py-value.c (value_has_field, get_field_flag)
15465         (get_field_type, valpy_getitem, convert_value_from_python): Use
15466         gdbpy_ref.
15467
15468 2017-01-10  Tom Tromey  <tom@tromey.com>
15469
15470         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15471         gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-prettyprint.c (search_pp_list)
15476         (find_pretty_printer_from_objfiles)
15477         (find_pretty_printer_from_progspace)
15478         (find_pretty_printer_from_gdb, find_pretty_printer)
15479         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15480         gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15485
15486 2017-01-10  Tom Tromey  <tom@tromey.com>
15487
15488         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15489         (ltpy_get_all_source_lines): Use gdbpy_ref.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/py-framefilter.c (extract_sym, extract_value)
15494         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15495         gdbpy_ref.
15496
15497 2017-01-10  Tom Tromey  <tom@tromey.com>
15498
15499         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15500
15501 2017-01-10  Tom Tromey  <tom@tromey.com>
15502
15503         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15504
15505 2017-01-10  Tom Tromey  <tom@tromey.com>
15506
15507         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15508         gdbpy_ref.
15509
15510 2017-01-10  Tom Tromey  <tom@tromey.com>
15511
15512         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15513
15514 2017-01-10  Tom Tromey  <tom@tromey.com>
15515
15516         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15517         (typy_range): Use gdbpy_ref.
15518
15519 2017-01-10  Tom Tromey  <tom@tromey.com>
15520
15521         * python/py-threadevent.c (create_thread_event_object): Use
15522         gdbpy_ref.
15523         * python/py-stopevent.c (create_stop_event_object): Simplify.
15524         (emit_stop_event): Use gdbpy_ref.
15525         * python/py-signalevent.c (create_signal_event_object): Use
15526         gdbpy_ref.
15527         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15528         (emit_new_objfile_event, create_clear_objfiles_event_object)
15529         (emit_clear_objfiles_event): Use gdbpy_ref.
15530         * python/py-infevents.c (create_inferior_call_event_object)
15531         (create_register_changed_event_object)
15532         (create_memory_changed_event_object, emit_inferior_call_event)
15533         (emit_memory_changed_event, emit_register_changed_event): Use
15534         gdbpy_ref.
15535         * python/py-exitedevent.c (create_exited_event_object)
15536         (emit_exited_event): Use gdbpy_ref.
15537         * python/py-event.h (evpy_emit_event): Remove
15538         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15539         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15540         * python/py-continueevent.c (emit_continue_event): Use
15541         gdbpy_ref.
15542         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15543         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15544         gdbpy_ref.
15545         * python/py-bpevent.c (create_breakpoint_event_object): Use
15546         gdbpy_ref.
15547
15548 2017-01-10  Tom Tromey  <tom@tromey.com>
15549
15550         * python/py-ref.h: New file.
15551
15552 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15553
15554         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15555         void.
15556         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15557         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15558         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15559         * ui-out.c (ui_out::redirect): Likewise.
15560         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15561         * cli/cli-logging.c (set_logging_redirect): Update call site of
15562         ui_out::redirect.
15563         (handle_redirections): Likewise.
15564         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15565         * top.c (execute_command_to_string): Likewise.
15566         * utils.c (do_ui_out_redirect_pop): Likewise.
15567
15568 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15569
15570         * stack.c (_initialize_stack): Update "frame" command help message.
15571
15572 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15573
15574         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15575
15576 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15577
15578         * x86-linux-nat.h: Include gdb_proc_service.h.
15579
15580 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15581
15582         * ser-base.h: Include serial.h.
15583
15584 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15585
15586         * ppc-linux-tdep.h: Include ppc-tdep.h.
15587
15588 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15589
15590         * nat/amd64-linux-siginfo.h: Include signal.h.
15591
15592 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15593
15594         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15595
15596 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15597
15598         * mi/mi-parse.h: Include mi-cmds.h.
15599
15600 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15601
15602         * inf-loop.c: Don't include "target.h".
15603         * inf-loop.h: Include it here.
15604
15605 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15606
15607         * dfp.h: Include "dboulest.h" and "expression.h".
15608
15609 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15610
15611         * ax-gdb.h: Include "ax.h".
15612
15613 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15614
15615         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15616         with nat/gdb_ptrace.h.
15617
15618 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15619
15620         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15621         new line.
15622         (mips64_fbsd_sigframe_init): Likewise.
15623
15624 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15625
15626         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15627         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15628
15629 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15630
15631         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15632         * NEWS: Mention new FreeBSD/mips native configuration.
15633         * config/mips/fbsd.mh: New file.
15634         * configure.host: Add mips*-*-freebsd*.
15635         * mips-fbsd-nat.c: New file.
15636
15637 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15638
15639         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15640         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15641         * NEWS: Mention new FreeBSD/mips target.
15642         * configure.tgt: Add mips*-*-freebsd*.
15643         * mips-fbsd-tdep.c: New file.
15644         * mips-fbsd-tdep.h: New file.
15645
15646 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15647
15648         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15649         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15650
15651 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15652
15653         Update copyright year range in all GDB files.
15654
15655 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15656
15657         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15658
15659 For older changes see ChangeLog-2016.
15660 \f
15661 Local Variables:
15662 mode: change-log
15663 left-margin: 8
15664 fill-column: 74
15665 version-control: never
15666 coding: utf-8
15667 End: