Make open_fds an std::vector
[external/binutils.git] / gdb / ChangeLog
1 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * common/filestuff.c: Include <algorithm>.
4         (open_fds): Change type to std::vector<int>.
5         (do_mark_open_fd): Adjust.
6         (unmark_fd_no_cloexec): Adjust.
7         (do_close): Adjust.
8
9 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
10
11         * breakpoint.c (output_thread_groups): Take an std::vector.
12         (print_one_breakpoint_location): Adjust.
13
14 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
15
16         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
17         (ada_evaluate_subexp_for_cast): New function.
18         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
19         ada_evaluate_subexp_for_cast.
20         (ada_evaluate_subexp) <nosideret>: Replace code by call to
21         eval_skip_value.
22         * eval.c (evaluate_var_value): Make non-static.
23         (evaluate_var_msym_value, eval_skip_value): Likewise.
24         * value.h (evaluate_var_value, evaluate_var_msym_value)
25         (eval_skip_value): Declare.
26
27 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
28
29         * ada-lang.c (ada_value_cast): Remove parameter "noside".
30         Update all callers.
31
32 2017-11-16  Pedro Alves  <palves@redhat.com>
33
34         * python/py-unwind.c (pyuw_sniffer): Translate
35         PyExc_KeyboardInterrupt to a GDB Quit exception.
36
37 2017-11-16  Pedro Alves  <palves@redhat.com>
38
39         * infrun.c (resume_cleanups): Delete.
40         (resume): No longer install a resume_cleanups cleanup nor call
41         QUIT.
42         (proceed): Pass the terminal to the inferior.
43         (keep_going_pass_signal): No longer install a resume_cleanups
44         cleanup.
45
46 2017-11-16  Pedro Alves  <palves@redhat.com>
47
48         * inf-loop.c (inferior_event_handler): Don't swallow the exception
49         if the prompt is blocked.
50
51 2017-11-16  Pedro Alves  <palves@redhat.com>
52
53         * breakpoint.c (insert_bp_location): Replace bp_err and
54         bp_err_message locals by a gdb_exception local.
55
56 2017-11-16  Pedro Alves  <palves@redhat.com>
57
58         * inflow.c (scoped_ignore_sigttou): New class.
59         (child_terminal_ours_1, new_tty): Use it.
60
61 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
62
63         * target-float.c (decimal_from_number): Add byte_order argument and
64         call match_endianness.  Error if unknown floating-point type.
65         (decimal_to_number): Add byte_order argument and call match_endianness.
66         (decimal_from_longest): Update call.  Do not call match_endianness.
67         (decimal_from_ulongest): Likewise.
68         (decimal_binop): Likewise.
69         (decimal_is_zero): Likewise.
70         (decimal_compare): Likewise.
71         (decimal_convert): Likewise.
72
73 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
74
75         * python/python.c (gdbpy_rbreak): New function.
76         * NEWS: Document Python rbreak feature.
77
78 2017-11-16  Yao Qi  <yao.qi@linaro.org>
79
80         * features/tic6x-c62x.xml: Remove.
81         * features/tic6x-c64x.xml: Remove.
82         * features/tic6x-c64xp.xml: Remove.
83
84 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
85
86         * symtab.h: Include <array>.
87
88 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
89
90         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
91         (bsd_kvm_proc_cmd): Likewise.
92
93 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
94
95         * tui/tui-win.c (window_name_completer): Replace VEC with
96         std::vector.
97
98 2017-11-15  Andrew Cagney  <cagney@gnu.org>
99
100         * MAINTAINERS: Remove no-longer applicable entries.
101
102 2017-11-15  Andrew Cagney  <cagney@gnu.org>
103
104         * MAINTAINERS: Move self to Past Maintainers.
105
106 2017-11-15  Yao Qi  <yao.qi@linaro.org>
107
108         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
109         * features/nios2-linux.c: Remove.
110         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
111         initialize_tdesc_nios2_linux.
112
113 2017-11-15  Yao Qi  <yao.qi@linaro.org>
114
115         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
116         M68HC11_LAST_HARD_REG + 1.
117
118 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
119
120         PR gdb/22388
121         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
122         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
123         Return TARGET_XFER_EOF if size of returned data is 0.
124
125 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
126
127         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
128         memory-map-selftests.c.
129         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
130         * memory-map.c (memory_map_start_memory): Fix computation of hi
131         address.
132         * unittests/memory-map-selftests.c: New file.
133
134 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
135
136         * ada-lang.c: Fix some typos in the general command documenting
137         how Ada expressions are being evaluated and how their result
138         is printed.
139
140 2017-11-09  Tom Tromey  <tom@tromey.com>
141
142         * psymtab.c (psymbol_hash): Do not hash string contents.
143         (psymbol_compare): Add comment.
144
145 2017-11-09  Tom Tromey  <tom@tromey.com>
146
147         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
148
149 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
150
151         * ada-exp.y (write_var_from_sym): Remove parameter
152         "orig_left_context".  Update all callers.
153
154 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
155
156         * tracepoint.h (class collection_list) <stringify>: Return
157         std::vector<std::string>.
158         (encode_actions_rsp): Change parameters to
159         std::vector<std::string> *.
160         * tracepoint.c (collection_list::stringify): Return
161         std::vector<std::string> and adjust accordingly.
162         (encode_actions_rsp): Changee parameters to
163         std::vector<std::string> and adjust accordingly.
164         * remote.c (free_actions_list),
165         free_actions_list_cleanup_wrapper): Remove.
166         (remote_download_tracepoint): Adjust to std::vector.
167
168 2017-11-08  Tom Tromey  <tom@tromey.com>
169
170         * dwarf2read.c (symbolp): Remove typedef.
171         (read_func_scope): Use std::vector.
172         (process_structure_scope): Use std::vector.
173
174 2017-11-08  Pedro Alves  <palves@redhat.com>
175
176         * ada-lang.c (ada_make_symbol_completion_list): Use
177         completion_skip_symbol.
178         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
179         (symbol_is_function_or_method(symbol*)): New.
180         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
181         completion_skip_symbol.
182         (default_collect_symbol_completion_matches_break_on): Use
183         completion_skip_symbol.  Pass down mode.
184         (collect_file_symbol_completion_matches): Pass down mode.
185         * symtab.h (symbol_is_function_or_method): New declarations.
186         (completion_skip_symbol): New template function.
187
188 2017-11-08  Pedro Alves  <palves@redhat.com>
189
190         * linespec.c (iterate_over_all_matching_symtabs): Add
191         search_domain parameter.  Pass it down to expand_symtabs_matching.
192         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
193         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
194         search_domain.
195         (add_all_symbol_names_from_pspace): Add search_domain parameter.
196         Pass it down.
197         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
198         symbols.
199         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
200         it down.
201
202 2017-11-08  Pedro Alves  <palves@redhat.com>
203
204         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
205         text_len locals and don't pass them down.
206         * symtab.c (completion_list_add_name): Remove
207         sym_text/sym_text_len parameters and adjust.
208         (completion_list_add_symbol, completion_list_add_msymbol)
209         (completion_list_objc_symbol, completion_list_add_fields)
210         (add_symtab_completions): Likewise.
211         (default_collect_symbol_completion_matches_break_on)
212         (collect_file_symbol_completion_matches): Remove sym_text_len
213         local and don't pass it down.
214         * symtab.h (completion_list_add_name): Remove
215         sym_text/sym_text_len parameters.
216
217 2017-11-08  Pedro Alves  <palves@redhat.com>
218
219         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
220         unittests/lookup_name_info-selftests.c.
221         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
222         * cp-support.c: Include "selftest.h".
223         (cp_remove_params_1): Rename from cp_remove_params.  Add
224         'require_param' parameter, and handle it.
225         (cp_remove_params): Reimplement.
226         (cp_remove_params_if_any): New.
227         (selftests::quote): New.
228         (selftests::check_remove_params): New.
229         (selftests::test_cp_remove_params): New.
230         (_initialize_cp_support): Install
231         selftests::test_cp_remove_params.
232         * cp-support.h (cp_remove_params_if_any): Declare.
233         * dwarf2read.c :Include "selftest.h".
234         (dw2_expand_symtabs_matching_symbol): Use
235         lookup_name_info::make_ignore_params.
236         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
237         (selftests::dw2_expand_symtabs_matching::string_or_null)
238         (selftests::dw2_expand_symtabs_matching::check_match)
239         (selftests::dw2_expand_symtabs_matching::test_symbols)
240         (selftests::dw2_expand_symtabs_matching::run_test): New.
241         (_initialize_dwarf2_read): Register
242         selftests::dw2_expand_symtabs_matching::run_test.
243         * psymtab.c (psym_expand_symtabs_matching): Use
244         lookup_name_info::make_ignore_params.
245         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
246         If the lookup name wants to ignore parameters, strip them.
247         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
248         code handling '('.
249         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
250         (default_collect_symbol_completion_matches_break_on): Don't try to
251         strip parameters.
252         * symtab.h (lookup_name_info::lookup_name_info): Add
253         'ignore_parameters' parameter.
254         (lookup_name_info::ignore_parameters)
255         (lookup_name_info::make_ignore_params): New methods.
256         (lookup_name_info::m_ignore_parameters): New field.
257         * unittests/lookup_name_info-selftests.c: New file.
258
259 2017-11-08  Pedro Alves  <palves@redhat.com>
260
261         * dwarf2read.c (dw2_expand_marked_cus)
262         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
263         (dw2_expand_symtabs_matching): Move further below.
264         (dw2_expand_marked_cus): Reindent.
265
266 2017-11-08  Pedro Alves  <palves@redhat.com>
267
268         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
269         (struct name_component): New.
270         (mapped_index::name_components): New field.
271         (mapped_index::symbol_name_at): New method.
272         (dwarf2_read_index): Call mapped_index ctor.
273         (dw2_map_matching_symbols): Add comment about name_components
274         table.
275         (dw2_expand_symtabs_matching): Factor part to...
276         (dw2_expand_symtabs_matching_symbol): ... this new function.
277         Build name components table, and lookup symbols in it before
278         calling the name matcher.
279         (dw2_expand_marked_cus): New, factored out from
280         dw2_expand_symtabs_matching.
281         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
282
283 2017-11-08   Pedro Alves  <palves@redhat.com>
284
285         * ada-lang.c (ada_encode): Rename to ..
286         (ada_encode_1): ... this.  Add throw_errors parameter and handle
287         it.
288         (ada_encode): Reimplement.
289         (match_name): Delete, folded into full_name.
290         (resolve_subexp): No longer pass the encoded name to
291         ada_lookup_symbol_list.
292         (should_use_wild_match): Delete.
293         (name_match_type_from_name): New.
294         (ada_lookup_simple_minsym): Use lookup_name_info and the
295         language's symbol_name_matcher_ftype.
296         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
297         (ada_add_block_renamings): Adjust to use lookup_name_info.
298         (ada_lookup_name): New.
299         (add_nonlocal_symbols, ada_add_all_symbols)
300         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
301         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
302         (ada_name_for_lookup): Delete.
303         (ada_lookup_encoded_symbol): Construct a verbatim name.
304         (wild_match): Reverse sense of return type.  Use bool.
305         (full_match): Reverse sense of return type.  Inline bits of old
306         match_name here.
307         (ada_add_block_symbols): Adjust to use lookup_name_info.
308         (symbol_completion_match): Delete, folded into...
309         (ada_lookup_name_info::matches): ... .this new method.
310         (symbol_completion_add): Delete.
311         (ada_collect_symbol_completion_matches): Add name_match_type
312         parameter.  Adjust to use lookup_name_info and
313         completion_list_add_name.
314         (get_var_value, ada_add_global_exceptions): Adjust to use
315         lookup_name_info.
316         (ada_get_symbol_name_cmp): Delete.
317         (do_wild_match, do_full_match): New functions.
318         (ada_lookup_name_info::ada_lookup_name_info): New method.
319         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
320         functions.
321         (ada_language_defn): Install ada_get_symbol_name_matcher.
322         * ada-lex.l (processId): If name starts with '<', copy it
323         verbatim.
324         * block.c (block_iter_match_step, block_iter_match_first)
325         (block_iter_match_next, block_lookup_symbol)
326         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
327         lookup_name_info.
328         * block.h (block_iter_match_first, block_iter_match_next)
329         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
330         * c-lang.c (c_language_defn, cplus_language_defn)
331         (asm_language_defn, minimal_language_defn): Adjust comments to
332         refer to la_get_symbol_name_matcher.
333         * completer.c (complete_files_symbols)
334         (collect_explicit_location_matches, symbol_completer): Pass a
335         symbol_name_match_type down.
336         * completer.h (class completion_match, completion_match_result):
337         New classes.
338         (completion_tracker::reset_completion_match_result): New method.
339         (completion_tracker::m_completion_match_result): New field.
340         * cp-support.c (make_symbol_overload_list_block): Adjust to use
341         lookup_name_info.
342         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
343         functions.
344         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
345         * d-lang.c: Adjust comments to refer to
346         la_get_symbol_name_matcher.
347         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
348         Adjust to use lookup_name_info.
349         (dict_iter_match_first, dict_iter_match_next)
350         (iter_match_first_hashed, iter_match_next_hashed)
351         (iter_match_first_linear, iter_match_next_linear): Adjust to work
352         with a lookup_name_info.
353         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
354         Likewise.
355         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
356         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
357         (gdb_index_symbol_name_matcher): New class.
358         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
359         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
360         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
361         with a symbol_name_match_type.
362         (f_language_defn): Adjust comments to refer to
363         la_get_symbol_name_matcher.
364         * go-lang.c (go_language_defn): Adjust comments to refer to
365         la_get_symbol_name_matcher.
366         * language.c (default_symbol_name_matcher)
367         (language_get_symbol_name_matcher): New functions.
368         (unknown_language_defn, auto_language_defn): Adjust comments to
369         refer to la_get_symbol_name_matcher.
370         * language.h (symbol_name_cmp_ftype): Delete.
371         (language_defn) <la_collect_symbol_completion_matches>: Add match
372         type parameter.
373         <la_get_symbol_name_cmp>: Delete field.
374         <la_get_symbol_name_matcher>: New field.
375         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
376         (default_symbol_name_matcher, language_get_symbol_name_matcher):
377         Declare.
378         * linespec.c (iterate_over_all_matching_symtabs)
379         (iterate_over_file_blocks): Adjust to use lookup_name_info.
380         (find_methods): Add language parameter, and use lookup_name_info
381         and the language's symbol_name_matcher_ftype.
382         (linespec_complete_function): Adjust.
383         (lookup_prefix_sym): Use lookup_name_info.
384         (add_all_symbol_names_from_pspace): Adjust.
385         (find_superclass_methods): Add language parameter and pass it
386         down.
387         (find_method): Pass symbol language down.
388         (find_linespec_symbols): Don't demangle or Ada encode here.
389         (search_minsyms_for_name): Add lookup_name_info parameter.
390         (add_matching_symbols_to_info): Add name_match_type parameter.
391         Use lookup_name_info.
392         * m2-lang.c (m2_language_defn): Adjust comments to refer to
393         la_get_symbol_name_matcher.
394         * minsyms.c: Include <algorithm>.
395         (add_minsym_to_demangled_hash_table): Remove table parameter and
396         add objfile parameter.  Use search_name_hash, and add language to
397         demangled languages vector.
398         (struct found_minimal_symbols): New struct.
399         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
400         New functions.
401         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
402         input names here.  Use lookup_name_info instead.  Lookup up
403         demangled names once for each language in the demangled names
404         vector.
405         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
406         demangled names once for each language in the demangled names
407         vector.
408         (build_minimal_symbol_hash_tables): Adjust.
409         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
410         lookup_name_info.
411         * objc-lang.c (objc_language_defn): Adjust comment to refer to
412         la_get_symbol_name_matcher.
413         * objfiles.h: Include <vector>.
414         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
415         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
416         la_get_symbol_name_matcher.
417         * p-lang.c (pascal_language_defn): Adjust comment to refer to
418         la_get_symbol_name_matcher.
419         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
420         (match_partial_symbol): Use symbol_name_match_type,
421         lookup_name_info and psymbol_name_matches.
422         (lookup_partial_symbol): Use lookup_name_info.
423         (map_block): Use symbol_name_match_type and lookup_name_info.
424         (psym_map_matching_symbols): Use symbol_name_match_type.
425         (psymbol_name_matches): New.
426         (recursively_search_psymtabs): Use lookup_name_info and
427         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
428         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
429         'kind' parameter to 'domain'.
430         * rust-lang.c (rust_language_defn): Adjust comment to refer to
431         la_get_symbol_name_matcher.
432         * symfile-debug.c (debug_qf_map_matching_symbols)
433         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
434         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
435         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
436         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
437         Adjust to use symbol_name_match_type.
438         <expand_symtabs_matching>: Adjust to use lookup_name_info.
439         (expand_symtabs_matching): Adjust to use lookup_name_info.
440         * symmisc.c (maintenance_expand_symtabs): Use
441         lookup_name_info::match_any ().
442         * symtab.c (symbol_matches_search_name): New.
443         (eq_symbol_entry): Adjust to use lookup_name_info and the
444         language's matcher.
445         (demangle_for_lookup_info::demangle_for_lookup_info): New.
446         (lookup_name_info::match_any): New.
447         (iterate_over_symbols, search_symbols): Use lookup_name_info.
448         (compare_symbol_name): Add language, lookup_name_info and
449         completion_match_result parameters, and use them.
450         (completion_list_add_name): Make extern.  Add language and
451         lookup_name_info parameters.  Use them.
452         (completion_list_add_symbol, completion_list_add_msymbol)
453         (completion_list_objc_symbol): Add lookup_name_info parameters and
454         adjust.  Pass down language.
455         (completion_list_add_fields): Add lookup_name_info parameters and
456         adjust.  Pass down language.
457         (add_symtab_completions): Add lookup_name_info parameters and
458         adjust.
459         (default_collect_symbol_completion_matches_break_on): Add
460         name_match_type parameter, and use it.  Use lookup_name_info.
461         (default_collect_symbol_completion_matches)
462         (collect_symbol_completion_matches): Add name_match_type
463         parameter, and pass it down.
464         (collect_symbol_completion_matches_type): Adjust.
465         (collect_file_symbol_completion_matches): Add name_match_type
466         parameter, and use lookup_name_info.
467         * symtab.h: Include <string> and "common/gdb_optional.h".
468         (enum class symbol_name_match_type): New.
469         (class ada_lookup_name_info): New.
470         (struct demangle_for_lookup_info): New.
471         (class lookup_name_info): New.
472         (symbol_name_matcher_ftype): New.
473         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
474         (symbol_matches_search_name): Declare.
475         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
476         (default_collect_symbol_completion_matches)
477         (collect_symbol_completion_matches)
478         (collect_file_symbol_completion_matches): Add name_match_type
479         parameter.
480         (iterate_over_symbols): Use lookup_name_info.
481         (completion_list_add_name): Declare.
482         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
483         (strncmp_iw_with_mode): Now extern.
484         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
485         (strncmp_iw_with_mode): Declare.
486
487 2017-11-08  Keith Seitz  <keiths@redhat.com>
488             Pedro Alves  <palves@redhat.com>
489
490         * ada-lang.c (ada_language_defn): Install
491         default_search_name_hash.
492         * buildsym.c (struct buildsym_compunit): <language>: New field.
493         (finish_block_internal): Pass language when creating dictionaries.
494         (start_buildsym_compunit, start_symtab): New language parameters.
495         Use them.
496         (restart_symtab): Pass down compilation unit's language.
497         * buildsym.h (enum language): Forward declare.
498         (start_symtab): New 'language' parameter.
499         * c-lang.c (c_language_defn, cplus_language_defn)
500         (asm_language_defn, minimal_language_defn): Install
501         default_search_name_hash.
502         * coffread.c (coff_start_symtab): Adjust.
503         * d-lang.c (d_language_defn): Install default_search_name_hash.
504         * dbxread.c (struct symloc): Add 'pst_language' field.
505         (PST_LANGUAGE): Define.
506         (start_psymtab, read_ofile_symtab): Use it.
507         (process_one_symbol): New 'language' parameter.  Pass it down.
508         * dictionary.c (struct dictionary) <language>: New field.
509         (DICT_LANGUAGE): Define.
510         (dict_create_hashed, dict_create_hashed_expandable)
511         (dict_create_linear, dict_create_linear_expandable): New parameter
512         'language'.  Set the dictionary's language.
513         (iter_match_first_hashed): Adjust to rename.
514         (insert_symbol_hashed): Assert we don't see mismatching
515         languages.  Adjust to rename.
516         (dict_hash): Rename to ...
517         (default_search_name_hash): ... this and make extern.
518         * dictionary.h (struct language_defn): Forward declare.
519         (dict_create_hashed): New parameter 'language'.
520         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
521         * f-lang.c (f_language_defn): Install default_search_name_hash.
522         * go-lang.c (go_language_defn): Install default_search_name_hash.
523         * jit.c (finalize_symtab): Pass compunit's language to dictionary
524         creation.
525         * language.c (unknown_language_defn, auto_language_defn):
526         * language.h (language_defn::la_search_name_hash): New field.
527         (default_search_name_hash): Declare.
528         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
529         * mdebugread.c (new_block): New parameter 'language'.
530         * mdebugread.c (parse_symbol): Pass symbol language to block
531         allocation.
532         (psymtab_to_symtab_1): Pass down language.
533         (new_symtab): Pass compunit's language to block allocation.
534         * objc-lang.c (objc_language_defn): Install
535         default_search_name_hash.
536         * opencl-lang.c (opencl_language_defn):
537         * p-lang.c (pascal_language_defn): Install
538         default_search_name_hash.
539         * rust-lang.c (rust_language_defn): Install
540         default_search_name_hash.
541         * stabsread.h (enum language): Forward declare.
542         (process_one_symbol): Add 'language' parameter.
543         * symtab.c (search_name_hash): New function.
544         * symtab.h (search_name_hash): Declare.
545         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
546
547 2017-11-08  Pedro Alves  <palves@redhat.com>
548
549         * cp-name-parser.y (main): Don't initialize extra_chars.
550
551 2017-11-07  Tom Tromey  <tom@tromey.com>
552
553         * event-top.h (command_handler): Constify.
554         * record-full.c (cmd_record_full_start): Update.
555         * thread.c (thread_apply_all_command): Update.
556         * printcmd.c (eval_command): Update.
557         * mi/mi-main.c (mi_execute_cli_command): Update.
558         (mi_execute_async_cli_command): Update.
559         * tui/tui-stack.c (tui_update_command): Update.
560         * cli/cli-interp.c (safe_execute_command): Constify.
561         * record.c (record_start): Update.
562         (record_start, record_stop, cmd_record_start): Update.
563         * record-btrace.c (cmd_record_btrace_bts_start): Update.
564         (cmd_record_btrace_pt_start): Update.
565         (cmd_record_btrace_start): Update.
566         (cmd_record_btrace_start): Update.
567         * reverse.c (exec_reverse_once): Update.
568         * python/python.c (execute_gdb_command): Don't copy the command.
569         * event-top.c (command_line_handler): Update.
570         (command_handler): Constify.
571         * defs.h (deprecated_call_command_hook): Constify.
572         * cli/cli-script.h (execute_user_command): Constify.
573         * cli/cli-script.c (execute_user_command): Constify.
574         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
575         (enum command_control_type): Update.
576         * main.c (catch_command_errors): Remove non-const overload.
577         (catch_command_errors_ftype): Remove.
578         * python/py-cmd.c (cmdpy_function): Constify.
579         * guile/scm-cmd.c (cmdscm_function): Constify.
580         * cli/cli-dump.c (call_dump_func): Constify.
581         * cli/cli-decode.c (do_const_cfunc): Constify.
582         (do_sfunc): Constify.
583         (cmd_func): Constify.
584         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
585         * top.h (execute_command): Constify.
586         * top.c (execute_command): Constify.
587         (execute_command_to_string): Constify.
588         (deprecated_call_command_hook): Constify.
589         * command.h (cmd_func): Constify.
590         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
591
592 2017-11-07  Tom Tromey  <tom@tromey.com>
593
594         * ada-lang.c (catch_ada_exception_command): Constify.
595         (catch_assert_command): Constify.
596         * break-catch-throw.c (catch_catch_command, catch_throw_command)
597         (catch_rethrow_command): Constify.
598         (catch_exception_command_1): Constify.
599         * breakpoint.h (add_catch_command): Constify.
600         * break-catch-syscall.c (catch_syscall_command_1): Constify.
601         (catch_syscall_split_args): Constify.
602         * break-catch-sig.c (catch_signal_command): Constify.
603         (catch_signal_split_args): Constify.
604         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
605         cmd_const_sfunc_ftype.
606         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
607         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
608         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
609         (add_setshow_string_cmd, struct cmd_list_element)
610         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
611         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
612         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
613         Constify.
614         (set_cmd_sfunc): Constify.
615         (empty_sfunc): Constify.
616         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
617         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
618         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
619         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
620         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
621         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
622         Constify.
623         (set_cmd_sfunc): Constify.
624         (cmd_sfunc_ftype): Remove.
625         * compile/compile.c (set_compile_args): Constify.
626         * infrun.c (set_disable_randomization): Constify.
627         * infcmd.c (set_args_command, set_cwd_command): Constify.
628         * breakpoint.c (set_condition_evaluation_mode): Constify.
629         (add_catch_command): Constify.
630         (catch_fork_command_1, catch_exec_command_1)
631         (catch_load_command_1, catch_unload_command_1): Constify.
632         (catch_load_or_unload): Constify.
633         * guile/scm-param.c (pascm_set_func): Constify.
634         (add_setshow_generic): Constify.
635         * python/py-param.c (get_set_value): Constify.
636         * top.h (set_verbose): Constify.
637         * tui/tui-win.c (tui_set_var_cmd): Constify.
638         * mi/mi-main.c (set_mi_async_command): Constify.
639         * cli/cli-logging.c (set_logging_overwrite)
640         (set_logging_redirect): Constify.
641         * value.c (set_max_value_size): Constify.
642         * valprint.c (set_input_radix, set_output_radix): Constify.
643         * utils.c (set_width_command, set_height_command): Constify.
644         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
645         * tracepoint.c (set_disconnected_tracing)
646         (set_circular_trace_buffer, set_trace_buffer_size)
647         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
648         * top.c (set_history_size_command, set_verbose, set_editing)
649         (set_gdb_datadir, set_history_filename): Constify.
650         * target.c (set_targetdebug, maint_set_target_async_command)
651         (maint_set_target_non_stop_command, set_target_permissions)
652         (set_write_memory_permission): Constify.
653         (open_target): Constify.
654         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
655         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
656         * symtab.c (set_symbol_cache_size_handler): Constify.
657         * symfile.c (set_ext_lang_command): Constify.
658         * symfile-debug.c (set_debug_symfile): Constify.
659         * source.c (set_directories_command): Constify.
660         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
661         * serial.c (set_parity): Constify.
662         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
663         * remote.c (set_remote_exec_file, set_remotebreak)
664         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
665         * record.c (set_record_insn_history_size)
666         (set_record_call_history_size): Constify.
667         * record-full.c (set_record_full_insn_max_num): Constify.
668         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
669         * osabi.c (set_osabi): Constify.
670         * mips-tdep.c (set_mips64_transfers_32bit_regs)
671         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
672         * maint.c (maintenance_set_profile_cmd): Constify.
673         * linux-thread-db.c (set_libthread_db_search_path): Constify.
674         * language.c (set_language_command, set_range_command)
675         (set_case_command): Constify.
676         * infrun.c (set_non_stop, set_observer_mode)
677         (set_stop_on_solib_events, set_schedlock_func)
678         (set_exec_direction_func): Constify.
679         * infcmd.c (set_inferior_tty_command): Constify.
680         * disasm.c (set_disassembler_options_sfunc): Constify.
681         * demangle.c (set_demangling_command): Constify.
682         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
683         * cris-tdep.c (set_cris_version, set_cris_mode)
684         (set_cris_dwarf2_cfi): Constify.
685         * corefile.c (set_gnutarget_command): Constify.
686         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
687         (set_target_wide_charset_sfunc): Constify.
688         * breakpoint.c (update_dprintf_commands): Constify.
689         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
690         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
691         (set_disassembly_style_sfunc): Constify.
692         * arch-utils.c (set_endian, set_architecture): Constify.
693         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
694         * agent.c (set_can_use_agent): Constify.
695
696 2017-11-07  Tom Tromey  <tom@tromey.com>
697
698         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
699         (go32_pde, go32_pte, go32_pte_for_address): Constify.
700         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
701         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
702         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
703         (parse_int_arg, show_thread_default_detach_sc_cmd)
704         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
705         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
706         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
707         (show_task_pause_cmd, set_task_detach_sc_cmd)
708         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
709         (set_noninvasive_cmd, set_thread_pause_cmd)
710         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
711         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
712         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
713         * windows-nat.c (display_selectors): Constify.
714         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
715         non-const "cfunc".
716         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
717         (cmd_cfunc_eq): Likewise.
718         (struct cmd_list_element): Likewise.
719         (do_cfunc): Remove.
720         (cli_user_command_p): Update.
721         * command.h (add_cmd): Remove non-const overload.
722         (cmd_cfunc_ftype): Remove typedef.
723         (cmd_cfunc_eq): Remove non-const overload.
724         * value.c (show_values): Constify.
725         * thread.c (thread_apply_all_command): Constify.
726         * symfile.c (load_command): Constify.
727         * source.c (directory_command): Constify.
728         * maint.c (maintenance_internal_error)
729         (maintenance_demangler_warning, maintenance_space_display)
730         (maintenance_print_architecture, maintenance_translate_address)
731         (maintenance_info_selftests, maintenance_internal_warning):
732         Constify.
733         * breakpoint.c (disable_trace_command, enable_trace_command):
734         Constify.
735         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
736         Constify.
737         (add_auto_load_safe_path): Constify.
738         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
739         * top.h (show_commands): Constify.
740         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
741         * sparc64-tdep.c (adi_examine_command): Constify.
742         (adi_assign_command): Constify.
743
744 2017-11-07  Tom Tromey  <tom@tromey.com>
745
746         * frame.h (info_locals_command, info_args_command): Constify.
747         * auto-load.h (auto_load_info_scripts): Constify.
748         * inferior.h (registers_info): Constify.
749         * copying.c: Rebuild.
750         * copying.awk: Constify generated commands.
751         * auto-load.c (auto_load_info_scripts)
752         (info_auto_load_gdb_scripts): Constify.
753         * cli/cli-decode.c (struct cmd_list_element): Take a
754         cmd_const_cfunc_ftype.
755         * command.h (add_info): Take a cmd_const_cfunc_ftype.
756         * tui/tui-win.c (tui_all_windows_info): Constify.
757         * python/py-auto-load.c (info_auto_load_python_scripts):
758         Constify.
759         * cli/cli-cmds.c (show_command): Remove non-const overload.
760         * tracepoint.c (info_tvariables_command, info_scope_command):
761         Constify.
762         (info_static_tracepoint_markers_command): Constify.
763         * thread.c (info_threads_command): Constify.
764         (print_thread_info_1): Constify.
765         * target.c (info_target_command): Constify.
766         * symtab.c (info_sources_command, info_functions_command)
767         (info_types_command): Constify.
768         (info_variables_command): Remove non-const overload.
769         * symfile.c (info_ext_lang_command): Constify.
770         * stack.c (info_frame_command, info_locals_command)
771         (info_args_command): Constify.
772         (backtrace_command): Remove non-const overload.
773         * source.c (info_source_command, info_line_command): Constify.
774         * solib.c (info_sharedlibrary_command): Constify.
775         * skip.c (info_skip_command): Constify.
776         * ser-go32.c (info_serial_command): Constify.
777         * reverse.c (info_bookmarks_command): Constify.
778         * printcmd.c (info_symbol_command, info_address_command)
779         (info_display_command): Constify.
780         * osdata.c (info_osdata_command): Constify.
781         * objc-lang.c (info_selectors_command, info_classes_command):
782         Constify.
783         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
784         * memattr.c (info_mem_command): Constify.
785         * macrocmd.c (info_macro_command, info_macros_command): Constify.
786         * linux-fork.c (info_checkpoints_command): Constify.
787         * infrun.c (info_signals_command): Constify.
788         * inflow.c (info_terminal_command): Constify.
789         * inferior.c (info_inferiors_command): Constify.
790         (print_inferior): Constify.
791         * infcmd.c (info_program_command, info_all_registers_command)
792         (info_registers_command, info_vector_command)
793         (info_float_command): Constify.
794         (registers_info): Constify.
795         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
796         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
797         Constify.
798         * f-valprint.c (info_common_command): Constify.
799         * dcache.c (info_dcache_command): Constify.
800         (dcache_info_1): Constify.
801         * darwin-nat-info.c (info_mach_tasks_command)
802         (info_mach_task_command, info_mach_ports_command)
803         (info_mach_port_command, info_mach_threads_command)
804         (info_mach_thread_command, info_mach_regions_command)
805         (info_mach_regions_recurse_command, info_mach_region_command)
806         (info_mach_exceptions_command): Constify.
807         (get_task_from_args): Constify.
808         * cp-support.c (info_vtbl_command): Constify.
809         * breakpoint.c (info_watchpoints_command)
810         (info_tracepoints_command): Constify.
811         (info_breakpoints_command): Remove non-const overload.
812         * avr-tdep.c (avr_io_reg_read_command): Constify.
813         * auxv.c (info_auxv_command): Constify.
814         * ada-tasks.c (info_tasks_command): Constify.
815         (info_task): Constify.
816         * ada-lang.c (info_exceptions_command): Constify.
817
818 2017-11-07  Tom Tromey  <tom@tromey.com>
819
820         * solib.h (no_shared_libraries): Constify.
821         * frame.h (return_command): Constify.
822         * cli/cli-cmds.h (quit_command): Constify.
823         * top.h (quit_command, execute_command): Constify.
824         * target.h (flash_erase_command): Constify.
825         * inferior.h (set_inferior_args, attach_command): Constify.
826         * tracepoint.h (start_tracing, stop_tracing): Constify.
827         * breakpoint.h (break_command, tbreak_command)
828         (hbreak_command_wrapper, thbreak_command_wrapper)
829         (rbreak_command_wrapper, watch_command_wrapper)
830         (awatch_command_wrapper, rwatch_command_wrapper)
831         (get_tracepoint_by_number): Constify.
832         * symtab.c (info_variables_command, rbreak_command)
833         (symtab_symbol_info): Constify.
834         (info_variables_command): Add non-const overload.
835         * top.c (dont_repeat_command): Constify.
836         * breakpoint.c (ignore_command, commands_command)
837         (condition_command, tbreak_command, hbreak_command)
838         (thbreak_command, clear_command, break_command)
839         (info_breakpoints_command, watch_command, rwatch_command)
840         (awatch_command, trace_command, ftrace_command, strace_command)
841         (trace_pass_command, break_range_command, dprintf_command)
842         (agent_printf_command, get_tracepoint_by_number)
843         (watch_maybe_just_location, trace_pass_command): Constify.
844         (info_breakpoints_command): Add non-const overload.
845         * tracefile.c (tsave_command): Constify.
846         * infcmd.c (attach_command, disconnect_command, signal_command)
847         (queue_signal_command, stepi_command, nexti_command)
848         (finish_command, next_command, step_command, until_command)
849         (advance_command, jump_command, continue_command, run_command)
850         (start_command, starti_command, interrupt_command)
851         (run_command_1, set_inferior_args, step_1): Constify.
852         * inferior.c (add_inferior_command, remove_inferior_command)
853         (clone_inferior_command): Constify.
854         * linux-fork.c (checkpoint_command, restart_command): Constify.
855         * windows-nat.c (signal_event_command): Constify.
856         * guile/guile.c (guile_repl_command, guile_command): Constify.
857         * printcmd.c (x_command, display_command, printf_command)
858         (output_command, set_command, call_command, print_command)
859         (eval_command): Constify.
860         (non_const_set_command): Remove.
861         (_initialize_printcmd): Update.
862         * source.c (forward_search_command, reverse_search_command):
863         Constify.
864         * jit.c (jit_reader_load_command, jit_reader_unload_command):
865         Constify.
866         * infrun.c (handle_command): Constify.
867         * memattr.c (mem_command): Constify.
868         * stack.c (return_command, up_command, up_silently_command)
869         (down_command, down_silently_command, frame_command)
870         (backtrace_command, func_command, backtrace_command_1): Constify.
871         (backtrace_command): Add non-const overload.
872         * remote-sim.c (simulator_command): Constify.
873         * exec.c (set_section_command): Constify.
874         * tracepoint.c (tdump_command, trace_variable_command)
875         (tstatus_command, tstop_command, tstart_command)
876         (end_actions_pseudocommand, while_stepping_pseudocommand)
877         (collect_pseudocommand, teval_pseudocommand, actions_command)
878         (start_tracing, stop_tracing): Constify.
879         * value.c (init_if_undefined_command): Constify.
880         * tui/tui-stack.c (tui_update_command): Constify.
881         * tui/tui-win.c (tui_refresh_all_command)
882         (tui_set_tab_width_command, tui_set_win_height_command)
883         (tui_set_focus_command, tui_scroll_forward_command)
884         (tui_scroll_backward_command, tui_scroll_left_command)
885         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
886         (tui_set_win_height): Constify.
887         * tui/tui-layout.c (tui_layout_command): Constify.
888         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
889         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
890         (proc_untrace_sysexit_cmd): Constify.
891         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
892         (threadset_test_cmd, threadlist_update_test_cmd)
893         (threadalive_test): Constify.
894         * objc-lang.c (print_object_command): Constify.
895         * command.h (add_com): Constify.
896         * cli/cli-dump.c (restore_command): Constify.
897         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
898         (help_command, complete_command, shell_command, edit_command)
899         (list_command, disassemble_command, make_command)
900         (apropos_command, alias_command): Constify.
901         * cli/cli-script.c (document_command, define_command)
902         (while_command, if_command, validate_comname): Constify.
903         * cli/cli-decode.c (struct cmd_list_element): Change type of
904         "fun".
905         * target.c (do_monitor_command, flash_erase_command): Constify.
906         * regcache.c (reg_flush_command): Constify.
907         * reverse.c (reverse_step, reverse_next, reverse_stepi)
908         (reverse_nexti, reverse_continue, reverse_finish)
909         (save_bookmark_command, goto_bookmark_command)
910         (exec_reverse_once): Constify.
911         * python/python.c (python_interactive_command, python_command):
912         Constify.
913         * typeprint.c (ptype_command, whatis_command, whatis_exp):
914         Constify.
915         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
916         * gcore.c (gcore_command): Constify.
917
918 2017-11-07  Tom Tromey  <tom@tromey.com>
919
920         * printcmd.c (x_command): Call set_repeat_arguments.
921         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
922         * top.c (repeat_arguments): New global.
923         (set_repeat_arguments): New function.
924         (execute_command): Handle repeat_arguments.
925         (show_commands): Calls set_repeat_arguments.
926         * command.h (set_repeat_arguments): Declare.
927
928 2017-11-07  Tom Tromey  <tom@tromey.com>
929
930         * stack.c (backtrace_command): Use std::string.
931         (backtrace_command_1): Make "count_exp" const.
932
933 2017-11-07  Tom Tromey  <tom@tromey.com>
934
935         * source.c (directory_switch, mod_path, add_path): Constify.
936         * defs.h (add_path, mod_path, directory_switch): Constify.
937         * mi/mi-cmd-env.c (env_mod_path): Constify.
938
939 2017-11-07  Tom Tromey  <tom@tromey.com>
940
941         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
942         (run_command_1, continue_command, step_1, jump_command)
943         (signal_command, until_command, advance_command, finish_command)
944         (attach_command): Update.
945
946 2017-11-07  Tom Tromey  <tom@tromey.com>
947
948         * command.h (set_cmd_cfunc): Don't declare.
949         * cli/cli-decode.c (set_cmd_cfunc): Now static.
950
951 2017-11-07  Tom Tromey  <tom@tromey.com>
952
953         * stack.c (select_frame_command): Constify.
954         * cli/cli-decode.c (add_com_suppress_notification): Constify.
955         * command.h (add_com_suppress_notification): Constify.
956
957 2017-11-07  Tom Tromey  <tom@tromey.com>
958
959         * breakpoint.c (stop_command): Constify.
960         * cli/cli-decode.c (struct cmd_list_element): Constify.
961         * command.h (add_abbrev_prefix_cmd): Constify.
962
963 2017-11-07  Pedro Alves  <palves@redhat.com>
964
965         * breakpoint.c (extract_bp_kind): New enum.
966         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
967         factored out from ...
968         (extract_bp_number_and_location): ... here.
969         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
970
971 2017-11-07  Pedro Alves  <palves@redhat.com>
972
973         * breakpoint.c (extract_bp_number_and_location): Change return
974         type to void.  Throw error instead of warning.
975         (enable_disable_command): Adjust.
976
977 2017-11-07  Xavier Roirand  <roirand@adacore.com>
978             Pedro Alves  <palves@redhat.com>
979
980         * breakpoint.c (map_breakpoint_number_range): New, factored out
981         from ...
982         (map_breakpoint_numbers): ... here.
983         (find_location_by_number): Change parameters from string to
984         breakpoint number and location.
985         (extract_bp_number_and_location): New function.
986         (enable_disable_bp_num_loc)
987         (enable_disable_breakpoint_location_range)
988         (enable_disable_command): New functions, factored out ...
989         (enable_command, disable_command): ... these functions, and
990         adjusted to support ranges.
991         * NEWS: Document enable/disable breakpoint location range feature.
992
993 2017-11-06  Luis Machado  <luis.machado@linaro.org>
994
995         * MAINTAINERS (Write After Approval): Update my e-mail address.
996
997 2017-11-06  Pedro Alves  <palves@redhat.com>
998
999         * gnu-nat.c (gnu_terminal_init): Delete.
1000         (gnu_target): Don't install gnu_terminal_init.
1001         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1002         (child_terminal_init): ... this function.
1003
1004 2017-11-06  Pedro Alves  <palves@redhat.com>
1005
1006         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1007         sgtty.h.
1008         * config.in, configure: Regenerate.
1009
1010 2017-11-06  Pedro Alves  <palves@redhat.com>
1011
1012         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1013         (async_init_signals): Adjust.
1014         (handle_stop_sig): Rename to ...
1015         (handle_sigtstp): ... this.
1016         (async_stop_sig): Rename to ...
1017         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1018         SIGTSTP path.
1019         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1020         instead of STOP_SIGNAL thoughout.
1021         (handle_stop_sig): Rename to ...
1022         (handle_sigtstp): ... this.
1023         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1024
1025 2017-11-06  Pedro Alves  <palves@redhat.com>
1026
1027         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1028         longer set flags twice in row.
1029
1030 2017-11-06  Pedro Alves  <palves@redhat.com>
1031
1032         * Makefile.in (SER_HARDWIRE): Update comment.
1033         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1034         * common/gdb_termios.h: Delete file.
1035         * common/job-control.c: Include termios.h and unistd.h instead of
1036         gdb_termios.h.
1037         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1038         check.
1039         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1040         Remove sgtty code.
1041         * configure.ac: No longer check for termio.h and sgtty.h.
1042         * configure: Regenerate.
1043         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1044         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1045         Replace PROCESS_GROUP_TYPE references with pid_t references
1046         throughout.
1047         (gdb_getpgrp): Delete.
1048         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1049         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1050         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1051         gdb_getpgrp.  Use serial_set_tty_state instead aof
1052         serial_noflush_set_tty_state.  Remove sgtty code.
1053         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1054         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1055         (inferior_process_group): Now returns pid_t.
1056         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1057         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1058         * ser-event.c (serial_event_ops): Update.
1059         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1060         (dos_ops): Update.
1061         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1062         * ser-pipe.c (pipe_ops): Update.
1063         * ser-tcp.c (tcp_ops): Update.
1064         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1065         HAVE_TERMIOS checks.
1066         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1067         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1068         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1069         assume termios.
1070         (hardwire_noflush_set_tty_state): Delete.
1071         (hardwire_print_tty_state, hardwire_drain_output)
1072         (hardwire_flush_output, hardwire_flush_input)
1073         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1074         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1075         code, and assume termios.
1076         (hardwire_ops): Update.
1077         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1078         * serial.c (serial_noflush_set_tty_state): Delete.
1079         * serial.h (serial_noflush_set_tty_state): Delete.
1080         (serial_ops::noflush_set_tty_state): Delete.
1081
1082 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1083
1084         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1085         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1086         (COMMON_OBS): Remove doublest.o and dfp.o.
1087         Do not build target-float.c (instead of doublest.c)
1088         with -Wformat-nonliteral.
1089
1090         * doublest.c: Remove file.
1091         * doublest.h: Remove file.
1092         * dfp.c: Remove file.
1093         * dfp.h: Remove file.
1094
1095         * target-float.c: Do not include "doublest.h" and "dfp.h".
1096         (DOUBLEST): Move here from doublest.h.
1097         (enum float_kind): Likewise.
1098         (FLOATFORMAT_CHAR_BIT): Likewise.
1099         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1100         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1101         (floatformat_precision): Likewise.
1102         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1103         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1104         Likewise.
1105         (host_float_format, host_double_format, host_long_double_format):
1106         Likewise.
1107         (floatformat_to_string, floatformat_from_string): Likewise.
1108         (floatformat_to_doublest): Likewise.  Also, inline the original
1109         convert_floatformat_to_doublest.
1110         (floatformat_from_doublest): Likewise.  Also, inline the original
1111         convert_floatformat_from_doublest.
1112
1113         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1114         (MAX_DECIMAL_STRING): Move here from dfp.c.
1115         (match_endianness): Likewise.
1116         (set_decnumber_context, decimal_check_errors): Likewise.
1117         (decimal_from_number, decimal_to_number): Likewise.
1118         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1119         (decimal_from_longest, decimal_from_ulongest): Likewise.
1120         (decimal_to_longest): Likewise.
1121         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1122         (decimal_convert): Likewise.
1123
1124 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1125
1126         * doublest.c: Do not include "gdbtypes.h".
1127         (extract_typed_floating): Remove.
1128         (store_typed_floating): Remove.
1129         (convert_typed_floating): Remove.
1130         * doublest.h (struct type): Remove.
1131         (DOUBLEST_PRINT_FORMAT): Remove.
1132         (DOUBLEST_SCAN_FORMAT): Remove.
1133         (extract_typed_floating): Remove.
1134         (store_typed_floating): Remove.
1135         (convert_typed_floating): Remove.
1136
1137         * dfp.c (decimal_from_doublest): Remove.
1138         (decimal_to_doublest): Remove.
1139         * dfp.h: Do not include "doublest.h".
1140         (decimal_from_doublest): Remove.
1141         (decimal_to_doublest): Remove.
1142
1143         * value.c: Do not include "doublest.h" and "dfp.h".
1144         (value_as_double): Remove.
1145         (unpack_double): Remove.
1146         (value_from_double): Remove.
1147         (value_from_decfloat): Remove.
1148         * value.h: Do not include "doublest.h".
1149         (value_as_double): Remove.
1150         (unpack_double): Remove.
1151         (value_from_double): Remove.
1152         (value_from_decfloat): Remove.
1153
1154 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1155
1156         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1157         (i386_extract_return_value): Use target_float_convert.
1158         (i386_store_return_value): Likewise.
1159         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1160         (i387_value_to_register): Likewise.
1161         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1162         (ia64_register_to_value): Use target_float_convert.
1163         (ia64_value_to_register): Likewise.
1164         (ia64_extract_return_value): Likewise.
1165         (ia64_store_return_value): Likewise.
1166         (ia64_push_dummy_call): Likewise.
1167         * m68k-tdep.c: Include "target-float.h".
1168         (m68k_register_to_value): Use target_float_convert.
1169         (m68k_value_to_register): Likewise.
1170         (m68k_svr4_extract_return_value): Likewise.
1171         (m68k_svr4_store_return_value): Likewise.
1172         * ppc-sysv-tdep.c: Include "target-float.h".
1173         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1174         (do_ppc_sysv_return_value): Likewise.
1175         (ppc64_sysv_abi_push_freg): Likewise.
1176         (ppc64_sysv_abi_return_value_base): Likewise.
1177         * rs6000-aix-tdep.c: Include "target-float.h".
1178         (rs6000_push_dummy_call): Use target_float_convert.
1179         (rs6000_return_value): Likewise.
1180         * rs6000-lynx178-tdep.c: Include "target-float.h".
1181         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1182         (rs6000_lynx178_return_value): Likewise.
1183         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1184         (rs6000_register_to_value): Use target_float_convert.
1185         (rs6000_value_to_register): Likewise.
1186         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1187         (arm_extract_return_value): Use target_float_convert.
1188         (arm_store_return_value): Likewise.
1189         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1190         (sh_register_convert_to_virtual): Use target_float_convert.
1191         (sh_register_convert_to_raw): Likewise.
1192         * sh64-tdep.c: Include "target-float.h".
1193         (sh64_extract_return_value): Use target_float_convert.
1194         (sh64_register_convert_to_virtual): Likewise.
1195         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1196
1197 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1198
1199         * target-float.c (floatformat_to_host_double): New function.
1200         (floatformat_from_host_double): Likewise.
1201         (target_float_to_host_double): Likewise.
1202         (target_float_from_host_double): Likewise.
1203         * target-float.h (target_float_to_host_double): Add prototype.
1204         (target_float_from_host_double): Likewise.
1205
1206         * guile/scm-value.c: Include "target-float.h".
1207         (gdbscm_value_to_real): Use target_float_to_host_double.
1208         Handle integer source values via value_as_long.
1209         * guile/scm-math.c: Include "target-float.h".  Do not include
1210         "doublest.h", "dfp.h", and "expression.h".
1211         (vlscm_convert_typed_number): Use target_float_from_host_double.
1212         (vlscm_convert_number): Likewise.
1213
1214         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1215         (convert_value_from_python): Use target_float_from_host_double.
1216
1217 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1218
1219         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1220         (cast_from_fixed): Likewise.
1221         (ada_scaling_type): New function.
1222         (ada_delta): Return value instead of DOUBLEST.  Perform target
1223         arithmetic instead of host arithmetic.
1224         (scaling_factor): Rename to ...
1225         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1226         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1227         (ada_fixed_to_float): Remove.
1228         (ada_float_to_fixed): Remove.
1229         * ada-lang.h (ada_fixed_to_float): Remove.
1230         (ada_float_to_fixed): Remove.
1231         (ada_delta): Return value instead of DOUBLEST.
1232         (ada_scaling_factor): Add prototype.
1233
1234         * ada-typeprint.c: Include "target-float.h".
1235         (print_fixed_point_type): Perform target arithmetic instead of
1236         host arithmetic.
1237         * ada-valprint.c: Include "target-float.h".
1238         (ada_val_print_num): Perform target arithmetic instead of
1239         host arithmetic for fixed-point types.
1240
1241 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1242
1243         * target-float.c: Include <math.h>.
1244         (floatformat_binop): New function.
1245         (floatformat_compare): Likewise.
1246         (target_float_binop): Likewise.
1247         (target_float_compare): Likewise.
1248         * target-float.h: Include "expression.h".
1249         (target_float_binop): Add prototype.
1250         (target_float_compare): Likewise.
1251
1252         * valarith.c: Do not include "doublest.h" and "dfp.h".
1253         Include "common/byte-vector.h".
1254         (value_args_as_decimal): Remove, replace by ...
1255         (value_args_as_target_float): ... this function.  Handle both
1256         binary and decimal target floating-point formats.
1257         (scalar_binop): Handle both binary and decimal FP using
1258         value_args_as_target_float and target_float_binop.
1259         (value_equal): Handle both binary and decimal FP using
1260         value_args_as_target_float and target_float_compare.
1261         (value_less): Likewise.
1262         (value_pos): Handle all scalar types as simple copy.
1263         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1264         * dfp.c (decimal_binop): Throw error instead of internal_error
1265         when called with an unsupported operation code.
1266
1267 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1268
1269         * target-float.c (target_float_to_string): New function.
1270         (target_float_from_string): New function.
1271         * target-float.h (target_float_to_string): Add prototype.
1272         (target_float_from_string): Add prototype.
1273
1274         * valprint.c: Include "target-float.h".  Do not include
1275         "doublest.h" and "dfp.h".
1276         (print_floating): Use target_float_to_string.
1277         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1278         (printf_floating): Use target_float_to_string.
1279         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1280         (print_i387_value): Use target_float_to_string.
1281         * mips-tdep.c: Include "target-float.h".
1282         (mips_print_fp_register): Use target_float_to_string.
1283         * sh64-tdep.c: Include "target-float.h".
1284         (sh64_do_fp_register): Use target_float_to_string.
1285
1286         * parse.c: Include "target-float.h".  Do not include
1287         "doublest.h" and "dfp.h".
1288         (parse_float): Use target_float_from_string.
1289         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1290         (define_symbol): Use target_float_from_string.
1291         * gdbarch-selftests.c: Include "target-float.h".
1292         (register_to_value_test): Use target_float_from_string.
1293
1294 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1295
1296         * Makefile.c (SFILES): Add target-float.c.
1297         (HFILES_NO_SRCDIR): Add target-float.h.
1298         (COMMON_OBS): Add target-float.o.
1299         * target-float.h: New file.
1300         * target-float.c: New file.
1301
1302         * doublest.c (floatformat_classify): Fix detection of float_zero.
1303
1304         * gdbtypes.c (is_floating_type): New function.
1305         * gdbtypes.h (is_floating_type): Add prototype.
1306
1307         * value.c: Do not include "floatformat.h".
1308         (unpack_double): Use target_float_is_valid.
1309         (is_floating_value): New function.
1310         * value.h (is_floating_value): Add prototype-
1311
1312         * valarith.c: Include "target-float.h".
1313         (value_logical_not): Use target_float_is_zero.
1314
1315         * python/py-value.c: Include "target-float.h".
1316         (valpy_nonzero): Use target_float_is_zero.
1317
1318 2017-11-04  Tom Tromey  <tom@tromey.com>
1319
1320         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1321
1322 2017-11-04  Tom Tromey  <tom@tromey.com>
1323
1324         * breakpoint.c (set_momentary_breakpoint): Return
1325         breakpoint_up.
1326         (until_break_command): Update.
1327         (new_until_break_fsm): Change argument types to
1328         breakpoint_up.
1329         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1330         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1331         Remove.
1332         * infcmd.c (finish_forward): Update.
1333         * breakpoint.h (set_momentary_breakpoint)
1334         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1335         (make_cleanup_delete_breakpoint): Remove.
1336         (struct breakpoint_deleter): New.
1337         (breakpoint_up): New typedef.
1338         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1339         (insert_exception_resume_breakpoint): Update.
1340         (insert_exception_resume_from_probe): Update.
1341         (insert_longjmp_resume_breakpoint): Update.
1342         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1343         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1344         * infcall.c (call_function_by_hand_dummy): Update
1345
1346 2017-11-04  Tom Tromey  <tom@tromey.com>
1347
1348         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1349
1350 2017-11-04  Tom Tromey  <tom@tromey.com>
1351
1352         * linux-tdep.c (linux_core_info_proc_mappings): Use
1353         gdb::def_vector.
1354         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1355         "size" argument.
1356         (linux_corefile_thread): Update.
1357         (linux_make_corefile_notes): Remove unused variable.
1358
1359 2017-11-04  Tom Tromey  <tom@tromey.com>
1360
1361         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1362         gdb::byte_vector.
1363
1364 2017-11-04  Tom Tromey  <tom@tromey.com>
1365
1366         * objfiles.c (do_free_objfile_cleanup): Remove.
1367         * compile/compile-object-load.c (compile_object_load): Update.
1368         * objfiles.h (make_cleanup_free_objfile): Remove.
1369
1370 2017-11-04  Tom Tromey  <tom@tromey.com>
1371
1372         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1373         (adi_read_versions): Change "tags" to "gdb_byte *".
1374         (adi_print_versions): Likewise.
1375
1376 2017-11-04  Tom Tromey  <tom@tromey.com>
1377
1378         * breakpoint.c
1379         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1380         from start_rbreak_breakpoints.
1381         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1382         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1383         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1384         * symtab.c (do_end_rbreak_breakpoints): Remove.
1385         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1386
1387 2017-11-04  Tom Tromey  <tom@tromey.com>
1388
1389         * cp-namespace.c (reset_directive_searched): Remove.
1390         (cp_lookup_symbol_via_imports): Use scoped_restore.
1391         * cp-support.c (reset_directive_searched): Remove.
1392         (make_symbol_overload_list_using): Use scoped_restore.
1393         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1394         (reset_directive_searched): Remove.
1395
1396 2017-11-04  Tom Tromey  <tom@tromey.com>
1397
1398         * symfile.c (find_separate_debug_file_by_debuglink): Use
1399         unique_xmalloc_ptr.
1400
1401 2017-11-04  Tom Tromey  <tom@tromey.com>
1402
1403         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1404         type of "info".
1405         (compute_stack_depth): Likewise.
1406         (do_compile_dwarf_expr_to_c): Use std::vector.
1407
1408 2017-11-04  Tom Tromey  <tom@tromey.com>
1409
1410         * compile/compile-object-load.c (link_callbacks_einfo): Use
1411         std::string.
1412
1413 2017-11-04  Tom Tromey  <tom@tromey.com>
1414
1415         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1416         Use scoped_free_pendings.
1417         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1418         scoped_free_pendings.
1419         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1420         (xcoff_initial_scan): Likewise.
1421         * buildsym.c (reset_symtab_globals): Update comment.
1422         (scoped_free_pendings): Rename from really_free_pendings.
1423         (prepare_for_building): Update comment.
1424         (buildsym_init): Likewise.
1425         * buildsym.h (class scoped_free_pendings): New class.
1426         (really_free_pendings): Don't declare.
1427
1428 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1429
1430         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1431         output when converting a zero value to a special byteorder format.
1432
1433 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1434
1435         * frame.c (do_frame_register_read): Remove aspace.
1436         * jit.c (jit_frame_sniffer): Likwise.
1437         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1438         * regcache.c (regcache::regcache): Pass nullptr.
1439         (regcache_print): Caller updated.
1440         * regcache.h (regcache::regcache): Remove one constructor
1441         parameter aspace.
1442
1443 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1444
1445         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1446
1447 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1448
1449         * breakpoint.c (insert_single_step_breakpoints): Update.
1450         * frame.c (struct frame_info) <aspace>: Add const.
1451         (frame_save_as_regcache): Add const.
1452         (get_frame_address_space): Return const address_space *.
1453         * frame.h (get_frame_address_space): Update declaration.
1454         * infrun.c (struct step_over_info) <aspace>: Add const.
1455         (set_step_over_info): Make aspace const.
1456         (displaced_step_prepare_throw): Change variable const.
1457         (resume): Likewise.
1458         (proceed): Likewise.
1459         (adjust_pc_after_break): Likewise.
1460         (save_waitstatus): Likewise.
1461         (handle_signal_stop): Likewise.
1462         (keep_going_pass_signal): Likewise.
1463         * jit.c (jit_frame_sniffer): Add const.
1464         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1465         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1466         * record-full.c (record_full_wait_1): Likewise.
1467         * regcache.c (regcache::regcache): Change parameter to const.
1468         * regcache.h (regcache::regcache): Likewise.
1469         (regcache::aspace): Return const address_space *.
1470         (regcache) <m_aspace>: Add const.
1471
1472 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1473
1474         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1475         * frame.c (create_sentinel_frame): Likewise.
1476         * infrun.c (displaced_step_prepare_throw): Likewise.
1477         (resume): Likewise.
1478         (thread_still_needs_step_over_bp): Likewise.
1479         (proceed): Likewise.
1480         (do_target_wait): Likewise.
1481         (adjust_pc_after_break): Likewise.
1482         (handle_syscall_event): Likewise.
1483         (save_waitstatus): Likewise.
1484         (handle_inferior_event_1): Likewise.
1485         (handle_signal_stop): Likewise.
1486         (keep_going_pass_signal): Likewise.
1487         * linux-nat.c (status_callback): Likewise.
1488         (save_stop_reason): Likewise.
1489         (resume_stopped_resumed_lwps): Likewise.
1490         * record-full.c (record_full_exec_insn): Likewise.
1491         (record_full_wait_1): Likewise.
1492         * regcache.c (get_regcache_aspace): Remove.
1493         * regcache.h (get_regcache_aspace): Remove.
1494
1495 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1496
1497         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1498         (init_regcache_descr): Use gdbarch_num_regs.
1499         (regcache::regcache): Likewise.
1500         (regcache::get_register_status): Likewise.
1501         (regcache::assert_raw_regnum): Likewise.
1502         (regcache::cooked_read): Likewise.
1503         (regcache::cooked_read_value): Likewise.
1504         (regcache::cooked_write): Likewise.
1505         (regcache::dump): Likewise.
1506         (regcache::num_raw_registers): New method.
1507         * regcache.h (class regcache) <num_raw_registers>: New.
1508
1509 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1510
1511         * regcache.c (regcache::assert_regnum): New method.
1512         (regcache::invalidate): Call assert_regnum.
1513         (regcache::raw_update): Likewise.
1514         (regcache::raw_write): Likewise.
1515         (regcache::raw_read_part): Likewise.
1516         (regcache::raw_write_part): Likewise.
1517         (regcache::raw_supply): Likewise.
1518         (regcache::raw_supply_integer): Likewise.
1519         (regcache::raw_supply_zeroed): Likewise.
1520         (regcache::raw_collect): Likewise.
1521         (regcache::raw_collect_integer): Likewise.
1522         * regcache.h (regcache::assert_regnum): Declare.
1523
1524 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1525
1526         * regcache.c (regcache::dump): Remove code.
1527
1528 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1529
1530         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1531         Remove.
1532         <sizeof_cooked_register_status>: Remove.
1533         (init_regcache_descr): Update.
1534         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1535         (regcache::save): Likewise.
1536         (regcache::dump): Likewise.
1537
1538 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1539
1540         * ft32-tdep.c (ft32_fetch_instruction): New function.
1541         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1542
1543 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1544
1545         * cli/cli-script.c (execute_control_command): Rename to ...
1546         (execute_control_command_1): ... this.
1547         (execute_control_command): New function.
1548
1549 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1550
1551         * tracepoint.c (tfind_command): Remove const_cast.
1552
1553 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1554
1555         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1556
1557 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1558
1559         * common/common-utils.h (in_inclusive_range): New function.
1560         * arm-tdep.c (arm_record_extension_space): Use
1561         in_inclusive_range.
1562         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1563         * cris-tdep.c (cris_spec_reg_applicable): Use
1564         in_inclusive_range.
1565
1566 2017-10-30  Pedro Alves  <palves@redhat.com>
1567             Simon Marchi <simon.marchi@ericsson.com>
1568
1569         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1570         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1571
1572 2017-10-30  Pedro Alves  <palves@redhat.com>
1573
1574         * common/common-utils.c (string_appendf, string_vappendf): New
1575         functions.
1576         * common/common-utils.h (string_appendf, string_vappendf): New
1577         declarations.
1578         * unittests/common-utils-selftests.c (string_appendf_func)
1579         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1580         (string_vappendf_tests): New functions.
1581         (_initialize_common_utils_selftests): Register "string_appendf" and
1582         "string_vappendf tests".
1583
1584 2017-10-30  Pedro Alves  <palves@redhat.com>
1585
1586         * unittests/common-utils-selftests.c (format_func): New typedef.
1587         (string_printf_tests, string_vprintf_tests): Tests factored out
1588         and merged to ...
1589         (test_format_func): ... this new function.
1590         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1591         test_format_func.
1592
1593 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1594
1595         * darwin-nat.c: Remove include of gdb.h.
1596
1597 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1598
1599         * xtensa-xtregs.c: Fix formatting issues.
1600
1601 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1602
1603         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1604
1605 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1606
1607         PR python/21213
1608         * python/py-infthread.c (thpy_get_inferior): Increment reference
1609         of inferior before returning it.
1610
1611 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1612
1613         * unittests/common-utils-selftests.c (format): Add
1614         ATTRIBUTE_PRINTF.
1615
1616 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1617
1618         * xml-syscall.c (struct syscall_desc): Add constructor.
1619         <name>: Change type to std::string.
1620         (syscall_desc_up): New typedef.
1621         (syscall_desc_p): Remove typeder.
1622         (DEF_VEC_P(syscall_desc_p)): Remove.
1623         (struct syscall_group_desc): Add constructor.
1624         <name>: Change type to std::string.
1625         <syscalls>: Change type to std::vector.
1626         (syscall_group_desc_up): New typedef.
1627         (syscall_group_desc_p): Remove typedef.
1628         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1629         (struct syscalls_info) <syscalls>: Change type to std::vector of
1630         unique_ptr.
1631         <groups>: Likewise.
1632         <my_gdb_datadir>: Change type to std::string.
1633         (syscalls_info_up): New typedef.
1634         (allocate_syscalls_info): Remove.
1635         (syscalls_info_free_syscalls_desc): Remove.
1636         (syscalls_info_free_syscall_group_desc): Remove.
1637         (free_syscalls_info): Remove.
1638         (make_cleanup_free_syscalls_info): Remove.
1639         (syscall_group_create_syscall_group_desc): Adjust.
1640         (syscall_group_add_syscall): Adjust.
1641         (syscall_create_syscall_desc): Adjust.
1642         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1643         (init_syscalls_info): Adjust.
1644         (syscall_group_get_group_by_name): Adjust.
1645         (xml_get_syscall_number): Adjust.
1646         (xml_get_syscall_name): Adjust.
1647         (xml_list_of_syscalls): Adjust.
1648         (xml_list_syscalls_by_group): Adjust.
1649         (xml_list_of_groups): Adjust.
1650
1651 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1652
1653         * probe.h: Don't include gdb_vecs.h.
1654         (DEF_VEC_P (probe_p)): Remove.
1655         (find_probes_in_objfile): Return an std::vector.
1656         * probe.c (find_probes_in_objfile): Likewise.
1657         * breakpoint.c (breakpoint_objfile_data)
1658         <longjmp_probes>: Change type to std::vector.
1659         <exception_probes>: Likewise.
1660         (free_breakpoint_probes): Don't manually free vectors.
1661         (create_longjmp_master_breakpoint): Adjust.
1662         (create_exception_master_breakpoint): Adjust.
1663         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1664         parameter type, adjust.
1665         (svr4_create_solib_event_breakpoints): Adjust.
1666
1667 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1668
1669         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1670         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1671         with new.
1672         (free_breakpoint_probes): Rename to ...
1673         (free_breakpoint_objfile_data): ... this, and call delete on
1674         bp_objfile_data..
1675
1676 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1677
1678         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1679         (loaded_script_ptr): Remove typedef.
1680         (DEF_VEC_P (loaded_script_ptr)): Remove.
1681         (struct collect_matching_scripts_data): Add constructor.
1682         <scripts_p>: Change type to (pointer to) std::vector.
1683         (collect_matching_scripts_data): Adjust.
1684         (sort_scripts_by_name): Make suitable for std::sort.
1685         (print_scripts): Don't sort vector, adjust to std::vector.
1686         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1687
1688 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1689
1690         * symfile.c (filename_language): Make struct, not typedef.  Add
1691         constructor.
1692         <ext>: Change type to std::string.
1693         (DEF_VEC_O (filename_language)): Remove.
1694         (filename_language_table): Change type to std::vector.
1695         (add_filename_language): Adjust.
1696         (set_ext_lang_command): Adjust.
1697         (info_ext_lang_command): Adjust.
1698         (deduce_language_from_filename): Adjust.
1699         (class scoped_restore_filename_language_table): Remove.
1700         (test_filename_language): Use scoped_restore.
1701         (test_set_ext_lang_command): Use scoped_restore, adjust to
1702         std::vector change.
1703
1704 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1705
1706         * symfile.c: Include selftest.h.
1707         (class scoped_restore_filename_language_table): New.
1708         (test_filename_language): New test.
1709         (test_set_ext_lang_command): New test.
1710         (_initialize_symfile): Register tests.
1711
1712 2017-10-27  Keith Seitz  <keiths@redhat.com>
1713
1714         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1715         in the bp_location, falling back to find_pc_sect_function when
1716         needed.
1717         (add_location_to_breakpoint): Save sal->symbol.
1718         * breakpoint.h (struct bp_location) <symbol>: New field.
1719         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1720         * symtab.h (struct symtab_and_line) <symbol>: New field.
1721
1722 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1723
1724         PR gdb/13669
1725         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1726         to rewind obstack.
1727
1728 2017-10-26  Pedro Alves  <palves@redhat.com>
1729
1730         * remote.c (remote_async_terminal_ours_p): Delete.
1731         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1732         Remove references to 'remote_async_terminal_ours_p'.
1733
1734 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1735
1736         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1737
1738 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1739
1740         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1741         aspace const.
1742         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1743         Likewise.
1744         * breakpoint.c (bpstat_check_location): Remove cast.
1745         (breakpoint_hit_catch_fork): Make aspce const.
1746         (breakpoint_hit_catch_solib): Likewise.
1747         (breakpoint_hit_catch_exec): Likewise.
1748         (breakpoint_hit_ranged_breakpoint): Likewise.
1749         (breakpoint_hit_watchpoint): Likewise.
1750         (base_breakpoint_breakpoint_hit): Likewise.
1751         (bkpt_breakpoint_hit): Likewise.
1752         (dprintf_breakpoint_hit): Likewise.
1753         (tracepoint_breakpoint_hit): Likewise.
1754         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1755
1756 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1757
1758         * breakpoint.c (breakpoint_location_address_match): Change
1759         "struct address_space *" to "const address_space".
1760         (breakpoint_location_address_range_overlap): Likewise.
1761         (breakpoint_here_p): Likewise.
1762         (breakpoint_in_range_p): Likewise.
1763         (moribund_breakpoint_here_p): Likewise.
1764         (bp_location_inserted_here_p): Likewise.
1765         (software_breakpoint_inserted_here_p): Likewise.
1766         (hardware_breakpoint_inserted_here_p): Likewise.
1767         (hardware_watchpoint_inserted_in_range): Likewise.
1768         (bpstat_check_location): Likewise.
1769         (bpstat_stop_status): Likewise.
1770         (breakpoint_address_match): Likewise.
1771         (breakpoint_address_match_range): Likewise.
1772         (breakpoint_location_address_match): Likewise.
1773         (breakpoint_location_address_range_overlap): Likewise.
1774         (insert_single_step_breakpoint): Likewise.
1775         (breakpoint_has_location_inserted_here): Likewise.
1776         (single_step_breakpoint_inserted_here_p): Likewise.
1777         (pc_at_non_inline_function): Likewise.
1778         * breakpoint.h (bpstat_stop_status): Update declaration.
1779         (breakpoint_here_p): Likewise.
1780         (breakpoint_in_range_p): Likewise.
1781         (moribund_breakpoint_here_p): Likewise.
1782         (breakpoint_inserted_here_p): Likewise.
1783         (software_breakpoint_inserted_here_p): Likewise.
1784         (hardware_breakpoint_inserted_here_p): Likewise.
1785         (breakpoint_has_location_inserted_here): Likewise.
1786         (single_step_breakpoint_inserted_here_p): Likewise.
1787         (hardware_watchpoint_inserted_in_range): Likewise.
1788         (breakpoint_address_match): Likewise.
1789         (insert_single_step_breakpoint): Likewise.
1790         (pc_at_non_inline_function): Likewise.
1791         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1792         * record.c (record_check_stopped_by_breakpoint): Likewise.
1793         * record.h (record_check_stopped_by_breakpoint): Likewise.
1794         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1795
1796 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1797
1798         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1799         regcache->arch () instead get_regcache_arch.
1800         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1801         Likewise.
1802         (aarch64_fbsd_store_inferior_registers): Likewise.
1803         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1804         (store_gregs_to_thread): Likewise.
1805         (fetch_fpregs_from_thread): Likewise.
1806         (store_fpregs_to_thread): Likewise.
1807         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1808         (aarch64_store_return_value): Likewise.
1809         (aarch64_software_single_step): Likewise.
1810         * aix-thread.c (aix_thread_wait): Likewise.
1811         (supply_reg32): Likewise.
1812         (supply_sprs64): Likewise.
1813         (supply_sprs32): Likewise.
1814         (fill_gprs64): Likewise.
1815         (fill_gprs32): Likewise.
1816         (fill_sprs64): Likewise.
1817         (fill_sprs32): Likewise.
1818         (store_regs_user_thread): Likewise.
1819         (store_regs_kernel_thread): Likewise.
1820         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1821         (alphabsd_store_inferior_registers): Likewise.
1822         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1823         (alpha_store_return_value): Likewise.
1824         (alpha_deal_with_atomic_sequence): Likewise.
1825         (alpha_next_pc): Likewise.
1826         (alpha_software_single_step): Likewise.
1827         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1828         (amd64bsd_store_inferior_registers): Likewise.
1829         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1830         Likewise.
1831         (amd64_linux_store_inferior_registers): Likewise.
1832         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1833         (amd64_collect_native_gregset): Likewise.
1834         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1835         (amd64obsd_collect_uthread): Likewise.
1836         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1837         (amd64_collect_fpregset): Likewise.
1838         (amd64_supply_fxsave): Likewise.
1839         (amd64_supply_xsave): Likewise.
1840         (amd64_collect_fxsave): Likewise.
1841         (amd64_collect_xsave): Likewise.
1842         * arc-tdep.c (arc_write_pc): Likewise.
1843         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1844         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1845         (arm_fbsd_store_inferior_registers): Likewise.
1846         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1847         (store_vfp_regs): Likewise.
1848         (arm_linux_fetch_inferior_registers): Likewise.
1849         (arm_linux_store_inferior_registers): Likewise.
1850         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1851         (arm_linux_sigreturn_next_pc): Likewise.
1852         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1853         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1854         (fetch_register): Likewise.
1855         (store_register): Likewise.
1856         * arm-tdep.c (arm_is_thumb): Likewise.
1857         (displaced_in_arm_mode): Likewise.
1858         (bx_write_pc): Likewise.
1859         (arm_get_next_pcs_addr_bits_remove): Likewise.
1860         (arm_software_single_step): Likewise.
1861         (arm_extract_return_value): Likewise.
1862         (arm_store_return_value): Likewise.
1863         (arm_write_pc): Likewise.
1864         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1865         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1866         (bsd_uthread_store_registers): Likewise.
1867         * core-regset.c (fetch_core_registers): Likewise.
1868         * corelow.c (get_core_registers): Likewise.
1869         * cris-tdep.c (cris_store_return_value): Likewise.
1870         (cris_extract_return_value): Likewise.
1871         (find_step_target): Likewise.
1872         (find_step_target): Likewise.
1873         (cris_software_single_step): Likewise.
1874         * ctf.c (ctf_fetch_registers): Likewise.
1875         * darwin-nat.c (cancel_breakpoint): Likewise.
1876         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1877         * frv-tdep.c (frv_extract_return_value): Likewise.
1878         * ft32-tdep.c (ft32_store_return_value): Likewise.
1879         (ft32_extract_return_value): Likewise.
1880         * go32-nat.c (fetch_register): Likewise.
1881         (go32_fetch_registers): Likewise.
1882         (go32_store_registers): Likewise.
1883         (store_register): Likewise.
1884         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1885         (h8300_store_return_value): Likewise.
1886         * hppa-linux-nat.c (fetch_register): Likewise.
1887         (store_register): Likewise.
1888         (hppa_linux_fetch_inferior_registers): Likewise.
1889         (hppa_linux_store_inferior_registers): Likewise.
1890         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1891         (i386_darwin_store_inferior_registers): Likewise.
1892         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1893         (gnu_store_registers): Likewise.
1894         * i386-linux-nat.c (fetch_register): Likewise.
1895         (store_register): Likewise.
1896         (supply_gregset): Likewise.
1897         (fill_gregset): Likewise.
1898         (i386_linux_fetch_inferior_registers): Likewise.
1899         (i386_linux_store_inferior_registers): Likewise.
1900         (i386_linux_resume): Likewise.
1901         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1902         Likewise.
1903         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1904         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1905         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1906         (i386obsd_collect_uthread): Likewise.
1907         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1908         (i386_supply_gregset): Likewise.
1909         (i386_collect_gregset): Likewise.
1910         (i386_supply_fpregset): Likewise.
1911         (i386_collect_fpregset): Likewise.
1912         (i386_mpx_bd_base): Likewise.
1913         * i386-v4-nat.c (supply_fpregset): Likewise.
1914         (fill_fpregset): Likewise.
1915         * i387-tdep.c (i387_supply_fsave): Likewise.
1916         (i387_collect_fsave): Likewise.
1917         (i387_supply_fxsave): Likewise.
1918         (i387_collect_fxsave): Likewise.
1919         (i387_supply_xsave): Likewise.
1920         (i387_collect_xsave): Likewise.
1921         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1922         (ia64_linux_store_registers): Likewise.
1923         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1924         (ia64_extract_return_value): Likewise.
1925         (ia64_store_return_value): Likewise.
1926         (find_func_descr): Likewise.
1927         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1928         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1929         (inf_ptrace_store_registers): Likewise.
1930         * infrun.c (use_displaced_stepping): Likewise.
1931         (displaced_step_prepare_throw): Likewise.
1932         (resume): Likewise.
1933         (proceed): Likewise.
1934         (do_target_wait): Likewise.
1935         (adjust_pc_after_break): Likewise.
1936         (handle_inferior_event_1): Likewise.
1937         (handle_signal_stop): Likewise.
1938         (save_infcall_suspend_state): Likewise.
1939         (restore_infcall_suspend_state): Likewise.
1940         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1941         * jit.c (jit_frame_prev_register): Likewise.
1942         * linux-nat.c (save_stop_reason): Likewise.
1943         (linux_nat_wait_1): Likewise.
1944         (resume_stopped_resumed_lwps): Likewise.
1945         * linux-record.c (record_linux_sockaddr): Likewise.
1946         (record_linux_msghdr): Likewise.
1947         (record_linux_system_call): Likewise.
1948         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1949         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1950         (lm32_store_return_value): Likewise.
1951         * m32c-tdep.c (m32c_read_flg): Likewise.
1952         (m32c_pseudo_register_read): Likewise.
1953         (m32c_pseudo_register_write): Likewise.
1954         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1955         (m32r_linux_collect_gregset): Likewise.
1956         * m32r-tdep.c (m32r_store_return_value): Likewise.
1957         (m32r_extract_return_value): Likewise.
1958         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1959         (m68kbsd_collect_fpregset): Likewise.
1960         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1961         * m68k-linux-nat.c (fetch_register): Likewise.
1962         (old_fetch_inferior_registers): Likewise.
1963         (old_store_inferior_registers): Likewise.
1964         (store_regs): Likewise.
1965         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1966         (m68k_svr4_store_return_value): Likewise.
1967         * m88k-tdep.c (m88k_store_arguments): Likewise.
1968         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1969         (mi_cmd_data_write_register_values): Likewise.
1970         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1971         (mips_fbsd_store_inferior_registers): Likewise.
1972         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1973         (mips_fbsd_supply_gregs): Likewise.
1974         (mips_fbsd_collect_fpregs): Likewise.
1975         (mips_fbsd_collect_gregs): Likewise.
1976         (mips_fbsd_supply_fpregset): Likewise.
1977         (mips_fbsd_collect_fpregset): Likewise.
1978         (mips_fbsd_supply_gregset): Likewise.
1979         (mips_fbsd_collect_gregset): Likewise.
1980         * mips-linux-nat.c (supply_gregset): Likewise.
1981         (fill_gregset): Likewise.
1982         (supply_fpregset): Likewise.
1983         (fill_fpregset): Likewise.
1984         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1985         (mips_fill_gregset): Likewise.
1986         (mips_supply_fpregset): Likewise.
1987         (mips_fill_fpregset): Likewise.
1988         (mips64_supply_gregset): Likewise.
1989         (micromips_linux_sigframe_validate): Likewise.
1990         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1991         (mipsnbsd_fetch_inferior_registers): Likewise.
1992         (mipsnbsd_store_inferior_registers): Likewise.
1993         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1994         (mipsnbsd_supply_gregset): Likewise.
1995         (mipsnbsd_iterate_over_regset_sections): Likewise.
1996         (mipsnbsd_supply_reg): Likewise.
1997         (mipsnbsd_supply_fpreg): Likewise.
1998         * mips-tdep.c (mips_in_frame_stub): Likewise.
1999         (mips_dummy_id): Likewise.
2000         (is_octeon_bbit_op): Likewise.
2001         (micromips_bc1_pc): Likewise.
2002         (extended_mips16_next_pc): Likewise.
2003         (mips16_next_pc): Likewise.
2004         (deal_with_atomic_sequence): Likewise.
2005         * moxie-tdep.c (moxie_process_readu): Likewise.
2006         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2007         * nto-procfs.c (procfs_store_registers): Likewise.
2008         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2009         (ppcfbsd_store_inferior_registers): Likewise.
2010         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2011         (fetch_altivec_register): Likewise.
2012         (get_spe_registers): Likewise.
2013         (fetch_spe_register): Likewise.
2014         (fetch_altivec_registers): Likewise.
2015         (fetch_all_gp_regs): Likewise.
2016         (fetch_all_fp_regs): Likewise.
2017         (store_vsx_register): Likewise.
2018         (store_altivec_register): Likewise.
2019         (set_spe_registers): Likewise.
2020         (store_spe_register): Likewise.
2021         (store_altivec_registers): Likewise.
2022         (store_all_gp_regs): Likewise.
2023         (store_all_fp_regs): Likewise.
2024         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2025         (ppc_linux_collect_gregset): Likewise.
2026         (ppc_canonicalize_syscall): Likewise.
2027         (ppc_linux_record_signal): Likewise.
2028         (ppu2spu_prev_register): Likewise.
2029         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2030         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2031         (ppcobsd_store_registers): Likewise.
2032         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2033         Likewise.
2034         (ppc_ravenscar_generic_store_registers): Likewise.
2035         * procfs.c (procfs_fetch_registers): Likewise.
2036         (procfs_store_registers): Likewise.
2037         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2038         (ravenscar_store_registers): Likewise.
2039         (ravenscar_prepare_to_store): Likewise.
2040         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2041         * record-full.c (record_full_wait_1): Likewise.
2042         (record_full_registers_change): Likewise.
2043         (record_full_store_registers): Likewise.
2044         (record_full_core_fetch_registers): Likewise.
2045         (record_full_save): Likewise.
2046         (record_full_goto_insn): Likewise.
2047         * regcache.c (regcache_register_size): Likewise.
2048         (get_regcache_arch): Remove.
2049         (regcache_read_pc): Likewise.
2050         * regcache.h (get_regcache_arch): Remove.
2051         * remote-sim.c (gdbsim_fetch_register): Likewise.
2052         (gdbsim_store_register): Likewise.
2053         * remote.c (fetch_register_using_p): Likewise.
2054         (send_g_packet): Likewise.
2055         (remote_prepare_to_store): Likewise.
2056         (store_registers_using_G): Likewise.
2057         * reverse.c (save_bookmark_command): Likewise.
2058         (goto_bookmark_command): Likewise.
2059         * rs6000-aix-tdep.c (branch_dest): Likewise.
2060         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2061         (fetch_register): Likewise.
2062         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2063         (ppc_collect_reg): Likewise.
2064         (ppc_collect_gregset): Likewise.
2065         (ppc_collect_fpregset): Likewise.
2066         (ppc_collect_vsxregset): Likewise.
2067         (ppc_collect_vrregset): Likewise.
2068         (ppc_displaced_step_hw_singlestep): Likewise.
2069         (rs6000_pseudo_register_read): Likewise.
2070         (rs6000_pseudo_register_write): Likewise.
2071         * s390-linux-nat.c (supply_gregset): Likewise.
2072         (fill_gregset): Likewise.
2073         (s390_linux_fetch_inferior_registers): Likewise.
2074         * s390-linux-tdep.c (s390_write_pc): Likewise.
2075         (s390_software_single_step): Likewise.
2076         (s390_all_but_pc_registers_record): Likewise.
2077         (s390_linux_syscall_record): Likewise.
2078         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2079         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2080         (shnbsd_store_inferior_registers): Likewise.
2081         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2082         (sh_extract_return_value_fpu): Likewise.
2083         (sh_store_return_value_nofpu): Likewise.
2084         (sh_corefile_supply_regset): Likewise.
2085         (sh_corefile_collect_regset): Likewise.
2086         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2087         (sh64_store_return_value): Likewise.
2088         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2089         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2090         (sparc_store_inferior_registers): Likewise.
2091         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2092         (sparc_ravenscar_prepare_to_store): Likewise.
2093         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2094         (sparc_analyze_control_transfer): Likewise.
2095         (sparc_step_trap): Likewise.
2096         (sparc_software_single_step): Likewise.
2097         (sparc32_gdbarch_init): Likewise.
2098         (sparc_supply_rwindow): Likewise.
2099         (sparc_collect_rwindow): Likewise.
2100         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2101         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2102         (sparc64nbsd_collect_gregset): Likewise.
2103         (sparc64nbsd_supply_fpregset): Likewise.
2104         (sparc64nbsd_collect_fpregset): Likewise.
2105         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2106         (sparc64_supply_gregset): Likewise.
2107         (sparc64_collect_gregset): Likewise.
2108         (sparc64_supply_fpregset): Likewise.
2109         (sparc64_collect_fpregset): Likewise.
2110         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2111         * spu-tdep.c (spu_unwind_sp): Likewise.
2112         (spu2ppu_prev_register): Likewise.
2113         (spu_memory_remove_breakpoint): Likewise.
2114         * stack.c (return_command): Likewise.
2115         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2116         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2117         * tracefile.c (trace_save_ctf): Likewise.
2118         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2119         (do_windows_store_inferior_registers): Likewise.
2120         (windows_resume): Likewise.
2121         * xtensa-linux-nat.c (fill_gregset): Likewise.
2122         (supply_gregset_reg): Likewise.
2123         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2124         (xtensa_register_read_masked): Likewise.
2125         (xtensa_supply_gregset): Likewise.
2126         (xtensa_extract_return_value): Likewise.
2127         (xtensa_store_return_value): Likewise.
2128
2129 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2130
2131         * doublest.c (floatformat_from_string): New function.
2132         * doublest.h (floatformat_from_string): Add prototype.
2133
2134         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2135         (OP_FLOAT): ... this.
2136         * expression.h: Do not include "doublest.h".
2137         (union exp_element): Replace doubleconst and decfloatconst by
2138         new element floatconst.
2139         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2140         (ada_evaluate_subexp): Likewise.
2141         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2142         OP_DOUBLE and OP_DECFLOAT.
2143         * expprint.c (print_subexp_standard): Likewise.
2144         (dump_subexp_body_standard): Likewise.
2145         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2146
2147         * parse.c: Include "dfp.h".
2148         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2149         (write_exp_elt_floatcst): New function.
2150         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2151         and OP_DECFLOAT.
2152         (operator_check_standard): Likewise.
2153         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2154         Return target format buffer instead of host DOUBLEST.
2155         Use floatformat_from_string and decimal_from_string to parse
2156         either binary or decimal floating-point types.
2157         (parse_c_float): Remove.
2158         * parser-defs.h: Do not include "doublest.h".
2159         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2160         (write_exp_elt_floatcst): Add prototype.
2161         (parse_float): Update prototype.
2162         (parse_c_float): Remove.
2163
2164         * c-exp.y: Do not include "dfp.h".
2165         (typed_val_float): Use byte buffer instead of DOUBLEST.
2166         (typed_val_decfloat): Remove.
2167         (DECFLOAT): Remove.
2168         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2169         (parse_number): Update to new parse_float interface.
2170         Parse suffixes and determine type before calling parse_float.
2171         Handle decimal and binary FP types the same way.
2172
2173         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2174         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2175         (parse_number): Update to new parse_float interface.
2176         Parse suffixes and determine type before calling parse_float.
2177
2178         * f-exp.y: Replace dval by typed_val_float.
2179         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2180         (parse_number): Use parse_float instead of atof.
2181
2182         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2183         (parse_go_float): Remove.
2184         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2185         (parse_number): Call parse_float instead of parse_go_float.
2186         Parse suffixes and determine type before calling parse_float.
2187
2188         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2189         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2190         (parse_number): Update to new parse_float interface.
2191         Parse suffixes and determine type before calling parse_float.
2192
2193         * m2-exp.y: Replace dval by byte buffer val.
2194         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2195         (parse_number): Call parse_float instead of atof.
2196
2197         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2198         (lex_number): Call parse_float instead of strtod.
2199         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2200         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2201         Use write_exp_elt_floatcst.
2202         (unit_testing): Remove static variable.
2203         (rust_type): Do not check unit_testing.
2204         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2205
2206         * ada-exp.y (type_float, type_double): Remove.
2207         (typed_val_float): Use byte buffer instead of DOUBLEST.
2208         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2209         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2210
2211 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2212
2213         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2214         * arch/aarch64.h: New file.
2215
2216 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2217
2218         * dfp.h (decimal_from_string): Use const reference for argument.
2219         * dfp.c (decimal_from_string): Likewise.
2220
2221 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2222
2223         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2224         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2225         * mips-tdep.c (mips_print_fp_register): Likewise.
2226
2227 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2228
2229         * common/format.h (enum argclass): Replace decfloat_arg by
2230         dec32float_arg, dec64float_arg, and dec128float_arg.
2231         * common/format.c (parse_format_string): Update to return
2232         new decimal float argument classes.
2233
2234         * printcmd.c (printf_decfloat): Rename to ...
2235         (printf_floating): ... this.  Add argclass argument, and use it
2236         instead of parsing the format string again.  Add support for
2237         binary floating-point values, using floatformat_to_string.
2238         Convert value to the target format if it doesn't already match.
2239         (ui_printf): Call printf_floating instead of printf_decfloat,
2240         also for double_arg / long_double_arg.  Pass argclass.
2241
2242         * dfp.c (decimal_to_string): Add format string argument.
2243         * dfp.h (decimal_to_string): Likewise.
2244
2245         * doublest.c (floatformat_to_string): Add format string argument.
2246         * doublest.h (floatformat_to_string): Likewise.
2247
2248 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2249
2250         * doublest.c (floatformat_precision): New routine.
2251         (floatformat_to_string): Likewise.
2252         * doublest.c (floatformat_to_string): Add prototype.
2253
2254         * printcmd.c (print_scalar_formatted): Only call print_floating
2255         on floating-point types.
2256         * valprint.c: Do not include "floatformat.h".
2257         (generic_val_print_decfloat): Remove.
2258         (generic_val_print): Call generic_val_print_float for both
2259         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2260         (print_floating): Use floatformat_to_string.  Handle decimal float.
2261         (print_decimal_floating): Remove, merge into floatformat_to_string.
2262         * value.h (print_decimal_floating): Remove.
2263
2264         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2265
2266 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2267
2268         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2269
2270 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2271
2272         * memattr.h: Don't include vec.h.
2273         (struct mem_attrib): Initialize fields.
2274         <unknown>: New static method.
2275         (struct mem_region): Add constructors, operator<, initialize
2276         fields.
2277         * memattr.c: Include algorithm.
2278         (default_mem_attrib, unknown_mem_attrib): Remove.
2279         (user_mem_region_list): New global.
2280         (target_mem_region_list, mem_region_list): Change type to
2281         std::vector<mem_region>.
2282         (mem_use_target): Now a function.
2283         (target_mem_regions_valid): Change type to bool.
2284         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2285         (require_user_regions): Adjust.
2286         (require_target_regions): Adjust.
2287         (create_mem_region): Adjust.
2288         (lookup_mem_region): Adjust.
2289         (invalidate_target_mem_regions): Adjust.
2290         (mem_clear): Rename to...
2291         (user_mem_clear): ... this, and adjust.
2292         (mem_command): Adjust.
2293         (info_mem_command): Adjust.
2294         (mem_enable, enable_mem_command, mem_disable,
2295         disable_mem_command): Adjust.
2296         (mem_delete): Adjust.
2297         (delete_mem_command): Adjust.
2298         * memory-map.h (parse_memory_map): Return an std::vector.
2299         * memory-map.c (parse_memory_map): Likewise.
2300         (struct memory_map_parsing_data): Add constructor.
2301         <memory_map>: Point to std::vector.
2302         (memory_map_start_memory): Adjust.
2303         (memory_map_end_memory): Adjust.
2304         (memory_map_end_property): Adjust.
2305         (clear_result): Remove.
2306         * remote.c (remote_memory_map): Return an std::vector.
2307         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2308         Remove.
2309         (target_debug_print_mem_region_vector): New.
2310         * target-delegates.c: Regenerate.
2311         * target.h (mem_region_vector): New typedef.
2312         (to_memory_map): Return mem_region_vector.
2313         (target_memory_map): Return an std::vector.
2314         * target.c (target_memory_map): Return an std::vector.
2315         (flash_erase_command): Adjust.
2316
2317 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2318
2319         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2320         Change type to std::string.
2321         (memory_map_start_property): Adjust.
2322         (memory_map_end_property): Adjust.
2323
2324 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2325
2326         * infrun.h: Include common/byte-vector.h.
2327         (struct displaced_step_closure): New struct.
2328         (struct buf_displaced_step_closure): New struct.
2329         * infrun.c (displaced_step_closure::~displaced_step_closure):
2330         Provide default implementation.
2331         (displaced_step_clear): Deallocate step closure with delete.
2332         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2333         (aarch64_displaced_step_closure): ... this, extend
2334         displaced_step_closure.
2335         (aarch64_displaced_step_data) <dsc>: Change type to
2336         aarch64_displaced_step_closure.
2337         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2338         unique_ptr.
2339         (aarch64_displaced_step_fixup): Add cast for displaced step
2340         closure.
2341         * amd64-tdep.c (displaced_step_closure): Rename to ...
2342         (amd64_displaced_step_closure): ... this, extend
2343         displaced_step_closure.
2344         <insn_buf>: Change type to std::vector<gdb_byte>.
2345         <max_len>: Remove.
2346         (fixup_riprel): Change type of DSC parameter, adjust to type
2347         change of insn_buf.
2348         (fixup_displaced_copy): Change type of DSC parameter.
2349         (amd64_displaced_step_copy_insn): Instantiate
2350         amd64_displaced_step_closure.
2351         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2352         to type change of insn_buf.
2353         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2354         parameter DSC.
2355         (arm_linux_copy_svc): Likewise.
2356         (cleanup_kernel_helper_return): Likewise.
2357         (arm_catch_kernel_helper_return): Likewise.
2358         (arm_linux_displaced_step_copy_insn): Instantiate
2359         arm_displaced_step_closure.
2360         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2361         (displaced_read_reg): Change type of parameter DSC.
2362         (branch_write_pc): Likewise.
2363         (load_write_pc): Likewise.
2364         (alu_write_pc): Likewise.
2365         (displaced_write_reg): Likewise.
2366         (arm_copy_unmodified): Likewise.
2367         (thumb_copy_unmodified_32bit): Likewise.
2368         (thumb_copy_unmodified_16bit): Likewise.
2369         (cleanup_preload): Likewise.
2370         (install_preload): Likewise.
2371         (arm_copy_preload): Likewise.
2372         (thumb2_copy_preload): Likewise.
2373         (install_preload_reg): Likewise.
2374         (arm_copy_preload_reg): Likewise.
2375         (cleanup_copro_load_store): Likewise.
2376         (install_copro_load_store): Likewise.
2377         (arm_copy_copro_load_store) Likewise.
2378         (thumb2_copy_copro_load_store): Likewise.
2379         (cleanup_branch): Likewise.
2380         (install_b_bl_blx): Likewise.
2381         (arm_copy_b_bl_blx): Likewise.
2382         (thumb2_copy_b_bl_blx): Likewise.
2383         (thumb_copy_b): Likewise.
2384         (install_bx_blx_reg): Likewise.
2385         (arm_copy_bx_blx_reg): Likewise.
2386         (thumb_copy_bx_blx_reg): Likewise.
2387         (cleanup_alu_imm): Likewise.
2388         (arm_copy_alu_imm): Likewise.
2389         (thumb2_copy_alu_imm): Likewise.
2390         (cleanup_alu_reg): Likewise.
2391         (install_alu_reg): Likewise.
2392         (arm_copy_alu_reg): Likewise.
2393         (thumb_copy_alu_reg): Likewise.
2394         (cleanup_alu_shifted_reg): Likewise.
2395         (install_alu_shifted_reg): Likewise.
2396         (arm_copy_alu_shifted_reg): Likewise.
2397         (cleanup_load): Likewise.
2398         (cleanup_store): Likewise.
2399         (arm_copy_extra_ld_st): Likewise.
2400         (install_load_store): Likewise.
2401         (thumb2_copy_load_literal): Likewise.
2402         (thumb2_copy_load_reg_imm): Likewise.
2403         (arm_copy_ldr_str_ldrb_strb): Likewise.
2404         (cleanup_block_load_all): Likewise.
2405         (cleanup_block_store_pc): Likewise.
2406         (cleanup_block_load_pc): Likewise.
2407         (arm_copy_block_xfer): Likewise.
2408         (thumb2_copy_block_xfer): Likewise.
2409         (cleanup_svc): Likewise.
2410         (install_svc): Likewise.
2411         (arm_copy_svc): Likewise.
2412         (thumb_copy_svc): Likewise.
2413         (arm_copy_undef): Likewise.
2414         (thumb_32bit_copy_undef): Likewise.
2415         (arm_copy_unpred): Likewise.
2416         (arm_decode_misc_memhint_neon): Likewise.
2417         (arm_decode_unconditional): Likewise.
2418         (arm_decode_miscellaneous): Likewise.
2419         (arm_decode_dp_misc): Likewise.
2420         (arm_decode_ld_st_word_ubyte): Likewise.
2421         (arm_decode_media): Likewise.
2422         (arm_decode_b_bl_ldmstm): Likewise.
2423         (arm_decode_ext_reg_ld_st): Likewise.
2424         (thumb2_decode_dp_shift_reg): Likewise.
2425         (thumb2_decode_ext_reg_ld_st): Likewise.
2426         (arm_decode_svc_copro): Likewise.
2427         (thumb2_decode_svc_copro): Likewise.
2428         (install_pc_relative): Likewise.
2429         (thumb_copy_pc_relative_16bit): Likewise.
2430         (thumb_decode_pc_relative_16bit): Likewise.
2431         (thumb_copy_pc_relative_32bit): Likewise.
2432         (thumb_copy_16bit_ldr_literal): Likewise.
2433         (thumb_copy_cbnz_cbz): Likewise.
2434         (thumb2_copy_table_branch): Likewise.
2435         (cleanup_pop_pc_16bit_all): Likewise.
2436         (thumb_copy_pop_pc_16bit): Likewise.
2437         (thumb_process_displaced_16bit_insn): Likewise.
2438         (decode_thumb_32bit_ld_mem_hints): Likewise.
2439         (thumb_process_displaced_32bit_insn): Likewise.
2440         (thumb_process_displaced_insn): Likewise.
2441         (arm_process_displaced_insn): Likewise.
2442         (arm_displaced_init_closure): Likewise.
2443         (arm_displaced_step_fixup): Add cast for closure.
2444         * arm-tdep.h: Include infrun.h.
2445         (displaced_step_closure): Rename to ...
2446         (arm_displaced_step_closure): ... this, extend
2447         displaced_step_closure.
2448         <u::svc::copy_svc_os>: Change type of parameter DSC.
2449         <cleanup>: Likewise.
2450         (arm_process_displaced_insn): Likewise.
2451         (arm_displaced_init_closure): Likewise.
2452         (displaced_read_reg): Likewise.
2453         (displaced_write_reg): Likewise.
2454         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2455         Adjust.
2456         * i386-tdep.h: Include infrun.h.
2457         (i386_displaced_step_closure): New typedef.
2458         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2459         i386_displaced_step_closure.
2460         (i386_displaced_step_fixup): Adjust.
2461         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2462         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2463         and unique_ptr.
2464         (ppc_displaced_step_fixup): Adjust.
2465         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2466         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2467         and unique_ptr.
2468         (s390_displaced_step_fixup): Adjust.
2469
2470 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2471
2472         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2473         Remove declarations.
2474
2475 2017-10-20  Tom Tromey  <tom@tromey.com>
2476
2477         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2478         std::vector.
2479         (gdb_bfd_record_inclusion): Update.
2480         (bfdp): Remove typedef.
2481
2482 2017-10-20  Tom Tromey  <tom@tromey.com>
2483
2484         * gdb_bfd.c (gdb_bfd_ref): Use new.
2485         (struct gdb_bfd_data): Add constructor, destructor, and member
2486         initializers.
2487         (gdb_bfd_unref): Use delete.
2488
2489 2017-10-20  Tom Tromey  <tom@tromey.com>
2490
2491         * exec.c (exec_file_attach): Use new_bfd_ref.
2492         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2493         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2494         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2495         new_bfd_ref.
2496         * gdb_bfd.h (new_bfd_ref): New function.
2497
2498 2017-10-20  Pedro Alves  <palves@redhat.com>
2499
2500         * main.c (captured_command_loop): Add attribute noinline.
2501
2502 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2503
2504         * interps.c (struct interp_factory): Add constructor.
2505         (interp_factory_p): Remove typedef.
2506         (DEF_VEC_P(interp_factory_p)): Remove.
2507         (interpreter_factories): Change type to std::vector.
2508         (interp_factory_register): Adjust.
2509         (interp_lookup): Adjust.
2510         (interpreter_completer): Adjust.
2511
2512 2017-10-19  Tom Tromey  <tom@tromey.com>
2513
2514         * break-catch-syscall.c (catch_syscall_completer): Use
2515         std::string, gdb::unique_xmalloc_ptr.
2516
2517 2017-10-19  Tom Tromey  <tom@tromey.com>
2518
2519         * infcall.c (call_function_by_hand_dummy): Use std::string.
2520
2521 2017-10-19  Tom Tromey  <tom@tromey.com>
2522
2523         * mi/mi-main.c (mi_cmd_execute): Update.
2524         * top.h (prepare_execute_command): Return scoped_value_mark.
2525         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2526         Add move constructor.
2527         * top.c (prepare_execute_command): Return scoped_value_mark.
2528         (execute_command): Update.
2529
2530 2017-10-19  Pedro Alves  <palves@redhat.com>
2531
2532         * xml-support.c (xml_fetch_content_from_file): Check fread's
2533         return.
2534
2535 2017-10-19  Pedro Alves  <palves@redhat.com>
2536
2537         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2538         async.
2539         (handle_error_fd): New function.
2540         (ser_base_async): Add/delete an event loop file handler for
2541         error_fd.
2542
2543 2017-10-19  Pedro Alves  <palves@redhat.com>
2544
2545         * xml-support.c (xml_fetch_content_from_file): Don't read in
2546         chunks.  Instead use fseek to determine the file's size, and read
2547         it in one go.
2548
2549 2017-11-18  Keith Seitz  <keiths@redhat.com>
2550
2551         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2552         types.
2553         Add whitespace to front of type name.
2554
2555 2017-10-18  Keith Seitz  <keiths@redhat.com>
2556
2557         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2558         DW_AT_accessibility.
2559
2560 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2561
2562         * features/tic6x-c62x-linux.c: Remove.
2563
2564 2017-10-17  Tom Tromey  <tom@tromey.com>
2565
2566         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2567         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2568         (do_mixed_source_and_assembly): Likewise.
2569
2570 2017-10-17  Tom Tromey  <tom@tromey.com>
2571
2572         * regcache.c (regcache::xfer_part): Remove assertion.
2573
2574 2017-10-17  Pedro Alves  <palves@redhat.com>
2575
2576         * xml-support.c (xml_fetch_content_from_file): Call
2577         unique_ptr::release() instead unique_ptr::get() when passing
2578         through xrealloc.
2579
2580 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2581
2582         * regcache.c (regcache::xfer_part): Remove parameters read and
2583         write, add parameter is_raw.  All callers are updated.
2584
2585 2017-10-16  Keith Seitz  <keiths@redhat.com>
2586
2587         * c-typeprint.c (enum access_specifier): Moved here from
2588         c_type_print_base.
2589         (output_access_specifier): New function.
2590         (c_type_print_base): Consider typedefs when assessing
2591         whether access labels are needed.
2592         Use output_access_specifier as needed.
2593         Output access specifier for typedefs, if needed.
2594         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2595         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2596         fields.
2597         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2598         accessor macros.
2599
2600 2017-10-16  Tom Tromey  <tom@tromey.com>
2601
2602         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2603         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2604         * target.c (target_fileio_read_stralloc): Update.
2605         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2606         * target.h (target_fileio_read_stralloc): Return
2607         unique_xmalloc_ptr.
2608
2609 2017-10-16  Tom Tromey  <tom@tromey.com>
2610
2611         * xml-syscall.c (xml_init_syscalls_info): Update.
2612         * xml-support.c (xinclude_start_include): Update.
2613         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2614         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2615         (xml_fetch_content_from_file): Likewise.
2616         * osdata.c (get_osdata): Update.
2617         * target.h (target_read_stralloc, target_get_osdata): Return
2618         unique_xmalloc_ptr.
2619         * solib-aix.c (solib_aix_get_library_list): Update.
2620         * solib-target.c (solib_target_current_sos): Update.
2621         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2622         * xml-tdesc.c (fetch_available_features_from_target): Update.
2623         (target_fetch_description_xml): Update.
2624         (file_read_description_xml): Update.
2625         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2626         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2627         (remote_pid_to_exec_file): Update.
2628         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2629         (target_get_osdata): Likewise.
2630
2631 2017-10-16  Tom Tromey  <tom@tromey.com>
2632
2633         * remote.c (remote_register_number_and_offset): Use std::vector.
2634         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2635         (putpkt_binary): Use gdb::def_vector.
2636         (compare_sections_command): Use gdb::byte_vector.
2637
2638 2017-10-16  Tom Tromey  <tom@tromey.com>
2639
2640         * ppc-linux-nat.c (hwdebug_insert_point): Use
2641         gdb::unique_xmalloc_ptr, XDUP.
2642
2643 2017-10-16  Tom Tromey  <tom@tromey.com>
2644
2645         * probe.c (parse_probes): Use std::string.
2646         (info_probes_for_ops, enable_probes_command)
2647         (disable_probes_command): Remove cleanups.
2648
2649 2017-10-16  Tom Tromey  <tom@tromey.com>
2650
2651         * buildsym.c (block_compar): Remove.
2652         (end_symtab_get_static_block): Use std::vector.
2653
2654 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2655
2656         * memrange.h (struct mem_range): Define operator< and operator==.
2657         (mem_range_s): Remove.
2658         (DEF_VEC_O (mem_range_s)): Remove.
2659         (normalize_mem_ranges): Change parameter type to std::vector.
2660         * memrange.c (compare_mem_ranges): Remove.
2661         (normalize_mem_ranges): Change parameter type to std::vector,
2662         adjust to vector change.
2663         * exec.c (section_table_available_memory): Return vector, remove
2664         parameter.
2665         (section_table_read_available_memory): Adjust to std::vector
2666         change.
2667         * remote.c (remote_read_bytes): Adjust to std::vector
2668         change.
2669         * tracepoint.h (traceframe_available_memory): Change parameter
2670         type to std::vector.
2671         * tracepoint.c (traceframe_available_memory): Change parameter
2672         type to std::vector, adjust.
2673         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2674         std::vector change.
2675         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2676         unittests/memrange-selftests.c.
2677         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2678         * gdb/unittests/memrange-selftests.c: New file.
2679
2680 2017-10-16  Pedro Alves  <palves@redhat.com>
2681
2682         * elfread.c (probe_key_free): Rename range-for variable.
2683         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2684         (find_probe_by_pc, collect_probes): Rename range-for variable.
2685
2686 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2687
2688         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2689         * features/tic6x-c62x.c: Remove.
2690         * features/tic6x-c64x-linux.c: Remove.
2691         * features/tic6x-c64x.c: Remove.
2692         * features/tic6x-c64xp-linux.c: Remove.
2693         * features/tic6x-c64xp.c: Remove.
2694         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2695         initialize_tdesc_tic6x_*_linux functions.
2696         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2697         initialize_tdesc_tic6x_* functions.
2698
2699 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2700
2701         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2702         tic6x-c62x.
2703         * regformats/tic6x-c62x.dat: Remove.
2704         * regformats/tic6x-c64x.dat: Remove.
2705         * regformats/tic6x-c64xp.dat: Remove.
2706
2707 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2708
2709         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2710         (the !HAVE_LIBEXPAT version).
2711
2712 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2713
2714         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2715         const.
2716
2717 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2718
2719         * target.h: Include tracepoint.h.
2720         (enum trace_find_type): Move to tracepoint.h.
2721         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2722         * tracepoint.h: Don't include target.h
2723         (enum trace_find_type): Move from target.h.
2724         (parse_traceframe_info): Return a unique ptr.
2725         * tracepoint.c (current_traceframe_info): Change type to unique
2726         ptr.
2727         (free_traceframe_info): Remove.
2728         (clear_traceframe_info): Don't manually free
2729         current_traceframe_info.
2730         (free_result): Remove.
2731         (parse_traceframe_info): Return a unique ptr.
2732         (get_traceframe_info): Adjust to unique ptr.
2733         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2734         * remote.c (remote_traceframe_info): Return a unique ptr.
2735         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2736         ptr.
2737         * target-debug.h (target_debug_print_traceframe_info_up): New
2738         macro.
2739         * target-delegates.c: Regenerate.
2740
2741 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2742
2743         * memrange.h (struct mem_range): Add constructors.
2744         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2745         std::vector<mem_range>.
2746         * tracepoint.c (free_traceframe_info): Don't manually free
2747         vector.
2748         (traceframe_info_start_memory): Adjust to vector change.
2749         (traceframe_available_memory): Likewise.
2750         * tracefile-tfile.c (build_traceframe_info): Likewise.
2751         * ctf.c (ctf_traceframe_info): Likewise.
2752
2753 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2754
2755         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2756         std::vector<int>.
2757         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2758         (traceframe_info_start_tvar): Adjust to vector change.
2759         (parse_traceframe_info): Allocate with new.
2760         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2761         vector change.
2762         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2763         change.
2764         tfile_traceframe_info): Allocate with new.
2765         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2766         change.
2767
2768 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2769
2770         * tracepoint.c (traceframe_info): Rename to...
2771         (current_traceframe_info): ...this.
2772         (clear_traceframe_info): Adjust.
2773         (get_traceframe_info): Adjust.
2774
2775 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2776
2777         * nat/linux-osdata.c: Include algorithm.
2778         (compare_processes): Remove.
2779         (struct pid_pgid_entry): New struct.
2780         (linux_xfer_osdata_processgroups): Use std::vector instead of
2781         XNEWVEC.
2782
2783 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2784
2785         * objfiles.h: Don't include symfile.h.
2786         (struct partial_symbol): Remove forward-declaration.
2787         (struct objfile) <global_psymbols, static_psymbols>: Change type
2788         to std::vector<partial_symbol *>.
2789         * objfiles.c (objfile::objfile): Don't memset those fields.
2790         (objfile::~objfile): Don't free those fields.
2791         * psympriv.h (struct psymbol_allocation_list): Remove
2792         forward-declaration.
2793         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2794         to std::vector.
2795         (start_psymtab_common): Change parameters to std::vector.
2796         * psymtab.c: Include algorithm.
2797         (require_partial_symbols): Call shrink_to_fit.
2798         (find_pc_sect_psymbol): Adjust to vector change.
2799         (match_partial_symbol): Likewise.
2800         (lookup_partial_symbol): Likewise.
2801         (psym_relocate): Likewise.
2802         (dump_psymtab): Likewise.
2803         (recursively_search_psymtabs): Likewise.
2804         (compare_psymbols): Remove.
2805         (sort_pst_symbols): Adjust to vector change.
2806         (start_psymtab_common): Likewise.
2807         (end_psymtab_common): Likewise.
2808         (psymbol_bcache_full): De-constify return value.
2809         (add_psymbol_to_bcache): Likewise.
2810         (extend_psymbol_list): Remove.
2811         (append_psymbol_to_list): Adjust to vector change.
2812         (add_psymbol_to_list): Likewise.
2813         (init_psymbol_list): Likewise.
2814         (maintenance_info_psymtabs): Likewise.
2815         (maintenance_check_psymtabs): Likewise.
2816         * symfile.h (struct psymbol_allocation_list): Remove.
2817         * symfile.c (reread_symbols): Adjust to vector change.
2818         * dbxread.c (start_psymtab): Change type of parameters.
2819         (dbx_symfile_read): Adjust to vector change.
2820         (read_dbx_symtab): Likewise.
2821         (start_psymtab): Change type of parameters.
2822         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2823         (create_partial_symtab): Likewise.
2824         (add_partial_symbol): Likewise.
2825         (write_one_signatured_type): Likewise.
2826         (recursively_write_psymbols): Likewise.
2827         * mdebugread.c (parse_partial_symbols): Likewise.
2828         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2829         (scan_xcoff_symtab): Adjust to vector change.
2830         (xcoff_initial_scan): Likewise.
2831
2832 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2833
2834         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2835
2836 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2837
2838         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2839         Remove s390x-*-expedite, add s390x-expedite.
2840
2841 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2842
2843         * features/s390-gs-linux64.c: Regenerated.
2844         * features/s390x-gs-linux64.c: Regenerated.
2845
2846 2017-10-13  Tom Tromey  <tom@tromey.com>
2847
2848         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2849         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2850         delete.
2851         * symfile.c (symbol_file_add_with_addrs): Use new.
2852         (symbol_file_add_separate): Update comment.
2853         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2854         * jit.c (jit_object_close_impl): Use new.
2855         (jit_unregister_code): Use delete.
2856         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2857         (~objfile): Rename from free_objfile.
2858         (free_objfile_separate_debug, do_free_objfile_cleanup)
2859         (free_all_objfiles, objfile_purge_solibs): Use delete.
2860         * objfiles.h (struct objfile): Add constructor and destructor.
2861         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2862         (allocate_objfile, free_objfile): Don't declare.
2863         (struct objstats): Add initializers.
2864
2865 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2866
2867         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2868         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2869         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2870         * gdbarch.h: Regenerate.
2871         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2872         Adjust comment.
2873         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2874         (i386_displaced_step_fixup): Adjust comment.
2875         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2876
2877 2017-10-12  Tom Tromey  <tom@tromey.com>
2878
2879         * prologue-value.h (pv_area::store_would_trash): Return bool.
2880         (pv_area::find_reg): Likewise.
2881         * prologue-value.c (pv_area::store_would_trash): Return bool.
2882         (pv_area::find_reg): Likewise.
2883
2884 2017-10-12  Tom Tromey  <tom@tromey.com>
2885
2886         * s390-linux-tdep.c (s390_store, s390_load)
2887         (s390_check_for_saved, s390_analyze_prologue): Update.
2888         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2889         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2890         * prologue-value.h (class pv_area): Move from prologue-value.c.
2891         Change names of members.  Add constructor, destructor, member
2892         functions.
2893         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2894         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2895         (pv_area_fetch, pv_area_scan): Don't declare.
2896         * prologue-value.c (struct pv_area::area_entry): Now member of
2897         pv_area.
2898         (struct pv_area): Move to prologue-value.h.
2899         (pv_area::pv_area): Rename from make_pv_area.
2900         (pv_area::~pv_area): Rename from free_pv_area.
2901         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2902         (clear_entries, find_entry, overlaps, store_would_trash, store)
2903         (fetch, find_reg, scan): Now member of pv_area.
2904         Remove "area" argument.  Update.
2905         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2906         Update.
2907         * mn10300-tdep.c (push_reg, check_for_saved)
2908         (mn10300_analyze_prologue): Update.
2909         * mep-tdep.c (is_arg_spill, check_for_saved)
2910         (mep_analyze_prologue): Update.
2911         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2912         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2913         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2914         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2915         Update.
2916         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2917         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2918
2919 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2920
2921         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2922         * linux-nat.c (linux_nat_delete_thread): New variable.
2923         (lwp_free): Invoke linux_nat_delete_thread if set.
2924         (linux_nat_set_delete_thread): New function.
2925         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2926         thread delete callback.
2927         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2928         (_initialize_arm_linux_nat): Assign thread delete callback.
2929         * s390-linux-nat.c (s390_delete_thread): New function.
2930         (_initialize_s390_nat): Assign thread delete callback.
2931         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2932         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2933         function.
2934         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2935         declaration.
2936         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2937         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2938
2939 2017-10-09  Tom Tromey  <tom@tromey.com>
2940
2941         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2942         std::string.
2943         * tui/tui-layout.c (enum tui_status): Use std::string.
2944
2945 2017-10-11  Tom Tromey  <tom@tromey.com>
2946
2947         * gdbthread.h (thread_command): Constify.
2948         * inferior.h (detach_command): Constify.
2949         * top.h (set_history, show_history): Constify.
2950         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2951         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2952         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2953         * printcmd.c (set_command): Constify.
2954         (non_const_set_command): New function.
2955         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2956         * breakpoint.c (enable_command, disable_command, delete_command)
2957         (catch_command, tcatch_command, set_breakpoint_cmd)
2958         (show_breakpoint_cmd): Constify.
2959         * macrocmd.c (macro_command): Constify.
2960         * infcmd.c (unset_command, kill_command, detach_command)
2961         (info_proc_cmd): Constify.
2962         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2963         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2964         (info_auto_load_cmd): Constify.
2965         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2966         (unset_tdesc_cmd): Constify.
2967         * ada-lang.c (set_ada_command, show_ada_command)
2968         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2969         * guile/guile.c (set_guile_command, show_guile_command)
2970         (info_guile_command): Constify.
2971         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2972         Constify.
2973         * skip.c (skip_command): Constify.
2974         * compile/compile.c (_initialize_compile): Constify.
2975         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2976         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2977         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2978         (maint_btrace_pt_show_cmd): Constify.
2979         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2980         Constify.
2981         * python/python.c (user_show_python, user_set_python): Constify.
2982         * mips-tdep.c (set_mips_command, show_mips_command)
2983         (set_mipsfpu_command): Constify.
2984         * record-btrace.c (cmd_record_btrace_start)
2985         (cmd_set_record_btrace, cmd_show_record_btrace)
2986         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2987         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2988         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2989         Constify.
2990         * symfile.c (overlay_command): Constify.
2991         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2992         * cli/cli-logging.c (set_logging_command, show_logging_command):
2993         Constify.
2994         * cli/cli-dump.c (dump_command, append_command)
2995         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2996         (tekhex_dump_command, binary_dump_command)
2997         (binary_append_command): Constify.
2998         * cli/cli-decode.c (struct cmd_list_element): Change type of
2999         "fun".
3000         * cli/cli-cmds.c (info_command, show_command, set_debug)
3001         (show_debug): Constify.
3002         (show_command): Add non-const overload.
3003         * top.c (set_history, show_history): Constify.
3004         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3005         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3006         * target.c (target_command): Constify.
3007         * sparc64-tdep.c (info_adi_command): Constify.
3008         * record-full.c (cmd_record_full_start): Constify.
3009         (set_record_full_command): Constify.  Fix typo.
3010         (show_record_full_command): Constify.
3011         * thread.c (thread_command, thread_apply_command): Constify.
3012         * memattr.c (dummy_cmd): Constify.
3013         * value.c (function_command): Constify.
3014         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3015         * probe.c (info_probes_command): Constify.
3016         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3017         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3018         (show_thread_cmd, set_thread_default_cmd)
3019         (show_thread_default_cmd): Constify.
3020         (check_empty): Constify.
3021         * tracepoint.c (tfind_command): Constify.
3022         * cp-support.c (maint_cplus_command): Constify.
3023         * windows-tdep.c (info_w32_command): Constify.
3024         * record.c (cmd_record_start, set_record_command)
3025         (show_record_command, info_record_command, cmd_record_goto):
3026         Constify.
3027         * ravenscar-thread.c (set_ravenscar_command)
3028         (show_ravenscar_command): Constify.
3029         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3030         Constify.
3031         (add_internal_problem_command): Remove casts.
3032         * arc-tdep.c (maintenance_print_arc_command): Constify.
3033         * valprint.c (set_print, show_print, set_print_raw)
3034         (show_print_raw): Constify.
3035         * maint.c (maintenance_command, maintenance_info_command)
3036         (maintenance_print_command, maintenance_set_cmd)
3037         (maintenance_show_cmd, set_per_command_cmd)
3038         (show_per_command_cmd, maintenance_check_command): Constify.
3039         * language.c (set_check, show_check): Constify.
3040         * typeprint.c (show_print_type, set_print_type): Constify.
3041         * go32-nat.c (go32_info_dos_command): Constify.
3042
3043 2017-10-11  Tom Tromey  <tom@tromey.com>
3044
3045         * breakpoint.c (prepare_re_set_context): Remove.
3046         (breakpoint_re_set_one): Update.  Don't use cleanups.
3047         (breakpoint_re_set): Use scoped_restore, std::string, and
3048         scoped_restore_current_language.
3049
3050 2017-10-11  Tom Tromey  <tom@tromey.com>
3051
3052         * breakpoint.c (commands_command_1): Use std::string.
3053         (cleanup_executing_breakpoints): Remove.
3054         (bpstat_do_actions_1): Use scoped_restore.
3055         (bpstat_check_watchpoint): Use std::string.
3056         (decode_static_tracepoint_spec): Likewise.
3057         (break_range_command): Likewise.
3058         (watch_command_1): Likewise.
3059         (compare_breakpoints): Change argument types.
3060         (clear_command): Use std::vector.
3061         (cleanup_executing_breakpoints): Remove.
3062         (update_global_location_list): Use unique_xmalloc_ptr.
3063         (strace_command): Remove unused declaration.
3064
3065 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3066
3067         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3068         * NEWS: Mention new FreeBSD/arm native configuration.
3069         * configure.host: Add arm*-*-freebsd*.
3070         * configure.nat: Likewise.
3071         * arm-fbsd-nat.c: New file.
3072
3073 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3074
3075         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3076         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3077         * NEWS: Mention new FreeBSD/arm target.
3078         * configure.tgt: Add arm*-*-freebsd*.
3079         * arm-fbsd-tdep.c: New file.
3080         * arm-fbsd-tdep.h: New file.
3081
3082 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3083
3084         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3085         `gdbarch_elfcore_write_linux_prpsinfo'.
3086         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3087         method.
3088         (elf_internal_linux_prpsinfo): Remove declaration.
3089         * gdbarch.h: Regenerate.
3090         * gdbarch.c: Regenerate.
3091
3092 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3093
3094         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3095         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3096
3097 2017-10-11  Pedro Alves  <palves@redhat.com>
3098
3099         * breakpoint.c (reattach_breakpoints): Delete.
3100         * breakpoint.h (reattach_breakpoints): Delete.
3101
3102 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3103
3104         * symfile.c (registered_sym_fns): Make struct, not typedef.
3105         (DEF_VEC_O (registered_sym_fns)): Remove.
3106         (symtab_fns): Change type to std::vector.
3107         (add_symtab_fns): Adjust.
3108         (find_sym_fns): Adjust.
3109
3110 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3111
3112         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3113         * arc-tdep.h (arc_arch_is_em): New function.
3114         (arc_arch_is_hs): Likewise.
3115
3116 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3117
3118         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3119         parentheses in the declaration.
3120         (macro_lookup_inclusion): Likewise.
3121         (macro_lookup_definition): Likewise.
3122         * p-lang.h (pascal_builtin_types): Likewise.
3123         * tui/tui-data.c (tui_win_list): Likewise.
3124         * tui/tui-data.h (tui_win_list): Likewise.
3125         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3126
3127 2017-10-11  Mark Rages  <markrages@gmail.com>
3128
3129         * target-memory.c (block_boundaries): Fix for block address not
3130         aligned on block size.
3131
3132 2017-10-10  Pedro Alves <palves@redhat.com>
3133             Tom Tromey  <tom@tromey.com>
3134
3135         * breakpoint.c (struct captured_breakpoint_query_args)
3136         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3137         (print_breakpoint): New.
3138         * breakpoint.h (print_breakpoint): Declare.
3139         * common/common-exceptions.h (enum return_reason): Remove
3140         references to catch_exceptions.
3141         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3142         Delete.
3143         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3144         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3145         * gdb.h: Delete.
3146         * gdbthread.h (thread_select): Declare.
3147         * mi/mi-cmd-break.c: Don't include gdb.h.
3148         (breakpoint_notify): Use print_breakpoint.
3149         * mi/mi-cmd-catch.c: Don't include gdb.h.
3150         * mi/mi-interp.c: Don't include gdb.h.
3151         (mi_print_breakpoint_for_event): New.
3152         (mi_breakpoint_created, mi_breakpoint_modified): Use
3153         mi_print_breakpoint_for_event.
3154         * mi/mi-main.c: Don't include gdb.h.
3155         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3156         thread_select instead of gdb_thread_select.
3157         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3158         of using gdb_list_thread_ids.
3159         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3160         FILEIO_ENOSYS here.
3161         (remote_fileio_request): Use TRY/CATCH instead of
3162         catch_exceptions.
3163         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3164         (symbol_file_add_from_memory_wrapper): Delete.
3165         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3166         * thread.c: Don't include gdb.h.
3167         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3168         (thread_alive): Use thread_select.
3169         (do_captured_thread_select): Delete, parts salvaged as ...
3170         (thread_select): ... this new function.
3171         (gdb_thread_select): Delete.
3172
3173 2017-10-10  Pedro Alves  <palves@redhat.com>
3174             Tom Tromey  <tom@tromey.com>
3175
3176         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3177         and reverse logic.
3178         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3179         No longer macros.  Instead ...
3180         (enum wp_check_result): They're now values of this new
3181         enumeration.
3182         (watchpoint_check): Change return type to wp_check_result and
3183         parameter type to bpstat.
3184         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3185         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3186         catch_errors.  Reverse logic of watchpoint_check call.
3187         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3188         pointer as parameter.
3189         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3190         * common/common-exceptions.c (throw_exception_sjlj): Update
3191         comments to avoid mentioning catch_errors.
3192         * exceptions.c (catch_errors): Delete.
3193         * exceptions.h: Update comments to avoid mentioning catch_errors.
3194         (catch_errors_ftype, catch_errors): Delete.
3195         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3196         (hook_stop_stub): Delete.
3197         (restore_selected_frame): Change return type to void, and
3198         parameter type to const frame_id &.
3199         (restore_infcall_control_state): Use TRY/CATCH instead of
3200         catch_errors.
3201         * main.c (captured_command_loop): Return void and remove
3202         parameter.  Remove references to catch_errors.
3203         (captured_main): Use TRY/CATCH instead of catch_errors.
3204         * objc-lang.c (objc_submethod_helper_data)
3205         (find_objc_msgcall_submethod_helper): Delete.
3206         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3207         catch_errors.
3208         * record-full.c (record_full_message): Return void.
3209         (record_full_message_args, record_full_message_wrapper): Delete.
3210         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3211         instead of catch_errors.
3212         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3213         parameter type to int.
3214         * solib-darwin.c (open_symbol_file_object): Ditto.
3215         * solib-dsbt.c (open_symbol_file_object): Ditto.
3216         * solib-frv.c (open_symbol_file_object): Ditto.
3217         * solib-svr4.c (open_symbol_file_object): Ditto.
3218         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3219         * solib.c (update_solib_list): Use TRY/CATCH instead of
3220         catch_errors.
3221         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3222         Change type.
3223         * symmisc.c (struct print_symbol_args): Remove.
3224         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3225         (print_symbol): Change type.
3226         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3227         and remove parameters.
3228         (catch_errors): New.
3229         (get_windows_debug_event): Adjust.
3230
3231 2017-10-09  Tom Tromey  <tom@tromey.com>
3232
3233         * mi/mi-main.c (free_splay_tree): Remove.
3234         (list_available_thread_groups): Use splay_tree_up.
3235         * common/gdb_splay_tree.h: New file.
3236
3237 2017-10-09  Tom Tromey  <tom@tromey.com>
3238
3239         * mi/mi-main.c (do_nothing): Remove.
3240         (list_available_thread_groups): Update.
3241
3242 2017-10-09  Pedro Alves  <palves@redhat.com>
3243
3244         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3245         reading registers when switching context.
3246
3247 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3248
3249         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3250         (fbsd_convert_siginfo): Likewise.
3251         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3252
3253 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3254
3255         * configure.ac (try_guile_versions): Remove guile-2.2.
3256         * configure: Regenerate.
3257
3258 2017-10-09  Tom Tromey  <tom@tromey.com>
3259
3260         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3261         (COMPILE.pre): Use $(CXX).
3262
3263 2017-10-09  Pedro Alves  <palves@redhat.com>
3264
3265         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3266         Use bool.
3267         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3268         * cp-support.h (cp_remove_params): Now returns a
3269         gdb::unique_xmalloc_ptr.
3270         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3271         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3272         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3273         returning a gdb::unique_xmalloc_ptr.
3274         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3275         * stack.c (find_frame_funname): Adjust to cp_remove_params
3276         returning a gdb::unique_xmalloc_ptr.
3277
3278 2017-10-08  Tom Tromey  <tom@tromey.com>
3279
3280         * dwarf2read.c (dwarf2_get_dwz_file): Use
3281         gdb::unique_xmalloc_ptr.
3282         (find_slot_in_mapped_hash): Likewise.
3283         (dwarf2_physname): Likewise.
3284         (create_dwo_unit_in_dwp_v1): Use std::string.
3285         (create_dwo_unit_in_dwp_v2): Likewise.
3286         (lookup_dwo_cutu): Likewise.
3287         (inherit_abstract_dies): Use std::vector.
3288         (read_array_type): Likewise.
3289         (dwarf_decode_macros): Remove unused declaration.
3290         (unsigned_int_compar): Remove.
3291         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3292         (psymtabs_addrmap_cleanup): Remove.
3293
3294 2017-10-08  Tom Tromey  <tom@tromey.com>
3295
3296         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3297         * frame.h (frame_cleanup_after_sniffer): Declare.
3298         (frame_prepare_for_sniffer): Return void.
3299         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3300         type of argument.
3301         (frame_prepare_for_sniffer): Return void.
3302
3303 2017-10-08  Tom Tromey  <tom@tromey.com>
3304
3305         * utils.h (make_cleanup_value_free): Remove.
3306         * utils.c (do_value_free, struct cleanup): Remove.
3307         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3308         Use gdb_value_up.
3309         * value.h (struct value_deleter): New.
3310         (gdb_value_up): New typedef.
3311
3312 2017-10-08  Tom Tromey  <tom@tromey.com>
3313
3314         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3315         (make_cleanup_free_search_symbols): Remove.
3316         (search_symbols): Return std::vector.
3317         (symbol_search::compare_search_syms): Now member of
3318         symbol_search.  Change arguments.
3319         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3320         (symtab_symbol_info, rbreak_command): Update.
3321         * symtab.h (struct symbol_search) <next>: Remove.
3322         Add constructors.
3323         (symbol_search::operator<): New function.
3324         (symbol_search::operator==): New function.
3325         (search_symbols): Remove std::vector.
3326         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3327         (symbol_search::compare_search_syms): Declare.
3328
3329 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3330
3331         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3332         arch/aarch64-insn.o.
3333         Remove one rule.
3334         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3335
3336 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3337
3338         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3339         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3340         arch/arm-linux.o respectively.
3341         * configure.tgt: Likewise.
3342
3343 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3344
3345         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3346         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3347
3348 2017-10-06  Pedro Alves  <palves@redhat.com>
3349
3350         * windows-nat.c: Include <algorithm>.
3351
3352 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3353
3354         * configure.tgt (i386_tobjs): New variable.
3355         (amd64_tobjs): New variable.
3356         Set $cpu_obs and $os_obs.
3357
3358 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3359
3360         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3361         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3362         (clean): Remove object files and dependency files.
3363         (distclean): Remove the directory.
3364         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3365         * configure: Re-generated.
3366         * configure.tgt: Replace amd64.o with arch/amd64.o.
3367
3368 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3369
3370         PR build/22188
3371         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3372         and SETEND.
3373
3374 2017-10-05  Pedro Alves  <palves@redhat.com>
3375
3376         * linux-nat.c (linux_child_follow_fork): When following the parent
3377         and detaching the child, consult the parent thread's architecture
3378         instead of the child's.
3379
3380 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3381
3382         * ax.h: Do not include "doublest.h".
3383         (union agent_val): Remove.
3384
3385 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3386
3387         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3388         (decimal_to_string): Return std::string object.
3389         (decimal_from_string): Accept std::string object.  Return bool.
3390         (decimal_from_integral, decimal_from_doublest): Remove.
3391         (decimal_from_longest): Add prototype.
3392         (decimal_from_ulongest): Likewise.
3393         (decimal_to_longest): Likewise.
3394         (decimal_from_doublest): Likewise.
3395         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3396         (MAX_DECIMAL_STRING): Move here.
3397         (decimal_to_string): Return std::string object.
3398         (decimal_from_string): Accept std::string object.  Return bool.
3399         (decimal_from_integral): Remove, replace by ...
3400         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3401         (decimal_to_longest): New function.
3402         (decimal_from_floating): Remove, replace by ...
3403         (decimal_from_doublest): ... this new function.
3404         (decimal_to_doublest): Update to new decimal_to_string interface.
3405
3406         * value.c (unpack_long): Use decimal_to_longest.
3407         * valops.c (value_cast): Use decimal_from_doublest instead of
3408         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3409         decimal_from_integral.
3410         * valarith.c (value_args_as_decimal): Likewise.
3411         * valprint.c (print_decimal_floating): Update to new
3412         decimal_to_string interface.
3413         * printcmd.c (printf_decfloat): Likewise.
3414         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3415
3416 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3417
3418         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3419         * gdbtypes.c: Include "floatformat.h".
3420         * value.c: Likewise.
3421         * m68k-tdep.c: Likewise.
3422
3423         * findvar.c: Do not include "floatformat.h".
3424         * amd64-darwin-tdep.c: Likewise.
3425         * arm-linux-tdep.c: Likewise.
3426         * i386-darwin-tdep.c: Likewise.
3427         * i387-tdep.c: Likewise.
3428         * m68k-linux-tdep.c: Likewise.
3429         * mep-tdep.c: Likewise.
3430         * mips-tdep.c: Likewise.
3431         * nios2-tdep.c: Likewise.
3432         * s390-linux-tdep.c: Likewise.
3433         * sparc-obsd-tdep.c: Likewise.
3434         * sparc-tdep.c: Likewise.
3435         * sparc64-tdep.c: Likewise.
3436         * spu-tdep.c: Likewise.
3437         * tic6x-tdep.c: Likewise.
3438         * tilegx-tdep.c: Likewise.
3439         * vax-tdep.c: Likewise.
3440         * xstormy16-tdep.c: Likewise.
3441         * xtensa-tdep.c: Likewise.
3442
3443         * top.c: Do not include "doublest.h".
3444         * aarch64-tdep.c: Likewise.
3445         * alpha-tdep.c: Likewise.
3446         * arm-linux-tdep.c: Likewise.
3447         * m68k-linux-tdep.c: Likewise.
3448         * tilegx-tdep.c: Likewise.
3449         * xstormy16-tdep.c: Likewise.
3450
3451 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3452
3453         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3454         (mipsn32_fbsd_sigframe): Define.
3455         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3456         for FreeBSD/mipsn32.
3457
3458 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3459
3460         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3461         AT_HWCAP.
3462
3463 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3464
3465         * MAINTAINERS (Misc): Update my email address.
3466
3467 2017-10-04  Pedro Alves  <palves@redhat.com>
3468
3469         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3470         it instead of target_gdbarch.
3471         (get_remote_state, get_remote_packet_size): Adjust
3472         get_remote_arch_state calls, passing down target_gdbarch
3473         explicitly.
3474         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3475         'gdbarch' and use it instead of target_gdbarch.
3476         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3477         passing down target_gdbarch explicitly.
3478         (struct stop_reply) <arch>: New field.
3479         (remote_parse_stop_reply): Use the stopped thread's architecture,
3480         not the current inferior's.  Save the architecture in the
3481         stop_reply.
3482         (process_stop_reply): Use the stop reply's architecture.
3483         (process_g_packet, remote_fetch_registers)
3484         (remote_prepare_to_store, store_registers_using_G)
3485         (remote_store_registers): Adjust get_remote_arch_state calls,
3486         using the regcache's architecture.
3487         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3488         passing down target_gdbarch explicitly.
3489         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3490         beneath instead of calling target_gdbarch.
3491         * target.c (default_thread_architecture): Use the specified
3492         inferior's architecture, instead of the current inferior's
3493         architecture (via target_gdbarch).
3494
3495 2017-10-04  Pedro Alves  <palves@redhat.com>
3496
3497         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3498         case.
3499         (regcache_print): Handle !target_has_registers here instead.
3500
3501 2017-10-04  Pedro Alves  <palves@redhat.com>
3502
3503         * frame.c (create_test_frame): Delete.
3504         * frame.h (create_test_frame): Delete.
3505         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3506         (class regcache_test): Delete.
3507         (test_target_has_registers, test_target_has_stack)
3508         (test_target_has_memory, test_target_prepare_to_store)
3509         (test_target_store_registers): New functions.
3510         (test_target_ops): New class.
3511         (register_to_value_test): Error out if there's already a
3512         process_stratum (or higher) target pushed.  Create a fuller mock
3513         environment, with mock target_ops, inferior, address space, thread
3514         and inferior_ptid.
3515         * progspace.c (struct address_space): Move to ...
3516         * progspace.h (struct address_space): ... here.
3517         * regcache.h (regcache::~regcache, regcache::raw_write)
3518         [GDB_SELF_TEST]: No longer virtual.
3519
3520 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3521
3522         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3523
3524 2017-10-04  Pedro Alves  <palves@redhat.com>
3525
3526         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3527         out of 'between TRY and CATCH'.
3528
3529 2017-10-04  Pedro Alves  <palves@redhat.com>
3530
3531         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3532         * common/common-exceptions.h (TRY): Open an outermost scope.
3533         Expand intro comment.
3534         (CATCH): Reindent.
3535         (END_CATCH): Close the outermost scope.
3536         * completer.c (complete_line_internal): Add missing END_CATCH.
3537
3538 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3539
3540         * NEWS (Changes since GDB 8.0): Add entry about new
3541         'set-cwd-on-gdbserver' feature.
3542         (New remote packets): Add entry for QSetWorkingDir.
3543         * common/common-inferior.h (set_inferior_cwd): New prototype.
3544         * infcmd.c (set_inferior_cwd): Remove "static".
3545         (show_cwd_command): Expand text to include remote debugging.
3546         * remote.c: Add PACKET_QSetWorkingDir.
3547         (remote_protocol_features) <QSetWorkingDir>: New entry for
3548         PACKET_QSetWorkingDir.
3549         (extended_remote_set_inferior_cwd): New function.
3550         (extended_remote_create_inferior): Call
3551         "extended_remote_set_inferior_cwd".
3552         (_initialize_remote): Call "add_packet_config_cmd" for
3553         QSetWorkingDir.
3554
3555 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3556
3557         * NEWS (New commands): Mention "set/show cwd".
3558         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3559         "cd" command's help text.
3560         * common/common-inferior.h (get_inferior_cwd): New prototype.
3561         * infcmd.c (inferior_cwd_scratch): New global variable.
3562         (set_inferior_cwd): New function.
3563         (get_inferior_cwd): Likewise.
3564         (set_cwd_command): Likewise.
3565         (show_cwd_command): Likewise.
3566         (_initialize_infcmd): Add "set/show cwd" commands.
3567         * inferior.h (class inferior) <cwd>: New field.
3568         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3569         (fork_inferior): Change inferior's cwd before its execution.
3570         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3571         to CreateProcess.
3572
3573 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3574
3575         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3576         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3577         (COMMON_OBS): Add gdb_tilde_expand.o.
3578         * common/gdb_tilde_expand.c: New file.
3579         * common/gdb_tilde_expand.h: Likewise.
3580
3581 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3582
3583         * gdbarch.sh (objfile): Remove duplicate declaration.
3584         * gdbarch.h: Regenerate.
3585
3586 2017-10-03  Tom Tromey  <tom@tromey.com>
3587
3588         * utils.c (internal_vproblem): Use string_vprintf.
3589
3590 2017-10-03  Tom Tromey  <tom@tromey.com>
3591
3592         * printcmd.c (info_symbol_command): Use std::string.
3593
3594 2017-10-03  Tom Tromey  <tom@tromey.com>
3595
3596         * top.c (gdb_safe_append_history): Use std::string.
3597
3598 2017-10-03  Tom Tromey  <tom@tromey.com>
3599
3600         * event-top.c (stdin_event_handler): Update.
3601         * main.c (captured_main_1): Update.
3602         * top.h (make_delete_ui_cleanup): Remove.
3603         (struct ui): Add constructor and destructor.
3604         (new_ui, delete_ui): Remove.
3605         * top.c (make_delete_ui_cleanup): Remove.
3606         (new_ui_command): Use std::unique_ptr.
3607         (delete_ui_cleanup): Remove.
3608         (ui::ui): Rename from new_ui.  Update.
3609         (free_ui): Remove.
3610         (ui::~ui): Rename from delete_ui.  Update.
3611
3612 2017-10-03  Tom Tromey  <tom@tromey.com>
3613
3614         * symfile.c (load_progress): Use gdb::byte_vector.
3615
3616 2017-10-03  Tom Tromey  <tom@tromey.com>
3617
3618         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3619         declaration.
3620         * printcmd.c (x_command): Remove unused declaration.
3621         * symfile.c (symbol_file_command): Remove unused declaration.
3622
3623 2017-10-03  Tom Tromey  <tom@tromey.com>
3624
3625         * utils.c (internal_vproblem): Use std::string.
3626         (defaulted_query): Likewise.
3627
3628 2017-10-03  Tom Tromey  <tom@tromey.com>
3629
3630         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3631         * top.c (execute_command_to_string): Update.
3632         * utils.c (make_cleanup_restore_page_info): Remove.
3633         (do_restore_page_info_cleanup): Remove.
3634         (set_batch_flag_and_restore_page_info):
3635         New.
3636         (make_cleanup_restore_page_info): Remove.
3637         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3638         (~set_batch_flag_and_restore_page_info): New
3639         (make_cleanup_restore_uinteger): Remove.
3640         (make_cleanup_restore_integer): Remove.
3641         (struct restore_integer_closure): Remove.
3642         (restore_integer): Remove.
3643         * utils.h (struct set_batch_flag_and_restore_page_info): New
3644         class.
3645         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3646         (make_cleanup_restore_page_info): Remove.
3647         (make_cleanup_restore_uinteger) Remove.
3648         (make_cleanup_restore_integer) Remove.
3649
3650 2017-10-03  Tom Tromey  <tom@tromey.com>
3651
3652         * record-full.h (record_full_gdb_operation_disable_set): Return
3653         scoped_restore_tmpl<int>.
3654         * infrun.c (adjust_pc_after_break): Update.
3655         (handle_signal_stop): Update.
3656         * record-full.c (record_full_gdb_operation_disable_set): Return
3657         scoped_restore_tmpl<int>.
3658         (record_full_wait_1, record_full_insert_breakpoint)
3659         (record_full_remove_breakpoint, record_full_save)
3660         (record_full_goto_insn): Update.
3661
3662 2017-10-02  Tom Tromey  <tom@tromey.com>
3663
3664         PR rust/22236:
3665         * rust-lang.c (rust_val_print_str): New function.
3666         (val_print_struct): Call it.
3667         (rust_subscript): Preserve name of slice type.
3668
3669 2017-10-02  Tom Tromey  <tom@tromey.com>
3670
3671         * rust-lang.c (rust_subscript): Handle slices in
3672         EVAL_AVOID_SIDE_EFFECTS case.
3673
3674 2017-10-02  Tom Tromey  <tom@tromey.com>
3675
3676         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3677
3678 2017-10-02  Tom Tromey  <tom@tromey.com>
3679
3680         * rust-lang.h (rust_slice_type): Add "extern".
3681
3682 2017-10-02  Tom Tromey  <tom@tromey.com>
3683             Pedro Alves  <palves@redhat.com>
3684
3685         * ada-lang.h (ada_exc_info::operator<): Make const.
3686         (ada_exc_info::operator==): Make const.
3687         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3688         Make const.
3689
3690 2017-09-29  Tom Tromey  <tom@tromey.com>
3691
3692         * target.c (read_whatever_is_readable): Change type of "result".
3693         Update.
3694         (free_memory_read_result_vector): Remove.
3695         (read_memory_robust): Change return type.  Update.
3696         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3697         bin2hex, std::string.
3698         * target.h (memory_read_result_s): Remove typedef.
3699         (free_memory_read_result_vector): Remove.
3700         (read_memory_robust): Return std::vector.
3701
3702 2017-09-29  Tom Tromey  <tom@tromey.com>
3703
3704         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3705
3706 2017-09-29  Tom Tromey  <tom@tromey.com>
3707
3708         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3709         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3710         operator< and operator==.
3711         (ada_exceptions_list): Return a std::vector.
3712         * ada-lang.c (ada_exc_info::operator<): Rename from
3713         compare_ada_exception_info.
3714         (ada_exc_info::operator==): New.
3715         (sort_remove_dups_ada_exceptions_list): Change type of
3716         "exceptions".
3717         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3718         (ada_add_global_exceptions): Likewise.
3719         (ada_exceptions_list_1): Return a std::vector.
3720         (ada_exceptions_list): Likewise.
3721
3722 2017-09-29  Tom Tromey  <tom@tromey.com>
3723
3724         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3725         'std::set *'.
3726         (print_one_inferior): Update.
3727         (free_vector_of_ints): Remove.
3728         (list_available_thread_groups): Change "ids" to std::set.
3729         (mi_cmd_list_thread_groups): Update.
3730         (struct collect_cores_data) <core>: Now a std::set.
3731         (collect_cores): Update.
3732         (unique): Remove.
3733         (print_one_inferior): Update.
3734
3735 2017-09-29  Tom Tromey  <tom@tromey.com>
3736
3737         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3738         (mi_execute_async_cli_command): Likewise.
3739         (mi_cmd_trace_frame_collected): Use field_fmt.
3740
3741 2017-09-29  Tom Tromey  <tom@tromey.com>
3742
3743         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3744         gdb::byte_vector.
3745
3746 2017-09-29  Tom Tromey  <tom@tromey.com>
3747
3748         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3749
3750 2017-09-29  Tom Tromey  <tom@tromey.com>
3751
3752         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3753
3754 2017-09-29  Tom Tromey  <tom@tromey.com>
3755
3756         * varobj.h (varobj_gen_name): Return std::string.
3757         * varobj.c (varobj_gen_name): Return std::string.
3758         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3759         (mi_cmd_var_delete): Don't copy "name".
3760
3761 2017-09-29  Tom Tromey  <tom@tromey.com>
3762
3763         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3764         (mi_cmd_break_insert_1): Update.
3765
3766 2017-09-29  Tom Tromey  <tom@tromey.com>
3767
3768         * target.h (make_scoped_defer_target_commit_resume): Update.
3769         * target.c (make_scoped_defer_target_commit_resume): Rename from
3770         make_cleanup_defer_target_commit_resume.  Return a
3771         scoped_restore.
3772         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3773
3774 2017-09-29  Tom Tromey  <tom@tromey.com>
3775
3776         * main.c (captured_main_1): Remove unused declaration.
3777         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3778
3779 2017-09-29  Tom Tromey  <tom@tromey.com>
3780
3781         * symtab.c (search_symbols): Remove unused outer cleanup.
3782         (make_source_files_completion_list): Remove unused declaration.
3783
3784 2017-09-29  Tom Tromey  <tom@tromey.com>
3785
3786         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3787
3788 2017-09-29  Tom Tromey  <tom@tromey.com>
3789
3790         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3791         gdb::byte_vector.
3792
3793 2017-09-29  Tom Tromey  <tom@tromey.com>
3794
3795         * complaints.c (vcomplaint): Use std::string.
3796
3797 2017-09-29  Tom Tromey  <tom@tromey.com>
3798
3799         * tracepoint.c (trace_variable_command): Use std::string.
3800         (encode_actions_1): Remove unused declarations.
3801         (create_tsv_from_upload): Use std::string.
3802
3803 2017-09-29  Tom Tromey  <tom@tromey.com>
3804
3805         * cp-support.c (gdb_demangle): Use std::string.
3806
3807 2017-09-29  Tom Tromey  <tom@tromey.com>
3808
3809         * stack.c (parse_frame_specification): Use std::string
3810         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3811
3812 2017-09-29  Tom Tromey  <tom@tromey.com>
3813
3814         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3815
3816 2017-09-29  Tom Tromey  <tom@tromey.com>
3817
3818         * utils.c (vfprintf_maybe_filtered): Use std::string.
3819         (vfprintf_unfiltered): Likewise.
3820
3821 2017-09-29  Tom Tromey  <tom@tromey.com>
3822
3823         * event-top.c (top_level_prompt): Return std::string.
3824         (display_gdb_prompt): Update.
3825
3826 2017-09-29  Tom Tromey  <tom@tromey.com>
3827
3828         * unittests/common-utils-selftests.c (format): New function.
3829         (string_vprintf_tests): New function.
3830         (_initialize_common_utils_selftests): Register new tests.
3831         * common/common-utils.c (string_vprintf): New function.
3832         * common/common-utils.h (string_vprintf): Declare.
3833
3834 2017-09-29  Pedro Alves  <palves@redhat.com>
3835
3836         * common/rsp-low.c (unpack_varlen_hex): Constify.
3837         * common/rsp-low.h (unpack_varlen_hex): Constify.
3838         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3839         Constify.
3840         * remote.c (remote_set_permissions, read_ptid)
3841         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3842         (remote_static_tracepoint_marker_at)
3843         (remote_static_tracepoint_markers_by_strid)
3844         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3845         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3846         (parse_tracepoint_definition, parse_tsv_definition)
3847         (parse_static_tracepoint_marker_definition): Constify.
3848         * tracepoint.h (parse_static_tracepoint_marker_definition)
3849         (parse_trace_status, parse_tracepoint_status)
3850         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3851
3852 2017-09-29  Pedro Alves  <palves@redhat.com>
3853
3854         * remote.c (target_buf, target_buf_size): Delete.
3855         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3856         Use the connection's packet buffer instead.
3857         All callers adjusted.
3858         (_initialize_remote): Remove references to target_buf and
3859         target_buf_size.
3860
3861 2017-09-28  Pedro Alves  <palves@redhat.com>
3862
3863         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3864         unittests/common-utils-selftests.c.
3865         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3866         (COMMON_OBS): Remove utils-selftests.o.
3867         * utils-selftests.c: Move to ...
3868         * unittests/common-utils-selftests.c: ... here and rename self
3869         test to "string_printf".
3870
3871 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3872
3873         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3874         having NULL cus or tus.
3875
3876 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3877
3878         * arm-tdep.c: (convert_from_extended): Remove.
3879         (convert_to_extended): Likewise.
3880         (arm_extract_return_value): Use convert_typed_floating.
3881         (arm_store_return_value): Likewise.
3882
3883         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3884         * sh-tdep.c: Do not include "floatformat.h".
3885         (sh_littlebyte_bigword_type): New function.
3886         (sh_register_convert_to_virtual): Use convert_typed_floating.
3887         (sh_register_convert_to_raw): Likewise.
3888         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3889         (sh64_littlebyte_bigword_type): New function.
3890         (sh64_extract_return_value): Use convert_typed_floating.
3891         (sh64_register_convert_to_virtual): Likewise.
3892         (sh64_register_convert_to_raw): Likewise.
3893
3894 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3895
3896         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3897         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3898
3899         * gdbtypes.h (union type_specific): Make field floatformat hold
3900         just a single struct floatformat, not an array.
3901         (floatformat_from_type): Move here.
3902         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3903         changed TYPE_FLOATFORMAT definition.
3904         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3905         (recursive_dump_type): Likewise.
3906         (init_float_type): Install correct floatformat for byte order.
3907         (arch_float_type): Likewise.
3908
3909 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3910
3911         * gdbtypes.c (init_type): Change incoming argument from
3912         length-in-bytes to length-in-bits.  Assert length is a
3913         multiple of TARGET_CHAR_BITS.
3914         (arch_type, arch_flags_type): Likewise.
3915         (init_integer_type): Update call to init_type.
3916         (init_character_type): Likewise.
3917         (init_boolean_type): Likewise.
3918         (init_float_type): Likewise.
3919         (init_decfloat_type): Likewise.
3920         (init_complex_type): Likewise.
3921         (init_pointer_type): Likewise.
3922         (objfile_type): Likewise.
3923         (arch_integer_type): Update call to arch_type.
3924         (arch_character_type): Likewise.
3925         (arch_boolean_type): Likewise.
3926         (arch_float_type): Likewise.
3927         (arch_decfloat_type): Likewise.
3928         (arch_complex_type): Likewise.
3929         (arch_pointer_type): Likewise.
3930         (gdbtypes_post_init): Likewise.
3931
3932         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3933         (read_base_type): Likewise.
3934         * mdebugread.c (basic_type): Likewise.
3935         * stabsread.c (dbx_init_float_type): Likewise.
3936         (rs6000_builtin_type): Likewise.
3937         (read_range_type): Likewise.  Also, fix call to init_integer_type
3938         with erroneous length argument.
3939
3940         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3941         * d-lang.c (build_d_types): Likewise.
3942         * f-lang.c (build_fortran_types): Likewise.
3943         * go-lang.c (build_go_types): Likewise.
3944         * opencl-lang.c (build_opencl_types): Likewise.
3945         * jit.c (finalize_symtab): Likewise.
3946         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3947         (build_std_type_info_type): Likewise.
3948         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3949         update call to arch_flags_type.
3950
3951         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3952         arch_type.
3953         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3954         * windows-tdep.c (windows_get_tlb_type): Likewise.
3955
3956         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3957         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3958         * m32c-tdep.c (make_types): Likewise.
3959         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3960         (rl78_psw_type): Update call to arch_flags_type.
3961         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3962         * rx-tdep.c (rx_psw_type): Likewise.
3963         (rx_fpsw_type): Likewise.
3964         * sparc-tdep.c (sparc_psr_type): Likewise.
3965         (sparc_fsr_type): Likewise.
3966         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3967         (sparc64_ccr_type): Likewise.
3968         (sparc64_fsr_type): Likewise.
3969         (sparc64_fprs_type): Likewise.
3970
3971 2017-09-27  Tom Tromey  <tom@tromey.com>
3972
3973         * findcmd.c (find_command): Constify.
3974
3975 2017-09-27  Tom Tromey  <tom@tromey.com>
3976
3977         * ada-tasks.c (task_command_1, task_command): Constify.
3978
3979 2017-09-27  Tom Tromey  <tom@tromey.com>
3980
3981         * symtab.c (maintenance_print_symbol_cache)
3982         (maintenance_flush_symbol_cache)
3983         (maintenance_print_symbol_cache_statistics): Constify.
3984
3985 2017-09-27  Tom Tromey  <tom@tromey.com>
3986
3987         * inferior.c (detach_inferior_command, kill_inferior_command)
3988         (inferior_command): Constify.
3989
3990 2017-09-27  Tom Tromey  <tom@tromey.com>
3991
3992         * regcache.c (regcache_print, maintenance_print_registers)
3993         (maintenance_print_raw_registers)
3994         (maintenance_print_cooked_registers)
3995         (maintenance_print_register_groups)
3996         (maintenance_print_remote_registers): Constify.
3997
3998 2017-09-27  Tom Tromey  <tom@tromey.com>
3999
4000         * printcmd.c (map_display_numbers, undisplay_command)
4001         (enable_disable_display_command, enable_display_command)
4002         (disable_display_command): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * breakpoint.h (delete_command): Don't declare.
4007         * breakpoint.c (delete_command, enable_once_command)
4008         (enable_count_command, enable_delete_command, breakpoint_1)
4009         (maintenance_info_breakpoints, stopin_command, stopat_command)
4010         (delete_command, delete_trace_command, save_breakpoints)
4011         (save_breakpoints_command, save_tracepoints_command): Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4016         (skip_ws, extract_identifier, macro_define_command)
4017         (macro_undef_command, macro_list_command): Constify.
4018
4019 2017-09-27  Tom Tromey  <tom@tromey.com>
4020
4021         * infcmd.c (environment_info, set_environment_command)
4022         (unset_environment_command, path_info, info_proc_cmd_1)
4023         (info_proc_cmd_mappings, info_proc_cmd_stat)
4024         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4025         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4026
4027 2017-09-27  Tom Tromey  <tom@tromey.com>
4028
4029         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4030         Constify.
4031
4032 2017-09-27  Tom Tromey  <tom@tromey.com>
4033
4034         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4035
4036 2017-09-27  Tom Tromey  <tom@tromey.com>
4037
4038         * demangle.c (demangle_command): Constify.
4039
4040 2017-09-27  Tom Tromey  <tom@tromey.com>
4041
4042         * progspace.c (maintenance_info_program_spaces_command):
4043         Constify.
4044
4045 2017-09-27  Tom Tromey  <tom@tromey.com>
4046
4047         * compile/compile.c (check_raw_argument, compile_file_command)
4048         (compile_code_command, compile_print_command): Constify.
4049
4050 2017-09-27  Tom Tromey  <tom@tromey.com>
4051
4052         * reggroups.c (maintenance_print_reggroups): Constify.
4053
4054 2017-09-27  Tom Tromey  <tom@tromey.com>
4055
4056         * dwarf2read.c (save_gdb_index_command): Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * stap-probe.c (info_probes_stap_command): Constify.
4061
4062 2017-09-27  Tom Tromey  <tom@tromey.com>
4063
4064         * fork-child.c (unset_exec_wrapper_command): Constify.
4065
4066 2017-09-27  Tom Tromey  <tom@tromey.com>
4067
4068         * btrace.c (get_uint, get_context_size, no_chunk)
4069         (maint_btrace_packet_history_cmd)
4070         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4071         (maint_info_btrace_cmd): Constify.
4072
4073 2017-09-27  Tom Tromey  <tom@tromey.com>
4074
4075         * reverse.c (delete_bookmark_command): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * remote.c (set_memory_packet_size)
4080         (set_memory_write_packet_size, show_memory_write_packet_size)
4081         (set_memory_read_packet_size, show_memory_read_packet_size)
4082         (compare_sections_command, packet_command, remote_put_command)
4083         (remote_get_command, remote_delete_command): Constify.
4084
4085 2017-09-27  Tom Tromey  <tom@tromey.com>
4086
4087         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4088         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4089         (set_mipsfpu_auto_command): Constify.
4090
4091 2017-09-27  Tom Tromey  <tom@tromey.com>
4092
4093         * cli/cli-cmds.h (cd_command): Constify.
4094         * cli/cli-cmds.c (cd_command): Constify.
4095
4096 2017-09-27  Tom Tromey  <tom@tromey.com>
4097
4098         * thread.c (thread_name_command, thread_find_command): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * probe.c (enable_probes_command, disable_probes_command):
4103         Constify.
4104
4105 2017-09-27  Tom Tromey  <tom@tromey.com>
4106
4107         * symfile.c (symbol_file_command): Constify.
4108         * gdbcore.h (deprecated_file_changed_hook): Constify.
4109         * exec.c (deprecated_file_changed_hook, exec_file_command)
4110         (file_command): Constify.
4111         * defs.h (symbol_file_command): Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * remote-fileio.c (set_system_call_allowed)
4116         (show_system_call_allowed): Constify.
4117
4118 2017-09-27  Tom Tromey  <tom@tromey.com>
4119
4120         * tracepoint.c (delete_trace_variable_command)
4121         (tfind_end_command, tfind_start_command, tfind_pc_command)
4122         (tfind_tracepoint_command, tfind_line_command)
4123         (tfind_range_command, tfind_outside_command): Constify.
4124
4125 2017-09-27  Tom Tromey  <tom@tromey.com>
4126
4127         * ax-gdb.c (maint_agent_printf_command, agent_command)
4128         (agent_eval_command): Constify.
4129
4130 2017-09-27  Tom Tromey  <tom@tromey.com>
4131
4132         * tracepoint.c (info_scope_command): Constify.
4133         * python/python.c (gdbpy_decode_line): Constify.
4134         * python/py-breakpoint.c (bppy_init): Constify.
4135         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4136         * location.h: (new_linespec_location)
4137         (string_to_event_location_basic, string_to_event_location):
4138         Constify.
4139         * location.c (new_linespec_location)
4140         (string_to_event_location_basic, string_to_event_location):
4141         Constify.
4142         * linespec.h (decode_line_with_current_source)
4143         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4144         * linespec.c (linespec_lex_to_end)
4145         (decode_line_with_current_source)
4146         (decode_line_with_last_displayed): Constify.
4147         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4148         Constify.
4149         * cli/cli-cmds.c (edit_command, list_command): Constify.
4150         * breakpoint.h (until_break_command, watch_command_wrapper)
4151         (awatch_command_wrapper, rwatch_command_wrapper)
4152         (init_ada_exception_breakpoint): Constify.
4153         * breakpoint.c (break_command_1, dprintf_command)
4154         (break_range_command, watch_command_wrapper)
4155         (rwatch_command_wrapper, awatch_command_wrapper)
4156         (until_break_command, init_ada_exception_breakpoint)
4157         (strace_marker_create_sals_from_location, trace_command)
4158         (ftrace_command, strace_command, struct tracepoint): Constify.
4159         * ax-gdb.c (agent_command_1): Constify.
4160         * ada-lang.c (ada_exception_sal): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4165         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4166         (get_context_size, no_chunk, get_insn_history_modifiers)
4167         (cmd_record_insn_history, get_call_history_modifiers)
4168         (cmd_record_call_history): Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * source.c (show_substitute_path_command)
4173         (unset_substitute_path_command, set_substitute_path_command):
4174         Constify.
4175
4176 2017-09-27  Tom Tromey  <tom@tromey.com>
4177
4178         * typeprint.c (maintenance_print_type): Constify.
4179         * maint.c (maintenance_dump_me, maintenance_demangle)
4180         (maintenance_time_display, maintenance_info_sections)
4181         (maintenance_print_statistics, maintenance_deprecate)
4182         (maintenance_undeprecate): Constify.
4183         (maintenance_do_deprecate): Constify.  Use std::string.
4184         (maintenance_selftest): Constify.
4185         * gdbtypes.h (maintenance_print_type): Constify.
4186
4187 2017-09-27  Tom Tromey  <tom@tromey.com>
4188
4189         * hppa-tdep.c (unwind_command): Constify.
4190
4191 2017-09-27  Tom Tromey  <tom@tromey.com>
4192
4193         * target-descriptions.c (unset_tdesc_filename_cmd)
4194         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4195         Constify.
4196
4197 2017-09-27  Tom Tromey  <tom@tromey.com>
4198
4199         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4204
4205 2017-09-27  Tom Tromey  <tom@tromey.com>
4206
4207         * tui/tui-regs.c (tui_reg_command): Constify.
4208
4209 2017-09-27  Tom Tromey  <tom@tromey.com>
4210
4211         * skip.c (skip_file_command, skip_function_command)
4212         (skip_enable_command, skip_disable_command, skip_delete_command):
4213         Constify.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * record-btrace.c (cmd_record_btrace_bts_start)
4218         (cmd_record_btrace_pt_start): Constify.
4219
4220 2017-09-27  Tom Tromey  <tom@tromey.com>
4221
4222         * symmisc.c (maintenance_print_symbols)
4223         (maintenance_print_msymbols, maintenance_print_objfiles)
4224         (maintenance_info_symtabs, maintenance_check_symtabs)
4225         (maintenance_expand_symtabs, maintenance_info_line_tables):
4226         Constify.
4227
4228 2017-09-27  Tom Tromey  <tom@tromey.com>
4229
4230         * top.c (new_ui_command): Constify.
4231
4232 2017-09-27  Tom Tromey  <tom@tromey.com>
4233
4234         * symfile.c (add_symbol_file_command)
4235         (remove_symbol_file_command, list_overlays_command)
4236         (map_overlay_command, unmap_overlay_command)
4237         (overlay_auto_command, overlay_manual_command)
4238         (overlay_off_command, overlay_load_command): Constify.
4239
4240 2017-09-27  Tom Tromey  <tom@tromey.com>
4241
4242         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4243         (info_spu_mailbox_command, info_spu_dma_command)
4244         (info_spu_proxydma_command): Constify.
4245
4246 2017-09-27  Tom Tromey  <tom@tromey.com>
4247
4248         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4249
4250 2017-09-27  Tom Tromey  <tom@tromey.com>
4251
4252         * cli/cli-script.c (user_defined_command): Constify.
4253
4254 2017-09-27  Tom Tromey  <tom@tromey.com>
4255
4256         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4257         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4258         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4259         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4260         (dump_binary_value, append_binary_memory, append_binary_value):
4261         Constify.
4262         (struct dump_context) <func>: Constify.
4263         (add_dump_command): Update.
4264
4265 2017-09-27  Tom Tromey  <tom@tromey.com>
4266
4267         * cli/cli-cmds.c (show_version, show_configuration)
4268         (source_command, show_user): Constify.
4269
4270 2017-09-27  Tom Tromey  <tom@tromey.com>
4271
4272         * target.c (maintenance_print_target_stack): Constify.
4273
4274 2017-09-27  Tom Tromey  <tom@tromey.com>
4275
4276         * interps.c (interpreter_exec_cmd): Constify.
4277
4278 2017-09-27  Tom Tromey  <tom@tromey.com>
4279
4280         * record-full.c (cmd_record_full_restore): Constify.
4281
4282 2017-09-27  Tom Tromey  <tom@tromey.com>
4283
4284         * memattr.c (enable_mem_command, disable_mem_command)
4285         (delete_mem_command): Constify.
4286
4287 2017-09-27  Tom Tromey  <tom@tromey.com>
4288
4289         * value.c (show_convenience): Constify.
4290
4291 2017-09-27  Tom Tromey  <tom@tromey.com>
4292
4293         * gdbcore.h (core_file_command): Update.
4294         * corefile.c (core_file_command): Constify.
4295
4296 2017-09-27  Tom Tromey  <tom@tromey.com>
4297
4298         * user-regs.c (maintenance_print_user_registers): Constify.
4299
4300 2017-09-27  Tom Tromey  <tom@tromey.com>
4301
4302         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4303
4304 2017-09-27  Tom Tromey  <tom@tromey.com>
4305
4306         * cp-support.c (first_component_command): Constify.
4307
4308 2017-09-27  Tom Tromey  <tom@tromey.com>
4309
4310         * psymtab.c (maintenance_print_psymbols)
4311         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4312         Constify.
4313
4314 2017-09-27  Tom Tromey  <tom@tromey.com>
4315
4316         * windows-tdep.c (display_tib): Constify.
4317
4318 2017-09-27  Tom Tromey  <tom@tromey.com>
4319
4320         * linux-fork.c (delete_checkpoint_command)
4321         (detach_checkpoint_command): Constify.
4322
4323 2017-09-27  Tom Tromey  <tom@tromey.com>
4324
4325         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4326
4327 2017-09-27  Tom Tromey  <tom@tromey.com>
4328
4329         * arc-tdep.c (dump_arc_instruction_command): Constify.
4330
4331 2017-09-27  Tom Tromey  <tom@tromey.com>
4332
4333         * valprint.c (set_radix, show_radix): Constify.
4334
4335 2017-09-27  Tom Tromey  <tom@tromey.com>
4336
4337         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4338
4339 2017-09-27  Tom Tromey  <tom@tromey.com>
4340
4341         * command.h (not_just_help_class_command): Update.
4342         * cli/cli-decode.h (not_just_help_class_command): Update.
4343         * cli/cli-decode.c (not_just_help_class_command): Constify.
4344
4345 2017-09-27  Tom Tromey  <tom@tromey.com>
4346
4347         * gdb_bfd.c (maintenance_info_bfds): Constify.
4348
4349 2017-09-27  Tom Tromey  <tom@tromey.com>
4350
4351         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4352         overloads.
4353         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4354         (do_const_cfunc): New function.
4355         (cmd_cfunc_eq): New overload.
4356         (cli_user_command_p): Check do_const_cfunc.
4357         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4358         const_cfunc.
4359         * command.h (add_cmd): Add const overload and no-function
4360         overload.
4361         (set_cmd_cfunc): Add const overload.
4362         (cmd_const_cfunc_ftype): Declare.
4363         (cmd_cfunc_eq): Add const overload.
4364         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4365         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4366         overload.
4367
4368 2017-09-27  Tom Tromey  <tom@tromey.com>
4369
4370         * macroexp.c (get_next_token_for_substitution): New function.
4371         (substitute_args): Call it.  Check for __VA_OPT__.
4372
4373 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4374             Pedro Alves <palves@redhat.com>
4375
4376         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4377         producer_is_icc_lt_14.
4378         (producer_is_icc_lt_14): New function.
4379         (check_producer): Add code for checking version of ICC.
4380         (producer_is_icc): Move to producer.c.
4381         (read_structure_type): Restrict ICC workaround to ICC<14.
4382         * producer.c: Include selftest.h.
4383         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4384         New functions.
4385         * producer.h (producer_is_icc): New declaration.
4386
4387 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4388
4389         * Makefile.in (SFILES): Add producer.c.
4390         (COMMON_OBS): Add producer.o
4391         * amd64-tdep.c (producer.h): Add new include.
4392         * dwarf2read.c (producer.h): Add new include.
4393         * producer.c: New file.
4394         * producer.h: New file.
4395         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4396         producer.c.
4397         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4398         producer.h.
4399
4400 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4401
4402         * configure.ac: Search ncursesw before ncurses.
4403         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4404         * gdb_curses.h: Include <ncursesw/ncurses.h>
4405         * config.in, configure: Regenerate.
4406
4407 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4408
4409         PR gdb/22185
4410         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4411         obsolete.
4412         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4413         Remove i386sol2 support.
4414         * configure.nat <i386sol2>: Remove.
4415         <sol2-64>: Fold into ...
4416         <sol2>: ... this.
4417         Move common settings to default section.
4418         Add sol-thread.o.
4419         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4420         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4421         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4422         <i[34567]86-*-solaris*>: Remove.
4423         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4424
4425         * configure.ac: Remove wctype in libw check.
4426         (_MSE_INT_H): Don't define on Solaris 7-9.
4427         <solaris*>: Remove libthread_db.so.1 check.
4428         * configure: Regenerate.
4429         * config.in: Regenerate.
4430
4431         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4432         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4433         (gdb_ps_size_t): Remove.
4434         Use base types in users.
4435         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4436
4437         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4438
4439 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4440
4441         PR build/22206
4442         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4443         (adi_is_addr_mapped): Likewise.
4444         (PSR_ICC): Don't redefine.
4445         (PSR_IMPL): Likewise.
4446
4447 2017-09-25  Tom Tromey  <tom@tromey.com>
4448
4449         * regcache.c (regcache::dump): Use string_printf.
4450
4451 2017-09-25  Tom Tromey  <tom@tromey.com>
4452
4453         * regcache.c (class regcache_invalidator): New.
4454         (struct register_to_invalidate): Remove.
4455         (make_cleanup_regcache_invalidate): Remove.
4456         (regcache::raw_write): Use regcache_invalidator.
4457
4458 2017-09-25  Tom Tromey  <tom@tromey.com>
4459
4460         * spu-tdep.c (spu2ppu_sniffer): Update.
4461         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4462         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4463         Remove.
4464         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4465         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4466         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4467         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4468         (frame_pop): Update.
4469
4470 2017-09-25  Tom Tromey  <tom@tromey.com>
4471
4472         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4473         * regcache.h (regcache_xfree): Don't declare.
4474         * regcache.c (regcache_xfree): Remove.
4475         (do_regcache_xfree): Use delete.
4476         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4477         * linux-fork.c (free_fork): Use delete.
4478         (fork_save_infrun_state): Likewise.
4479         * jit.c (jit_dealloc_cache): Use delete.
4480         * infrun.c (discard_infcall_suspend_state): Use delete.
4481
4482 2017-09-25  Tom Tromey  <tom@tromey.com>
4483
4484         * regcache.h (regcache_xmalloc): Don't declare.
4485         (regcache_raw_set_cached_value): Update comment.
4486         * regcache.c (regcache_xmalloc): Remove.
4487         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4488         * jit.c (jit_frame_sniffer): Use new.
4489         * frame.c (frame_save_as_regcache): Use new.
4490
4491 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4492
4493         * NEWS: Advertise support for guarded-storage registers on IBM z.
4494
4495 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4496
4497         * s390-linux-nat.c (have_regset_gs): New static variable.
4498         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4499         control block and guarded-storage broadcast control regsets.
4500         (s390_read_description): Detect whether the target has
4501         guarded-storage support, return appropriate tdesc.
4502         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4503         (features/s390x-gs-linux64.c): Likewise.
4504         (struct gdbarch_tdep) <have_gs>: New field.
4505         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4506         (s390_gsbc_regset): New variables.
4507         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4508         and s390_gsbc_regset, if applicable.
4509         (s390_core_read_description): Check whether core file was from a
4510         target with guarded-storage support; include appropriate regsets.
4511         (s390_gdbarch_init): Add registers for guarded-storage support.
4512         (_initialize_s390_tdep): Initialize new target descriptions that
4513         include registers for guarded-storage support.
4514         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4515         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4516         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4517         (S390_NUM_REGS): Adjust macro definition.
4518         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4519         (tdesc_s390x_gs_linux64): New declarations.
4520
4521 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4522
4523         * features/s390-gs-linux64.xml: New file.
4524         * features/s390-gs.xml: New file.
4525         * features/s390-gsbc.xml: New file.
4526         * features/s390x-gs-linux64.xml: New file.
4527         * features/Makefile (WHICH): Add s390-gs-linux64 and
4528         s390x-gs-linux64.
4529         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4530         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4531         * features/s390-gs-linux64.c: New generated file.
4532         * features/s390x-gs-linux64.c: New file.
4533         * regformats/s390-gs-linux64.dat: New file.
4534         * regformats/s390x-gs-linux64.dat: New file.
4535
4536 2017-09-23  Tom Tromey  <tom@tromey.com>
4537
4538         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4539
4540 2017-09-22  Tom Tromey  <tom@tromey.com>
4541
4542         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4543         type to scoped_restore_tmpl.
4544         <scoped_input_handler>: Initialize m_quit_handler directly.
4545
4546 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4547
4548         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4549         (cd_command): Likewise.  Free "current_directory" before
4550         assigning to it.
4551         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4552         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4553         * top.c (gdb_dirbuf): Remove global declaration.
4554         * top.h (gdb_dirbuf): Likewise.
4555
4556 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4557
4558         * gnulib/aclocal.m4: Regenerate.
4559         * gnulib/config.in: Regenerate.
4560         * gnulib/configure: Regenerate.
4561         * gnulib/import/Makefile.am: Regenerate.
4562         * gnulib/import/Makefile.in: Regenerate.
4563         * gnulib/import/assure.h: New file.
4564         * gnulib/import/at-func.c: Likewise
4565         * gnulib/import/chdir-long.c: New file.
4566         * gnulib/import/chdir-long.h: New file.
4567         * gnulib/import/cloexec.c: New file.
4568         * gnulib/import/cloexec.h: New file.
4569         * gnulib/import/close.c: New file.
4570         * gnulib/import/closedir.c: New file.
4571         * gnulib/import/dirent-private.h: New file.
4572         * gnulib/import/dup-safer.c: New file.
4573         * gnulib/import/dup.c: New file.
4574         * gnulib/import/dup2.c: New file.
4575         * gnulib/import/error.c: New file.
4576         * gnulib/import/error.h: New file.
4577         * gnulib/import/exitfail.c: New file.
4578         * gnulib/import/exitfail.h: New file.
4579         * gnulib/import/fchdir.c: New file.
4580         * gnulib/import/fcntl.c: New file.
4581         * gnulib/import/fcntl.in.h: New file.
4582         * gnulib/import/fd-hook.c: New file.
4583         * gnulib/import/fd-hook.h: New file.
4584         * gnulib/import/fd-safer.c: New file.
4585         * gnulib/import/fdopendir.c: New file.
4586         * gnulib/import/filename.h: New file.
4587         * gnulib/import/filenamecat-lgpl.c: New file.
4588         * gnulib/import/filenamecat.h: New file.
4589         * gnulib/import/fstat.c: New file.
4590         * gnulib/import/fstatat.c: New file.
4591         * gnulib/import/getcwd-lgpl.c: New file.
4592         * gnulib/import/getcwd.c: New file.
4593         * gnulib/import/getdtablesize.c: New file.
4594         * gnulib/import/getlogin_r.c: New file.
4595         * gnulib/import/getprogname.c: New file.
4596         * gnulib/import/getprogname.h: New file.
4597         * gnulib/import/gettext.h: New file.
4598         * gnulib/import/glob-libc.h: New file.
4599         * gnulib/import/glob.c: New file.
4600         * gnulib/import/glob.in.h: New file.
4601         * gnulib/import/intprops.h: New file.
4602         * gnulib/import/m4/chdir-long.m4: New file.
4603         * gnulib/import/m4/close.m4: New file.
4604         * gnulib/import/m4/closedir.m4: New file.
4605         * gnulib/import/m4/d-ino.m4: New file.
4606         * gnulib/import/m4/d-type.m4: New file.
4607         * gnulib/import/m4/dup.m4: New file.
4608         * gnulib/import/m4/dup2.m4: New file.
4609         * gnulib/import/m4/error.m4: New file.
4610         * gnulib/import/m4/fchdir.m4: New file.
4611         * gnulib/import/m4/fcntl.m4: New file.
4612         * gnulib/import/m4/fcntl_h.m4: New file.
4613         * gnulib/import/m4/fdopendir.m4: New file.
4614         * gnulib/import/m4/filenamecat.m4: New file.
4615         * gnulib/import/m4/fstat.m4: New file.
4616         * gnulib/import/m4/fstatat.m4: New file.
4617         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4618         * gnulib/import/m4/getcwd-path-max.m4: New file.
4619         * gnulib/import/m4/getcwd.m4: New file.
4620         * gnulib/import/m4/getdtablesize.m4: New file.
4621         * gnulib/import/m4/getlogin_r.m4: New file.
4622         * gnulib/import/m4/getprogname.m4: New file.
4623         * gnulib/import/m4/glob.m4: New file.
4624         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4625         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4626         * gnulib/import/m4/mempcpy.m4: New file.
4627         * gnulib/import/m4/memrchr.m4: New file.
4628         * gnulib/import/m4/mode_t.m4: New file.
4629         * gnulib/import/m4/msvc-inval.m4: New file.
4630         * gnulib/import/m4/msvc-nothrow.m4: New file.
4631         * gnulib/import/m4/open.m4: New file.
4632         * gnulib/import/m4/openat.m4: New file.
4633         * gnulib/import/m4/opendir.m4: New file.
4634         * gnulib/import/m4/readdir.m4: New file.
4635         * gnulib/import/m4/realloc.m4: New file.
4636         * gnulib/import/m4/rewinddir.m4: New file.
4637         * gnulib/import/m4/save-cwd.m4: New file.
4638         * gnulib/import/m4/strdup.m4: New file.
4639         * gnulib/import/m4/strerror.m4: New file.
4640         * gnulib/import/m4/unistd-safer.m4: New file.
4641         * gnulib/import/mempcpy.c: New file.
4642         * gnulib/import/memrchr.c: New file.
4643         * gnulib/import/msvc-inval.c: New file.
4644         * gnulib/import/msvc-inval.h: New file.
4645         * gnulib/import/msvc-nothrow.c: New file.
4646         * gnulib/import/msvc-nothrow.h: New file.
4647         * gnulib/import/open.c: New file.
4648         * gnulib/import/openat-die.c: New file.
4649         * gnulib/import/openat-priv.h: New file.
4650         * gnulib/import/openat-proc.c: New file.
4651         * gnulib/import/openat.c: New file.
4652         * gnulib/import/openat.h: New file.
4653         * gnulib/import/opendir.c: New file.
4654         * gnulib/import/pipe-safer.c: New file.
4655         * gnulib/import/readdir.c: New file.
4656         * gnulib/import/realloc.c: New file.
4657         * gnulib/import/rewinddir.c: New file.
4658         * gnulib/import/save-cwd.c: New file.
4659         * gnulib/import/save-cwd.h: New file.
4660         * gnulib/import/strdup.c: New file.
4661         * gnulib/import/strerror-override.c: New file.
4662         * gnulib/import/strerror-override.h: New file.
4663         * gnulib/import/strerror.c: New file.
4664         * gnulib/import/unistd--.h: New file.
4665         * gnulib/import/unistd-safer.h: New file.
4666         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4667         "getcwd" and "glob".
4668         * ser-tcp.c: Undefine "close" before redefining it.
4669
4670 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4671
4672         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4673         get rid of res_val.
4674
4675 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4676
4677         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4678         <sol2,sparc>: Likewise.
4679         <sol2-64,i386>: Likewise.
4680
4681         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4682         -Wdeprecated-declarations on *-*-solaris*.
4683         * configure: Regenerate.
4684
4685         * procfs.c: Include "nat/inferior.h".
4686         (procfs_info_proc): Fix typo.
4687
4688 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4689
4690         * remote.c (vector): Include.
4691         (struct private_thread_info): Add field, thread_handle.
4692         (free_private_thread_info): Deallocate storage associated with
4693         thread handle.
4694         (get_private_info_thread): Initialize `thread_handle' field.
4695         (struct thread_item): Add field, thread_handle.
4696         (clear_threads_listing_context): Deallocate storage associated
4697         with thread handle.
4698         (start_thread): Add support for "handle" attribute.
4699         (thread_attributes): Add "handle".
4700         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4701         field.
4702         (remote_update_thread_list): Update thread_handle.
4703         (remote_thread_handle_to_thread_info): New function.
4704         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4705
4706 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4707
4708         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4709         function.
4710         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4711         * python/python-internal.h (thread_object_type): Declare.
4712
4713 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4714
4715         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4716         (target_thread_handle_to_thread_info): Declare.
4717         * target.c (target_thread_handle_to_thread_info): New function.
4718         * target-delegates.c: Regenerate.
4719         * gdbthread.h (find_thread_by_handle): Declare.
4720         * thread.c (find_thread_by_handle): New function.
4721         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4722         function.
4723         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4724
4725 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4726
4727         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4728
4729 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4730
4731         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4732
4733 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4734
4735         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4736         to gdb_target_obs.
4737
4738 2017-09-20  Tom Tromey  <tom@tromey.com>
4739
4740         * breakpoint.c (struct counted_command_line): Remove.
4741         (breakpoint_commands): Update.
4742         (alloc_counted_command_line, incref_counted_command_line)
4743         (decref_counted_command_line, do_cleanup_counted_command_line)
4744         (make_cleanup_decref_counted_command_line): Remove.
4745         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4746         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4747         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4748         (save_breakpoints): Update.
4749         * breakpoint.h (counted_command_line): Now a typedef to
4750         shared_ptr.
4751         (struct breakpoint) <commands>: Now a counted_command_line.
4752         (struct bpstats) <command>: Likewise.
4753
4754 2017-09-20  Tom Tromey  <tom@tromey.com>
4755
4756         * breakpoint.c (struct commands_info, do_map_commands_command):
4757         Remove.
4758         (commands_command_1): Update.
4759         (iterate_over_related_breakpoints): Take a function_view.
4760         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4761         (delete_command): Update.
4762         (map_breakpoint_numbers): Take a function_view.
4763         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4764         (disable_command): Update.
4765         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4766         (enable_command): Update.
4767         (struct disp_data, do_enable_breakpoint_disp)
4768         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4769         (do_map_enable_delete_breakpoint): Remove.
4770         (enable_once_command, enable_count_command, enable_delete_command)
4771         (delete_trace_variable_command): Update.
4772
4773 2017-09-20  Tom Tromey  <tom@tromey.com>
4774
4775         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4776         (bpstat_clear): Use delete.
4777         (bpstats): New constructors.
4778         (bpstat_copy, bpstat_stop_status): Use new.
4779         (dprintf_after_condition_true): Update.
4780         * breakpoint.h (bpstats::bpstats): Add constructors.
4781         (bpstats::~bpstats): Add destructor.
4782
4783 2017-09-20  Pedro Alves  <palves@redhat.com>
4784
4785         * eval.c (make_params): Delete, refactored as ...
4786         (class fake_method): ... this new type's ctor.
4787         (fake_method::~fake_method): New.
4788         (evaluate_subexp_standard): Use 'fake_method'.
4789
4790 2017-09-20  Tom Tromey  <tom@tromey.com>
4791
4792         * windows-nat.c (get_windows_debug_event, windows_wait)
4793         (do_initial_windows_stuff, windows_attach): Update.
4794         * utils.c (vwarning, internal_vproblem): Update.
4795         (ui_unregister_input_event_handler_cleanup)
4796         (prepare_to_handle_input): Remove.
4797         (class scoped_input_handler): New.
4798         (defaulted_query, prompt_for_continue): Update.
4799         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4800         Update.
4801         * top.c (undo_terminal_modifications_before_exit): Update.
4802         * target/target.h (target_terminal_init, target_terminal_inferior)
4803         (target_terminal_ours): Don't declare.
4804         (class target_terminal): New.
4805         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4806         (target_terminal_ours_for_output)
4807         (make_cleanup_restore_target_terminal): Don't declare.
4808         (target_terminal_info): Remove.
4809         * target.c (enum terminal_state, terminal_state): Remove.
4810         (target_terminal::terminal_state): Define.
4811         (target_terminal::init): Rename from target_terminal_init.
4812         (target_terminal::inferior): Rename from
4813         target_terminal_inferior.
4814         (target_terminal::ours): Rename from target_terminal_ours.
4815         (target_terminal::ours_for_output): Rename from
4816         target_terminal_ours_for_output.
4817         (target_terminal::info): New method.
4818         (cleanup_restore_target_terminal)
4819         (make_cleanup_restore_target_terminal): Remove.
4820         * solib.c (handle_solib_event): Update.
4821         * remote.c (remote_serial_quit_handler): Update.
4822         (remote_terminal_inferior, remote_wait_as): Update.
4823         * record-full.c (record_full_wait_1): Update.
4824         * nto-procfs.c (procfs_create_inferior): Update.
4825         * nat/fork-inferior.c (startup_inferior): Update.
4826         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4827         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4828         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4829         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4830         (mi_breakpoint_created, mi_breakpoint_deleted)
4831         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4832         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4833         (mi_user_selected_context_changed, report_initial_inferior):
4834         Update.
4835         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4836         (linux_nat_terminal_inferior): Update.
4837         * infrun.c (follow_fork_inferior)
4838         (handle_vfork_child_exec_or_exit, do_target_resume)
4839         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4840         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4841         Update.
4842         * inflow.c (child_terminal_init, info_terminal_command): Update.
4843         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4844         (attach_command): Update.
4845         * infcall.c (call_thread_fsm_should_stop): Update.
4846         * gnu-nat.c (gnu_attach): Update.
4847         * extension.c (struct active_ext_lang_state)
4848         (restore_active_ext_lang): Update.
4849         * exceptions.c (print_flush): Update.
4850         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4851         (struct quit_handler_cleanup_data, restore_quit_handler)
4852         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4853         Remove.
4854         * cp-support.c (gdb_demangle): Update.
4855         * breakpoint.c (update_inserted_breakpoint_locations)
4856         (insert_breakpoint_locations, handle_jit_event)
4857         (disable_breakpoints_in_unloaded_shlib): Update.
4858         * annotate.c (annotate_breakpoints_invalid)
4859         (annotate_frames_invalid): Update.
4860
4861 2017-09-20  Tom Tromey  <tom@tromey.com>
4862
4863         * main.c (catch_command_errors): Rename from
4864         catch_command_errors_const.
4865         (captured_main_1): Update.
4866
4867 2017-09-20  Pedro Alves  <palves@redhat.com>
4868
4869         * cli/cli-cmds.c (list_command): Use print_sal_location.
4870         (print_sal_location): New function.
4871         (ambiguous_line_spec): Use print_sal_location.
4872         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4873         * symtab.c (find_function_start_sal): Likewise.
4874         * symtab.h (symtab_and_line::symbol): New field.
4875
4876 2017-09-20  Pedro Alves  <palves@redhat.com>
4877
4878         * linespec.c (minsym_found): Handle non-text minsyms.
4879         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4880
4881 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4882
4883         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4884         backslash.
4885
4886 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4887
4888         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4889         vmovups instead vmovaps.
4890         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4891
4892 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4893
4894         * NEWS (Changes since GDB 8.0): Add starti.
4895         * infcmd.c (enum run_break): New.
4896         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4897         case.
4898         (run_command): Use enum run_how.
4899         (start_command): Likewise.
4900         (starti_command): New function.
4901         (RUN_ARGS_HELP): New macro.
4902         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4903         commands.  Add starti command.
4904
4905 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4906
4907         * Makefile.in (monitor.o): Remove the rule.
4908
4909 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4910
4911         * annotate.h (struct annotate_arg_emitter): Use
4912         DISABLE_COPY_AND_ASSIGN.
4913         * common/refcounted-object.h (refcounted_object): Likewise.
4914         * completer.h (struct completion_result): Likewise.
4915         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4916         * filename-seen-cache.h (filename_seen_cache): Likewise.
4917         * gdbcore.h (thread_section_name): Likewise.
4918         * gdb_regex.h (compiled_regex): Likewise.
4919         * gdbthread.h (scoped_restore_current_thread): Likewise.
4920         * inferior.h (scoped_restore_current_inferior): Likewise.
4921         * jit.c (jit_reader): Likewise.
4922         * linespec.h (struct linespec_result): Likewise.
4923         * mi/mi-parse.h (struct mi_parse): Likewise.
4924         * nat/fork-inferior.c (execv_argv): Likewise.
4925         * progspace.h (scoped_restore_current_program_space): Likewise.
4926         * python/python-internal.h (class gdbpy_enter): Likewise.
4927         * regcache.h (regcache): Likewise.
4928         * target-descriptions.c (struct tdesc_reg): Likewise.
4929         (struct tdesc_type): Likewise.
4930         (struct tdesc_feature): Likewise.
4931         * ui-out.h (ui_out_emit_type): Likewise.
4932
4933 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4934
4935         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4936         label abort_expression.
4937
4938 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4939
4940         * common/buffer.c (buffer_xml_printf): Adjust.
4941         * common/xml-utils.c (xml_escape_text): Change return type to
4942         std::string, update code accordingly.
4943         * common/xml-utils.h (xml_escape_text): Change return type to
4944         std::string.
4945         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4946         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4947         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4948         Adjust.
4949
4950 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4951
4952         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4953         (SUBDIR_UNITTESTS_OBS): Add new object file.
4954         * unittests/xml-utils-selftests.c: New file.
4955
4956 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4957
4958         * common/selftest.h (selftest): New struct/interface.
4959         (register_test): Add name parameter, add new overload.
4960         (run_tests): Add filter parameter.
4961         (for_each_selftest_ftype): New typedef.
4962         (for_each_selftest): New declaration.
4963         * common/selftest.c (tests): Change type to
4964         map<string, unique_ptr<selftest>>.
4965         (simple_selftest): New struct.
4966         (register_test): New function.
4967         (register_test): Add name parameter and use it.
4968         (run_tests): Add filter parameter and use it.  Add prints.
4969         Adjust to vector -> map change.
4970         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4971         registering selftests.
4972         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4973         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4974         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4975         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4976         * findvar.c (_initialize_findvar): Likewise.
4977         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4978         * maint.c (maintenance_selftest): Update call to run_tests.
4979         (maintenance_info_selftests): New function.
4980         (_initialize_maint_cmds): Register "maintenance info selftests"
4981         command.  Update "maintenance selftest" doc.
4982         * regcache.c (_initialize_regcache): Add names when registering
4983         selftests.
4984         * rust-exp.y (_initialize_rust_exp): Likewise.
4985         * selftest-arch.c (gdbarch_selftest): New struct.
4986         (gdbarch_tests): Remove.
4987         (register_test_foreach_arch): Add name parameter.  Call
4988         register_test.
4989         (tests_with_arch): Remove, move most content to
4990         gdbarch_selftest::operator().
4991         (_initialize_selftests_foreach_arch): Remove.
4992         * selftest-arch.h (register_test_foreach_arch): Add name
4993         parameter.
4994         (run_tests_with_arch): New declaration.
4995         * utils-selftests.c (_initialize_utils_selftests): Add names
4996         when registering selftests.
4997         * utils.c (_initialize_utils): Likewise.
4998         * unittests/array-view-selftests.c
4999         (_initialize_array_view_selftests): Likewise.
5000         * unittests/environ-selftests.c (_initialize_environ_selftests):
5001         Likewise.
5002         * unittests/function-view-selftests.c
5003         (_initialize_function_view_selftests): Likewise.
5004         * unittests/offset-type-selftests.c
5005         (_initialize_offset_type_selftests): Likewise.
5006         * unittests/optional-selftests.c
5007         (_initialize_optional_selftests): Likewise.
5008         * unittests/scoped_restore-selftests.c
5009         (_initialize_scoped_restore_selftests): Likewise.
5010         * NEWS: Document "maintenance selftest" and "maint info
5011         selftests".
5012
5013 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5014
5015         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5016         scoped_restore.
5017
5018 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         * mi/mi-main.c (mi_load_progress): Make uiout variable
5021         a unique_ptr.
5022
5023 2017-09-15  Pedro Alves  <palves@redhat.com>
5024
5025         * compile/compile-c-types.c (convert_enum, convert_int)
5026         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5027
5028 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5029
5030         * dwarf2read.c (copy_string): Remove.
5031         (parse_macro_definition): Replace copy_string with savestring.
5032
5033 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5034
5035         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5036         gdb_target_obs.
5037         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5038         Likewise.
5039         (i[34567]86-*-linux*): Likewise.
5040
5041 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5042
5043         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5044         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5045         <stack>: Change type to std::vector.
5046         <stack_len, stack_allocated>: Remove.
5047         <grow_stack>: Remove.
5048         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5049         (dwarf_expr_context::~dwarf_expr_context): Remove.
5050         (dwarf_expr_context::grow_stack): Remove.
5051         (dwarf_expr_context::push): Adjust.
5052         (dwarf_expr_context::pop): Adjust.
5053         (dwarf_expr_context::fetch): Adjust.
5054         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5055         (dwarf_expr_context::stack_empty_p): Adjust.
5056         (dwarf_expr_context::execute_stack_op): Adjust.
5057
5058 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5059
5060         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5061         return type to bool.
5062         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5063
5064 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5065
5066         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5067         Change type to bool.
5068         (dwarf_stack_value) <in_stack_memory>: Likewise.
5069         (dwarf_expr_context) <push_address>: Change parameter type to
5070         bool.
5071         <fetch_in_stack_memory>: Change return type to bool.
5072         <push>: Change parameter type to bool.
5073         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5074         to bool.
5075         (dwarf_expr_context::push_address): Likewise.
5076         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5077         to bool.
5078         (dwarf_expr_context::execute_stack_op): Adjust.
5079         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5080
5081 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5082
5083         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5084         (struct dwarf_expr_context) <n_pieces>: Remove.
5085         <pieces>: Change type to std::vector.
5086         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5087         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5088         pieces.
5089         (dwarf_expr_context::add_piece): Adjust.
5090         * dwarf2loc.c (struct piece_closure): Initialize fields.
5091         <n_pieces>: Remove.
5092         <pieces>: Change type to std::vector.
5093         (allocate_piece_closure): Adjust, change parameter to
5094         std::vector rvalue and std::move it to piece_closure.
5095         (rw_pieced_value): Adjust.
5096         (check_pieced_synthetic_pointer): Adjust.
5097         (indirect_synthetic_pointer): Adjust.
5098         (coerce_pieced_ref): Adjust.
5099         (free_pieced_value_closure):  Adjust.  Use delete to free
5100         piece_closure.
5101         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5102         to allocate_piece_closure.
5103         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5104
5105 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5106
5107         * probe.h (probe_ops_cp): Remove typedef.
5108         (DEF_VEC_P (probe_ops_cp)): Remove.
5109         (all_probe_ops): Change type to std::vector.
5110         * probe.c (info_probes_for_ops): Adjust to vector change.
5111         (probe_linespec_to_ops): Likewise.
5112         (all_probe_ops): Change type to std::vector.
5113         (_initialize_probe): Adjust to vector change.
5114         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5115         * elfread.c (elf_get_probes): Likewise.
5116         * stap-probe.c (_initialize_stap_probe): Likewise.
5117
5118 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5119
5120         * probe.h (struct bound_probe): Define constructors.
5121         * probe.c (bound_probe_s): Remove typedef.
5122         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5123         (collect_probes): Change return type to std::vector, remove
5124         cleanup.
5125         (compare_probes): Return bool, change parameter type.  Change
5126         semantic to "less than".
5127         (gen_ui_out_table_header_info): Change parameter to std::vector
5128         and update.
5129         (exists_probe_with_pops): Likewise.
5130         (info_probes_for_ops): Update to std::vector change.
5131         (enable_probes_command): Likewise.
5132         (disable_probes_command): Likewise.
5133
5134 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5135
5136         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5137         vec to std::vector.
5138         * probe.c (parse_probes_in_pspace): Update.
5139         (find_probes_in_objfile): Update.
5140         (find_probe_by_pc): Update.
5141         (collect_probes): Update.
5142         (probe_any_get_probes): Update.
5143         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5144         return type to reference to std::vector.
5145         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5146         std::vector and update.
5147         (dtrace_process_dof): Likewise.
5148         (dtrace_get_probes): Likewise.
5149         * elfread.c (elf_get_probes): Change return type to std::vector,
5150         store an std::vector in bfd_data.
5151         (probe_key_free): Update to std::vector.
5152         * stap-probe.c (handle_stap_probe): Change parameter to
5153         std::vector and update.
5154         (stap_get_probes): Likewise.
5155         * symfile-debug.c (debug_sym_get_probes): Change return type to
5156         std::vector and update.
5157
5158 2017-09-11  Tom Tromey  <tom@tromey.com>
5159
5160         * breakpoint.c (program_breakpoint_here_p): Update.
5161         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5162         from make_show_memory_breakpoints_cleanup.  Return a
5163         scoped_restore_tmpl<int>.
5164         (restore_show_memory_breakpoints): Remove.
5165         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5166         * mem-break.c (memory_validate_breakpoint): Update.
5167         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5168         (ia64_memory_remove_breakpoint): Update.
5169         (ia64_breakpoint_from_pc): Update.
5170         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5171         from make_show_memory_breakpoints_cleanup.
5172
5173 2017-09-11  Tom Tromey  <tom@tromey.com>
5174
5175         * d-namespace.c (d_lookup_symbol): Use std::string.
5176         (find_symbol_in_baseclass): Likewise.
5177
5178 2017-09-11  Tom Tromey  <tom@tromey.com>
5179
5180         * ctf.c (ctf_start): Use std::string.
5181
5182 2017-09-11  Tom Tromey  <tom@tromey.com>
5183
5184         * ada-lang.c (is_known_support_routine): Update.
5185         (ada_unhandled_exception_name_addr_from_raise): Update.
5186         * guile/scm-frame.c (gdbscm_frame_name): Update.
5187         * python/py-frame.c (frapy_name): Update.
5188         (frapy_function): Update.
5189         * stack.h (find_frame_funname): Update.
5190         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5191         (print_frame): Update.
5192
5193 2017-09-11  Tom Tromey  <tom@tromey.com>
5194
5195         * findcmd.c (put_bits): Take a gdb::byte_vector.
5196         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5197         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5198         cleanups.
5199         (find_command): Update.
5200
5201 2017-09-11  Tom Tromey  <tom@tromey.com>
5202
5203         * cli/cli-script.c (class scoped_restore_hook_in): New.
5204         (clear_hook_in_cleanup): Remove.
5205         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5206         scoped_restore_hook_in.
5207
5208 2017-09-11  Tom Tromey  <tom@tromey.com>
5209
5210         * cli/cli-script.c (restore_interp): Remove.
5211         (read_command_lines): Use scoped_restore_interp.
5212         * interps.c (scoped_restore_interp::set_temp): Rename from
5213         interp_set_temp.
5214         * interps.h (class scoped_restore_interp): New.
5215         (interp_set_temp): Remove.
5216
5217 2017-09-11  Tom Tromey  <tom@tromey.com>
5218
5219         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5220         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5221         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5222         scoped_restore.
5223         (mi_cmd_break_insert_1): Update.
5224         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5225         scoped_restore.
5226
5227 2017-09-11  Tom Tromey  <tom@tromey.com>
5228
5229         * demangle.c (demangle_command): Update.
5230         * breakpoint.c (disable_command): Update.
5231         (enable_command): Update.
5232         (find_location_by_number): Make "number" const.  Use
5233         get_number_trailer.
5234         * cli/cli-utils.c (extract_arg): Return std::string.
5235         * probe.c (parse_probe_linespec): Update.  Change types.
5236         (collect_probes): Take string arguments.
5237         (parse_probe_linespec): Likewise.
5238         (info_probes_for_ops): Update.
5239         (enable_probes_command): Update.
5240         (disable_probes_command): Update.
5241         * break-catch-sig.c (catch_signal_split_args): Update.
5242         * mi/mi-parse.c (mi_parse): Update.
5243
5244 2017-09-11  Tom Tromey  <tom@tromey.com>
5245
5246         * language.h (language_enum): Make argument const.
5247         * language.c (language_enum): Make argument const.
5248
5249 2017-09-11  Tom Tromey  <tom@tromey.com>
5250
5251         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5252         as function.
5253         (skip_to_space): Rename from skip_to_space_const.
5254         * common/common-utils.c (skip_to_space): New function.
5255         (skip_to_space): Rename from skip_to_space_const.
5256         * cli/cli-utils.h (get_number): Rename from get_number_const.
5257         (extract_arg): Rename from extract_arg_const.
5258         * cli/cli-utils.c (get_number): Rename from get_number_const.
5259         (extract_arg): Rename from extract_arg_const.
5260         (number_or_range_parser::get_number): Use ::get_number.
5261         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5262         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5263         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5264         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5265         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5266         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5267         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5268         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5269
5270 2017-09-11  Tom Tromey  <tom@tromey.com>
5271
5272         * python/python.c (do_start_initialization): Use
5273         py-event-types.def to initialize types.
5274         Define all object type structures.
5275         * python/python-internal.h: Don't declare event initialization
5276         functions.
5277         * python/py-threadevent.c (thread_event_object_type): Don't
5278         define.
5279         * python/py-stopevent.c (stop_event_object_type): Don't define.
5280         * python/py-signalevent.c (signal_event_object_type): Don't
5281         declare or define.
5282         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5283         (clear_objfiles_event_object_type): Don't declare or define.
5284         * python/py-infevents.c (inferior_call_pre_event_object_type)
5285         (inferior_call_post_event_object_type)
5286         (register_changed_event_object_type)
5287         (memory_changed_event_object_type): Don't declare or define.
5288         * python/py-inferior.c (new_thread_event_object_type)
5289         (new_inferior_event_object_type)
5290         (inferior_deleted_event_object_type): Don't declare or define.
5291         * python/py-exitedevent.c (exited_event_object_type): Don't
5292         declare or define.
5293         * python/py-evts.c (gdbpy_initialize_py_events): Use
5294         py-all-events.def.
5295         * python/py-events.h (thread_event_object_type): Don't declare.
5296         (events_object): Use py-all-events.def.
5297         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5298         py-event-types.def.
5299         * python/py-event-types.def: New file.
5300         * python/py-continueevent.c (create_continue_event_object): Don't
5301         declare or define.
5302         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5303         declare or define.
5304         * python/py-all-events.def: New file.
5305
5306 2017-09-11  Tom Tromey  <tom@tromey.com>
5307
5308         * python/py-threadevent.c (create_thread_event_object): Return
5309         gdbpy_ref.
5310         * python/py-stopevent.h (create_stop_event_object)
5311         (create_breakpoint_event_object, create_signal_event_object):
5312         Update.
5313         * python/py-stopevent.c (create_stop_event_object): Return
5314         gdbpy_ref.
5315         (emit_stop_event): Update.
5316         * python/py-signalevent.c (create_signal_event_object): Return
5317         gdbpy_ref.
5318         * python/py-infevents.c (create_inferior_call_event_object):
5319         Update.
5320         * python/py-event.h (create_event_object)
5321         (create_thread_event_object): Update.
5322         * python/py-event.c (create_event_object): Return gdbpy_ref.
5323         * python/py-continueevent.c: Return gdbpy_ref.
5324         * python/py-bpevent.c (create_breakpoint_event_object): Return
5325         gdbpy_ref.
5326
5327 2017-09-11  Tom Tromey  <tom@tromey.com>
5328
5329         PR python/15622:
5330         * NEWS: Add entry.
5331         * python/python.c (do_start_initialization): Initialize new event
5332         types.
5333         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5334         (gdbpy_initialize_inferior_deleted_event)
5335         (gdbpy_initialize_new_thread_event): Declare.
5336         * python/py-threadevent.c (create_thread_event_object): Add option
5337         "thread" parameter.
5338         * python/py-inferior.c (new_thread_event_object_type)
5339         (new_inferior_event_object_type)
5340         (inferior_deleted_event_object_type): Declare.
5341         (python_new_inferior, python_inferior_deleted): New functions.
5342         (add_thread_object): Emit new_thread event.
5343         (gdbpy_initialize_inferior): Attach new functions to corresponding
5344         observers.
5345         (new_thread, new_inferior, inferior_deleted): Define new event
5346         types.
5347         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5348         registries.
5349         * python/py-events.h (events_object) <new_inferior,
5350         inferior_deleted, new_thread>: New fields.
5351         * python/py-event.h (create_thread_event_breakpoint): Add optional
5352         "thread" parameter.
5353
5354 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5355
5356         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5357         check current_ui instead.
5358         (internal_vproblem): Likewise.
5359
5360 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5361
5362         * thread.c (print_thread_info_1): Remove unnecessary calls to
5363         uiout->is_mi_like_p.
5364
5365 2017-09-09  Tom Tromey  <tom@tromey.com>
5366
5367         * namespace.h (add_using_directive): Update.
5368         * namespace.c (add_using_directive): Change type of excludes to
5369         std::vector.
5370         * dwarf2read.c (read_import_statement): Use std::vector.
5371         (read_namespace): Update.
5372         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5373
5374 2017-09-09  Tom Tromey  <tom@tromey.com>
5375
5376         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5377
5378 2017-09-09  Tom Tromey  <tom@tromey.com>
5379
5380         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5381
5382 2017-09-09  Tom Tromey  <tom@tromey.com>
5383
5384         * stack.c (func_command): Use gdb::def_vector.
5385
5386 2017-09-09  Tom Tromey  <tom@tromey.com>
5387
5388         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5389         ui_out_emit_list, ui_out_emit_tuple.
5390         (mi_cmd_var_update): Likewise.
5391
5392 2017-09-09  Tom Tromey  <tom@tromey.com>
5393
5394         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5395         ui_out_redirect_pop.
5396         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5397         ui_out_redirect_pop.
5398         * utils.c (do_ui_out_redirect_pop)
5399         (make_cleanup_ui_out_redirect_pop): Remove.
5400         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5401         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5402         * ui-out.h (ui_out_redirect_pop): New class.
5403
5404 2017-09-09  Tom Tromey  <tom@tromey.com>
5405
5406         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5407         (list_available_thread_groups, mi_cmd_list_thread_groups)
5408         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5409         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5410         Likewise.
5411
5412 2017-09-09  Tom Tromey  <tom@tromey.com>
5413
5414         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5415         ui_out_emit_tuple.
5416
5417 2017-09-09  Tom Tromey  <tom@tromey.com>
5418
5419         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5420         * stack.c (print_frame): Use ui_out_emit_tuple.
5421         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5422         (info_spu_mailbox_command, info_spu_dma_command)
5423         (info_spu_proxydma_command): Likewise.
5424         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5425         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5426         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5427         ui_out_emit_tuple.
5428         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5429
5430 2017-09-09  Tom Tromey  <tom@tromey.com>
5431
5432         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5433         (class ui_out_emit_table): Update comment.
5434         * ui-out.c (do_cleanup_table_end)
5435         (make_cleanup_ui_out_table_begin_end): Remove.
5436         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5437         (info_spu_dma_cmdlist): Likewise.
5438         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5439         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5440         ui_out_emit_table.
5441
5442 2017-09-09  Tom Tromey  <tom@tromey.com>
5443
5444         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5445         ui_out_emit_list, gdb::optional.
5446
5447 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5448
5449         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5450         prototype.
5451         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5452         prototype.
5453         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5454         prototype.
5455         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5456         * ada-exp.y: Remove _initialize_ada_exp prototype.
5457         * ada-lang.c: Remove _initialize_ada_language prototype.
5458         * ada-tasks.c: Remove _initialize_tasks prototype.
5459         * addrmap.c: Remove _initialize_addrmap prototype.
5460         * agent.c: Remove _initialize_agent prototype.
5461         * aix-thread.c: Remove _initialize_aix_thread prototype.
5462         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5463         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5464         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5465         prototype.
5466         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5467         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5468         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5469         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5470         prototype.
5471         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5472         prototype.
5473         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5474         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5475         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5476         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5477         prototype.
5478         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5479         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5480         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5481         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5482         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5483         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5484         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5485         prototype.
5486         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5487         prototype.
5488         * annotate.c: Remove _initialize_annotate prototype.
5489         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5490         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5491         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5492         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5493         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5494         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5495         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5496         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5497         prototype.
5498         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5499         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5500         * auto-load.c: Remove _initialize_auto_load prototype.
5501         * auxv.c: Remove _initialize_auxv prototype.
5502         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5503         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5504         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5505         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5506         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5507         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5508         prototype.
5509         * break-catch-throw.c: Remove _initialize_break_catch_throw
5510         prototype.
5511         * breakpoint.c: Remove _initialize_breakpoint prototype.
5512         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5513         * btrace.c: Remove _initialize_btrace prototype.
5514         * charset.c: Remove _initialize_charset prototype.
5515         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5516         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5517         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5518         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5519         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5520         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5521         * coffread.c: Remove _initialize_coffread prototype.
5522         * compile/compile.c: Remove _initialize_compile prototype.
5523         * complaints.c: Remove _initialize_complaints prototype.
5524         * completer.c: Remove _initialize_completer prototype.
5525         * copying.awk: Remove _initialize_copying prototype.
5526         * copying.c: Regenerate.
5527         * core-regset.c: Remove _initialize_core_regset prototype.
5528         * corefile.c: Remove _initialize_core prototype.
5529         * corelow.c: Remove _initialize_corelow prototype.
5530         * cp-abi.c: Remove _initialize_cp_abi prototype.
5531         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5532         * cp-support.c: Remove _initialize_cp_support prototype.
5533         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5534         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5535         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5536         * ctf.c: Remove _initialize_ctf prototype.
5537         * d-lang.c: Remove _initialize_d_language prototype.
5538         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5539         prototype.
5540         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5541         * dbxread.c: Remove _initialize_dbxread prototype.
5542         * dcache.c: Remove _initialize_dcache prototype.
5543         * demangle.c: Remove _initialize_demangler prototype.
5544         * disasm-selftests.c: Remove _initialize_disasm_selftests
5545         prototype.
5546         * disasm.c: Remove _initialize_disasm prototype.
5547         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5548         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5549         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5550         prototype.
5551         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5552         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5553         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5554         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5555         * elfread.c: Remove _initialize_elfread prototype.
5556         * exec.c: Remove _initialize_exec prototype.
5557         * extension.c: Remove _initialize_extension prototype.
5558         * f-lang.c: Remove _initialize_f_language prototype.
5559         * f-valprint.c: Remove _initialize_f_valprint prototype.
5560         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5561         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5562         * filesystem.c: Remove _initialize_filesystem prototype.
5563         * findcmd.c: Remove _initialize_mem_search prototype.
5564         * fork-child.c: Remove _initialize_fork_child prototype.
5565         * frame-base.c: Remove _initialize_frame_base prototype.
5566         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5567         * frame.c: Remove _initialize_frame prototype.
5568         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5569         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5570         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5571         * gcore.c: Remove _initialize_gcore prototype.
5572         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5573         * gdbarch.c: Regenerate.
5574         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5575         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5576         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5577         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5578         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5579         * go-lang.c: Remove _initialize_go_language prototype.
5580         * go32-nat.c: Remove _initialize_go32_nat prototype.
5581         * guile/guile.c: Remove _initialize_guile prototype.
5582         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5583         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5584         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5585         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5586         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5587         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5588         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5589         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5590         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5591         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5592         prototype.
5593         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5594         prototype.
5595         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5596         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5597         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5598         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5599         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5600         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5601         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5602         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5603         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5604         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5605         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5606         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5607         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5608         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5609         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5610         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5611         prototype.
5612         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5613         prototype.
5614         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5615         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5616         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5617         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5618         * infcall.c: Remove _initialize_infcall prototype.
5619         * infcmd.c: Remove _initialize_infcmd prototype.
5620         * inferior.c: Remove _initialize_inferiors prototype.
5621         * inflow.c: Remove _initialize_inflow prototype.
5622         * infrun.c: Remove _initialize_infrun prototype.
5623         * interps.c: Remove _initialize_interpreter prototype.
5624         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5625         * jit.c: Remove _initialize_jit prototype.
5626         * language.c: Remove _initialize_language prototype.
5627         * linux-fork.c: Remove _initialize_linux_fork prototype.
5628         * linux-nat.c: Remove _initialize_linux_nat prototype.
5629         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5630         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5631         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5632         * m2-lang.c: Remove _initialize_m2_language prototype.
5633         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5634         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5635         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5636         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5637         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5638         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5639         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5640         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5641         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5642         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5643         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5644         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5645         * machoread.c: Remove _initialize_machoread prototype.
5646         * macrocmd.c: Remove _initialize_macrocmd prototype.
5647         * macroscope.c: Remove _initialize_macroscope prototype.
5648         * maint.c: Remove _initialize_maint_cmds prototype.
5649         * mdebugread.c: Remove _initialize_mdebugread prototype.
5650         * memattr.c: Remove _initialize_mem prototype.
5651         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5652         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5653         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5654         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5655         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5656         * microblaze-linux-tdep.c: Remove
5657         _initialize_microblaze_linux_tdep prototype.
5658         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5659         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5660         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5661         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5662         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5663         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5664         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5665         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5666         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5667         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5668         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5669         prototype.
5670         * mipsread.c: Remove _initialize_mipsread prototype.
5671         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5672         prototype.
5673         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5674         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5675         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5676         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5677         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5678         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5679         prototype.
5680         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5681         * nto-procfs.c: Remove _initialize_procfs prototype.
5682         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5683         * objc-lang.c: Remove _initialize_objc_language prototype.
5684         * objfiles.c: Remove _initialize_objfiles prototype.
5685         * observer.c: Remove observer_test_first_notification_function,
5686         observer_test_second_notification_function,
5687         observer_test_third_notification_function, and
5688         _initialize_observer prototypes.
5689         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5690         * osabi.c: Remove _initialize_gdb_osabi prototype.
5691         * osdata.c: Remove _initialize_osdata prototype.
5692         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5693         * parse.c: Remove _initialize_parse prototype.
5694         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5695         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5696         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5697         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5698         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5699         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5700         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5701         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5702         * printcmd.c: Remove _initialize_printcmd prototype.
5703         * probe.c: Remove _initialize_probe prototype.
5704         * proc-api.c: Remove _initialize_proc_api prototype.
5705         * proc-events.c: Remove _initialize_proc_events prototype.
5706         * proc-service.c: Remove _initialize_proc_service prototype.
5707         * procfs.c: Remove _initialize_procfs prototype.
5708         * psymtab.c: Remove _initialize_psymtab prototype.
5709         * python/python.c: Remove _initialize_python prototype.
5710         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5711         * record-btrace.c: Remove _initialize_record_btrace prototype.
5712         * record-full.c: Remove _initialize_record_full prototype.
5713         * record.c: Remove _initialize_record prototype.
5714         * regcache.c: Remove _initialize_regcache prototype.
5715         * reggroups.c: Remove _initialize_reggroup prototype.
5716         * remote-notif.c: Remove _initialize_notif prototype.
5717         * remote-sim.c: Remove _initialize_remote_sim prototype.
5718         * remote.c: Remove _initialize_remote prototype.
5719         * reverse.c: Remove _initialize_reverse prototype.
5720         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5721         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5722         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5723         prototype.
5724         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5725         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5726         * rust-exp.y: Remove _initialize_rust_exp prototype.
5727         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5728         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5729         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5730         * score-tdep.c: Remove _initialize_score_tdep prototype.
5731         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5732         prototype.
5733         * ser-go32.c: Remove _initialize_ser_dos prototype.
5734         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5735         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5736         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5737         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5738         * serial.c: Remove _initialize_serial prototype.
5739         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5740         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5741         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5742         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5743         * skip.c: Remove _initialize_step_skip prototype.
5744         * sol-thread.c: Remove _initialize_sol_thread prototype.
5745         * solib-aix.c: Remove _initialize_solib_aix prototype.
5746         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5747         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5748         * solib-frv.c: Remove _initialize_frv_solib prototype.
5749         * solib-spu.c: Remove _initialize_spu_solib prototype.
5750         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5751         * solib-target.c: Remove _initialize_solib_target prototype.
5752         * solib.c: Remove _initialize_solib prototype.
5753         * source.c: Remove _initialize_source prototype.
5754         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5755         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5756         prototype.
5757         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5758         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5759         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5760         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5761         prototype.
5762         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5763         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5764         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5765         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5766         prototype.
5767         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5768         prototype.
5769         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5770         prototype.
5771         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5772         prototype.
5773         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5774         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5775         prototype.
5776         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5777         prototype.
5778         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5779         prototype.
5780         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5781         prototype.
5782         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5783         prototype.
5784         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5785         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5786         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5787         * stabsread.c: Remove _initialize_stabsread prototype.
5788         * stack.c: Remove _initialize_stack prototype.
5789         * stap-probe.c: Remove _initialize_stap_probe prototype.
5790         * std-regs.c: Remove _initialize_frame_reg prototype.
5791         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5792         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5793         * symfile.c: Remove _initialize_symfile prototype.
5794         * symmisc.c: Remove _initialize_symmisc prototype.
5795         * symtab.c: Remove _initialize_symtab prototype.
5796         * target-dcache.c: Remove _initialize_target_dcache prototype.
5797         * target-descriptions.c: Remove _initialize_target_descriptions
5798         prototype.
5799         * thread.c: Remove _initialize_thread prototype.
5800         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5801         prototype.
5802         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5803         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5804         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5805         prototype.
5806         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5807         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5808         * tracefile.c: Remove _initialize_tracefile prototype.
5809         * tracepoint.c: Remove _initialize_tracepoint prototype.
5810         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5811         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5812         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5813         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5814         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5815         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5816         * tui/tui.c: Remove _initialize_tui prototype.
5817         * typeprint.c: Remove _initialize_typeprint prototype.
5818         * user-regs.c: Remove _initialize_user_regs prototype.
5819         * utils.c: Remove _initialize_utils prototype.
5820         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5821         * valarith.c: Remove _initialize_valarith prototype.
5822         * valops.c: Remove _initialize_valops prototype.
5823         * valprint.c: Remove _initialize_valprint prototype.
5824         * value.c: Remove _initialize_values prototype.
5825         * varobj.c: Remove _initialize_varobj prototype.
5826         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5827         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5828         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5829         * windows-nat.c: Remove _initialize_windows_nat,
5830         _initialize_check_for_gdb_ini, and _initialize_loadable
5831         prototypes.
5832         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5833         * xcoffread.c: Remove _initialize_xcoffread prototype.
5834         * xml-support.c: Remove _initialize_xml_support prototype.
5835         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5836         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5837         prototype.
5838         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5839         prototype.
5840         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5841
5842 2017-09-08  Keith Seitz  <keiths@redhat.com>
5843
5844         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5845         field.
5846
5847 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5848
5849         * f-valprint.c (f_val_print): Remove check for one byte
5850         sized integers. Remove printing of character type.
5851
5852 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5853             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5854             Bernhard Heckel  <bernhard.heckel@intel.com>
5855
5856         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5857         to maintain proper indentation when printing pointers/refs.
5858
5859 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5860
5861         GDB 8.0.1 released.
5862
5863 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5864
5865         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5866
5867 2017-09-05  Tom Tromey  <tom@tromey.com>
5868
5869         * parse.c (funcall_chain): Now a std::vector.
5870         (start_arglist, end_arglist): Simplify.
5871         (free_funcalls): Remove.
5872         (parse_exp_in_context_1): Remove cleanup.
5873
5874 2017-09-05  Tom Tromey  <tom@tromey.com>
5875
5876         * go-exp.y (go_parse): Don't create a cleanup.
5877
5878 2017-09-05  Tom Tromey  <tom@tromey.com>
5879
5880         * d-exp.y (PrimaryExpression): Use std::string.
5881         (d_parse): Don't create a cleanup.
5882
5883 2017-09-05  Tom Tromey  <tom@tromey.com>
5884
5885         * utils.c (do_clear_parser_state): Remove.
5886         (make_cleanup_clear_parser_state): Remove.
5887         * p-exp.y (pascal_parse): Use scoped_restore.
5888         * m2-exp.y (m2_parse): Use scoped_restore.
5889         * f-exp.y (f_parse): Use scoped_restore.
5890         * d-exp.y (d_parse): Use scoped_restore.
5891         * c-exp.y (c_parse): Use scoped_restore.
5892         * ada-exp.y (ada_parse): Use scoped_restore.
5893         * utils.h (make_cleanup_clear_parser_state): Remove.
5894
5895 2017-09-06  Keith Seitz  <keiths@redhat.com>
5896
5897         * dwarf2read.c (dw2_linkage_name_attr): New function.
5898         (dw2_linkage_name): New function.
5899         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5900         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5901         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5902
5903 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5904
5905         * config/djgpp/djconfig.sh: Correct shell portability issue.
5906
5907 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5908
5909         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5910
5911 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5912
5913         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5914         * NEWS: Mention new FreeBSD/mips native configuration.
5915         * configure.host: Add aarch64*-*-freebsd*.
5916         * configure.nat: Likewise.
5917         * aarch64-fbsd-nat.c: New file.
5918
5919 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5920
5921         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5922         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5923         * NEWS: Mention new FreeBSD/aarch64 target.
5924         * configure.tgt: Add aarch64*-*-freebsd*.
5925         * aarch64-fbsd-tdep.c: New file.
5926         * aarch64-fbsd-tdep.h: New file.
5927
5928 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5929
5930         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5931
5932 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5933
5934         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5935         of TLS symbols.
5936
5937 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5938
5939         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5940         call.
5941
5942 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5943
5944         * infrun.c (follow_exec): Call add_thread after
5945         target_find_description.
5946
5947 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5948
5949         * infrun.c (handle_inferior_event_1): When exec'ing, read
5950         stop_pc after follow_exec.
5951
5952 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5953
5954         * remote.c (process_g_packet): Update error message.
5955
5956 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5957
5958         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5959         targets.
5960
5961 2017-09-05  Pedro Alves  <palves@redhat.com>
5962
5963         * eval.c (eval_call, evaluate_funcall): New functions, factored
5964         out from ...
5965         (evaluate_subexp_standard): ... this.
5966
5967 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5968
5969         * amd64-tdep.c (amd64_target_description): Create target
5970         descriptions.
5971         (_initialize_amd64_tdep): Don't call functions
5972         initialize_tdesc_amd64_*.  Add self tests.
5973         * arch/amd64.c (amd64_create_target_description): Add parameter
5974         is_linux.  Call set_tdesc_osabi if is_linux is true.
5975         * arch/amd64.h (amd64_create_target_description): Update the
5976         declaration.
5977         * arch/i386.c (i386_create_target_description): Add parameter
5978         is_linux.  Call set_tdesc_osabi if is_linux is true.
5979         * arch/i386.h (i386_create_target_description): Update
5980         declaration.
5981         * configure.tgt: Add i386.o to gdb_target_obs.
5982         * features/Makefile (XMLTOC): Remove i386/*.xml.
5983         * features/i386/amd64-avx-avx512.c: Remove.
5984         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5985         * features/i386/amd64-avx-mpx.c: Remove.
5986         * features/i386/amd64-avx.c: Remove.
5987         * features/i386/amd64-mpx.c: Remove.
5988         * features/i386/amd64.c: Remove.
5989         * features/i386/i386-avx-avx512.c: Remove.
5990         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5991         * features/i386/i386-avx-mpx.c: Remove.
5992         * features/i386/i386-avx.c: Remove.
5993         * features/i386/i386-mmx.c: Remove.
5994         * features/i386/i386-mpx.c: Remove.
5995         * features/i386/i386.c: Remove.
5996         * i386-tdep.c: Don't include features/i386/i386*.c., include
5997         target-descriptions.h and arch/i386.h.
5998         (i386_target_description): Create target descriptions.
5999         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6000         functions.  Do self tests.
6001
6002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6003
6004         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6005         * features/i386/amd64-avx-avx512-linux.c: Removed.
6006         * features/i386/amd64-avx-linux.c: Removed.
6007         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6008         * features/i386/amd64-avx-mpx-linux.c: Removed.
6009         * features/i386/amd64-linux.c: Removed.
6010         * features/i386/amd64-mpx-linux.c: Removed.
6011         * features/i386/x32-avx-avx512-linux.c: Removed.
6012         * features/i386/x32-avx-linux.c: Removed.
6013         * features/i386/x32-linux.c: Removed.
6014
6015 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6016
6017         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6018         features/i386/*.c.
6019         (amd64_linux_read_description): Call
6020         amd64_create_target_description.
6021         * arch/amd64.c: New file.
6022         * arch/amd64.h: New file.
6023         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6024         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6025
6026 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6027
6028         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6029         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6030         (amd64_linux_read_description): Create target descriptions.
6031         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6032         functions.  Add unit tests.
6033         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6034         x32-core.xml.
6035         * features/i386/64bit-avx.c: Generated.
6036         * features/i386/64bit-avx512.c: Generated.
6037         * features/i386/64bit-core.c: Generated.
6038         * features/i386/64bit-linux.c: Generated.
6039         * features/i386/64bit-mpx.c: Generated.
6040         * features/i386/64bit-pkeys.c: Generated.
6041         * features/i386/64bit-segments.c: Generated.
6042         * features/i386/64bit-sse.c: Generated.
6043         * features/i386/x32-core.c: Generated.
6044         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6045         c files for amd64-linux and x32-linux.
6046
6047 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6048
6049         * amd64-linux-tdep.c (amd64_linux_read_description): New
6050         function.
6051         (amd64_linux_core_read_description): Call
6052         amd64_linux_read_description.
6053         (amd64_linux_init_abi): Likewise.
6054         (amd64_x32_linux_init_abi): Likewise.
6055         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6056         * x86-linux-nat.c (x86_linux_read_description): Call
6057         amd64_linux_read_description.
6058
6059 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6060
6061         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6062         comments.
6063
6064 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6065
6066         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6067         * features/i386/i386-avx-avx512-linux.c: Remove.
6068         * features/i386/i386-avx-linux.c: Remove.
6069         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6070         * features/i386/i386-avx-mpx-linux.c: Remove.
6071         * features/i386/i386-linux.c: Remove.
6072         * features/i386/i386-mmx-linux.c: Remove.
6073         * features/i386/i386-mpx-linux.c: Remove.
6074
6075 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6076
6077         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6078         (SFILES): Add arch/i386.c.
6079         (HFILES_NO_SRCDIR): Add arch/i386.h.
6080         * arch/i386.c: New file.
6081         * arch/i386.h: New file.
6082         * arch/tdesc.h (allocate_target_description): Declare.
6083         (set_tdesc_architecture): Declare.
6084         (set_tdesc_osabi): Declare.
6085         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6086         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6087         include arch/i386.h.
6088         (i386_linux_read_description): Remove code and call
6089         i386_create_target_description.
6090         (set_tdesc_architecture): New function.
6091         (set_tdesc_osabi): New function.
6092         * target-descriptions.h (allocate_target_description): Remove.
6093
6094 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6095
6096         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6097         * target-descriptions.c (tdesc_create_feature): Likewise, and
6098         adjust code.
6099         * features/i386/32bit-avx.c: Re-generated.
6100         * features/i386/32bit-avx512.c: Re-generated.
6101         * features/i386/32bit-core.c: Re-generated.
6102         * features/i386/32bit-linux.c: Re-generated.
6103         * features/i386/32bit-mpx.c: Re-generated.
6104         * features/i386/32bit-pkeys.c: Re-generated.
6105         * features/i386/32bit-sse.c: Re-generated.
6106
6107 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6108
6109         * regformats/regdef.h (struct reg): Override operator == and !=.
6110
6111 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6112
6113         * arch/tdesc.h: New file.
6114         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6115         * target-descriptions.c: Update comments.
6116         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6117         declarations.
6118         * features/i386/32bit-avx.c: Re-generated.
6119         * features/i386/32bit-avx512.c: Re-generated.
6120         * features/i386/32bit-core.c: Re-generated.
6121         * features/i386/32bit-linux.c: Re-generated.
6122         * features/i386/32bit-mpx.c: Re-generated.
6123         * features/i386/32bit-pkeys.c: Re-generated.
6124         * features/i386/32bit-sse.c: Re-generated.
6125
6126 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6127
6128         * regformats/regdat.sh: Update generated code.
6129
6130 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6131
6132         * regformats/regdat.sh: Adjust code order.
6133
6134 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6135
6136         * expprint.c (dump_subexp_body_standard): Use constant format
6137         string in fprintf_filtered call.
6138
6139 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6140
6141         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6142         NetBSD/i386.
6143         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6144
6145 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6146
6147         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6148
6149 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6150
6151         * bsd-kvm.o: Define _KMEMUSER.
6152         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6153         * configure: Regenerate.
6154
6155 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6156
6157         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6158         * i386-fbsd-nat.c: Likewise.
6159
6160 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6161
6162         * unittests/array-view-selftests.c: Add include of <array>.
6163
6164 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6165
6166         * spu-tdep.c (flush_ea_cache): Add missing argument to
6167         call_function_by_hand.
6168
6169 2017-09-04  Pedro Alves  <palves@redhat.com>
6170
6171         * NEWS (Safer support for debugging with no debug info): New.
6172
6173 2017-09-04  Pedro Alves  <palves@redhat.com>
6174
6175         * c-exp.y (function_method, function_method_void): Add current
6176         instance flags to TYPE_INSTANCE.
6177         * dwarf2read.c (check_modifier): New.
6178         (compute_delayed_physnames): Assert that only C++ adds delayed
6179         physnames.  Mark fn_fields as const/volatile depending on
6180         physname.
6181         * eval.c (make_params): New type_instance_flags parameter.  Use
6182         it as the new type's instance flags.
6183         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6184         flags element and pass it to make_params.
6185         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6186         instance flags element.
6187         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6188         * gdbtypes.h: Include "enum-flags.h".
6189         (type_instance_flags): New enum-flags type.
6190         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6191         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6192         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6193         (follow_type_instance_flags): New function.
6194         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6195         * parser-defs.h (follow_type_instance_flags): Declare.
6196         * valops.c (value_struct_elt_for_reference): const/volatile must
6197         match too.
6198
6199 2017-09-04  Pedro Alves  <palves@redhat.com>
6200
6201         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6202         function/method scopes; lookup the nested name as a function local
6203         static variable.
6204
6205 2017-09-04  Pedro Alves  <palves@redhat.com>
6206
6207         (%type <voidval>): Add function_method.
6208         * c-exp.y (exp): New production for calls with no arguments.
6209         (function_method, function_method_void_or_typelist): New
6210         productions.
6211         (exp): New production for "method()::static_var".
6212         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6213         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6214         Handle OP_FUNC_STATIC_VAR.
6215         * parse.c (operator_length_standard):
6216         Handle OP_FUNC_STATIC_VAR.
6217
6218 2017-09-04  Pedro Alves  <palves@redhat.com>
6219
6220         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6221         handling.
6222         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6223         Ditto.
6224         * parse.c (operator_length_standard, operator_check_standard):
6225         Ditto.
6226         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6227
6228 2017-09-04  Pedro Alves  <palves@redhat.com>
6229
6230         * ax-gdb.c: Include "typeprint.h".
6231         (gen_expr_for_cast): New function.
6232         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6233         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6234         type is unknown.
6235         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6236         nodebug_data_symbol.
6237         * eval.c: Include "typeprint.h".
6238         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6239         Error out if symbol has unknown type.
6240         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6241         evaluate_subexp_for_cast.
6242         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6243         OP_VAR_MSYM_VALUE.
6244         (evaluate_subexp_for_cast): New function.
6245         * gdbtypes.c (init_nodebug_var_type): New function.
6246         (objfile_type): Use it to initialize types of variables with no
6247         debug info.
6248         * typeprint.c (error_unknown_type): New.
6249         * typeprint.h (error_unknown_type): New declaration.
6250         * compile/compile-c-types.c (convert_type_basic): Handle
6251         TYPE_CODE_ERROR; warn and fallback to int for variables with
6252         unknown type.
6253
6254 2017-09-04  Pedro Alves  <palves@redhat.com>
6255
6256         * eval.c (evaluate_var_value): New function, factored out from ...
6257         (evaluate_subexp_standard): ... here.
6258
6259 2017-09-04  Pedro Alves  <palves@redhat.com>
6260
6261         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6262         Remove useless assignments to 'op'.
6263
6264 2017-09-04  Pedro Alves  <palves@redhat.com>
6265
6266         * eval.c (eval_skip_value): New function.
6267         (evaluate_subexp_standard): Use it.
6268
6269 2017-09-04  Pedro Alves  <palves@redhat.com>
6270
6271         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6272         function name from symbol/minsym and pass it to
6273         error_call_unknown_return_type.
6274
6275 2017-09-04  Pedro Alves  <palves@redhat.com>
6276
6277         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6278         * ax-gdb.c (gen_msym_var_ref): New function.
6279         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6280         * eval.c (evaluate_var_msym_value): New function.
6281         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6282         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6283         to call_function_by_hand.
6284         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6285         Handle OP_VAR_MSYM_VALUE.
6286         (union exp_element) <msymbol>: New field.
6287         * minsyms.h (struct type): Forward declare.
6288         (find_minsym_type_and_address): Declare.
6289         * parse.c (write_exp_elt_msym): New function.
6290         (write_exp_msymbol): Delete, refactored as ...
6291         (find_minsym_type_and_address): ... this new function.
6292         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6293         (operator_length_standard, operator_check_standard): Handle
6294         OP_VAR_MSYM_VALUE.
6295         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6296
6297 2017-09-04  Pedro Alves  <palves@redhat.com>
6298
6299         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6300         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6301         unknown.
6302         * ada-typeprint.c (print_func_type): Handle functions with unknown
6303         return type.
6304         * c-typeprint.c (c_type_print_base): Handle functions and methods
6305         with unknown return type.
6306         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6307         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6308         * compile/compile-c-types.c: Include "objfiles.h".
6309         (convert_func): For functions with unknown return type, warn and
6310         default to int.
6311         * compile/compile-object-run.c (compile_object_run): Adjust call
6312         to call_function_by_hand_dummy.
6313         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6314         call_function_by_hand.
6315         * eval.c (evaluate_subexp_standard): Adjust calls to
6316         call_function_by_hand.  Handle functions and methods with unknown
6317         return type.  Pass expect_type to call_function_by_hand.
6318         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6319         return type.
6320         * gcore.c (call_target_sbrk): Adjust call to
6321         call_function_by_hand.
6322         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6323         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6324         an integer address type instead of nodebug.
6325         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6326         call_function_by_hand.
6327         * infcall.c (error_call_unknown_return_type): New function.
6328         (call_function_by_hand): New "default_return_type" parameter.
6329         Pass it down.
6330         (call_function_by_hand_dummy): New "default_return_type"
6331         parameter.  Use it instead of defaulting to int.  If there's no
6332         default and the return type is unknown, throw an error.  If
6333         there's a default return type, and the called function has no
6334         debug info, then assume the function is prototyped.
6335         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6336         New "default_return_type" parameter.
6337         (error_call_unknown_return_type): New declaration.
6338         * linux-fork.c (call_lseek): Cast return type of lseek.
6339         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6340         call_function_by_hand.
6341         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6342         calls to call_function_by_hand.
6343         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6344         return type.
6345         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6346         (value_nsstring, print_object_command): Adjust calls to
6347         call_function_by_hand.
6348         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6349         functions with unknown return type.
6350         (pascal_type_print_func_varspec_suffix): New function.
6351         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6352         TYPE_CODE_METHOD>: Use it.
6353         * python/py-value.c (valpy_call): Adjust call to
6354         call_function_by_hand.
6355         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6356         call_function_by_hand.
6357         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6358         call_function_by_hand.
6359         * valops.c (value_allocate_space_in_inferior): Adjust call to
6360         call_function_by_hand.
6361         * typeprint.c (type_print_unknown_return_type): New function.
6362         * typeprint.h (type_print_unknown_return_type): New declaration.
6363
6364 2017-09-04  Pedro Alves  <palves@redhat.com>
6365
6366         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6367         types with more than one parameter as prototyped.
6368
6369 2017-09-04  Pedro Alves  <palves@redhat.com>
6370
6371         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6372         (disassemble_command): Use gdb_disassembly_flags instead of bare
6373         int.
6374         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6375         (dump_insns, do_mixed_source_and_assembly_deprecated)
6376         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6377         Use gdb_disassembly_flags instead of bare int.
6378         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6379         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6380         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6381         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6382         (enum gdb_disassembly_flag): ... values of this new enumeration.
6383         (gdb_disassembly_flags): Define.
6384         (gdb_disassembly)
6385         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6386         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6387         gdb_disassembly_flags instead of bare int.
6388         * record-btrace.c (btrace_insn_history)
6389         (record_btrace_insn_history, record_btrace_insn_history_range)
6390         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6391         instead of bare int.
6392         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6393         Use gdb_disassembly_flags instead of bare int.
6394         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6395         Define.
6396         * target-delegates.c: Regenerate.
6397         * target.c (target_insn_history, target_insn_history_from)
6398         (target_insn_history_range): Use gdb_disassembly_flags instead of
6399         bare int.
6400         * target.h: Include "disasm.h".
6401         (struct target_ops) <to_insn_history, to_insn_history_from,
6402         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6403         int.
6404         (target_insn_history, target_insn_history_from)
6405         (target_insn_history_range): Use gdb_disassembly_flags instead of
6406         bare int.
6407
6408 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6409
6410         * cli/cli-script.c (build_command_line): For if/while commands,
6411         check whether args is empty.
6412
6413 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6414
6415         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6416         (enum command_control_type): Likewise.
6417         (struct command_line): Likewise.
6418         (free_command_lines): Likewise.
6419         (struct command_lines_deleter): Likewise.
6420         (command_line_up): Likewise.
6421         (read_command_lines): Likewise.
6422         (read_command_lines_1): Likewise.
6423         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6424         (enum command_control_type): Likewise.
6425         (struct command_line): Likewise.
6426         (free_command_lines): Likewise.
6427         (struct command_lines_deleter): Likewise.
6428         (command_line_up): Likewise.
6429         (read_command_lines): Likewise.
6430         (read_command_lines_1): Likewise.
6431         * breakpoint.h: Include cli/cli-script.h.
6432         * extension-priv.h: Likewise.
6433         * gdbcmd.h: Likewise.
6434
6435 2017-09-04  Pedro Alves  <palves@redhat.com>
6436
6437         * ada-lang.c (is_known_support_routine): Move sal declaration to
6438         where it is initialized.
6439         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6440         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6441         (clear_command, update_static_tracepoint): Remove init_sal
6442         references.  Move declarations closer to initializations.
6443         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6444         initializations.
6445         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6446         references.  Move sal declarations closer to initializations.
6447         * frame.c (find_frame_sal): Return a symtab_and_line via function
6448         return instead of output parameter.  Remove init_sal references.
6449         * frame.h (find_frame_sal): Return a symtab_and_line via function
6450         return instead of output parameter.
6451         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6452         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6453         instead of memset.
6454         (gdbscm_find_pc_line): Remove init_sal reference.
6455         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6456         references.  Move declarations closer to initializations.
6457         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6458         initializations.
6459         (finish_backward): Remove init_sal references.  Move declarations
6460         closer to initializations.
6461         * infrun.c (process_event_stop_test, handle_step_into_function)
6462         (insert_hp_step_resume_breakpoint_at_frame)
6463         (insert_step_resume_breakpoint_at_caller): Likewise.
6464         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6465         (symbol_to_sal): Likewise.
6466         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6467         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6468         to its initialization.
6469         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6470         init_sal references.  Move declarations closer to initializations.
6471         * source.c (get_current_source_symtab_and_line): Remove brace
6472         initialization.
6473         (set_current_source_symtab_and_line): Now takes the sal by const
6474         reference.  Remove brace initialization.
6475         (line_info): Remove init_sal reference.
6476         * source.h (set_current_source_symtab_and_line): Now takes a
6477         symtab_and_line via const reference.
6478         * stack.c (set_current_sal_from_frame): Adjust.
6479         (print_frame_info): Adjust.
6480         (get_last_displayed_sal): Return the sal via function return
6481         instead of via output parameter.  Simplify.
6482         (frame_info): Adjust.
6483         * stack.h (get_last_displayed_sal): Return the sal via function
6484         return instead of via output parameter.
6485         * symtab.c (init_sal): Delete.
6486         (find_pc_sect_line): Remove init_sal references.  Move
6487         declarations closer to initializations.
6488         (find_function_start_sal): Remove init_sal references.  Move
6489         declarations closer to initializations.
6490         * symtab.h (struct symtab_and_line): In-class initialize all
6491         fields.
6492         * tracepoint.c (set_traceframe_context)
6493         (print_one_static_tracepoint_marker): Remove init_sal references.
6494         Move declarations closer to initializations.
6495         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6496         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6497         declarations closer to initializations.
6498         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6499         init_sal references.  Adjust.
6500
6501 2017-09-04  Pedro Alves  <palves@redhat.com>
6502
6503         * ax-gdb.c (agent_command_1): Use range-for.
6504         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6505         * breakpoint.c: Include "common/array-view.h".
6506         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6507         parameter from struct symtabs_and_lines to
6508         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6509         (breakpoint_sals_to_pc): Change sals parameter from struct
6510         symtabs_and_lines to std::vector reference.
6511         (check_fast_tracepoint_sals): Change sals parameter from struct
6512         symtabs_and_lines to std::array_view.  Use range-for.
6513         (decode_static_tracepoint_spec): Return a std::vector instead of
6514         symtabs_and_lines.  Update.
6515         (create_breakpoint): Update.
6516         (break_range_command, until_break_command, clear_command): Update.
6517         (base_breakpoint_decode_location, bkpt_decode_location)
6518         (bkpt_probe_create_sals_from_location)
6519         (bkpt_probe_decode_location, tracepoint_decode_location)
6520         (tracepoint_probe_decode_location)
6521         (strace_marker_create_sals_from_location): Return a std::vector
6522         instead of symtabs_and_lines.
6523         (strace_marker_create_breakpoints_sal): Update.
6524         (strace_marker_decode_location): Return a std::vector instead of
6525         symtabs_and_lines.  Update.
6526         (update_breakpoint_locations): Change struct symtabs_and_lines
6527         parameters to gdb::array_view.  Adjust.
6528         (location_to_sals): Return a std::vector instead of
6529         symtabs_and_lines.  Update.
6530         (breakpoint_re_set_default): Use std::vector instead of struct
6531         symtabs_and_lines.
6532         (decode_location_default): Return a std::vector instead of
6533         symtabs_and_lines.  Update.
6534         * breakpoint.h: Include "common/array-view.h".
6535         (struct breakpoint_ops) <decode_location>: Now returns a
6536         std::vector instead of returning a symtabs_and_lines via output
6537         parameter.
6538         (update_breakpoint_locations): Change sals parameters to use
6539         gdb::array_view.
6540         * cli/cli-cmds.c (edit_command, list_command): Update to use
6541         std::vector and gdb::array_view.
6542         (ambiguous_line_spec): Adjust to use gdb::array_view and
6543         range-for.
6544         (compare_symtabs): Rename to ...
6545         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6546         const reference and adjust.
6547         (filter_sals): Rewrite using std::vector and standard algorithms.
6548         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6549         (jump_command): Update to use std::vector.
6550         * linespec.c (struct linespec_state) <canonical_names>: Update
6551         comment.
6552         (add_sal_to_sals_basic): Delete.
6553         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6554         (decode_line_2, create_sals_line_offset)
6555         (convert_address_location_to_sals, convert_linespec_to_sals)
6556         (convert_explicit_location_to_sals, parse_linespec)
6557         (event_location_to_sals, decode_line_full, decode_line_1)
6558         (decode_line_with_current_source)
6559         (decode_line_with_last_displayed, decode_objc)
6560         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6561         (linespec_result::~linespec_result): Adjust to use std::vector
6562         instead of symtabs_and_lines.
6563         * linespec.h (linespec_sals::sals): Now a std::vector.
6564         (struct linespec_result): Use std::vector, bool, and in-class
6565         initialization.
6566         (decode_line_1, decode_line_with_current_source)
6567         (decode_line_with_last_displayed): Return std::vector.
6568         * macrocmd.c (info_macros_command): Use std::vector.
6569         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6570         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6571         std::vector.
6572         * probe.h (parse_probes): Return a std::vector.
6573         * python/python.c (gdbpy_decode_line): Use std::vector and
6574         gdb::array_view.
6575         * source.c (select_source_symtab, line_info): Use std::vector.
6576         * stack.c (func_command): Use std::vector.
6577         * symtab.h (struct symtabs_and_lines): Delete.
6578         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6579
6580 2017-09-04  Pedro Alves  <palves@redhat.com>
6581
6582         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6583         unittests/array-view-selftests.c.
6584         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6585         * common/array-view.h: New file.
6586         * unittests/array-view-selftests.c: New file.
6587
6588 2017-09-04  Pedro Alves  <palves@redhat.com>
6589
6590         * cli/cli-cmds.c (edit_command): Pass message to
6591         ambiguous_line_spec.
6592         (list_command): Pass message to ambiguous_line_spec.  Say
6593         "first"/"last" instead of "start" and "end" to be consistent with
6594         the manual.
6595         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6596         them to print formatted message.
6597
6598 2017-09-04  Pedro Alves  <palves@redhat.com>
6599
6600         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6601         ftrace_update_insns by reference instead of pointer.
6602
6603 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6604
6605         * i386-go32-tdep.c: Include x86-xstate.h.
6606         (i386_go32_init_abi): Call i386_target_description.
6607         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6608         if xcr0 is X86_XSTATE_X87_MASK.
6609         * i386-tdep.h (tdesc_i386): Remove the declaration.
6610         (tdesc_i386_mmx): Likewise.
6611
6612 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6613
6614         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6615         X86_XSTATE_SSE_MASK instead of 0.
6616
6617 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6618
6619         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6620         i386_target_description.
6621         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6622         i386_target_description.
6623         * i386-tdep.c (i386_gdbarch_init): Likewise.
6624
6625 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6626
6627         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6628         (x86_darwin_init_abi_64): Call amd64_target_description.
6629         * amd64-dicos-tdep.c: Likewise.
6630         * amd64-fbsd-nat.c: Likewise.
6631         * amd64-fbsd-tdep.c: Likewise.
6632         * amd64-nbsd-tdep.c: Likewise.
6633         * amd64-obsd-tdep.c: Likewise.
6634         * amd64-sol2-tdep.c: Likewise.
6635         * amd64-windows-tdep.c: Likewise.
6636         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6637
6638 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6639
6640         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6641         (btrace_function) <insn>: Change type to use std::vector.
6642         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6643         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6644         ftrace_update_insns, ftrace_compute_global_level_offset,
6645         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6646         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6647         change to std::vector.
6648         (ftrace_update_insns): Adjust to change to std::vector, change
6649         type of INSN parameter.
6650         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6651         * record-btrace.c (btrace_call_history_insn_range,
6652         btrace_compute_src_line_range,
6653         record_btrace_frame_prev_register): Adjust to change to
6654         std::vector.
6655         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6656         to change to std::vector.
6657
6658 2017-09-03  Tom Tromey  <tom@tromey.com>
6659
6660         * corefile.c (reopen_exec_file): Use std::string.
6661
6662 2017-09-03  Tom Tromey  <tom@tromey.com>
6663
6664         * compile/compile.c (compile_register_name_mangled): Return
6665         std::string.
6666         * compile/compile-loc2c.c (pushf_register_address): Update.
6667         (pushf_register): Update.
6668         * compile/compile-c-types.c (convert_array): Update.
6669         * compile/compile-c-symbols.c (generate_vla_size): Update.
6670         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6671         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6672         (convert_one_symbol): Update.
6673         (generate_c_for_for_one_variable): Update.
6674         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6675         std::string.
6676         (generate_register_struct): Update.
6677         * compile/compile-internal.h (c_get_range_decl_name): Return a
6678         std::string.
6679         (compile_register_name_mangled): Return std::string.
6680
6681 2017-09-03  Tom Tromey  <tom@tromey.com>
6682
6683         * utils.c (perror_string): Return a std::string.
6684         (throw_perror_with_name, perror_warning_with_name): Update.
6685
6686 2017-09-03  Tom Tromey  <tom@tromey.com>
6687
6688         * demangle.c (demangle_command): Use std::string,
6689         unique_xmalloc_ptr.
6690
6691 2017-09-03  Tom Tromey  <tom@tromey.com>
6692
6693         * cli/cli-setshow.c (do_set_command): Use std::string.
6694
6695 2017-09-03  Tom Tromey  <tom@tromey.com>
6696
6697         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6698
6699 2017-09-03  Tom Tromey  <tom@tromey.com>
6700
6701         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6702
6703 2017-09-03  Tom Tromey  <tom@tromey.com>
6704
6705         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6706         gdb::unique_xmalloc_ptr.
6707
6708 2017-09-03  Tom Tromey  <tom@tromey.com>
6709
6710         * thread.c (print_thread_info_1): Use string_printf.
6711         (thread_apply_command, thread_apply_all_command): Use
6712         std::string.
6713
6714 2017-09-03  Tom Tromey  <tom@tromey.com>
6715
6716         * valprint.c (val_print_string): Update.
6717         * gdbcore.h (memory_error_message): Return std::string.
6718         * corefile.c (memory_error_message): Return std::string.
6719         (memory_error): Update.
6720         * breakpoint.c (insert_bp_location): Update.
6721
6722 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6723
6724         * target/waitstatus.h (target_waitstatus_to_string): Change
6725         return type to std::string.
6726         * target/waitstatus.c (target_waitstatus_to_string): Return
6727         std::string.
6728         * target.h (target_waitstatus_to_string): Remove declaration.
6729         * infrun.c (resume, clear_proceed_status_thread,
6730         print_target_wait_results, do_target_wait, save_waitstatus,
6731         stop_all_threads): Adjust.
6732         * record-btrace.c (record_btrace_wait): Adjust.
6733         * target-debug.h
6734         (target_debug_print_struct_target_waitstatus_p): Adjust.
6735
6736 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6737
6738         PR gdb/22046
6739         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6740         detection.
6741
6742 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6743
6744         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6745         for setting/unsetting environment variables on the remote target.
6746         (New remote packets): Add entries for QEnvironmentHexEncoded,
6747         QEnvironmentUnset and QEnvironmentReset.
6748         * common/environ.c (gdb_environ::operator=): Extend method to
6749         handle m_user_set_env_list and m_user_unset_env_list.
6750         (gdb_environ::clear): Likewise.
6751         (match_var_in_string): Change type of first parameter from 'char
6752         *' to 'const char *'.
6753         (gdb_environ::set): Extend method to handle
6754         m_user_set_env_list and m_user_unset_env_list.
6755         (gdb_environ::unset): Likewise.
6756         (gdb_environ::clear_user_set_env): New method.
6757         (gdb_environ::user_set_envp): Likewise.
6758         (gdb_environ::user_unset_envp): Likewise.
6759         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6760         m_user_unset_env_list on move constructor/assignment.
6761         (unset): Add new default parameter 'update_unset_list = true'.
6762         (clear_user_set_env): New method.
6763         (user_set_envp): Likewise.
6764         (user_unset_envp): Likewise.
6765         (m_user_set_env_list): New std::set.
6766         (m_user_unset_env_list): Likewise.
6767         * common/rsp-low.c (hex2str): New function.
6768         (bin2hex): New overload for bin2hex function.
6769         * common/rsp-low.c (hex2str): New prototype.
6770         (str2hex): New overload prototype.
6771         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6772         QEnvironmentUnset and QEnvironmentReset.
6773         (remote_protocol_features): Add QEnvironmentHexEncoded,
6774         QEnvironmentUnset and QEnvironmentReset packets.
6775         (send_environment_packet): New function.
6776         (extended_remote_environment_support): Likewise.
6777         (extended_remote_create_inferior): Call
6778         extended_remote_environment_support.
6779         (_initialize_remote): Add QEnvironmentHexEncoded,
6780         QEnvironmentUnset and QEnvironmentReset packet configs.
6781         * unittests/environ-selftests.c (gdb_selftest_env_var):
6782         New variable.
6783         (test_vector_initialization): New function.
6784         (test_init_from_host_environ): Likewise.
6785         (test_reinit_from_host_environ): Likewise.
6786         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6787         Likewise.
6788         (test_unset_set_empty_vector): Likewise.
6789         (test_vector_clear): Likewise.
6790         (test_std_move): Likewise.
6791         (test_move_constructor):
6792         (test_self_move): Likewise.
6793         (test_set_unset_reset): Likewise.
6794         (run_tests): Rewrite in terms of the functions above.
6795
6796 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6797
6798         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6799         (adi_available): Use a temp variable of type CORE_ADDR as argument
6800         3 when calling target_auxv_search.
6801         (adi_normalize_address): Use masks and xor operators to calculate
6802         normalized address.
6803         (adi_read_versions, adi_write_versions, adi_print_versions)
6804         (do_examine, do_assign): Use paddress.
6805
6806 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6807
6808         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6809         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6810         out of loop and add supply of FIR.
6811         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6812         add collect of FIR.
6813
6814 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6815
6816         PR gdb/21827
6817         * cli/cli-script.c (define_command): Don't convert command name
6818         to lower case.
6819
6820 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6821
6822         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6823         Update all callers accordingly. Remove all code blocks handling
6824         the case where DISPP is not NULL.
6825
6826 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6827
6828         PR symtab/22003
6829         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6830         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6831         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6832
6833 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6834
6835         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6836         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6837         (read_comp_units_from_section): New parameter abbrev_section, use
6838         read_and_check_comp_unit_head, allocate signatured_type if needed.
6839         (create_all_comp_units): Update read_comp_units_from_section caller.
6840
6841 2017-08-23  Pedro Alves  <palves@redhat.com>
6842
6843         PR remote/21852
6844         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6845         to null_ptid and switch to thread without reading the registers
6846         after adding the inferior.
6847
6848 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6849
6850         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6851         compile-gcc.
6852         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6853         (compile_to_object): Implement compile_gcc.
6854         (_initialize_compile): Install "set compile-gcc".  Initialize
6855         compile_gcc.
6856
6857 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6858
6859         * compile/compile.c (compile_to_object): Conditionally call
6860         set_verbose.  Conditionally call compile or compile_v0.
6861
6862 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6863
6864         * sparc64-tdep.h: (adi_normalize_address): New export.
6865         * sparc-nat.h: (open_adi_tag_fd): New export.
6866         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6867         * sparc64-linux-tdep.c:
6868         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6869         (sparc64_linux_handle_segmentation_fault): New function.
6870         (sparc64_linux_init_abi): Register
6871         sparc64_linux_handle_segmentation_fault
6872         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6873         (sparc64_addr_bits_remove): New function.
6874         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6875         (MAX_PROC_NAME_SIZE): New macro.
6876         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6877         (sparc64adilist): New variable.
6878         (adi_proc_list): New variable.
6879         (find_adi_info): New function.
6880         (add_adi_info): New function.
6881         (get_adi_info_proc): New function.
6882         (get_adi_info): New function.
6883         (info_adi_command): New function.
6884         (read_maps_entry): New function.
6885         (adi_available): New function.
6886         (adi_normalize_address): New function.
6887         (adi_align_address): New function.
6888         (adi_convert_byte_count): New function.
6889         (adi_tag_fd): New function.
6890         (adi_is_addr_mapped): New function.
6891         (adi_read_versions): New function.
6892         (adi_write_versions): New function.
6893         (adi_print_versions): New function.
6894         (do_examine): New function.
6895         (do_assign): New function.
6896         (adi_examine_command): New function.
6897         (adi_assign_command): New function.
6898         (_initialize_sparc64_adi_tdep): New function.
6899
6900 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6901
6902         * breakpoint.c (breakpoints_info): Rename to ...
6903         (info_breakpoints_command): ... this.
6904         (watchpoints_info): Rename to ...
6905         (info_watchpoints_command): ... this.
6906         (tracepoints_info): Rename to ...
6907         (info_tracepoints_command): ... this.
6908         (_initialize_breakpoint): Adjust.
6909         * dcache.c (dcache_info): Rename to ...
6910         (info_display_command): ... this.
6911         (_initialize_dcache): Adjust.
6912         * frame.h (args_info): Rename to ...
6913         (info_args_command): ... this.
6914         (locals_info): Rename to ...
6915         (info_locals_command): ... this.
6916         * infcmd.c (nofp_registers_info): Rename to ...
6917         (info_registers_command): ... this.
6918         (float_info): Rename to ...
6919         (info_float_command): ... this.
6920         (program_info): Rename to ...
6921         (info_program_command): ... this.
6922         (all_registers_info): Rename to ...
6923         (info_all_registers_command): ... this.
6924         (vector_info): Rename to ...
6925         (info_vector_command): ... this.
6926         (float_info): Rename to ...
6927         (info_float_command): ... this.
6928         (_initialize_infcmd): Adjust.
6929         * inferior.h (term_info): Rename to ...
6930         (info_terminal_command): ... this.
6931         * inflow.c (term_info): Rename to ...
6932         (info_terminal_command): ... this.
6933         (_initialize_inflow): Adjust.
6934         * infrun.c (signals_info): Rename to ...
6935         (info_signals_command): ... this.
6936         (_initialize_infrun): Adjust.
6937         * objc-lang.c (classes_info): Rename to ...
6938         (info_classes_command): ... this.
6939         (selectors_info): Rename to ...
6940         (info_selectors_command): ... this.
6941         (_initialize_objc_language): Adjust.
6942         * printcmd.c (sym_info): Rename to ...
6943         (info_symbol_command): ... this.
6944         (address_info): Rename to ...
6945         (info_address_command): ... this.
6946         (display_info): Rename to ...
6947         (info_display_command): ... this.
6948         (_initialize_printcmd): Adjust.
6949         * reverse.c (bookmarks_info): Rename to ...
6950         (info_breakpoints_command): ... this.
6951         (_initialize_reverse): Adjust.
6952         * ser-go32.c (dos_info): Rename to ...
6953         (info_serial_command): ... this.
6954         (_initialize_ser_dos): Adjust.
6955         * skip.c (skip_info): Rename to ...
6956         (info_skip_command): ... this.
6957         (_initialize_step_skip): Adjust.
6958         * source.c (line_info): Rename to ...
6959         (info_line_command): ... this.
6960         (source_info): Rename to ...
6961         (info_source_command)
6962         * stack.c (frame_info): Rename to ...
6963         (info_frame_command): ... this.
6964         (locals_info): Rename to ...
6965         (info_locals_command): ... this.
6966         (args_info): Rename to ...
6967         (info_args_command): ... this.
6968         (_initialize_stack): Adjust.
6969         * symtab.c (sources_info): Rename to ...
6970         (info_sources_command): ... this.
6971         (variables_info): Rename to ...
6972         (info_variables_command): ... this.
6973         (functions_info): Rename to ...
6974         (info_functions_command): ... this.
6975         (types_info): Rename to ...
6976         (info_types_command): ... this.
6977         (_initialize_symtab): Adjust.
6978         * target.c (target_info): Rename to ...
6979         (info_target_command): ... this.
6980         (initialize_targets): Adjust.
6981         * tracepoint.c (tvariables_info): Rename to ...
6982         (info_tvariables_command): ... this.
6983         (scope_info): Rename to ...
6984         (info_scope_command): ... this.
6985         (trace_dump_actions): Adjust.
6986         (_initialize_tracepoint): Adjust.
6987
6988 2017-08-22  Tom Tromey  <tom@tromey.com>
6989
6990         * breakpoint.h (install_breakpoint): Update.
6991         * breakpoint.c (add_solib_catchpoint): Update.
6992         (install_breakpoint): Change argument to a std::unique_ptr.
6993         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6994         (create_breakpoint_sal, create_breakpoint): Update.
6995         (watch_command_1, catch_exec_command_1)
6996         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6997         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6998         Return the breakpoint.
6999         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7000         (new_single_step_breakpoint): Update.
7001         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7002         std::unique_ptr.
7003         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7004         std::unique_ptr.
7005         * break-catch-sig.c (create_signal_catchpoint): Use
7006         std::unique_ptr.
7007         * ada-lang.c (create_ada_exception_catchpoint): Use
7008         std::unique_ptr.
7009
7010 2017-08-22  Tom Tromey  <tom@tromey.com>
7011
7012         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7013
7014 2017-08-22  Tom Tromey  <tom@tromey.com>
7015
7016         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7017         (lookup_partial_symbol): Update.
7018
7019 2017-08-22  Tom Tromey  <tom@tromey.com>
7020
7021         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7022         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7023         (find_and_open_source, symtab_to_fullname): Update.
7024         * psymtab.c (psymtab_to_fullname): Update.
7025
7026 2017-08-22  Tom Tromey  <tom@tromey.com>
7027
7028         * exec.c (exec_file_attach): Update.
7029         * linux-thread-db.c (try_thread_db_load): Update.
7030         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7031         * utils.c (gdb_realpath): Change return type.
7032         (gdb_realpath_keepfile): Update.
7033         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7034         (_initialize_utils): Register the new self test.
7035         * source.c (openp): Update.
7036         (find_and_open_source): Update.
7037         * nto-tdep.c (nto_find_and_open_solib): Update.
7038         * main.c (set_gdb_data_directory): Update.
7039         (captured_main_1): Update.
7040         * dwarf2read.c (dwarf2_get_dwz_file): Update
7041         (dw2_map_symbol_filenames): Update.
7042         * auto-load.c (auto_load_safe_path_vec_update): Update.
7043         (filename_is_in_auto_load_safe_path_vec): Change type of
7044         "filename_realp".
7045         (auto_load_objfile_script): Update.
7046         (file_is_auto_load_safe): Update.  Use std::string.
7047         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7048
7049 2017-08-22  Tom Tromey  <tom@tromey.com>
7050
7051         * utils.c (gdb_realpath_keepfile): Return a
7052         gdb::unique_xmalloc_ptr.
7053         * exec.c (exec_file_attach): Update.
7054         * utils.h (gdb_realpath_keepfile): Return a
7055         gdb::unique_xmalloc_ptr.
7056
7057 2017-08-22  Tom Tromey  <tom@tromey.com>
7058
7059         * compile/compile.c (compile_file_command): Use
7060         gdb::unique_xmalloc_ptr, std::string.
7061         * utils.c (gdb_abspath): Change return type.
7062         * source.c (openp): Update.
7063         * objfiles.c (allocate_objfile): Update.
7064         * main.c (set_gdb_data_directory): Update.
7065         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7066
7067 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7068
7069         * cli-cmds.c (list_commands): List actual code around more than
7070         one location.
7071
7072 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7073
7074         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7075
7076 2017-08-21  Pedro Alves  <palves@redhat.com>
7077
7078         PR gdb/19487
7079         * c-exp.y (variable production): Handle function aliases.
7080         * minsyms.c (msymbol_is_text): New function.
7081         * minsyms.h (msymbol_is_text): Declare.
7082         * symtab.c (find_function_alias_target): New function.
7083         * symtab.h (find_function_alias_target): Declare.
7084
7085 2017-08-21  Pedro Alves  <palves@redhat.com>
7086
7087         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7088         typedefs.
7089         * typeprint.c (whatis_exp): If handling "whatis", and expression
7090         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7091         typedefs here.
7092         * valops.c (value_cast): Save "to" type before resolving
7093         stubs/typedefs.  Use that type as resulting value's type.
7094
7095 2017-08-18  Tom Tromey  <tom@tromey.com>
7096             Pedro Alves  <palves@redhat.com>
7097
7098         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7099         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7100         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7101         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7102         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7103         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7104         (linux_get_siginfo_data): Add "thread" argument.  Use
7105         scoped_restore.
7106         * linux-nat.c (linux_child_follow_fork)
7107         (check_stopped_by_watchpoint): Use scoped_restore.
7108         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7109         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7110         (restore_inferior_ptid, save_inferior_ptid): Remove.
7111         * btrace.c (btrace_fetch): Use scoped_restore.
7112         * bsd-uthread.c (bsd_uthread_fetch_registers)
7113         (bsd_uthread_store_registers): Use scoped_restore.
7114         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7115         scoped_restore.
7116         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7117         (aix_thread_xfer_partial): Use scoped_restore.
7118         * inferior.h (save_inferior_ptid): Remove.
7119
7120 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7121
7122         PR tdep/21818
7123         * arm-tdep.c (gdb_print_insn_arm): Mark
7124         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7125
7126 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7127
7128         * NEWS: Mention GDBserver's new option "--selftest".
7129         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7130         * selftest.c: Move it to common/selftest.c.
7131         * selftest.h: Move it to common/selftest.h.
7132         * selftest-arch.c (reset): New function.
7133         (tests_with_arch): Call reset.
7134
7135 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7136
7137         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7138         instead of exception_fprintf and printf_filtered.
7139
7140 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7141
7142         * selftest.c (register_self_test): Rename it to
7143         selftests::register_test.
7144         (run_self_tests): selftest::run_tests.
7145         * selftest.h: Update declarations.
7146         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7147         selftests::register_test_foreach_arch.
7148         * selftest-arch.h: Update declaration.
7149         * aarch64-tdep.c: Update.
7150         * arm-tdep.c: Likewise.
7151         * disasm-selftests.c: Likewise.
7152         * dwarf2loc.c: Likewise.
7153         * dwarf2-frame.c: Likewise.
7154         * findvar.c: Likewise.
7155         * gdbarch-selftests.c: Likewise.
7156         * maint.c (maintenance_selftest): Likewise.
7157         * regcache.c: Likewise.
7158         * rust-exp.y: Likewise.
7159         * selftest-arch.c: Likewise.
7160         * unittests/environ-selftests.c: Likewise.
7161         * unittests/function-view-selftests.c: Likewise.
7162         * unittests/offset-type-selftests.c: Likewise.
7163         * unittests/optional-selftests.c: Likewise.
7164         * unittests/scoped_restore-selftests.c: Likewise.
7165         * utils-selftests.c: Likewise.
7166
7167 2017-08-17  Pedro Alves  <palves@redhat.com>
7168
7169         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7170         local.
7171
7172 2017-08-17  Pedro Alves  <palves@redhat.com>
7173
7174         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7175         field.
7176         (reset_die_in_process): Delete, replaced by ...
7177         (process_die_scope): ... this new class.  Make it responsible for
7178         freeing cu->line_header too.
7179         (process_die): Use process_die_scope.
7180         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7181         cu->line_header_die_owner.  Don't release the line header if it's
7182         owned by the CU.
7183         (setup_type_unit_groups): Make the CU/DIE own the line header.
7184         Don't release the line header here.
7185
7186 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7187
7188         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7189
7190 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7191
7192         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7193         Single-Key mode
7194
7195 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7196
7197         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7198         mode command list.
7199
7200 2017-08-15  Stafford Horne  <shorne@gmail.com>
7201
7202         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7203
7204 2017-08-15  Stafford Horne  <shorne@gmail.com>
7205
7206         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7207
7208 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7209
7210         PR gdb/21954
7211         * infcmd.c (unset_environment_command): Use the 'clear' method on
7212         the environment instead of resetting it.
7213
7214 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7215
7216         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7217         platforms.
7218
7219 2017-08-14  Tom Tromey  <tom@tromey.com>
7220
7221         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7222         (print_binary_chars): Likewise.
7223         (BITS_IN_BYTES): Remove.
7224
7225 2017-08-14  Tom Tromey  <tom@tromey.com>
7226
7227         PR gdb/21675
7228         * valprint.c (LOW_ZERO): Change value to 034.
7229         (print_octal_chars): Add static_asserts for octal constants.
7230         * printcmd.c (print_scalar_formatted): Add 'd' case.
7231
7232 2017-08-11  Tom Tromey  <tom@tromey.com>
7233
7234         * symfile.c (add_symbol_file_command): Use std::vector.
7235
7236 2017-08-14  Tom Tromey  <tom@tromey.com>
7237
7238         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7239         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7240         std::move.
7241         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7242
7243 2017-08-11  Pedro Alves  <palves@redhat.com>
7244
7245         * infrun.c (process_event_stop_test): Adjust
7246         function_name_is_marked_for_skip call.
7247         * skip.c: Include <list>.
7248         (skiplist_entry): Make it a class with private fields, and
7249         getters/setters.
7250         (skiplist_entry_chain): Delete.
7251         (skiplist_entries): New.
7252         (skiplist_entry_count): Delete.
7253         (highest_skiplist_entry_num): New.
7254         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7255         (add_skiplist_entry): Delete.
7256         (skiplist_entry::skiplist_entry): New.
7257         (skiplist_entry::add_entry): New.
7258         (skip_file_command, skip_function): Adjust.
7259         (compile_skip_regexp): Delete.
7260         (skip_command): Don't compile regexp here.  Adjust to use
7261         skiplist_entry::add_entry.
7262         (skip_info): Adjust to use range-for and getters.
7263         (skip_enable_command, skip_disable_command): Adjust to use
7264         range-for and setters.
7265         (skip_delete_command): Adjust to use std::list.
7266         (add_skiplist_entry): Delete.
7267         (skip_file_p): Delete, refactored as ...
7268         (skiplist_entry::do_skip_file_p): ... this new method.
7269         (skip_gfile_p): Delete, refactored as ...
7270         (skiplist_entry::do_gskip_file_p): ... this new method.
7271         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7272         (skiplist_entry::skip_function_p): ... this new method.
7273         (function_name_is_marked_for_skip): Now returns bool, and takes
7274         the function sal by const reference.  Adjust to use range-for and
7275         skiplist_entry methods.
7276         (_initialize_step_skip): Remove references to
7277         skiplist_entry_chain, skiplist_entry_count.
7278         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7279         takes the function sal by const reference.
7280
7281 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7282
7283         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7284         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7285         (dwarf2_frame_cache):
7286         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7287         RETURN_MASK_ALL and set *this_case to NULL.
7288         * frame-unwind.h: Update comments.
7289
7290 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7291
7292         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7293         (dwarf2_frame_state_copy_regs): Remove.
7294         (dwarf2_frame_state_free_regs): Remove.
7295         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7296         (dwarf2_restore_rule): Call method .alloc_regs instead of
7297         dwarf2_frame_state_alloc_regs.
7298         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7299         constructor.  Call std::move.
7300         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7301         (dwarf2_frame_cache): Likewise.
7302
7303         [GDB_SELF_TEST]: Include selftest.h and
7304         selftest-arch.h.
7305         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7306         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7307         execute_cfa_program_test.
7308
7309         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7310         copy ctor, assignment operator, move assignment.
7311         <alloc_regs>: New method.
7312         <swap>: New method.
7313         (struct dwarf2_frame_state): Delete dtor.
7314         (dwarf2_frame_state_alloc_regs): Remove declaration.
7315         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7316         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7317
7318 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7319
7320         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7321         (dwarf2_frame_state::dwarf2_frame_state): New.
7322         (dwarf2_frame_state::~dwarf2_frame_state): New.
7323         (dwarf2_fetch_cfa_info): Update.
7324         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7325         rather than a pointer.  Update code.
7326         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7327         dtor.
7328         <data_align, code_align, retaddr_column>: Change them to const.
7329         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7330         to bool.
7331
7332 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7333
7334         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7335         <loc.exp>: New field.
7336         * dwarf2-frame.c (execute_cfa_program): Update.
7337         (dwarf2_frame_prev_register): Update.
7338
7339 2017-08-10  Pedro Alves  <palves@redhat.com>
7340
7341         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7342
7343 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7344
7345         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7346         (fbsd_pending_children): Use std::list.
7347         (fbsd_remember_child): Likewise.
7348         (fbsd_is_child_pending): Likewise.
7349         (fbsd_pending_vfork_done): Use std::forward_list.
7350         (fbsd_add_vfork_done): Likewise.
7351         (fbsd_is_vfork_done_pending): Likewise.
7352         (fbsd_next_vfork_done): Likewise.
7353
7354 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7355
7356         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7357         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7358         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7359         for `mapfilename'.
7360         (fbsd_xfer_partial): Use gdb::byte_vector.
7361         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7362
7363 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7364
7365         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7366         "filestuff.h".
7367         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7368
7369 2017-08-09  Tom Tromey  <tom@tromey.com>
7370
7371         * skip.c (skiplist_entry): New constructor.
7372         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7373         (skiplist_entry::file_is_glob): Now bool.
7374         (skiplist_entry::file, skiplist_entry::function): Now
7375         std::string.
7376         (make_skip_entry): Return a unique_ptr.  Use new.
7377         (free_skiplist_entry, free_skiplist_entry_cleanup)
7378         (make_free_skiplist_entry_cleanup): Remove.
7379         (skip_command, skip_disable_command, add_skiplist_entry)
7380         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7381         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7382         (function_name_is_marked_for_skip): Update.
7383         (skip_delete_command): Update.  Use delete.
7384
7385 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7386
7387         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7388         (aarch64_linux_core_read_description): New function.
7389         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7390
7391 2017-08-09  Pedro Alves  <palves@redhat.com>
7392
7393         * cp-name-parser.y (cp_comp_to_string): Return a
7394         gdb::unique_xmalloc_ptr<char>.
7395         * cp-support.c (replace_typedefs_qualified_name)
7396         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7397         (cp_canonicalize_string_full): Use op= instead of explicit
7398         convertion.
7399         (cp_class_name_from_physname, method_name_from_physname)
7400         (cp_func_name, cp_remove_params): Adjust to use
7401         gdb::unique_xmalloc_ptr<char>.
7402         * cp-support.h (cp_comp_to_string): Return a
7403         gdb::unique_xmalloc_ptr<char>.
7404         * python/py-type.c (typy_lookup_type): Adjust to use
7405         gdb::unique_xmalloc_ptr<char>.
7406
7407 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7408
7409         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7410
7411 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7412             Yao Qi  <yao.qi@linaro.org>
7413
7414         * cp-support.c (cp_canonicalize_string_full): Use
7415         gdb::unique_xmalloc_ptr<char>.
7416         (cp_canonicalize_string): Likewise.
7417
7418 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7419
7420         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7421         * regformats/i386/amd64-avx-avx512.dat: Remove.
7422         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7423         * regformats/i386/amd64-avx-mpx.dat:Remove.
7424         * regformats/i386/amd64-avx.dat: Remove.
7425         * regformats/i386/amd64-mpx.dat: Remove.
7426         * regformats/i386/i386-avx-avx512.dat: Remove.
7427         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7428         * regformats/i386/i386-avx-mpx.dat: Remove.
7429         * regformats/i386/i386-mmx.dat: Remove.
7430         * regformats/i386/i386-mpx.dat: Remove.
7431
7432 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7433
7434         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7435         * amd64-tdep.c: Don't include features/i386/x32*.c.
7436         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7437         functions.
7438         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7439         and i386/x32-avx-avx512.
7440         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7441         and i386/x32.xml.
7442         * features/i386/x32-avx-avx512.c: Removed.
7443         * features/i386/x32-avx-avx512.xml: Removed.
7444         * features/i386/x32-avx.c: Removed.
7445         * features/i386/x32-avx.xml: Removed.
7446         * features/i386/x32.c: Removed.
7447         * features/i386/x32.xml: Removed.
7448         * regformats/i386/x32-avx-avx512.dat: Removed.
7449         * regformats/i386/x32-avx.dat: Removed.
7450         * regformats/i386/x32.dat: Removed.
7451
7452 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7453
7454         PR breakpoints/21886
7455         * mem-break.c (default_memory_insert_breakpoint): Use
7456         `->placed_address' rather than `->reqstd_address' for the
7457         breakpoint location.
7458
7459 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7460
7461         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7462         assertions.
7463
7464 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7465
7466         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7467         a union of `tdep_info', `tdesc_data' and `id'.
7468         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7469         rather than `info.tdep_info'.
7470         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7471         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7472         * i386-tdep.c (i386_gdbarch_init): Likewise.
7473         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7474         * mips-tdep.c (mips_gdbarch_init): Likewise.
7475         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7476         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7477         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7478         `info.tdep_info'.
7479         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7480         `info.tdep_info'.
7481         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7482         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7483         `info.tdep_info'.
7484         * spu-tdep.c (spu_gdbarch_init): Likewise.
7485         * gdbarch.h: Regenerate.
7486
7487 2017-08-07  Leszek Swirski  <leszeks@google.com>
7488
7489         PR symtab/20899
7490         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7491
7492 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7493
7494         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7495         (gdbsim_open): Rename gdb_argv args object to argv.
7496
7497 2017-08-05  Tom Tromey  <tom@tromey.com>
7498
7499         * compile/compile-object-load.c (compile_object_load): Use
7500         gdb::unique_xmalloc_ptr.
7501         * cli/cli-dump.c (scan_filename): Rename from
7502         scan_filename_with_cleanup.  Change return type.
7503         (scan_expression): Rename from scan_expression_with_cleanup.
7504         Change return type.
7505         (dump_memory_to_file, dump_value_to_file, restore_command):
7506         Use gdb::unique_xmalloc_ptr.  Update.
7507         * cli/cli-cmds.c (find_and_open_script): Use
7508         gdb::unique_xmalloc_ptr.
7509         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7510         * symmisc.c (maintenance_print_symbols)
7511         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7512         * symfile.c (symfile_bfd_open, generic_load)
7513         (add_symbol_file_command, remove_symbol_file_command): Use
7514         gdb::unique_xmalloc_ptr.
7515         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7516         * psymtab.c (maintenance_print_psymbols): Use
7517         gdb::unique_xmalloc_ptr.
7518         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7519         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7520         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7521         (reload_shared_libraries_1): Likewise.
7522
7523 2017-08-05  Tom Tromey  <tom@tromey.com>
7524
7525         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7526         (rust_op_vector, rust_set_vector): New typedefs.
7527         (current_parser): New global.
7528         (work_obstack): Change to pointer type.  Update all users.
7529         (rust_ast, pstate): Remove globals.
7530         (struct rust_parser): New.
7531         (%union) <params, field_inits>: Change type.
7532         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7533         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7534         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7535         (convert_params_to_types, convert_params_to_expression): Change
7536         type of "params".
7537         (ast_string): Change type of "fields".
7538         (rust_parse): Make a rust_parser.  Remove cleanups.
7539         (rust_lex_tests): Make and install an auto_obstack.
7540
7541 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7542
7543         * configure.srv (ipa_x32_linux_regobj): New.
7544         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7545         instead of X86_TDESC_AVX512.
7546         (initialize_low_tracepoint): Call
7547         init_registers_x32_avx_avx512_linux.
7548
7549 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7550
7551         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7552
7553 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7554
7555         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7556
7557 2017-08-03  Tom Tromey  <tom@tromey.com>
7558
7559         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7560         Remove.
7561         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7562
7563 2017-08-03  Tom Tromey  <tom@tromey.com>
7564
7565         * python/py-param.c (compute_enum_values): Use gdb_argv.
7566
7567 2017-08-03  Tom Tromey  <tom@tromey.com>
7568
7569         * utils.h (struct gdb_argv_deleter): New.
7570         (gdb_argv): New class.
7571         * utils.c (gdb_argv::reset): New method.
7572         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7573         * tracefile.c (tsave_command): Use gdb_argv.
7574         * top.c (new_ui_command): Use gdb_argv.
7575         * symmisc.c (maintenance_print_symbols)
7576         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7577         * symfile.c (symbol_file_command, generic_load)
7578         (remove_symbol_file_command): Use gdb_argv.
7579         * stack.c (backtrace_command): Use gdb_argv.
7580         * source.c (add_path, show_substitute_path_command)
7581         (unset_substitute_path_command, set_substitute_path_command):
7582         Use gdb_argv.
7583         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7584         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7585         * remote.c (extended_remote_run, remote_put_command)
7586         (remote_get_command, remote_delete_command): Use gdb_argv.
7587         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7588         (gdbsim_open): Use gdb_argv.
7589         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7590         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7591         * procfs.c (procfs_info_proc): Use gdb_argv.
7592         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7593         * infrun.c (handle_command): Use gdb_argv.
7594         * inferior.c (add_inferior_command, clone_inferior_command):
7595         Use gdb_argv.
7596         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7597         * exec.c (exec_file_command): Use gdb_argv.
7598         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7599         * compile/compile.c (build_argc_argv): Use gdb_argv.
7600
7601 2017-08-03  Tom Tromey  <tom@tromey.com>
7602
7603         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7604
7605 2017-08-03  Tom Tromey  <tom@tromey.com>
7606
7607         * python/python.c (compute_python_string): Return std::string.
7608         (gdbpy_eval_from_control_command): Update.
7609         (do_start_initialization): Use std::string.
7610         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7611         xstrprintf.
7612         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7613         xstrprintf.
7614
7615 2017-08-03  Tom Tromey  <tom@tromey.com>
7616
7617         * top.h (do_restore_instream_cleanup): Remove.
7618         * top.c (do_restore_instream_cleanup): Remove.
7619         (read_command_file): Use scoped_restore.
7620         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7621
7622 2017-08-03  Tom Tromey  <tom@tromey.com>
7623
7624         * cli/cli-script.c (execute_user_command)
7625         (execute_control_command): Use scoped_restore.
7626
7627 2017-08-03  Tom Tromey  <tom@tromey.com>
7628
7629         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7630         (execute_user_command): Remove user_call_depth; use
7631         user_args_stack's size instead.
7632
7633 2017-08-03  Tom Tromey  <tom@tromey.com>
7634
7635         * top.h (in_user_command): Remove.
7636         * top.c (in_user_command): Remove.
7637         * cli/cli-script.c (do_restore_user_call_depth)
7638         (execute_user_command): Update.
7639
7640 2017-08-03  Tom Tromey  <tom@tromey.com>
7641
7642         * valops.c (search_struct_method): Use gdb::byte_vector.
7643         * valarith.c (value_concat): Use std::vector.
7644         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7645         (simple_search_memory): Likewise.
7646         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7647         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7648         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7649         * elfread.c (elf_rel_plt_read): Use std::string.
7650         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7651         * cli/cli-dump.c (restore_section_callback): Use
7652         gdb::byte_vector.
7653
7654 2017-08-03  Tom Tromey  <tom@tromey.com>
7655
7656         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7657
7658 2017-08-03  Tom Tromey  <tom@tromey.com>
7659
7660         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7661         (tui_register_format): Use scoped_restore.
7662
7663 2017-08-03  Tom Tromey  <tom@tromey.com>
7664
7665         * reverse.c (exec_direction_default): Remove.
7666         (exec_reverse_once): Use scoped_restore.
7667         * remote.c (restore_remote_timeout): Remove.
7668         (remote_flash_erase, remote_flash_write, remote_flash_done)
7669         (readchar, remote_serial_write): Use scoped_restore.
7670         * cli/cli-script.c (struct source_cleanup_lines_args)
7671         (source_cleanup_lines): Remove.
7672         (script_from_file): Use scoped_restore.
7673         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7674         (source_command): Use scoped_restore.
7675
7676 2017-08-03  Tom Tromey  <tom@tromey.com>
7677
7678         * utils.h (make_cleanup_free_so): Remove.
7679         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7680         * solist.h (struct so_deleter): New.
7681         (so_list_up): New typedef.
7682         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7683
7684 2017-08-03  Tom Tromey  <tom@tromey.com>
7685
7686         * utils.h (make_cleanup_restore_current_language): Remove.
7687         * utils.c (do_restore_current_language)
7688         (make_cleanup_restore_current_language): Remove.
7689         * parse.c (parse_exp_in_context_1)
7690         (parse_expression_with_language): Use
7691         scoped_restore_current_language.
7692         * mi/mi-main.c (mi_cmd_execute): Use
7693         scoped_restore_current_language.
7694         * language.h (scoped_restore_current_language): New class.
7695
7696 2017-08-03  Tom Tromey  <tom@tromey.com>
7697
7698         * compile/compile.c (cleanup_unlink_file): Remove.
7699         (compile_to_object): Use gdb::unlinker.
7700         (eval_compile_command): Likewise.
7701
7702 2017-08-03  Tom Tromey  <tom@tromey.com>
7703
7704         * utils.h (make_cleanup_fclose): Remove.
7705         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7706
7707 2017-08-03  Tom Tromey  <tom@tromey.com>
7708
7709         * top.c (open_terminal_stream): Return gdb_file_up.
7710         (new_ui_command): Update.
7711
7712 2017-08-03  Tom Tromey  <tom@tromey.com>
7713
7714         * source.c (print_source_lines_base, forward_search_command)
7715         (reverse_search_command): Use gdb_file_up.
7716
7717 2017-08-03  Tom Tromey  <tom@tromey.com>
7718
7719         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7720
7721 2017-08-03  Tom Tromey  <tom@tromey.com>
7722
7723         * cli/cli-cmds.c (find_and_open_script): Change return type.
7724         Remove "streamp" and "full_path" parameters.
7725         (source_script_with_search): Update.
7726         * auto-load.c (source_script_file): Update.
7727         * cli/cli-cmds.h (find_and_open_script): Change type.
7728         (open_script): New struct.
7729
7730 2017-08-03  Tom Tromey  <tom@tromey.com>
7731
7732         * xml-support.c (xml_fetch_content_from_file): Update.
7733         * ui-file.c (stdio_file::open): Update.
7734         * tracefile-tfile.c (tfile_start): Update.
7735         * remote.c (remote_file_put, remote_file_get): Update.
7736         * nat/linux-procfs.c (linux_proc_get_int)
7737         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7738         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7739         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7740         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7741         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7742         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7743         * linux-nat.c (linux_proc_pending_signals): Update.
7744         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7745         (file_closer): Remove.
7746         * compile/compile.c (compile_to_object): Update.
7747         * common/filestuff.h (struct gdb_file_deleter): New.
7748         (gdb_file_up): New typedef.
7749         (gdb_fopen_cloexec): Change return type.
7750         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7751         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7752         (dump_binary_file, restore_binary_file): Update.
7753         * auto-load.c (auto_load_objfile_script_1): Update.
7754
7755 2017-08-03  Tom Tromey  <tom@tromey.com>
7756
7757         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7758         (info_static_tracepoint_markers_command): Likewise.
7759         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7760         * skip.c (skip_info): Use ui_out_emit_table.
7761         * progspace.c (print_program_space): Use ui_out_emit_table.
7762         * osdata.c (info_osdata): Use ui_out_emit_table.
7763         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7764         ui_out_emit_table.
7765         * linux-thread-db.c (info_auto_load_libthread_db): Use
7766         ui_out_emit_table.
7767         * inferior.c (print_inferior): Use ui_out_emit_table.
7768         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7769         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7770         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7771         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7772         * ui-out.h (class ui_out_emit_table): New.
7773
7774 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7775
7776         * mips-tdep.c (mips_fpu_type_str): New function.
7777         (mips_dump_tdep): Call it.
7778
7779 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7780
7781         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7782         `->mips_fpu_type'.
7783
7784 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7785
7786         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7787
7788 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7789
7790         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7791
7792 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7793
7794         * cli/cli-cmds.c (maintenancechecklist): New variable.
7795         * gdbcmd.h (maintenancechecklist): Declare it.
7796         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7797         Call i386_linux_read_description with different masks.
7798         * maint.c (maintenance_check_command): New function.
7799         (_initialize_maint_cmds): Call add_prefix_cmd.
7800         * target-descriptions.c (tdesc_reg): override operator != and ==.
7801         (tdesc_type): Likewise.
7802         (tdesc_feature): Likewise.
7803         (target_desc): Likewise.
7804         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7805         (maintenance_check_xml_descriptions): New function.
7806         (_initialize_target_descriptions) Add command "xml-descriptions".
7807         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7808
7809 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7810
7811         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7812         Include features/i386/32bit-*.c.
7813         (i386_linux_read_description): Generate target description if it
7814         doesn't exist.
7815         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7816         functions.
7817         * features/i386/32bit-linux.c: Re-generated.
7818         * features/i386/32bit-sse.c: Likewise.
7819         * target-descriptions.c (print_c_feature::visit): Print code to
7820         set register number if needed.
7821         (print_c_feature) <m_next_regnum>: New field.
7822
7823 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7824
7825         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7826         (FEATURE_XMLFILES): New.
7827         (FEATURE_CFILES): New.
7828         New rules.
7829         (clean-cfiles): Remove generated c files.
7830         * features/i386/32bit-avx.c: Generated.
7831         * features/i386/32bit-avx512.c: Generated.
7832         * features/i386/32bit-core.c: Generated.
7833         * features/i386/32bit-linux.c: Generated.
7834         * features/i386/32bit-mpx.c: Generated.
7835         * features/i386/32bit-pkeys.c: Generated.
7836         * features/i386/32bit-sse.c: Generated.
7837         * target-descriptions.c: Include algorithm.
7838         (tdesc_element_visitor): Add method visit_end.
7839         (print_c_tdesc): Implement visit_end.
7840         (print_c_tdesc:: m_filename_after_features): Move it to
7841         protected.
7842         (print_c_feature): New class.
7843         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7844         name starts with "i386/32bit-".
7845
7846 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7847
7848         * target-descriptions.c (tdesc_element_visitor): New class.
7849         (tdesc_element): New class.
7850         (tdesc_reg): Inherit from tdesc_element.
7851         (tdesc_reg::accept): New function.
7852         (tdesc_type): Inherit from tdesc_element.
7853         (tdesc_type::accept): New function.
7854         (tdesc_feature): Inherit from tdesc_element.
7855         (tdesc_feature::accept): New function.
7856         (target_desc): Inherit from tdesc_element.
7857         (target_desc::target_desc): New.
7858         (target_desc::~target_desc): New.
7859         (target_desc::accept): New.
7860         (allocate_target_description): Use new.
7861         (free_target_description): Use delete.
7862         (print_c_tdesc): New class.
7863         (maint_print_c_tdesc_cmd): Adjust.
7864
7865         * features/aarch64.c: Re-generated.
7866         * features/arc-arcompact.c: Re-generated.
7867         * features/arc-v2.c: Re-generated.
7868         * features/arm/arm-with-iwmmxt.c: Re-generated.
7869         * features/arm/arm-with-m.c: Re-generated.
7870         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7871         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7872         * features/arm/arm-with-neon.c: Re-generated.
7873         * features/arm/arm-with-vfpv2.c: Re-generated.
7874         * features/arm/arm-with-vfpv3.c: Re-generated.
7875         * features/i386/amd64-avx-avx512.c: Re-generated.
7876         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7877         * features/i386/amd64-avx.c: Re-generated.
7878         * features/i386/amd64-avx-linux.c: Re-generated.
7879         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7880         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7881         * features/i386/amd64-avx-mpx.c: Re-generated.
7882         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7883         * features/i386/amd64.c: Re-generated.
7884         * features/i386/amd64-linux.c: Re-generated.
7885         * features/i386/amd64-mpx.c: Re-generated.
7886         * features/i386/amd64-mpx-linux.c: Re-generated.
7887         * features/i386/i386-avx-avx512.c: Re-generated.
7888         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7889         * features/i386/i386-avx.c: Re-generated.
7890         * features/i386/i386-avx-linux.c: Re-generated.
7891         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7892         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7893         * features/i386/i386-avx-mpx.c: Re-generated.
7894         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7895         * features/i386/i386.c: Re-generated.
7896         * features/i386/i386-linux.c: Re-generated.
7897         * features/i386/i386-mmx.c: Re-generated.
7898         * features/i386/i386-mmx-linux.c: Re-generated.
7899         * features/i386/i386-mpx.c: Re-generated.
7900         * features/i386/i386-mpx-linux.c: Re-generated.
7901         * features/i386/x32-avx-avx512.c: Re-generated.
7902         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7903         * features/i386/x32-avx.c: Re-generated.
7904         * features/i386/x32-avx-linux.c: Re-generated.
7905         * features/i386/x32.c: Re-generated.
7906         * features/i386/x32-linux.c: Re-generated.
7907         * features/microblaze.c: Re-generated.
7908         * features/microblaze-with-stack-protect.c: Re-generated.
7909         * features/mips64-dsp-linux.c: Re-generated.
7910         * features/mips64-linux.c: Re-generated.
7911         * features/mips-dsp-linux.c: Re-generated.
7912         * features/mips-linux.c: Re-generated.
7913         * features/nds32.c: Re-generated.
7914         * features/nios2.c: Re-generated.
7915         * features/nios2-linux.c: Re-generated.
7916         * features/rs6000/powerpc-32.c: Re-generated.
7917         * features/rs6000/powerpc-32l.c: Re-generated.
7918         * features/rs6000/powerpc-403.c: Re-generated.
7919         * features/rs6000/powerpc-403gc.c : Re-generated.
7920         * features/rs6000/powerpc-405.c: Re-generated.
7921         * features/rs6000/powerpc-505.c: Re-generated.
7922         * features/rs6000/powerpc-601.c: Re-generated.
7923         * features/rs6000/powerpc-602.c: Re-generated.
7924         * features/rs6000/powerpc-603.c: Re-generated.
7925         * features/rs6000/powerpc-604.c: Re-generated.
7926         * features/rs6000/powerpc-64.c: Re-generated.
7927         * features/rs6000/powerpc-64l.c: Re-generated.
7928         * features/rs6000/powerpc-7400.c: Re-generated.
7929         * features/rs6000/powerpc-750.c: Re-generated.
7930         * features/rs6000/powerpc-860.c: Re-generated.
7931         * features/rs6000/powerpc-altivec32.c: Re-generated.
7932         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7933         * features/rs6000/powerpc-altivec64.c: Re-generated.
7934         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7935         * features/rs6000/powerpc-cell32l.c: Re-generated.
7936         * features/rs6000/powerpc-cell64l.c: Re-generated.
7937         * features/rs6000/powerpc-e500.c: Re-generated.
7938         * features/rs6000/powerpc-e500l.c: Re-generated.
7939         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7940         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7941         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7942         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7943         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7944         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7945         * features/rs6000/powerpc-vsx32.c: Re-generated.
7946         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7947         * features/rs6000/powerpc-vsx64.c: Re-generated.
7948         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7949         * features/rs6000/rs6000.c: Re-generated.
7950         * features/s390-linux32.c: Re-generated.
7951         * features/s390-linux32v1.c: Re-generated.
7952         * features/s390-linux32v2.c: Re-generated.
7953         * features/s390-linux64.c: Re-generated.
7954         * features/s390-linux64v1.c: Re-generated.
7955         * features/s390-linux64v2.c: Re-generated.
7956         * features/s390-te-linux64.c: Re-generated.
7957         * features/s390-tevx-linux64.c: Re-generated.
7958         * features/s390-vx-linux64.c: Re-generated.
7959         * features/s390x-linux64.c: Re-generated.
7960         * features/s390x-linux64v1.c: Re-generated.
7961         * features/s390x-linux64v2.c: Re-generated.
7962         * features/s390x-te-linux64.c: Re-generated.
7963         * features/s390x-tevx-linux64.c: Re-generated.
7964         * features/s390x-vx-linux64.c: Re-generated.
7965         * features/sparc/sparc32-solaris.c: Re-generated.
7966         * features/sparc/sparc64-solaris.c: Re-generated.
7967         * features/tic6x-c62x.c: Re-generated.
7968         * features/tic6x-c62x-linux.c: Re-generated.
7969         * features/tic6x-c64x.c: Re-generated.
7970         * features/tic6x-c64x-linux.c: Re-generated.
7971         * features/tic6x-c64xp.c: Re-generated.
7972         * features/tic6x-c64xp-linux.c: Re-generated.
7973
7974 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7975
7976         * i386-linux-tdep.c (i386_linux_read_description): New function.
7977         (i386_linux_core_read_description): Call
7978         i386_linux_read_description.
7979         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7980         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7981         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7982         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7983         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7984         * x86-linux-nat.c (x86_linux_read_description): Call
7985         i386_linux_read_description.
7986
7987 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7988
7989         * NEWS: Mention it.
7990         * features/Makefile (%.c: %.xml): Pass the xml file name to
7991         command "maint print c-tdesc".
7992         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7993         name from 'arg'.
7994
7995 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7996
7997         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7998         in-class initialization.
7999         (tdesc_create_feature): Call new instead of XCNEW.
8000         (free_target_description): Ue delete.
8001
8002 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8003
8004         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8005
8006 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8007
8008         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8009         constant.
8010         (amd64_x32_init_abi): Likewise.
8011         * amd64-tdep.h (amd64_init_abi): Update declaration.
8012         (amd64_x32_init_abi): Likewise.
8013
8014 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8015
8016         PR tdep/21717
8017         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8018         condition for FPSCR.
8019         (arm_linux_store_inferior_registers): Likewise.
8020
8021 2017-07-22  Tom Tromey  <tom@tromey.com>
8022
8023         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8024         <syscalls_counts>: Now a std::vector.
8025         (get_catch_syscall_inferior_data): Use "new".
8026         (catch_syscall_inferior_data_cleanup): Use "delete".
8027         (insert_catch_syscall, remove_catch_syscall)
8028         (clear_syscall_counts): Update.
8029
8030 2017-07-22  Tom Tromey  <tom@tromey.com>
8031
8032         * break-catch-syscall.c (syscall_catchpoint)
8033         <syscalls_to_be_caught>: Now a std::vector<int>
8034         (~syscall_catchpoint): Remove.
8035         (insert_catch_syscall, remove_catch_syscall)
8036         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8037         (print_mention_catch_syscall, print_recreate_catch_syscall):
8038         Update.
8039         (create_syscall_event_catchpoint): Change type of "filter"
8040         parameter.
8041         (catch_syscall_split_args): Return a std::vector.
8042         (catch_syscall_command_1, catching_syscall_number_1): Update.
8043
8044 2017-07-22  Tom Tromey  <tom@tromey.com>
8045
8046         * break-catch-throw.c (struct exception_catchpoint)
8047         <exception_rx>: Now a std::string.
8048         (~exception_catchpoint): Remove.
8049         (print_one_detail_exception_catchpoint): Update.
8050         (handle_gnu_v3_exceptions): Change type of except_rx.
8051         (extract_exception_regexp): Return a std::string.
8052         (catch_exception_command_1): Update.
8053
8054 2017-07-22  Tom Tromey  <tom@tromey.com>
8055
8056         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8057         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8058         std::vector.
8059         <catch_all>: Now a bool.
8060         (~signal_catchpoint): Remove.
8061         (signal_catchpoint_insert_location)
8062         (signal_catchpoint_remove_location)
8063         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8064         (signal_catchpoint_print_mention)
8065         (signal_catchpoint_print_recreate)
8066         (signal_catchpoint_explains_signal): Update.
8067         (create_signal_catchpoint): Change type of "filter" and
8068         "catch_all".
8069         (catch_signal_split_args): Return a std::vector.  Change type of
8070         "catch_all".
8071         (catch_signal_command): Update.
8072
8073 2017-07-20  Pedro Alves  <palves@redhat.com>
8074
8075         * ada-lang.c (ada_language_defn): Make extern.
8076         (_initialize_ada_language): Remove add_language call.
8077         * c-lang.c (c_language_defn, cplus_language_defn)
8078         (asm_language_defn, minimal_language_defn): Make extern.
8079         (_initialize_c_language): Delete.
8080         * completer.c (compare_cstrings): Delete, moved to utils.h.
8081         * d-lang.c (d_language_defn): Make extern.
8082         (_initialize_d_language): Remove add_language calls.
8083         * defs.h (enum language): Add comment.
8084         * f-lang.c (f_language_defn): Make extern.
8085         (_initialize_f_language): Remove add_language call.
8086         * go-lang.c (go_language_defn): Make extern.
8087         (_initialize_go_language): Remove add_language call.
8088         * language.c: Include <algorithm>.
8089         (languages): Redefine as const array.
8090         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8091         (set_language_command): Handle "local".  Use for-range loop.
8092         (set_language): Remove loop.
8093         (language_enum): Rewrite.
8094         (language_def, language_str): Remove loops.
8095         (add_language): Delete.
8096         (add_set_language_command): New, based on add_languages.
8097         (skip_language_trampoline): Adjust.
8098         (local_language_defn): Delete.
8099         (language_gdbarch_post_init): Adjust.
8100         (_initialize_language): Remove add_language calls.  Call
8101         add_set_language_command.
8102         * language.h (add_language): Delete.
8103         (auto_language_defn)
8104         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8105         (asm_language_defn, c_language_defn, cplus_language_defn)
8106         (d_language_defn, f_language_defn, go_language_defn)
8107         (m2_language_defn, objc_language_defn, opencl_language_defn)
8108         (pascal_language_defn, rust_language_defn): Declare.
8109         * m2-lang.c (m2_language_defn): Make extern.
8110         (_initialize_m2_language): Remove add_language call.
8111         * objc-lang.c (objc_language_defn): Make extern.
8112         (_initialize_objc_language): Remove add_language call.
8113         * opencl-lang.c (opencl_language_defn): Make extern.
8114         (_initialize_opencl_language): Remove add_language call.
8115         * p-lang.c (pascal_language_defn): Make extern.
8116         (_initialize_pascal_language): Delete.
8117         * rust-lang.c (rust_language_defn): Make extern.
8118         (_initialize_rust_language): Delete.
8119         * utils.h (compare_cstrings): New static inline function.
8120
8121 2017-07-20  Pedro Alves  <palves@redhat.com>
8122
8123         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8124         (get_var_value): Constify parameters.
8125         (get_int_var_value): Change prototype.
8126         (to_fixed_range_type): Adjust.
8127         * ada-lang.h (get_int_var_value): Change prototype.
8128
8129 2017-07-20  Pedro Alves  <palves@redhat.com>
8130
8131         * dwarf2read.c (dw2_lookup_symbol): Use
8132         SYMBOL_MATCHES_SEARCH_NAME.
8133         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8134
8135 2017-07-20  Pedro Alves  <palves@redhat.com>
8136
8137         * block.c (block_iter_name_step, block_iter_name_first)
8138         (block_iter_name_next): Delete.
8139         (block_lookup_symbol_primary): Adjust to use
8140         dict_iter_match_first/dict_iter_match_next.
8141         * block.h (block_iter_name_first, block_iter_name_next): Delete
8142         declarations.
8143         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8144         dict_iter_match_first/dict_iter_match_next.
8145
8146 2017-07-20  Pedro Alves  <palves@redhat.com>
8147
8148         * cp-support.c (cp_find_first_component_aux): Add missing case for
8149         end of string.
8150
8151 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8152
8153         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8154         of dwo_cu's dwo_file.
8155
8156 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8157
8158         * remote.c (store_registers_using_G): Remove one line comment.
8159
8160 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8161
8162         * regcache.c (regcache_cpy): Simplify it.
8163         (regcache::cpy_no_passthrough): Remove it.
8164         * regcache.h (cpy_no_passthrough): Remove it.
8165         (regcache_dup, regcache_cpy): Update comments.
8166
8167 2017-07-18  Pedro Alves  <palves@redhat.com>
8168
8169         * remote-sim.c (sim_command_completer): Adjust to work with a
8170         completion_tracker instead of a VEC.
8171
8172 2017-07-17  Pedro Alves  <palves@redhat.com>
8173
8174         * completer.c (complete_source_filenames): New function.
8175         (complete_address_and_linespec_locations): New function.
8176         (location_completer): Use complete_address_and_linespec_locations.
8177         (completion_tracker::build_completion_result): Honor the tracker's
8178         request to suppress append.
8179         * completer.h (completion_tracker::suppress_append_ws)
8180         (completion_tracker::set_suppress_append_ws): New methods.
8181         (completion_tracker::m_suppress_append_ws): New field.
8182         (complete_source_filenames): New declaration.
8183         * linespec.c (linespec_complete_what): New.
8184         (struct ls_parser) <complete_what, completion_word,
8185         completion_quote_char, completion_quote_end, completion_tracker>:
8186         New fields.
8187         (string_find_incomplete_keyword_at_end): New.
8188         (linespec_lexer_lex_string): Record quote char.  If in completion
8189         mode, don't throw.
8190         (linespec_lexer_consume_token): Advance the completion word point.
8191         (linespec_lexer_peek_token): Save/restore completion info.
8192         (save_stream_and_consume_token): New.
8193         (set_completion_after_number): New.
8194         (linespec_parse_basic): Set what to complete next depending on
8195         token.  Handle function and label completions specially.
8196         (parse_linespec): Disable objc shortcut in completion mode.  Set
8197         what to complete next depending on token type.  Skip keyword if in
8198         completion mode.
8199         (complete_linespec_component, linespec_complete): New.
8200         * linespec.h (linespec_complete): Declare.
8201
8202 2017-07-17  Pedro Alves  <palves@redhat.com>
8203
8204         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8205         Handle 'operator<' / 'operator<<'.
8206
8207 2017-07-17  Pedro Alves  <palves@redhat.com>
8208
8209         * completer.c (collect_explicit_location_matches): Handle
8210         MATCH_LABEL.
8211         (convert_explicit_location_to_linespec): New, factored out from
8212         ...
8213         (convert_explicit_location_to_sals): ... this.
8214         (complete_label): New.
8215         (linespec_complete_label, find_label_symbols_in_block): New.
8216         (find_label_symbols): Add completion_mode parameter and adjust to
8217         call find_label_symbols_in_block.
8218         * linespec.h (linespec_complete_label): Declare.
8219
8220 2017-07-17  Pedro Alves  <palves@redhat.com>
8221
8222         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8223         complete_symbol_mode parameter.
8224         * cli/cli-cmds.c (complete_command): Get the completion result out
8225         of the handle_brkchars tracker if used a custom word point.
8226         * completer.c: Include "linespec.h".
8227         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8228         (advance_to_expression_complete_word_point): New.
8229         (completion_tracker::completes_to_completion_word): New.
8230         (complete_files_symbols): Pass down
8231         complete_symbol_mode::EXPRESSION.
8232         (explicit_options, probe_options): New.
8233         (collect_explicit_location_matches): Complete on the
8234         explictit_loc->foo instead of word.  Use
8235         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8236         keyword and options completions.
8237         (backup_text_ptr): Delete.
8238         (skip_keyword): New.
8239         (complete_explicit_location): Remove 'word' parameter.  Add
8240         language, quoted_arg_start and quoted_arg_end parameters.
8241         Rewrite, parsing left to right.
8242         (location_completer): Rewrite.
8243         (location_completer_handle_brkchars): New function.
8244         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8245         (enum complete_line_internal_reason): Adjust comments.
8246         (completion_tracker::discard_completions): New.
8247         (completer_handle_brkchars_func_for_completer): Handle
8248         location_completer.
8249         (gdb_custom_word_point_brkchars)
8250         (gdb_org_rl_basic_quote_characters): New.
8251         (gdb_completion_word_break_characters_throw)
8252         (completion_find_completion_word): Handle trackers that use a
8253         custom word point.
8254         (completion_tracker::advance_custom_word_point_by): New.
8255         (completion_tracker::build_completion_result): Don't rely on
8256         readline appending the quote char.
8257         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8258         use a custom word point.
8259         (gdb_rl_attempted_completion_function): Restore
8260         rl_basic_quote_characters.
8261         * completer.h (class completion_tracker): Extend intro comment.
8262         (completion_tracker::set_quote_char)
8263         (completion_tracker::quote_char)
8264         (completion_tracker::set_use_custom_word_point)
8265         (completion_tracker::use_custom_word_point)
8266         (completion_tracker::custom_word_point)
8267         (completion_tracker::set_custom_word_point)
8268         (completion_tracker::advance_custom_word_point_by)
8269         (completion_tracker::completes_to_completion_word)
8270         (completion_tracker::discard_completions): New methods.
8271         (completion_tracker::m_quote_char)
8272         (completion_tracker::m_use_custom_word_point)
8273         (completion_tracker::m_custom_word_point): New fields.
8274         (advance_to_expression_complete_word_point): Declare.
8275         * f-lang.c (f_collect_symbol_completion_matches): Add
8276         complete_symbol_mode parameter.
8277         * language.h (struct language_defn)
8278         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8279         parameter.
8280         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8281         (linespec_complete_function): New function.
8282         (linespec_lexer_lex_keyword): Adjust.
8283         * linespec.h (linespec_keywords, linespec_complete_function): New
8284         declarations.
8285         * location.c (find_end_quote): New function.
8286         (explicit_location_lex_one): Add explicit_completion_info
8287         parameter.  Save quoting info.  Don't throw if being called for
8288         completion.  Don't handle Ada operators here.
8289         (is_cp_operator, skip_op_false_positives, first_of)
8290         (explicit_location_lex_one_function): New function.
8291         (string_to_explicit_location): Replace 'dont_throw' parameter with
8292         an explicit_completion_info pointer parameter.  Handle it.  Don't
8293         use explicit_location_lex_one to lex function names.  Use
8294         explicit_location_lex_one_function instead.
8295         * location.h (struct explicit_completion_info): New.
8296         (string_to_explicit_location): Replace 'dont_throw' parameter with
8297         an explicit_completion_info pointer parameter.
8298         * symtab.c (default_collect_symbol_completion_matches_break_on):
8299         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8300         (default_collect_symbol_completion_matches)
8301         (collect_symbol_completion_matches): Add complete_symbol_mode
8302         parameter.
8303         (collect_symbol_completion_matches_type): Pass down
8304         complete_symbol_mode::EXPRESSION.
8305         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8306         parameter.  Handle LINESPEC mode.
8307         * symtab.h (complete_symbol_mode): New.
8308         (default_collect_symbol_completion_matches_break_on)
8309         (default_collect_symbol_completion_matches)
8310         (collect_symbol_completion_matches)
8311         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8312         parameter.
8313
8314 2017-07-17  Pedro Alves  <palves@redhat.com>
8315
8316         * utils.c (enum class strncmp_iw_mode): New.
8317         (strcmp_iw): Rename to ...
8318         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8319         parameters.  Handle them.
8320         (strncmp_iw): New.
8321         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8322         * utils.h (strncmp_iw): Declare.
8323         (strcmp_iw): Move describing comments here.
8324
8325 2017-07-17  Pedro Alves  <palves@redhat.com>
8326
8327         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8328         CP_OPERATOR_STR.
8329         * c-typeprint.c (is_type_conversion_operator): Use
8330         CP_OPERATOR_STR.
8331         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8332         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8333         CP_OPERATOR_LEN.
8334         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8335         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8336         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8337         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8338         CP_OPERATOR_STR.
8339         * location.c: Include "cp-support.h".
8340         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8341         CP_OPERATOR_STR.
8342         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8343         CP_OPERATOR_LEN.
8344
8345 2017-07-17  Pedro Alves  <palves@redhat.com>
8346
8347         * cli/cli-cmds.c (complete_command): Use a completion tracker
8348         along with completion_find_completion_word for handle_brkchars
8349         phase.
8350         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8351         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8352         (struct gdb_rl_completion_word_info): New.
8353         (gdb_rl_find_completion_word): New.
8354         (completion_find_completion_word): New.
8355         * completer.h (completion_find_completion_word): Declare.
8356
8357 2017-07-17  Pedro Alves  <palves@redhat.com>
8358
8359         * ada-lang.c (symbol_completion_match): Adjust comments.
8360         (symbol_completion_add): Replace vector parameter with
8361         completion_tracker parameter.  Use it.
8362         (ada_make_symbol_completion_list): Rename to...
8363         (ada_collect_symbol_completion_matches): ... this.  Add
8364         completion_tracker parameter and use it.
8365         (ada_language_defn): Adjust.
8366         * break-catch-syscall.c (catch_syscall_completer): Adjust
8367         prototype and work with completion_tracker instead of VEC.
8368         * breakpoint.c (condition_completer): Adjust prototype and work
8369         with completion_tracker instead of VEC.
8370         * c-lang.c (c_language_defn, cplus_language_defn)
8371         (asm_language_defn, minimal_language_defn): Adjust to renames.
8372         * cli/cli-cmds.c (complete_command): Rework using
8373         completion_tracker.  Catch exceptions when completing.
8374         * cli/cli-decode.c (integer_unlimited_completer)
8375         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8376         with completion_tracker instead of VEC.
8377         * command.h (struct completion_tracker): Forward declare.
8378         (completer_ftype, completer_handle_brkchars_ftype): Change
8379         types.
8380         (complete_on_cmdlist, complete_on_enum): Adjust.
8381         * completer.c: Include <algorithm>.
8382         (struct gdb_completer_state): New.
8383         (current_completion): New global.
8384         (readline_line_completion_function): Delete.
8385         (noop_completer, filename_completer)
8386         (filename_completer_handle_brkchars, complete_files_symbols)
8387         (linespec_location_completer): Adjust to work with a
8388         completion_tracker instead of a VEC.
8389         (string_or_empty): New.
8390         (collect_explicit_location_matches): Adjust to work with a
8391         completion_tracker instead of a VEC.
8392         (explicit_location_completer): Rename to ...
8393         (complete_explicit_location): ... this and adjust to work with a
8394         completion_tracker instead of a VEC.
8395         (location_completer): Adjust to work with a completion_tracker
8396         instead of a VEC.
8397         (add_struct_fields): Adjust to work with a completion_list instead
8398         of VEC.
8399         (expression_completer): Rename to ...
8400         (complete_expression): ... this and adjust to work with a
8401         completion_tracker instead of a VEC.  Use complete_files_symbols.
8402         (expression_completer): Reimplement on top of complete_expression.
8403         (symbol_completer): Adjust to work with a completion_tracker
8404         instead of a VEC.
8405         (enum complete_line_internal_reason): Add describing comments.
8406         (complete_line_internal_normal_command): Adjust to work with a
8407         completion_tracker instead of a VEC.
8408         (complete_line_internal): Rename to ...
8409         (complete_line_internal_1): ... this and adjust to work with a
8410         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8411         handle_brkchars phase.
8412         (new_completion_tracker): Delete.
8413         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8414         complete_line_internal_1.
8415         (free_completion_tracker): Delete.
8416         (INITIAL_COMPLETION_HTAB_SIZE): New.
8417         (completion_tracker::completion_tracker)
8418         (completion_tracker::~completion_tracker): New.
8419         (maybe_add_completion): Delete.
8420         (completion_tracker::maybe_add_completion)
8421         (completion_tracker::add_completion)
8422         (completion_tracker::add_completions): New.
8423         (throw_max_completions_reached_error): Delete.
8424         (complete_line): Adjust to work with a completion_tracker instead
8425         of a VEC.  Don't create a completion_tracker_t or check for max
8426         completions here.
8427         (command_completer, command_completer_handle_brkchars)
8428         (signal_completer, reg_or_group_completer_1)
8429         (reg_or_group_completer, default_completer_handle_brkchars):
8430         Adjust to work with a completion_tracker.
8431         (gdb_completion_word_break_characters_throw): New.
8432         (gdb_completion_word_break_characters): Reimplement.
8433         (line_completion_function): Delete.
8434         (completion_tracker::recompute_lowest_common_denominator)
8435         (expand_preserving_ws)
8436         (completion_tracker::build_completion_result)
8437         (completion_result::completion_result)
8438         (completion_result::completion_result)
8439         (completion_result::~completion_result)
8440         (completion_result::completion_result)
8441         (completion_result::release_match_list, compare_cstrings)
8442         (completion_result::sort_match_list)
8443         (completion_result::reset_match_list)
8444         (gdb_rl_attempted_completion_function_throw)
8445         (gdb_rl_attempted_completion_function): New.
8446         * completer.h (completion_list, struct completion_result)
8447         (class completion_tracker): New.
8448         (complete_line): Add completion_tracker parameter.
8449         (readline_line_completion_function): Delete.
8450         (gdb_rl_attempted_completion_function): New.
8451         (noop_completer, filename_completer, expression_completer)
8452         (location_completer, symbol_completer, command_completer)
8453         (signal_completer, reg_or_group_completer): Update prototypes.
8454         (completion_tracker_t, new_completion_tracker)
8455         (make_cleanup_free_completion_tracker): Delete.
8456         (enum maybe_add_completion_enum): Delete.
8457         (maybe_add_completion): Delete.
8458         (throw_max_completions_reached_error): Delete.
8459         * corefile.c (complete_set_gnutarget): Adjust to work with a
8460         completion_tracker instead of a VEC.
8461         * cp-abi.c (cp_abi_completer): Adjust to work with a
8462         completion_tracker instead of a VEC.
8463         * d-lang.c (d_language_defn): Adjust.
8464         * disasm.c (disassembler_options_completer): Adjust to work with a
8465         completion_tracker instead of a VEC.
8466         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8467         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8468         with a completion_tracker instead of a VEC.
8469         (f_language_defn): Adjust.
8470         * go-lang.c (go_language_defn): Adjust.
8471         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8472         Adjust to work with a completion_tracker instead of a VEC.
8473         * infrun.c (handle_completer): Likewise.
8474         * interps.c (interpreter_completer): Likewise.
8475         * interps.h (interpreter_completer): Likewise.
8476         * language.c (unknown_language_defn, auto_language_defn)
8477         (local_language_defn): Adjust.
8478         * language.h (language_defn::la_make_symbol_completion_list):
8479         Rename to ...
8480         (language_defn::la_collect_symbol_completion_matches): ... this
8481         and adjust to work with a completion_tracker instead of a VEC.
8482         * m2-lang.c (m2_language_defn): Adjust.
8483         * objc-lang.c (objc_language_defn): Adjust.
8484         * opencl-lang.c (opencl_language_defn): Adjust.
8485         * p-lang.c (pascal_language_defn): Adjust.
8486         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8487         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8488         with a completion_tracker.
8489         * rust-lang.c (rust_language_defn): Adjust.
8490         * symtab.c (free_completion_list, do_free_completion_list)
8491         (return_val, completion_tracker): Delete.
8492         (completion_list_add_name, completion_list_add_symbol)
8493         (completion_list_add_msymbol, completion_list_objc_symbol)
8494         (completion_list_add_fields, add_symtab_completions): Add
8495         completion_tracker parameter and use it.
8496         (default_make_symbol_completion_list_break_on_1): Rename to...
8497         (default_collect_symbol_completion_matches_break_on): ... this.
8498         Add completion_tracker parameter and use it instead of allocating
8499         a completion tracker here.
8500         (default_make_symbol_completion_list_break_on): Delete old
8501         implementation.
8502         (default_make_symbol_completion_list): Delete.
8503         (default_collect_symbol_completion_matches): New.
8504         (make_symbol_completion_list): Delete.
8505         (collect_symbol_completion_matches): New.
8506         (make_symbol_completion_type): Rename to ...
8507         (collect_symbol_completion_matches_type): ... this.  Add
8508         completion_tracker parameter and use it instead of VEC.
8509         (make_file_symbol_completion_list_1): Rename to...
8510         (collect_file_symbol_completion_matches): ... this.  Add
8511         completion_tracker parameter and use it instead of VEC.
8512         (make_file_symbol_completion_list): Delete.
8513         (add_filename_to_list): Use completion_list instead of a VEC.
8514         (add_partial_filename_data::list): Now a completion_list.
8515         (make_source_files_completion_list): Work with a completion_list
8516         instead of a VEC.
8517         * symtab.h: Include "completer.h".
8518         (default_make_symbol_completion_list_break_on)
8519         (default_make_symbol_completion_list, make_symbol_completion_list)
8520         (make_symbol_completion_type, make_file_symbol_completion_list)
8521         (make_source_files_completion_list): Delete.
8522         (default_collect_symbol_completion_matches_break_on)
8523         (default_collect_symbol_completion_matches)
8524         (collect_symbol_completion_matches)
8525         (collect_symbol_completion_matches_type)
8526         (collect_file_symbol_completion_matches)
8527         (make_source_files_completion_list): New.
8528         * top.c (init_main): Don't install a rl_completion_entry_function
8529         hook.  Install a rl_attempted_completion_function hook instead.
8530         * tui/tui-layout.c (layout_completer): Adjust to work with a
8531         completion_tracker.
8532         * tui/tui-regs.c (tui_reggroup_completer):
8533         * tui/tui-win.c (window_name_completer, focus_completer)
8534         (winheight_completer): Adjust to work with a completion_tracker.
8535         * value.c: Include "completer.h".
8536         (complete_internalvar): Adjust to work with a completion_tracker.
8537         * value.h (complete_internalvar): Likewise.
8538
8539 2017-07-17  Pedro Alves  <palves@redhat.com>
8540
8541         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8542         renames.
8543         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8544         comments to completer_ftype's declaration.
8545         <completer_handle_brkchars>: Change type to
8546         completer_handle_brkchars_ftype.
8547         * command.h (completer_ftype): Add describing comment and give
8548         names to parameters.
8549         (completer_ftype_void): Rename to ...
8550         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8551         (set_cmd_completer_handle_brkchars): Adjust.
8552         * completer.c (filename_completer_handle_brkchars): New function.
8553         (complete_line_internal_normal_command): New function, factored
8554         out from ...
8555         (complete_line_internal): ... here.
8556         (command_completer_handle_brkchars)
8557         (default_completer_handle_brkchars)
8558         (completer_handle_brkchars_func_for_completer): New functions.
8559         * completer.h (set_gdb_completion_word_break_characters): Delete
8560         declaration.
8561         (completer_handle_brkchars_func_for_completer): New declaration.
8562         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8563         completer_handle_brkchars_func_for_completer.
8564
8565 2017-07-17  Pedro Alves  <palves@redhat.com>
8566
8567         * completer.c (symbol_completer): New function, based on
8568         make_symbol_completion_list_fn.
8569         * completer.h (symbol_completer): New declaration.
8570         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8571         * python/py-cmd.c (completers): Adjust.
8572         * symtab.c (make_symbol_completion_list_fn): Delete.
8573         * symtab.h (make_symbol_completion_list_fn): Delete.
8574         * cli/cli-decode.c (add_cmd): Adjust.
8575
8576 2017-07-17  Pedro Alves  <palves@redhat.com>
8577
8578         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8579         * dwarf2read.c: Include "filename-seen-cache.h".
8580         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8581         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8582         * filename-seen-cache.c: New file.
8583         * filename-seen-cache.h: New file.
8584         * symtab.c: Include "filename-seen-cache.h".
8585         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8586         (create_filename_seen_cache, clear_filename_seen_cache)
8587         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8588         to filename-seen-cache.h/filename-seen-cache.c.
8589         (output_source_filename, sources_info)
8590         (maybe_add_partial_symtab_filename)
8591         (make_source_files_completion_list): Adjust to use
8592         filename_seen_cache.
8593
8594 2017-07-17  Pedro Alves  <palves@redhat.com>
8595
8596         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8597         fields.
8598         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8599         dwarf2_debug_sections*)): New.
8600         (dwarf2_per_objfile::dwarf2_per_objfile(const
8601         dwarf2_per_objfile&)): Declare as deleted.
8602         (dwarf2_per_objfile::operator=): Declare as deleted.
8603         (dwarf2_per_objfile::dwarf2_per_objfile)
8604         (dwarf2_per_objfile::~dwarf2_per_objfile)
8605         (dwarf2_per_objfile::free_cached_comp_units): New.
8606         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8607         ctor.  Call dwarf2_per_objfile's ctor manually.
8608         (dwarf2_locate_sections): Deleted/refactored as ...
8609         (dwarf2_per_objfile::locate_sections): ... this new method.
8610         (free_cached_comp_units): Defer to
8611         dwarf2_per_objfile::free_cached_comp_units.
8612         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8613
8614 2017-07-14  Tom Tromey  <tom@tromey.com>
8615
8616         PR rust/21764:
8617         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8618         parameter.
8619         <UNOP_SIZEOF>: Split into separate case.
8620         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8621
8622 2017-07-14  Tom Tromey  <tom@tromey.com>
8623
8624         PR rust/21763:
8625         * symtab.c (symbol_matches_domain): Add language_rust to special
8626         case.
8627         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8628         treat LOC_TYPEDEF symbols as variables.
8629
8630 2017-07-14  Pedro Alves  <palves@redhat.com>
8631
8632         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8633         symtabs matching all symtabs with SRCFILE as file name instead of
8634         only considering the first hit, with lookup_symtab.
8635
8636 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8637
8638         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8639         operator_name parameters.
8640         (gen_expr): Update function call.
8641
8642 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8643
8644         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8645         parameter.
8646         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8647         Likewise.
8648         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8649         parameter, use agent_expr::gdbarch instead, update function
8650         calls.
8651         (locexpr_tracepoint_var_ref): Likewise.
8652         (loclist_tracepoint_var_ref): Likewise.
8653         * ax-gdb.c (gen_trace_static_fields): Likewise.
8654         (gen_traced_pop): Likewise.
8655         (gen_frame_args_address): Likewise.
8656         (gen_frame_locals_address): Likewise.
8657         (gen_var_ref): Likewise.
8658         (gen_struct_ref_recursive): Likewise.
8659         (gen_static_field): Likewise.
8660         (gen_maybe_namespace_elt): Likewise.
8661         (gen_expr): Likewise.
8662         (gen_trace_for_var): Likewise.
8663         (gen_trace_for_expr): Likewise.
8664         (gen_trace_for_return_address): Likewise.
8665
8666 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8667
8668         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8669         parameter.
8670         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8671
8672 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8673
8674         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8675         from ax, update calls.
8676         (gen_usual_arithmetic): Likewise.
8677         (gen_integral_promotions): Likewise.
8678         (gen_bitfield_ref): Likewise.
8679         (gen_primitive_field): Likewise.
8680         (gen_struct_ref_recursive): Likewise.
8681         (gen_struct_ref): Likewise.
8682         (gen_maybe_namespace_elt): Likewise.
8683         (gen_struct_elt_for_reference): Likewise.
8684         (gen_namespace_elt): Likewise.
8685         (gen_aggregate_elt_ref): Likewise.
8686         (gen_expr): Get gdbarch from ax, update calls.
8687         (gen_expr_binop_rest): Likewise.
8688
8689 2017-07-13  Pedro Alves  <palves@redhat.com>
8690
8691         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8692         as default tdesc.
8693         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8694         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8695         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8696         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8697         tdep.
8698         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8699         Get final tdesc from the tdep.
8700         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8701         default tdesc.
8702         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8703         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8704         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8705         Use it as default tdesc.
8706         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8707         down to amd_init_abi.  No longer handle fallback tdesc here.
8708         * amd64-tdep.h (tdesc_x32): Declare.
8709         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8710         parameter.
8711         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8712         as default tdesc.
8713
8714 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8715
8716         * s390-linux-tdep.c (s390_process_record): Add support for
8717         instructions new in arch12.
8718
8719 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8720
8721         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8722         PT_GETFSBASE and PT_GETGSBASE.
8723         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8724         PT_SETGSBASE.
8725
8726 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8727
8728         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8729         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8730         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8731         those rules.
8732         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8733         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8734         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8735         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8736         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8737         * features/i386/amd64.xml: Add 64bit-segments.xml.
8738         * features/i386/amd64-avx-avx512.c: Regenerated.
8739         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8740         * features/i386/amd64-avx-mpx.c: Regenerated.
8741         * features/i386/amd64-avx.c: Regenerated.
8742         * features/i386/amd64-mpx.c: Regenerated.
8743         * features/i386/amd64.c: Regenerated.
8744         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8745         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8746         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8747         * regformats/i386/amd64-avx.dat: Regenerated.
8748         * regformats/i386/amd64-mpx.dat: Regenerated.
8749         * regformats/i386/amd64.dat: Regenerated.
8750
8751 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8752
8753         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8754         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8755
8756 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8757
8758         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8759         unsetenv.
8760         * gnulib/aclocal.m4: Regenerate.
8761         * gnulib/config.in: Regenerate.
8762         * gnulib/configure: Regenerate.
8763         * gnulib/import/Makefile.am: Regenerate.
8764         * gnulib/import/Makefile.in: Regenerate.
8765         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8766         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8767         * gnulib/import/m4/environ.m4: New file.
8768         * gnulib/import/m4/setenv.m4: New file.
8769         * gnulib/import/setenv.c: New file.
8770         * gnulib/import/unsetenv.c: New file.
8771
8772 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8773
8774         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8775         address when op is DW_OP_addr.
8776
8777 2017-07-09  Tom Tromey  <tom@tromey.com>
8778
8779         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8780         check and apply to outer type.
8781
8782 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8783
8784         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8785         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8786         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8787         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8788
8789 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8790
8791         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8792
8793 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8794
8795         * corelow.c (get_core_siginfo): Remove.
8796         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8797         instead of get_core_siginfo.
8798         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8799         * gdbarch.h: Re-generate.
8800         * gdbarch.c: Re-generate.
8801         * linux-tdep.c (linux_core_xfer_siginfo): New.
8802         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8803
8804 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8805
8806         * corelow.c (thread_section_name): Move to ...
8807         * gdbcore.h (thread_section_name): ... here.
8808
8809 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8810
8811         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8812         (struct siginfo32): New.
8813         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8814         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8815         via ptrace(PT_LWPINFO).
8816
8817 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8818
8819         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8820         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8821         (fbsd_get_siginfo_type): New.
8822         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8823         (_initialize_fbsd_tdep): New.
8824
8825 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8826
8827         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8828         a singular dwo_unit*) to support multiple CUs in the same way that
8829         multiple TUs are supported.
8830         (create_cus_hash_table): Replace create_dwo_cu with a function for
8831         parsing multiple CUs from a DWO file.
8832         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8833         create_dwo_cu.
8834         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8835         htab_find, rather than comparing the signature to a singleton CU in
8836         the dwo_file.
8837
8838 2017-07-06  Pedro Alves  <palves@redhat.com>
8839
8840         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8841
8842 2017-07-04  Pedro Alves  <palves@redhat.com>
8843
8844         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8845         * gdbtypes.h (TYPE_STATIC): Delete.
8846         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8847         is_synchronized, is_native>: Delete.
8848         <dummy>: Bump.
8849         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8850         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8851         (TYPE_FN_FIELD_ABSTRACT): Delete.
8852
8853 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * buffer.h (buffer_finish): Fix spelling mistakes.
8856
8857 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8858
8859         * .dir-locals.el: Automatically switch to C-style comments in
8860         versions of Emacs that support the feature.
8861
8862 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8863             Pedro Alves  <palves@redhat.com>
8864
8865         PR cli/21688
8866         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8867         (process_next_line): New variable 'inline_cmd'.
8868         Adjust 'if' clauses for "python", "compile" and "guile" to use
8869         'command_name_equals' and check for '!inline_cmd'.
8870
8871 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8872
8873         PR cli/21688
8874         * cli/cli-script.c (command_name_equals_not_inline): New function.
8875         (process_next_line): Adjust 'if' clauses for "python", "compile"
8876         and "guile" to use command_name_equals_not_inline.
8877
8878 2017-06-29  Pedro Alves  <palves@redhat.com>
8879
8880         * completer.c (expression_completer): Call
8881         linespec_location_completer instead of location_completer.
8882
8883 2017-06-29  Pedro Alves  <palves@redhat.com>
8884
8885         * completer.c (expression_completer): Remove code that recomputes
8886         'text' from 'word'.
8887
8888 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8889
8890         * regformats/regdat.sh: Generate code with
8891         "ifndef IN_PROCESS_AGENT".
8892
8893 2017-06-28  Pedro Alves  <palves@redhat.com>
8894
8895         * command.h: Include "common/scoped_restore.h".
8896
8897 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8898
8899         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8900         instead of obstack_grow.
8901
8902 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8903
8904         PR gdb/21337
8905         * symfile.c (reread_symbols): Call objfiles_changed just before
8906         read_symbols.
8907
8908 2017-06-27  Pedro Alves  <palves@redhat.com>
8909
8910         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8911         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8912         (completion_list_add_symbol, completion_list_add_msymbol):
8913         ... these new functions.
8914         (add_symtab_completions)
8915         (default_make_symbol_completion_list_break_on_1): Adjust.
8916
8917 2017-06-27  Pedro Alves  <palves@redhat.com>
8918
8919         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8920         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8921         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8922         dtor.
8923         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8924         'storage_obstack' field an auto_obstack.  In-class initialize all
8925         non-bitfield fields.  Make minsyms_read bool.
8926         * symfile.c (read_symbols): Adjust.
8927
8928 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8929
8930         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8931         (gdbsim_store_register): Likewise.
8932
8933 2017-06-27  Pedro Alves  <palves@redhat.com>
8934
8935         * c-exp.y (name_obstack): Now an auto_obstack.
8936         (yylex): Use auto_obstack::clear.
8937         (c_parse): Use auto_obstack::clear instead of reinitializing and
8938         freeing the obstack.
8939         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8940         * d-exp.y (name_obstack): Now an auto_obstack.
8941         (yylex): Use auto_obstack::clear.
8942         (d_parse): Use auto_obstack::clear instead of reinitializing and
8943         freeing the obstack.
8944         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8945         auto_obstack.
8946         * dwarf2read.c (create_addrmap_from_index)
8947         (dwarf2_build_psymtabs_hard)
8948         (update_enumeration_type_from_children): Likewise.
8949         * gdb_obstack.h (auto_obstack): New type.
8950         * go-exp.y (name_obstack): Now an auto_obstack.
8951         (build_packaged_name): Use auto_obstack::clear.
8952         (go_parse): Use auto_obstack::clear instead of reinitializing and
8953         freeing the obstack.
8954         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8955         auto_obstack.
8956         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8957         * rust-exp.y (work_obstack): Now an auto_obstack.
8958         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8959         reinitializing and freeing the obstack.
8960         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8961         (host_char_to_target): Use auto_obstack.
8962         * utils.h (make_cleanup_obstack_free): Delete declaration.
8963         * valprint.c (generic_emit_char, generic_printstr): Use
8964         auto_obstack.
8965
8966 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8967
8968         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8969         thread.
8970         (darwin_init_thread_list): Don't update dummy thread.
8971         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8972
8973 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8974
8975         * record-full.c (netorder16): Remove.
8976
8977 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8978
8979         * common/diagnostics.h: Define macros for GCC.
8980         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8981         * common/vec.h: Include diagnostics.h.
8982         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8983         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8984         warning.
8985
8986 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8987
8988         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8989         New macro.
8990         * ada-lex.l: Ignore deprecated register warnings.
8991
8992 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8993
8994         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8995         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8996
8997 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8998
8999         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9000         its own line.
9001
9002 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9003
9004         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9005
9006 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9007
9008         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9009         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9010         (xtensa_register_read_masked): Likewise.
9011
9012 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9013
9014         * common/environ.c (gdb_environ::unset): Update comment.
9015
9016 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9017
9018         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9019         registers.
9020
9021 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9022
9023         * record-full.c (record_full_exec_insn): Use byte_vector.
9024
9025 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9026
9027         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9028         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9029
9030 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9031
9032         * remote.c (cached_reg): Move from here...
9033         * regcache.h (cached_reg): ...to here.
9034         * python/py-unwind.c (struct reg_info): Remove.
9035         (cached_frame_info): Use cached_reg_t.
9036         (pyuw_prev_register): Likewise.
9037         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9038         (pyuw_dealloc_cache): Free all registers.
9039
9040 2017-06-22  Pedro Alves  <palves@redhat.com>
9041             Simon Marchi  <simon.marchi@ericsson.com>
9042
9043         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9044         warning.
9045         * common/diagnostics.h: New file.
9046
9047 2017-06-22  Pedro Alves  <palves@redhat.com>
9048
9049         * common/agent.h: Add include guards.
9050
9051 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9052
9053         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9054         talk about addressable units instead of bytes.
9055
9056 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9057
9058         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9059         of '::const_iterator'.
9060
9061 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9062
9063         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9064         'unittests/environ-selftests.c'.
9065         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9066         * charset.c (find_charset_names): Declare object 'iconv_env'.
9067         Update code to use 'iconv_env' object.  Remove call to
9068         'free_environ'.
9069         * common/environ.c: Include <utility>.
9070         (make_environ): Delete function.
9071         (free_environ): Delete function.
9072         (gdb_environ::clear): New function.
9073         (gdb_environ::operator=): New function.
9074         (gdb_environ::get): Likewise.
9075         (environ_vector): Delete function.
9076         (set_in_environ): Delete function.
9077         (gdb_environ::set): New function.
9078         (unset_in_environ): Delete function.
9079         (gdb_environ::unset): New function.
9080         (gdb_environ::envp): Likewise.
9081         * common/environ.h: Include <vector>.
9082         (struct gdb_environ): Delete; transform into...
9083         (class gdb_environ): ... this class.
9084         (free_environ): Delete prototype.
9085         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9086         environ_vector): Likewise.
9087         * infcmd.c (run_command_1): Update code to call
9088         'envp' from 'gdb_environ' class.
9089         (environment_info): Update code to call methods from 'gdb_environ'
9090         class.
9091         (unset_environment_command): Likewise.
9092         (path_info): Likewise.
9093         (path_command): Likewise.
9094         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9095         (inferior::inferior): Initialize 'environment' using the host's
9096         information.
9097         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9098         Include "environ.h".
9099         (class inferior) <environment>: Change type from 'struct
9100         gdb_environ' to 'gdb_environ'.
9101         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9102         methods from 'gdb_environ' class.
9103         * solib.c (solib_find_1): Likewise
9104         * unittests/environ-selftests.c: New file.
9105
9106 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9107
9108         * features/i386/i386-linux.xml: Exchange the order of including
9109         32bit-linux.xml and 32bit-sse.xml.
9110         * features/i386/i386-linux.c: Regenerated.
9111
9112 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9113
9114         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9115         Delete copy ctor and assignment operator.
9116         (tdesc_type): Likewise.
9117         (tdesc_feature): Likewise.
9118         (tdesc_free_reg): Remove.
9119         (tdesc_create_reg): Use new.
9120         (tdesc_free_type): Remove.
9121         (tdesc_create_vector): Use new.
9122         (tdesc_create_union): Likewise.
9123         (tdesc_create_flags): Likewise.
9124         (tdesc_create_enum): Likewise.
9125         (tdesc_free_feature): Delete.
9126         (free_target_description): Use delete.
9127
9128 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9129
9130         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9131         registers.
9132
9133 2017-06-19  Pedro Alves  <palves@redhat.com>
9134
9135         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9136         after gdb::unlinker.
9137
9138 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9139
9140         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9141         gdb_environ to access an environment variable.
9142
9143 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9144
9145         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9146         gdb_byte*.
9147
9148 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9149
9150         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9151
9152 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9153
9154         * configure: Re-generate.
9155         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9156
9157 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9158
9159         * configure: Re-generate.
9160         * warning.m4: Pass -Werror to compiler when checking for
9161         supported warning flags.
9162
9163 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9164
9165         * Makefile.in (COMPILE.pre): Add "-x c++".
9166
9167 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9168             Pedro Alves  <palves@redhat.com>
9169             Yao Qi  <yao.qi@linaro.org>
9170
9171         * defs.h (RequireLongest): New.
9172         (extract_integer): Declare function template.
9173         (extract_signed_integer): Remove the declaration, but define it
9174         static inline.
9175         (extract_unsigned_integer): Likewise.
9176         (store_integer): Declare function template.
9177         (store_signed_integer): Remove the declaration, but define it
9178         static inline.
9179         (store_unsigned_integer): Likewise.
9180         * findvar.c (extract_integer): New function template.
9181         (extract_signed_integer): Remove.
9182         (extract_unsigned_integer): Remove.
9183         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9184         instantiations.
9185         (store_integer): New function template.
9186         (store_signed_integer): Remove.
9187         (store_unsigned_integer): Remove.
9188         (store_integer): Explicit instantiations.
9189         * regcache.c (regcache_raw_read_signed): Update.
9190         (regcache::raw_read): New function.
9191         (regcache::raw_read_signed): Remove.
9192         (regcache::raw_read_unsigned): Remove.
9193         (regcache_raw_read_unsigned): Update.
9194         (regcache_raw_write_unsigned): Update.
9195         (regcache::raw_write_signed): Remove.
9196         (regcache::raw_write): New function.
9197         (regcache_cooked_read_signed): Update.
9198         (regcache::raw_write_unsigned): Remove.
9199         (regcache::cooked_read_signed): Remove.
9200         (regcache_cooked_read_unsigned): Update.
9201         (regcache::cooked_read_unsigned): Remove.
9202         (regcache_cooked_write_signed): Update.
9203         (regcache_cooked_write_unsigned): Update.
9204         * regcache.h (regcache) <raw_read_signed>: Remove.
9205         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9206         <raw_read, raw_write>: New.
9207         <cooked_read_signed, cooked_write_signed>: Remove.
9208         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9209         <cooked_read, cooked_write>: New.
9210         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9211         (sh64_pseudo_register_write): Update.
9212
9213 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9214
9215         * arc-tdep.c (arc_disassembler_options): New variable.
9216         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9217         of default_print_insn.
9218         (arc_delayed_print_insn): Set info->section when needed,
9219         use default_print_insn to retrieve a disassembler.
9220
9221 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9222
9223         PR gdb/21574
9224         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9225         to mention $SHELL and startup-with-shell.
9226
9227 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9228
9229         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9230
9231 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9232
9233         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9234         default_print_insn instead of print_insn_aarch64.
9235         * arm-tdep.c (gdb_print_insn_arm): Call
9236         default_print_insn instead of print_insn_big_arm
9237         and print_insn_little_arm.
9238         * i386-tdep.c (i386_print_insn): Call default_print_insn
9239         instead of print_insn_i386.
9240         * ia64-tdep.c (ia64_print_insn): Call
9241         default_print_insn instead of print_insn_ia64.
9242         * mips-tdep.c (gdb_print_insn_mips): Call
9243         default_print_insn instead of print_insn_big_mips
9244         and print_insn_little_mips.
9245         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9246         instead of print_insn_spu.
9247
9248 2017-06-14  Pedro Alves  <palves@redhat.com>
9249
9250         * ada-lang.c: Include "common/byte-vector.h".
9251         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9252         * charset.c (wchar_iterator::iterate): Resize the vector instead
9253         of reserving it.
9254         * common/byte-vector.h: Include "common/def-vector.h".
9255         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9256         * cli/cli-dump.c: Include "common/byte-vector.h".
9257         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9258         * common/byte-vector.h: New file.
9259         * common/def-vector.h: New file.
9260         * common/default-init-alloc.h: New file.
9261         * dwarf2loc.c: Include "common/byte-vector.h".
9262         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9263         instead of reserving it.
9264         * dwarf2read.c: Include "common/byte-vector.h".
9265         (data_buf::m_vec): Now a gdb::byte_vector.
9266         * gdb_regex.c: Include "common/def-vector.h".
9267         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9268         * mi/mi-main.c: Include "common/byte-vector.h".
9269         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9270         * printcmd.c: Include "common/byte-vector.h".
9271         (print_scalar_formatted): Use gdb::byte_vector.
9272         * valprint.c: Include "common/byte-vector.h".
9273         (maybe_negate_by_bytes, print_decimal_chars): Use
9274         gdb::byte_vector.
9275
9276 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9277
9278         * darwin-nat.c: Include "nat/fork-inferior.h".
9279
9280 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9281
9282         * configure.nat: Factor out Darwin bits that are not
9283         architecture-specific.  Add fork-inferior.o.
9284
9285 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9286
9287         * configure.nat: Factor out AIX bits that are not
9288         architecture-specific.  Add fork-inferior.o.
9289
9290 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9291
9292         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9293         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9294         wrappers that just call rw_pieced_value.
9295
9296 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9297
9298         * dwarf2loc.c (write_pieced_value): When writing the data for a
9299         memory piece, use write_memory_with_notification instead of
9300         write_memory.
9301
9302 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9303
9304         * valops.c (read_value_memory): Change embedded_offset to
9305         represent a bit offset instead of a byte offset.
9306         * value.h (read_value_memory): Adjust comment.
9307
9308 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9309
9310         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9311         dest_offset_bits and source_offset_bits.
9312         (write_pieced_value): Likewise.
9313
9314 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9315
9316         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9317         given by DW_OP_bit_piece.
9318         (write_pieced_value): Likewise.
9319
9320 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9321
9322         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9323         some other preparations to the places where sufficient information
9324         is available.
9325         (write_pieced_value): Likewise.
9326
9327 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9328
9329         * dwarf2loc.c (bits_to_bytes): New function.
9330         (read_pieced_value): Fix offset calculations for register pieces
9331         on big-endian targets.
9332         (write_pieced_value): Likewise.
9333
9334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9335
9336         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9337         (write_pieced_value): Likewise.
9338
9339 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9340
9341         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9342         transfer the source value's least significant bits, instead of its
9343         lowest-addressed ones.  Rename type_len to max_offset.
9344         (read_pieced_value): Mirror above changes to write_pieced_value as
9345         applicable.
9346
9347 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9348
9349         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9350         truncate full bytes from dest_offset_bits before using it as an
9351         offset into the buffer.
9352
9353 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9354
9355         * dwarf2loc.c (write_pieced_value): Include transfer size in
9356         byte-wise check.
9357
9358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9359
9360         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9361         calculation of this_size.
9362
9363 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9364
9365         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9366         when targeting a bit-field.
9367         (write_pieced_value): Likewise.
9368
9369 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9370
9371         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9372         (allocate_piece_closure): Drop addr_size parameter.
9373         (dwarf2_evaluate_loc_desc_full): Adjust call to
9374         allocate_piece_closure.
9375
9376 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9377
9378         PR gdb/21226
9379         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9380         the LSB end, independent of endianness.
9381
9382 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9383
9384         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9385         size capping.
9386
9387 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9388
9389         * mips-linux-nat.c: Move include features/mips*-linux.c to
9390         mips-linux-tdep.c.
9391         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9392         to mips-linux-tdep.c.
9393         * mips-linux-tdep.c: Include features/mips*-linux.c
9394         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9395         functions.
9396         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9397         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9398         (tdesc_mips64_dsp_linux): Declare.
9399
9400 2017-06-12  Tom Tromey  <tom@tromey.com>
9401
9402         * valprint.h (val_print_type_code_int): Remove.
9403         * valprint.c (generic_val_print_int): Always call
9404         val_print_scalar_formatted.
9405         (val_print_type_code_int): Remove.
9406         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9407         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9408         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9409         * ada-valprint.c (ada_val_print_num): Use
9410         val_print_scalar_formatted.
9411
9412 2017-06-12  Tom Tromey  <tom@tromey.com>
9413
9414         * printcmd.c (print_scalar_formatted): Unify the two switches.
9415         Don't convert scalars to LONGEST.
9416
9417 2017-06-12  Tom Tromey  <tom@tromey.com>
9418
9419         PR exp/16225:
9420         * valprint.h (print_decimal_chars): Update.
9421         * valprint.c (maybe_negate_by_bytes): New function.
9422         (print_decimal_chars): Add "is_signed" argument.
9423         * printcmd.c (print_scalar_formatted): Update.
9424
9425 2017-06-12  Tom Tromey  <tom@tromey.com>
9426
9427         PR exp/16225:
9428         * valprint.h (print_binary_chars, print_hex_chars): Update.
9429         * valprint.c (val_print_type_code_int): Update.
9430         (print_binary_chars): Add "zero_pad" argument.
9431         (emit_octal_digit): New function.
9432         (print_octal_chars): Don't zero-pad.
9433         (print_decimal_chars): Likewise.
9434         (print_hex_chars): Add "zero_pad" argument.
9435         * sh64-tdep.c (sh64_do_fp_register): Update.
9436         * regcache.c (regcache::dump): Update.
9437         * printcmd.c (print_scalar_formatted): Update.
9438         * infcmd.c (default_print_one_register_info): Update.
9439
9440 2017-06-12  Pedro Alves  <palves@redhat.com>
9441             Alan Hayward  <alan.hayward@arm.com>
9442
9443         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9444         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9445         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9446         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9447         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9448
9449 2017-06-12  Pedro Alves  <palves@redhat.com>
9450
9451         * dwarf2read.c (mapped_symtab::data): Now a vector of
9452         symtab_index_entry instead of vector of
9453         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9454         whether an element's name is NULL instead of checking whether the
9455         element itself is NULL.
9456         (find_slot): Change return type.  Adjust.
9457         (hash_expand, , add_index_entry, uniquify_cu_indices)
9458         (write_hash_table): Adjust.
9459
9460 2017-06-12  Pedro Alves  <palves@redhat.com>
9461
9462         * dwarf2read.c (recursively_count_psymbols): New function.
9463         (write_psymtabs_to_index): Call it to compute number of psyms and
9464         pass estimate size of psyms_seen to unordered_set's ctor.
9465
9466 2017-06-12  Pedro Alves  <palves@redhat.com>
9467
9468         * dwarf2read.c (write_hash_table): Check if key already exists
9469         before emplacing.
9470
9471 2017-06-12  Pedro Alves  <palves@redhat.com>
9472
9473         * dwarf2read.c (data_buf::append_space): Rename to...
9474         (data_buf::grow): ... this, and make private.  Adjust all callers.
9475         (data_buf::append_uint): New method.
9476         (add_address_entry, write_one_signatured_type)
9477         (write_psymtabs_to_index): Use it.
9478
9479 2017-06-12  Pedro Alves  <palves@redhat.com>
9480
9481         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9482         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9483         (data_buf::file_write): Call ::fwrite directly.
9484
9485 2017-06-12  Pedro Alves  <palves@redhat.com>
9486
9487         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9488         std::vector::erase.
9489
9490 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9491
9492         Code cleanup: C++ify .gdb_index producer.
9493         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9494         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9495         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9496         (create_strtab, add_string): Remove.
9497         (file_write, data_buf): New.
9498         (struct symtab_index_entry): Use std::vector for cu_indices.
9499         (struct mapped_symtab): Use std::vector for data.
9500         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9501         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9502         Remove.
9503         (find_slot): Change return type.  Update it to the new data structures.
9504         (hash_expand, add_index_entry): Update it to the new data structures.
9505         (offset_type_compare): Remove.
9506         (uniquify_cu_indices): Update it to the new data structures.
9507         (c_str_view, c_str_view_hasher, vector_hasher): New.
9508         (add_indices_to_cpool): Remove.
9509         (write_hash_table): Update it to the new data structures.
9510         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9511         (eq_psymtab_cu_index): Remove.
9512         (psym_index_map): New typedef.
9513         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9514         reference and std::unordered_map for cu_index_htab.
9515         (add_address_entry, add_address_entry_worker, write_address_map)
9516         (write_psymbols): Update it to the new data structures.
9517         (write_obstack): Remove.
9518         (struct signatured_type_index_data): Change types_list to a data_buf
9519         reference and psyms_seen to a std::unordered_set reference.
9520         (write_one_signatured_type, recursively_write_psymbols)
9521         (write_psymtabs_to_index): Update it to the new data structures.
9522
9523 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9524
9525         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9526         separate-debug-file commands.
9527         * symfile.h (separate_debug_file_debug): New global.
9528         * symfile.c (separate_debug_file_debug): New global.
9529         (separate_debug_file_exists, find_separate_debug_file): Add
9530         debug output.
9531         (_initialize_symfile): Add "set debug separate-debug-file"
9532         command.
9533         * build-id.c (build_id_to_debug_bfd,
9534         find_separate_debug_file_by_buildid): Add debug output.
9535
9536 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9537
9538         * gdbarch.sh (displaced_step_free_closure): Remove.
9539         * gdbarch.h, gdbarch.c: Re-generate.
9540         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9541         displaced_step_free_closure.
9542         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9543         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9544         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9545         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9546         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9547         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9548         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9549         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9550         * infrun.c (displaced_step_clear): Call xfree instead of
9551         gdbarch_displaced_step_free_closure.
9552
9553 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9554
9555         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9556         NULL".
9557
9558 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9559
9560         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9561         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9562         (mn10300_push_dummy_call): Likewise.
9563
9564 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9565
9566         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9567
9568 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9569
9570         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9571
9572 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9573
9574         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9575         able to start inferiors using a shell.
9576         (New remote packets): Announce new packet "QStartupWithShell".
9577         * remote.c: Add PACKET_QStartupWithShell.
9578         (extended_remote_create_inferior): Handle new
9579         PACKET_QStartupWithShell.
9580         (remote_protocol_features) <QStartupWithShell>: New entry for
9581         PACKET_QStartupWithShell.
9582         (_initialize_remote): Call "add_packet_config_cmd" for
9583         QStartupShell.
9584
9585 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9586             Pedro Alves  <palves@redhat.com>
9587
9588         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9589         and "nat/fork-inferior.h".
9590         * common/common-inferior.h: New file, with contents from
9591         "gdb/inferior.h".
9592         * commom/common-utils.c: Include "common-utils.h".
9593         (stringify_argv): New function.
9594         * common/common-utils.h (stringify_argv): New prototype.
9595         * configure.nat: Add "fork-inferior.o" as a dependency for
9596         "*linux*", "fbsd*" and "nbsd*" hosts.
9597         * corefile.c (get_exec_file): Update comment.
9598         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9599         instead of "startup_inferior".
9600         (darwin_create_inferior): Call "add_thread_silent" after
9601         "fork_inferior".
9602         * fork-child.c: Cleanup unnecessary includes.
9603         (SHELL_FILE): Move to "common/common-fork-child.c".
9604         (environ): Likewise.
9605         (exec_wrapper): Initialize.
9606         (get_exec_wrapper): New function.
9607         (breakup_args): Move to "common/common-fork-child.c"; rename to
9608         "breakup_args_for_exec".
9609         (escape_bang_in_quoted_argument): Move to
9610         "common/common-fork-child.c".
9611         (saved_ui): New variable.
9612         (prefork_hook): New function.
9613         (postfork_hook): Likewise.
9614         (postfork_child_hook): Likewise.
9615         (gdb_startup_inferior): Likewise.
9616         (fork_inferior): Move to "common/common-fork-child.c".  Update
9617         function to support gdbserver.
9618         (startup_inferior): Likewise.
9619         * gdbcore.h (get_exec_file): Remove declaration.
9620         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9621         instead of "startup_inferior".  Call "add_thread_silent" after
9622         "fork_inferior".
9623         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9624         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9625         instead of "startup_inferior".  Call "add_thread_silent" after
9626         "fork_inferior".
9627         * inferior.h: Include "common-inferior.h".
9628         (trace_start_error): Move to "common/common-utils.h".
9629         (trace_start_error_with_name): Likewise.
9630         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9631         (startup_inferior): Likewise.
9632         (gdb_startup_inferior): New prototype.
9633         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9634         * nat/fork-inferior.h: New file.
9635         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9636         instead of "startup_inferior".  Call "add_thread_silent" after
9637         "fork_inferior".
9638         * target.h (target_terminal_init): Move prototype to
9639         "target/target.h".
9640         (target_terminal_inferior): Likewise.
9641         (target_terminal_ours): Likewise.
9642         * target/target.h (target_terminal_init): New prototype, moved
9643         from "target.h".
9644         (target_terminal_inferior): Likewise.
9645         (target_terminal_ours): Likewise.
9646         * utils.c (gdb_flush_out_err): New function.
9647
9648 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9649
9650         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9651         * common/common-gdbthread.h: New file, with parts from
9652         "gdb/gdbthread.h".
9653         * gdbthread.h: Include "common-gdbthread.h".
9654         (switch_to_thread): Moved to "common/common-gdbthread.h".
9655
9656 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9657
9658         * Makefile.in (SFILES): Add "common/job-control.c".
9659         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9660         (COMMON_OBS): Add "job-control.o".
9661         * common/job-control.c: New file, with contents from
9662         "gdb/inflow.c".
9663         * common/job-control.h: New file, with contents from "terminal.h".
9664         * fork-child.c: Include "job-control.h".
9665         * inflow.c: Include "job-control.h".
9666         (gdb_setpgid): Move to "common/common-inflow.c".
9667         (_initialize_inflow): Move setting of "job_control" to
9668         "handle_job_control".
9669         * terminal.h (job_control): Moved to "common/common-terminal.h".
9670         (gdb_setpgid): Likewise.
9671         * top.c: Include "job_control.h".
9672         * utils.c: Likewise.
9673         (job_control): Moved to "job-control.c".
9674
9675 2017-06-07  Pedro Alves  <palves@redhat.com>
9676
9677         * Makefile.in (SFILES): Add gdb_regex.c.
9678         (COMMON_OBS): Add gdb_regex.o.
9679         * ada-lang.c (ada_add_standard_exceptions)
9680         (ada_add_exceptions_from_frame, name_matches_regex)
9681         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9682         parameter type to compiled_regex.  Adjust.
9683         (ada_exceptions_list): Use compiled_regex.
9684         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9685         std::unique_ptr<compiled_regex>.
9686         (exception_catchpoint::~exception_catchpoint): Remove regfree
9687         call.
9688         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9689         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9690         * breakpoint.c (solib_catchpoint::compiled): Now a
9691         std::unique_ptr<compiled_regex>.
9692         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9693         (check_status_catch_solib): Adjust to use compiled_regex.
9694         (add_solib_catchpoint): Adjust to use compiled_regex.
9695         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9696         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9697         compiled_regex reference.  Adjust to use it.
9698         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9699         declaration.  Include "gdb_regex.h".
9700         (apropos_cmd): Change regex parameter to compiled_regex reference.
9701         * gdb_regex.c: New file.
9702         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9703         declarations.
9704         (class compiled_regex): New.
9705         * linux-tdep.c: Include "common/gdb_optional.h".
9706         (struct mapping_regexes): New, factored out from
9707         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9708         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9709         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9710         * probe.c: Include "common/gdb_optional.h".
9711         (collect_probes): Use compiled_regex and gdb::optional and remove
9712         cleanups.
9713         * skip.c: Include "common/gdb_optional.h".
9714         (skiplist_entry::compiled_function_regexp): Now a
9715         gdb::optional<compiled_regex>.
9716         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9717         (free_skiplist_entry): Remove regfree call.
9718         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9719         compiled_regex and gdb::optional.
9720         * symtab.c: Include "common/gdb_optional.h".
9721         (search_symbols): Use compiled_regex and gdb::optional.
9722         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9723         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9724         to gdb_regex.c.
9725
9726 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9727
9728         * regcache.c (regcache::save): Avoid buffer use.
9729         (regcache::dump): Likewise.
9730
9731 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9732
9733         * sh-tdep.c (sh_pseudo_register_read): Remove
9734         MAX_REGISTER_SIZE.
9735         (sh_pseudo_register_write): Likewise.
9736         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9737         (sh64_pseudo_register_write): Likewise
9738
9739 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9740
9741         * aarch64-tdep.c (aarch64_store_return_value): Use
9742         V_REGISTER_SIZE.
9743         (aarch64_pseudo_read_value): Likewise.
9744         (aarch64_pseudo_write): Likewise.
9745
9746 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9747
9748         * regformats/regdef.h (set_register_cache): Remove the
9749         declaration.
9750
9751 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9752
9753         * frame.c (frame_unwind_register_signed): Use
9754         frame_unwind_register_value.
9755
9756 2017-06-06  Pedro Alves  <palves@redhat.com>
9757
9758         PR breakpoints/21553
9759         * breakpoint.c (create_breakpoints_sal_default)
9760         (init_breakpoint_sal, create_breakpoint_sal): Use
9761         gdb::unique_xmalloc_ptr for string parameters.
9762         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9763         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9764         (base_breakpoint_create_breakpoints_sal)
9765         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9766         (strace_marker_create_breakpoints_sal)
9767         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9768         string parameters.
9769         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9770         gdb::unique_xmalloc_ptr for string parameters.
9771         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9772         parameters.
9773
9774 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9775
9776         * alpha-tdep.c (alpha_register_to_value): Use
9777         get_frame_register_value.
9778         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9779
9780 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9781
9782         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9783         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9784         (ia64_value_to_register): Likewise.
9785         (ia64_extract_return_value): Likewise.
9786         (ia64_store_return_value): Likewise.
9787         (ia64_push_dummy_call): Likewise.
9788
9789 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9790
9791         GDB 8.0 released.
9792
9793 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9794
9795         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9796
9797 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9798
9799         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9800         parameter.
9801         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9802
9803 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9804
9805         * event-loop.c (poll_timers): Unallocate timer using delete
9806         instead of xfree.
9807
9808 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9809
9810         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9811         (struct breakpoint) <~breakpoint>: New.
9812         (struct watchpoint): Inherit from breakpoint.
9813         <~watchpoint>: New.
9814         <base>: Remove.
9815         (struct tracepoint): Inherit from breakpoint.
9816         <base>: Remove.
9817         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9818         (struct longjmp_breakpoint): Inherit from breakpoint.
9819         <~longjmp_breakpoint>: New.
9820         <base>: Remove.
9821         (new_breakpoint_from_type): Remove casts.
9822         (watchpoint_in_thread_scope): Remove reference to base field.
9823         (watchpoint_del_at_next_stop): Likewise.
9824         (update_watchpoint): Likewise.
9825         (watchpoint_check): Likewise.
9826         (bpstat_check_watchpoint): Likewise.
9827         (set_longjmp_breakpoint): Likewise.
9828         (struct fork_catchpoint): Inherit from breakpoint.
9829         <base>: Remove.
9830         (struct solib_catchpoint): Inherit from breakpoint.
9831         <~solib_catchpoint>: New.
9832         <base>: Remove.
9833         (dtor_catch_solib): Change to ...
9834         (solib_catchpoint::~solib_catchpoint): ... this.
9835         (breakpoint_hit_catch_solib): Remove reference to base field.
9836         (add_solib_catchpoint): Likewise.
9837         (create_fork_vfork_event_catchpoint): Likewise.
9838         (struct exec_catchpoint): Inherit from breakpoint.
9839         <~exec_catchpoint>: New.
9840         <base>: Remove.
9841         (dtor_catch_exec): Change to ...
9842         (exec_catchpoint::~exec_catchpoint): ... this.
9843         (dtor_watchpoint): Change to ...
9844         (watchpoint::~watchpoint): ... this.
9845         (watch_command_1): Remove reference to base field.
9846         (catch_exec_command_1): Likewise.
9847         (base_breakpoint_dtor): Change to ...
9848         (breakpoint::~breakpoint): ... this.
9849         (base_breakpoint_ops): Remove dtor field value.
9850         (longjmp_bkpt_dtor): Change to ...
9851         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9852         (strace_marker_create_breakpoints_sal): Remove reference to base
9853         field.
9854         (delete_breakpoint): Don't manually call breakpoint destructor.
9855         (create_tracepoint_from_upload): Remove reference to base field.
9856         (trace_pass_set_count): Likewise.
9857         (initialize_breakpoint_ops): Don't initialize
9858         momentary_breakpoint_ops, don't set dtors.
9859         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9860         <~ada_catchpoint>: New.
9861         <base>: Remove.
9862         (create_excep_cond_exprs): Remove reference to base field.
9863         (dtor_exception): Change to ...
9864         (ada_catchpoint::~ada_catchpoint): ... this.
9865         (dtor_catch_exception): Remove.
9866         (dtor_catch_exception_unhandled): Remove.
9867         (dtor_catch_assert): Remove.
9868         (create_ada_exception_catchpoint): Remove reference to base
9869         field.
9870         (initialize_ada_catchpoint_ops): Don't set dtors.
9871         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9872         breakpoint.
9873         <~signal_catchpoint>: New.
9874         <base>: Remove.
9875         (signal_catchpoint_dtor): Change to ...
9876         (signal_catchpoint::~signal_catchpoint): ... this.
9877         (create_signal_catchpoint): Remove reference to base field.
9878         (initialize_signal_catchpoint_ops): Don't set dtor.
9879         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9880         from breakpoint.
9881         <~syscall_catchpoint>: New.
9882         <base>: Remove.
9883         (dtor_catch_syscall): Change to ...
9884         (syscall_catchpoint::~syscall_catchpoint): ... this.
9885         (create_syscall_event_catchpoint): Remove reference to base
9886         field.
9887         (initialize_syscall_catchpoint_ops): Don't set dtor.
9888         * break-catch-throw.c (struct exception_catchpoint): Inherit
9889         from breakpoint.
9890         <~exception_catchpoint>: New.
9891         <base>: Remove.
9892         (dtor_exception_catchpoint): Change to ...
9893         (exception_catchpoint::~exception_catchpoint): ... this.
9894         (handle_gnu_v3_exceptions): Remove reference to base field.
9895         (initialize_throw_catchpoint_ops): Don't set dtor.
9896         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9897         field.
9898         * remote.c (remote_get_tracepoint_status): Likewise.
9899         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9900         * tracefile.c (tracefile_fetch_registers): Likewise.
9901         * tracepoint.c (actions_command): Likewise.
9902         (validate_actionline): Likewise.
9903         (tfind_1): Likewise.
9904         (get_traceframe_location): Likewise.
9905         (find_matching_tracepoint_location): Likewise.
9906         (parse_tracepoint_status): Likewise.
9907         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9908
9909 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9910
9911         * breakpoint.c (struct longjmp_breakpoint): New struct.
9912         (is_tracepoint_type): Change return type to bool.
9913         (is_longjmp_type): New function.
9914         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9915         (set_raw_breakpoint_without_location): Use
9916         new_breakpoint_from_type.
9917         (set_raw_breakpoint): Likewise.
9918
9919 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9920
9921         * breakpoint.c (new_breakpoint_from_type): New function.
9922         (create_breakpoint_sal): Use new_breakpoint_from_type and
9923         unique_ptr.
9924         (create_breakpoint): Likewise.
9925
9926 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9927
9928         * memattr.c (mem_info_command): Rename to ...
9929         (info_mem_command): ... this.
9930         (mem_enable_command): Rename to ...
9931         (enable_mem_command): ... this.
9932         (mem_disable_command): Rename to ...
9933         (disable_mem_command): ... this.
9934         (mem_delete_command): Rename to ...
9935         (delete_mem_command): ... this.
9936         (_initialize_mem): Adjust function names.
9937
9938 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9939
9940         * btrace.c (handle_pt_insn_events): New.
9941         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9942         STATUS.  Split into this and ...
9943         (handle_pt_insn_event_flags): ... this.
9944
9945 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9946
9947         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9948         and struct pt_insn.resynced.
9949         * configure: Regenerated.
9950         * config.in: Regenerated.
9951
9952 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9953
9954         * btrace.c (ftrace_find_call_by_number): New function.
9955         (ftrace_new_function): Store objects, not pointers.
9956         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9957         ftrace_new_gap, ftrace_update_function,
9958         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9959         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9960         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9961         btrace_ends_with_single_insn, btrace_call_get): Account for
9962         btrace_thread_info::functions now storing objects.
9963         * btrace.h (struct btrace_thread_info): Add constructor.
9964         (struct btrace_thread_info) <functions>: Make std::vector.
9965         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9966         Initialize with default values.
9967         * record-btrace.c (record_btrace_frame_sniffer): Account for
9968         btrace_thread_info::functions now storing objects.
9969
9970 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9971
9972         * btrace.c: Remove typedef bfun_s.
9973         (ftrace_new_gap): Directly add gaps to the list of gaps.
9974         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9975         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9976         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9977         instead of gdb VEC.
9978
9979 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9980
9981         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9982         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9983         with btrace_thread_info::next_segment and
9984         btrace_thread_info::prev_segment.
9985         * btrace.h: Remove struct btrace_func_link.
9986         (struct btrace_function): Replace pair of function segment pointers
9987         with pair of indices.
9988         * python/py-record-btrace.c (btpy_call_prev_sibling,
9989         btpy_call_next_sibling): Replace references to
9990         btrace_thread_info::segment with btrace_thread_info::next_segment and
9991         btrace_thread_info::prev_segment.
9992         * record-btrace.c (record_btrace_frame_this_id): Use
9993         btrace_find_call_by_number.
9994
9995 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9996
9997         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9998         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9999         btrace_insn_next, btrace_insn_prev): Remove references to
10000         btrace_thread_info::flow.
10001         * btrace.h (struct btrace_function): Remove FLOW.
10002
10003 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10004
10005         * btrace.c (ftrace_find_call_by_number): New function.
10006         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10007         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10008         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10009         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10010         index.
10011         * btrace.h (struct btrace_function): Turn UP into an index.
10012         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10013         as an index.
10014         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10015         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10016         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10017
10018 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10019
10020         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10021         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10022         ftrace_update_function, ftrace_compute_global_level_offset,
10023         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10024         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10025         btrace_insn_end, btrace_is_empty): Remove references to
10026         btrace_thread_info::begin and btrace_thread_info::end.
10027         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10028         (struct btrace_thread_info) <functions>: Adjust comment.
10029         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10030         btrace_thread_info::begin.
10031
10032 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10033
10034         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10035         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10036         ftrace_update_function): Remove arguments that implicitly were always
10037         BTINFO->END.
10038         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10039         Don't pass BTINFO->END.
10040
10041 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10042
10043         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10044         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10045         btrace_find_insn_by_number): Replace function segment pointer with
10046         index.
10047         (btrace_insn_cmp): Simplify.
10048         * btrace.h: (struct btrace_insn_iterator) Rename index to
10049         insn_index.  Replace function segment pointer with index into function
10050         segment vector.
10051         * record-btrace.c (record_btrace_call_history): Replace function
10052         segment pointer use with index.
10053         (record_btrace_frame_sniffer): Retrieve function call segment through
10054         vector.
10055         (record_btrace_set_replay): Remove defunc't safety check.
10056
10057 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10058
10059         * btrace.c (btrace_ends_with_single_insn): New function.
10060         (btrace_call_get, btrace_call_number, btrace_call_begin,
10061         btrace_call_end, btrace_call_next, btrace_call_prev,
10062         btrace_find_call_by_number): Use index into call segment vector
10063         instead of pointer.
10064         (btrace_call_cmp): Simplify.
10065         * btrace.h (struct btrace_call_iterator): Replace function call segment
10066         pointer with index into vector.
10067         * record-btrace.c (record_btrace_call_history): Use index instead of
10068         pointer.
10069
10070 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10071
10072         * btrace.c (btrace_insn_begin, btrace_insn_end,
10073         btrace_find_insn_by_number): Add btinfo to iterator.
10074         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10075
10076 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10077
10078         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10079         and save pointers directly.
10080         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10081         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10082         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10083         changed signature of functions.
10084         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10085         (btrace_fetch): Remove code that adds btrace_function pointers to
10086         vector of btrace_functions.
10087         (btrace_clear): Simplify freeing vector of btrace_functions.
10088
10089 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10090
10091         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10092         Replace VEC_* with std::vector functions.
10093         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10094         (struct btrace_thread_info)<functions>: Change type to std::vector.
10095
10096 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10097
10098         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10099         "Removed targets and native configurations" up.  Merge duplicate
10100         "New commands" sub-sections.  Add "New options" sub-sections.
10101
10102 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10103
10104         * defs.h (copy_integer_to_size): New declaration.
10105         * findvar.c (copy_integer_to_size): New function.
10106         (do_cint_test): New selftest function.
10107         (copy_integer_to_size_test): Likewise.
10108         (_initialize_findvar): Likewise.
10109         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10110         (mips_fbsd_collect_reg): Use raw_collect_integer.
10111         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10112         (mips64_fill_gregset): Use raw_collect_integer
10113         (mips64_fill_fpregset): Use raw_supply_integer.
10114         * regcache.c (regcache::raw_supply_integer): New function.
10115         (regcache::raw_collect_integer): Likewise.
10116         * regcache.h: (regcache::raw_supply_integer): New declaration.
10117         (regcache::raw_collect_integer): Likewise.
10118
10119 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10120
10121         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10122         (COMMON_OBS): Add gdbarch-selftests.o.
10123         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10124         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10125         * gdbarch-selftests.c: New file.
10126         * regcache.h (regcache) <~regcache>: Mark it virtual if
10127         GDB_SELF_TEST.
10128         <raw_write>: Likewise.
10129
10130 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10131
10132         * regcache.c (current_regcache): Change it to
10133         regcache::current_regcache.
10134         (regcache_observer_target_changed): Update.
10135         (regcache_thread_ptid_changed): Make it a regcache static
10136         method.
10137         (regcache_thread_ptid_changed): Update.
10138         (class regcache_access): New.
10139         (current_regcache_test): Update.
10140         (_initialize_regcache): Update.
10141         * regcache.h: Include forward_list.
10142         (regcache): Declare regcache_thread_ptid_changed and declare
10143         registers_changed_ptid as friend.
10144
10145 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10146
10147         * i387-tdep.c (i387_register_to_value): Use register_size
10148         instead of TYPE_LENGTH.
10149         * m68k-tdep.c (m68k_register_to_value): Likewise.
10150
10151 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10152
10153         * i387-tdep.c (i387_convert_register_p): Return false if type
10154         code isn't TYPE_CODE_FLT.
10155
10156 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10157
10158         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10159         length is 4.
10160         (alpha_register_to_value): Remove type length check.
10161         (alpha_value_to_register): Likewise.
10162
10163 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10164
10165         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10166         TYPE_CODE_FLT.
10167
10168 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10169
10170         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10171         TYPE_CODE_FLT or not.
10172
10173 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10174
10175         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10176         * avr-tdep.c (avr_gdbarch_init): Likewise.
10177         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10178         * cris-tdep.c (cris_gdbarch_init): Likewise.
10179         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10180         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10181         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10182         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10183         * mep-tdep.c (mep_gdbarch_init): Likewise.
10184         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10185         * mips-tdep.c (mips_gdbarch_init): Likewise.
10186         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10187         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10188         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10189         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10190         * v850-tdep.c (v850_gdbarch_init): Likewise.
10191
10192 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10193
10194         * selftest-arch.c (tests_with_arch): Call registers_changed
10195         and reinit_frame_cache.
10196         * selftest.c (run_self_tests): Likewise.
10197
10198 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10199
10200         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10201         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10202
10203 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10204
10205         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10206         set_gdbarch_print_insn.
10207
10208 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10209
10210         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10211         set_gdbarch_print_insn.
10212
10213 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10214
10215         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10216         set_gdbarch_print_insn.
10217         * arc-tdep.c (arc_gdbarch_init): Likewise.
10218         * arch-utils.c: include dis-asm.h.
10219         (default_print_insn): New function.
10220         * arch-utils.h (default_print_insn): Declare.
10221         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10222         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10223         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10224         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10225         * frv-tdep.c (frv_gdbarch_init): Likewise.
10226         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10227         * gdbarch.sh (print_insn): Use default_print_insn.
10228         * gdbarch.c: Regenerated.
10229         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10230         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10231         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10232         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10233         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10234         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10235         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10236         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10237         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10238         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10239         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10240         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10241         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10242         * mt-tdep.c (mt_gdbarch_init): Likewise.
10243         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10244         * nios2-tdep.c (nios2_print_insn): Remove.
10245         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10246         * rx-tdep.c (rx_gdbarch_init): Likewise.
10247         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10248         * score-tdep.c (score_print_insn): Remove.
10249         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10250         * sh-tdep.c (sh_gdbarch_init): Likewise.
10251         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10252         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10253         * tic6x-tdep.c (tic6x_print_insn): Remove.
10254         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10255         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10256         * v850-tdep.c (v850_gdbarch_init): Likewise.
10257         * vax-tdep.c (vax_gdbarch_init): Likewise.
10258         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10259         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10260
10261 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10262
10263         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10264         (MIPS_FP0_REGNUM): Remove.
10265         (MIPS_FSR_REGNUM): Remove.
10266         (mips_fbsd_supply_fpregs): Use mips_regnum.
10267         (mips_fbsd_supply_gregs): Likewise.
10268         (mips_fbsd_collect_fpregs): Likewise.
10269         (mips_fbsd_collect_gregs): Likewise.
10270
10271 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10272
10273         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10274         (getpfpregs_supplies): New function.
10275         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10276         getfpregs_supplies.
10277         (mips_fbsd_store_inferior_registers): Likewise.
10278
10279 2017-05-22  Pedro Alves <palves@redhat.com>
10280
10281         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10282         maintainer.
10283
10284 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10285
10286         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10287         (store_register): Likewise.
10288         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10289         (get_decimal_float_return_value): Likewise.
10290         (do_ppc_sysv_return_value): Likewise.
10291         (ppc64_sysv_abi_push_integer): Likewise.
10292         (ppc64_sysv_abi_push_freg): Likewise.
10293         (ppc64_sysv_abi_return_value_base): Likewise.
10294         (ppc64_sysv_abi_return_value): Likewise.
10295         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10296         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10297         * rs6000-nat.c: Likewise.
10298         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10299         (rs6000_value_to_register): Likewise.
10300         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10301
10302 2017-05-21  Tom Tromey  <tom@tromey.com>
10303
10304         PR rust/21466:
10305         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10306         arrays as "[T]", not "[T; ]".
10307
10308 2017-05-19  Tom Tromey  <tom@tromey.com>
10309
10310         PR rust/21484:
10311         * rust-lang.c (exp_descriptor_rust): New function.
10312         (rust_language_defn): Use it.
10313         * p-lang.c (pascal_language_defn): Update.
10314         * opencl-lang.c (opencl_language_defn): Update.
10315         * objc-lang.c (objc_language_defn): Update.
10316         * m2-lang.c (m2_language_defn): Update.
10317         * language.h (struct language_defn)
10318         <la_watch_location_expression>: New member.
10319         * language.c (unknown_language_defn, auto_language_defn)
10320         (local_language_defn): Update.
10321         * go-lang.c (go_language_defn): Update.
10322         * f-lang.c (f_language_defn): Update.
10323         * d-lang.c (d_language_defn): Update.
10324         * c-lang.h (c_watch_location_expression): Declare.
10325         * c-lang.c (c_watch_location_expression): New function.
10326         (c_language_defn, cplus_language_defn, asm_language_defn)
10327         (minimal_language_defn): Use it.
10328         * breakpoint.c (watch_command_1): Call
10329         la_watch_location_expression.
10330         * ada-lang.c (ada_language_defn): Update.
10331
10332 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10333
10334         PR tui/21482
10335         * gdb_curses.h (NOMACROS): Define.
10336         (NCURSES_NOMACROS): Define.
10337
10338 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10339
10340         PR tui/21482
10341         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10342         arg to char *.
10343         * tui/tui-wingeneral.c (box_win): Likewise.
10344         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10345         (tui_show_source_line): Likewise.
10346         (tui_show_exec_info_content): Likewise.
10347
10348 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10349
10350         * sparc-tdep.c (sparc_structure_return_p)
10351         (sparc_arg_on_registers_p): New functions.
10352         (sparc32_store_arguments): Use them.
10353         * sparc64-tdep.c (sparc64_16_byte_align_p)
10354         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10355         Handle TYPE_CODE_ARRAY.
10356
10357 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10358
10359         * cli/cli-decode.c (add_alias_cmd): New function.
10360         * command.h (add_alias_cmd): Declare.
10361         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10362         instead call add_alias_cmd.
10363
10364 2017-05-17  Pedro Alves  <palves@redhat.com>
10365
10366         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10367         (nat_makefile_frag): ... this.  All references updated.
10368         * configure.ac: Likewise.
10369         * configure.nat: Likewise.  Enhance comments.
10370         * configure: Regenerate.
10371
10372 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10373
10374         * procfs.c (procfs_create_inferior): Change prototype to match
10375         definition.
10376
10377 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10378
10379         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10380         C++ compiler warning.
10381
10382 2017-05-12  Tom Tromey  <tom@tromey.com>
10383
10384         PR rust/21483:
10385         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10386         recurse, just call value_struct_elt directly.
10387
10388 2017-05-12  Tom Tromey  <tom@tromey.com>
10389
10390         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10391         OP_RUST_ARRAY>: Fix.
10392
10393 2017-05-12  Tom Tromey  <tom@tromey.com>
10394
10395         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10396
10397 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10398
10399         * regcache.c: Include <forward_list>.
10400         (struct regcache_list): Remove.
10401         (current_regcache): Update.
10402         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10403         (regcache_thread_ptid_changed): Likewise.
10404         (registers_changed_ptid): Likewise.
10405         (current_regcache_size): Likewise.
10406
10407 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10408
10409         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10410         (current_regcache_size): New function.
10411         (current_regcache_test): New function.
10412         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10413
10414 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10415
10416         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10417         (print_gp_register_row): Use get_frame_register_value.
10418
10419 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10420
10421         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10422         (mips_supply_fpregset): Likewise.
10423         (mips64_supply_gregset): Likewise.
10424
10425 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10426
10427         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10428         regcache->raw_supply_zeroed.
10429
10430 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10431
10432         * configure.nat: Rearrange 'case' statements to match
10433         host before cpu.
10434
10435 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10436
10437         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10438         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10439         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10440         "@nat_extra_makefile_frag@".
10441         (Makefile): Remove dependency on "@frags@".
10442         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10443         (data-directory/Makefile): Likewise.
10444         * config/aarch64/linux.mh: Deleted; moved contents to
10445         "gdb/configure.nat".
10446         * config/alpha/alpha-linux.mh: Likewise.
10447         * config/alpha/nbsd.mh: Likewise.
10448         * config/arm/linux.mh: Likewise.
10449         * config/arm/nbsdelf.mh: Likewise.
10450         * config/i386/cygwin.mh: Likewise.
10451         * config/i386/cygwin64.mh: Likewise.
10452         * config/i386/darwin.mh: Likewise.
10453         * config/i386/fbsd.mh: Likewise.
10454         * config/i386/fbsd64.mh: Likewise.
10455         * config/i386/go32.mh: Likewise.
10456         * config/i386/i386gnu.mh: Likewise.
10457         * config/i386/i386sol2.mh: Likewise.
10458         * config/i386/linux.mh: Likewise.
10459         * config/i386/linux64.mh: Likewise.
10460         * config/i386/mingw.mh: Likewise.
10461         * config/i386/mingw64.mh: Likewise.
10462         * config/i386/nbsd64.mh: Likewise.
10463         * config/i386/nbsdelf.mh: Likewise.
10464         * config/i386/nto.mh: Likewise.
10465         * config/i386/obsd.mh: Likewise.
10466         * config/i386/obsd64.mh: Likewise.
10467         * config/i386/sol2-64.mh: Likewise.
10468         * config/ia64/linux.mh: Likewise.
10469         * config/m32r/linux.mh: Likewise.
10470         * config/m68k/linux.mh: Likewise.
10471         * config/m68k/nbsdelf.mh: Likewise.
10472         * config/m68k/obsd.mh: Likewise.
10473         * config/m88k/obsd.mh: Likewise.
10474         * config/mips/fbsd.mh: Likewise.
10475         * config/mips/linux.mh: Likewise.
10476         * config/mips/nbsd.mh: Likewise.
10477         * config/mips/obsd64.mh: Likewise.
10478         * config/pa/linux.mh: Likewise.
10479         * config/pa/nbsd.mh: Likewise.
10480         * config/pa/obsd.mh: Likewise.
10481         * config/powerpc/aix.mh: Likewise.
10482         * config/powerpc/fbsd.mh: Likewise.
10483         * config/powerpc/linux.mh: Likewise.
10484         * config/powerpc/nbsd.mh: Likewise.
10485         * config/powerpc/obsd.mh: Likewise.
10486         * config/powerpc/ppc64-linux.mh: Likewise.
10487         * config/powerpc/spu-linux.mh: Likewise.
10488         * config/s390/linux.mh: Likewise.
10489         * config/sh/nbsd.mh: Likewise.
10490         * config/sparc/fbsd.mh: Likewise.
10491         * config/sparc/linux.mh: Likewise.
10492         * config/sparc/linux64.mh: Likewise.
10493         * config/sparc/nbsd64.mh: Likewise.
10494         * config/sparc/nbsdelf.mh: Likewise.
10495         * config/sparc/obsd64.mh: Likewise.
10496         * config/sparc/sol2.mh: Likewise.
10497         * config/tilegx/linux.mh: Likewise.
10498         * config/vax/nbsdelf.mh: Likewise.
10499         * config/vax/obsd.mh: Likewise.
10500         * config/xtensa/linux.mh: Likewise.
10501         * config/i386/i386gnu.mn: New file, with excerpts from
10502         "config/i386/i386gnu.mh".
10503         * configure: Regenerate.
10504         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10505         *.mh files under "gdb/config".
10506         * configure.nat: New file, with contents from the
10507         "gdb/config/*/*.mh" files.
10508
10509 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10510
10511         * btrace.c (btrace_clear): Free insn vector.
10512
10513 2017-05-05  Pedro Alves  <palves@redhat.com>
10514
10515         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10516         * configure: Regenerate.
10517
10518 2017-05-04  Pedro Alves  <palves@redhat.com>
10519
10520         * Makefile.in (SFILES): Add progspace-and-thread.c.
10521         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10522         (COMMON_OBS): Add progspace-and-thread.o.
10523         * breakpoint.c: Include "progspace-and-thread.h".
10524         (update_inserted_breakpoint_locations)
10525         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10526         Use scoped_restore_current_pspace_and_thread.
10527         (create_std_terminate_master_breakpoint): Use
10528         scoped_restore_current_program_space.
10529         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10530         (print_breakpoint_location): Use
10531         scoped_restore_current_program_space.
10532         (bp_loc_is_permanent): Use
10533         scoped_restore_current_pspace_and_thread.
10534         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10535         (download_tracepoint_locations): Use
10536         scoped_restore_current_pspace_and_thread.
10537         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10538         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10539         (enum step_over_calls_kind): Moved from inferior.h.
10540         (class scoped_restore_current_thread): New class.
10541         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10542         declaration.
10543         (scoped_restore_current_thread): New class.
10544         * infcmd.c: Include "common/gdb_optional.h".
10545         (continue_1, proceed_after_attach): Use
10546         scoped_restore_current_thread.
10547         (notice_new_inferior): Use scoped_restore_current_thread.
10548         * inferior.c: Include "progspace-and-thread.h".
10549         (restore_inferior, save_current_inferior): Delete.
10550         (add_inferior_command, clone_inferior_command): Use
10551         scoped_restore_current_pspace_and_thread.
10552         * inferior.h (scoped_restore_current_inferior): New class.
10553         * infrun.c: Include "progspace-and-thread.h" and
10554         "common/gdb_optional.h".
10555         (follow_fork_inferior): Use
10556         scoped_restore_current_pspace_and_thread.
10557         (scoped_restore_exited_inferior): New class.
10558         (handle_vfork_child_exec_or_exit): Use
10559         scoped_restore_exited_inferior,
10560         scoped_restore_current_pspace_and_thread,
10561         scoped_restore_current_thread and scoped_restore.
10562         (fetch_inferior_event): Use scoped_restore_current_thread.
10563         * linespec.c (decode_line_full, decode_line_1): Use
10564         scoped_restore_current_program_space.
10565         * mi/mi-main.c: Include "progspace-and-thread.h".
10566         (exec_continue): Use scoped_restore_current_thread.
10567         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10568         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10569         * proc-service.c (ps_pglobal_lookup): Use
10570         scoped_restore_current_program_space.
10571         * progspace-and-thread.c: New file.
10572         * progspace-and-thread.h: New file.
10573         * progspace.c (release_program_space, clone_program_space): Use
10574         scoped_restore_current_program_space.
10575         (restore_program_space, save_current_program_space)
10576         (save_current_space_and_thread): Delete.
10577         (switch_to_program_space_and_thread): Moved to
10578         progspace-and-thread.c.
10579         * progspace.h (save_current_program_space)
10580         (save_current_space_and_thread): Delete declarations.
10581         (scoped_restore_current_program_space): New class.
10582         * remote.c (remote_btrace_maybe_reopen): Use
10583         scoped_restore_current_thread.
10584         * symtab.c: Include "progspace-and-thread.h".
10585         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10586         * thread.c (print_thread_info_1): Use
10587         scoped_restore_current_thread.
10588         (struct current_thread_cleanup): Delete.
10589         (do_restore_current_thread_cleanup)
10590         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10591         (scoped_restore_current_thread::~scoped_restore_current_thread):
10592         ... this new dtor.
10593         (make_cleanup_restore_current_thread): Rename/convert to ...
10594         (scoped_restore_current_thread::scoped_restore_current_thread):
10595         ... this new ctor.
10596         (thread_apply_all_command): Use scoped_restore_current_thread.
10597         (thread_apply_command): Use scoped_restore_current_thread.
10598         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10599         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10600
10601 2017-05-04  Pedro Alves  <palves@redhat.com>
10602
10603         * thread.c (make_cleanup_restore_current_thread): Move
10604         find_thread_ptid call before the is_stopped call.  Assert that the
10605         thread is found.  Replace is_stopped call by checking the thread's
10606         state directly.  Remove unnecessary NULL-thread check.
10607
10608 2017-05-04  Pedro Alves  <palves@redhat.com>
10609
10610         * corelow.c (thread_section_name): New class.
10611         (get_core_register_section, get_core_siginfo): Use it.
10612
10613 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10614
10615         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10616         (get_core_register_section): Remove xfree of NULL pointer.
10617
10618 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10619
10620         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10621         * regcache.c (regcache::raw_supply_zeroed): New function.
10622         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10623
10624 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10625
10626         * gdbarch.sh: Remove commented out definition of
10627         TARGET_CHAR_BIT.
10628         * gdbarch.h: Re-generate.
10629
10630 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10631
10632         * configure: Regenerate.
10633
10634 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10635
10636         * solib-target.c (solib_target_relocate_section_addresses):
10637         Remove num_section_bases, num_bases, segment_bases variables.
10638
10639 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10640
10641         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10642
10643 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10644
10645         * solib-target.c: Include <vector>
10646         (struct lm_info_target) <~lm_info_target>: Remove.
10647         <segment_bases, section_bases>: Change type to
10648         std::vector<CORE_ADDR>.
10649         (library_list_start_segment, library_list_start_section,
10650         library_list_end_library,
10651         solib_target_relocate_section_addresses): Adjust.
10652
10653 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10654
10655         * gdbarch.sh (software_single_step): Change return type to
10656         std::vector<CORE_ADDR>.
10657         * gdbarch.c, gdbarch.h: Re-generate.
10658         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10659         Adjust.
10660         (arm_deal_with_atomic_sequence_raw): Adjust.
10661         (thumb_get_next_pcs_raw): Adjust.
10662         (arm_get_next_pcs_raw): Adjust.
10663         (arm_get_next_pcs): Adjust.
10664         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10665         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10666         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10667         (alpha_software_single_step): Adjust.
10668         * alpha-tdep.h (alpha_software_single_step): Adjust.
10669         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10670         * arm-tdep.c (arm_software_single_step): Adjust.
10671         (arm_breakpoint_kind_from_current_state): Adjust.
10672         * arm-tdep.h (arm_software_single_step): Adjust.
10673         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10674         * cris-tdep.c (cris_software_single_step): Adjust.
10675         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10676         (micromips_deal_with_atomic_sequence): Adjust.
10677         (deal_with_atomic_sequence): Adjust.
10678         (mips_software_single_step): Adjust.
10679         * mips-tdep.h (mips_software_single_step): Adjust.
10680         * moxie-tdep.c (moxie_software_single_step): Adjust.
10681         * nios2-tdep.c (nios2_software_single_step): Adjust.
10682         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10683         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10684         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10685         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10686         * sparc-tdep.c (sparc_software_single_step): Adjust.
10687         * spu-tdep.c (spu_software_single_step): Adjust.
10688         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10689
10690 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10691
10692         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10693         * gdbarch.h: Re-generate.
10694
10695 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10696
10697         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10698         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10699         * python/py-instruction.c, python/py-instruction.h: New file.
10700         * python/py-record.c: Add py-instruction.h include.
10701         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10702         gdb.RecordInstruction.
10703         * python/python-internal.h: Add gdbpy_initialize_instruction
10704         declaration.
10705         * python/python.c (do_start_initialization): Add
10706         gdbpy_initialize_instruction.
10707
10708 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10709
10710         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10711         Remove.
10712         (btrace_func_from_recpy_func): New function.
10713         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10714         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10715         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10716         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10717         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10718         Also, use new helper functions.
10719         (btpy_list_item): Use new helper functions.
10720         (recpy_bt_function_call_history): Use new type name.
10721         (btpy_call_getset): Remove.
10722         (gdbpy_initialize_btrace): Remove code to initialize
10723         gdb.BtraceFunctionCall.
10724         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10725         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10726         recpy_bt_func_prev, recpy_bt_func_next): New export.
10727         * python/py-record.c (recpy_func_type): New static object.
10728         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10729         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10730         recpy_func_next): New function.
10731         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10732         (recpy_func_getset): New static object.
10733         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10734         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10735
10736 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10737
10738         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10739         (btpy_object, btpy_insn_type, btpy_new): Remove.
10740         (btpy_list_object): Use gdb.RecordInstruction type instead of
10741         gdb.BtraceInstruction type.
10742         (btrace_insn_from_recpy_insn): New function.
10743         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10744         btpy_new.
10745         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10746         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10747         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10748         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10749         instead of btpy_object.
10750         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10751         btpy_insn_data, btpy_insn_decode): Rename to ...
10752         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10753         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10754         recpy_bt_insn_decode): This.  Also, use new helper functions.
10755         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10756         recpy_insn_type.
10757         (btpy_insn_getset): Remove.
10758         (gdbpy_initialize_btrace): Remove code to initialize
10759         gdb.BtraceInstruction.  Use recpy_element_object.
10760         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10761         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10762         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10763         * python/py-record.c (recpy_insn_type): New static object.
10764         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10765         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10766         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10767         New function.
10768         (recpy_insn_getset): New static object.
10769         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10770         * python/py-record.h (recpy_element_object): New typedef.
10771         (recpy_insn_type, recpy_insn_new): New export.
10772
10773 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10774
10775         * py-record-btrace.c (btpy_insn_new): Removed.
10776         (btpy_insn_or_gap_new): New function.
10777         (btpy_insn_error): Removed.
10778         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10779         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10780         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10781         btpy_insn_or_gap_new instead of btpy_insn_new.
10782         (btpy_insn_getset): Remove btpy_insn_error.
10783         * py-record.c (recpy_gap_type): New static object.
10784         (recpy_gap_object): New typedef.
10785         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10786         recpy_gap_reason_string): New function.
10787         (recpy_gap_getset): New static object.
10788         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10789         * py-record.h (recpy_gap_new): New export.
10790
10791 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10792
10793         * python/py-record.c (recpy_ptid): Remove.
10794         (recpy_record_getset): Remove recpy_ptid.
10795
10796 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10797
10798         * btrace.c (btrace_fetch): Set inferior_ptid.
10799         * python/py-record-btrace.c: Add "py-record.h" include.
10800         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10801         recpy_bt_end, recpy_bt_instruction_history,
10802         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10803         in gdb.Record object instead of current ptid.
10804         * python/py-record.c: Include new "py-record.h" file.
10805         (recpy_record_object): Moved to py-record.h.
10806         * python/py-record.h: New file.
10807
10808 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10809
10810         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10811         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10812         indentation.
10813
10814 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10815
10816         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10817         the past maintainers section.
10818
10819 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10820
10821         * infcmd.c (get_return_value): Use regcache ctor, and remove
10822         cleanup.
10823
10824 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10825             Pedro Alves  <palves@redhat.com>
10826
10827         * regcache.c (regcache::regcache): New tag dispatch ctor.
10828         (do_cooked_read): Moved above.
10829         (regcache_dup): Use the tag dispatch ctor..
10830         * regcache.h (regcache): Declare ctor, delete copy ctor and
10831         assignment operator, remove friend regcache_dup.
10832
10833 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10834
10835         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10836         call method save instead of regcache_cpy.
10837         * regcache.h (struct regcache): Make regcache_dup a friend.
10838
10839 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10840
10841         * regcache.c (struct regcache): Move to regcache.h
10842         (regcache::arch): New method.
10843         (regcache_get_ptid): Update.
10844         (get_regcache_arch): Call arch method.
10845         (get_regcache_aspace): Call method aspace.
10846         (register_buffer): Change it to method.
10847         (regcache_save): Change it to regcache::save.
10848         (regcache_restore): Likewise.
10849         (regcache_cpy_no_passthrough): Remove the declaration.
10850         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10851         (regcache_cpy_no_passthrough): Change it to method
10852         cpy_no_passthrough.
10853         (regcache_register_status): Change it to method
10854         get_register_status.
10855         (regcache_invalidate): Change it to method invalidate.
10856         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10857         (regcache_raw_update): Change it to method raw_update.
10858         (regcache_raw_read): Likewise.
10859         (regcache_raw_read_signed): Likewise.
10860         (regcache_raw_read_unsigned): Likewise.
10861         (regcache_raw_write_signed): Likewise.
10862         (regcache_raw_write_unsigned): Likewise.
10863         (regcache_cooked_read): Likewise.
10864         (regcache_cooked_read_value): Likewise.
10865         (regcache_cooked_read_signed): Likewise.
10866         (regcache_cooked_read_unsigned): Likewise.
10867         (regcache_cooked_write_signed): Likewise.
10868         (regcache_cooked_write_unsigned): Likewise.
10869         (regcache_raw_set_cached_value): Likewise.
10870         (regcache_raw_write): Likewise.
10871         (regcache_cooked_write): Likewise.
10872         (regcache_xfer_part): Likewise.
10873         (regcache_raw_read_part): Likewise.
10874         (regcache_raw_write_part): Likewise.
10875         (regcache_cooked_read_part): Likewise.
10876         (regcache_cooked_write_part): Likewise.
10877         (regcache_raw_supply): Likewise.
10878         (regcache_raw_collect): Likewise.
10879         (regcache_transfer_regset): Likewise.
10880         (regcache_supply_regset): Likewise.
10881         (regcache_collect_regset): Likewise.
10882         (regcache_debug_print_register): Likewise.
10883         (enum regcache_dump_what): Move it to regcache.h.
10884         (regcache_dump): Change it to method dump.
10885         * regcache.h (enum regcache_dump_what): New.
10886         (class regcache): New.
10887         * target.c (target_fetch_registers): Call method
10888         debug_print_register.
10889         (target_store_registers): Likewise.
10890
10891 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10892
10893         * windows-nat.c (struct lm_info_windows): Initialize field.
10894         (windows_make_so): Allocate lm_info_windows with new.
10895         (windows_free_so): Free lm_info_windows with delete.
10896
10897 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10898
10899         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10900         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10901         cleanup.
10902         (darwin_free_so): Free lm_info_darwin with delete.
10903
10904 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10905
10906         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10907         <l_addr_p>: Change type to bool.
10908         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10909         (svr4_free_so): Free lm_info_svr4 with delete.
10910         (svr4_copy_library_list): Replace memcpy with call to copy
10911         constructor.
10912         (library_list_start_library, svr4_default_sos): Allocate
10913         lm_info_svr4 with new.
10914
10915 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10916
10917         * solib-target.c (struct lm_info_target): Add destructor,
10918         initialize fields.
10919         <name>: Change type to std::string.
10920         (library_list_start_library): Allocate lm_info_target with new.
10921         (solib_target_free_library_list): Free lm_info_target with
10922         delete.
10923         (solib_target_current_sos): Adapt to std::string.
10924         (solib_target_free_so): Free lm_info_target with delete.
10925
10926 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10927
10928         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10929         fields.
10930         (frv_current_sos): Allocate lm_info_frv with new.
10931         (frv_relocate_main_executable): Free lm_info_frv with delete,
10932         allocate with new.
10933         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10934
10935 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10936
10937         * solib-frv.c (struct lm_info_frv): Fix indentation.
10938
10939 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10940
10941         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10942         map field.
10943         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10944         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10945         and allocate with new.
10946         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10947
10948 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10949
10950         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10951         <filename, member_name>: Change type to std::string.
10952         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10953         (library_list_start_library): Allocate lm_info_aix with new.
10954         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10955         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10956         with copy constructor.
10957
10958 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10959
10960         * solist.h (struct lm_info): Remove.
10961         (struct lm_info_base): New class.
10962         (struct so_list) <lm_info>: Change type to lm_info_base *.
10963         * nto-tdep.c (struct lm_info): Remove.
10964         (lm_addr): Adjust.
10965         * solib-aix.c (struct lm_info): Rename to ...
10966         (struct lm_info_aix): ... this.  Extend lm_info_base.
10967         (lm_info_p): Rename to ...
10968         (lm_info_aix_p): ... this, and adjust.
10969         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10970         solib_aix_parse_libraries, library_list_start_library,
10971         solib_aix_free_library_list, solib_aix_parse_libraries,
10972         solib_aix_get_library_list,
10973         solib_aix_relocate_section_addresses, solib_aix_free_so,
10974         solib_aix_get_section_offsets,
10975         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10976         Adjust.
10977         (struct solib_aix_inferior_data) <library_list>: Adjust.
10978         * solib-darwin.c (struct lm_info): Rename to ...
10979         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10980         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10981         * solib-dsbt.c (struct lm_info): Rename to ...
10982         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10983         (struct dsbt_info) <main_executable_lm_info): Adjust.
10984         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10985         dsbt_relocate_section_addresses): Adjust.
10986         * solib-frv.c (struct lm_info): Rename to ...
10987         (struct lm_info_frv): ... this.  Extend lm_info_base.
10988         (main_executable_lm_info): Adjust.
10989         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10990         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10991         find_canonical_descriptor_in_load_object,
10992         frv_fdpic_find_canonical_descriptor): Adjust.
10993         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10994         to lm_info_svr4.
10995         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10996         svr4_clear_so, svr4_copy_library_list,
10997         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10998         svr4_current_sos, svr4_fetch_objfile_link_map,
10999         solist_update_incremental): Adjust.
11000         * solib-svr4.h (struct lm_info_svr4): Move here from
11001         solib-svr4.c.
11002         * solib-target.c (struct lm_info): Rename to ...
11003         (struct lm_info_target): ... this.  Extend lm_info_base.
11004         (lm_info_p): Rename to ...
11005         (lm_info_target_p): ... this.
11006         (solib_target_parse_libraries, library_list_start_segment,
11007         library_list_start_section, library_list_start_library,
11008         library_list_end_library, solib_target_free_library_list,
11009         solib_target_current_sos, solib_target_free_so,
11010         solib_target_relocate_section_addresses): Adjust.
11011         * windows-nat.c (struct lm_info): Rename to ...
11012         (struct lm_info_windows): ... this.  Extend lm_info_base.
11013         (windows_make_so, handle_load_dll, handle_unload_dll,
11014         windows_xfer_shared_libraries): Adjust.
11015
11016 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11017
11018         * solib-darwin.c (struct darwin_so_list): Remove.
11019         (darwin_current_sos): Allocate an so_list object instead of a
11020         darwin_so_list, separately allocate an lm_info object.
11021         (darwin_free_so): Free lm_info.
11022
11023 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11024
11025         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11026         with fprintf_filtered.
11027
11028 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11029
11030         * regcache.c (regcache::regcache): New function.
11031         (regcache::~regcache): New function.
11032         (regcache_xmalloc_1): Remove.
11033         (regcache_xmalloc): Call new regcache.
11034         (regcache_xfree): Call delete regcache.
11035         (get_thread_arch_aspace_regcache): Call new regcache.
11036
11037 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11038
11039         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11040         lwp instead of ptid_get_lwp.
11041
11042 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11043
11044         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11045         lwp_info instead of getting from inferior_ptid.
11046
11047 2017-04-27  Keith Seitz  <keiths@redhat.com>
11048
11049         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11050         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11051         (CV_CONVERSION_BADNESS): Define.
11052         (rank_one_type): Remove overly restrictive rvalue reference
11053         rank checks.
11054         Add cv-qualifier checks and subranks for type equality.
11055         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11056         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11057         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11058
11059 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11060
11061         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11062         count when creating the object.
11063
11064 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11065             Ulrich Weigand  <uweigand@de.ibm.com>
11066
11067         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11068         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11069         is used in AIX.
11070         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11071         (process_xcoff_symbol): Likewise.
11072         (scan_xcoff_symtab): Likewise.
11073
11074 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11075
11076         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11077         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11078         (ia64_access_reg): Use get_frame_register_unsigned.
11079         (ia64_access_rse_reg): Likewise.
11080         (ia64_libunwind_frame_prev_register): Likewise.
11081
11082 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11083
11084         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11085         * gdbarch.c: Regenerated.
11086         * gdbarch.h: Regenerated.
11087         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11088         visibility external.
11089         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11090         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11091         (enum cfa_how_kind): Move to ...
11092         (struct dwarf2_frame_state_reg_info): Likewise.
11093         (struct dwarf2_frame_state): Likewise.
11094         * dwarf2-frame.h: ... here.
11095         (dwarf2_frame_state_alloc_regs): New declaration.
11096         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11097         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11098
11099 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11100
11101         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11102         regcache_raw_read_unsigned.
11103         (xtensa_pseudo_register_write): Likewise.
11104
11105 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11106
11107         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11108         (nds32_pseudo_register_write): Likewise.
11109
11110 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11111
11112         * regcache.c (struct regcache) <readonly_p>: Change its type
11113         to bool.
11114         (regcache_xmalloc_1): Update parameter type and callers update.
11115
11116 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11117
11118         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11119         set_gdbarch_wchar_bit.
11120         * arm-tdep.c (arm_gdbarch_init): Likewise.
11121
11122 2017-04-25  Pedro Alves  <palves@redhat.com>
11123
11124         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11125         (BothAreRelocatable, memcopy, memmove): Don't define.
11126         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11127         macros.
11128
11129 2017-04-25  Pedro Alves  <palves@redhat.com>
11130
11131         * common/common-defs.h: Include "common/poison.h".
11132         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11133         and adjust.
11134         * common/poison.h: New file.
11135         * common/traits.h: Include <type_traits>.
11136         (Not, Or, Requires): New, moved from common/function-view.h.
11137
11138 2017-04-25  Pedro Alves  <palves@redhat.com>
11139
11140         * breakpoint.h (struct breakpoint): In-class initialize all
11141         fields.  Make boolean fields "bool".
11142         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11143         memset call and initializations no longer necessary.
11144
11145 2017-04-25  Pedro Alves  <palves@redhat.com>
11146
11147         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11148         reference.
11149         (pt_btrace_insn): New function.
11150         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11151
11152 2017-04-25  Pedro Alves  <palves@redhat.com>
11153
11154         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11155         "base" field and inherit from "bp_location" instead.  Add
11156         non-default ctor.
11157         (allocate_location_exception): Use new non-default ctor.
11158         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11159         (init_bp_location): Convert to ...
11160         (bp_location::bp_location): ... this new ctor, and remove memset
11161         call.
11162         (base_breakpoint_allocate_location): Use the new non-default ctor.
11163         * breakpoint.h (bp_location): Now a class.  Declare default and
11164         non-default ctors.  In-class initialize all members.
11165         (init_bp_location): Remove declaration.
11166
11167 2017-04-25  Pedro Alves  <palves@redhat.com>
11168
11169         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11170         assignment operator.
11171
11172 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11173
11174         * doublest.c (convert_doublest_to_floatformat): Call
11175         floatformat_totalsize_bytes.
11176
11177 2017-04-22  Tom Tromey  <tom@tromey.com>
11178
11179         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11180         ui_out_emit_list.
11181         * stack.c (print_frame): Use ui_out_emit_list.
11182         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11183         ui_out_emit_list.
11184         * mi/mi-main.c (print_one_inferior)
11185         (mi_cmd_data_list_register_names)
11186         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11187         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11188         ui_out_emit_list.
11189         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11190         (mi_output_solib_attribs): Use ui_out_emit_list,
11191         ui_out_emit_tuple.
11192         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11193         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11194         (mi_cmd_stack_list_args, list_args_or_locals): Use
11195         ui_out_emit_list.
11196         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11197         * breakpoint.c (print_solib_event, output_thread_groups): Use
11198         ui_out_emit_list.
11199
11200 2017-04-22  Tom Tromey  <tom@tromey.com>
11201
11202         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11203         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11204         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11205
11206 2017-04-22  Tom Tromey  <tom@tromey.com>
11207
11208         * tracepoint.c (tvariables_info_1)
11209         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11210
11211 2017-04-22  Tom Tromey  <tom@tromey.com>
11212
11213         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11214         annotate_arg_emitter.
11215         * breakpoint.c (print_mention_watchpoint)
11216         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11217         * annotate.h (struct annotate_arg_emitter): New.
11218
11219 2017-04-22  Tom Tromey  <tom@tromey.com>
11220
11221         * record-btrace.c (record_btrace_insn_history)
11222         (record_btrace_insn_history_range, record_btrace_call_history)
11223         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11224         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11225         ui_out_emit_tuple.
11226         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11227         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11228         * skip.c (skip_info): Use ui_out_emit_tuple.
11229         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11230         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11231         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11232         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11233         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11234         ui_out_emit_tuple.
11235         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11236         (output_register, mi_cmd_data_read_memory)
11237         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11238         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11239         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11240         Use ui_out_emit_tuple.
11241         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11242         ui_out_emit_tuple.
11243         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11244         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11245         * linux-thread-db.c (info_auto_load_libthread_db): Use
11246         ui_out_emit_tuple.
11247         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11248         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11249         * disasm.c (do_mixed_source_and_assembly_deprecated)
11250         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11251         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11252         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11253         * breakpoint.c (print_one_breakpoint_location)
11254         (print_one_breakpoint): Use ui_out_emit_tuple.
11255         * auto-load.c (print_script, info_auto_load_cmd): Use
11256         ui_out_emit_tuple.
11257         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11258
11259 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11260
11261         * thread.c (print_thread_info_1): Remove dead code.
11262
11263 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11264
11265         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11266         GDB_SELF_TEST.
11267         * arm-tdep.c (selftests::arm_record_test): Likewise.
11268
11269 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11270
11271         * regcache.c (regcache_restore): Remove argument 2.  Replace
11272         argument 3 with regcache.  Get register status from
11273         src->register_status and get register contents from
11274         register_buffer (src, regnum).
11275         (regcache_cpy): Update.
11276
11277 2017-04-19  Pedro Alves  <palves@redhat.com>
11278
11279         * gdbthread.h (thread): Add missing closing parenthesis in
11280         comment.
11281
11282 2017-04-19  Pedro Alves  <palves@redhat.com>
11283
11284         * common/refcounted-object.h: New file.
11285         * gdbthread.h: Include "common/refcounted-object.h".
11286         (thread_info): Inherit from refcounted_object and add comments.
11287         (thread_info::incref, thread_info::decref)
11288         (thread_info::m_refcount): Delete.
11289         (thread_info::deletable): Use the refcounted_object::refcount()
11290         method.
11291         * inferior.c (current_inferior_): Add comment.
11292         (set_current_inferior): Increment/decrement refcounts.
11293         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11294         not-deletable instead of comparing with the current inferior.
11295         (initialize_inferiors): Increment the initial inferior's refcount.
11296         * inferior.h (struct inferior): Forward declare.
11297         Include "common/refcounted-object.h".
11298         (current_inferior, set_current_inferior): Move declaration to
11299         before struct inferior's definition, and fix comment.
11300         (inferior): Inherit from refcounted_object.  Add comments.
11301         * thread.c (switch_to_thread_no_regs): Reference the thread's
11302         inferior pointer directly instead of doing a ptid lookup.
11303         (switch_to_no_thread): New function.
11304         (switch_to_thread(thread_info *)): New function, factored out
11305         from ...
11306         (switch_to_thread(ptid_t)): ... this.
11307         (restore_current_thread): Delete.
11308         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11309         fields, and add 'inf' field.
11310         (do_restore_current_thread_cleanup): Check whether old->inf is
11311         alive instead of looking up an inferior by ptid.  Use
11312         switch_to_thread and switch_to_no_thread.
11313         (restore_current_thread_cleanup_dtor): Use old->inf directly
11314         instead of lookup up an inferior by id.  Decref the inferior.
11315         Don't restore 'removable'.
11316         (make_cleanup_restore_current_thread): Same the inferior pointer
11317         in old, instead of the inferior number.  Incref the inferior.
11318         Don't save/clear 'removable'.
11319
11320 2017-04-19  Pedro Alves  <palves@redhat.com>
11321
11322         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11323         unittests/scoped_restore-selftests.c.
11324         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11325         * common/scoped_restore.h (scoped_restore_base): Make "class".
11326         (scoped_restore_base::release): New public method.
11327         (scoped_restore_base::scoped_restore_base): New protected ctor.
11328         (scoped_restore_base::m_saved_var): New protected field.
11329         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11330         scoped_restore_base base class instead of m_saved_var directly.
11331         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11332         (scoped_restore_tmpl::scoped_restore_tmpl(const
11333         scoped_restore_tmpl<T>&)): Likewise.
11334         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11335         method.
11336         (scoped_restore_tmpl::saved_var): New method.
11337         (scoped_restore_tmpl::m_saved_var): Delete.
11338         * inferior.h (inferior::detaching): Now a bool.
11339         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11340         cleanup.
11341         * unittests/scoped_restore-selftests.c: New file.
11342
11343 2017-04-19  Pedro Alves  <palves@redhat.com>
11344
11345         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11346         Re-sort in alphabetic order.
11347
11348 2017-04-18  Pedro Alves  <palves@redhat.com>
11349
11350         * xml-support.c (obstack_xml_printf): Delete.
11351         * xml-support.h (obstack_xml_printf): Delete.
11352
11353 2017-04-18  Pedro Alves  <palves@redhat.com>
11354
11355         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11356         vdebug, verror, body_text, start_element, end_element, name,
11357         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11358         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11359         is_xinclude>: Make private and add m_ prefix.
11360         (gdb_xml_parser::body_text): New method, based on ...
11361         (gdb_xml_body_text): ... this.  Adjust.
11362         (gdb_xml_parser::vdebug): New method, based on ...
11363         (gdb_xml_debug): ... this.  Adjust.
11364         (gdb_xml_parser::verror): New method, based on ...
11365         (gdb_xml_error): ... this.  Adjust.
11366         (gdb_xml_parser::start_element): New method, based on ...
11367         (gdb_xml_start_element): ... this.  Adjust.
11368         (gdb_xml_start_element_wrapper): Defer to
11369         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11370         (gdb_xml_parser::end_element): New method, based on ...
11371         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11372         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11373         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11374         (gdb_xml_parser::use_dtd): New method, based on ...
11375         (gdb_xml_use_dtd): ... this.  Adjust.
11376         (gdb_xml_parser::parse): New method, based on ...
11377         (gdb_xml_parse): ... this.  Adjust.
11378         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11379         (xinclude_start_include): Adjust to call the parser's name method.
11380         (xml_xinclude_default, xml_xinclude_start_doctype)
11381         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11382         method.
11383         (xml_process_xincludes): Adjust to call parser methods.
11384         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11385         declarations.
11386
11387 2017-04-18  Pedro Alves  <palves@redhat.com>
11388
11389         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11390         gdb::optional<std::string>.
11391         * xml-support.c: Include <string>.
11392         (scope_level::scope_level(scope_level &&))
11393         (scope_level::~scope_level): Delete.
11394         (scope_level::body): Now a std::string.
11395         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11396         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11397         parameter.
11398         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11399         (xinclude_parsing_data::output): Now a std::string reference.
11400         (xinclude_start_include): Adjust.
11401         (xml_xinclude_default): Adjust.
11402         (xml_process_xincludes): Add 'output' parameter, and return bool.
11403         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11404         and return bool.
11405         * xml-tdesc.c: Include <unordered_map> and <string>.
11406         (tdesc_xml_cache): Delete.
11407         (tdesc_xml_cache_s): Delete.
11408         (xml_cache): Now an std::unordered_map.
11409         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11410         (target_fetch_description_xml): Change return type to
11411         gdb::optional<std::string>, and adjust.
11412         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11413         (target_fetch_description_xml): Change return type to
11414         gdb::optional<std::string>.
11415
11416 2017-04-18  Pedro Alves  <palves@redhat.com>
11417
11418         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11419         unittests/optional-selftests.c.
11420         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11421         * unittests/optional-selftests.c: New file.
11422         * unittests/optional/assignment/1.cc: New file.
11423         * unittests/optional/assignment/2.cc: New file.
11424         * unittests/optional/assignment/3.cc: New file.
11425         * unittests/optional/assignment/4.cc: New file.
11426         * unittests/optional/assignment/5.cc: New file.
11427         * unittests/optional/assignment/6.cc: New file.
11428         * unittests/optional/assignment/7.cc: New file.
11429         * unittests/optional/cons/copy.cc: New file.
11430         * unittests/optional/cons/default.cc: New file.
11431         * unittests/optional/cons/move.cc: New file.
11432         * unittests/optional/cons/value.cc: New file.
11433         * unittests/optional/in_place.cc: New file.
11434         * unittests/optional/observers/1.cc: New file.
11435         * unittests/optional/observers/2.cc: New file.
11436
11437 2017-04-18  Pedro Alves  <palves@redhat.com>
11438
11439         * common/gdb_optional.h: Include common/traits.h.
11440         (in_place_t): New type.
11441         (in_place): New constexpr variable.
11442         (optional::optional): Remove member initialization of
11443         m_instantiated.
11444         (optional::optional(in_place_t...)): New constructor.
11445         (optional::~optional): Use reset.
11446         (optional::optional(const optional&)): New.
11447         (optional::optional(const optional&&)): New.
11448         (optional::optional(T &)): New.
11449         (optional::optional(T &&)): New.
11450         (operator::operator=(const optional &)): New.
11451         (operator::operator=(optional &&)): New.
11452         (operator::operator= (const T &))
11453         (operator::operator= (T &&))
11454         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11455         (operator::reset): New.
11456         (operator::m_instantiated):: Add in-class initializer.
11457         * common/traits.h: Include <type_traits>.
11458         (struct And): New types.
11459
11460 2017-04-18  Pedro Alves  <palves@redhat.com>
11461
11462         * xml-support.c: Include <vector>.
11463         (scope_level::scope_level(const gdb_xml_element *))
11464         (scope_level::scope_level(scope_level&&)): New.
11465         (scope_level::~scope_level): New.
11466         (scope_level_s): Delete.
11467         (gdb_xml_parser::scopes): Now a std::vector.
11468         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11469         Use std::vector.
11470         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11471         scope cleanup code.
11472         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11473         of the scopes member.  Use std::vector::emplace_back.
11474
11475 2017-04-18  Pedro Alves  <palves@redhat.com>
11476
11477         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11478         a bool.
11479         (gdb_xml_end_element): Change type of first parameter.
11480         (gdb_xml_cleanup): Rename to ...
11481         (gdb_xml_parser::~gdb_xml_parser): ... this.
11482         (gdb_xml_create_parser_and_cleanup): Delete with ...
11483         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11484         to this new ctor.
11485         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11486         using gdb_xml_create_parser_and_cleanup.
11487         (xinclude_parsing_data): Add ctor/dtor.
11488         (xml_xinclude_cleanup): Delete.
11489         (xml_process_xincludes): Create a local xinclude_parsing_data
11490         instead of heap-allocating one.  Create a local gdb_xml_parser
11491         instead of heap-allocating one with
11492         gdb_xml_create_parser_and_cleanup.
11493
11494 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11495
11496         PR threads/20743
11497         * fbsd-nat.c (resume_one_thread_cb): Remove.
11498         (resume_all_threads_cb): Remove.
11499         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11500         iterate_over_threads.
11501
11502 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11503
11504         * NEWS: Create a new section for the next release branch.
11505         Rename the section of the current branch, now that it has
11506         been cut.
11507
11508 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11509
11510         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11511         * version.in: Bump version to 8.0.50.DATE-git.
11512
11513 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11514
11515         PR gdb/21385
11516         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11517         independently of the host, and fix build breakage on Cygwin.
11518
11519 2017-04-13  Pedro Alves  <palves@redhat.com>
11520
11521         * inferior.c (free_inferior): Convert to ...
11522         (inferior::~inferior): ... this dtor.
11523         (inferior::inferior): New ctor, factored out from ...
11524         (add_inferior_silent): ... here.  Allocate the inferior with a new
11525         expression.
11526         (delete_inferior): Call delete instead of free_inferior.
11527         * inferior.h (gdb_environ, continuation): Forward declare.
11528         (inferior): Now a class.  Add in-class initialization to all
11529         members.  Make boolean fields bool, except 'detaching'.
11530         (inferior::inferior): New explicit ctor.
11531         (inferior::~inferior): New.
11532
11533 2017-04-13  Pedro Alves  <palves@redhat.com>
11534
11535         * inferior.c (init_inferior_list): Delete.
11536         * inferior.h (init_inferior_list): Delete.
11537
11538 2017-04-13  Pedro Alves  <palves@redhat.com>
11539
11540         PR threads/13217
11541         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11542         (top level): Call it twice, with different thread sets.
11543
11544 2017-04-13  Pedro Alves  <palves@redhat.com>
11545
11546         * thread.c: Include <algorithm>.
11547         (thread_array_cleanup): Delete.
11548         (scoped_inc_dec_ref): New class.
11549         (live_threads_count): New function.
11550         (set_thread_refcount): Delete.
11551         (tp_array_compar_ascending): Now a bool.
11552         (tp_array_compar): Convert to a std::sort comparison function.
11553         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11554         and live_threads_count.
11555
11556 2017-04-13  Pedro Alves  <palves@redhat.com>
11557
11558         * infrun.c (follow_fork_inferior): Also switch the current
11559         inferior.
11560
11561 2017-04-13  Pedro Alves  <palves@redhat.com>
11562
11563         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11564         before calling create_internal_breakpoint.
11565
11566 2017-04-13  Pedro Alves  <palves@redhat.com>
11567
11568         * fork-child.c (execv_argv): New class.
11569         (breakup_args): Refactored as ...
11570         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11571         Copy arguments to storage and replace separators with NULL
11572         terminators in place.
11573         (escape_bang_in_quoted_argument): Adjust to return bool.
11574         (execv_argv::execv_argv): New ctor.
11575         (execv_argv::init_for_shell): New method, factored out from
11576         fork_inferior.  Don't strdup strings into the vector.
11577         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11578         Remove free_vector_argv call.
11579
11580 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11581
11582         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11583         tdep->rx_psw_type.
11584
11585 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11586
11587         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11588         * rx-tdep.c (rx_gdbarch_init): Likewise.
11589
11590 2017-04-13  Pedro Alves  <palves@redhat.com>
11591
11592         * breakpoint.h (struct breakpoint): Reindent.
11593
11594 2017-04-13  Pedro Alves  <palves@redhat.com>
11595
11596         * breakpoint.c (bp_location): Rename to ...
11597         (bp_locations): ... this.  All references updated.
11598         (bp_location_count): Rename to ...
11599         (bp_locations_count): ... this.  All references updated.
11600         (bp_location_placed_address_before_address_max): Rename to ...
11601         (bp_locations_placed_address_before_address_max): ... this.  All
11602         references updated.
11603         (bp_location_shadow_len_after_address_max): Rename to ...
11604         (bp_locations_shadow_len_after_address_max): ... this.  All
11605         references updated.
11606         (bp_location_compare_addrs): Rename to ...
11607         (bp_locations_compare_addrs): ... this.  All references updated.
11608         (bp_location_compare):Rename to ...
11609         (bp_locations_compare): ... this.  All references updated.
11610         (bp_location_target_extensions_update): Rename to ...
11611         (bp_locations_target_extensions_update): ... this.  All references
11612         updated.
11613
11614 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11615
11616         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11617         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11618         'sgtty.h'.
11619         * common/gdb_termios.h: New file, with parts of "terminal.h".
11620         * inflow.c: Include "gdb_termios.h".
11621         * ser-unix.c: Include "gdb_termios.h".
11622         * terminal.h: Move terminal-related defines to
11623         "common/gdb_termios.h".
11624
11625 2017-04-12  Tom Tromey  <tom@tromey.com>
11626
11627         * probe.c (parse_probes): Update.
11628         * location.h (delete_event_location): Don't declare.
11629         (event_location_deleter::operator()): Update.
11630         * location.c (event_location_deleter::operator()): Rename from
11631         delete_event_location.
11632         * linespec.h (linespec_result) <location>: Change type to
11633         event_location_up.
11634         * linespec.c (canonicalize_linespec, event_location_to_sals)
11635         (decode_objc): Update.
11636         (linespec_result): Don't call delete_event_location.
11637         * breakpoint.c (create_breakpoints_sal)
11638         (bkpt_probe_create_sals_from_location)
11639         (strace_marker_create_sals_from_location): Update.
11640
11641 2017-04-12  Tom Tromey  <tom@tromey.com>
11642
11643         * linespec.h (struct linespec_result): Add constructor and
11644         destructor.
11645         (init_linespec_result, destroy_linespec_result)
11646         (make_cleanup_destroy_linespec_result): Don't declare.
11647         * linespec.c (init_linespec_result): Remove.
11648         (linespec_result::~linespec_result): Rename from
11649         destroy_linespec_result.  Update.
11650         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11651         Remove.
11652         * breakpoint.c (create_breakpoint, break_range_command)
11653         (decode_location_default): Update.
11654         * ax-gdb.c (agent_command_1): Update.
11655
11656 2017-04-12  Tom Tromey  <tom@tromey.com>
11657
11658         * remote.c (remote_download_tracepoint): Update.
11659         * python/py-breakpoint.c (bppy_get_location): Update.
11660         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11661         (gdbscm_breakpoint_location): Update.
11662         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11663         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11664         Change type to event_location_up.
11665         * breakpoint.c (create_overlay_event_breakpoint)
11666         (create_longjmp_master_breakpoint)
11667         (create_std_terminate_master_breakpoint)
11668         (create_exception_master_breakpoint)
11669         (breakpoint_event_location_empty_p, print_breakpoint_location)
11670         (print_one_breakpoint_location, create_thread_event_breakpoint)
11671         (init_breakpoint_sal, create_breakpoint)
11672         (print_recreate_ranged_breakpoint, break_range_command)
11673         (init_ada_exception_breakpoint, say_where): Update.
11674         (base_breakpoint_dtor): Don't call delete_event_location.
11675         (bkpt_print_recreate, tracepoint_print_recreate)
11676         (dprintf_print_recreate, update_static_tracepoint)
11677         (breakpoint_re_set_default): Update.
11678
11679 2017-04-12  Tom Tromey  <tom@tromey.com>
11680
11681         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11682         type of "to_do".  Update.
11683         (compute_stack_depth): Use std::vector.
11684
11685 2017-04-12  Tom Tromey  <tom@tromey.com>
11686
11687         * printcmd.c (find_instruction_backward): Use std::vector.
11688
11689 2017-04-12  Tom Tromey  <tom@tromey.com>
11690
11691         * symfile.c (objfilep): Remove typedef.
11692         (reread_symbols): Use a std::vector.
11693
11694 2017-04-12  Tom Tromey  <tom@tromey.com>
11695
11696         * mi/mi-main.c (exec_direction_forward): Remove.
11697         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11698         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11699         scoped_restore.
11700         * guile/guile.c (guile_repl_command, guile_command)
11701         (gdbscm_execute_gdb_command): Use scoped_restore.
11702         * go-exp.y (go_parse): Use scoped_restore.
11703         * d-exp.y (d_parse): Use scoped_restore.
11704         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11705         * c-exp.y (c_parse): Use scoped_restore.
11706
11707 2017-04-12  Tom Tromey  <tom@tromey.com>
11708
11709         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11710         (mi_parse): Update return type.
11711         (mi_parse_free): Remove.
11712         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11713         (mi_parse::~mi_parse): Rename from mi_parse_free.
11714         (mi_parse_cleanup): Remove.
11715         (mi_parse): Return a unique_ptr.  Use new.
11716         * mi/mi-main.c (mi_execute_command): Update.
11717
11718 2017-04-12  Tom Tromey  <tom@tromey.com>
11719
11720         * location.c (explicit_location_lex_one): Return a
11721         unique_xmalloc_ptr.
11722         (string_to_explicit_location): Update.  Remove cleanups.
11723
11724 2017-04-12  Tom Tromey  <tom@tromey.com>
11725
11726         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11727         (compare_value_and_voffset): Change type.  Update.
11728         (compute_vtable_size): Change type of "offset_vec".
11729         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11730         (gnuv3_get_typeid): Remove extraneous declaration.
11731
11732 2017-04-12  Tom Tromey  <tom@tromey.com>
11733
11734         * charset.h (wchar_iterator): Fix comment.
11735
11736 2017-04-12  Tom Tromey  <tom@tromey.com>
11737
11738         * charset.c (iconv_wrapper): New class.
11739         (cleanup_iconv): Remove.
11740         (convert_between_encodings): Use it.
11741
11742 2017-04-12  Tom Tromey  <tom@tromey.com>
11743
11744         * symfile.h (increment_reading_symtab): Update type.
11745         * symfile.c (decrement_reading_symtab): Remove.
11746         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11747         * psymtab.c (psymtab_to_symtab): Update.
11748         * dwarf2read.c (dw2_instantiate_symtab): Update.
11749
11750 2017-04-12  Tom Tromey  <tom@tromey.com>
11751
11752         * jit.c (struct jit_reader): Declare separately.  Add constructor
11753         and destructor.  Change type of "handle".
11754         (loaded_jit_reader): Define separately.
11755         (jit_reader_load): Update.  New "new".
11756         (jit_reader_unload_command): Use "delete".
11757         * gdb-dlfcn.h (struct dlclose_deleter): New.
11758         (gdb_dlhandle_up): New typedef.
11759         (gdb_dlopen, gdb_dlsym): Update types.
11760         (gdb_dlclose): Remove.
11761         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11762         (gdb_dlsym): Change type of "handle".
11763         (make_cleanup_dlclose): Remove.
11764         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11765         * compile/compile-c-support.c (load_libcc): Update.
11766
11767 2017-04-12  Tom Tromey  <tom@tromey.com>
11768
11769         * symtab.h (find_pcs_for_symtab_line): Change return type.
11770         * symtab.c (find_pcs_for_symtab_line): Change return type.
11771         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11772         type of "vec".  Update.
11773         (ltpy_get_pcs_for_line): Update.
11774         * linespec.c (decode_digits_ordinary): Update.
11775
11776 2017-04-12  Tom Tromey  <tom@tromey.com>
11777
11778         * tracepoint.c (actions_command): Update.
11779         * python/python.c (python_command, python_interactive_command):
11780         Update.
11781         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11782         * guile/guile.c (guile_command): Update.
11783         * defs.h (read_command_lines, read_command_lines_1): Return
11784         command_line_up.
11785         (command_lines_deleter): New struct.
11786         (command_line_up): New typedef.
11787         * compile/compile.c (compile_code_command)
11788         (compile_print_command): Update.
11789         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11790         command_line_up.
11791         (make_cleanup_free_command_lines): Remove.
11792         * cli/cli-script.c (get_command_line, read_command_lines_1)
11793         (copy_command_lines): Return command_line_up.
11794         (while_command, if_command, read_command_lines, define_command)
11795         (document_command): Update.
11796         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11797         Remove.
11798         * breakpoint.h (breakpoint_set_commands): Change type of
11799         "commands".
11800         * breakpoint.c (breakpoint_set_commands): Change type of
11801         "commands".  Update.
11802         (do_map_commands_command, update_dprintf_command_list)
11803         (create_tracepoint_from_upload): Update.
11804
11805 2017-04-12  Tom Tromey  <tom@tromey.com>
11806
11807         * tracepoint.c (scope_info): Update.
11808         * spu-tdep.c (spu_catch_start): Update.
11809         * python/python.c (gdbpy_decode_line): Update.
11810         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11811         * python/py-breakpoint.c (bppy_init): Update.
11812         * probe.c (parse_probes): Update.
11813         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11814         * location.h (event_location_deleter): New struct.
11815         (event_location_up): New typedef.
11816         (new_linespec_location, new_address_location, new_probe_location)
11817         (new_explicit_location, copy_event_location)
11818         (string_to_event_location, string_to_event_location_basic)
11819         (string_to_explicit_location): Update return type.
11820         (make_cleanup_delete_event_location): Remove.
11821         * location.c (new_linespec_location, new_address_location)
11822         (new_probe_location, new_explicit_location, copy_event_location):
11823         Return event_location_up.
11824         (delete_event_location_cleanup)
11825         (make_cleanup_delete_event_location): Remove.
11826         (string_to_explicit_location, string_to_event_location_basic)
11827         (string_to_event_location): Return event_location_up.
11828         * linespec.c (canonicalize_linespec, event_location_to_sals)
11829         (decode_line_with_current_source)
11830         (decode_line_with_last_displayed, decode_objc): Update.
11831         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11832         * completer.c (location_completer): Update.
11833         * cli/cli-cmds.c (edit_command, list_command): Update.
11834         * breakpoint.c (create_overlay_event_breakpoint)
11835         (create_longjmp_master_breakpoint)
11836         (create_std_terminate_master_breakpoint)
11837         (create_exception_master_breakpoint)
11838         (create_thread_event_breakpoint): Update.
11839         (init_breakpoint_sal): Update.  Remove some dead code.
11840         (create_breakpoint_sal): Change type of "location".  Update.
11841         (create_breakpoints_sal, create_breakpoint, break_command_1)
11842         (dprintf_command, break_range_command, until_break_command)
11843         (init_ada_exception_breakpoint)
11844         (strace_marker_create_sals_from_location)
11845         (update_static_tracepoint, trace_command, ftrace_command)
11846         (strace_command, create_tracepoint_from_upload): Update.
11847         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11848         * ax-gdb.c (agent_command_1): Update.
11849
11850 2017-04-12  Pedro Alves  <palves@redhat.com>
11851
11852         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11853         * configure.tgt: Handle i[34567]86-*-go32* and
11854         i[34567]86-*-msdosdjgpp*.
11855         * i386-tdep.c (i386_svr4_reg_to_regnum):
11856         Make extern.
11857         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11858         i386-go32-tdep.c.
11859         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11860         * i386-go32-tdep.c: New file.
11861         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11862         declarations.
11863
11864 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11865
11866         * aix-thread.c (pd_status2str): Change return type to const char *.
11867
11868 2017-04-12  Pedro Alves  <palves@redhat.com>
11869
11870         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11871         calls to set_gdbarch_gnu_triplet_regexp.
11872
11873 2017-04-12  Pedro Alves  <palves@redhat.com>
11874
11875         PR gdb/21323
11876         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11877         New enum value.
11878         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11879         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11880         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11881         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11882         * gdbarch.h, gdbarch.c: Regenerate.
11883         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11884         gdbarch_wchar_bit and gdbarch_wchar_signed.
11885         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11886         * arm-tdep.c (arm_gdbarch_init): Likewise.
11887         * avr-tdep.c (avr_gdbarch_init): Likewise.
11888         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11889         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11890         * i386-tdep.c (i386_go32_init_abi): Likewise.
11891         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11892         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11893         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11894         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11895         * sh-tdep.c (sh_gdbarch_init): Likewise.
11896         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11897         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11898         * windows-tdep.c (windows_init_abi): Likewise.
11899         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11900
11901 2017-04-12  Pedro Alves  <palves@redhat.com>
11902
11903         PR c++/21323
11904         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11905         cplus_primitive_type_char32_t>: New enum values.
11906         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11907         and cplus_primitive_type_char32_t.
11908         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11909         32, use the archtecture's built-in type for char16_t and char32_t,
11910         respectively.  Otherwise, fallback to init_integer_type as before,
11911         but make the type unsigned, and issue a complaint.
11912         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11913
11914 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11915
11916         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11917         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11918
11919 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11920
11921         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11922         'const char *'.
11923
11924 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11925
11926         * common/common-utils.c (free_vector_argv): New function.
11927         * common/common-utils.h: Include <vector>.
11928         (free_vector_argv): New prototype.
11929         * darwin-nat.c (darwin_create_inferior): Rewrite function
11930         prototype in order to constify "exec_file" and accept a
11931         "std::string" for "allargs".
11932         * fork-child.c: Include <vector>.
11933         (breakup_args): Rewrite function, using C++.
11934         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11935         and accept "std::string" for "allargs".  Update the code to
11936         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11937         and "execvp".
11938         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11939         order to constify "exec_file" and accept a "std::string" for
11940         "allargs".
11941         * go32-nat.c (go32_create_inferior): Likewise.
11942         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11943         * infcmd.c (run_command_1): Constify "exec_file".  Use
11944         "std::string" for inferior arguments.
11945         * inferior.h (fork_inferior): Update prototype.
11946         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11947         prototype in order to constify "exec_file" and accept a
11948         "std::string" for "allargs".
11949         * nto-procfs.c (procfs_create_inferior): Likewise.
11950         * procfs.c (procfs_create_inferior): Likewise.
11951         * remote-sim.c (gdbsim_create_inferior): Likewise.
11952         * remote.c (extended_remote_run): Update code to accept
11953         "std::string" as argument.
11954         (extended_remote_create_inferior): Rewrite function prototype in
11955         order to constify "exec_file" and accept a "std::string" for
11956         "allargs".
11957         * rs6000-nat.c (super_create_inferior): Likewise.
11958         (rs6000_create_inferior): Likewise.
11959         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11960         * windows-nat.c (windows_create_inferior): Likewise.
11961
11962 2017-04-11  Pedro Alves  <palves@redhat.com>
11963
11964         * thread.c: Fix whitespace throughout.
11965
11966 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11967
11968         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11969
11970 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11971
11972         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11973
11974 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11975
11976         PR gdb/21364
11977         * osdata.c (info_osdata): Check if 'type' is an empty string
11978         instead of NULL.
11979
11980 2017-04-10  Pedro Alves  <palves@redhat.com>
11981
11982         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11983         (ptid_to_global_thread_id, in_thread_list)
11984         (do_captured_list_thread_ids, set_resumed, set_running)
11985         (set_executing, set_stop_requested, finish_thread_state)
11986         (validate_registers_access, can_access_registers_ptid)
11987         (print_thread_info_1, switch_to_thread)
11988         (do_restore_current_thread_cleanup)
11989         (make_cleanup_restore_current_thread, thread_command)
11990         (thread_name_command): Use operator== instead of ptid_equal.
11991
11992 2017-04-10  Pedro Alves  <palves@redhat.com>
11993
11994         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11995         (current_thread_cleanup_chain): Delete.
11996         (restore_current_thread_cleanup_dtor)
11997         (make_cleanup_restore_current_thread): Remove references to
11998         current_thread_cleanup_chain.
11999
12000 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12001
12002         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12003         REG_UNKNOWN.
12004
12005 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12006
12007         PR gdb/19942
12008         * gdbthread.h (thread_info::deletable): New method.
12009         (thread_info::incref): New method.
12010         (thread_info::decref): New method.
12011         (thread_info::refcount): Move it to private.
12012         * infrun.c (save_stop_context): Call inc_refcount.
12013         (release_stop_context_cleanup): Likewise.
12014         * thread.c (set_thread_exited): New function.
12015         (init_thread_list): Delete "tp" only it is deletable, otherwise
12016         call set_thread_exited.
12017         (delete_thread_1): Call set_thread_exited.
12018         (current_thread_cleanup) <inferior_pid>: Remove.
12019         <thread>: New field.
12020         (restore_current_thread_ptid_changed): Removed.
12021         (do_restore_current_thread_cleanup): Adjust.
12022         (restore_current_thread_cleanup_dtor): Don't call
12023         find_thread_ptid.
12024         (set_thread_refcount): Use dec_refcount.
12025         (make_cleanup_restore_current_thread): Adjust.
12026         (thread_apply_all_command): Call inc_refcount.
12027         (_initialize_thread): Don't call
12028         observer_attach_thread_ptid_changed.
12029
12030 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12031
12032         * thread.c (delete_thread_1): Hoist code on marking thread as
12033         exited.
12034
12035 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12036
12037         * windows-nat.c (windows_detach): Initialize ptid with
12038         minus_one_ptid.
12039
12040 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12041
12042         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12043
12044 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12045
12046         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12047         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12048         (bfin_pseudo_register_write): Likewise
12049
12050 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12051
12052         * common/ptid.h (struct ptid): Change to...
12053         (class ptid_t): ... this.
12054         <ptid_t>: New constructors.
12055         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12056         matches>: New methods.
12057         <make_null, make_minus_one>: New static methods.
12058         <pid>: Rename to...
12059         <m_pid>: ...this.
12060         <lwp>: Rename to...
12061         <m_lwp>: ...this.
12062         <tid>: Rename to...
12063         <m_tid>: ...this.
12064         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12065         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12066         as references, move comment to class ptid_t.
12067         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12068         ptid_t static methods.
12069         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12070         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12071         Take ptid arguments as references, implement using ptid_t methods.
12072         * unittests/ptid-selftests.c: New file.
12073         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12074         unittests/ptid-selftests.c.
12075         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12076
12077 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12078
12079         * python/python.c (python_run_simple_file): Cast mode literal to
12080         non-const char pointer as expected by PyFile_FromString.
12081
12082 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12083
12084         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12085         minus_one_ptid and null_ptid.
12086
12087 2017-04-05  Pedro Alves  <palves@redhat.com>
12088
12089         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12090         * configure: Regenerate.
12091
12092 2017-04-05  Pedro Alves  <palves@redhat.com>
12093
12094         * ada-exp.y (yyerror): Constify.
12095         * ada-lang.c (bound_name, get_selections)
12096         (ada_variant_discrim_type)
12097         (ada_variant_discrim_name, ada_value_struct_elt)
12098         (ada_lookup_struct_elt_type, is_unchecked_variant)
12099         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12100         (catch_ada_exception_command_split)
12101         (catch_ada_assert_command_split, catch_assert_command)
12102         (ada_op_name): Constify.
12103         * ada-lang.h (ada_yyerror, get_selections)
12104         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12105         * arc-tdep.c (arc_print_frame_cache): Constify.
12106         * arm-tdep.c (arm_skip_stub): Constify.
12107         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12108         (gen_aggregate_elt_ref): Constify.
12109         * bcache.c (print_bcache_statistics): Constify.
12110         * bcache.h (print_bcache_statistics): Constify.
12111         * break-catch-throw.c (catch_exception_command_1):
12112         * breakpoint.c (struct ep_type_description::description):
12113         Constify.
12114         (add_solib_catchpoint): Constify.
12115         (catch_fork_command_1): Add cast.
12116         (add_catch_command): Constify.
12117         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12118         Constify.
12119         * bsd-uthread.c (bsd_uthread_state): Constify.
12120         * buildsym.c (patch_subfile_names): Constify.
12121         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12122         Constify.
12123         * c-exp.y (yyerror): Constify.
12124         (token::oper): Constify.
12125         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12126         * c-varobj.c (cplus_describe_child): Constify.
12127         * charset.c (find_charset_names): Add cast.
12128         (find_charset_names): Constify array and add const_cast.
12129         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12130         (edit_command): Constify.
12131         * cli/cli-decode.c (lookup_cmd): Constify.
12132         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12133         Constify.
12134         (struct dump_context): Constify.
12135         (add_dump_command, restore_command): Constify.
12136         * cli/cli-script.c (get_command_line): Constify.
12137         * cli/cli-script.h (get_command_line): Constify.
12138         * cli/cli-utils.c (check_for_argument): Constify.
12139         * cli/cli-utils.h (check_for_argument): Constify.
12140         * coff-pe-read.c (struct read_pe_section_data): Constify.
12141         * command.h (lookup_cmd): Constify.
12142         * common/print-utils.c (decimal2str): Constify.
12143         * completer.c (gdb_print_filename): Constify.
12144         * corefile.c (set_gnutarget): Constify.
12145         * cp-name-parser.y (yyerror): Constify.
12146         * cp-valprint.c (cp_print_class_member): Constify.
12147         * cris-tdep.c (cris_register_name, crisv32_register_name):
12148         Constify.
12149         * d-exp.y (yyerror): Constify.
12150         (struct token::oper): Constify.
12151         * d-lang.h (d_yyerror): Constify.
12152         * dbxread.c (struct header_file_location::name): Constify.
12153         (add_old_header_file, add_new_header_file, last_function_name)
12154         (dbx_next_symbol_text, add_bincl_to_list)
12155         (find_corresponding_bincl_psymtab, set_namestring)
12156         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12157         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12158         * defs.h (command_line_input, print_address_symbolic)
12159         (deprecated_readline_begin_hook): Constify.
12160         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12161         Constify.
12162         * event-top.c (handle_line_of_input): Constify and add cast.
12163         * exceptions.c (catch_errors): Constify.
12164         * exceptions.h (catch_errors): Constify.
12165         * expprint.c (print_subexp_standard, op_string, op_name)
12166         (op_name_standard, dump_raw_expression, dump_raw_expression):
12167         * expression.h (op_name, op_string, dump_raw_expression):
12168         Constify.
12169         * f-exp.y (yyerror): Constify.
12170         (struct token::oper): Constify.
12171         (struct f77_boolean_val::name): Constify.
12172         * f-lang.c (f_word_break_characters): Constify.
12173         * f-lang.h (f_yyerror): Constify.
12174         * fork-child.c (fork_inferior): Add cast.
12175         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12176         (new_variant): Constify.
12177         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12178         * gdbarch.c: Regenerate.
12179         * gdbcore.h (set_gnutarget): Constify.
12180         * go-exp.y (yyerror): Constify.
12181         (token::oper): Constify.
12182         * go-lang.h (go_yyerror): Constify.
12183         * go32-nat.c (go32_sysinfo): Constify.
12184         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12185         * guile/scm-cmd.c (cmdscm_function): Constify.
12186         * guile/scm-param.c (pascm_param_value): Constify.
12187         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12188         (h8300sx_register_name): Constify.
12189         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12190         Constify.
12191         * ia64-tdep.c (ia64_register_names): Constify.
12192         * infcmd.c (construct_inferior_arguments): Constify.
12193         (path_command, attach_post_wait): Constify.
12194         * language.c (show_range_command, show_case_command)
12195         (unk_lang_error): Constify.
12196         * language.h (language_defn::la_error)
12197         (language_defn::la_name_of_this): Constify.
12198         * linespec.c (decode_line_2): Constify.
12199         * linux-thread-db.c (thread_db_err_str): Constify.
12200         * lm32-tdep.c (lm32_register_name): Constify.
12201         * m2-exp.y (yyerror): Constify.
12202         * m2-lang.h (m2_yyerror): Constify.
12203         * m32r-tdep.c (m32r_register_names): Constify and make static.
12204         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12205         * m88k-tdep.c (m88k_register_name): Constify.
12206         * macroexp.c (appendmem): Constify.
12207         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12208         (upgrade_type, parse_external, parse_partial_symbols)
12209         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12210         (new_symbol): Constify.
12211         * memattr.c (mem_info_command): Constify.
12212         * mep-tdep.c (register_name_from_keyword): Constify.
12213         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12214         Constify.
12215         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12216         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12217         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12218         cast.
12219         (mi_execute_async_cli_command): Constify.
12220         * mips-tdep.c (mips_register_name): Constify.
12221         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12222         (am33_register_name, am33_2_register_name)
12223         * moxie-tdep.c (moxie_register_names): Constify.
12224         * nat/linux-osdata.c (osdata_type): Constify fields.
12225         * nto-tdep.c (nto_parse_redirection): Constify.
12226         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12227         (lookup_child_selector): Constify.
12228         (objc_methcall::name): Constify.
12229         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12230         (lookup_struct_typedef): Constify.
12231         * objfiles.c (pc_in_section): Constify.
12232         * objfiles.h (pc_in_section): Constify.
12233         * p-exp.y (struct token::oper): Constify.
12234         (yyerror): Constify.
12235         * p-lang.h (pascal_yyerror): Constify.
12236         * parser-defs.h (op_name_standard): Constify.
12237         (op_print::string): Constify.
12238         (exp_descriptor::op_name): Constify.
12239         * printcmd.c (print_address_symbolic): Constify.
12240         * psymtab.c (print_partial_symbols): Constify.
12241         * python/py-breakpoint.c (stop_func): Constify.
12242         (bppy_get_expression): Constify.
12243         * python/py-cmd.c (cmdpy_completer::name): Constify.
12244         (cmdpy_function): Constify.
12245         * python/py-event.c (evpy_add_attribute)
12246         (gdbpy_initialize_event_generic): Constify.
12247         * python/py-event.h (evpy_add_attribute)
12248         (gdbpy_initialize_event_generic): Constify.
12249         * python/py-evts.c (add_new_registry): Constify.
12250         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12251         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12252         * python/py-inferior.c (get_buffer): Add cast.
12253         * python/py-param.c (parm_constant::name): Constify.
12254         * python/py-unwind.c (fprint_frame_id): Constify.
12255         * python/python.c (gdbpy_parameter_value): Constify.
12256         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12257         * remote.c (memory_packet_config::name): Constify.
12258         (show_packet_config_cmd, remote_write_bytes)
12259         (remote_buffer_add_string):
12260         * reverse.c (exec_reverse_once): Constify.
12261         * rs6000-tdep.c (variant::name, variant::description): Constify.
12262         * rust-exp.y (rustyyerror): Constify.
12263         * rust-lang.c (rust_op_name): Constify.
12264         * rust-lang.h (rustyyerror): Constify.
12265         * serial.h (serial_ops::name): Constify.
12266         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12267         (sh_sh3e_register_name, sh_sh2e_register_name)
12268         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12269         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12270         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12271         (sh_sh4al_dsp_register_name): Constify.
12272         * sh64-tdep.c (sh64_register_name): Constify.
12273         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12274         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12275         * stabsread.c (patch_block_stabs, read_type_number)
12276         (ref_map::stabs, ref_add, process_reference)
12277         (symbol_reference_defined, define_symbol, define_symbol)
12278         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12279         (read_one_struct_field, read_struct_fields, read_baseclasses)
12280         (read_tilde_fields, read_struct_type, read_array_type)
12281         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12282         (read_huge_number, read_range_type, read_args, common_block_start)
12283         (find_name_end): Constify.
12284         * stabsread.h (common_block_start, define_symbol)
12285         (process_one_symbol, symbol_reference_defined, ref_add):
12286         * symfile.c (get_section_index, add_symbol_file_command):
12287         * symfile.h (get_section_index): Constify.
12288         * target-descriptions.c (tdesc_type::name): Constify.
12289         (tdesc_free_type): Add cast.
12290         * target.c (find_default_run_target):
12291         (add_deprecated_target_alias, find_default_run_target)
12292         (target_announce_detach): Constify.
12293         (do_option): Constify.
12294         * target.h (add_deprecated_target_alias): Constify.
12295         * thread.c (print_thread_info_1): Constify.
12296         * top.c (deprecated_readline_begin_hook, command_line_input):
12297         Constify.
12298         (init_main): Add casts.
12299         * top.h (handle_line_of_input): Constify.
12300         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12301         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12302         (tfind_command): Rename to ...
12303         (tfind_command_1): ... this and constify.
12304         (tfind_command): New function.
12305         (tfind_end_command, tfind_start_command): Adjust.
12306         (encode_source_string): Constify.
12307         * tracepoint.h (encode_source_string): Constify.
12308         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12309         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12310         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12311         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12312         * tui/tui-win.c (parse_scrolling_args): Constify.
12313         * tui/tui-windata.c (tui_erase_data_content): Constify.
12314         * tui/tui-windata.h (tui_erase_data_content): Constify.
12315         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12316         * tui/tui.c (tui_enable): Add cast.
12317         * utils.c (defaulted_query): Constify.
12318         (init_page_info): Add cast.
12319         (puts_debug, subset_compare): Constify.
12320         * utils.h (subset_compare): Constify.
12321         * varobj.c (varobj_format_string): Constify.
12322         * varobj.h (varobj_format_string): Constify.
12323         * vax-tdep.c (vax_register_name): Constify.
12324         * windows-nat.c (windows_detach): Constify.
12325         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12326         * xml-support.c (gdb_xml_end_element): Constify.
12327         * xml-tdesc.c (tdesc_start_reg): Constify.
12328         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12329         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12330         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12331
12332 2017-04-05  Pedro Alves  <palves@redhat.com>
12333
12334         * proc-api.c (struct trans): Constify.
12335         (procfs_note): Constify.
12336         * proc-events.c (struct trans, syscall_table):
12337         * proc-flags.c (struct trans): Constify.
12338         * proc-utils.h (procfs_note): Constify.
12339         * proc-why.c (struct trans): Constify.
12340         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12341         (procfs_detach): Constify.
12342         * sol-thread.c (struct string_map): Constify.
12343         (td_err_string, td_state_string): Constify.
12344
12345 2017-04-05  Pedro Alves  <palves@redhat.com>
12346
12347         * proc-api.c (procfs_filename): Don't initialize
12348         procfs_filename.
12349         (prepare_to_trace): Assume procfs_filename is non-NULL.
12350         (_initialize_proc_api): Give procfs_filename a default value here.
12351
12352 2017-04-05  Pedro Alves  <palves@redhat.com>
12353
12354         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12355         'cond_string' parameter.
12356         (extract_exception_regexp): Constify 'string' parameter.
12357         (catch_exception_command_1): Constify.
12358         * breakpoint.c (init_catchpoint)
12359         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12360         parameter.
12361         (ep_parse_optional_if_clause, catch_fork_command_1)
12362         (catch_exec_command_1): Constify.
12363         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12364         parameter.
12365         (ep_parse_optional_if_clause): Constify.
12366         * cli/cli-utils.c (remove_trailing_whitespace)
12367         (check_for_argument): Constify.
12368         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12369         non-const overload.
12370         (check_for_argument): Likewise.
12371
12372 2017-04-05  Pedro Alves  <palves@redhat.com>
12373
12374         * event-top.c (command_line_handler): Add cast to execute_command
12375         call.
12376         * record-btrace.c (cmd_record_btrace_bts_start)
12377         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12378         (cmd_record_btrace_start): Add cast to execute_command call.
12379         * record-full.c (record_full_goto_insn):
12380         * record.c (record_start, record_stop): Add cast to
12381         execute_command_to_string calls.
12382         (cmd_record_start): Add cast to execute_command calls.
12383
12384 2017-04-05  Pedro Alves  <palves@redhat.com>
12385
12386         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12387         static inline function.
12388         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12389         array and use gdb_PyArg_ParseTupleAndKeywords.
12390         * python/py-cmd.c (cmdpy_init): Likewise.
12391         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12392         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12393         (infpy_search_memory): Likewise.
12394         * python/py-objfile.c (objfpy_add_separate_debug_file)
12395         (gdbpy_lookup_objfile): Likewise.
12396         * python/py-symbol.c (gdbpy_lookup_symbol)
12397         (gdbpy_lookup_global_symbol): Likewise.
12398         * python/py-type.c (gdbpy_lookup_type): Likewise.
12399         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12400         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12401         Likewise.
12402
12403 2017-04-05  Pedro Alves  <palves@redhat.com>
12404
12405         * python/python-internal.h (gdb_PyGetSetDef): New type.
12406         * python/py-block.c (block_object_getset)
12407         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12408         * python/py-event.c (event_object_getset)
12409         (finish_breakpoint_object_getset): Likewise.
12410         * python/py-inferior.c (inferior_object_getset): Likewise.
12411         * python/py-infthread.c (thread_object_getset): Likewise.
12412         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12413         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12414         * python/py-objfile.c (objfile_getset): Likewise.
12415         * python/py-progspace.c (pspace_getset): Likewise.
12416         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12417         Likewise.
12418         * python/py-record.c (recpy_record_getset): Likewise.
12419         * python/py-symbol.c (symbol_object_getset): Likewise.
12420         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12421         Likewise.
12422         * python/py-type.c (type_object_getset, field_object_getset):
12423         Likewise.
12424         * python/py-value.c (value_object_getset): Likewise.
12425
12426 2017-04-05  Pedro Alves  <palves@redhat.com>
12427
12428         * python/python-internal.h (gdb_PyObject_CallMethod)
12429         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12430         New functions.
12431         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12432         (PySys_GetObject, PySys_SetPath): New macros.
12433
12434 2017-04-05  Pedro Alves  <palves@redhat.com>
12435
12436         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12437         info_osdata_command.
12438         * osdata.c (info_osdata_command): Rename to ...
12439         (info_osdata): ... this.  Constify 'type' parameter, and remove
12440         the 'from_tty' parameter.  Accept NULL TYPE.
12441         (info_osdata_command): New function.
12442         * osdata.h (info_osdata_command): Remove declaration.
12443         (info_osdata): New declaration.
12444
12445 2017-04-05  Pedro Alves  <palves@redhat.com>
12446
12447         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12448         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12449         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12450         parameter.
12451         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12452         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12453         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12454         parameter.
12455         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12456         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12457         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12458         (mi_cmd_file_list_exec_source_files)
12459         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12460         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12461         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12462         parameter.
12463         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12464         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12465         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12466         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12467         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12468         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12469         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12470         'command' parameter.
12471         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12472         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12473         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12474         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12475         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12476         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12477         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12478         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12479         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12480         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12481         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12482         parameter.
12483         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12484         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12485         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12486         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12487         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12488         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12489         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12490         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12491         (mi_cmd_data_list_changed_registers)
12492         (mi_cmd_data_write_register_values)
12493         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12494         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12495         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12496         (mi_cmd_list_features, mi_cmd_list_target_features)
12497         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12498         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12499         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12500         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12501         (mi_cmd_trace_frame_collected): Constify 'command'
12502         parameter.
12503         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12504         'command' parameter.
12505
12506 2017-04-05  Pedro Alves  <palves@redhat.com>
12507
12508         * ada-lang.c (ada_completer_word_break_characters): Now a const
12509         array.
12510         (ada_get_gdb_completer_word_break_characters): Constify.
12511         * completer.c (gdb_completer_command_word_break_characters)
12512         (gdb_completer_file_name_break_characters)
12513         (gdb_completer_quote_characters): Now const arrays.
12514         (get_gdb_completer_quote_characters): Constify.
12515         (set_rl_completer_word_break_characters): New function.
12516         (set_gdb_completion_word_break_characters)
12517         (complete_line_internal): Use it.
12518         * completer.h (get_gdb_completer_quote_characters): Constify.
12519         (set_rl_completer_word_break_characters): Declare.
12520         * f-lang.c (f_word_break_characters): Constify.
12521         * language.c (default_word_break_characters): Constify.
12522         * language.h (language_defn::la_word_break_characters): Constify.
12523         (default_word_break_characters): Constify.
12524         * top.c (init_main): Use set_rl_completer_word_break_characters.
12525
12526 2017-04-05  Pedro Alves  <palves@redhat.com>
12527
12528         * aix-thread.c (aix_thread_pid_to_str)
12529         (aix_thread_extra_thread_info): Constify.
12530         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12531         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12532         (bsd_uthread_pid_to_str): Constify.
12533         * corelow.c (core_pid_to_str): Constify.
12534         * darwin-nat.c (darwin_pid_to_str): Constify.
12535         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12536         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12537         Constify.
12538         * gnu-nat.c (gnu_pid_to_str): Constify.
12539         * go32-nat.c (go32_pid_to_str): Constify.
12540         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12541         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12542         * inferior.c (inferior_pid_to_str): Constify.
12543         * linux-nat.c (linux_nat_pid_to_str): Constify.
12544         * linux-tdep.c (linux_core_pid_to_str): Constify.
12545         * linux-thread-db.c (thread_db_pid_to_str)
12546         (thread_db_extra_thread_info): Constify.
12547         * nto-tdep.c (nto_extra_thread_info): Constify.
12548         * nto-tdep.h (nto_extra_thread_info): Constify.
12549         * obsd-nat.c (obsd_pid_to_str): Constify.
12550         * procfs.c (procfs_pid_to_str): Constify.
12551         * ravenscar-thread.c (ravenscar_extra_thread_info)
12552         (ravenscar_pid_to_str): Constify.
12553         * remote-sim.c (gdbsim_pid_to_str): Constify.
12554         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12555         Constify.
12556         * sol-thread.c (solaris_pid_to_str): Constify.
12557         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12558         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12559         * target.c (default_pid_to_str, target_pid_to_str)
12560         (normal_pid_to_str, default_pid_to_str): Constify.
12561         * target.h (target_ops::to_pid_to_str)
12562         (target_ops::to_extra_thread_info): Constify.
12563         (target_pid_to_str, normal_pid_to_str): Constify.
12564         * windows-nat.c (windows_pid_to_str): Constify.
12565         * gdbarch.sh (core_pid_to_str): Constify.
12566         * target-delegates.c: Regenerate.
12567         * gdbarch.h, gdbarch.c: Regenerate.
12568
12569 2017-04-05  Pedro Alves  <palves@redhat.com>
12570
12571         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12572         the memory of the temporary warning_pre_print override.
12573         * utils.c (warning_pre_print): Constify.
12574         * utils.h (warning_pre_print): Constify.
12575
12576 2017-04-05  Pedro Alves  <palves@redhat.com>
12577
12578         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12579         (shell_command): New function.
12580         (make_command): Use std::string.
12581         (init_cli_cmds): Register shell_command instead of shell_escape.
12582
12583 2017-04-05  Pedro Alves  <palves@redhat.com>
12584
12585         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12586         * tracepoint.c (default_collect): Don't initialize.
12587
12588 2017-04-05  Pedro Alves  <palves@redhat.com>
12589
12590         * macroexp.c (macro_buffer::shared): Now a bool.
12591         (init_buffer): Update.
12592         (init_shared_buffer): Constify 'addr' parameter.
12593         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12594         casts.
12595
12596 2017-04-05  Pedro Alves  <palves@redhat.com>
12597
12598         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12599         * disasm.c (set_disassembler_options): Constify local.
12600         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12601
12602 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12603
12604         PR gdb/21352
12605         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12606         option.
12607
12608 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12609
12610         * frame.c (frame_unwind_register_unsigned): Call
12611         frame_unwind_register_value.
12612
12613 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12614
12615         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12616         Use gdb_test_multiple, and don't match anchor.
12617
12618 2017-04-05  Pedro Alves  <palves@redhat.com>
12619
12620         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12621         (Write After Approval): Remove Simon Marchi.
12622
12623 2017-04-05  Pedro Alves  <palves@redhat.com>
12624
12625         * common/gdb_optional.h (optional::optional): Make constexpr and
12626         initialize m_dummy.
12627
12628 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12629
12630         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12631         (amd64fbsd_jmp_buf_reg_offset): Remove.
12632         (amd64fbsd_supply_uthread): Remove function.
12633         (amd64fbsd_collect_uthread): Remove function.
12634         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12635         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12636         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12637         (fbsd-nat.c): Update comment.
12638         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12639         (i386fbsd_jmp_buf_reg_offset): Remove.
12640         (i386fbsd_supply_uthread): Remove function.
12641         (i386fbsd_collect_uthread): Remove function.
12642         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12643
12644 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12645
12646         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12647         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12648         * NEWS: Mention that support for FreeBSD/alpha was removed.
12649         * alpha-fbsd-tdep.c: Delete file.
12650         * config/alpha/fbsd.mh: Delete file.
12651         * configure.host: Delete alpha*-*-freebsd* and
12652         alpha*-*-kfreebsd*-gnu.
12653         * configure.tgt: Delete alpha*-*-freebsd* and
12654         alpha*-*-kfreebsd*-gnu.
12655
12656 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12657
12658         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12659         amd64bsd_store_inferior_registers): Use ptid from regcache.
12660
12661 2017-04-04  Pedro Alves  <palves@redhat.com>
12662
12663         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12664         data fields, make them private and add "m_" prefixes.
12665         (lnp_state_machine::lnp_state_machine): New ctor.
12666         (record_line, check_line_address, handle_set_discriminator)
12667         (handle_set_address, handle_advance_pc, handle_special_opcode)
12668         (handle_advance_line, handle_set_file, handle_negate_stmt)
12669         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12670         (end_sequence, advance_line): New methods.
12671         (m_gdbarch, m_record_lines_p): New fields.
12672         (lnp_reader_state): Delete.
12673         (dwarf_record_line): Rename to ...
12674         (lnp_state_machine::record_line): ... adjust.
12675         (init_lnp_state_machine): Delete.
12676         (lnp_state_machine::lnp_state_machine): New.
12677         (check_line_address): Rename to ...
12678         (lnp_state_machine::check_line_address): This.
12679         (dwarf_decode_lines_1): Remove reference to "reader_state".
12680         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12681         State machine internal state manipulation moved to
12682         lnp_state_machine methods.
12683
12684 2017-04-04  Pedro Alves  <palves@redhat.com>
12685
12686         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12687         unittests/offset-type-selftests.c.
12688         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12689         * common/offset-type.h: New file.
12690         * common/preprocessor.h: New file.
12691         * common/traits.h: New file.
12692         * common/valid-expr.h: New file.
12693         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12694         sect_offset and cu_offset strong typedefs throughout.
12695         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12696         typedefs throughout.
12697         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12698         sect_offset and cu_offset strong typedefs throughout.
12699         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12700         typedefs throughout.
12701         * gdbtypes.h: Include "common/offset-type.h".
12702         (cu_offset): Now an offset type (strong typedef) instead of a
12703         struct.
12704         (sect_offset): Likewise.
12705         (union call_site_parameter_u): Rename "param_offset" field to
12706         "param_cu_off".
12707         * unittests/offset-type-selftests.c: New file.
12708
12709 2017-04-04  Pedro Alves  <palves@redhat.com>
12710
12711         * common/underlying.h: New file.
12712         * dwarf2read.c: Include "common/gdb_optional.h" and
12713         "common/underlying.h".
12714         (dir_index, file_name_index): New types.
12715         (file_entry): Use them.
12716         (file_entry::include): Use to_underlying.
12717         (line_header::add_file_name): Use dir_index.
12718         (read_formatted_entries): Use gdb::optional.  Read form before
12719         writting to file_entry.
12720         (dwarf_decode_line_header): Use dir_index.
12721         (lnp_state_machine::current_file): Use to_underlying.
12722         (lnp_state_machine::file): Change type to file_name_index.
12723         (dwarf_record_line): Use to_underlying.
12724         (init_lnp_state_machine): Use file_name_index.
12725         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12726
12727 2017-04-04  Pedro Alves  <palves@redhat.com>
12728
12729         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12730         operator bool, has_value and get methods.
12731
12732 2017-04-04  Pedro Alves  <palves@redhat.com>
12733
12734         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12735         fields.
12736         (line_header): Initialize all data fields.  Change type of
12737         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12738         Change type of include_dirs to std::vector<const char *>.  Remove
12739         num_include_dirs, include_dirs_size.  Change type of file_names to
12740         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12741         (line_header::line_header): New.
12742         (line_header::add_include_dir, line_header::add_file_name): New
12743         methods.
12744         (line_header::include_dir_at): Remove NULL check.
12745         (line_header::file_name_at): Add const overload.
12746         (line_header_up): New unique_ptr typedef.
12747         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12748         std::vector.  Remove free_line_header call.
12749         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12750         free_line_header call.
12751         (free_cu_line_header): Delete.
12752         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12753         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12754         Adjust to use std::vector.
12755         (free_line_header): Delete.
12756         (free_line_header_voidp): Use delete.
12757         (add_include_dir): Replace with ...
12758         (line_header::add_include_dir): ... this method.  Use std::vector.
12759         (add_file_name): Replace with ...
12760         (line_header::add_file_name): ... this method.  Use std::vector.
12761         (add_include_dir_stub): Delete.
12762         (read_formatted_entries): Remove memset.
12763         (dwarf_decode_line_header): Return a line_header_up instead of a
12764         raw pointer.  Remove cleanup handling.  Pass lambdas to
12765         read_formatted_entries.  Adjust to use line_header methods.
12766         (dwarf_decode_lines_1): Adjust to use line_header methods.
12767         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12768         use std::vector.
12769
12770 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12771
12772         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12773         instead of struct ptid.
12774
12775 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12776
12777         * frame.c (get_frame_register_bytes): Unwind using value.
12778         (put_frame_register_bytes): Likewise.
12779
12780 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12781
12782         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12783         aggregate-like.
12784
12785 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12786
12787         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12788
12789 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12790
12791         * gdbthread.h (struct thread_info): Declare constructor and
12792         destructor.  Add some in-class member initializers.
12793         * thread.c (free_thread): Remove.
12794         (init_thread_list): Call delete instead of free_thread.
12795         (new_thread): Call thread_info constructor.
12796         (thread_info::thread_info): New function.
12797         (thread_info::~thread_info): New function.
12798         (delete_thread_1): Call delete instead of free_thread.
12799         (make_cleanup_restore_current_thread): Move tp and frame to
12800         inner block.
12801
12802 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12803
12804         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12805         (arc_skip_prologue): Likewise.
12806         (arc_make_frame_cache): Likewise.
12807         (arc_pv_get_operand): New function.
12808         (arc_is_in_prologue): Likewise.
12809         (arc_analyze_prologue): Likewise.
12810         (arc_print_frame_cache): Likewise.
12811         (MAX_PROLOGUE_LENGTH): New constant.
12812
12813 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12814
12815         * configure.tgt: Add arc-insn.o.
12816         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12817         (dump_arc_instruction_command): New function.
12818         (arc_fprintf_disasm): Likewise.
12819         (arc_disassemble_info): Likewise.
12820         (arc_insn_get_operand_value): Likewise.
12821         (arc_insn_get_operand_value_signed): Likewise.
12822         (arc_insn_get_memory_base_reg): Likewise.
12823         (arc_insn_get_memory_offset): Likewise.
12824         (arc_insn_get_branch_target): Likewise.
12825         (arc_insn_dump): Likewise.
12826         (arc_insn_get_linear_next_pc): Likewise.
12827         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12828         (arc_disassemble_info): Likewise.
12829         (arc_insn_get_branch_target): Likewise.
12830         (arc_insn_get_linear_next_pc): Likewise.
12831         * NEWS: Mention new "maint print arc arc-instruction".
12832
12833 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12834
12835         * arc-tdep (maintenance_print_arc_list): New variable.
12836         (maintenance_print_arc_command): New function.
12837
12838 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12839
12840         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12841         Add "limm" and "reserved".
12842         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12843         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12844         * arc-tdep.h (arc_regnum): Likewise.
12845
12846 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12847
12848         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12849         for THREADPTR register.
12850         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12851         register.
12852         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12853         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12854         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12855
12856 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12857
12858         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12859         registers above gdbarch_num_regs (gdbarch) as privileged in
12860         call0 ABI.
12861
12862 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12863
12864         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12865         for a single specified register or for all registers in
12866         a0_base..a0_base + C0_NREGS range.
12867         (supply_gregset_reg): Call regcache_raw_supply for a single
12868         specified register or for all registers in a0_base..a0_base +
12869         C0_NREGS range.
12870
12871 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12872
12873         * arch/xtensa.h (C0_NREGS): Add definition.
12874         * xtensa-tdep.c (C0_NREGS): Remove definition.
12875
12876 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12877
12878         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12879         Drop xtensa_default_isa initialization.
12880         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12881
12882 2017-03-27  Pedro Alves  <palves@redhat.com>
12883
12884         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12885         (file_entry::include_dir): New method.
12886         (line_header::include_dir_at, line_header::file_name_at): New
12887         methods.
12888         (setup_type_unit_groups, setup_type_unit_groups)
12889         (psymtab_include_file_name): Simplify using the new methods.
12890         (lnp_state_machine) <the_line_header>: New field.
12891         <file>: Add comment.
12892         (lnp_state_machine::current_file): New method.
12893         (dwarf_record_line): Simplify using the new methods.
12894         (init_lnp_state_machine): Initialize the "the_line_header" field.
12895         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12896         Simplify using the new methods.
12897
12898 2017-03-27  Pedro Alves  <palves@redhat.com>
12899
12900         * cp-name-parser.y (make_empty): Delete.
12901         (demangler_special, nested_name, ptr_operator, array_indicator)
12902         (direct_declarator, declarator_1): Use fill_comp instead of
12903         make_empty.
12904
12905 2017-03-27  Pedro Alves  <palves@redhat.com>
12906
12907         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12908         to ATTRIBUTE_PRINTF.
12909         * solib-target.c (library_list_start_list): Print "string" not
12910         "version".
12911         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12912         gdb_xml_error call.
12913
12914 2017-03-27  Pedro Alves  <palves@redhat.com>
12915
12916         * dwarf2read.c (struct file_and_directory): New.
12917         (dwarf2_get_dwz_file): Adjust to use std::string.
12918         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12919         (find_file_and_directory): Adjust to return a file_and_directory
12920         object.
12921         (read_file_scope): Adjust to use file_and_directory.  Remove
12922         make_cleanup/do_cleanups calls.
12923         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12924         make_cleanup/do_cleanups calls.
12925         * python/python.c (do_start_initialization): Adjust to ldirname
12926         returning a std::string.
12927         * utils.c (ldirname): Now returns a std::string.
12928         * utils.h (ldirname): Change return type to std::string.
12929         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12930         returning a std::string.
12931         * xml-tdesc.c (file_read_description_xml): Likewise.
12932
12933 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12934
12935         * regcache.c (regcache_debug_print_register): New function.
12936         * regcache.h (regcache_debug_print_register): New declaration.
12937         * target.c (debug_print_register): Remove.
12938         (target_fetch_registers): Call regcache_debug_print_register.
12939         (target_store_registers): Likewise.
12940
12941 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12942
12943         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12944         reference beyond the 'lh->include_dirs' array before accessing to
12945         it.
12946         (psymtab_include_file_name): Likewise.
12947         (dwarf_decode_lines_1): Likewise.
12948         (dwarf_decode_lines): Likewise.
12949         (file_file_name): Likewise.
12950
12951 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12952
12953         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12954         inferior_ptid.
12955         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12956         ps_lsetfpregs): Likewise.
12957         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12958         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12959         ps_lsetfpregs): Likewise.
12960         * target.c (target_fetch_registers, target_store_registers):
12961         Remove asserts.
12962
12963 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12964
12965         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12966
12967 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12968
12969         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12970         (_initialize_aarch64_tdep): Register it.
12971         (aarch64_record_load_store): Handle PRFM instruction.
12972         (aarch64_process_record_test): New function.
12973
12974 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12975
12976         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12977         indentation.
12978
12979 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12980
12981         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12982
12983 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12984
12985         python/python.c (do_start_initialization): Fix memory leak.
12986
12987 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12988
12989         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12990         using get_ptrace_pid.
12991         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12992         inferior_ptid.
12993         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12994         inferior_ptid instead of pid.
12995
12996 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12997
12998         * aarch64-tdep.c: Wrap locally used classes in anonymous
12999         namespace.
13000         * arm-tdep.c: Likewise.
13001         * linespec.c: Likewise.
13002         * ui-out.c: Likewise.
13003
13004 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13005
13006         PR gdb/19637
13007         * python/lib/gdb/printer/bound_registers.py: Import sys.
13008
13009 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13010
13011         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13012         windows_thread_info parameter and use it instead of
13013         current_thread.
13014         (windows_fetch_inferior_registers): Don't set current_thread,
13015         pass the thread to do_windows_fetch_inferior_registers.  Use
13016         ptid from regcache instead of inferior_ptid.
13017         (do_windows_store_inferior_registers): Add windows_thread_info
13018         parameter and use it instead of current_thread.
13019         (windows_store_inferior_registers): Don't set current_thread,
13020         pass the thread to do_windows_store_inferior_registers.  Use
13021         ptid from regcache instead of inferior_ptid.
13022
13023 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13024
13025         * ser-mingw.c (ser_windows_raw): Remove reference to
13026         struct serial::current_timeout.
13027
13028 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13029
13030         PR tdep/20928
13031         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13032         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13033         (sparc64_fsr_type): Fix %fsr decoding.
13034
13035 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13036
13037         * python/py-record-btrace.c (btpy_insn_data): Change return type
13038         for Python 2.
13039
13040 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13041
13042         * spu-linux-nat.c (spu_fetch_inferior_registers,
13043         spu_store_inferior_registers): Use ptid from regcache, set and
13044         restore inferior_ptid.
13045         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13046         Likewise.
13047
13048 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13049
13050         * i386-linux-nat.c (fetch_register, store_register,
13051         i386_linux_fetch_inferior_registers,
13052         i386_linux_store_inferior_registers): Use ptid from regcache.
13053         * ia64-linux-nat.c (ia64_linux_fetch_register,
13054         ia64_linux_store_register): Likewise.
13055         * inf-ptrace.c (inf_ptrace_fetch_register,
13056         inf_ptrace_store_register): Likewise.
13057         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13058         m32r_linux_store_inferior_registers): Likewise.
13059         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13060         m68kbsd_store_inferior_registers): Likewise.
13061         * m68k-linux-nat.c (fetch_register, store_register,
13062         m68k_linux_fetch_inferior_registers,
13063         m68k_linux_store_inferior_registers): Likewise.
13064         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13065         m88kbsd_store_inferior_registers): Likewise.
13066         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13067         mips_fbsd_store_inferior_registers): Likewise.
13068         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13069         mips64_linux_regsets_store_registers): Likewise.
13070         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13071         mipsnbsd_store_inferior_registers): Likewise.
13072         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13073         mips64obsd_store_inferior_registers): Likewise.
13074         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13075         Likewise.
13076         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13077         ppcfbsd_store_inferior_registers): Likewise.
13078         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13079         ppc_linux_store_inferior_registers): Likewise.
13080         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13081         ppcnbsd_store_inferior_registers): Likewise.
13082         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13083         ppcobsd_store_registers): Likewise.
13084         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13085         Likewise.
13086         * ravenscar-thread.c (ravenscar_fetch_registers,
13087         ravenscar_store_registers, ravenscar_prepare_to_store):
13088         Likewise.
13089         * record-btrace.c (record_btrace_fetch_registers,
13090         record_btrace_store_registers, record_btrace_prepare_to_store):
13091         Likewise.
13092         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13093         Lookup inferior using ptid from regcache, instead of
13094         current_inferior.
13095         * remote.c (remote_fetch_registers, remote_store_registers): Use
13096         ptid from regcache.
13097         * rs6000-nat.c (fetch_register, store_register): Likewise.
13098         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13099         s390_linux_store_inferior_registers): Likewise.
13100         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13101         shnbsd_store_inferior_registers): Likewise.
13102         * sol-thread.c (sol_thread_fetch_registers,
13103         sol_thread_store_registers): Likewise.
13104         * sparc-nat.c (sparc_fetch_inferior_registers,
13105         sparc_store_inferior_registers): Likewise.
13106         * tilegx-linux-nat.c (fetch_inferior_registers,
13107         store_inferior_registers): Likewise.
13108         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13109         vaxbsd_store_inferior_registers): Likewise.
13110         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13111         store_xtregs): Likewise.
13112
13113 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13114
13115         PR gdb/14441
13116         * NEWS: Mention support for rvalue references in GDB and python.
13117         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13118         supports both lvalue and rvalue references.
13119
13120 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13121
13122         PR gdb/14441
13123         * gdbtypes.c (rank_one_type): Implement overloading
13124         resolution rules regarding rvalue references.
13125
13126 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13127
13128         PR gdb/14441
13129         * aarch64-tdep.c (aarch64_type_align)
13130         (aarch64_extract_return_value, aarch64_store_return_value): Change
13131         lvalue reference type checks to general reference type checks.
13132         * amd64-tdep.c (amd64_classify): Likewise.
13133         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13134         Likewise.
13135         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13136         (arm_store_return_value): Likewise.
13137         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13138         * c-typeprint.c (c_print_type): Likewise.
13139         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13140         (cplus_number_of_children, cplus_describe_child): Likewise.
13141         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13142         * completer.c (expression_completer): Likewise.
13143         * cp-support.c (make_symbol_overload_list_adl_namespace):
13144         Likewise.
13145         * darwin-nat-info.c (info_mach_region_command): Likewise.
13146         * dwarf2loc.c (entry_data_value_coerce_ref)
13147         (value_of_dwarf_reg_entry): Likewise.
13148         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13149         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13150         Likewise.
13151         * findvar.c (extract_typed_address, store_typed_address):
13152         Likewise.
13153         * gdbtypes.c (rank_one_type): Likewise.
13154         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13155         * infcall.c (value_arg_coerce): Likewise.
13156         * language.c (pointer_type): Likewise.
13157         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13158         Likewise.
13159         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13160         * mn10300-tdep.c (mn10300_type_align): Likewise.
13161         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13162         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13163         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13164         Likewise.
13165         * printcmd.c (print_formatted, x_command): Likewise.
13166         * python/py-type.c (typy_get_composite, typy_template_argument):
13167         Likewise.
13168         * python/py-value.c (valpy_referenced_value)
13169         (valpy_get_dynamic_type, value_has_field): Likewise.
13170         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13171         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13172         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13173         * spu-tdep.c (spu_scalar_value_p): Likewise.
13174         * symtab.c (lookup_symbol_aux): Likewise.
13175         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13176         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13177         Likewise.
13178         * valops.c (value_cast_pointers, value_cast)
13179         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13180         (value_struct_elt, value_struct_elt_bitpos)
13181         (value_find_oload_method_list, find_overload_match)
13182         (value_rtti_indirect_type): Likewise.
13183         * valprint.c (val_print_scalar_type_p, generic_val_print):
13184         Likewise.
13185         * value.c (value_actual_type, value_as_address, unpack_long)
13186         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13187         (coerce_ref): Likewise.
13188         * varobj.c (varobj_get_value_type): Likewise.
13189
13190 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13191
13192         PR gdb/14441
13193         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13194         table of constants.
13195         * python/lib/gdb/command/explore.py: Support exploring values
13196         of rvalue reference types.
13197         * python/lib/gdb/types.py: Implement get_basic_type() for
13198         rvalue reference types.
13199         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13200         constant.
13201         * python/py-value.c (valpy_getitem): Add an rvalue reference
13202         check.
13203         (valpy_reference_value): Add new parameter "refcode".
13204         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13205         New wrappers for valpy_reference_value().
13206         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13207         (gdbpy_invoke_xmethod): Likewise.
13208
13209 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13210
13211         PR gdb/14441
13212         * dwarf2read.c (process_die, read_type_die_1): Handle the
13213         DW_TAG_rvalue_reference_type DIE.
13214         (read_tag_reference_type): Add new parameter "refcode".
13215
13216 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13217
13218         PR gdb/14441
13219         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13220         (c_type_print_modifier, c_type_print_varspec_suffix)
13221         (c_type_print_base): Support printing rvalue reference types.
13222         * c-valprint.c (c_val_print, c_value_print): Support printing
13223         rvalue reference values.
13224
13225 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13226
13227         PR gdb/14441
13228         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13229         typename.
13230         * cp-support.c (replace_typedefs): Handle
13231         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13232         * python/py-type.c (typy_lookup_type): Likewise.
13233
13234 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13235
13236         PR gdb/14441
13237         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13238         * parse.c (insert_type): Change assert statement.
13239         (follow_types): Handle rvalue reference types.
13240         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13241         constant.
13242
13243 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13244
13245         PR gdb/14441
13246         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13247         value_ref() interface.
13248         * c-valprint.c (c_value_print): Likewise.
13249         * infcall.c (value_arg_coerce): Likewise.
13250         * python/py-value.c (valpy_reference_value): Likewise.
13251         * valops.c (value_cast, value_reinterpret_cast)
13252         (value_dynamic_cast, typecmp): Likewise.
13253         (value_ref): Parameterize by kind of return value reference type.
13254         * value.h (value_ref): Add new parameter "refcode".
13255
13256 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13257
13258         PR gdb/14441
13259         * dwarf2read.c (read_tag_reference_type): Use
13260         lookup_lvalue_reference_type() instead of lookup_reference_type().
13261         * eval.c (evaluate_subexp_standard): Likewise.
13262         * f-exp.y: Likewise.
13263         * gdbtypes.c (make_reference_type, lookup_reference_type):
13264         Generalize with rvalue reference types.
13265         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13266         convenience wrappers for lookup_reference_type().
13267         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13268         reference kind parameter.
13269         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13270         wrappers for lookup_reference_type().
13271         * guile/scm-type.c (gdbscm_type_reference): Use
13272         lookup_lvalue_reference_type() instead of lookup_reference_type().
13273         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13274         * parse.c (follow_types): Likewise.
13275         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13276         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13277         Likewise.
13278         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13279         (gdbpy_invoke_xmethod): Likewise.
13280         * stabsread.c: Provide extra argument to make_reference_type()
13281         call.
13282         * valops.c (value_ref, value_rtti_indirect_type): Use
13283         lookup_lvalue_reference_type() instead of lookup_reference_type().
13284
13285 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13286
13287         PR gdb/14441
13288         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13289         (TYPE_IS_REFERENCE): New macro.
13290         (struct type): Add rvalue_reference_type field.
13291         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13292
13293 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13294
13295         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13296         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13297         New function definition.
13298         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13299         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13300         New function declaration.
13301         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13302         * mi/mi-interp.h: New file.
13303         * solib.c (info_sharedlibrary_command): Replace for loop with
13304         ALL_SO_LIBS macro
13305         * solib.h (update_solib_list): New function declaration.
13306         (so_list_head): Move macro.
13307         * solist.h (ALL_SO_LIBS): New macro.
13308
13309 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13310
13311         * infcmd.c (post_create_inferior): Remove unused argument in
13312         call to solib_add.
13313         * remote.c (remote_start_remote): Likewise.
13314         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13315         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13316         (enable_break): Likewise.
13317         * solib.c (update_solib_list): Remove unused target argument
13318         and its documentation.
13319         (solib_add): Remove unused target argument.  Remove unused
13320         argument in call to update_solib_list.
13321         (info_sharedlibrary_command): Remove unused argument in call
13322         to update_solib_list.
13323         (sharedlibrary_command): Remove unused argument in call to
13324         solib_add.
13325         (handle_solib_event): Likewise.
13326         (reload_shared_libraries): Likewise.
13327         * solib.h (solib_add): Remove unused target argument.
13328
13329 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13330
13331         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13332         (s390_displaced_step_fixup): Cover relative branches with the
13333         default fixup handling.  This fixes lack of support for some
13334         relative branch instructions.
13335
13336 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13337
13338         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13339         ptid from regcache.
13340
13341 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13342
13343         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13344         i386_darwin_store_inferior_registers): Use ptid from regcache.
13345
13346 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13347
13348         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13349         i386bsd_store_inferior_registers): Use ptid from regcache.
13350
13351 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13352
13353         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13354         hppaobsd_store_registers): Use ptid from regcache.
13355
13356 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13357
13358         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13359         hppanbsd_store_registers): Use ptid from regcache.
13360
13361 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13362
13363         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13364         from regcache.  Use get_ptrace_pid.
13365
13366 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13367
13368         * corelow.c (get_core_register_section): Use ptid from regcache,
13369         update doc.
13370
13371 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13372
13373         * bsd-uthread.c (bsd_uthread_fetch_registers,
13374         bsd_uthread_store_registers): Use ptid from regcache, set and
13375         restore inferior_ptid.
13376
13377 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13378
13379         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13380         fetch_fp_regs, store_register, store_regs, store_fp_register,
13381         store_fp_regs): Use ptid from regcache.
13382
13383 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13384
13385         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13386         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13387         store_vfp_regs): Use ptid from regcache.
13388
13389 2017-03-17  Pedro Alves  <palves@redhat.com>
13390
13391         PR remote/21188
13392         * ser-base.c (ser_base_wait_for): Add comment.
13393         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13394         version.
13395         * ser-unix.c (hardwire_raw): Remove reference to
13396         scb->current_timeout.
13397         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13398         (hardwire_ops): Install ser_base_readchar instead of
13399         hardwire_readchar.
13400         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13401         Remove fields.
13402
13403 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13404
13405         PR gdb/19637
13406         * python/lib/gdb/printer/bound_registers.py: Add support for
13407         Python 3.
13408
13409 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13410
13411         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13412         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13413         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13414         byte_offset to subobj_byte_offset.  Fix the handling of
13415         DWARF_VALUE_STACK on big-endian targets when coming via an
13416         implicit pointer.
13417         (dwarf2_evaluate_loc_desc): Adjust call to
13418         dwarf2_evaluate_loc_desc_full.
13419         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13420         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13421
13422 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13423
13424         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13425         and REVSH instructions.
13426
13427 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13428
13429         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13430         (arm_record_test): Declare.
13431         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13432         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13433         align with the manual.
13434         (thumb_record_misc): Adjust the code order to align with the
13435         manual.
13436         (thumb2_record_decode_insn_handler): Fix instruction matching.
13437         (instruction_reader_thumb): New class.
13438         (arm_record_test): New function.
13439
13440 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13441
13442         * arm-tdep.c (abstract_memory_reader): New class.
13443         (instruction_reader): New class.
13444         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13445         (decode_insn): Likewise.
13446
13447 2017-03-16  Doug Evans  <dje@google.com>
13448
13449         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13450         member.  Change type of TYPE member to SCM.  All uses updated.
13451         (lsscm_make_lazy_string_smob): Add assert.
13452         (lsscm_make_lazy_string): Flag bad length values.
13453         (lsscm_elt_type): New function.
13454         (gdbscm_lazy_string_to_value): Rewrite to use
13455         lsscm_safe_lazy_string_to_value.
13456         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13457         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13458         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13459         in incoming type.
13460         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13461         * guile/scm-type.c (tyscm_scm_to_type): New function.
13462
13463 2017-03-15  Doug Evans  <dje@google.com>
13464
13465         PR python/17728, python/18439, python/18779
13466         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13467         member.  Change type of TYPE member to PyObject *.  All uses updated.
13468         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13469         (gdbpy_create_lazy_string_object): Flag bad length values.
13470         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13471         Handle typedefs in incoming type.
13472         (stpy_lazy_string_elt_type): New function.
13473         (gdbpy_extract_lazy_string): Call it.
13474         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13475         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13476         typedefs in incoming type.
13477
13478 2017-03-16  Doug Evans  <dje@google.com>
13479
13480         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13481         * guile/scm-type.c (tyscm_scm_to_type): New function.
13482
13483 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13484
13485         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13486         "ULONGEST" for "skip".
13487
13488 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13489
13490         PR gdb/21220
13491         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13492         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13493         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13494         over ptrace peek/poke until end of buffer or error.
13495
13496 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13497
13498         * parse.c (length_of_subexp): Make static.
13499         * parser-defs.h (length_of_subexp): Remove.
13500
13501 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13502
13503         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13504         as well.
13505
13506 2017-03-14  Pedro Alves  <palves@redhat.com>
13507
13508         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13509         (main): Use std::unique_ptr.  Remove calls to
13510         cp_demangled_name_parse_free.
13511
13512 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13513
13514         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13515         alphabsd_store_inferior_registers): Use regcache->ptid instead
13516         of inferior_ptid.
13517
13518 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13519
13520         * aix-thread.c (aix_thread_fetch_registers,
13521         aix_thread_store_registers): Use regcache->ptid instead of
13522         inferior_ptid.
13523
13524 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13525
13526         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13527         store_gregs_to_thread, fetch_fpregs_from_thread,
13528         store_fpregs_to_thread): Use regcache->ptid instead of
13529         inferior_ptid.
13530
13531 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13532
13533         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13534         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13535         instead of inferior_ptid.
13536
13537 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13538
13539         * target.c (target_fetch_registers, target_store_registers): Add
13540         assert.
13541
13542 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13543
13544         * regcache.h (regcache_get_ptid): New function.
13545         * regcache.c (regcache_get_ptid): New function.
13546
13547 2017-03-13  Mark Wielaard  <mark@klomp.org>
13548
13549         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13550
13551 2017-03-10  Keith Seitz  <keiths@redhat.com>
13552
13553         PR c++/8218
13554         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13555
13556 2017-03-08  Pedro Alves  <palves@redhat.com>
13557
13558         PR gdb/18360
13559         * infrun.c (start_step_over, do_target_resume, resume)
13560         (restart_threads): Assert we're not resuming a thread that is
13561         meant to be stopped.
13562         (infrun_thread_stop_requested_callback): Delete.
13563         (infrun_thread_stop_requested): If the thread is internally
13564         stopped, queue a pending stop event and clear the thread's
13565         inline-frame state.
13566         (handle_stop_requested): New function.
13567         (handle_syscall_event, handle_inferior_event_1): Use
13568         handle_stop_requested.
13569         (handle_stop_requested): New function.
13570         (handle_signal_stop): Set the thread's stop_signal here instead of
13571         at caller.
13572         (finish_step_over): Clear step over info unconditionally.
13573         (handle_signal_stop): If the user had interrupted the event
13574         thread, consider the stop a random signal.
13575         (handle_signal_stop) <signal arrived while stepping over
13576         breakpoint>: Don't restart threads here.
13577         (stop_waiting): Don't clear step-over info here.
13578
13579 2017-03-08  Pedro Alves  <palves@redhat.com>
13580
13581         PR 21206
13582         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13583         goes to argument 2, not 1.
13584
13585 2017-03-08  Pedro Alves  <palves@redhat.com>
13586
13587         PR cli/21218
13588         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13589         display_gdb_prompt.
13590         (command_line_input): Add comment.
13591
13592 2017-03-08  Pedro Alves  <palves@redhat.com>
13593
13594         PR tui/21216
13595         * tui/tui-file.c (tui_file::write): New.
13596         * tui/tui-file.h (tui_file): Override "write".
13597         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13598         factored out from ...
13599         (tui_puts): ... here.
13600         (tui_putc): Use them.
13601         (tui_write): New function.
13602         * tui/tui-io.h (tui_write): Declare.
13603
13604 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13605
13606         * Makefile.in (SFILES): Replace "environ.c" with
13607         "common/environ.c".
13608         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13609         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13610         to...
13611         * common/environ.c: ... here.
13612         * environ.h: Moved to...
13613         * common/environ.h: ... here.
13614
13615 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13616
13617         * gdbarch.sh (pstring_ptr): New static function.
13618         (gdbarch_disassembler_options): Use it.
13619         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13620         not valid_disassembler_option->name.
13621         * gdbarch.c: Regenerate.
13622
13623 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13624
13625         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13626
13627 2017-03-07  Pedro Alves  <palves@redhat.com>
13628
13629         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13630
13631 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13632
13633         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13634         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13635         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13636         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13637
13638 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13639
13640         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13641
13642 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13643
13644         * remote.c (remote_add_target_side_commands): Use range-based
13645         for loop.
13646
13647 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13648
13649         PR gdb/21165
13650         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13651         value is lazy.
13652         * valprint.c (common_val_print): Likewise.
13653
13654 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13655
13656         * NEWS: Mention new set/show disassembler-options commands.
13657         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13658         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13659         (prospective_options): New static variable.
13660         (gdb_disassembler::gdb_disassembler): Initialize
13661         m_di.disassembler_options.
13662         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13663         (get_disassembler_options): New function.
13664         (set_disassembler_options): Likewise.
13665         (set_disassembler_options_sfunc): Likewise.
13666         (show_disassembler_options_sfunc): Likewise.
13667         (disassembler_options_completer): Likewise.
13668         (_initialize_disasm): Likewise.
13669         * disasm.h (get_disassembler_options): New prototype.
13670         (set_disassembler_options): Likewise.
13671         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13672         (gdbarch_verify_disassembler_options): Likewise.
13673         * gdbarch.c: Regenerate.
13674         * gdbarch.h: Likewise.
13675         * arm-tdep.c (num_disassembly_options): Delete.
13676         (set_disassembly_style): Likewise.
13677         (arm_disassembler_options): New static variable.
13678         (set_disassembly_style_sfunc): Convert short style name into long
13679         option name.  Call set_disassembler_options.
13680         (show_disassembly_style_sfunc): New function.
13681         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13682         set_gdbarch_verify_disassembler_options.
13683         (_initialize_arm_tdep): Delete regnames variable and update callers.
13684         (arm_disassembler_options): Initialize.
13685         (disasm_options): New variable.
13686         (num_disassembly_options): Rename from this...
13687         (num_disassembly_styles): ...to this.  Compute by scanning through
13688         disasm_options.
13689         (valid_disassembly_styles): Initialize using disasm_options.
13690         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13691         set_arm_regname_option.
13692         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13693         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13694         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13695         set_gdbarch_verify_disassembler_options.
13696         * s390-tdep.c (s390_disassembler_options): New static variable.
13697         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13698         set_gdbarch_verify_disassembler_options.
13699
13700 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13701
13702         * remote.c (remote_add_target_side_condition): Remove "struct"
13703         keyword from range-based for loop.
13704
13705 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13706
13707         * remote.c (remote_add_target_side_condition): Use range-based
13708         for loop.  Update comment.
13709
13710 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13711
13712         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13713
13714 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13715
13716         * regcache.c (regcache_raw_update): New function.
13717         (regcache_raw_read): Move code to regcache_raw_update.
13718         * regcache.h (regcache_raw_update): New declaration.
13719         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13720
13721 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13722
13723         * dwarf2read.c (create_debug_type_hash_table): Initialize
13724         header.signature and header.type_offset_in_tu.
13725
13726 2017-02-24  Pedro Alves  <palves@redhat.com>
13727
13728         * symtab.c (make_file_symbol_completion_list_1): Use
13729         add_symtab_completions.
13730
13731 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13732
13733         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13734
13735 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13736
13737         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13738         I386_MAX_REGISTER_SIZE.
13739         (i386_pseudo_register_write): Likewise.
13740         (i386_process_record): Likewise.
13741         * i387-tdep.c (i387_supply_xsave): Likewise.
13742         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13743         (store_register): Likewise.
13744
13745 2017-02-23  Pedro Alves  <palves@redhat.com>
13746
13747         * ada-lang.c: Include "common/function-view.h".
13748         (ada_iterate_over_symbols): Adjust to use function_view as
13749         callback type.
13750         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13751         (ada_make_symbol_completion_list): Use a lambda.
13752         (ada_exc_search_name_matches): Delete.
13753         (name_matches_regex): New.
13754         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13755         * compile/compile-c-support.c: Include "common/function-view.h".
13756         (print_one_macro): Change prototype to accept a ui_file pointer.
13757         (write_macro_definitions): Use a lambda.
13758         * dwarf2read.c: Include "common/function-view.h".
13759         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13760         (dw2_expand_symtabs_matching): Adjust to use function_view as
13761         callback type.
13762         * language.h: Include "common/function-view.h".
13763         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13764         function_view as callback type.
13765         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13766         * linespec.c: Include "common/function-view.h".
13767         (collect_info::add_symbol): New method.
13768         (struct symbol_and_data_callback, iterate_inline_only, struct
13769         symbol_matcher_data, iterate_name_matcher): Delete.
13770         (iterate_over_all_matching_symtabs): Adjust to use function_view
13771         as callback type and lambdas.
13772         (iterate_over_file_blocks): Adjust to use function_view as
13773         callback type.
13774         (decode_compound_collector): Now a class with private fields.
13775         (decode_compound_collector::release_symbols): New method.
13776         (collect_one_symbol): Rename to...
13777         (decode_compound_collector::operator()): ... this and adjust.
13778         (lookup_prefix_sym): decode_compound_collector construction bits
13779         move to decode_compound_collector ctor.  Pass the
13780         decode_compound_collector object directly as callback.  Remove
13781         cleanups and use decode_compound_collector::release_symbols
13782         instead.
13783         (symtab_collector): Now a class with private fields.
13784         (symtab_collector::release_symtabs): New method.
13785         (add_symtabs_to_list): Rename to...
13786         (symtab_collector::operator()): ... this and adjust.
13787         (collect_symtabs_from_filename): symtab_collector construction
13788         bits move to symtab_collector ctor.  Pass the symtab_collector
13789         object directly as callback.  Remove cleanups and use
13790         symtab_collector::release_symtabs instead.
13791         (collect_symbols): Delete.
13792         (add_matching_symbols_to_info): Use lambdas.
13793         * macrocmd.c (print_macro_callback): Delete.
13794         (info_macro_command): Use a lambda.
13795         (info_macros_command): Pass print_macro_definition as callable
13796         directly.
13797         (print_one_macro): Remove 'ignore' parameter.
13798         (macro_list_command): Adjust.
13799         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13800         (macro_for_each_data::user_data): Delete field.
13801         (foreach_macro): Adjust to call the function_view.
13802         (macro_for_each): Adjust to use function_view as callback type.
13803         (foreach_macro_in_scope): Adjust to call the function_view.
13804         (macro_for_each_in_scope): Adjust to use function_view as callback
13805         type.
13806         * macrotab.h: Include "common/function-view.h".
13807         (macro_callback_fn): Declare a prototype instead of a pointer.
13808         Remove "user_data" parameter.
13809         (macro_for_each, macro_for_each_in_scope): Adjust to use
13810         function_view as callback type.
13811         * psymtab.c (partial_map_expand_apply)
13812         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13813         Adjust to use function_view as callback type and to return bool.
13814         (psym_expand_symtabs_matching): Adjust to use function_view as
13815         callback types.
13816         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13817         to use function_view as callback type and to return bool.
13818         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13819         callback types.
13820         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13821         as callback types.
13822         * symfile.h: Include "common/function-view.h".
13823         (expand_symtabs_file_matcher_ftype)
13824         (expand_symtabs_symbol_matcher_ftype)
13825         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13826         return bool.
13827         (quick_symbol_functions::map_symtabs_matching_filename)
13828         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13829         function_view as callback type and return bool.
13830         (expand_symtabs_matching): Adjust to use function_view as callback
13831         type.
13832         (maintenance_expand_name_matcher)
13833         (maintenance_expand_file_matcher): Delete.
13834         (maintenance_expand_symtabs): Use lambdas.
13835         * symtab.c (iterate_over_some_symtabs): Adjust to use
13836         function_view as callback types and return bool.
13837         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13838         of a cleanup.
13839         (lookup_symtab_callback): Delete.
13840         (lookup_symtab): Use a lambda.
13841         (iterate_over_symbols): Adjust to use function_view as callback
13842         type.
13843         (struct search_symbols_data, search_symbols_file_matches)
13844         (search_symbols_name_matches): Delete.
13845         (search_symbols): Use a pair of lambdas.
13846         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13847         (symtab_expansion_callback): Delete.
13848         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13849         * symtab.h: Include "common/function-view.h".
13850         (iterate_over_some_symtabs): Adjust to use function_view as
13851         callback type and return bool.
13852         (iterate_over_symtabs): Adjust to use function_view as callback
13853         type.
13854         (symbol_found_callback_ftype): Remove 'data' parameter and return
13855         bool.
13856         (iterate_over_symbols): Adjust to use function_view as callback
13857         type.
13858
13859 2017-02-23  Pedro Alves  <palves@redhat.com>
13860
13861         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13862         (%.o) <unittests/%.c>: New pattern.
13863         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13864         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13865         * common/function-view.h: New file.
13866         * unittests/function-view-selftests.c: New file.
13867         * configure: Regenerate.
13868
13869 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13870
13871         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13872         inferior_ptid.
13873         * go32-nat.c (go32_thread_alive): Likewise.
13874
13875 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13876
13877         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13878         delete.
13879
13880 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13881
13882         * varobj.c (varobj_clear_saved_item): Use delete instead of
13883         xfree.
13884         (update_dynamic_varobj_children): Likewise.
13885
13886 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13887
13888         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13889
13890 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13891
13892         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13893         m_enum_value to 0 in default constructor.
13894
13895 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13896
13897         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13898         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13899         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13900         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13901         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13902         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13903         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13904         IS_STORE_CONDITIONAL_INSN.
13905
13906 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13907
13908         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13909
13910 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13911
13912         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13913
13914 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13915
13916         * dwarf2read.c (skip_one_die, read_attribute_value)
13917         (dwarf2_const_value_attr, dump_die_shallow)
13918         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13919         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13920
13921 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13922
13923         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13924         (dwarf_parse_macro_header): Accept DWARF version 5.
13925         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13926
13927 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13928
13929         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13930         DW_AT_GNU_*.
13931         * common/common-exceptions.h (enum errors): Likewise.
13932         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13933         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13934         (dwarf_expr_context::execute_stack_op): Likewise.
13935         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13936         Likewise.
13937         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13938         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13939         (show_entry_values_debug, call_site_to_target_addr)
13940         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13941         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13942         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13943         (value_of_dwarf_block_entry, indirect_pieced_value)
13944         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13945         (disassemble_dwarf_expression): Likewise.
13946         * dwarf2read.c (process_die, inherit_abstract_dies)
13947         (read_call_site_scope): Likewise.
13948         * gdbtypes.h (struct func_type, struct call_site_parameter)
13949         (struct call_site): Likewise.
13950         * stack.c (read_frame_arg): Likewise.
13951         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13952
13953 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13954
13955         * defs.h (read_unsigned_leb128): New declaration.
13956         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13957         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13958         (dwarf2_find_location_expression): Call also
13959         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13960         * dwarf2loc.h (dwarf2_version): New declaration.
13961         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13962         rnglists.
13963         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13964         .debug_rnglists.
13965         (struct dwop_section_names): Add loclists_dwo.
13966         (dwop_section_names): Add .debug_loclists.dwo.
13967         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13968         (struct dwarf2_per_cu_data): Add dwarf_version.
13969         (struct dwo_sections): Add loclists.
13970         (struct attr_abbrev): Add implicit_const.
13971         (read_indirect_line_string): New declaration.
13972         (read_unsigned_leb128): Delete declaration.
13973         (rcuh_kind): New definition.
13974         (read_and_check_comp_unit_head): Change parameter
13975         is_debug_types_section to section_kind.
13976         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13977         (read_comp_unit_head): Change parameter abfd to section, add parameter
13978         section_kind.  Handle DWARF-5.
13979         (error_check_comp_unit_head): Accept also DWARF version 5.
13980         (read_and_check_comp_unit_head): Change parameter
13981         is_debug_types_section to section_kind.
13982         (read_and_check_type_unit_head): Delete function.
13983         (read_abbrev_offset): Handle DWARF-5.
13984         (create_debug_type_hash_table): Add parameter section_kind.  Process
13985         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13986         comp_unit_head.
13987         (create_debug_types_hash_table): Update create_debug_type_hash_table
13988         caller.
13989         (create_all_type_units): Call create_debug_type_hash_table.
13990         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13991         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13992         caller.
13993         (skip_one_die): Handle DW_FORM_implicit_const.
13994         (dwarf2_rnglists_process): New function.
13995         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13996         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13997         (read_attribute_value): Handle DW_FORM_implicit_const,
13998         DW_FORM_line_strp.
13999         (read_attribute): Handle DW_FORM_implicit_const.
14000         (read_indirect_string_at_offset_from): New function from
14001         read_indirect_string_at_offset.
14002         (read_indirect_string_at_offset): Call
14003         read_indirect_string_at_offset_from.
14004         (read_indirect_line_string_at_offset): New function.
14005         (read_indirect_string): New function comment.
14006         (read_indirect_line_string): New function.
14007         (read_unsigned_leb128): Make it global.
14008         (dwarf2_string_attr): Handle DWARF-5.
14009         (add_include_dir_stub, read_formatted_entries): New functions.
14010         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14011         Handle DWARF-5.
14012         (per_cu_header_read_in): Update read_comp_unit_head caller.
14013         (dwarf2_version): New function.
14014         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14015         rnglists.
14016         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14017         fields.
14018
14019 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14020
14021         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14022
14023 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14024
14025         * dwarf2read.c (dwarf2_ranges_process): New function from
14026         dwarf2_ranges_read.
14027         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14028         dwarf2_ranges_process.
14029
14030 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14031
14032         * dwarf2read.c (create_debug_type_hash_table): New function from
14033         create_debug_types_hash_table.
14034         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14035         (create_all_type_units, open_and_init_dwo_file): Update
14036         create_debug_types_hash_table callers.
14037
14038 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14039
14040         PR gdb/16188
14041         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14042         refer to 'ap', not 'args'.
14043
14044 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14045             Pedro Alves  <palves@redhat.com>
14046
14047         PR gdb/16188
14048         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14049         calls succeeded.
14050         * fork-child.c (trace_start_error): New function.
14051         (trace_start_error_with_name): Likewise.
14052         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14053         * inf-ptrace.c (inf_ptrace_me): Likewise.
14054         * inferior.h (trace_start_error): New prototype.
14055         (trace_start_error_with_name): Likewise.
14056
14057 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14058
14059         PR gdb/21164
14060         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14061         NULL before using it.
14062         * symmisc.c (maintenance_print_symbols): Likewise.
14063         (maintenance_print_msymbols): Likewise.
14064
14065 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14066
14067         * NEWS: Add record Python bindings entry.
14068
14069 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14070
14071         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14072         py-record-full.o.
14073         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14074         * python/py-record-btrace.c, python/py-record-btrace.h,
14075         python/py-record-full.c, python/py-record-full.h: New file.
14076         * python/py-record.c: Add include for py-record-btrace.h and
14077         py-record-full.h.
14078         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14079         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14080         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14081         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14082         New definition.
14083         (gdbpy_initialize_btrace): New export.
14084         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14085
14086 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14087
14088         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14089         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14090         * python/py-record.c: New file.
14091         * python/python-internal.h (gdbpy_start_recording,
14092         gdbpy_current_recording, gdpy_stop_recording,
14093         gdbpy_initialize_record): New export.
14094         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14095         (python_GdbMethods): Add gdbpy_start_recording,
14096         gdbpy_current_recording and gdbpy_stop_recording.
14097
14098 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14099
14100         * record-btrace.c (record_btrace_record_method): New function.
14101         (init_record_btrace_ops): Initialize to_record_method.
14102         * record-full.c (record_full_record_method): New function.
14103         (init_record_full_ops, init_record_full_core_ops): Add
14104         record_full_record_method.
14105         * record.h (enum record_method): New enum.
14106         * target-debug.h (target_debug_print_enum_record_method: New define.
14107         * target-delegates.c: Regenerate.
14108         * target.c (target_record_method): New function.
14109         * target.h: Include record.h.
14110         (struct target_ops) <to_record_method>: New field.
14111         (target_record_method): New export.
14112
14113 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14114
14115         * record.h (record_start, record_stop): New export.
14116         * record.c (record_start, record_stop): New function.
14117
14118 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14119
14120         * btrace.c (btrace_fetch): Copy function call segments pointer
14121         into a vector.
14122         (btrace_clear): Clear the vector.
14123         (btrace_find_insn_by_number): Use binary search to find the correct
14124         function call segment.
14125         * btrace.h (brace_fun_p): New typedef.
14126         (struct btrace_thread_info) <functions>: New field.
14127
14128 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14129
14130         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14131         * btrace.c (btrace_decode_error): ... here.  New function.
14132         * btrace.h (btrace_decode_error): New export.
14133
14134 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14135
14136         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14137         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14138         btrace_find_insn_by_number): Remove special case for gaps.
14139         * btrace.h (btrace_insn_get_error): New export.
14140         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14141         * record-btrace.c (btrace_insn_history): Print number for gaps.
14142         (record_btrace_info, record_btrace_goto): Handle gaps.
14143
14144 2017-02-14  Tom Tromey  <tom@tromey.com>
14145
14146         PR python/13598:
14147         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14148         event.
14149         * python/py-evts.c (gdbpy_initialize_py_events): Add
14150         before_prompt registry.
14151         * python/py-events.h (events_object) <before_prompt>: New field.
14152
14153 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14154
14155         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14156
14157 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14158
14159         * symfile (_initialize_symfile): Add usage text to the load command's
14160         help text.
14161
14162 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14163
14164         * utils.c (defaulted_query): Don't query on secondary UIs.
14165
14166 2017-02-10  Tom Tromey  <tom@tromey.com>
14167
14168         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14169
14170 2017-02-10  Tom Tromey  <tom@tromey.com>
14171
14172         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14173         "cleanup" local.
14174         * python/py-type.c (typy_legacy_template_argument): Remove
14175         unnecessary "cleanup" local.
14176
14177 2017-02-10  Tom Tromey  <tom@tromey.com>
14178
14179         * python/python.c (do_start_initialization): New function, from
14180         _initialize_python.
14181         (_initialize_python): Call do_start_initialization.
14182         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14183         goto.
14184
14185 2017-02-10  Tom Tromey  <tom@tromey.com>
14186
14187         * python/py-prettyprint.c (pretty_print_one_value): Use
14188         gdbpy_ref.
14189
14190 2017-02-10  Tom Tromey  <tom@tromey.com>
14191
14192         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14193         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14194         gdbpy_ref.
14195         * python/py-type.c (field_new): Use gdbpy_ref.
14196         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14197         gdbpy_ref.
14198         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14199         (py_free_pspace): Likewise.
14200         (pspace_to_pspace_object): Likewise.
14201         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14202         (py_free_objfile): Likewise.
14203         (objfile_to_objfile_object): Likewise.
14204         * python/py-inferior.c (delete_thread_object): Use
14205         gdbpy_ref.
14206         (infpy_read_memory): Likewise.
14207         (py_free_inferior): Likewise.
14208         * python/py-evtregistry.c (create_eventregistry_object): Use
14209         gdbpy_ref.
14210         * python/py-event.c (create_event_object): Use gdbpy_ref.
14211
14212 2017-02-10  Tom Tromey  <tom@tromey.com>
14213
14214         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14215         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14216         used.
14217         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14218         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14219         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14220         python/py-framefilter.c, python/py-function.c,
14221         python/py-inferior.c, python/py-infevents.c,
14222         python/py-linetable.c, python/py-newobjfileevent.c,
14223         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14224         python/py-signalevent.c, python/py-stopevent.c,
14225         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14226         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14227         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14228         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14229
14230 2017-02-10  Tom Tromey  <tom@tromey.com>
14231
14232         * ui-out.h (ui_out_emit_type): New class.
14233         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14234         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14235         and ui_out_emit_tuple.
14236         (enumerate_locals): Likewise.
14237         (py_mi_print_variables, py_print_locals, py_print_args): Use
14238         ui_out_emit_list.
14239         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14240         ui_out_emit_list.
14241         * common/gdb_optional.h: New file.
14242
14243 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14244
14245         * MAINTAINERS (Write After Approval): Update my e-mail address.
14246
14247 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14248
14249         PR gdb/21122
14250         * breakpoint.c (_initialize_breakpoint): Update the help description
14251         of the 'commands' command to indicate that it takes a list argument.
14252
14253 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14254
14255         * interps.c (current_interp_set_logging): Remove "return".
14256
14257 2017-02-09  Gary Benson  <gbenson@redhat.com>
14258
14259         * symtab.c (add_symtab_completions): Prevent NULL pointer
14260         dereference.
14261
14262 2017-02-08  Pedro Alves  <palves@redhat.com>
14263
14264         * interps.c (interp::interp): Remove reference to quiet_p.
14265         (interp_set): Make static.  Remove dead "Switching to" output
14266         code.
14267         (interp_quiet_p, interp_set_quiet): Delete.
14268         (interpreter_exec_cmd): Don't set the interpreter quiet.
14269         * interps.h (interp_quiet_p): Make static.
14270         (class interp) <quiet_p>: Remove field
14271
14272 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14273
14274         * cli/cli-decode.c (find_command_name_length): Make it extern.
14275         * cli/cli-decode.h (find_command_name_length): Declare.
14276         * cli/cli-script.c (command_name_equals, line_first_arg):
14277         New functions.
14278         (process_next_line): Use cli-decode to parse command names.
14279         (build_command_line): Make args a constant pointer.
14280
14281 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14282
14283         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14284         Remove case-insensitive search.
14285
14286 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14287
14288         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14289         at the end of the line.  Avoids an ARI warning.
14290
14291 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14292
14293         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14294         rdseed instructions.
14295         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14296
14297 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14298
14299         PR tdep/20936
14300         Provide and use sparc32 and sparc64 target description XML files.
14301         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14302         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14303         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14304         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14305         * features/sparc/sparc32-solaris.xml: New file.
14306         * features/sparc/sparc64-solaris.xml: New file.
14307         * features/sparc/sparc32-solaris.c: Generated.
14308         * features/sparc/sparc64-solaris.c: Generated.
14309         * sparc-tdep.h: Account for differences in target descriptions.
14310         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14311         (sparc32_register_type): Use target provided registers.
14312         (validate_tdesc_registers): New function.
14313         (sparc32_gdbarch_init): Use tdesc_has_registers.
14314         Set pseudoregister functions.
14315         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14316         (sparc64_register_type): Use target provided registers.
14317         (sparc64_init_abi): Set pseudoregister functions.
14318
14319 2017-02-03  Tom Tromey  <tom@tromey.com>
14320
14321         PR rust/21097:
14322         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14323         with a single member.
14324
14325 2017-02-03  Pedro Alves  <palves@redhat.com>
14326
14327         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14328         (cli_interp_base::~cli_interp_base): New.
14329         (cli_interp): New struct.
14330         (as_cli_interp): Cast the interp itself to cli_interp.
14331         (cli_interpreter_pre_command_loop): Rename to ...
14332         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14333         parameter.
14334         (cli_interpreter_init): Rename to ...
14335         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14336         boolean.  Make extern.
14337         (cli_interpreter_resume): Rename to ...
14338         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14339         extern.
14340         (cli_interpreter_suspend): Rename to ...
14341         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14342         extern.
14343         (cli_interpreter_exec): Rename to ...
14344         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14345         extern.
14346         (cli_interpreter_supports_command_editing): Rename to ...
14347         (cli_interp_base::supports_command_editing): ... this.  Remove
14348         'interp' parameter.  Make extern.
14349         (cli_ui_out): Rename to ...
14350         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14351         Make extern.
14352         (cli_set_logging): Rename to ...
14353         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14354         parameter.  Make extern.
14355         (cli_interp_procs): Delete.
14356         (cli_interp_factory): Adjust to use "new".
14357         * cli/cli-interp.h: Include "interps.h".
14358         (struct cli_interp_base): New struct.
14359         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14360         (interp_new): Delete.
14361         (interp::interp, interp::~interp): New.
14362         (interp_set): Use bool, and return void.  Assume the interpreter
14363         has suspend, init and resume methods, and that the all return
14364         void.
14365         (set_top_level_interpreter): interp_set returns void.
14366         (interp_ui_out): Adapt.
14367         (current_interp_set_logging): Adapt.
14368         (interp_data): Delete.
14369         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14370         (interp_exec): Adapt.
14371         (top_level_interpreter_data): Delete.
14372         * interps.h (interp_init_ftype, interp_resume_ftype)
14373         (interp_suspend_ftype, interp_exec_ftype)
14374         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14375         (class interp): New.
14376         (interp_new): Delete.
14377         (interp_set): Now returns void.  Use bool.
14378         (interp_data, top_level_interpreter_data): Delete.
14379         * mi/mi-common.h: Include interps.h.
14380         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14381         init, resume, suspect, exec, interp_ui_out, set_logging and
14382         pre_command_loop methods.
14383         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14384         (mi_interpreter_init): Rename to ...
14385         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14386         bool, return void and make extern.  Adjust.
14387         (mi_interpreter_resume): ... Rename to ...
14388         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14389         return void and make extern.  Adjust.
14390         (mi_interpreter_suspend): ... Rename to ...
14391         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14392         return void and make extern.  Adjust.
14393         (mi_interpreter_exec): ... Rename to ...
14394         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14395         extern.  Adjust.
14396         (mi_interpreter_pre_command_loop): ... Rename to ...
14397         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14398         parameter and make extern.
14399         (mi_on_normal_stop_1): Adjust.
14400         (mi_ui_out): Rename to ...
14401         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14402         parameter and make extern.  Adjust.
14403         (mi_set_logging): Rename to ...
14404         (mi_interp::set_logging): ... this.  Remove the 'interp'
14405         parameter and make extern.  Adjust.
14406         (mi_interp_procs): Delete.
14407         (mi_interp_factory): Adjust to use 'new'.
14408         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14409         (mi_print_exception, mi_execute_command, mi_load_progress):
14410         Adjust.
14411         * tui/tui-interp.c (tui_interp): New class.
14412         (as_tui_interp): Return a tui_interp pointer.
14413         (tui_on_normal_stop, tui_on_signal_received)
14414         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14415         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14416         to use interp::interp_ui_out.
14417         (tui_init): Rename to ...
14418         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14419         bool, return void and make extern.  Adjust.
14420         (tui_resume): Rename to ...
14421         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14422         return void and make extern.  Adjust.
14423         (tui_suspend): Rename to ...
14424         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14425         return void and make extern.  Adjust.
14426         (tui_ui_out): Rename to ...
14427         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14428         parameter, and make extern.  Adjust.
14429         (tui_exec): Rename to ...
14430         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14431         make extern.
14432         (tui_interp_procs): Delete.
14433         (tui_interp_factory): Use "new".
14434
14435 2017-02-02  Tom Tromey  <tom@tromey.com>
14436
14437         * rust-exp.y (ends_raw_string, space_then_number)
14438         (rust_identifier_start_p): Return bool.
14439         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14440         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14441         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14442         (rust_chartype_p): Return bool.
14443         (val_print_struct, rust_print_struct_def, rust_print_type):
14444         Update.
14445         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14446         Return bool.
14447
14448 2017-02-02  Tom Tromey  <tom@tromey.com>
14449
14450         * rust-lang.c: Reindent.
14451
14452 2017-02-02  Tom Tromey  <tom@tromey.com>
14453
14454         * rust-lang.h (rust_crate_for_block): Update.
14455         * rust-lang.c (rust_crate_for_block): Return std::string.
14456         (rust_get_disr_info): Use std:;string, not
14457         gdb::unique_xmalloc_ptr.
14458         * rust-exp.y (crate_name): Update.
14459
14460 2017-02-02  Pedro Alves  <palves@redhat.com>
14461
14462         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14463         field out of gdb_disassembler_test and make it static.
14464
14465 2017-02-02  Pedro Alves  <palves@redhat.com>
14466
14467         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14468         mi1_interp and mi_interp fields.
14469
14470 2017-02-02  Pedro Alves  <palves@redhat.com>
14471
14472         * cli/cli-interp.c (struct saved_output_files, saved_output):
14473         Moved from cli/cli-logging.c.
14474         (cli_set_logging): New function.
14475         (cli_interp_procs): Install cli_set_logging.
14476         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14477         Declare.
14478         * cli/cli-logging.c (struct saved_output_files, saved_output):
14479         Moved to cli/cli-interp.c.
14480         (pop_output_files): Don't save outputs here.
14481         (make_logging_output): New function.
14482         (handle_redirections): Don't build tee nor save previous outputs
14483         here.
14484         * interps.c (current_interp_set_logging): Change prototype.
14485         Assume there's always a set_logging_proc method installed.
14486         * interps.h (interp_set_logging_ftype): Change prototype.
14487         (current_interp_set_logging): Change prototype and adjust comment.
14488         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14489         use make_logging_output.
14490         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14491 2017-02-02  Pedro Alves  <palves@redhat.com>
14492
14493         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14494         from ...
14495         (set_logging_overwrite): ... here.
14496         (logging_no_redirect_file): Delete.
14497         (set_logging_redirect): Don't handle redirection on the fly.
14498         Instead warn that "logging off" / "logging on" is necessary.
14499         (pop_output_files): Delete references to logging_no_redirect_file.
14500         (show_logging_command): Always speak in terms of what will happen
14501         once logging is reenabled.
14502
14503 2017-02-02  Pedro Alves  <palves@redhat.com>
14504
14505         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14506
14507 2017-02-02  Pedro Alves  <palves@redhat.com>
14508
14509         * disasm.c (gdb_pretty_print_insn): Rename to ...
14510         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14511         Remove gdbarch parameter.  Adapt to clear the object's buffers
14512         instead of allocating new buffers, and to print using the object's
14513         gdb_disassembler instead of calling gdb_print_insn.
14514         (dump_insns): Use gdb_pretty_print_disassembler.
14515         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14516         (gdb_pretty_print_disassembler): New class.
14517         * record-btrace.c (btrace_insn_history): Use
14518         gdb_pretty_print_disassembler.
14519
14520 2017-02-02  Pedro Alves  <palves@redhat.com>
14521
14522         * ada-lang.c (type_as_string): Use string_file.
14523         * ada-valprint.c (ada_print_floating): Use string_file.
14524         * ada-varobj.c (ada_varobj_scalar_image)
14525         (ada_varobj_get_value_image): Use string_file.
14526         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14527         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14528         * breakpoint.c (update_inserted_breakpoint_locations)
14529         (insert_breakpoint_locations, reattach_breakpoints)
14530         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14531         (print_it_watchpoint): Use string_file.
14532         (save_breakpoints): Use stdio_file.
14533         * c-exp.y (oper): Use string_file.
14534         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14535         tee_file.
14536         (pop_output_files): Use delete.
14537         (handle_redirections): Use stdio_file and tee_file.
14538         * cli/cli-setshow.c (do_show_command): Use string_file.
14539         * compile/compile-c-support.c (c_compute_program): Use
14540         string_file.
14541         * compile/compile-c-symbols.c (generate_vla_size): Take a
14542         'string_file &' instead of a 'ui_file *'.
14543         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14544         of a 'ui_file *'.  Use string_file.
14545         (generate_c_for_variable_locations): Take a 'string_file &'
14546         instead of a 'ui_file *'.
14547         * compile/compile-internal.h (generate_c_for_for_one_variable):
14548         Take a 'string_file &' instead of a 'ui_file *'.
14549         * compile/compile-loc2c.c (push, pushf, unary, binary)
14550         (print_label, pushf_register_address, pushf_register)
14551         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14552         'ui_file *'.  Adjust.
14553         * compile/compile.c (compile_to_object): Use string_file.
14554         * compile/compile.h (compile_dwarf_expr_to_c)
14555         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14556         'ui_file *'.
14557         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14558         (replace_typedefs_qualified_name): Use string_file and
14559         obstack_copy0.
14560         * disasm.c (gdb_pretty_print_insn): Use string_file.
14561         (gdb_disassembly): Adjust reference the null_stream global.
14562         (do_ui_file_delete): Delete.
14563         (gdb_insn_length): Use null_stream.
14564         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14565         * dwarf2loc.c (dwarf2_compile_property_to_c)
14566         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14567         'string_file &' instead of a 'ui_file *'.
14568         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14569         * dwarf2read.c (do_ui_file_peek_last): Delete.
14570         (dwarf2_compute_name): Use string_file.
14571         * event-top.c (gdb_setup_readline): Use stdio_file.
14572         * gdbarch.sh (verify_gdbarch): Use string_file.
14573         * gdbtypes.c (safe_parse_type): Use null_stream.
14574         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14575         string_file.
14576         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14577         'string_file *' instead of a 'ui_file *'.
14578         (gdbscm_arch_disassemble): Use string_file.
14579         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14580         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14581         inherits from ui_file.
14582         (ioscm_file_port_delete, ioscm_file_port_rewind)
14583         (ioscm_file_port_put): Delete.
14584         (ioscm_file_port_write): Rename to ...
14585         (ioscm_file_port::write): ... this.  Remove file_port_magic
14586         checks.
14587         (ioscm_file_port_new): Delete.
14588         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14589         ui_file_up.
14590         * guile/scm-type.c (tyscm_type_name): Use string_file.
14591         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14592         Use string_file.
14593         * infcmd.c (print_return_value_1): Use string_file.
14594         * infrun.c (print_target_wait_results): Use string_file.
14595         * language.c (add_language): Use string_file.
14596         * location.c (explicit_to_string_internal): Use string_file.
14597         * main.c (captured_main_1): Use null_file.
14598         * maint.c (maintenance_print_architecture): Use stdio_file.
14599         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14600         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14601         event_channel>: Change type to mi_console_file pointer.
14602         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14603         (mi_console_file_delete): Delete.
14604         (struct mi_console_file): Delete.
14605         (mi_console_file_magic): Delete.
14606         (mi_console_file_new): Delete.
14607         (mi_console_file::mi_console_file): New.
14608         (mi_console_file_delete): Delete.
14609         (mi_console_file_fputs): Delete.
14610         (mi_console_file::write): New.
14611         (mi_console_raw_packet): Delete.
14612         (mi_console_file::flush): New.
14613         (mi_console_file_flush): Delete.
14614         (mi_console_set_raw): Rename to ...
14615         (mi_console_file::set_raw): ... this.
14616         * mi/mi-console.h (class mi_console_file): New class.
14617         (mi_console_file_new, mi_console_set_raw): Delete.
14618         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14619         (mi_set_logging): Use delete and tee_file.  Adjust.
14620         * mi/mi-main.c (output_register): Use string_file.
14621         (mi_cmd_data_evaluate_expression): Use string_file.
14622         (mi_cmd_data_read_memory): Use string_file.
14623         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14624         * mi/mi-out.c (mi_ui_out::main_stream): New.
14625         (mi_ui_out::rewind): Use main_stream and
14626         string_file.
14627         (mi_ui_out::put): Use main_stream and string_file.
14628         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14629         Allocate a 'string_file' instead.
14630         (mi_out_new): Don't allocate a mem_fileopen stream here.
14631         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14632         (mi_ui_out::main_stream): Declare method.
14633         * printcmd.c (eval_command): Use string_file.
14634         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14635         * python/py-arch.c (archpy_disassemble): Use string_file.
14636         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14637         * python/py-frame.c (frapy_str): Use string_file.
14638         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14639         Use string_file.
14640         * python/py-type.c (typy_str): Use string_file.
14641         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14642         * python/py-value.c (valpy_str): Use string_file.
14643         * record-btrace.c (btrace_insn_history): Use string_file.
14644         * regcache.c (regcache_print): Use stdio_file.
14645         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14646         * remote.c (escape_buffer): Use string_file.
14647         * rust-lang.c (rust_get_disr_info): Use string_file.
14648         * serial.c (serial_open_ops_1): Use stdio_file.
14649         (do_serial_close): Use delete.
14650         * stack.c (print_frame_arg): Use string_file.
14651         (print_frame_args): Remove local mem_fileopen stream, not used.
14652         (print_frame): Use string_file.
14653         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14654         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14655         Take a 'string_file *' instead of a 'ui_file *'.
14656         * top.c (new_ui): Use stdio_file and stderr_file.
14657         (free_ui): Use delete.
14658         (execute_command_to_string): Use string_file.
14659         (quit_confirm): Use string_file.
14660         * tracepoint.c (collection_list::append_exp): Use string_file.
14661         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14662         * tui/tui-file.c: Don't include "ui-file.h".
14663         (enum streamtype, struct tui_stream): Delete.
14664         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14665         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14666         (tui_file::tui_file): New method.
14667         (tui_file_fputs): Delete.
14668         (tui_file_get_strbuf): Delete.
14669         (tui_file::puts): New method.
14670         (tui_file_adjust_strbuf): Delete.
14671         (tui_file_flush): Delete.
14672         (tui_file::flush): New method.
14673         * tui/tui-file.h: Tweak intro comment.
14674         Include ui-file.h.
14675         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14676         (tui_file_adjust_strbuf): Delete declarations.
14677         (class tui_file): New class.
14678         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14679         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14680         (tui_register_format): Use string_stream.
14681         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14682         (tui_get_function_from_frame): Use string_file.
14683         * typeprint.c (type_to_string): Use string_file.
14684         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14685         (null_stream): New global.
14686         (ui_file_delete): Delete.
14687         (ui_file::ui_file): New.
14688         (null_file_isatty): Delete.
14689         (ui_file::~ui_file): New.
14690         (null_file_rewind): Delete.
14691         (ui_file::printf): New.
14692         (null_file_put): Delete.
14693         (null_file_flush): Delete.
14694         (ui_file::putstr): New.
14695         (null_file_write): Delete.
14696         (ui_file::putstrn): New.
14697         (null_file_read): Delete.
14698         (ui_file::putc): New.
14699         (null_file_fputs): Delete.
14700         (null_file_write_async_safe): Delete.
14701         (ui_file::vprintf): New.
14702         (null_file_delete): Delete.
14703         (null_file::write): New.
14704         (null_file_fseek): Delete.
14705         (null_file::puts): New.
14706         (ui_file_data): Delete.
14707         (null_file::write_async_safe): New.
14708         (gdb_flush, ui_file_isatty): Adjust.
14709         (ui_file_put, ui_file_rewind): Delete.
14710         (ui_file_write): Adjust.
14711         (ui_file_write_for_put): Delete.
14712         (ui_file_write_async_safe, ui_file_read): Adjust.
14713         (ui_file_fseek): Delete.
14714         (fputs_unfiltered): Adjust.
14715         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14716         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14717         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14718         (set_ui_file_data): Delete.
14719         (string_file::~string_file, string_file::write)
14720         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14721         (do_ui_file_as_string, ui_file_as_string): Delete.
14722         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14723         (struct mem_file): Delete.
14724         (mem_file_new): Delete.
14725         (stdio_file::stdio_file): New.
14726         (mem_file_delete): Delete.
14727         (stdio_file::stdio_file): New.
14728         (mem_fileopen): Delete.
14729         (stdio_file::~stdio_file): New.
14730         (mem_file_rewind): Delete.
14731         (stdio_file::set_stream): New.
14732         (mem_file_put): Delete.
14733         (stdio_file::open): New.
14734         (mem_file_write): Delete.
14735         (stdio_file_magic, struct stdio_file): Delete.
14736         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14737         (stdio_file::flush): New.
14738         (stdio_file_read): Rename to ...
14739         (stdio_file::read): ... this.  Adjust.
14740         (stdio_file_write): Rename to ...
14741         (stdio_file::write): ... this.  Adjust.
14742         (stdio_file_write_async_safe): Rename to ...
14743         (stdio_file::write_async_safe) ... this.  Adjust.
14744         (stdio_file_fputs): Rename to ...
14745         (stdio_file::puts) ... this.  Adjust.
14746         (stdio_file_isatty): Delete.
14747         (stdio_file_fseek): Delete.
14748         (stdio_file::isatty): New.
14749         (stderr_file_write): Rename to ...
14750         (stderr_file::write) ... this.  Adjust.
14751         (stderr_file_fputs): Rename to ...
14752         (stderr_file::puts) ... this.  Adjust.
14753         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14754         (stderr_file::stderr_file): New.
14755         (tee_file_magic): Delete.
14756         (struct tee_file): Delete.
14757         (tee_file::tee_file): New.
14758         (tee_file_new): Delete.
14759         (tee_file::~tee_file): New.
14760         (tee_file_delete): Delete.
14761         (tee_file_flush): Rename to ...
14762         (tee_file::flush): ... this.  Adjust.
14763         (tee_file_write): Rename to ...
14764         (tee_file::write): ... this.  Adjust.
14765         (tee_file::write_async_safe): New.
14766         (tee_file_fputs): Rename to ...
14767         (tee_file::puts): ... this.  Adjust.
14768         (tee_file_isatty): Rename to ...
14769         (tee_file::isatty): ... this.  Adjust.
14770         * ui-file.h (struct obstack, struct ui_file): Don't
14771         forward-declare.
14772         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14773         (ui_file_write_ftype)
14774         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14775         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14776         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14777         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14778         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14779         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14780         (set_ui_file_fseek): Delete.
14781         (ui_file_data, ui_file_delete, ui_file_rewind)
14782         (struct ui_file): New.
14783         (ui_file_up): New.
14784         (class null_file): New.
14785         (null_stream): Declare.
14786         (ui_file_write_for_put, ui_file_put): Delete.
14787         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14788         Delete.
14789         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14790         (gdb_fopen, tee_file_new): Delete.
14791         (struct string_file): New.
14792         (struct stdio_file): New.
14793         (stdio_file_up): New.
14794         (struct stderr_file): New.
14795         (class tee_file): New.
14796         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14797         of a 'ui_file *'.  Adjust.
14798         * ui-out.h (class ui_out) <field_stream>: Likewise.
14799         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14800         (null_stream): Delete.
14801         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14802         Adjust.
14803         * utils.h (struct ui_file): Delete forward declaration..
14804         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14805         (error_stream): Take a 'string_file &' instead of a
14806         'ui_file *'.
14807         * varobj.c (varobj_value_get_print_value): Use string_file.
14808         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14809         * gdbarch.c: Regenerate.
14810
14811 2017-02-02  Pedro Alves  <palves@redhat.com>
14812
14813         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14814         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14815         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14816         Adjust to call gdb_print_insn instead of
14817         gdb_disassembler::print_insn.
14818         (dump_insns, do_mixed_source_and_assembly_deprecated)
14819         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14820         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14821         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14822         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14823         declaration.
14824         (gdb_pretty_print_insn): Re-add declaration.
14825         * record-btrace.c (btrace_insn_history): Don't allocate a
14826         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14827
14828 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14829
14830         * disasm.h (gdb_disassembly): Remove file_string parameter.
14831         * disasm.c (gdb_disassembly): Likewise.
14832         * cli/cli-cmds.c (print_disassembly): Adapt.
14833         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14834         * stack.c (do_gdb_disassembly): Likewise.
14835
14836 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14837
14838         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14839         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14840         targets.  And if the implicit value is longer than needed, extract
14841         the first bytes instead of the "least significant" ones.
14842
14843 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14844
14845         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14846         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14847         (btrace_fetch): Assert can_access_registers_ptid.
14848         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14849         validate_registers_access.
14850
14851 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14852
14853         * gdbthread.h (can_access_registers_ptid): New.
14854         * thread.c (can_access_registers_ptid): New.
14855
14856 2017-02-01  Pedro Alves  <palves@redhat.com>
14857
14858         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14859
14860 2017-01-31  Pedro Alves  <palves@redhat.com>
14861
14862         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14863         Fix typos.
14864
14865 2017-01-31  Pedro Alves  <palves@redhat.com>
14866
14867         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14868         not used.
14869
14870 2017-01-31  Pedro Alves  <palves@redhat.com>
14871
14872         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14873
14874 2017-01-31  Pedro Alves  <palves@redhat.com>
14875
14876         * common/scoped_restore.h
14877         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14878         change the value's parameter type to T2.
14879         (make_scoped_restore): Likewise.
14880
14881 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14882             Richard Henderson  <rth@redhat.com>
14883
14884         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14885         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14886         GS_BASE for older kernels.
14887         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14888         GS_BASE for older kernels.
14889         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14890         and GS_BASE to the offset table.
14891         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14892         system register group.
14893         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14894         for older kernels.
14895         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14896         amd64 ABI.
14897         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14898         AMD64_GSBASE_REGNUM.
14899         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14900         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14901         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14902         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14903         i386/64bit-segments.xml in those rules.
14904         * features/i386/64bit-segments.xml: New file.
14905         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14906         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14907         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14908         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14909         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14910         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14911         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14912         * features/i386/amd64-avx-linux.c: Regenerated.
14913         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14914         * features/i386/amd64-avx-mpx.c: Regenerated.
14915         * features/i386/amd64-avx512-linux.c: Regenerated.
14916         * features/i386/amd64-linux.c: Regenerated.
14917         * features/i386/amd64-mpx-linux.c: Regenerated.
14918         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14919         * features/i386/i386-avx-mpx.c: Regenerated.
14920         * features/i386/x32-avx-linux.c: Regenerated.
14921         * features/i386/x32-avx512-linux.c: Regenerated.
14922         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14923         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14924         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14925         * regformats/i386/amd64-linux.dat: Regenerated.
14926         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14927         * regformats/i386/x32-avx-linux.dat: Regenerated.
14928         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14929         * regformats/i386/x32-linux.dat: Regenerated.
14930
14931 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14932
14933         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14934         Set to AMD64_NUM_REGS.
14935
14936 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14937
14938         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14939         that checks validity of a register number.
14940
14941 2017-01-27  Kees Cook  <keescook@google.com>
14942
14943         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14944         fetch_fpregs if target has fpa registers.
14945         (arm_linux_store_inferior_registers): Call store_fpregs if target
14946         has fpa registers.
14947
14948 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14949
14950         * cris-tdep.c (cris_gdbarch_init): Remove check for
14951         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14952
14953 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14954
14955         * corelow.c (get_core_register_section): Check for regset
14956         existence before checking for REGSET_VARIABLE_SIZE.
14957
14958 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14959             Pedro Alves  <palves@redhat.com>
14960
14961         PR gdb/20939
14962         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14963         call memory_error, save memaddr instead.
14964         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14965         negative, cal memory_error.
14966         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14967
14968 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14969
14970         * disasm-selftests.c (memory_error_test): New function.
14971         (_initialize_disasm_selftests): Register memory_error_test.
14972
14973 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14974
14975         * Makefile.in (SFILES): Add disasm-selftests.c and
14976         selftest-arch.c.
14977         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14978         * disasm-selftests.c: New file.
14979         * selftest-arch.c: New file.
14980         * selftest-arch.h: New file.
14981
14982 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14983
14984         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14985         to bfd_arch_mep.  Don't return 0 if section is not
14986         found.  Call print_insn_mep.
14987
14988 2017-01-26  Pedro Alves  <palves@redhat.com>
14989             Yao Qi  <yao.qi@linaro.org>
14990
14991         * arm-tdep.c: Include "disasm.h".
14992         (gdb_print_insn_arm): Update code to get gdbarch.
14993         * disasm.c (dis_asm_read_memory): Change it to
14994         gdb_disassembler::dis_asm_read_memory.
14995         (dis_asm_memory_error): Likewise.
14996         (dis_asm_print_address): Likewise.
14997         (gdb_pretty_print_insn): Change it to
14998         gdb_disassembler::pretty_print_insn.
14999         (dump_insns): Add one argument gdb_disassemlber.  All
15000         callers updated.
15001         (do_mixed_source_and_assembly_deprecated): Likewise.
15002         (do_mixed_source_and_assembly): Likewise.
15003         (do_assembly_only): Likewise.
15004         (gdb_disassembler::gdb_disassembler): New.
15005         (gdb_disassembler::print_insn): New.
15006         * disasm.h (class gdb_disassembler): New.
15007         (gdb_pretty_print_insn): Remove declaration.
15008         (gdb_disassemble_info): Likewise.
15009         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15010         (gdbscm_disasm_read_memory_worker): Update.
15011         (gdbscm_disasm_read_memory): Update.
15012         (gdbscm_disasm_memory_error): Remove.
15013         (gdbscm_disasm_print_address): Remove.
15014         (gdbscm_disassembler::gdbscm_disassembler): New.
15015         (gdbscm_print_insn_from_port): Update.
15016         * mips-tdep.c: Include disasm.h.
15017         (gdb_print_insn_mips): Update code to get gdbarch.
15018         * record-btrace.c (btrace_insn_history): Update.
15019         * spu-tdep.c: Include disasm.h.
15020         (struct spu_dis_asm_data): Remove.
15021         (struct spu_dis_asm_info): New.
15022         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15023         SPU id.
15024         (gdb_print_insn_spu): Cast disassemble_info to
15025         spu_dis_asm_info.
15026
15027 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15028
15029         * disasm.c (do_ui_file_delete): Delete.
15030         (gdb_insn_length): Move code creating stream to ...
15031         * utils.c (null_stream): ... here.  New function.
15032         * utils.h (null_stream): Declare.
15033
15034 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15035
15036         * python/py-inferior.c (find_thread_object): Return directly
15037         from the loop.  Remove "found" variable.
15038
15039 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15040
15041         GDB 7.12.1 released.
15042
15043 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15044
15045         * python/py-function.c (fnpy_call): Reorder declarations to have
15046         the gdbpy_enter object declared first.
15047         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15048
15049 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15050
15051         PR python/21068
15052         * python/python-internal.h (PyMem_RawMalloc): Define for
15053         Python < 3.4.
15054         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15055         PyMem_RawMalloc instead of PyMem_Malloc.
15056
15057 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15058             Luis Machado  <lgustavo@codesourcery.com>
15059
15060         * NEWS (New commands): Mention flash-erase.
15061         (New MI commands): Mention target-flash-erase.
15062         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15063         command.
15064         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15065         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15066         * target.c (flash_erase_command): New function.
15067         (initialize_targets): Add new flash-erase command.
15068         * target.h (flash_erase_command): New declaration.
15069
15070 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15071
15072         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15073         HAVE_SYS_PROCFS_H is defined.
15074
15075 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15076
15077         * remote.c (struct cached_reg): Change data into a pointer.
15078         * (stop_reply_dtr): Free data pointers before deleting vector.
15079         (process_stop_reply): Likewise.
15080         (remote_parse_stop_reply): Allocate space for data
15081
15082 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15083
15084         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15085         MAX_REGISTER_SIZE.
15086         (amd64_pseudo_register_read_value): Likewise.
15087         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15088         (store_register_using_P): Likewise.
15089         * regcache.c (regcache_xfer_part): Likewise.
15090
15091 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15092
15093         Split real and pseudo registers.
15094         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15095         (sparc32_pseudo_regnum): New enum.
15096         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15097         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15098         (SPARC32_CP0_REGISTERS): New macro.
15099         (sparc32_pseudo_register_name): New function.
15100         (sparc32_register_name): Use sparc32_pseudo_register_name.
15101         (sparc32_pseudo_register_type): New function.
15102         (sparc32_register_type): Use sparc32_pseudo_register_type.
15103         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15104         pseudo register numbers.
15105         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15106         (SPARC64_CP0_REGISTERS): New macro.
15107         (sparc64_pseudo_register_name): New function.
15108         (sparc64_register_name): Use sparc64_pseudo_register_name.
15109         (sparc64_pseudo_register_type): New function.
15110         (sparc64_register_type): Use sparc64_pseudo_register_type.
15111         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15112         pseudo register numbers.
15113         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15114         sparc64_store_arguments): Handle pseudo register numbers.
15115
15116 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15117
15118         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15119         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15120         output.
15121         (getpkt_or_notif_sane_1): Likewise.
15122
15123 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15124
15125         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15126         of CC.  Pass "-x c++-header" instead of "-x c".
15127
15128 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15129
15130         * remote.c (remote_can_async_p): Update comment.
15131
15132 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15133
15134         * linux-nat.c (linux_nat_can_async_p): Update comment.
15135
15136 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15137
15138         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15139
15140 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15141
15142         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15143
15144 2017-01-10  Tom Tromey  <tom@tromey.com>
15145
15146         * python/py-type.c (typy_legacy_template_argument): Update.
15147         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15148         ~demangle_parse_info): Declare new members.
15149         (cp_demangled_name_to_comp): Return unique_ptr.
15150         (cp_demangled_name_parse_free)
15151         (make_cleanup_cp_demangled_name_parse_free)
15152         (cp_new_demangle_parse_info): Remove.
15153         * cp-support.c (do_demangled_name_parse_free_cleanup)
15154         (make_cleanup_cp_demangled_name_parse_free): Remove.
15155         (inspect_type, cp_canonicalize_string_full)
15156         (cp_canonicalize_string): Update.
15157         (mangled_name_to_comp): Change return type.
15158         (cp_class_name_from_physname, method_name_from_physname)
15159         (cp_func_name, cp_remove_params): Update.
15160         * cp-name-parser.y (demangle_parse_info): New constructor, from
15161         cp_new_demangle_parse_info.
15162         (~demangle_parse_info): New destructor, from
15163         cp_demangled_name_parse_free.
15164         (cp_merge_demangle_parse_infos): Update.
15165         (cp_demangled_name_to_comp): Change return type.
15166
15167 2017-01-10  Tom Tromey  <tom@tromey.com>
15168
15169         * top.c (prevent_dont_repeat): Change return type.
15170         * python/python.c (execute_gdb_command): Use std::string.
15171         Update.
15172         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15173         * command.h (prevent_dont_repeat): Change return type.
15174         * breakpoint.c (bpstat_do_actions_1): Update.
15175
15176 2017-01-10  Tom Tromey  <tom@tromey.com>
15177
15178         * value.h (scoped_value_mark::~scoped_value_mark): Call
15179         free_to_mark.
15180         (scoped_value_mark::free_to_mark): New method.
15181         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15182         scoped_value_mark.
15183
15184 2017-01-10  Tom Tromey  <tom@tromey.com>
15185
15186         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15187         (valpy_reference_value, valpy_const_value, valpy_get_address)
15188         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15189         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15190         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15191         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15192         scoped_value_mark.
15193         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15194         * value.h (scoped_value_mark): New class.
15195
15196 2017-01-10  Tom Tromey  <tom@tromey.com>
15197
15198         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15199         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15200         * psymtab.c (discard_psymtabs_upto): Remove.
15201         (make_cleanup_discard_psymtabs): Remove.
15202         (struct psymtab_state): Remove.
15203
15204 2017-01-10  Tom Tromey  <tom@tromey.com>
15205
15206         * record-full.c (record_full_save_cleanups): Remove.
15207         (record_full_save): Use gdb::unlinker.
15208         * gcore.c (do_bfd_delete_cleanup): Remove.
15209         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15210         cleanups.
15211         * dwarf2read.c (unlink_if_set): Remove.
15212         (write_psymtabs_to_index): Use gdb::unlinker.
15213         * common/gdb_unlinker.h: New file.
15214
15215 2017-01-10  Tom Tromey  <tom@tromey.com>
15216
15217         * windows-tdep.c (windows_xfer_shared_library): Update.
15218         * windows-nat.c (windows_make_so): Update.
15219         * utils.h (make_cleanup_bfd_unref): Remove.
15220         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15221         * symfile.h (symfile_bfd_open)
15222         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15223         * symfile.c (read_symbols, symbol_file_add)
15224         (separate_debug_file_exists): Update.
15225         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15226         (generic_load, reread_symbols): Update.
15227         * symfile-mem.c (symbol_file_add_from_memory): Update.
15228         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15229         (spu_symbol_file_add_from_memory): Update.
15230         * solist.h (struct target_so_ops) <bfd_open>: Return
15231         gdb_bfd_ref_ptr.
15232         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15233         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15234         gdb_bfd_ref_ptr.
15235         (solib_map_sections, reload_shared_libraries_1): Update.
15236         * solib-svr4.c (enable_break): Update.
15237         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15238         * solib-frv.c (enable_break2): Update.
15239         * solib-dsbt.c (enable_break): Update.
15240         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15241         gdb_bfd_ref_ptr.
15242         (darwin_solib_get_all_image_info_addr_at_init): Update.
15243         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15244         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15245         * record-full.c (record_full_save): Update.
15246         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15247         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15248         * minidebug.c (find_separate_debug_file_in_section): Return
15249         gdb_bfd_ref_ptr.
15250         * machoread.c (macho_add_oso_symfile): Change abfd to
15251         gdb_bfd_ref_ptr.
15252         (macho_symfile_read_all_oso): Update.
15253         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15254         (macho_symfile_read): Update.
15255         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15256         (jit_bfd_try_read_symtab): Update.
15257         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15258         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15259         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15260         gdb_bfd_ref_ptr.
15261         (gdb_bfd_ref_policy): New struct.
15262         (gdb_bfd_ref_ptr): New typedef.
15263         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15264         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15265         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15266         gdb_bfd_ref_ptr.
15267         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15268         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15269         (gcore_command): Update.
15270         * exec.c (exec_file_attach): Update.
15271         * elfread.c (elf_symfile_read): Update.
15272         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15273         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15274         (open_and_init_dwo_file): Update.
15275         (open_dwp_file): Return gdb_bfd_ref_ptr.
15276         (open_and_init_dwp_file): Update.
15277         * corelow.c (core_open): Update.
15278         * compile/compile-object-load.c (compile_object_load): Update.
15279         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15280         * coffread.c (coff_symfile_read): Update.
15281         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15282         gdb_bfd_ref_ptr.  Rename.
15283         (dump_bfd_file, restore_command): Update.
15284         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15285         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15286         (find_separate_debug_file_by_buildid): Update.
15287
15288 2017-01-10  Tom Tromey  <tom@tromey.com>
15289
15290         * common/gdb_ref_ptr.h: New file.
15291         * python/py-ref.h (struct gdbpy_ref_policy): New.
15292         (gdbpy_ref): Now a typedef.
15293
15294 2017-01-10  Tom Tromey  <tom@tromey.com>
15295
15296         * utils.h (make_cleanup_htab_delete): Don't declare.
15297         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15298         Remove.
15299         * linespec.c (decode_compound_collector): Add constructor,
15300         destructor.
15301         (lookup_prefix_sym): Remove cleanup.
15302         (symtab_collector): Add constructor, destructor.
15303         (collect_symtabs_from_filename): Remove cleanup.
15304         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15305         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15306         Use htab_up.
15307         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15308         * dwarf2read.c (dw2_expand_symtabs_matching)
15309         (dw2_map_symbol_filenames, dwarf_decode_macros)
15310         (write_psymtabs_to_index): Use htab_up.
15311         * dwarf2loc.c (func_verify_no_selftailcall)
15312         (call_site_find_chain_1, func_verify_no_selftailcall)
15313         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15314         std::vector, gdb::unique_xmalloc_ptr.
15315         (call_sitep): Remove typedef.
15316         (dwarf2_locexpr_baton_eval): Remove unused variable.
15317
15318 2017-01-10  Tom Tromey  <tom@tromey.com>
15319
15320         * python/python-internal.h (make_cleanup_py_decref)
15321         (make_cleanup_py_xdecref): Don't declare.
15322         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15323         (py_xdecref, make_cleanup_py_xdecref): Remove.
15324
15325 2017-01-10  Tom Tromey  <tom@tromey.com>
15326
15327         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15328         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15329
15330 2017-01-10  Tom Tromey  <tom@tromey.com>
15331
15332         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15333
15334 2017-01-10  Tom Tromey  <tom@tromey.com>
15335
15336         * python/py-utils.c (unicode_to_encoded_string)
15337         (python_string_to_target_string)
15338         (python_string_to_target_python_string)
15339         (python_string_to_host_string, gdbpy_obj_to_string)
15340         (get_addr_from_python): Use gdbpy_ref.
15341
15342 2017-01-10  Tom Tromey  <tom@tromey.com>
15343
15344         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15345         gdbpy_ref.
15346
15347 2017-01-10  Tom Tromey  <tom@tromey.com>
15348
15349         * python/python.c (eval_python_command, gdbpy_decode_line)
15350         (gdbpy_run_events, gdbpy_start_type_printers)
15351         (gdbpy_apply_type_printers): Use gdbpy_ref.
15352
15353 2017-01-10  Tom Tromey  <tom@tromey.com>
15354
15355         * python/py-param.c (get_doc_string, compute_enum_values): Use
15356         gdbpy_ref.
15357
15358 2017-01-10  Tom Tromey  <tom@tromey.com>
15359
15360         * python/py-inferior.c (find_thread_object, build_inferior_list):
15361         Use gdbpy_ref.
15362
15363 2017-01-10  Tom Tromey  <tom@tromey.com>
15364
15365         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15366
15367 2017-01-10  Tom Tromey  <tom@tromey.com>
15368
15369         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15370         gdbpy_ref.
15371
15372 2017-01-10  Tom Tromey  <tom@tromey.com>
15373
15374         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15375         extra incref.
15376         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15377         Use gdbpy_ref.
15378
15379 2017-01-10  Tom Tromey  <tom@tromey.com>
15380
15381         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15382         gdbpy_ref.
15383
15384 2017-01-10  Tom Tromey  <tom@tromey.com>
15385
15386         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15387         decref results of PyArg_ParseTupleAndKeywords.
15388
15389 2017-01-10  Tom Tromey  <tom@tromey.com>
15390
15391         * python/python.c (python_run_simple_file): Use
15392         unique_xmalloc_ptr, gdbpy_ref.
15393
15394 2017-01-10  Tom Tromey  <tom@tromey.com>
15395
15396         * python/py-prettyprint.c (print_stack_unless_memory_error)
15397         (print_string_repr, print_children): Use gdbpy_ref.
15398         (dummy_python_frame): New class.
15399         (dummy_python_frame::dummy_python_frame): Rename from
15400         push_dummy_python_frame.
15401         (py_restore_tstate): Remove.
15402
15403 2017-01-10  Tom Tromey  <tom@tromey.com>
15404
15405         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/python.c (ensure_python_env, restore_python_env):
15410         Remove.
15411         * python/python-internal.h (ensure_python_env): Don't declare.
15412         * varobj.h (varobj_ensure_python_env): Don't declare.
15413         * varobj.c (varobj_ensure_python_env): Remove.
15414
15415 2017-01-10  Tom Tromey  <tom@tromey.com>
15416
15417         * varobj.c (varobj_value_get_print_value): Use
15418         gdbpy_enter_varobj.
15419
15420 2017-01-10  Tom Tromey  <tom@tromey.com>
15421
15422         * python/py-prettyprint.c (print_string_repr, print_children):
15423         Update.
15424         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15425         of "encoding".
15426         * varobj.c (varobj_value_get_print_value): Update.
15427         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15428
15429 2017-01-10  Tom Tromey  <tom@tromey.com>
15430
15431         * varobj.c (varobj_get_display_hint)
15432         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15433         (varobj_set_visualizer, free_variable): Use
15434         gdbpy_enter_varobj.
15435
15436 2017-01-10  Tom Tromey  <tom@tromey.com>
15437
15438         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15439         (do_finish_initialization): New function.  Use gdbpy_ref.
15440         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15441         do_finish_initialization.
15442
15443 2017-01-10  Tom Tromey  <tom@tromey.com>
15444
15445         * python/py-param.c (get_set_value, get_show_value): Use
15446         gdbpy_enter, gdbpy_ref.
15447
15448 2017-01-10  Tom Tromey  <tom@tromey.com>
15449
15450         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15451
15452 2017-01-10  Tom Tromey  <tom@tromey.com>
15453
15454         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15455
15456 2017-01-10  Tom Tromey  <tom@tromey.com>
15457
15458         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15459         Use gdbpy_enter_varobj.
15460
15461 2017-01-10  Tom Tromey  <tom@tromey.com>
15462
15463         * varobj.c (gdbpy_enter_varobj): New constructor.
15464         * python/python-internal.h (gdbpy_enter_varobj): New class.
15465         * python/py-varobj.c (py_varobj_get_iterator): Use
15466         gdbpy_enter_varobj.
15467
15468 2017-01-10  Tom Tromey  <tom@tromey.com>
15469
15470         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15471         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15472         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15473         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15474         unique_xmalloc_ptr.
15475         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15476
15477 2017-01-10  Tom Tromey  <tom@tromey.com>
15478
15479         * python/py-xmethods.c (invoke_match_method): Use
15480         gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15485         gdbpy_enter, gdbpy_ref.
15486
15487 2017-01-10  Tom Tromey  <tom@tromey.com>
15488
15489         * python/python.c (python_interactive_command): Use gdbpy_enter.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15494         gdbpy_ref.
15495
15496 2017-01-10  Tom Tromey  <tom@tromey.com>
15497
15498         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15499         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15500
15501 2017-01-10  Tom Tromey  <tom@tromey.com>
15502
15503         * utils.h (htab_deleter): New struct.
15504         (htab_up): New typedef.
15505         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15506         gdbpy_enter, gdbpy_ref, htab_up.
15507
15508 2017-01-10  Tom Tromey  <tom@tromey.com>
15509
15510         * python/py-unwind.c (pending_frame_invalidate): Remove.
15511         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15512
15513 2017-01-10  Tom Tromey  <tom@tromey.com>
15514
15515         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15516         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15517
15518 2017-01-10  Tom Tromey  <tom@tromey.com>
15519
15520         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15521
15522 2017-01-10  Tom Tromey  <tom@tromey.com>
15523
15524         * python/python.c (gdbpy_eval_from_control_command)
15525         (gdbpy_source_script, gdbpy_run_events)
15526         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15527         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15528         gdbpy_enter.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15533
15534 2017-01-10  Tom Tromey  <tom@tromey.com>
15535
15536         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15537
15538 2017-01-10  Tom Tromey  <tom@tromey.com>
15539
15540         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15541         (python_on_inferior_call_pre, python_on_inferior_call_post)
15542         (python_on_memory_change, python_on_register_change)
15543         (python_inferior_exit, python_new_objfile, add_thread_object)
15544         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15545
15546 2017-01-10  Tom Tromey  <tom@tromey.com>
15547
15548         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15549         (bpfinishpy_handle_exit): Use gdbpy_enter.
15550
15551 2017-01-10  Tom Tromey  <tom@tromey.com>
15552
15553         * python/py-cmd.c (cmdpy_destroyer)
15554         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15555         gdbpy_enter.
15556
15557 2017-01-10  Tom Tromey  <tom@tromey.com>
15558
15559         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15560         gdbpy_enter.
15561         (gdbpy_breakpoint_has_cond): Likewise.
15562
15563 2017-01-10  Tom Tromey  <tom@tromey.com>
15564
15565         * python/python.c (gdbpy_enter): New constructor.
15566         (~gdbpy_enter): New destructor.
15567         (restore_python_env, ensure_python_env): Rewrite.
15568         * python/python-internal.h (gdbpy_enter): New class.
15569
15570 2017-01-10  Tom Tromey  <tom@tromey.com>
15571
15572         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15573
15574 2017-01-10  Tom Tromey  <tom@tromey.com>
15575
15576         * python/py-value.c (value_has_field, get_field_flag)
15577         (get_field_type, valpy_getitem, convert_value_from_python): Use
15578         gdbpy_ref.
15579
15580 2017-01-10  Tom Tromey  <tom@tromey.com>
15581
15582         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15583         gdbpy_ref.
15584
15585 2017-01-10  Tom Tromey  <tom@tromey.com>
15586
15587         * python/py-prettyprint.c (search_pp_list)
15588         (find_pretty_printer_from_objfiles)
15589         (find_pretty_printer_from_progspace)
15590         (find_pretty_printer_from_gdb, find_pretty_printer)
15591         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15592         gdbpy_ref.
15593
15594 2017-01-10  Tom Tromey  <tom@tromey.com>
15595
15596         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15597
15598 2017-01-10  Tom Tromey  <tom@tromey.com>
15599
15600         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15601         (ltpy_get_all_source_lines): Use gdbpy_ref.
15602
15603 2017-01-10  Tom Tromey  <tom@tromey.com>
15604
15605         * python/py-framefilter.c (extract_sym, extract_value)
15606         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15607         gdbpy_ref.
15608
15609 2017-01-10  Tom Tromey  <tom@tromey.com>
15610
15611         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15612
15613 2017-01-10  Tom Tromey  <tom@tromey.com>
15614
15615         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15616
15617 2017-01-10  Tom Tromey  <tom@tromey.com>
15618
15619         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15620         gdbpy_ref.
15621
15622 2017-01-10  Tom Tromey  <tom@tromey.com>
15623
15624         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15625
15626 2017-01-10  Tom Tromey  <tom@tromey.com>
15627
15628         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15629         (typy_range): Use gdbpy_ref.
15630
15631 2017-01-10  Tom Tromey  <tom@tromey.com>
15632
15633         * python/py-threadevent.c (create_thread_event_object): Use
15634         gdbpy_ref.
15635         * python/py-stopevent.c (create_stop_event_object): Simplify.
15636         (emit_stop_event): Use gdbpy_ref.
15637         * python/py-signalevent.c (create_signal_event_object): Use
15638         gdbpy_ref.
15639         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15640         (emit_new_objfile_event, create_clear_objfiles_event_object)
15641         (emit_clear_objfiles_event): Use gdbpy_ref.
15642         * python/py-infevents.c (create_inferior_call_event_object)
15643         (create_register_changed_event_object)
15644         (create_memory_changed_event_object, emit_inferior_call_event)
15645         (emit_memory_changed_event, emit_register_changed_event): Use
15646         gdbpy_ref.
15647         * python/py-exitedevent.c (create_exited_event_object)
15648         (emit_exited_event): Use gdbpy_ref.
15649         * python/py-event.h (evpy_emit_event): Remove
15650         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15651         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15652         * python/py-continueevent.c (emit_continue_event): Use
15653         gdbpy_ref.
15654         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15655         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15656         gdbpy_ref.
15657         * python/py-bpevent.c (create_breakpoint_event_object): Use
15658         gdbpy_ref.
15659
15660 2017-01-10  Tom Tromey  <tom@tromey.com>
15661
15662         * python/py-ref.h: New file.
15663
15664 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15665
15666         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15667         void.
15668         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15669         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15670         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15671         * ui-out.c (ui_out::redirect): Likewise.
15672         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15673         * cli/cli-logging.c (set_logging_redirect): Update call site of
15674         ui_out::redirect.
15675         (handle_redirections): Likewise.
15676         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15677         * top.c (execute_command_to_string): Likewise.
15678         * utils.c (do_ui_out_redirect_pop): Likewise.
15679
15680 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15681
15682         * stack.c (_initialize_stack): Update "frame" command help message.
15683
15684 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15685
15686         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15687
15688 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15689
15690         * x86-linux-nat.h: Include gdb_proc_service.h.
15691
15692 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15693
15694         * ser-base.h: Include serial.h.
15695
15696 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15697
15698         * ppc-linux-tdep.h: Include ppc-tdep.h.
15699
15700 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15701
15702         * nat/amd64-linux-siginfo.h: Include signal.h.
15703
15704 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15705
15706         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15707
15708 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15709
15710         * mi/mi-parse.h: Include mi-cmds.h.
15711
15712 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15713
15714         * inf-loop.c: Don't include "target.h".
15715         * inf-loop.h: Include it here.
15716
15717 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15718
15719         * dfp.h: Include "dboulest.h" and "expression.h".
15720
15721 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15722
15723         * ax-gdb.h: Include "ax.h".
15724
15725 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15726
15727         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15728         with nat/gdb_ptrace.h.
15729
15730 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15731
15732         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15733         new line.
15734         (mips64_fbsd_sigframe_init): Likewise.
15735
15736 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15737
15738         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15739         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15740
15741 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15742
15743         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15744         * NEWS: Mention new FreeBSD/mips native configuration.
15745         * config/mips/fbsd.mh: New file.
15746         * configure.host: Add mips*-*-freebsd*.
15747         * mips-fbsd-nat.c: New file.
15748
15749 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15750
15751         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15752         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15753         * NEWS: Mention new FreeBSD/mips target.
15754         * configure.tgt: Add mips*-*-freebsd*.
15755         * mips-fbsd-tdep.c: New file.
15756         * mips-fbsd-tdep.h: New file.
15757
15758 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15759
15760         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15761         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15762
15763 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15764
15765         Update copyright year range in all GDB files.
15766
15767 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15768
15769         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15770
15771 For older changes see ChangeLog-2016.
15772 \f
15773 Local Variables:
15774 mode: change-log
15775 left-margin: 8
15776 fill-column: 74
15777 version-control: never
15778 coding: utf-8
15779 End: