Make template_symbol derive from symbol
[external/binutils.git] / gdb / ChangeLog
1 2017-11-17  Tom Tromey  <tom@tromey.com>
2
3         * dwarf2read.c (read_func_scope): Update.
4         * symtab.h (struct template_symbol): Derive from symbol.
5         <base>: Remove.
6
7 2017-11-17  Tom Tromey  <tom@tromey.com>
8
9         * symtab.h (struct symbol) <is_rust_vtable>: New member.
10         (struct rust_vtable_symbol): New.
11         (find_symbol_at_address): Declare.
12         * symtab.c (find_symbol_at_address): New function.
13         * symfile.h (struct quick_symbol_functions)
14         <find_compunit_symtab_by_address>: New member.
15         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
16         function.
17         (debug_sym_quick_functions): Link to
18         debug_qf_find_compunit_symtab_by_address.
19         * rust-lang.c (rust_get_trait_object_pointer): New function.
20         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
21         rust_get_trait_object_pointer.
22         * psymtab.c (psym_relocate): Clear psymbol_map.
23         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
24         functions.
25         (psym_functions): Link to psym_find_compunit_symtab_by_address.
26         * objfiles.h (struct objfile) <psymbol_map>: New member.
27         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
28         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
29         (rust_containing_type, read_variable): New functions.
30
31 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
32
33         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
34
35 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
36
37         * common/filestuff.c: Include <algorithm>.
38         (open_fds): Change type to std::vector<int>.
39         (do_mark_open_fd): Adjust.
40         (unmark_fd_no_cloexec): Adjust.
41         (do_close): Adjust.
42
43 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
44
45         * breakpoint.c (output_thread_groups): Take an std::vector.
46         (print_one_breakpoint_location): Adjust.
47
48 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
49
50         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
51         (ada_evaluate_subexp_for_cast): New function.
52         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
53         ada_evaluate_subexp_for_cast.
54         (ada_evaluate_subexp) <nosideret>: Replace code by call to
55         eval_skip_value.
56         * eval.c (evaluate_var_value): Make non-static.
57         (evaluate_var_msym_value, eval_skip_value): Likewise.
58         * value.h (evaluate_var_value, evaluate_var_msym_value)
59         (eval_skip_value): Declare.
60
61 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
62
63         * ada-lang.c (ada_value_cast): Remove parameter "noside".
64         Update all callers.
65
66 2017-11-16  Pedro Alves  <palves@redhat.com>
67
68         * python/py-unwind.c (pyuw_sniffer): Translate
69         PyExc_KeyboardInterrupt to a GDB Quit exception.
70
71 2017-11-16  Pedro Alves  <palves@redhat.com>
72
73         * infrun.c (resume_cleanups): Delete.
74         (resume): No longer install a resume_cleanups cleanup nor call
75         QUIT.
76         (proceed): Pass the terminal to the inferior.
77         (keep_going_pass_signal): No longer install a resume_cleanups
78         cleanup.
79
80 2017-11-16  Pedro Alves  <palves@redhat.com>
81
82         * inf-loop.c (inferior_event_handler): Don't swallow the exception
83         if the prompt is blocked.
84
85 2017-11-16  Pedro Alves  <palves@redhat.com>
86
87         * breakpoint.c (insert_bp_location): Replace bp_err and
88         bp_err_message locals by a gdb_exception local.
89
90 2017-11-16  Pedro Alves  <palves@redhat.com>
91
92         * inflow.c (scoped_ignore_sigttou): New class.
93         (child_terminal_ours_1, new_tty): Use it.
94
95 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
96
97         * target-float.c (decimal_from_number): Add byte_order argument and
98         call match_endianness.  Error if unknown floating-point type.
99         (decimal_to_number): Add byte_order argument and call match_endianness.
100         (decimal_from_longest): Update call.  Do not call match_endianness.
101         (decimal_from_ulongest): Likewise.
102         (decimal_binop): Likewise.
103         (decimal_is_zero): Likewise.
104         (decimal_compare): Likewise.
105         (decimal_convert): Likewise.
106
107 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
108
109         * python/python.c (gdbpy_rbreak): New function.
110         * NEWS: Document Python rbreak feature.
111
112 2017-11-16  Yao Qi  <yao.qi@linaro.org>
113
114         * features/tic6x-c62x.xml: Remove.
115         * features/tic6x-c64x.xml: Remove.
116         * features/tic6x-c64xp.xml: Remove.
117
118 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
119
120         * symtab.h: Include <array>.
121
122 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
123
124         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
125         (bsd_kvm_proc_cmd): Likewise.
126
127 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
128
129         * tui/tui-win.c (window_name_completer): Replace VEC with
130         std::vector.
131
132 2017-11-15  Andrew Cagney  <cagney@gnu.org>
133
134         * MAINTAINERS: Remove no-longer applicable entries.
135
136 2017-11-15  Andrew Cagney  <cagney@gnu.org>
137
138         * MAINTAINERS: Move self to Past Maintainers.
139
140 2017-11-15  Yao Qi  <yao.qi@linaro.org>
141
142         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
143         * features/nios2-linux.c: Remove.
144         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
145         initialize_tdesc_nios2_linux.
146
147 2017-11-15  Yao Qi  <yao.qi@linaro.org>
148
149         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
150         M68HC11_LAST_HARD_REG + 1.
151
152 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
153
154         PR gdb/22388
155         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
156         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
157         Return TARGET_XFER_EOF if size of returned data is 0.
158
159 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
160
161         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
162         memory-map-selftests.c.
163         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
164         * memory-map.c (memory_map_start_memory): Fix computation of hi
165         address.
166         * unittests/memory-map-selftests.c: New file.
167
168 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
169
170         * ada-lang.c: Fix some typos in the general command documenting
171         how Ada expressions are being evaluated and how their result
172         is printed.
173
174 2017-11-09  Tom Tromey  <tom@tromey.com>
175
176         * psymtab.c (psymbol_hash): Do not hash string contents.
177         (psymbol_compare): Add comment.
178
179 2017-11-09  Tom Tromey  <tom@tromey.com>
180
181         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
182
183 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
184
185         * ada-exp.y (write_var_from_sym): Remove parameter
186         "orig_left_context".  Update all callers.
187
188 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
189
190         * tracepoint.h (class collection_list) <stringify>: Return
191         std::vector<std::string>.
192         (encode_actions_rsp): Change parameters to
193         std::vector<std::string> *.
194         * tracepoint.c (collection_list::stringify): Return
195         std::vector<std::string> and adjust accordingly.
196         (encode_actions_rsp): Changee parameters to
197         std::vector<std::string> and adjust accordingly.
198         * remote.c (free_actions_list),
199         free_actions_list_cleanup_wrapper): Remove.
200         (remote_download_tracepoint): Adjust to std::vector.
201
202 2017-11-08  Tom Tromey  <tom@tromey.com>
203
204         * dwarf2read.c (symbolp): Remove typedef.
205         (read_func_scope): Use std::vector.
206         (process_structure_scope): Use std::vector.
207
208 2017-11-08  Pedro Alves  <palves@redhat.com>
209
210         * ada-lang.c (ada_make_symbol_completion_list): Use
211         completion_skip_symbol.
212         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
213         (symbol_is_function_or_method(symbol*)): New.
214         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
215         completion_skip_symbol.
216         (default_collect_symbol_completion_matches_break_on): Use
217         completion_skip_symbol.  Pass down mode.
218         (collect_file_symbol_completion_matches): Pass down mode.
219         * symtab.h (symbol_is_function_or_method): New declarations.
220         (completion_skip_symbol): New template function.
221
222 2017-11-08  Pedro Alves  <palves@redhat.com>
223
224         * linespec.c (iterate_over_all_matching_symtabs): Add
225         search_domain parameter.  Pass it down to expand_symtabs_matching.
226         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
227         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
228         search_domain.
229         (add_all_symbol_names_from_pspace): Add search_domain parameter.
230         Pass it down.
231         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
232         symbols.
233         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
234         it down.
235
236 2017-11-08  Pedro Alves  <palves@redhat.com>
237
238         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
239         text_len locals and don't pass them down.
240         * symtab.c (completion_list_add_name): Remove
241         sym_text/sym_text_len parameters and adjust.
242         (completion_list_add_symbol, completion_list_add_msymbol)
243         (completion_list_objc_symbol, completion_list_add_fields)
244         (add_symtab_completions): Likewise.
245         (default_collect_symbol_completion_matches_break_on)
246         (collect_file_symbol_completion_matches): Remove sym_text_len
247         local and don't pass it down.
248         * symtab.h (completion_list_add_name): Remove
249         sym_text/sym_text_len parameters.
250
251 2017-11-08  Pedro Alves  <palves@redhat.com>
252
253         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
254         unittests/lookup_name_info-selftests.c.
255         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
256         * cp-support.c: Include "selftest.h".
257         (cp_remove_params_1): Rename from cp_remove_params.  Add
258         'require_param' parameter, and handle it.
259         (cp_remove_params): Reimplement.
260         (cp_remove_params_if_any): New.
261         (selftests::quote): New.
262         (selftests::check_remove_params): New.
263         (selftests::test_cp_remove_params): New.
264         (_initialize_cp_support): Install
265         selftests::test_cp_remove_params.
266         * cp-support.h (cp_remove_params_if_any): Declare.
267         * dwarf2read.c :Include "selftest.h".
268         (dw2_expand_symtabs_matching_symbol): Use
269         lookup_name_info::make_ignore_params.
270         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
271         (selftests::dw2_expand_symtabs_matching::string_or_null)
272         (selftests::dw2_expand_symtabs_matching::check_match)
273         (selftests::dw2_expand_symtabs_matching::test_symbols)
274         (selftests::dw2_expand_symtabs_matching::run_test): New.
275         (_initialize_dwarf2_read): Register
276         selftests::dw2_expand_symtabs_matching::run_test.
277         * psymtab.c (psym_expand_symtabs_matching): Use
278         lookup_name_info::make_ignore_params.
279         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
280         If the lookup name wants to ignore parameters, strip them.
281         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
282         code handling '('.
283         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
284         (default_collect_symbol_completion_matches_break_on): Don't try to
285         strip parameters.
286         * symtab.h (lookup_name_info::lookup_name_info): Add
287         'ignore_parameters' parameter.
288         (lookup_name_info::ignore_parameters)
289         (lookup_name_info::make_ignore_params): New methods.
290         (lookup_name_info::m_ignore_parameters): New field.
291         * unittests/lookup_name_info-selftests.c: New file.
292
293 2017-11-08  Pedro Alves  <palves@redhat.com>
294
295         * dwarf2read.c (dw2_expand_marked_cus)
296         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
297         (dw2_expand_symtabs_matching): Move further below.
298         (dw2_expand_marked_cus): Reindent.
299
300 2017-11-08  Pedro Alves  <palves@redhat.com>
301
302         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
303         (struct name_component): New.
304         (mapped_index::name_components): New field.
305         (mapped_index::symbol_name_at): New method.
306         (dwarf2_read_index): Call mapped_index ctor.
307         (dw2_map_matching_symbols): Add comment about name_components
308         table.
309         (dw2_expand_symtabs_matching): Factor part to...
310         (dw2_expand_symtabs_matching_symbol): ... this new function.
311         Build name components table, and lookup symbols in it before
312         calling the name matcher.
313         (dw2_expand_marked_cus): New, factored out from
314         dw2_expand_symtabs_matching.
315         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
316
317 2017-11-08   Pedro Alves  <palves@redhat.com>
318
319         * ada-lang.c (ada_encode): Rename to ..
320         (ada_encode_1): ... this.  Add throw_errors parameter and handle
321         it.
322         (ada_encode): Reimplement.
323         (match_name): Delete, folded into full_name.
324         (resolve_subexp): No longer pass the encoded name to
325         ada_lookup_symbol_list.
326         (should_use_wild_match): Delete.
327         (name_match_type_from_name): New.
328         (ada_lookup_simple_minsym): Use lookup_name_info and the
329         language's symbol_name_matcher_ftype.
330         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
331         (ada_add_block_renamings): Adjust to use lookup_name_info.
332         (ada_lookup_name): New.
333         (add_nonlocal_symbols, ada_add_all_symbols)
334         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
335         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
336         (ada_name_for_lookup): Delete.
337         (ada_lookup_encoded_symbol): Construct a verbatim name.
338         (wild_match): Reverse sense of return type.  Use bool.
339         (full_match): Reverse sense of return type.  Inline bits of old
340         match_name here.
341         (ada_add_block_symbols): Adjust to use lookup_name_info.
342         (symbol_completion_match): Delete, folded into...
343         (ada_lookup_name_info::matches): ... .this new method.
344         (symbol_completion_add): Delete.
345         (ada_collect_symbol_completion_matches): Add name_match_type
346         parameter.  Adjust to use lookup_name_info and
347         completion_list_add_name.
348         (get_var_value, ada_add_global_exceptions): Adjust to use
349         lookup_name_info.
350         (ada_get_symbol_name_cmp): Delete.
351         (do_wild_match, do_full_match): New functions.
352         (ada_lookup_name_info::ada_lookup_name_info): New method.
353         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
354         functions.
355         (ada_language_defn): Install ada_get_symbol_name_matcher.
356         * ada-lex.l (processId): If name starts with '<', copy it
357         verbatim.
358         * block.c (block_iter_match_step, block_iter_match_first)
359         (block_iter_match_next, block_lookup_symbol)
360         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
361         lookup_name_info.
362         * block.h (block_iter_match_first, block_iter_match_next)
363         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
364         * c-lang.c (c_language_defn, cplus_language_defn)
365         (asm_language_defn, minimal_language_defn): Adjust comments to
366         refer to la_get_symbol_name_matcher.
367         * completer.c (complete_files_symbols)
368         (collect_explicit_location_matches, symbol_completer): Pass a
369         symbol_name_match_type down.
370         * completer.h (class completion_match, completion_match_result):
371         New classes.
372         (completion_tracker::reset_completion_match_result): New method.
373         (completion_tracker::m_completion_match_result): New field.
374         * cp-support.c (make_symbol_overload_list_block): Adjust to use
375         lookup_name_info.
376         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
377         functions.
378         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
379         * d-lang.c: Adjust comments to refer to
380         la_get_symbol_name_matcher.
381         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
382         Adjust to use lookup_name_info.
383         (dict_iter_match_first, dict_iter_match_next)
384         (iter_match_first_hashed, iter_match_next_hashed)
385         (iter_match_first_linear, iter_match_next_linear): Adjust to work
386         with a lookup_name_info.
387         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
388         Likewise.
389         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
390         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
391         (gdb_index_symbol_name_matcher): New class.
392         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
393         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
394         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
395         with a symbol_name_match_type.
396         (f_language_defn): Adjust comments to refer to
397         la_get_symbol_name_matcher.
398         * go-lang.c (go_language_defn): Adjust comments to refer to
399         la_get_symbol_name_matcher.
400         * language.c (default_symbol_name_matcher)
401         (language_get_symbol_name_matcher): New functions.
402         (unknown_language_defn, auto_language_defn): Adjust comments to
403         refer to la_get_symbol_name_matcher.
404         * language.h (symbol_name_cmp_ftype): Delete.
405         (language_defn) <la_collect_symbol_completion_matches>: Add match
406         type parameter.
407         <la_get_symbol_name_cmp>: Delete field.
408         <la_get_symbol_name_matcher>: New field.
409         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
410         (default_symbol_name_matcher, language_get_symbol_name_matcher):
411         Declare.
412         * linespec.c (iterate_over_all_matching_symtabs)
413         (iterate_over_file_blocks): Adjust to use lookup_name_info.
414         (find_methods): Add language parameter, and use lookup_name_info
415         and the language's symbol_name_matcher_ftype.
416         (linespec_complete_function): Adjust.
417         (lookup_prefix_sym): Use lookup_name_info.
418         (add_all_symbol_names_from_pspace): Adjust.
419         (find_superclass_methods): Add language parameter and pass it
420         down.
421         (find_method): Pass symbol language down.
422         (find_linespec_symbols): Don't demangle or Ada encode here.
423         (search_minsyms_for_name): Add lookup_name_info parameter.
424         (add_matching_symbols_to_info): Add name_match_type parameter.
425         Use lookup_name_info.
426         * m2-lang.c (m2_language_defn): Adjust comments to refer to
427         la_get_symbol_name_matcher.
428         * minsyms.c: Include <algorithm>.
429         (add_minsym_to_demangled_hash_table): Remove table parameter and
430         add objfile parameter.  Use search_name_hash, and add language to
431         demangled languages vector.
432         (struct found_minimal_symbols): New struct.
433         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
434         New functions.
435         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
436         input names here.  Use lookup_name_info instead.  Lookup up
437         demangled names once for each language in the demangled names
438         vector.
439         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
440         demangled names once for each language in the demangled names
441         vector.
442         (build_minimal_symbol_hash_tables): Adjust.
443         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
444         lookup_name_info.
445         * objc-lang.c (objc_language_defn): Adjust comment to refer to
446         la_get_symbol_name_matcher.
447         * objfiles.h: Include <vector>.
448         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
449         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
450         la_get_symbol_name_matcher.
451         * p-lang.c (pascal_language_defn): Adjust comment to refer to
452         la_get_symbol_name_matcher.
453         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
454         (match_partial_symbol): Use symbol_name_match_type,
455         lookup_name_info and psymbol_name_matches.
456         (lookup_partial_symbol): Use lookup_name_info.
457         (map_block): Use symbol_name_match_type and lookup_name_info.
458         (psym_map_matching_symbols): Use symbol_name_match_type.
459         (psymbol_name_matches): New.
460         (recursively_search_psymtabs): Use lookup_name_info and
461         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
462         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
463         'kind' parameter to 'domain'.
464         * rust-lang.c (rust_language_defn): Adjust comment to refer to
465         la_get_symbol_name_matcher.
466         * symfile-debug.c (debug_qf_map_matching_symbols)
467         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
468         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
469         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
470         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
471         Adjust to use symbol_name_match_type.
472         <expand_symtabs_matching>: Adjust to use lookup_name_info.
473         (expand_symtabs_matching): Adjust to use lookup_name_info.
474         * symmisc.c (maintenance_expand_symtabs): Use
475         lookup_name_info::match_any ().
476         * symtab.c (symbol_matches_search_name): New.
477         (eq_symbol_entry): Adjust to use lookup_name_info and the
478         language's matcher.
479         (demangle_for_lookup_info::demangle_for_lookup_info): New.
480         (lookup_name_info::match_any): New.
481         (iterate_over_symbols, search_symbols): Use lookup_name_info.
482         (compare_symbol_name): Add language, lookup_name_info and
483         completion_match_result parameters, and use them.
484         (completion_list_add_name): Make extern.  Add language and
485         lookup_name_info parameters.  Use them.
486         (completion_list_add_symbol, completion_list_add_msymbol)
487         (completion_list_objc_symbol): Add lookup_name_info parameters and
488         adjust.  Pass down language.
489         (completion_list_add_fields): Add lookup_name_info parameters and
490         adjust.  Pass down language.
491         (add_symtab_completions): Add lookup_name_info parameters and
492         adjust.
493         (default_collect_symbol_completion_matches_break_on): Add
494         name_match_type parameter, and use it.  Use lookup_name_info.
495         (default_collect_symbol_completion_matches)
496         (collect_symbol_completion_matches): Add name_match_type
497         parameter, and pass it down.
498         (collect_symbol_completion_matches_type): Adjust.
499         (collect_file_symbol_completion_matches): Add name_match_type
500         parameter, and use lookup_name_info.
501         * symtab.h: Include <string> and "common/gdb_optional.h".
502         (enum class symbol_name_match_type): New.
503         (class ada_lookup_name_info): New.
504         (struct demangle_for_lookup_info): New.
505         (class lookup_name_info): New.
506         (symbol_name_matcher_ftype): New.
507         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
508         (symbol_matches_search_name): Declare.
509         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
510         (default_collect_symbol_completion_matches)
511         (collect_symbol_completion_matches)
512         (collect_file_symbol_completion_matches): Add name_match_type
513         parameter.
514         (iterate_over_symbols): Use lookup_name_info.
515         (completion_list_add_name): Declare.
516         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
517         (strncmp_iw_with_mode): Now extern.
518         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
519         (strncmp_iw_with_mode): Declare.
520
521 2017-11-08  Keith Seitz  <keiths@redhat.com>
522             Pedro Alves  <palves@redhat.com>
523
524         * ada-lang.c (ada_language_defn): Install
525         default_search_name_hash.
526         * buildsym.c (struct buildsym_compunit): <language>: New field.
527         (finish_block_internal): Pass language when creating dictionaries.
528         (start_buildsym_compunit, start_symtab): New language parameters.
529         Use them.
530         (restart_symtab): Pass down compilation unit's language.
531         * buildsym.h (enum language): Forward declare.
532         (start_symtab): New 'language' parameter.
533         * c-lang.c (c_language_defn, cplus_language_defn)
534         (asm_language_defn, minimal_language_defn): Install
535         default_search_name_hash.
536         * coffread.c (coff_start_symtab): Adjust.
537         * d-lang.c (d_language_defn): Install default_search_name_hash.
538         * dbxread.c (struct symloc): Add 'pst_language' field.
539         (PST_LANGUAGE): Define.
540         (start_psymtab, read_ofile_symtab): Use it.
541         (process_one_symbol): New 'language' parameter.  Pass it down.
542         * dictionary.c (struct dictionary) <language>: New field.
543         (DICT_LANGUAGE): Define.
544         (dict_create_hashed, dict_create_hashed_expandable)
545         (dict_create_linear, dict_create_linear_expandable): New parameter
546         'language'.  Set the dictionary's language.
547         (iter_match_first_hashed): Adjust to rename.
548         (insert_symbol_hashed): Assert we don't see mismatching
549         languages.  Adjust to rename.
550         (dict_hash): Rename to ...
551         (default_search_name_hash): ... this and make extern.
552         * dictionary.h (struct language_defn): Forward declare.
553         (dict_create_hashed): New parameter 'language'.
554         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
555         * f-lang.c (f_language_defn): Install default_search_name_hash.
556         * go-lang.c (go_language_defn): Install default_search_name_hash.
557         * jit.c (finalize_symtab): Pass compunit's language to dictionary
558         creation.
559         * language.c (unknown_language_defn, auto_language_defn):
560         * language.h (language_defn::la_search_name_hash): New field.
561         (default_search_name_hash): Declare.
562         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
563         * mdebugread.c (new_block): New parameter 'language'.
564         * mdebugread.c (parse_symbol): Pass symbol language to block
565         allocation.
566         (psymtab_to_symtab_1): Pass down language.
567         (new_symtab): Pass compunit's language to block allocation.
568         * objc-lang.c (objc_language_defn): Install
569         default_search_name_hash.
570         * opencl-lang.c (opencl_language_defn):
571         * p-lang.c (pascal_language_defn): Install
572         default_search_name_hash.
573         * rust-lang.c (rust_language_defn): Install
574         default_search_name_hash.
575         * stabsread.h (enum language): Forward declare.
576         (process_one_symbol): Add 'language' parameter.
577         * symtab.c (search_name_hash): New function.
578         * symtab.h (search_name_hash): Declare.
579         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
580
581 2017-11-08  Pedro Alves  <palves@redhat.com>
582
583         * cp-name-parser.y (main): Don't initialize extra_chars.
584
585 2017-11-07  Tom Tromey  <tom@tromey.com>
586
587         * event-top.h (command_handler): Constify.
588         * record-full.c (cmd_record_full_start): Update.
589         * thread.c (thread_apply_all_command): Update.
590         * printcmd.c (eval_command): Update.
591         * mi/mi-main.c (mi_execute_cli_command): Update.
592         (mi_execute_async_cli_command): Update.
593         * tui/tui-stack.c (tui_update_command): Update.
594         * cli/cli-interp.c (safe_execute_command): Constify.
595         * record.c (record_start): Update.
596         (record_start, record_stop, cmd_record_start): Update.
597         * record-btrace.c (cmd_record_btrace_bts_start): Update.
598         (cmd_record_btrace_pt_start): Update.
599         (cmd_record_btrace_start): Update.
600         (cmd_record_btrace_start): Update.
601         * reverse.c (exec_reverse_once): Update.
602         * python/python.c (execute_gdb_command): Don't copy the command.
603         * event-top.c (command_line_handler): Update.
604         (command_handler): Constify.
605         * defs.h (deprecated_call_command_hook): Constify.
606         * cli/cli-script.h (execute_user_command): Constify.
607         * cli/cli-script.c (execute_user_command): Constify.
608         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
609         (enum command_control_type): Update.
610         * main.c (catch_command_errors): Remove non-const overload.
611         (catch_command_errors_ftype): Remove.
612         * python/py-cmd.c (cmdpy_function): Constify.
613         * guile/scm-cmd.c (cmdscm_function): Constify.
614         * cli/cli-dump.c (call_dump_func): Constify.
615         * cli/cli-decode.c (do_const_cfunc): Constify.
616         (do_sfunc): Constify.
617         (cmd_func): Constify.
618         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
619         * top.h (execute_command): Constify.
620         * top.c (execute_command): Constify.
621         (execute_command_to_string): Constify.
622         (deprecated_call_command_hook): Constify.
623         * command.h (cmd_func): Constify.
624         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
625
626 2017-11-07  Tom Tromey  <tom@tromey.com>
627
628         * ada-lang.c (catch_ada_exception_command): Constify.
629         (catch_assert_command): Constify.
630         * break-catch-throw.c (catch_catch_command, catch_throw_command)
631         (catch_rethrow_command): Constify.
632         (catch_exception_command_1): Constify.
633         * breakpoint.h (add_catch_command): Constify.
634         * break-catch-syscall.c (catch_syscall_command_1): Constify.
635         (catch_syscall_split_args): Constify.
636         * break-catch-sig.c (catch_signal_command): Constify.
637         (catch_signal_split_args): Constify.
638         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
639         cmd_const_sfunc_ftype.
640         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
641         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
642         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
643         (add_setshow_string_cmd, struct cmd_list_element)
644         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
645         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
646         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
647         Constify.
648         (set_cmd_sfunc): Constify.
649         (empty_sfunc): Constify.
650         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
651         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
652         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
653         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
654         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
655         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
656         Constify.
657         (set_cmd_sfunc): Constify.
658         (cmd_sfunc_ftype): Remove.
659         * compile/compile.c (set_compile_args): Constify.
660         * infrun.c (set_disable_randomization): Constify.
661         * infcmd.c (set_args_command, set_cwd_command): Constify.
662         * breakpoint.c (set_condition_evaluation_mode): Constify.
663         (add_catch_command): Constify.
664         (catch_fork_command_1, catch_exec_command_1)
665         (catch_load_command_1, catch_unload_command_1): Constify.
666         (catch_load_or_unload): Constify.
667         * guile/scm-param.c (pascm_set_func): Constify.
668         (add_setshow_generic): Constify.
669         * python/py-param.c (get_set_value): Constify.
670         * top.h (set_verbose): Constify.
671         * tui/tui-win.c (tui_set_var_cmd): Constify.
672         * mi/mi-main.c (set_mi_async_command): Constify.
673         * cli/cli-logging.c (set_logging_overwrite)
674         (set_logging_redirect): Constify.
675         * value.c (set_max_value_size): Constify.
676         * valprint.c (set_input_radix, set_output_radix): Constify.
677         * utils.c (set_width_command, set_height_command): Constify.
678         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
679         * tracepoint.c (set_disconnected_tracing)
680         (set_circular_trace_buffer, set_trace_buffer_size)
681         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
682         * top.c (set_history_size_command, set_verbose, set_editing)
683         (set_gdb_datadir, set_history_filename): Constify.
684         * target.c (set_targetdebug, maint_set_target_async_command)
685         (maint_set_target_non_stop_command, set_target_permissions)
686         (set_write_memory_permission): Constify.
687         (open_target): Constify.
688         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
689         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
690         * symtab.c (set_symbol_cache_size_handler): Constify.
691         * symfile.c (set_ext_lang_command): Constify.
692         * symfile-debug.c (set_debug_symfile): Constify.
693         * source.c (set_directories_command): Constify.
694         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
695         * serial.c (set_parity): Constify.
696         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
697         * remote.c (set_remote_exec_file, set_remotebreak)
698         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
699         * record.c (set_record_insn_history_size)
700         (set_record_call_history_size): Constify.
701         * record-full.c (set_record_full_insn_max_num): Constify.
702         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
703         * osabi.c (set_osabi): Constify.
704         * mips-tdep.c (set_mips64_transfers_32bit_regs)
705         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
706         * maint.c (maintenance_set_profile_cmd): Constify.
707         * linux-thread-db.c (set_libthread_db_search_path): Constify.
708         * language.c (set_language_command, set_range_command)
709         (set_case_command): Constify.
710         * infrun.c (set_non_stop, set_observer_mode)
711         (set_stop_on_solib_events, set_schedlock_func)
712         (set_exec_direction_func): Constify.
713         * infcmd.c (set_inferior_tty_command): Constify.
714         * disasm.c (set_disassembler_options_sfunc): Constify.
715         * demangle.c (set_demangling_command): Constify.
716         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
717         * cris-tdep.c (set_cris_version, set_cris_mode)
718         (set_cris_dwarf2_cfi): Constify.
719         * corefile.c (set_gnutarget_command): Constify.
720         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
721         (set_target_wide_charset_sfunc): Constify.
722         * breakpoint.c (update_dprintf_commands): Constify.
723         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
724         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
725         (set_disassembly_style_sfunc): Constify.
726         * arch-utils.c (set_endian, set_architecture): Constify.
727         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
728         * agent.c (set_can_use_agent): Constify.
729
730 2017-11-07  Tom Tromey  <tom@tromey.com>
731
732         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
733         (go32_pde, go32_pte, go32_pte_for_address): Constify.
734         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
735         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
736         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
737         (parse_int_arg, show_thread_default_detach_sc_cmd)
738         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
739         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
740         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
741         (show_task_pause_cmd, set_task_detach_sc_cmd)
742         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
743         (set_noninvasive_cmd, set_thread_pause_cmd)
744         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
745         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
746         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
747         * windows-nat.c (display_selectors): Constify.
748         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
749         non-const "cfunc".
750         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
751         (cmd_cfunc_eq): Likewise.
752         (struct cmd_list_element): Likewise.
753         (do_cfunc): Remove.
754         (cli_user_command_p): Update.
755         * command.h (add_cmd): Remove non-const overload.
756         (cmd_cfunc_ftype): Remove typedef.
757         (cmd_cfunc_eq): Remove non-const overload.
758         * value.c (show_values): Constify.
759         * thread.c (thread_apply_all_command): Constify.
760         * symfile.c (load_command): Constify.
761         * source.c (directory_command): Constify.
762         * maint.c (maintenance_internal_error)
763         (maintenance_demangler_warning, maintenance_space_display)
764         (maintenance_print_architecture, maintenance_translate_address)
765         (maintenance_info_selftests, maintenance_internal_warning):
766         Constify.
767         * breakpoint.c (disable_trace_command, enable_trace_command):
768         Constify.
769         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
770         Constify.
771         (add_auto_load_safe_path): Constify.
772         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
773         * top.h (show_commands): Constify.
774         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
775         * sparc64-tdep.c (adi_examine_command): Constify.
776         (adi_assign_command): Constify.
777
778 2017-11-07  Tom Tromey  <tom@tromey.com>
779
780         * frame.h (info_locals_command, info_args_command): Constify.
781         * auto-load.h (auto_load_info_scripts): Constify.
782         * inferior.h (registers_info): Constify.
783         * copying.c: Rebuild.
784         * copying.awk: Constify generated commands.
785         * auto-load.c (auto_load_info_scripts)
786         (info_auto_load_gdb_scripts): Constify.
787         * cli/cli-decode.c (struct cmd_list_element): Take a
788         cmd_const_cfunc_ftype.
789         * command.h (add_info): Take a cmd_const_cfunc_ftype.
790         * tui/tui-win.c (tui_all_windows_info): Constify.
791         * python/py-auto-load.c (info_auto_load_python_scripts):
792         Constify.
793         * cli/cli-cmds.c (show_command): Remove non-const overload.
794         * tracepoint.c (info_tvariables_command, info_scope_command):
795         Constify.
796         (info_static_tracepoint_markers_command): Constify.
797         * thread.c (info_threads_command): Constify.
798         (print_thread_info_1): Constify.
799         * target.c (info_target_command): Constify.
800         * symtab.c (info_sources_command, info_functions_command)
801         (info_types_command): Constify.
802         (info_variables_command): Remove non-const overload.
803         * symfile.c (info_ext_lang_command): Constify.
804         * stack.c (info_frame_command, info_locals_command)
805         (info_args_command): Constify.
806         (backtrace_command): Remove non-const overload.
807         * source.c (info_source_command, info_line_command): Constify.
808         * solib.c (info_sharedlibrary_command): Constify.
809         * skip.c (info_skip_command): Constify.
810         * ser-go32.c (info_serial_command): Constify.
811         * reverse.c (info_bookmarks_command): Constify.
812         * printcmd.c (info_symbol_command, info_address_command)
813         (info_display_command): Constify.
814         * osdata.c (info_osdata_command): Constify.
815         * objc-lang.c (info_selectors_command, info_classes_command):
816         Constify.
817         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
818         * memattr.c (info_mem_command): Constify.
819         * macrocmd.c (info_macro_command, info_macros_command): Constify.
820         * linux-fork.c (info_checkpoints_command): Constify.
821         * infrun.c (info_signals_command): Constify.
822         * inflow.c (info_terminal_command): Constify.
823         * inferior.c (info_inferiors_command): Constify.
824         (print_inferior): Constify.
825         * infcmd.c (info_program_command, info_all_registers_command)
826         (info_registers_command, info_vector_command)
827         (info_float_command): Constify.
828         (registers_info): Constify.
829         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
830         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
831         Constify.
832         * f-valprint.c (info_common_command): Constify.
833         * dcache.c (info_dcache_command): Constify.
834         (dcache_info_1): Constify.
835         * darwin-nat-info.c (info_mach_tasks_command)
836         (info_mach_task_command, info_mach_ports_command)
837         (info_mach_port_command, info_mach_threads_command)
838         (info_mach_thread_command, info_mach_regions_command)
839         (info_mach_regions_recurse_command, info_mach_region_command)
840         (info_mach_exceptions_command): Constify.
841         (get_task_from_args): Constify.
842         * cp-support.c (info_vtbl_command): Constify.
843         * breakpoint.c (info_watchpoints_command)
844         (info_tracepoints_command): Constify.
845         (info_breakpoints_command): Remove non-const overload.
846         * avr-tdep.c (avr_io_reg_read_command): Constify.
847         * auxv.c (info_auxv_command): Constify.
848         * ada-tasks.c (info_tasks_command): Constify.
849         (info_task): Constify.
850         * ada-lang.c (info_exceptions_command): Constify.
851
852 2017-11-07  Tom Tromey  <tom@tromey.com>
853
854         * solib.h (no_shared_libraries): Constify.
855         * frame.h (return_command): Constify.
856         * cli/cli-cmds.h (quit_command): Constify.
857         * top.h (quit_command, execute_command): Constify.
858         * target.h (flash_erase_command): Constify.
859         * inferior.h (set_inferior_args, attach_command): Constify.
860         * tracepoint.h (start_tracing, stop_tracing): Constify.
861         * breakpoint.h (break_command, tbreak_command)
862         (hbreak_command_wrapper, thbreak_command_wrapper)
863         (rbreak_command_wrapper, watch_command_wrapper)
864         (awatch_command_wrapper, rwatch_command_wrapper)
865         (get_tracepoint_by_number): Constify.
866         * symtab.c (info_variables_command, rbreak_command)
867         (symtab_symbol_info): Constify.
868         (info_variables_command): Add non-const overload.
869         * top.c (dont_repeat_command): Constify.
870         * breakpoint.c (ignore_command, commands_command)
871         (condition_command, tbreak_command, hbreak_command)
872         (thbreak_command, clear_command, break_command)
873         (info_breakpoints_command, watch_command, rwatch_command)
874         (awatch_command, trace_command, ftrace_command, strace_command)
875         (trace_pass_command, break_range_command, dprintf_command)
876         (agent_printf_command, get_tracepoint_by_number)
877         (watch_maybe_just_location, trace_pass_command): Constify.
878         (info_breakpoints_command): Add non-const overload.
879         * tracefile.c (tsave_command): Constify.
880         * infcmd.c (attach_command, disconnect_command, signal_command)
881         (queue_signal_command, stepi_command, nexti_command)
882         (finish_command, next_command, step_command, until_command)
883         (advance_command, jump_command, continue_command, run_command)
884         (start_command, starti_command, interrupt_command)
885         (run_command_1, set_inferior_args, step_1): Constify.
886         * inferior.c (add_inferior_command, remove_inferior_command)
887         (clone_inferior_command): Constify.
888         * linux-fork.c (checkpoint_command, restart_command): Constify.
889         * windows-nat.c (signal_event_command): Constify.
890         * guile/guile.c (guile_repl_command, guile_command): Constify.
891         * printcmd.c (x_command, display_command, printf_command)
892         (output_command, set_command, call_command, print_command)
893         (eval_command): Constify.
894         (non_const_set_command): Remove.
895         (_initialize_printcmd): Update.
896         * source.c (forward_search_command, reverse_search_command):
897         Constify.
898         * jit.c (jit_reader_load_command, jit_reader_unload_command):
899         Constify.
900         * infrun.c (handle_command): Constify.
901         * memattr.c (mem_command): Constify.
902         * stack.c (return_command, up_command, up_silently_command)
903         (down_command, down_silently_command, frame_command)
904         (backtrace_command, func_command, backtrace_command_1): Constify.
905         (backtrace_command): Add non-const overload.
906         * remote-sim.c (simulator_command): Constify.
907         * exec.c (set_section_command): Constify.
908         * tracepoint.c (tdump_command, trace_variable_command)
909         (tstatus_command, tstop_command, tstart_command)
910         (end_actions_pseudocommand, while_stepping_pseudocommand)
911         (collect_pseudocommand, teval_pseudocommand, actions_command)
912         (start_tracing, stop_tracing): Constify.
913         * value.c (init_if_undefined_command): Constify.
914         * tui/tui-stack.c (tui_update_command): Constify.
915         * tui/tui-win.c (tui_refresh_all_command)
916         (tui_set_tab_width_command, tui_set_win_height_command)
917         (tui_set_focus_command, tui_scroll_forward_command)
918         (tui_scroll_backward_command, tui_scroll_left_command)
919         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
920         (tui_set_win_height): Constify.
921         * tui/tui-layout.c (tui_layout_command): Constify.
922         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
923         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
924         (proc_untrace_sysexit_cmd): Constify.
925         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
926         (threadset_test_cmd, threadlist_update_test_cmd)
927         (threadalive_test): Constify.
928         * objc-lang.c (print_object_command): Constify.
929         * command.h (add_com): Constify.
930         * cli/cli-dump.c (restore_command): Constify.
931         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
932         (help_command, complete_command, shell_command, edit_command)
933         (list_command, disassemble_command, make_command)
934         (apropos_command, alias_command): Constify.
935         * cli/cli-script.c (document_command, define_command)
936         (while_command, if_command, validate_comname): Constify.
937         * cli/cli-decode.c (struct cmd_list_element): Change type of
938         "fun".
939         * target.c (do_monitor_command, flash_erase_command): Constify.
940         * regcache.c (reg_flush_command): Constify.
941         * reverse.c (reverse_step, reverse_next, reverse_stepi)
942         (reverse_nexti, reverse_continue, reverse_finish)
943         (save_bookmark_command, goto_bookmark_command)
944         (exec_reverse_once): Constify.
945         * python/python.c (python_interactive_command, python_command):
946         Constify.
947         * typeprint.c (ptype_command, whatis_command, whatis_exp):
948         Constify.
949         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
950         * gcore.c (gcore_command): Constify.
951
952 2017-11-07  Tom Tromey  <tom@tromey.com>
953
954         * printcmd.c (x_command): Call set_repeat_arguments.
955         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
956         * top.c (repeat_arguments): New global.
957         (set_repeat_arguments): New function.
958         (execute_command): Handle repeat_arguments.
959         (show_commands): Calls set_repeat_arguments.
960         * command.h (set_repeat_arguments): Declare.
961
962 2017-11-07  Tom Tromey  <tom@tromey.com>
963
964         * stack.c (backtrace_command): Use std::string.
965         (backtrace_command_1): Make "count_exp" const.
966
967 2017-11-07  Tom Tromey  <tom@tromey.com>
968
969         * source.c (directory_switch, mod_path, add_path): Constify.
970         * defs.h (add_path, mod_path, directory_switch): Constify.
971         * mi/mi-cmd-env.c (env_mod_path): Constify.
972
973 2017-11-07  Tom Tromey  <tom@tromey.com>
974
975         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
976         (run_command_1, continue_command, step_1, jump_command)
977         (signal_command, until_command, advance_command, finish_command)
978         (attach_command): Update.
979
980 2017-11-07  Tom Tromey  <tom@tromey.com>
981
982         * command.h (set_cmd_cfunc): Don't declare.
983         * cli/cli-decode.c (set_cmd_cfunc): Now static.
984
985 2017-11-07  Tom Tromey  <tom@tromey.com>
986
987         * stack.c (select_frame_command): Constify.
988         * cli/cli-decode.c (add_com_suppress_notification): Constify.
989         * command.h (add_com_suppress_notification): Constify.
990
991 2017-11-07  Tom Tromey  <tom@tromey.com>
992
993         * breakpoint.c (stop_command): Constify.
994         * cli/cli-decode.c (struct cmd_list_element): Constify.
995         * command.h (add_abbrev_prefix_cmd): Constify.
996
997 2017-11-07  Pedro Alves  <palves@redhat.com>
998
999         * breakpoint.c (extract_bp_kind): New enum.
1000         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1001         factored out from ...
1002         (extract_bp_number_and_location): ... here.
1003         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1004
1005 2017-11-07  Pedro Alves  <palves@redhat.com>
1006
1007         * breakpoint.c (extract_bp_number_and_location): Change return
1008         type to void.  Throw error instead of warning.
1009         (enable_disable_command): Adjust.
1010
1011 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1012             Pedro Alves  <palves@redhat.com>
1013
1014         * breakpoint.c (map_breakpoint_number_range): New, factored out
1015         from ...
1016         (map_breakpoint_numbers): ... here.
1017         (find_location_by_number): Change parameters from string to
1018         breakpoint number and location.
1019         (extract_bp_number_and_location): New function.
1020         (enable_disable_bp_num_loc)
1021         (enable_disable_breakpoint_location_range)
1022         (enable_disable_command): New functions, factored out ...
1023         (enable_command, disable_command): ... these functions, and
1024         adjusted to support ranges.
1025         * NEWS: Document enable/disable breakpoint location range feature.
1026
1027 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1028
1029         * MAINTAINERS (Write After Approval): Update my e-mail address.
1030
1031 2017-11-06  Pedro Alves  <palves@redhat.com>
1032
1033         * gnu-nat.c (gnu_terminal_init): Delete.
1034         (gnu_target): Don't install gnu_terminal_init.
1035         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1036         (child_terminal_init): ... this function.
1037
1038 2017-11-06  Pedro Alves  <palves@redhat.com>
1039
1040         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1041         sgtty.h.
1042         * config.in, configure: Regenerate.
1043
1044 2017-11-06  Pedro Alves  <palves@redhat.com>
1045
1046         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1047         (async_init_signals): Adjust.
1048         (handle_stop_sig): Rename to ...
1049         (handle_sigtstp): ... this.
1050         (async_stop_sig): Rename to ...
1051         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1052         SIGTSTP path.
1053         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1054         instead of STOP_SIGNAL thoughout.
1055         (handle_stop_sig): Rename to ...
1056         (handle_sigtstp): ... this.
1057         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1058
1059 2017-11-06  Pedro Alves  <palves@redhat.com>
1060
1061         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1062         longer set flags twice in row.
1063
1064 2017-11-06  Pedro Alves  <palves@redhat.com>
1065
1066         * Makefile.in (SER_HARDWIRE): Update comment.
1067         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1068         * common/gdb_termios.h: Delete file.
1069         * common/job-control.c: Include termios.h and unistd.h instead of
1070         gdb_termios.h.
1071         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1072         check.
1073         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1074         Remove sgtty code.
1075         * configure.ac: No longer check for termio.h and sgtty.h.
1076         * configure: Regenerate.
1077         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1078         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1079         Replace PROCESS_GROUP_TYPE references with pid_t references
1080         throughout.
1081         (gdb_getpgrp): Delete.
1082         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1083         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1084         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1085         gdb_getpgrp.  Use serial_set_tty_state instead aof
1086         serial_noflush_set_tty_state.  Remove sgtty code.
1087         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1088         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1089         (inferior_process_group): Now returns pid_t.
1090         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1091         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1092         * ser-event.c (serial_event_ops): Update.
1093         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1094         (dos_ops): Update.
1095         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1096         * ser-pipe.c (pipe_ops): Update.
1097         * ser-tcp.c (tcp_ops): Update.
1098         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1099         HAVE_TERMIOS checks.
1100         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1101         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1102         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1103         assume termios.
1104         (hardwire_noflush_set_tty_state): Delete.
1105         (hardwire_print_tty_state, hardwire_drain_output)
1106         (hardwire_flush_output, hardwire_flush_input)
1107         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1108         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1109         code, and assume termios.
1110         (hardwire_ops): Update.
1111         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1112         * serial.c (serial_noflush_set_tty_state): Delete.
1113         * serial.h (serial_noflush_set_tty_state): Delete.
1114         (serial_ops::noflush_set_tty_state): Delete.
1115
1116 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1117
1118         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1119         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1120         (COMMON_OBS): Remove doublest.o and dfp.o.
1121         Do not build target-float.c (instead of doublest.c)
1122         with -Wformat-nonliteral.
1123
1124         * doublest.c: Remove file.
1125         * doublest.h: Remove file.
1126         * dfp.c: Remove file.
1127         * dfp.h: Remove file.
1128
1129         * target-float.c: Do not include "doublest.h" and "dfp.h".
1130         (DOUBLEST): Move here from doublest.h.
1131         (enum float_kind): Likewise.
1132         (FLOATFORMAT_CHAR_BIT): Likewise.
1133         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1134         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1135         (floatformat_precision): Likewise.
1136         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1137         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1138         Likewise.
1139         (host_float_format, host_double_format, host_long_double_format):
1140         Likewise.
1141         (floatformat_to_string, floatformat_from_string): Likewise.
1142         (floatformat_to_doublest): Likewise.  Also, inline the original
1143         convert_floatformat_to_doublest.
1144         (floatformat_from_doublest): Likewise.  Also, inline the original
1145         convert_floatformat_from_doublest.
1146
1147         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1148         (MAX_DECIMAL_STRING): Move here from dfp.c.
1149         (match_endianness): Likewise.
1150         (set_decnumber_context, decimal_check_errors): Likewise.
1151         (decimal_from_number, decimal_to_number): Likewise.
1152         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1153         (decimal_from_longest, decimal_from_ulongest): Likewise.
1154         (decimal_to_longest): Likewise.
1155         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1156         (decimal_convert): Likewise.
1157
1158 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1159
1160         * doublest.c: Do not include "gdbtypes.h".
1161         (extract_typed_floating): Remove.
1162         (store_typed_floating): Remove.
1163         (convert_typed_floating): Remove.
1164         * doublest.h (struct type): Remove.
1165         (DOUBLEST_PRINT_FORMAT): Remove.
1166         (DOUBLEST_SCAN_FORMAT): Remove.
1167         (extract_typed_floating): Remove.
1168         (store_typed_floating): Remove.
1169         (convert_typed_floating): Remove.
1170
1171         * dfp.c (decimal_from_doublest): Remove.
1172         (decimal_to_doublest): Remove.
1173         * dfp.h: Do not include "doublest.h".
1174         (decimal_from_doublest): Remove.
1175         (decimal_to_doublest): Remove.
1176
1177         * value.c: Do not include "doublest.h" and "dfp.h".
1178         (value_as_double): Remove.
1179         (unpack_double): Remove.
1180         (value_from_double): Remove.
1181         (value_from_decfloat): Remove.
1182         * value.h: Do not include "doublest.h".
1183         (value_as_double): Remove.
1184         (unpack_double): Remove.
1185         (value_from_double): Remove.
1186         (value_from_decfloat): Remove.
1187
1188 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1189
1190         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1191         (i386_extract_return_value): Use target_float_convert.
1192         (i386_store_return_value): Likewise.
1193         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1194         (i387_value_to_register): Likewise.
1195         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1196         (ia64_register_to_value): Use target_float_convert.
1197         (ia64_value_to_register): Likewise.
1198         (ia64_extract_return_value): Likewise.
1199         (ia64_store_return_value): Likewise.
1200         (ia64_push_dummy_call): Likewise.
1201         * m68k-tdep.c: Include "target-float.h".
1202         (m68k_register_to_value): Use target_float_convert.
1203         (m68k_value_to_register): Likewise.
1204         (m68k_svr4_extract_return_value): Likewise.
1205         (m68k_svr4_store_return_value): Likewise.
1206         * ppc-sysv-tdep.c: Include "target-float.h".
1207         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1208         (do_ppc_sysv_return_value): Likewise.
1209         (ppc64_sysv_abi_push_freg): Likewise.
1210         (ppc64_sysv_abi_return_value_base): Likewise.
1211         * rs6000-aix-tdep.c: Include "target-float.h".
1212         (rs6000_push_dummy_call): Use target_float_convert.
1213         (rs6000_return_value): Likewise.
1214         * rs6000-lynx178-tdep.c: Include "target-float.h".
1215         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1216         (rs6000_lynx178_return_value): Likewise.
1217         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1218         (rs6000_register_to_value): Use target_float_convert.
1219         (rs6000_value_to_register): Likewise.
1220         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1221         (arm_extract_return_value): Use target_float_convert.
1222         (arm_store_return_value): Likewise.
1223         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1224         (sh_register_convert_to_virtual): Use target_float_convert.
1225         (sh_register_convert_to_raw): Likewise.
1226         * sh64-tdep.c: Include "target-float.h".
1227         (sh64_extract_return_value): Use target_float_convert.
1228         (sh64_register_convert_to_virtual): Likewise.
1229         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1230
1231 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1232
1233         * target-float.c (floatformat_to_host_double): New function.
1234         (floatformat_from_host_double): Likewise.
1235         (target_float_to_host_double): Likewise.
1236         (target_float_from_host_double): Likewise.
1237         * target-float.h (target_float_to_host_double): Add prototype.
1238         (target_float_from_host_double): Likewise.
1239
1240         * guile/scm-value.c: Include "target-float.h".
1241         (gdbscm_value_to_real): Use target_float_to_host_double.
1242         Handle integer source values via value_as_long.
1243         * guile/scm-math.c: Include "target-float.h".  Do not include
1244         "doublest.h", "dfp.h", and "expression.h".
1245         (vlscm_convert_typed_number): Use target_float_from_host_double.
1246         (vlscm_convert_number): Likewise.
1247
1248         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1249         (convert_value_from_python): Use target_float_from_host_double.
1250
1251 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1252
1253         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1254         (cast_from_fixed): Likewise.
1255         (ada_scaling_type): New function.
1256         (ada_delta): Return value instead of DOUBLEST.  Perform target
1257         arithmetic instead of host arithmetic.
1258         (scaling_factor): Rename to ...
1259         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1260         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1261         (ada_fixed_to_float): Remove.
1262         (ada_float_to_fixed): Remove.
1263         * ada-lang.h (ada_fixed_to_float): Remove.
1264         (ada_float_to_fixed): Remove.
1265         (ada_delta): Return value instead of DOUBLEST.
1266         (ada_scaling_factor): Add prototype.
1267
1268         * ada-typeprint.c: Include "target-float.h".
1269         (print_fixed_point_type): Perform target arithmetic instead of
1270         host arithmetic.
1271         * ada-valprint.c: Include "target-float.h".
1272         (ada_val_print_num): Perform target arithmetic instead of
1273         host arithmetic for fixed-point types.
1274
1275 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1276
1277         * target-float.c: Include <math.h>.
1278         (floatformat_binop): New function.
1279         (floatformat_compare): Likewise.
1280         (target_float_binop): Likewise.
1281         (target_float_compare): Likewise.
1282         * target-float.h: Include "expression.h".
1283         (target_float_binop): Add prototype.
1284         (target_float_compare): Likewise.
1285
1286         * valarith.c: Do not include "doublest.h" and "dfp.h".
1287         Include "common/byte-vector.h".
1288         (value_args_as_decimal): Remove, replace by ...
1289         (value_args_as_target_float): ... this function.  Handle both
1290         binary and decimal target floating-point formats.
1291         (scalar_binop): Handle both binary and decimal FP using
1292         value_args_as_target_float and target_float_binop.
1293         (value_equal): Handle both binary and decimal FP using
1294         value_args_as_target_float and target_float_compare.
1295         (value_less): Likewise.
1296         (value_pos): Handle all scalar types as simple copy.
1297         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1298         * dfp.c (decimal_binop): Throw error instead of internal_error
1299         when called with an unsupported operation code.
1300
1301 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1302
1303         * target-float.c (target_float_to_string): New function.
1304         (target_float_from_string): New function.
1305         * target-float.h (target_float_to_string): Add prototype.
1306         (target_float_from_string): Add prototype.
1307
1308         * valprint.c: Include "target-float.h".  Do not include
1309         "doublest.h" and "dfp.h".
1310         (print_floating): Use target_float_to_string.
1311         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1312         (printf_floating): Use target_float_to_string.
1313         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1314         (print_i387_value): Use target_float_to_string.
1315         * mips-tdep.c: Include "target-float.h".
1316         (mips_print_fp_register): Use target_float_to_string.
1317         * sh64-tdep.c: Include "target-float.h".
1318         (sh64_do_fp_register): Use target_float_to_string.
1319
1320         * parse.c: Include "target-float.h".  Do not include
1321         "doublest.h" and "dfp.h".
1322         (parse_float): Use target_float_from_string.
1323         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1324         (define_symbol): Use target_float_from_string.
1325         * gdbarch-selftests.c: Include "target-float.h".
1326         (register_to_value_test): Use target_float_from_string.
1327
1328 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1329
1330         * Makefile.c (SFILES): Add target-float.c.
1331         (HFILES_NO_SRCDIR): Add target-float.h.
1332         (COMMON_OBS): Add target-float.o.
1333         * target-float.h: New file.
1334         * target-float.c: New file.
1335
1336         * doublest.c (floatformat_classify): Fix detection of float_zero.
1337
1338         * gdbtypes.c (is_floating_type): New function.
1339         * gdbtypes.h (is_floating_type): Add prototype.
1340
1341         * value.c: Do not include "floatformat.h".
1342         (unpack_double): Use target_float_is_valid.
1343         (is_floating_value): New function.
1344         * value.h (is_floating_value): Add prototype-
1345
1346         * valarith.c: Include "target-float.h".
1347         (value_logical_not): Use target_float_is_zero.
1348
1349         * python/py-value.c: Include "target-float.h".
1350         (valpy_nonzero): Use target_float_is_zero.
1351
1352 2017-11-04  Tom Tromey  <tom@tromey.com>
1353
1354         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1355
1356 2017-11-04  Tom Tromey  <tom@tromey.com>
1357
1358         * breakpoint.c (set_momentary_breakpoint): Return
1359         breakpoint_up.
1360         (until_break_command): Update.
1361         (new_until_break_fsm): Change argument types to
1362         breakpoint_up.
1363         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1364         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1365         Remove.
1366         * infcmd.c (finish_forward): Update.
1367         * breakpoint.h (set_momentary_breakpoint)
1368         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1369         (make_cleanup_delete_breakpoint): Remove.
1370         (struct breakpoint_deleter): New.
1371         (breakpoint_up): New typedef.
1372         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1373         (insert_exception_resume_breakpoint): Update.
1374         (insert_exception_resume_from_probe): Update.
1375         (insert_longjmp_resume_breakpoint): Update.
1376         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1377         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1378         * infcall.c (call_function_by_hand_dummy): Update
1379
1380 2017-11-04  Tom Tromey  <tom@tromey.com>
1381
1382         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1383
1384 2017-11-04  Tom Tromey  <tom@tromey.com>
1385
1386         * linux-tdep.c (linux_core_info_proc_mappings): Use
1387         gdb::def_vector.
1388         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1389         "size" argument.
1390         (linux_corefile_thread): Update.
1391         (linux_make_corefile_notes): Remove unused variable.
1392
1393 2017-11-04  Tom Tromey  <tom@tromey.com>
1394
1395         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1396         gdb::byte_vector.
1397
1398 2017-11-04  Tom Tromey  <tom@tromey.com>
1399
1400         * objfiles.c (do_free_objfile_cleanup): Remove.
1401         * compile/compile-object-load.c (compile_object_load): Update.
1402         * objfiles.h (make_cleanup_free_objfile): Remove.
1403
1404 2017-11-04  Tom Tromey  <tom@tromey.com>
1405
1406         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1407         (adi_read_versions): Change "tags" to "gdb_byte *".
1408         (adi_print_versions): Likewise.
1409
1410 2017-11-04  Tom Tromey  <tom@tromey.com>
1411
1412         * breakpoint.c
1413         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1414         from start_rbreak_breakpoints.
1415         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1416         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1417         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1418         * symtab.c (do_end_rbreak_breakpoints): Remove.
1419         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1420
1421 2017-11-04  Tom Tromey  <tom@tromey.com>
1422
1423         * cp-namespace.c (reset_directive_searched): Remove.
1424         (cp_lookup_symbol_via_imports): Use scoped_restore.
1425         * cp-support.c (reset_directive_searched): Remove.
1426         (make_symbol_overload_list_using): Use scoped_restore.
1427         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1428         (reset_directive_searched): Remove.
1429
1430 2017-11-04  Tom Tromey  <tom@tromey.com>
1431
1432         * symfile.c (find_separate_debug_file_by_debuglink): Use
1433         unique_xmalloc_ptr.
1434
1435 2017-11-04  Tom Tromey  <tom@tromey.com>
1436
1437         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1438         type of "info".
1439         (compute_stack_depth): Likewise.
1440         (do_compile_dwarf_expr_to_c): Use std::vector.
1441
1442 2017-11-04  Tom Tromey  <tom@tromey.com>
1443
1444         * compile/compile-object-load.c (link_callbacks_einfo): Use
1445         std::string.
1446
1447 2017-11-04  Tom Tromey  <tom@tromey.com>
1448
1449         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1450         Use scoped_free_pendings.
1451         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1452         scoped_free_pendings.
1453         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1454         (xcoff_initial_scan): Likewise.
1455         * buildsym.c (reset_symtab_globals): Update comment.
1456         (scoped_free_pendings): Rename from really_free_pendings.
1457         (prepare_for_building): Update comment.
1458         (buildsym_init): Likewise.
1459         * buildsym.h (class scoped_free_pendings): New class.
1460         (really_free_pendings): Don't declare.
1461
1462 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1463
1464         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1465         output when converting a zero value to a special byteorder format.
1466
1467 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1468
1469         * frame.c (do_frame_register_read): Remove aspace.
1470         * jit.c (jit_frame_sniffer): Likwise.
1471         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1472         * regcache.c (regcache::regcache): Pass nullptr.
1473         (regcache_print): Caller updated.
1474         * regcache.h (regcache::regcache): Remove one constructor
1475         parameter aspace.
1476
1477 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1478
1479         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1480
1481 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1482
1483         * breakpoint.c (insert_single_step_breakpoints): Update.
1484         * frame.c (struct frame_info) <aspace>: Add const.
1485         (frame_save_as_regcache): Add const.
1486         (get_frame_address_space): Return const address_space *.
1487         * frame.h (get_frame_address_space): Update declaration.
1488         * infrun.c (struct step_over_info) <aspace>: Add const.
1489         (set_step_over_info): Make aspace const.
1490         (displaced_step_prepare_throw): Change variable const.
1491         (resume): Likewise.
1492         (proceed): Likewise.
1493         (adjust_pc_after_break): Likewise.
1494         (save_waitstatus): Likewise.
1495         (handle_signal_stop): Likewise.
1496         (keep_going_pass_signal): Likewise.
1497         * jit.c (jit_frame_sniffer): Add const.
1498         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1499         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1500         * record-full.c (record_full_wait_1): Likewise.
1501         * regcache.c (regcache::regcache): Change parameter to const.
1502         * regcache.h (regcache::regcache): Likewise.
1503         (regcache::aspace): Return const address_space *.
1504         (regcache) <m_aspace>: Add const.
1505
1506 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1507
1508         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1509         * frame.c (create_sentinel_frame): Likewise.
1510         * infrun.c (displaced_step_prepare_throw): Likewise.
1511         (resume): Likewise.
1512         (thread_still_needs_step_over_bp): Likewise.
1513         (proceed): Likewise.
1514         (do_target_wait): Likewise.
1515         (adjust_pc_after_break): Likewise.
1516         (handle_syscall_event): Likewise.
1517         (save_waitstatus): Likewise.
1518         (handle_inferior_event_1): Likewise.
1519         (handle_signal_stop): Likewise.
1520         (keep_going_pass_signal): Likewise.
1521         * linux-nat.c (status_callback): Likewise.
1522         (save_stop_reason): Likewise.
1523         (resume_stopped_resumed_lwps): Likewise.
1524         * record-full.c (record_full_exec_insn): Likewise.
1525         (record_full_wait_1): Likewise.
1526         * regcache.c (get_regcache_aspace): Remove.
1527         * regcache.h (get_regcache_aspace): Remove.
1528
1529 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1530
1531         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1532         (init_regcache_descr): Use gdbarch_num_regs.
1533         (regcache::regcache): Likewise.
1534         (regcache::get_register_status): Likewise.
1535         (regcache::assert_raw_regnum): Likewise.
1536         (regcache::cooked_read): Likewise.
1537         (regcache::cooked_read_value): Likewise.
1538         (regcache::cooked_write): Likewise.
1539         (regcache::dump): Likewise.
1540         (regcache::num_raw_registers): New method.
1541         * regcache.h (class regcache) <num_raw_registers>: New.
1542
1543 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1544
1545         * regcache.c (regcache::assert_regnum): New method.
1546         (regcache::invalidate): Call assert_regnum.
1547         (regcache::raw_update): Likewise.
1548         (regcache::raw_write): Likewise.
1549         (regcache::raw_read_part): Likewise.
1550         (regcache::raw_write_part): Likewise.
1551         (regcache::raw_supply): Likewise.
1552         (regcache::raw_supply_integer): Likewise.
1553         (regcache::raw_supply_zeroed): Likewise.
1554         (regcache::raw_collect): Likewise.
1555         (regcache::raw_collect_integer): Likewise.
1556         * regcache.h (regcache::assert_regnum): Declare.
1557
1558 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1559
1560         * regcache.c (regcache::dump): Remove code.
1561
1562 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1563
1564         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1565         Remove.
1566         <sizeof_cooked_register_status>: Remove.
1567         (init_regcache_descr): Update.
1568         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1569         (regcache::save): Likewise.
1570         (regcache::dump): Likewise.
1571
1572 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1573
1574         * ft32-tdep.c (ft32_fetch_instruction): New function.
1575         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1576
1577 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1578
1579         * cli/cli-script.c (execute_control_command): Rename to ...
1580         (execute_control_command_1): ... this.
1581         (execute_control_command): New function.
1582
1583 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1584
1585         * tracepoint.c (tfind_command): Remove const_cast.
1586
1587 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1588
1589         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1590
1591 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1592
1593         * common/common-utils.h (in_inclusive_range): New function.
1594         * arm-tdep.c (arm_record_extension_space): Use
1595         in_inclusive_range.
1596         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1597         * cris-tdep.c (cris_spec_reg_applicable): Use
1598         in_inclusive_range.
1599
1600 2017-10-30  Pedro Alves  <palves@redhat.com>
1601             Simon Marchi <simon.marchi@ericsson.com>
1602
1603         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1604         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1605
1606 2017-10-30  Pedro Alves  <palves@redhat.com>
1607
1608         * common/common-utils.c (string_appendf, string_vappendf): New
1609         functions.
1610         * common/common-utils.h (string_appendf, string_vappendf): New
1611         declarations.
1612         * unittests/common-utils-selftests.c (string_appendf_func)
1613         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1614         (string_vappendf_tests): New functions.
1615         (_initialize_common_utils_selftests): Register "string_appendf" and
1616         "string_vappendf tests".
1617
1618 2017-10-30  Pedro Alves  <palves@redhat.com>
1619
1620         * unittests/common-utils-selftests.c (format_func): New typedef.
1621         (string_printf_tests, string_vprintf_tests): Tests factored out
1622         and merged to ...
1623         (test_format_func): ... this new function.
1624         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1625         test_format_func.
1626
1627 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1628
1629         * darwin-nat.c: Remove include of gdb.h.
1630
1631 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1632
1633         * xtensa-xtregs.c: Fix formatting issues.
1634
1635 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1636
1637         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1638
1639 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1640
1641         PR python/21213
1642         * python/py-infthread.c (thpy_get_inferior): Increment reference
1643         of inferior before returning it.
1644
1645 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1646
1647         * unittests/common-utils-selftests.c (format): Add
1648         ATTRIBUTE_PRINTF.
1649
1650 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1651
1652         * xml-syscall.c (struct syscall_desc): Add constructor.
1653         <name>: Change type to std::string.
1654         (syscall_desc_up): New typedef.
1655         (syscall_desc_p): Remove typeder.
1656         (DEF_VEC_P(syscall_desc_p)): Remove.
1657         (struct syscall_group_desc): Add constructor.
1658         <name>: Change type to std::string.
1659         <syscalls>: Change type to std::vector.
1660         (syscall_group_desc_up): New typedef.
1661         (syscall_group_desc_p): Remove typedef.
1662         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1663         (struct syscalls_info) <syscalls>: Change type to std::vector of
1664         unique_ptr.
1665         <groups>: Likewise.
1666         <my_gdb_datadir>: Change type to std::string.
1667         (syscalls_info_up): New typedef.
1668         (allocate_syscalls_info): Remove.
1669         (syscalls_info_free_syscalls_desc): Remove.
1670         (syscalls_info_free_syscall_group_desc): Remove.
1671         (free_syscalls_info): Remove.
1672         (make_cleanup_free_syscalls_info): Remove.
1673         (syscall_group_create_syscall_group_desc): Adjust.
1674         (syscall_group_add_syscall): Adjust.
1675         (syscall_create_syscall_desc): Adjust.
1676         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1677         (init_syscalls_info): Adjust.
1678         (syscall_group_get_group_by_name): Adjust.
1679         (xml_get_syscall_number): Adjust.
1680         (xml_get_syscall_name): Adjust.
1681         (xml_list_of_syscalls): Adjust.
1682         (xml_list_syscalls_by_group): Adjust.
1683         (xml_list_of_groups): Adjust.
1684
1685 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1686
1687         * probe.h: Don't include gdb_vecs.h.
1688         (DEF_VEC_P (probe_p)): Remove.
1689         (find_probes_in_objfile): Return an std::vector.
1690         * probe.c (find_probes_in_objfile): Likewise.
1691         * breakpoint.c (breakpoint_objfile_data)
1692         <longjmp_probes>: Change type to std::vector.
1693         <exception_probes>: Likewise.
1694         (free_breakpoint_probes): Don't manually free vectors.
1695         (create_longjmp_master_breakpoint): Adjust.
1696         (create_exception_master_breakpoint): Adjust.
1697         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1698         parameter type, adjust.
1699         (svr4_create_solib_event_breakpoints): Adjust.
1700
1701 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1702
1703         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1704         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1705         with new.
1706         (free_breakpoint_probes): Rename to ...
1707         (free_breakpoint_objfile_data): ... this, and call delete on
1708         bp_objfile_data..
1709
1710 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1711
1712         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1713         (loaded_script_ptr): Remove typedef.
1714         (DEF_VEC_P (loaded_script_ptr)): Remove.
1715         (struct collect_matching_scripts_data): Add constructor.
1716         <scripts_p>: Change type to (pointer to) std::vector.
1717         (collect_matching_scripts_data): Adjust.
1718         (sort_scripts_by_name): Make suitable for std::sort.
1719         (print_scripts): Don't sort vector, adjust to std::vector.
1720         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1721
1722 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1723
1724         * symfile.c (filename_language): Make struct, not typedef.  Add
1725         constructor.
1726         <ext>: Change type to std::string.
1727         (DEF_VEC_O (filename_language)): Remove.
1728         (filename_language_table): Change type to std::vector.
1729         (add_filename_language): Adjust.
1730         (set_ext_lang_command): Adjust.
1731         (info_ext_lang_command): Adjust.
1732         (deduce_language_from_filename): Adjust.
1733         (class scoped_restore_filename_language_table): Remove.
1734         (test_filename_language): Use scoped_restore.
1735         (test_set_ext_lang_command): Use scoped_restore, adjust to
1736         std::vector change.
1737
1738 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1739
1740         * symfile.c: Include selftest.h.
1741         (class scoped_restore_filename_language_table): New.
1742         (test_filename_language): New test.
1743         (test_set_ext_lang_command): New test.
1744         (_initialize_symfile): Register tests.
1745
1746 2017-10-27  Keith Seitz  <keiths@redhat.com>
1747
1748         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1749         in the bp_location, falling back to find_pc_sect_function when
1750         needed.
1751         (add_location_to_breakpoint): Save sal->symbol.
1752         * breakpoint.h (struct bp_location) <symbol>: New field.
1753         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1754         * symtab.h (struct symtab_and_line) <symbol>: New field.
1755
1756 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1757
1758         PR gdb/13669
1759         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1760         to rewind obstack.
1761
1762 2017-10-26  Pedro Alves  <palves@redhat.com>
1763
1764         * remote.c (remote_async_terminal_ours_p): Delete.
1765         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1766         Remove references to 'remote_async_terminal_ours_p'.
1767
1768 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1769
1770         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1771
1772 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1773
1774         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1775         aspace const.
1776         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1777         Likewise.
1778         * breakpoint.c (bpstat_check_location): Remove cast.
1779         (breakpoint_hit_catch_fork): Make aspce const.
1780         (breakpoint_hit_catch_solib): Likewise.
1781         (breakpoint_hit_catch_exec): Likewise.
1782         (breakpoint_hit_ranged_breakpoint): Likewise.
1783         (breakpoint_hit_watchpoint): Likewise.
1784         (base_breakpoint_breakpoint_hit): Likewise.
1785         (bkpt_breakpoint_hit): Likewise.
1786         (dprintf_breakpoint_hit): Likewise.
1787         (tracepoint_breakpoint_hit): Likewise.
1788         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1789
1790 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1791
1792         * breakpoint.c (breakpoint_location_address_match): Change
1793         "struct address_space *" to "const address_space".
1794         (breakpoint_location_address_range_overlap): Likewise.
1795         (breakpoint_here_p): Likewise.
1796         (breakpoint_in_range_p): Likewise.
1797         (moribund_breakpoint_here_p): Likewise.
1798         (bp_location_inserted_here_p): Likewise.
1799         (software_breakpoint_inserted_here_p): Likewise.
1800         (hardware_breakpoint_inserted_here_p): Likewise.
1801         (hardware_watchpoint_inserted_in_range): Likewise.
1802         (bpstat_check_location): Likewise.
1803         (bpstat_stop_status): Likewise.
1804         (breakpoint_address_match): Likewise.
1805         (breakpoint_address_match_range): Likewise.
1806         (breakpoint_location_address_match): Likewise.
1807         (breakpoint_location_address_range_overlap): Likewise.
1808         (insert_single_step_breakpoint): Likewise.
1809         (breakpoint_has_location_inserted_here): Likewise.
1810         (single_step_breakpoint_inserted_here_p): Likewise.
1811         (pc_at_non_inline_function): Likewise.
1812         * breakpoint.h (bpstat_stop_status): Update declaration.
1813         (breakpoint_here_p): Likewise.
1814         (breakpoint_in_range_p): Likewise.
1815         (moribund_breakpoint_here_p): Likewise.
1816         (breakpoint_inserted_here_p): Likewise.
1817         (software_breakpoint_inserted_here_p): Likewise.
1818         (hardware_breakpoint_inserted_here_p): Likewise.
1819         (breakpoint_has_location_inserted_here): Likewise.
1820         (single_step_breakpoint_inserted_here_p): Likewise.
1821         (hardware_watchpoint_inserted_in_range): Likewise.
1822         (breakpoint_address_match): Likewise.
1823         (insert_single_step_breakpoint): Likewise.
1824         (pc_at_non_inline_function): Likewise.
1825         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1826         * record.c (record_check_stopped_by_breakpoint): Likewise.
1827         * record.h (record_check_stopped_by_breakpoint): Likewise.
1828         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1829
1830 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1831
1832         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1833         regcache->arch () instead get_regcache_arch.
1834         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1835         Likewise.
1836         (aarch64_fbsd_store_inferior_registers): Likewise.
1837         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1838         (store_gregs_to_thread): Likewise.
1839         (fetch_fpregs_from_thread): Likewise.
1840         (store_fpregs_to_thread): Likewise.
1841         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1842         (aarch64_store_return_value): Likewise.
1843         (aarch64_software_single_step): Likewise.
1844         * aix-thread.c (aix_thread_wait): Likewise.
1845         (supply_reg32): Likewise.
1846         (supply_sprs64): Likewise.
1847         (supply_sprs32): Likewise.
1848         (fill_gprs64): Likewise.
1849         (fill_gprs32): Likewise.
1850         (fill_sprs64): Likewise.
1851         (fill_sprs32): Likewise.
1852         (store_regs_user_thread): Likewise.
1853         (store_regs_kernel_thread): Likewise.
1854         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1855         (alphabsd_store_inferior_registers): Likewise.
1856         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1857         (alpha_store_return_value): Likewise.
1858         (alpha_deal_with_atomic_sequence): Likewise.
1859         (alpha_next_pc): Likewise.
1860         (alpha_software_single_step): Likewise.
1861         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1862         (amd64bsd_store_inferior_registers): Likewise.
1863         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1864         Likewise.
1865         (amd64_linux_store_inferior_registers): Likewise.
1866         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1867         (amd64_collect_native_gregset): Likewise.
1868         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1869         (amd64obsd_collect_uthread): Likewise.
1870         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1871         (amd64_collect_fpregset): Likewise.
1872         (amd64_supply_fxsave): Likewise.
1873         (amd64_supply_xsave): Likewise.
1874         (amd64_collect_fxsave): Likewise.
1875         (amd64_collect_xsave): Likewise.
1876         * arc-tdep.c (arc_write_pc): Likewise.
1877         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1878         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1879         (arm_fbsd_store_inferior_registers): Likewise.
1880         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1881         (store_vfp_regs): Likewise.
1882         (arm_linux_fetch_inferior_registers): Likewise.
1883         (arm_linux_store_inferior_registers): Likewise.
1884         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1885         (arm_linux_sigreturn_next_pc): Likewise.
1886         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1887         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1888         (fetch_register): Likewise.
1889         (store_register): Likewise.
1890         * arm-tdep.c (arm_is_thumb): Likewise.
1891         (displaced_in_arm_mode): Likewise.
1892         (bx_write_pc): Likewise.
1893         (arm_get_next_pcs_addr_bits_remove): Likewise.
1894         (arm_software_single_step): Likewise.
1895         (arm_extract_return_value): Likewise.
1896         (arm_store_return_value): Likewise.
1897         (arm_write_pc): Likewise.
1898         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1899         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1900         (bsd_uthread_store_registers): Likewise.
1901         * core-regset.c (fetch_core_registers): Likewise.
1902         * corelow.c (get_core_registers): Likewise.
1903         * cris-tdep.c (cris_store_return_value): Likewise.
1904         (cris_extract_return_value): Likewise.
1905         (find_step_target): Likewise.
1906         (find_step_target): Likewise.
1907         (cris_software_single_step): Likewise.
1908         * ctf.c (ctf_fetch_registers): Likewise.
1909         * darwin-nat.c (cancel_breakpoint): Likewise.
1910         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1911         * frv-tdep.c (frv_extract_return_value): Likewise.
1912         * ft32-tdep.c (ft32_store_return_value): Likewise.
1913         (ft32_extract_return_value): Likewise.
1914         * go32-nat.c (fetch_register): Likewise.
1915         (go32_fetch_registers): Likewise.
1916         (go32_store_registers): Likewise.
1917         (store_register): Likewise.
1918         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1919         (h8300_store_return_value): Likewise.
1920         * hppa-linux-nat.c (fetch_register): Likewise.
1921         (store_register): Likewise.
1922         (hppa_linux_fetch_inferior_registers): Likewise.
1923         (hppa_linux_store_inferior_registers): Likewise.
1924         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1925         (i386_darwin_store_inferior_registers): Likewise.
1926         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1927         (gnu_store_registers): Likewise.
1928         * i386-linux-nat.c (fetch_register): Likewise.
1929         (store_register): Likewise.
1930         (supply_gregset): Likewise.
1931         (fill_gregset): Likewise.
1932         (i386_linux_fetch_inferior_registers): Likewise.
1933         (i386_linux_store_inferior_registers): Likewise.
1934         (i386_linux_resume): Likewise.
1935         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1936         Likewise.
1937         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1938         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1939         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1940         (i386obsd_collect_uthread): Likewise.
1941         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1942         (i386_supply_gregset): Likewise.
1943         (i386_collect_gregset): Likewise.
1944         (i386_supply_fpregset): Likewise.
1945         (i386_collect_fpregset): Likewise.
1946         (i386_mpx_bd_base): Likewise.
1947         * i386-v4-nat.c (supply_fpregset): Likewise.
1948         (fill_fpregset): Likewise.
1949         * i387-tdep.c (i387_supply_fsave): Likewise.
1950         (i387_collect_fsave): Likewise.
1951         (i387_supply_fxsave): Likewise.
1952         (i387_collect_fxsave): Likewise.
1953         (i387_supply_xsave): Likewise.
1954         (i387_collect_xsave): Likewise.
1955         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1956         (ia64_linux_store_registers): Likewise.
1957         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1958         (ia64_extract_return_value): Likewise.
1959         (ia64_store_return_value): Likewise.
1960         (find_func_descr): Likewise.
1961         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1962         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1963         (inf_ptrace_store_registers): Likewise.
1964         * infrun.c (use_displaced_stepping): Likewise.
1965         (displaced_step_prepare_throw): Likewise.
1966         (resume): Likewise.
1967         (proceed): Likewise.
1968         (do_target_wait): Likewise.
1969         (adjust_pc_after_break): Likewise.
1970         (handle_inferior_event_1): Likewise.
1971         (handle_signal_stop): Likewise.
1972         (save_infcall_suspend_state): Likewise.
1973         (restore_infcall_suspend_state): Likewise.
1974         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1975         * jit.c (jit_frame_prev_register): Likewise.
1976         * linux-nat.c (save_stop_reason): Likewise.
1977         (linux_nat_wait_1): Likewise.
1978         (resume_stopped_resumed_lwps): Likewise.
1979         * linux-record.c (record_linux_sockaddr): Likewise.
1980         (record_linux_msghdr): Likewise.
1981         (record_linux_system_call): Likewise.
1982         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1983         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1984         (lm32_store_return_value): Likewise.
1985         * m32c-tdep.c (m32c_read_flg): Likewise.
1986         (m32c_pseudo_register_read): Likewise.
1987         (m32c_pseudo_register_write): Likewise.
1988         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1989         (m32r_linux_collect_gregset): Likewise.
1990         * m32r-tdep.c (m32r_store_return_value): Likewise.
1991         (m32r_extract_return_value): Likewise.
1992         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1993         (m68kbsd_collect_fpregset): Likewise.
1994         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1995         * m68k-linux-nat.c (fetch_register): Likewise.
1996         (old_fetch_inferior_registers): Likewise.
1997         (old_store_inferior_registers): Likewise.
1998         (store_regs): Likewise.
1999         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2000         (m68k_svr4_store_return_value): Likewise.
2001         * m88k-tdep.c (m88k_store_arguments): Likewise.
2002         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2003         (mi_cmd_data_write_register_values): Likewise.
2004         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2005         (mips_fbsd_store_inferior_registers): Likewise.
2006         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2007         (mips_fbsd_supply_gregs): Likewise.
2008         (mips_fbsd_collect_fpregs): Likewise.
2009         (mips_fbsd_collect_gregs): Likewise.
2010         (mips_fbsd_supply_fpregset): Likewise.
2011         (mips_fbsd_collect_fpregset): Likewise.
2012         (mips_fbsd_supply_gregset): Likewise.
2013         (mips_fbsd_collect_gregset): Likewise.
2014         * mips-linux-nat.c (supply_gregset): Likewise.
2015         (fill_gregset): Likewise.
2016         (supply_fpregset): Likewise.
2017         (fill_fpregset): Likewise.
2018         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2019         (mips_fill_gregset): Likewise.
2020         (mips_supply_fpregset): Likewise.
2021         (mips_fill_fpregset): Likewise.
2022         (mips64_supply_gregset): Likewise.
2023         (micromips_linux_sigframe_validate): Likewise.
2024         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2025         (mipsnbsd_fetch_inferior_registers): Likewise.
2026         (mipsnbsd_store_inferior_registers): Likewise.
2027         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2028         (mipsnbsd_supply_gregset): Likewise.
2029         (mipsnbsd_iterate_over_regset_sections): Likewise.
2030         (mipsnbsd_supply_reg): Likewise.
2031         (mipsnbsd_supply_fpreg): Likewise.
2032         * mips-tdep.c (mips_in_frame_stub): Likewise.
2033         (mips_dummy_id): Likewise.
2034         (is_octeon_bbit_op): Likewise.
2035         (micromips_bc1_pc): Likewise.
2036         (extended_mips16_next_pc): Likewise.
2037         (mips16_next_pc): Likewise.
2038         (deal_with_atomic_sequence): Likewise.
2039         * moxie-tdep.c (moxie_process_readu): Likewise.
2040         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2041         * nto-procfs.c (procfs_store_registers): Likewise.
2042         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2043         (ppcfbsd_store_inferior_registers): Likewise.
2044         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2045         (fetch_altivec_register): Likewise.
2046         (get_spe_registers): Likewise.
2047         (fetch_spe_register): Likewise.
2048         (fetch_altivec_registers): Likewise.
2049         (fetch_all_gp_regs): Likewise.
2050         (fetch_all_fp_regs): Likewise.
2051         (store_vsx_register): Likewise.
2052         (store_altivec_register): Likewise.
2053         (set_spe_registers): Likewise.
2054         (store_spe_register): Likewise.
2055         (store_altivec_registers): Likewise.
2056         (store_all_gp_regs): Likewise.
2057         (store_all_fp_regs): Likewise.
2058         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2059         (ppc_linux_collect_gregset): Likewise.
2060         (ppc_canonicalize_syscall): Likewise.
2061         (ppc_linux_record_signal): Likewise.
2062         (ppu2spu_prev_register): Likewise.
2063         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2064         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2065         (ppcobsd_store_registers): Likewise.
2066         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2067         Likewise.
2068         (ppc_ravenscar_generic_store_registers): Likewise.
2069         * procfs.c (procfs_fetch_registers): Likewise.
2070         (procfs_store_registers): Likewise.
2071         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2072         (ravenscar_store_registers): Likewise.
2073         (ravenscar_prepare_to_store): Likewise.
2074         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2075         * record-full.c (record_full_wait_1): Likewise.
2076         (record_full_registers_change): Likewise.
2077         (record_full_store_registers): Likewise.
2078         (record_full_core_fetch_registers): Likewise.
2079         (record_full_save): Likewise.
2080         (record_full_goto_insn): Likewise.
2081         * regcache.c (regcache_register_size): Likewise.
2082         (get_regcache_arch): Remove.
2083         (regcache_read_pc): Likewise.
2084         * regcache.h (get_regcache_arch): Remove.
2085         * remote-sim.c (gdbsim_fetch_register): Likewise.
2086         (gdbsim_store_register): Likewise.
2087         * remote.c (fetch_register_using_p): Likewise.
2088         (send_g_packet): Likewise.
2089         (remote_prepare_to_store): Likewise.
2090         (store_registers_using_G): Likewise.
2091         * reverse.c (save_bookmark_command): Likewise.
2092         (goto_bookmark_command): Likewise.
2093         * rs6000-aix-tdep.c (branch_dest): Likewise.
2094         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2095         (fetch_register): Likewise.
2096         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2097         (ppc_collect_reg): Likewise.
2098         (ppc_collect_gregset): Likewise.
2099         (ppc_collect_fpregset): Likewise.
2100         (ppc_collect_vsxregset): Likewise.
2101         (ppc_collect_vrregset): Likewise.
2102         (ppc_displaced_step_hw_singlestep): Likewise.
2103         (rs6000_pseudo_register_read): Likewise.
2104         (rs6000_pseudo_register_write): Likewise.
2105         * s390-linux-nat.c (supply_gregset): Likewise.
2106         (fill_gregset): Likewise.
2107         (s390_linux_fetch_inferior_registers): Likewise.
2108         * s390-linux-tdep.c (s390_write_pc): Likewise.
2109         (s390_software_single_step): Likewise.
2110         (s390_all_but_pc_registers_record): Likewise.
2111         (s390_linux_syscall_record): Likewise.
2112         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2113         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2114         (shnbsd_store_inferior_registers): Likewise.
2115         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2116         (sh_extract_return_value_fpu): Likewise.
2117         (sh_store_return_value_nofpu): Likewise.
2118         (sh_corefile_supply_regset): Likewise.
2119         (sh_corefile_collect_regset): Likewise.
2120         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2121         (sh64_store_return_value): Likewise.
2122         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2123         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2124         (sparc_store_inferior_registers): Likewise.
2125         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2126         (sparc_ravenscar_prepare_to_store): Likewise.
2127         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2128         (sparc_analyze_control_transfer): Likewise.
2129         (sparc_step_trap): Likewise.
2130         (sparc_software_single_step): Likewise.
2131         (sparc32_gdbarch_init): Likewise.
2132         (sparc_supply_rwindow): Likewise.
2133         (sparc_collect_rwindow): Likewise.
2134         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2135         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2136         (sparc64nbsd_collect_gregset): Likewise.
2137         (sparc64nbsd_supply_fpregset): Likewise.
2138         (sparc64nbsd_collect_fpregset): Likewise.
2139         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2140         (sparc64_supply_gregset): Likewise.
2141         (sparc64_collect_gregset): Likewise.
2142         (sparc64_supply_fpregset): Likewise.
2143         (sparc64_collect_fpregset): Likewise.
2144         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2145         * spu-tdep.c (spu_unwind_sp): Likewise.
2146         (spu2ppu_prev_register): Likewise.
2147         (spu_memory_remove_breakpoint): Likewise.
2148         * stack.c (return_command): Likewise.
2149         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2150         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2151         * tracefile.c (trace_save_ctf): Likewise.
2152         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2153         (do_windows_store_inferior_registers): Likewise.
2154         (windows_resume): Likewise.
2155         * xtensa-linux-nat.c (fill_gregset): Likewise.
2156         (supply_gregset_reg): Likewise.
2157         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2158         (xtensa_register_read_masked): Likewise.
2159         (xtensa_supply_gregset): Likewise.
2160         (xtensa_extract_return_value): Likewise.
2161         (xtensa_store_return_value): Likewise.
2162
2163 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2164
2165         * doublest.c (floatformat_from_string): New function.
2166         * doublest.h (floatformat_from_string): Add prototype.
2167
2168         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2169         (OP_FLOAT): ... this.
2170         * expression.h: Do not include "doublest.h".
2171         (union exp_element): Replace doubleconst and decfloatconst by
2172         new element floatconst.
2173         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2174         (ada_evaluate_subexp): Likewise.
2175         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2176         OP_DOUBLE and OP_DECFLOAT.
2177         * expprint.c (print_subexp_standard): Likewise.
2178         (dump_subexp_body_standard): Likewise.
2179         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2180
2181         * parse.c: Include "dfp.h".
2182         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2183         (write_exp_elt_floatcst): New function.
2184         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2185         and OP_DECFLOAT.
2186         (operator_check_standard): Likewise.
2187         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2188         Return target format buffer instead of host DOUBLEST.
2189         Use floatformat_from_string and decimal_from_string to parse
2190         either binary or decimal floating-point types.
2191         (parse_c_float): Remove.
2192         * parser-defs.h: Do not include "doublest.h".
2193         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2194         (write_exp_elt_floatcst): Add prototype.
2195         (parse_float): Update prototype.
2196         (parse_c_float): Remove.
2197
2198         * c-exp.y: Do not include "dfp.h".
2199         (typed_val_float): Use byte buffer instead of DOUBLEST.
2200         (typed_val_decfloat): Remove.
2201         (DECFLOAT): Remove.
2202         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2203         (parse_number): Update to new parse_float interface.
2204         Parse suffixes and determine type before calling parse_float.
2205         Handle decimal and binary FP types the same way.
2206
2207         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2208         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2209         (parse_number): Update to new parse_float interface.
2210         Parse suffixes and determine type before calling parse_float.
2211
2212         * f-exp.y: Replace dval by typed_val_float.
2213         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2214         (parse_number): Use parse_float instead of atof.
2215
2216         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2217         (parse_go_float): Remove.
2218         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2219         (parse_number): Call parse_float instead of parse_go_float.
2220         Parse suffixes and determine type before calling parse_float.
2221
2222         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2223         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2224         (parse_number): Update to new parse_float interface.
2225         Parse suffixes and determine type before calling parse_float.
2226
2227         * m2-exp.y: Replace dval by byte buffer val.
2228         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2229         (parse_number): Call parse_float instead of atof.
2230
2231         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2232         (lex_number): Call parse_float instead of strtod.
2233         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2234         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2235         Use write_exp_elt_floatcst.
2236         (unit_testing): Remove static variable.
2237         (rust_type): Do not check unit_testing.
2238         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2239
2240         * ada-exp.y (type_float, type_double): Remove.
2241         (typed_val_float): Use byte buffer instead of DOUBLEST.
2242         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2243         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2244
2245 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2246
2247         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2248         * arch/aarch64.h: New file.
2249
2250 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2251
2252         * dfp.h (decimal_from_string): Use const reference for argument.
2253         * dfp.c (decimal_from_string): Likewise.
2254
2255 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2256
2257         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2258         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2259         * mips-tdep.c (mips_print_fp_register): Likewise.
2260
2261 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2262
2263         * common/format.h (enum argclass): Replace decfloat_arg by
2264         dec32float_arg, dec64float_arg, and dec128float_arg.
2265         * common/format.c (parse_format_string): Update to return
2266         new decimal float argument classes.
2267
2268         * printcmd.c (printf_decfloat): Rename to ...
2269         (printf_floating): ... this.  Add argclass argument, and use it
2270         instead of parsing the format string again.  Add support for
2271         binary floating-point values, using floatformat_to_string.
2272         Convert value to the target format if it doesn't already match.
2273         (ui_printf): Call printf_floating instead of printf_decfloat,
2274         also for double_arg / long_double_arg.  Pass argclass.
2275
2276         * dfp.c (decimal_to_string): Add format string argument.
2277         * dfp.h (decimal_to_string): Likewise.
2278
2279         * doublest.c (floatformat_to_string): Add format string argument.
2280         * doublest.h (floatformat_to_string): Likewise.
2281
2282 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2283
2284         * doublest.c (floatformat_precision): New routine.
2285         (floatformat_to_string): Likewise.
2286         * doublest.c (floatformat_to_string): Add prototype.
2287
2288         * printcmd.c (print_scalar_formatted): Only call print_floating
2289         on floating-point types.
2290         * valprint.c: Do not include "floatformat.h".
2291         (generic_val_print_decfloat): Remove.
2292         (generic_val_print): Call generic_val_print_float for both
2293         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2294         (print_floating): Use floatformat_to_string.  Handle decimal float.
2295         (print_decimal_floating): Remove, merge into floatformat_to_string.
2296         * value.h (print_decimal_floating): Remove.
2297
2298         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2299
2300 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2301
2302         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2303
2304 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2305
2306         * memattr.h: Don't include vec.h.
2307         (struct mem_attrib): Initialize fields.
2308         <unknown>: New static method.
2309         (struct mem_region): Add constructors, operator<, initialize
2310         fields.
2311         * memattr.c: Include algorithm.
2312         (default_mem_attrib, unknown_mem_attrib): Remove.
2313         (user_mem_region_list): New global.
2314         (target_mem_region_list, mem_region_list): Change type to
2315         std::vector<mem_region>.
2316         (mem_use_target): Now a function.
2317         (target_mem_regions_valid): Change type to bool.
2318         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2319         (require_user_regions): Adjust.
2320         (require_target_regions): Adjust.
2321         (create_mem_region): Adjust.
2322         (lookup_mem_region): Adjust.
2323         (invalidate_target_mem_regions): Adjust.
2324         (mem_clear): Rename to...
2325         (user_mem_clear): ... this, and adjust.
2326         (mem_command): Adjust.
2327         (info_mem_command): Adjust.
2328         (mem_enable, enable_mem_command, mem_disable,
2329         disable_mem_command): Adjust.
2330         (mem_delete): Adjust.
2331         (delete_mem_command): Adjust.
2332         * memory-map.h (parse_memory_map): Return an std::vector.
2333         * memory-map.c (parse_memory_map): Likewise.
2334         (struct memory_map_parsing_data): Add constructor.
2335         <memory_map>: Point to std::vector.
2336         (memory_map_start_memory): Adjust.
2337         (memory_map_end_memory): Adjust.
2338         (memory_map_end_property): Adjust.
2339         (clear_result): Remove.
2340         * remote.c (remote_memory_map): Return an std::vector.
2341         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2342         Remove.
2343         (target_debug_print_mem_region_vector): New.
2344         * target-delegates.c: Regenerate.
2345         * target.h (mem_region_vector): New typedef.
2346         (to_memory_map): Return mem_region_vector.
2347         (target_memory_map): Return an std::vector.
2348         * target.c (target_memory_map): Return an std::vector.
2349         (flash_erase_command): Adjust.
2350
2351 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2352
2353         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2354         Change type to std::string.
2355         (memory_map_start_property): Adjust.
2356         (memory_map_end_property): Adjust.
2357
2358 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2359
2360         * infrun.h: Include common/byte-vector.h.
2361         (struct displaced_step_closure): New struct.
2362         (struct buf_displaced_step_closure): New struct.
2363         * infrun.c (displaced_step_closure::~displaced_step_closure):
2364         Provide default implementation.
2365         (displaced_step_clear): Deallocate step closure with delete.
2366         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2367         (aarch64_displaced_step_closure): ... this, extend
2368         displaced_step_closure.
2369         (aarch64_displaced_step_data) <dsc>: Change type to
2370         aarch64_displaced_step_closure.
2371         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2372         unique_ptr.
2373         (aarch64_displaced_step_fixup): Add cast for displaced step
2374         closure.
2375         * amd64-tdep.c (displaced_step_closure): Rename to ...
2376         (amd64_displaced_step_closure): ... this, extend
2377         displaced_step_closure.
2378         <insn_buf>: Change type to std::vector<gdb_byte>.
2379         <max_len>: Remove.
2380         (fixup_riprel): Change type of DSC parameter, adjust to type
2381         change of insn_buf.
2382         (fixup_displaced_copy): Change type of DSC parameter.
2383         (amd64_displaced_step_copy_insn): Instantiate
2384         amd64_displaced_step_closure.
2385         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2386         to type change of insn_buf.
2387         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2388         parameter DSC.
2389         (arm_linux_copy_svc): Likewise.
2390         (cleanup_kernel_helper_return): Likewise.
2391         (arm_catch_kernel_helper_return): Likewise.
2392         (arm_linux_displaced_step_copy_insn): Instantiate
2393         arm_displaced_step_closure.
2394         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2395         (displaced_read_reg): Change type of parameter DSC.
2396         (branch_write_pc): Likewise.
2397         (load_write_pc): Likewise.
2398         (alu_write_pc): Likewise.
2399         (displaced_write_reg): Likewise.
2400         (arm_copy_unmodified): Likewise.
2401         (thumb_copy_unmodified_32bit): Likewise.
2402         (thumb_copy_unmodified_16bit): Likewise.
2403         (cleanup_preload): Likewise.
2404         (install_preload): Likewise.
2405         (arm_copy_preload): Likewise.
2406         (thumb2_copy_preload): Likewise.
2407         (install_preload_reg): Likewise.
2408         (arm_copy_preload_reg): Likewise.
2409         (cleanup_copro_load_store): Likewise.
2410         (install_copro_load_store): Likewise.
2411         (arm_copy_copro_load_store) Likewise.
2412         (thumb2_copy_copro_load_store): Likewise.
2413         (cleanup_branch): Likewise.
2414         (install_b_bl_blx): Likewise.
2415         (arm_copy_b_bl_blx): Likewise.
2416         (thumb2_copy_b_bl_blx): Likewise.
2417         (thumb_copy_b): Likewise.
2418         (install_bx_blx_reg): Likewise.
2419         (arm_copy_bx_blx_reg): Likewise.
2420         (thumb_copy_bx_blx_reg): Likewise.
2421         (cleanup_alu_imm): Likewise.
2422         (arm_copy_alu_imm): Likewise.
2423         (thumb2_copy_alu_imm): Likewise.
2424         (cleanup_alu_reg): Likewise.
2425         (install_alu_reg): Likewise.
2426         (arm_copy_alu_reg): Likewise.
2427         (thumb_copy_alu_reg): Likewise.
2428         (cleanup_alu_shifted_reg): Likewise.
2429         (install_alu_shifted_reg): Likewise.
2430         (arm_copy_alu_shifted_reg): Likewise.
2431         (cleanup_load): Likewise.
2432         (cleanup_store): Likewise.
2433         (arm_copy_extra_ld_st): Likewise.
2434         (install_load_store): Likewise.
2435         (thumb2_copy_load_literal): Likewise.
2436         (thumb2_copy_load_reg_imm): Likewise.
2437         (arm_copy_ldr_str_ldrb_strb): Likewise.
2438         (cleanup_block_load_all): Likewise.
2439         (cleanup_block_store_pc): Likewise.
2440         (cleanup_block_load_pc): Likewise.
2441         (arm_copy_block_xfer): Likewise.
2442         (thumb2_copy_block_xfer): Likewise.
2443         (cleanup_svc): Likewise.
2444         (install_svc): Likewise.
2445         (arm_copy_svc): Likewise.
2446         (thumb_copy_svc): Likewise.
2447         (arm_copy_undef): Likewise.
2448         (thumb_32bit_copy_undef): Likewise.
2449         (arm_copy_unpred): Likewise.
2450         (arm_decode_misc_memhint_neon): Likewise.
2451         (arm_decode_unconditional): Likewise.
2452         (arm_decode_miscellaneous): Likewise.
2453         (arm_decode_dp_misc): Likewise.
2454         (arm_decode_ld_st_word_ubyte): Likewise.
2455         (arm_decode_media): Likewise.
2456         (arm_decode_b_bl_ldmstm): Likewise.
2457         (arm_decode_ext_reg_ld_st): Likewise.
2458         (thumb2_decode_dp_shift_reg): Likewise.
2459         (thumb2_decode_ext_reg_ld_st): Likewise.
2460         (arm_decode_svc_copro): Likewise.
2461         (thumb2_decode_svc_copro): Likewise.
2462         (install_pc_relative): Likewise.
2463         (thumb_copy_pc_relative_16bit): Likewise.
2464         (thumb_decode_pc_relative_16bit): Likewise.
2465         (thumb_copy_pc_relative_32bit): Likewise.
2466         (thumb_copy_16bit_ldr_literal): Likewise.
2467         (thumb_copy_cbnz_cbz): Likewise.
2468         (thumb2_copy_table_branch): Likewise.
2469         (cleanup_pop_pc_16bit_all): Likewise.
2470         (thumb_copy_pop_pc_16bit): Likewise.
2471         (thumb_process_displaced_16bit_insn): Likewise.
2472         (decode_thumb_32bit_ld_mem_hints): Likewise.
2473         (thumb_process_displaced_32bit_insn): Likewise.
2474         (thumb_process_displaced_insn): Likewise.
2475         (arm_process_displaced_insn): Likewise.
2476         (arm_displaced_init_closure): Likewise.
2477         (arm_displaced_step_fixup): Add cast for closure.
2478         * arm-tdep.h: Include infrun.h.
2479         (displaced_step_closure): Rename to ...
2480         (arm_displaced_step_closure): ... this, extend
2481         displaced_step_closure.
2482         <u::svc::copy_svc_os>: Change type of parameter DSC.
2483         <cleanup>: Likewise.
2484         (arm_process_displaced_insn): Likewise.
2485         (arm_displaced_init_closure): Likewise.
2486         (displaced_read_reg): Likewise.
2487         (displaced_write_reg): Likewise.
2488         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2489         Adjust.
2490         * i386-tdep.h: Include infrun.h.
2491         (i386_displaced_step_closure): New typedef.
2492         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2493         i386_displaced_step_closure.
2494         (i386_displaced_step_fixup): Adjust.
2495         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2496         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2497         and unique_ptr.
2498         (ppc_displaced_step_fixup): Adjust.
2499         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2500         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2501         and unique_ptr.
2502         (s390_displaced_step_fixup): Adjust.
2503
2504 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2505
2506         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2507         Remove declarations.
2508
2509 2017-10-20  Tom Tromey  <tom@tromey.com>
2510
2511         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2512         std::vector.
2513         (gdb_bfd_record_inclusion): Update.
2514         (bfdp): Remove typedef.
2515
2516 2017-10-20  Tom Tromey  <tom@tromey.com>
2517
2518         * gdb_bfd.c (gdb_bfd_ref): Use new.
2519         (struct gdb_bfd_data): Add constructor, destructor, and member
2520         initializers.
2521         (gdb_bfd_unref): Use delete.
2522
2523 2017-10-20  Tom Tromey  <tom@tromey.com>
2524
2525         * exec.c (exec_file_attach): Use new_bfd_ref.
2526         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2527         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2528         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2529         new_bfd_ref.
2530         * gdb_bfd.h (new_bfd_ref): New function.
2531
2532 2017-10-20  Pedro Alves  <palves@redhat.com>
2533
2534         * main.c (captured_command_loop): Add attribute noinline.
2535
2536 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2537
2538         * interps.c (struct interp_factory): Add constructor.
2539         (interp_factory_p): Remove typedef.
2540         (DEF_VEC_P(interp_factory_p)): Remove.
2541         (interpreter_factories): Change type to std::vector.
2542         (interp_factory_register): Adjust.
2543         (interp_lookup): Adjust.
2544         (interpreter_completer): Adjust.
2545
2546 2017-10-19  Tom Tromey  <tom@tromey.com>
2547
2548         * break-catch-syscall.c (catch_syscall_completer): Use
2549         std::string, gdb::unique_xmalloc_ptr.
2550
2551 2017-10-19  Tom Tromey  <tom@tromey.com>
2552
2553         * infcall.c (call_function_by_hand_dummy): Use std::string.
2554
2555 2017-10-19  Tom Tromey  <tom@tromey.com>
2556
2557         * mi/mi-main.c (mi_cmd_execute): Update.
2558         * top.h (prepare_execute_command): Return scoped_value_mark.
2559         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2560         Add move constructor.
2561         * top.c (prepare_execute_command): Return scoped_value_mark.
2562         (execute_command): Update.
2563
2564 2017-10-19  Pedro Alves  <palves@redhat.com>
2565
2566         * xml-support.c (xml_fetch_content_from_file): Check fread's
2567         return.
2568
2569 2017-10-19  Pedro Alves  <palves@redhat.com>
2570
2571         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2572         async.
2573         (handle_error_fd): New function.
2574         (ser_base_async): Add/delete an event loop file handler for
2575         error_fd.
2576
2577 2017-10-19  Pedro Alves  <palves@redhat.com>
2578
2579         * xml-support.c (xml_fetch_content_from_file): Don't read in
2580         chunks.  Instead use fseek to determine the file's size, and read
2581         it in one go.
2582
2583 2017-11-18  Keith Seitz  <keiths@redhat.com>
2584
2585         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2586         types.
2587         Add whitespace to front of type name.
2588
2589 2017-10-18  Keith Seitz  <keiths@redhat.com>
2590
2591         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2592         DW_AT_accessibility.
2593
2594 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2595
2596         * features/tic6x-c62x-linux.c: Remove.
2597
2598 2017-10-17  Tom Tromey  <tom@tromey.com>
2599
2600         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2601         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2602         (do_mixed_source_and_assembly): Likewise.
2603
2604 2017-10-17  Tom Tromey  <tom@tromey.com>
2605
2606         * regcache.c (regcache::xfer_part): Remove assertion.
2607
2608 2017-10-17  Pedro Alves  <palves@redhat.com>
2609
2610         * xml-support.c (xml_fetch_content_from_file): Call
2611         unique_ptr::release() instead unique_ptr::get() when passing
2612         through xrealloc.
2613
2614 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2615
2616         * regcache.c (regcache::xfer_part): Remove parameters read and
2617         write, add parameter is_raw.  All callers are updated.
2618
2619 2017-10-16  Keith Seitz  <keiths@redhat.com>
2620
2621         * c-typeprint.c (enum access_specifier): Moved here from
2622         c_type_print_base.
2623         (output_access_specifier): New function.
2624         (c_type_print_base): Consider typedefs when assessing
2625         whether access labels are needed.
2626         Use output_access_specifier as needed.
2627         Output access specifier for typedefs, if needed.
2628         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2629         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2630         fields.
2631         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2632         accessor macros.
2633
2634 2017-10-16  Tom Tromey  <tom@tromey.com>
2635
2636         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2637         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2638         * target.c (target_fileio_read_stralloc): Update.
2639         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2640         * target.h (target_fileio_read_stralloc): Return
2641         unique_xmalloc_ptr.
2642
2643 2017-10-16  Tom Tromey  <tom@tromey.com>
2644
2645         * xml-syscall.c (xml_init_syscalls_info): Update.
2646         * xml-support.c (xinclude_start_include): Update.
2647         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2648         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2649         (xml_fetch_content_from_file): Likewise.
2650         * osdata.c (get_osdata): Update.
2651         * target.h (target_read_stralloc, target_get_osdata): Return
2652         unique_xmalloc_ptr.
2653         * solib-aix.c (solib_aix_get_library_list): Update.
2654         * solib-target.c (solib_target_current_sos): Update.
2655         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2656         * xml-tdesc.c (fetch_available_features_from_target): Update.
2657         (target_fetch_description_xml): Update.
2658         (file_read_description_xml): Update.
2659         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2660         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2661         (remote_pid_to_exec_file): Update.
2662         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2663         (target_get_osdata): Likewise.
2664
2665 2017-10-16  Tom Tromey  <tom@tromey.com>
2666
2667         * remote.c (remote_register_number_and_offset): Use std::vector.
2668         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2669         (putpkt_binary): Use gdb::def_vector.
2670         (compare_sections_command): Use gdb::byte_vector.
2671
2672 2017-10-16  Tom Tromey  <tom@tromey.com>
2673
2674         * ppc-linux-nat.c (hwdebug_insert_point): Use
2675         gdb::unique_xmalloc_ptr, XDUP.
2676
2677 2017-10-16  Tom Tromey  <tom@tromey.com>
2678
2679         * probe.c (parse_probes): Use std::string.
2680         (info_probes_for_ops, enable_probes_command)
2681         (disable_probes_command): Remove cleanups.
2682
2683 2017-10-16  Tom Tromey  <tom@tromey.com>
2684
2685         * buildsym.c (block_compar): Remove.
2686         (end_symtab_get_static_block): Use std::vector.
2687
2688 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2689
2690         * memrange.h (struct mem_range): Define operator< and operator==.
2691         (mem_range_s): Remove.
2692         (DEF_VEC_O (mem_range_s)): Remove.
2693         (normalize_mem_ranges): Change parameter type to std::vector.
2694         * memrange.c (compare_mem_ranges): Remove.
2695         (normalize_mem_ranges): Change parameter type to std::vector,
2696         adjust to vector change.
2697         * exec.c (section_table_available_memory): Return vector, remove
2698         parameter.
2699         (section_table_read_available_memory): Adjust to std::vector
2700         change.
2701         * remote.c (remote_read_bytes): Adjust to std::vector
2702         change.
2703         * tracepoint.h (traceframe_available_memory): Change parameter
2704         type to std::vector.
2705         * tracepoint.c (traceframe_available_memory): Change parameter
2706         type to std::vector, adjust.
2707         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2708         std::vector change.
2709         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2710         unittests/memrange-selftests.c.
2711         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2712         * gdb/unittests/memrange-selftests.c: New file.
2713
2714 2017-10-16  Pedro Alves  <palves@redhat.com>
2715
2716         * elfread.c (probe_key_free): Rename range-for variable.
2717         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2718         (find_probe_by_pc, collect_probes): Rename range-for variable.
2719
2720 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2721
2722         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2723         * features/tic6x-c62x.c: Remove.
2724         * features/tic6x-c64x-linux.c: Remove.
2725         * features/tic6x-c64x.c: Remove.
2726         * features/tic6x-c64xp-linux.c: Remove.
2727         * features/tic6x-c64xp.c: Remove.
2728         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2729         initialize_tdesc_tic6x_*_linux functions.
2730         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2731         initialize_tdesc_tic6x_* functions.
2732
2733 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2734
2735         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2736         tic6x-c62x.
2737         * regformats/tic6x-c62x.dat: Remove.
2738         * regformats/tic6x-c64x.dat: Remove.
2739         * regformats/tic6x-c64xp.dat: Remove.
2740
2741 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2742
2743         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2744         (the !HAVE_LIBEXPAT version).
2745
2746 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2747
2748         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2749         const.
2750
2751 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2752
2753         * target.h: Include tracepoint.h.
2754         (enum trace_find_type): Move to tracepoint.h.
2755         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2756         * tracepoint.h: Don't include target.h
2757         (enum trace_find_type): Move from target.h.
2758         (parse_traceframe_info): Return a unique ptr.
2759         * tracepoint.c (current_traceframe_info): Change type to unique
2760         ptr.
2761         (free_traceframe_info): Remove.
2762         (clear_traceframe_info): Don't manually free
2763         current_traceframe_info.
2764         (free_result): Remove.
2765         (parse_traceframe_info): Return a unique ptr.
2766         (get_traceframe_info): Adjust to unique ptr.
2767         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2768         * remote.c (remote_traceframe_info): Return a unique ptr.
2769         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2770         ptr.
2771         * target-debug.h (target_debug_print_traceframe_info_up): New
2772         macro.
2773         * target-delegates.c: Regenerate.
2774
2775 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2776
2777         * memrange.h (struct mem_range): Add constructors.
2778         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2779         std::vector<mem_range>.
2780         * tracepoint.c (free_traceframe_info): Don't manually free
2781         vector.
2782         (traceframe_info_start_memory): Adjust to vector change.
2783         (traceframe_available_memory): Likewise.
2784         * tracefile-tfile.c (build_traceframe_info): Likewise.
2785         * ctf.c (ctf_traceframe_info): Likewise.
2786
2787 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2788
2789         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2790         std::vector<int>.
2791         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2792         (traceframe_info_start_tvar): Adjust to vector change.
2793         (parse_traceframe_info): Allocate with new.
2794         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2795         vector change.
2796         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2797         change.
2798         tfile_traceframe_info): Allocate with new.
2799         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2800         change.
2801
2802 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2803
2804         * tracepoint.c (traceframe_info): Rename to...
2805         (current_traceframe_info): ...this.
2806         (clear_traceframe_info): Adjust.
2807         (get_traceframe_info): Adjust.
2808
2809 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2810
2811         * nat/linux-osdata.c: Include algorithm.
2812         (compare_processes): Remove.
2813         (struct pid_pgid_entry): New struct.
2814         (linux_xfer_osdata_processgroups): Use std::vector instead of
2815         XNEWVEC.
2816
2817 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2818
2819         * objfiles.h: Don't include symfile.h.
2820         (struct partial_symbol): Remove forward-declaration.
2821         (struct objfile) <global_psymbols, static_psymbols>: Change type
2822         to std::vector<partial_symbol *>.
2823         * objfiles.c (objfile::objfile): Don't memset those fields.
2824         (objfile::~objfile): Don't free those fields.
2825         * psympriv.h (struct psymbol_allocation_list): Remove
2826         forward-declaration.
2827         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2828         to std::vector.
2829         (start_psymtab_common): Change parameters to std::vector.
2830         * psymtab.c: Include algorithm.
2831         (require_partial_symbols): Call shrink_to_fit.
2832         (find_pc_sect_psymbol): Adjust to vector change.
2833         (match_partial_symbol): Likewise.
2834         (lookup_partial_symbol): Likewise.
2835         (psym_relocate): Likewise.
2836         (dump_psymtab): Likewise.
2837         (recursively_search_psymtabs): Likewise.
2838         (compare_psymbols): Remove.
2839         (sort_pst_symbols): Adjust to vector change.
2840         (start_psymtab_common): Likewise.
2841         (end_psymtab_common): Likewise.
2842         (psymbol_bcache_full): De-constify return value.
2843         (add_psymbol_to_bcache): Likewise.
2844         (extend_psymbol_list): Remove.
2845         (append_psymbol_to_list): Adjust to vector change.
2846         (add_psymbol_to_list): Likewise.
2847         (init_psymbol_list): Likewise.
2848         (maintenance_info_psymtabs): Likewise.
2849         (maintenance_check_psymtabs): Likewise.
2850         * symfile.h (struct psymbol_allocation_list): Remove.
2851         * symfile.c (reread_symbols): Adjust to vector change.
2852         * dbxread.c (start_psymtab): Change type of parameters.
2853         (dbx_symfile_read): Adjust to vector change.
2854         (read_dbx_symtab): Likewise.
2855         (start_psymtab): Change type of parameters.
2856         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2857         (create_partial_symtab): Likewise.
2858         (add_partial_symbol): Likewise.
2859         (write_one_signatured_type): Likewise.
2860         (recursively_write_psymbols): Likewise.
2861         * mdebugread.c (parse_partial_symbols): Likewise.
2862         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2863         (scan_xcoff_symtab): Adjust to vector change.
2864         (xcoff_initial_scan): Likewise.
2865
2866 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2867
2868         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2869
2870 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2871
2872         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2873         Remove s390x-*-expedite, add s390x-expedite.
2874
2875 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2876
2877         * features/s390-gs-linux64.c: Regenerated.
2878         * features/s390x-gs-linux64.c: Regenerated.
2879
2880 2017-10-13  Tom Tromey  <tom@tromey.com>
2881
2882         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2883         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2884         delete.
2885         * symfile.c (symbol_file_add_with_addrs): Use new.
2886         (symbol_file_add_separate): Update comment.
2887         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2888         * jit.c (jit_object_close_impl): Use new.
2889         (jit_unregister_code): Use delete.
2890         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2891         (~objfile): Rename from free_objfile.
2892         (free_objfile_separate_debug, do_free_objfile_cleanup)
2893         (free_all_objfiles, objfile_purge_solibs): Use delete.
2894         * objfiles.h (struct objfile): Add constructor and destructor.
2895         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2896         (allocate_objfile, free_objfile): Don't declare.
2897         (struct objstats): Add initializers.
2898
2899 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2900
2901         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2902         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2903         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2904         * gdbarch.h: Regenerate.
2905         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2906         Adjust comment.
2907         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2908         (i386_displaced_step_fixup): Adjust comment.
2909         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2910
2911 2017-10-12  Tom Tromey  <tom@tromey.com>
2912
2913         * prologue-value.h (pv_area::store_would_trash): Return bool.
2914         (pv_area::find_reg): Likewise.
2915         * prologue-value.c (pv_area::store_would_trash): Return bool.
2916         (pv_area::find_reg): Likewise.
2917
2918 2017-10-12  Tom Tromey  <tom@tromey.com>
2919
2920         * s390-linux-tdep.c (s390_store, s390_load)
2921         (s390_check_for_saved, s390_analyze_prologue): Update.
2922         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2923         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2924         * prologue-value.h (class pv_area): Move from prologue-value.c.
2925         Change names of members.  Add constructor, destructor, member
2926         functions.
2927         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2928         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2929         (pv_area_fetch, pv_area_scan): Don't declare.
2930         * prologue-value.c (struct pv_area::area_entry): Now member of
2931         pv_area.
2932         (struct pv_area): Move to prologue-value.h.
2933         (pv_area::pv_area): Rename from make_pv_area.
2934         (pv_area::~pv_area): Rename from free_pv_area.
2935         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2936         (clear_entries, find_entry, overlaps, store_would_trash, store)
2937         (fetch, find_reg, scan): Now member of pv_area.
2938         Remove "area" argument.  Update.
2939         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2940         Update.
2941         * mn10300-tdep.c (push_reg, check_for_saved)
2942         (mn10300_analyze_prologue): Update.
2943         * mep-tdep.c (is_arg_spill, check_for_saved)
2944         (mep_analyze_prologue): Update.
2945         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2946         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2947         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2948         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2949         Update.
2950         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2951         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2952
2953 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2954
2955         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2956         * linux-nat.c (linux_nat_delete_thread): New variable.
2957         (lwp_free): Invoke linux_nat_delete_thread if set.
2958         (linux_nat_set_delete_thread): New function.
2959         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2960         thread delete callback.
2961         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2962         (_initialize_arm_linux_nat): Assign thread delete callback.
2963         * s390-linux-nat.c (s390_delete_thread): New function.
2964         (_initialize_s390_nat): Assign thread delete callback.
2965         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2966         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2967         function.
2968         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2969         declaration.
2970         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2971         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2972
2973 2017-10-09  Tom Tromey  <tom@tromey.com>
2974
2975         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2976         std::string.
2977         * tui/tui-layout.c (enum tui_status): Use std::string.
2978
2979 2017-10-11  Tom Tromey  <tom@tromey.com>
2980
2981         * gdbthread.h (thread_command): Constify.
2982         * inferior.h (detach_command): Constify.
2983         * top.h (set_history, show_history): Constify.
2984         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2985         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2986         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2987         * printcmd.c (set_command): Constify.
2988         (non_const_set_command): New function.
2989         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2990         * breakpoint.c (enable_command, disable_command, delete_command)
2991         (catch_command, tcatch_command, set_breakpoint_cmd)
2992         (show_breakpoint_cmd): Constify.
2993         * macrocmd.c (macro_command): Constify.
2994         * infcmd.c (unset_command, kill_command, detach_command)
2995         (info_proc_cmd): Constify.
2996         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2997         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2998         (info_auto_load_cmd): Constify.
2999         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3000         (unset_tdesc_cmd): Constify.
3001         * ada-lang.c (set_ada_command, show_ada_command)
3002         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3003         * guile/guile.c (set_guile_command, show_guile_command)
3004         (info_guile_command): Constify.
3005         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3006         Constify.
3007         * skip.c (skip_command): Constify.
3008         * compile/compile.c (_initialize_compile): Constify.
3009         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3010         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3011         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3012         (maint_btrace_pt_show_cmd): Constify.
3013         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3014         Constify.
3015         * python/python.c (user_show_python, user_set_python): Constify.
3016         * mips-tdep.c (set_mips_command, show_mips_command)
3017         (set_mipsfpu_command): Constify.
3018         * record-btrace.c (cmd_record_btrace_start)
3019         (cmd_set_record_btrace, cmd_show_record_btrace)
3020         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3021         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3022         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3023         Constify.
3024         * symfile.c (overlay_command): Constify.
3025         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3026         * cli/cli-logging.c (set_logging_command, show_logging_command):
3027         Constify.
3028         * cli/cli-dump.c (dump_command, append_command)
3029         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3030         (tekhex_dump_command, binary_dump_command)
3031         (binary_append_command): Constify.
3032         * cli/cli-decode.c (struct cmd_list_element): Change type of
3033         "fun".
3034         * cli/cli-cmds.c (info_command, show_command, set_debug)
3035         (show_debug): Constify.
3036         (show_command): Add non-const overload.
3037         * top.c (set_history, show_history): Constify.
3038         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3039         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3040         * target.c (target_command): Constify.
3041         * sparc64-tdep.c (info_adi_command): Constify.
3042         * record-full.c (cmd_record_full_start): Constify.
3043         (set_record_full_command): Constify.  Fix typo.
3044         (show_record_full_command): Constify.
3045         * thread.c (thread_command, thread_apply_command): Constify.
3046         * memattr.c (dummy_cmd): Constify.
3047         * value.c (function_command): Constify.
3048         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3049         * probe.c (info_probes_command): Constify.
3050         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3051         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3052         (show_thread_cmd, set_thread_default_cmd)
3053         (show_thread_default_cmd): Constify.
3054         (check_empty): Constify.
3055         * tracepoint.c (tfind_command): Constify.
3056         * cp-support.c (maint_cplus_command): Constify.
3057         * windows-tdep.c (info_w32_command): Constify.
3058         * record.c (cmd_record_start, set_record_command)
3059         (show_record_command, info_record_command, cmd_record_goto):
3060         Constify.
3061         * ravenscar-thread.c (set_ravenscar_command)
3062         (show_ravenscar_command): Constify.
3063         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3064         Constify.
3065         (add_internal_problem_command): Remove casts.
3066         * arc-tdep.c (maintenance_print_arc_command): Constify.
3067         * valprint.c (set_print, show_print, set_print_raw)
3068         (show_print_raw): Constify.
3069         * maint.c (maintenance_command, maintenance_info_command)
3070         (maintenance_print_command, maintenance_set_cmd)
3071         (maintenance_show_cmd, set_per_command_cmd)
3072         (show_per_command_cmd, maintenance_check_command): Constify.
3073         * language.c (set_check, show_check): Constify.
3074         * typeprint.c (show_print_type, set_print_type): Constify.
3075         * go32-nat.c (go32_info_dos_command): Constify.
3076
3077 2017-10-11  Tom Tromey  <tom@tromey.com>
3078
3079         * breakpoint.c (prepare_re_set_context): Remove.
3080         (breakpoint_re_set_one): Update.  Don't use cleanups.
3081         (breakpoint_re_set): Use scoped_restore, std::string, and
3082         scoped_restore_current_language.
3083
3084 2017-10-11  Tom Tromey  <tom@tromey.com>
3085
3086         * breakpoint.c (commands_command_1): Use std::string.
3087         (cleanup_executing_breakpoints): Remove.
3088         (bpstat_do_actions_1): Use scoped_restore.
3089         (bpstat_check_watchpoint): Use std::string.
3090         (decode_static_tracepoint_spec): Likewise.
3091         (break_range_command): Likewise.
3092         (watch_command_1): Likewise.
3093         (compare_breakpoints): Change argument types.
3094         (clear_command): Use std::vector.
3095         (cleanup_executing_breakpoints): Remove.
3096         (update_global_location_list): Use unique_xmalloc_ptr.
3097         (strace_command): Remove unused declaration.
3098
3099 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3100
3101         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3102         * NEWS: Mention new FreeBSD/arm native configuration.
3103         * configure.host: Add arm*-*-freebsd*.
3104         * configure.nat: Likewise.
3105         * arm-fbsd-nat.c: New file.
3106
3107 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3108
3109         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3110         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3111         * NEWS: Mention new FreeBSD/arm target.
3112         * configure.tgt: Add arm*-*-freebsd*.
3113         * arm-fbsd-tdep.c: New file.
3114         * arm-fbsd-tdep.h: New file.
3115
3116 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3117
3118         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3119         `gdbarch_elfcore_write_linux_prpsinfo'.
3120         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3121         method.
3122         (elf_internal_linux_prpsinfo): Remove declaration.
3123         * gdbarch.h: Regenerate.
3124         * gdbarch.c: Regenerate.
3125
3126 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3127
3128         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3129         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3130
3131 2017-10-11  Pedro Alves  <palves@redhat.com>
3132
3133         * breakpoint.c (reattach_breakpoints): Delete.
3134         * breakpoint.h (reattach_breakpoints): Delete.
3135
3136 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3137
3138         * symfile.c (registered_sym_fns): Make struct, not typedef.
3139         (DEF_VEC_O (registered_sym_fns)): Remove.
3140         (symtab_fns): Change type to std::vector.
3141         (add_symtab_fns): Adjust.
3142         (find_sym_fns): Adjust.
3143
3144 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3145
3146         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3147         * arc-tdep.h (arc_arch_is_em): New function.
3148         (arc_arch_is_hs): Likewise.
3149
3150 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3151
3152         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3153         parentheses in the declaration.
3154         (macro_lookup_inclusion): Likewise.
3155         (macro_lookup_definition): Likewise.
3156         * p-lang.h (pascal_builtin_types): Likewise.
3157         * tui/tui-data.c (tui_win_list): Likewise.
3158         * tui/tui-data.h (tui_win_list): Likewise.
3159         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3160
3161 2017-10-11  Mark Rages  <markrages@gmail.com>
3162
3163         * target-memory.c (block_boundaries): Fix for block address not
3164         aligned on block size.
3165
3166 2017-10-10  Pedro Alves <palves@redhat.com>
3167             Tom Tromey  <tom@tromey.com>
3168
3169         * breakpoint.c (struct captured_breakpoint_query_args)
3170         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3171         (print_breakpoint): New.
3172         * breakpoint.h (print_breakpoint): Declare.
3173         * common/common-exceptions.h (enum return_reason): Remove
3174         references to catch_exceptions.
3175         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3176         Delete.
3177         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3178         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3179         * gdb.h: Delete.
3180         * gdbthread.h (thread_select): Declare.
3181         * mi/mi-cmd-break.c: Don't include gdb.h.
3182         (breakpoint_notify): Use print_breakpoint.
3183         * mi/mi-cmd-catch.c: Don't include gdb.h.
3184         * mi/mi-interp.c: Don't include gdb.h.
3185         (mi_print_breakpoint_for_event): New.
3186         (mi_breakpoint_created, mi_breakpoint_modified): Use
3187         mi_print_breakpoint_for_event.
3188         * mi/mi-main.c: Don't include gdb.h.
3189         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3190         thread_select instead of gdb_thread_select.
3191         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3192         of using gdb_list_thread_ids.
3193         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3194         FILEIO_ENOSYS here.
3195         (remote_fileio_request): Use TRY/CATCH instead of
3196         catch_exceptions.
3197         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3198         (symbol_file_add_from_memory_wrapper): Delete.
3199         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3200         * thread.c: Don't include gdb.h.
3201         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3202         (thread_alive): Use thread_select.
3203         (do_captured_thread_select): Delete, parts salvaged as ...
3204         (thread_select): ... this new function.
3205         (gdb_thread_select): Delete.
3206
3207 2017-10-10  Pedro Alves  <palves@redhat.com>
3208             Tom Tromey  <tom@tromey.com>
3209
3210         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3211         and reverse logic.
3212         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3213         No longer macros.  Instead ...
3214         (enum wp_check_result): They're now values of this new
3215         enumeration.
3216         (watchpoint_check): Change return type to wp_check_result and
3217         parameter type to bpstat.
3218         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3219         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3220         catch_errors.  Reverse logic of watchpoint_check call.
3221         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3222         pointer as parameter.
3223         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3224         * common/common-exceptions.c (throw_exception_sjlj): Update
3225         comments to avoid mentioning catch_errors.
3226         * exceptions.c (catch_errors): Delete.
3227         * exceptions.h: Update comments to avoid mentioning catch_errors.
3228         (catch_errors_ftype, catch_errors): Delete.
3229         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3230         (hook_stop_stub): Delete.
3231         (restore_selected_frame): Change return type to void, and
3232         parameter type to const frame_id &.
3233         (restore_infcall_control_state): Use TRY/CATCH instead of
3234         catch_errors.
3235         * main.c (captured_command_loop): Return void and remove
3236         parameter.  Remove references to catch_errors.
3237         (captured_main): Use TRY/CATCH instead of catch_errors.
3238         * objc-lang.c (objc_submethod_helper_data)
3239         (find_objc_msgcall_submethod_helper): Delete.
3240         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3241         catch_errors.
3242         * record-full.c (record_full_message): Return void.
3243         (record_full_message_args, record_full_message_wrapper): Delete.
3244         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3245         instead of catch_errors.
3246         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3247         parameter type to int.
3248         * solib-darwin.c (open_symbol_file_object): Ditto.
3249         * solib-dsbt.c (open_symbol_file_object): Ditto.
3250         * solib-frv.c (open_symbol_file_object): Ditto.
3251         * solib-svr4.c (open_symbol_file_object): Ditto.
3252         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3253         * solib.c (update_solib_list): Use TRY/CATCH instead of
3254         catch_errors.
3255         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3256         Change type.
3257         * symmisc.c (struct print_symbol_args): Remove.
3258         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3259         (print_symbol): Change type.
3260         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3261         and remove parameters.
3262         (catch_errors): New.
3263         (get_windows_debug_event): Adjust.
3264
3265 2017-10-09  Tom Tromey  <tom@tromey.com>
3266
3267         * mi/mi-main.c (free_splay_tree): Remove.
3268         (list_available_thread_groups): Use splay_tree_up.
3269         * common/gdb_splay_tree.h: New file.
3270
3271 2017-10-09  Tom Tromey  <tom@tromey.com>
3272
3273         * mi/mi-main.c (do_nothing): Remove.
3274         (list_available_thread_groups): Update.
3275
3276 2017-10-09  Pedro Alves  <palves@redhat.com>
3277
3278         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3279         reading registers when switching context.
3280
3281 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3282
3283         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3284         (fbsd_convert_siginfo): Likewise.
3285         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3286
3287 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3288
3289         * configure.ac (try_guile_versions): Remove guile-2.2.
3290         * configure: Regenerate.
3291
3292 2017-10-09  Tom Tromey  <tom@tromey.com>
3293
3294         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3295         (COMPILE.pre): Use $(CXX).
3296
3297 2017-10-09  Pedro Alves  <palves@redhat.com>
3298
3299         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3300         Use bool.
3301         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3302         * cp-support.h (cp_remove_params): Now returns a
3303         gdb::unique_xmalloc_ptr.
3304         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3305         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3306         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3307         returning a gdb::unique_xmalloc_ptr.
3308         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3309         * stack.c (find_frame_funname): Adjust to cp_remove_params
3310         returning a gdb::unique_xmalloc_ptr.
3311
3312 2017-10-08  Tom Tromey  <tom@tromey.com>
3313
3314         * dwarf2read.c (dwarf2_get_dwz_file): Use
3315         gdb::unique_xmalloc_ptr.
3316         (find_slot_in_mapped_hash): Likewise.
3317         (dwarf2_physname): Likewise.
3318         (create_dwo_unit_in_dwp_v1): Use std::string.
3319         (create_dwo_unit_in_dwp_v2): Likewise.
3320         (lookup_dwo_cutu): Likewise.
3321         (inherit_abstract_dies): Use std::vector.
3322         (read_array_type): Likewise.
3323         (dwarf_decode_macros): Remove unused declaration.
3324         (unsigned_int_compar): Remove.
3325         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3326         (psymtabs_addrmap_cleanup): Remove.
3327
3328 2017-10-08  Tom Tromey  <tom@tromey.com>
3329
3330         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3331         * frame.h (frame_cleanup_after_sniffer): Declare.
3332         (frame_prepare_for_sniffer): Return void.
3333         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3334         type of argument.
3335         (frame_prepare_for_sniffer): Return void.
3336
3337 2017-10-08  Tom Tromey  <tom@tromey.com>
3338
3339         * utils.h (make_cleanup_value_free): Remove.
3340         * utils.c (do_value_free, struct cleanup): Remove.
3341         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3342         Use gdb_value_up.
3343         * value.h (struct value_deleter): New.
3344         (gdb_value_up): New typedef.
3345
3346 2017-10-08  Tom Tromey  <tom@tromey.com>
3347
3348         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3349         (make_cleanup_free_search_symbols): Remove.
3350         (search_symbols): Return std::vector.
3351         (symbol_search::compare_search_syms): Now member of
3352         symbol_search.  Change arguments.
3353         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3354         (symtab_symbol_info, rbreak_command): Update.
3355         * symtab.h (struct symbol_search) <next>: Remove.
3356         Add constructors.
3357         (symbol_search::operator<): New function.
3358         (symbol_search::operator==): New function.
3359         (search_symbols): Remove std::vector.
3360         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3361         (symbol_search::compare_search_syms): Declare.
3362
3363 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3364
3365         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3366         arch/aarch64-insn.o.
3367         Remove one rule.
3368         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3369
3370 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3371
3372         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3373         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3374         arch/arm-linux.o respectively.
3375         * configure.tgt: Likewise.
3376
3377 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3378
3379         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3380         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3381
3382 2017-10-06  Pedro Alves  <palves@redhat.com>
3383
3384         * windows-nat.c: Include <algorithm>.
3385
3386 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3387
3388         * configure.tgt (i386_tobjs): New variable.
3389         (amd64_tobjs): New variable.
3390         Set $cpu_obs and $os_obs.
3391
3392 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3393
3394         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3395         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3396         (clean): Remove object files and dependency files.
3397         (distclean): Remove the directory.
3398         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3399         * configure: Re-generated.
3400         * configure.tgt: Replace amd64.o with arch/amd64.o.
3401
3402 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3403
3404         PR build/22188
3405         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3406         and SETEND.
3407
3408 2017-10-05  Pedro Alves  <palves@redhat.com>
3409
3410         * linux-nat.c (linux_child_follow_fork): When following the parent
3411         and detaching the child, consult the parent thread's architecture
3412         instead of the child's.
3413
3414 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3415
3416         * ax.h: Do not include "doublest.h".
3417         (union agent_val): Remove.
3418
3419 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3420
3421         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3422         (decimal_to_string): Return std::string object.
3423         (decimal_from_string): Accept std::string object.  Return bool.
3424         (decimal_from_integral, decimal_from_doublest): Remove.
3425         (decimal_from_longest): Add prototype.
3426         (decimal_from_ulongest): Likewise.
3427         (decimal_to_longest): Likewise.
3428         (decimal_from_doublest): Likewise.
3429         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3430         (MAX_DECIMAL_STRING): Move here.
3431         (decimal_to_string): Return std::string object.
3432         (decimal_from_string): Accept std::string object.  Return bool.
3433         (decimal_from_integral): Remove, replace by ...
3434         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3435         (decimal_to_longest): New function.
3436         (decimal_from_floating): Remove, replace by ...
3437         (decimal_from_doublest): ... this new function.
3438         (decimal_to_doublest): Update to new decimal_to_string interface.
3439
3440         * value.c (unpack_long): Use decimal_to_longest.
3441         * valops.c (value_cast): Use decimal_from_doublest instead of
3442         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3443         decimal_from_integral.
3444         * valarith.c (value_args_as_decimal): Likewise.
3445         * valprint.c (print_decimal_floating): Update to new
3446         decimal_to_string interface.
3447         * printcmd.c (printf_decfloat): Likewise.
3448         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3449
3450 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3451
3452         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3453         * gdbtypes.c: Include "floatformat.h".
3454         * value.c: Likewise.
3455         * m68k-tdep.c: Likewise.
3456
3457         * findvar.c: Do not include "floatformat.h".
3458         * amd64-darwin-tdep.c: Likewise.
3459         * arm-linux-tdep.c: Likewise.
3460         * i386-darwin-tdep.c: Likewise.
3461         * i387-tdep.c: Likewise.
3462         * m68k-linux-tdep.c: Likewise.
3463         * mep-tdep.c: Likewise.
3464         * mips-tdep.c: Likewise.
3465         * nios2-tdep.c: Likewise.
3466         * s390-linux-tdep.c: Likewise.
3467         * sparc-obsd-tdep.c: Likewise.
3468         * sparc-tdep.c: Likewise.
3469         * sparc64-tdep.c: Likewise.
3470         * spu-tdep.c: Likewise.
3471         * tic6x-tdep.c: Likewise.
3472         * tilegx-tdep.c: Likewise.
3473         * vax-tdep.c: Likewise.
3474         * xstormy16-tdep.c: Likewise.
3475         * xtensa-tdep.c: Likewise.
3476
3477         * top.c: Do not include "doublest.h".
3478         * aarch64-tdep.c: Likewise.
3479         * alpha-tdep.c: Likewise.
3480         * arm-linux-tdep.c: Likewise.
3481         * m68k-linux-tdep.c: Likewise.
3482         * tilegx-tdep.c: Likewise.
3483         * xstormy16-tdep.c: Likewise.
3484
3485 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3486
3487         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3488         (mipsn32_fbsd_sigframe): Define.
3489         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3490         for FreeBSD/mipsn32.
3491
3492 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3493
3494         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3495         AT_HWCAP.
3496
3497 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3498
3499         * MAINTAINERS (Misc): Update my email address.
3500
3501 2017-10-04  Pedro Alves  <palves@redhat.com>
3502
3503         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3504         it instead of target_gdbarch.
3505         (get_remote_state, get_remote_packet_size): Adjust
3506         get_remote_arch_state calls, passing down target_gdbarch
3507         explicitly.
3508         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3509         'gdbarch' and use it instead of target_gdbarch.
3510         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3511         passing down target_gdbarch explicitly.
3512         (struct stop_reply) <arch>: New field.
3513         (remote_parse_stop_reply): Use the stopped thread's architecture,
3514         not the current inferior's.  Save the architecture in the
3515         stop_reply.
3516         (process_stop_reply): Use the stop reply's architecture.
3517         (process_g_packet, remote_fetch_registers)
3518         (remote_prepare_to_store, store_registers_using_G)
3519         (remote_store_registers): Adjust get_remote_arch_state calls,
3520         using the regcache's architecture.
3521         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3522         passing down target_gdbarch explicitly.
3523         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3524         beneath instead of calling target_gdbarch.
3525         * target.c (default_thread_architecture): Use the specified
3526         inferior's architecture, instead of the current inferior's
3527         architecture (via target_gdbarch).
3528
3529 2017-10-04  Pedro Alves  <palves@redhat.com>
3530
3531         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3532         case.
3533         (regcache_print): Handle !target_has_registers here instead.
3534
3535 2017-10-04  Pedro Alves  <palves@redhat.com>
3536
3537         * frame.c (create_test_frame): Delete.
3538         * frame.h (create_test_frame): Delete.
3539         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3540         (class regcache_test): Delete.
3541         (test_target_has_registers, test_target_has_stack)
3542         (test_target_has_memory, test_target_prepare_to_store)
3543         (test_target_store_registers): New functions.
3544         (test_target_ops): New class.
3545         (register_to_value_test): Error out if there's already a
3546         process_stratum (or higher) target pushed.  Create a fuller mock
3547         environment, with mock target_ops, inferior, address space, thread
3548         and inferior_ptid.
3549         * progspace.c (struct address_space): Move to ...
3550         * progspace.h (struct address_space): ... here.
3551         * regcache.h (regcache::~regcache, regcache::raw_write)
3552         [GDB_SELF_TEST]: No longer virtual.
3553
3554 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3555
3556         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3557
3558 2017-10-04  Pedro Alves  <palves@redhat.com>
3559
3560         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3561         out of 'between TRY and CATCH'.
3562
3563 2017-10-04  Pedro Alves  <palves@redhat.com>
3564
3565         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3566         * common/common-exceptions.h (TRY): Open an outermost scope.
3567         Expand intro comment.
3568         (CATCH): Reindent.
3569         (END_CATCH): Close the outermost scope.
3570         * completer.c (complete_line_internal): Add missing END_CATCH.
3571
3572 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3573
3574         * NEWS (Changes since GDB 8.0): Add entry about new
3575         'set-cwd-on-gdbserver' feature.
3576         (New remote packets): Add entry for QSetWorkingDir.
3577         * common/common-inferior.h (set_inferior_cwd): New prototype.
3578         * infcmd.c (set_inferior_cwd): Remove "static".
3579         (show_cwd_command): Expand text to include remote debugging.
3580         * remote.c: Add PACKET_QSetWorkingDir.
3581         (remote_protocol_features) <QSetWorkingDir>: New entry for
3582         PACKET_QSetWorkingDir.
3583         (extended_remote_set_inferior_cwd): New function.
3584         (extended_remote_create_inferior): Call
3585         "extended_remote_set_inferior_cwd".
3586         (_initialize_remote): Call "add_packet_config_cmd" for
3587         QSetWorkingDir.
3588
3589 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3590
3591         * NEWS (New commands): Mention "set/show cwd".
3592         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3593         "cd" command's help text.
3594         * common/common-inferior.h (get_inferior_cwd): New prototype.
3595         * infcmd.c (inferior_cwd_scratch): New global variable.
3596         (set_inferior_cwd): New function.
3597         (get_inferior_cwd): Likewise.
3598         (set_cwd_command): Likewise.
3599         (show_cwd_command): Likewise.
3600         (_initialize_infcmd): Add "set/show cwd" commands.
3601         * inferior.h (class inferior) <cwd>: New field.
3602         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3603         (fork_inferior): Change inferior's cwd before its execution.
3604         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3605         to CreateProcess.
3606
3607 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3608
3609         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3610         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3611         (COMMON_OBS): Add gdb_tilde_expand.o.
3612         * common/gdb_tilde_expand.c: New file.
3613         * common/gdb_tilde_expand.h: Likewise.
3614
3615 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3616
3617         * gdbarch.sh (objfile): Remove duplicate declaration.
3618         * gdbarch.h: Regenerate.
3619
3620 2017-10-03  Tom Tromey  <tom@tromey.com>
3621
3622         * utils.c (internal_vproblem): Use string_vprintf.
3623
3624 2017-10-03  Tom Tromey  <tom@tromey.com>
3625
3626         * printcmd.c (info_symbol_command): Use std::string.
3627
3628 2017-10-03  Tom Tromey  <tom@tromey.com>
3629
3630         * top.c (gdb_safe_append_history): Use std::string.
3631
3632 2017-10-03  Tom Tromey  <tom@tromey.com>
3633
3634         * event-top.c (stdin_event_handler): Update.
3635         * main.c (captured_main_1): Update.
3636         * top.h (make_delete_ui_cleanup): Remove.
3637         (struct ui): Add constructor and destructor.
3638         (new_ui, delete_ui): Remove.
3639         * top.c (make_delete_ui_cleanup): Remove.
3640         (new_ui_command): Use std::unique_ptr.
3641         (delete_ui_cleanup): Remove.
3642         (ui::ui): Rename from new_ui.  Update.
3643         (free_ui): Remove.
3644         (ui::~ui): Rename from delete_ui.  Update.
3645
3646 2017-10-03  Tom Tromey  <tom@tromey.com>
3647
3648         * symfile.c (load_progress): Use gdb::byte_vector.
3649
3650 2017-10-03  Tom Tromey  <tom@tromey.com>
3651
3652         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3653         declaration.
3654         * printcmd.c (x_command): Remove unused declaration.
3655         * symfile.c (symbol_file_command): Remove unused declaration.
3656
3657 2017-10-03  Tom Tromey  <tom@tromey.com>
3658
3659         * utils.c (internal_vproblem): Use std::string.
3660         (defaulted_query): Likewise.
3661
3662 2017-10-03  Tom Tromey  <tom@tromey.com>
3663
3664         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3665         * top.c (execute_command_to_string): Update.
3666         * utils.c (make_cleanup_restore_page_info): Remove.
3667         (do_restore_page_info_cleanup): Remove.
3668         (set_batch_flag_and_restore_page_info):
3669         New.
3670         (make_cleanup_restore_page_info): Remove.
3671         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3672         (~set_batch_flag_and_restore_page_info): New
3673         (make_cleanup_restore_uinteger): Remove.
3674         (make_cleanup_restore_integer): Remove.
3675         (struct restore_integer_closure): Remove.
3676         (restore_integer): Remove.
3677         * utils.h (struct set_batch_flag_and_restore_page_info): New
3678         class.
3679         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3680         (make_cleanup_restore_page_info): Remove.
3681         (make_cleanup_restore_uinteger) Remove.
3682         (make_cleanup_restore_integer) Remove.
3683
3684 2017-10-03  Tom Tromey  <tom@tromey.com>
3685
3686         * record-full.h (record_full_gdb_operation_disable_set): Return
3687         scoped_restore_tmpl<int>.
3688         * infrun.c (adjust_pc_after_break): Update.
3689         (handle_signal_stop): Update.
3690         * record-full.c (record_full_gdb_operation_disable_set): Return
3691         scoped_restore_tmpl<int>.
3692         (record_full_wait_1, record_full_insert_breakpoint)
3693         (record_full_remove_breakpoint, record_full_save)
3694         (record_full_goto_insn): Update.
3695
3696 2017-10-02  Tom Tromey  <tom@tromey.com>
3697
3698         PR rust/22236:
3699         * rust-lang.c (rust_val_print_str): New function.
3700         (val_print_struct): Call it.
3701         (rust_subscript): Preserve name of slice type.
3702
3703 2017-10-02  Tom Tromey  <tom@tromey.com>
3704
3705         * rust-lang.c (rust_subscript): Handle slices in
3706         EVAL_AVOID_SIDE_EFFECTS case.
3707
3708 2017-10-02  Tom Tromey  <tom@tromey.com>
3709
3710         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3711
3712 2017-10-02  Tom Tromey  <tom@tromey.com>
3713
3714         * rust-lang.h (rust_slice_type): Add "extern".
3715
3716 2017-10-02  Tom Tromey  <tom@tromey.com>
3717             Pedro Alves  <palves@redhat.com>
3718
3719         * ada-lang.h (ada_exc_info::operator<): Make const.
3720         (ada_exc_info::operator==): Make const.
3721         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3722         Make const.
3723
3724 2017-09-29  Tom Tromey  <tom@tromey.com>
3725
3726         * target.c (read_whatever_is_readable): Change type of "result".
3727         Update.
3728         (free_memory_read_result_vector): Remove.
3729         (read_memory_robust): Change return type.  Update.
3730         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3731         bin2hex, std::string.
3732         * target.h (memory_read_result_s): Remove typedef.
3733         (free_memory_read_result_vector): Remove.
3734         (read_memory_robust): Return std::vector.
3735
3736 2017-09-29  Tom Tromey  <tom@tromey.com>
3737
3738         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3739
3740 2017-09-29  Tom Tromey  <tom@tromey.com>
3741
3742         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3743         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3744         operator< and operator==.
3745         (ada_exceptions_list): Return a std::vector.
3746         * ada-lang.c (ada_exc_info::operator<): Rename from
3747         compare_ada_exception_info.
3748         (ada_exc_info::operator==): New.
3749         (sort_remove_dups_ada_exceptions_list): Change type of
3750         "exceptions".
3751         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3752         (ada_add_global_exceptions): Likewise.
3753         (ada_exceptions_list_1): Return a std::vector.
3754         (ada_exceptions_list): Likewise.
3755
3756 2017-09-29  Tom Tromey  <tom@tromey.com>
3757
3758         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3759         'std::set *'.
3760         (print_one_inferior): Update.
3761         (free_vector_of_ints): Remove.
3762         (list_available_thread_groups): Change "ids" to std::set.
3763         (mi_cmd_list_thread_groups): Update.
3764         (struct collect_cores_data) <core>: Now a std::set.
3765         (collect_cores): Update.
3766         (unique): Remove.
3767         (print_one_inferior): Update.
3768
3769 2017-09-29  Tom Tromey  <tom@tromey.com>
3770
3771         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3772         (mi_execute_async_cli_command): Likewise.
3773         (mi_cmd_trace_frame_collected): Use field_fmt.
3774
3775 2017-09-29  Tom Tromey  <tom@tromey.com>
3776
3777         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3778         gdb::byte_vector.
3779
3780 2017-09-29  Tom Tromey  <tom@tromey.com>
3781
3782         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3783
3784 2017-09-29  Tom Tromey  <tom@tromey.com>
3785
3786         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3787
3788 2017-09-29  Tom Tromey  <tom@tromey.com>
3789
3790         * varobj.h (varobj_gen_name): Return std::string.
3791         * varobj.c (varobj_gen_name): Return std::string.
3792         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3793         (mi_cmd_var_delete): Don't copy "name".
3794
3795 2017-09-29  Tom Tromey  <tom@tromey.com>
3796
3797         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3798         (mi_cmd_break_insert_1): Update.
3799
3800 2017-09-29  Tom Tromey  <tom@tromey.com>
3801
3802         * target.h (make_scoped_defer_target_commit_resume): Update.
3803         * target.c (make_scoped_defer_target_commit_resume): Rename from
3804         make_cleanup_defer_target_commit_resume.  Return a
3805         scoped_restore.
3806         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3807
3808 2017-09-29  Tom Tromey  <tom@tromey.com>
3809
3810         * main.c (captured_main_1): Remove unused declaration.
3811         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3812
3813 2017-09-29  Tom Tromey  <tom@tromey.com>
3814
3815         * symtab.c (search_symbols): Remove unused outer cleanup.
3816         (make_source_files_completion_list): Remove unused declaration.
3817
3818 2017-09-29  Tom Tromey  <tom@tromey.com>
3819
3820         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3821
3822 2017-09-29  Tom Tromey  <tom@tromey.com>
3823
3824         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3825         gdb::byte_vector.
3826
3827 2017-09-29  Tom Tromey  <tom@tromey.com>
3828
3829         * complaints.c (vcomplaint): Use std::string.
3830
3831 2017-09-29  Tom Tromey  <tom@tromey.com>
3832
3833         * tracepoint.c (trace_variable_command): Use std::string.
3834         (encode_actions_1): Remove unused declarations.
3835         (create_tsv_from_upload): Use std::string.
3836
3837 2017-09-29  Tom Tromey  <tom@tromey.com>
3838
3839         * cp-support.c (gdb_demangle): Use std::string.
3840
3841 2017-09-29  Tom Tromey  <tom@tromey.com>
3842
3843         * stack.c (parse_frame_specification): Use std::string
3844         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3845
3846 2017-09-29  Tom Tromey  <tom@tromey.com>
3847
3848         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3849
3850 2017-09-29  Tom Tromey  <tom@tromey.com>
3851
3852         * utils.c (vfprintf_maybe_filtered): Use std::string.
3853         (vfprintf_unfiltered): Likewise.
3854
3855 2017-09-29  Tom Tromey  <tom@tromey.com>
3856
3857         * event-top.c (top_level_prompt): Return std::string.
3858         (display_gdb_prompt): Update.
3859
3860 2017-09-29  Tom Tromey  <tom@tromey.com>
3861
3862         * unittests/common-utils-selftests.c (format): New function.
3863         (string_vprintf_tests): New function.
3864         (_initialize_common_utils_selftests): Register new tests.
3865         * common/common-utils.c (string_vprintf): New function.
3866         * common/common-utils.h (string_vprintf): Declare.
3867
3868 2017-09-29  Pedro Alves  <palves@redhat.com>
3869
3870         * common/rsp-low.c (unpack_varlen_hex): Constify.
3871         * common/rsp-low.h (unpack_varlen_hex): Constify.
3872         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3873         Constify.
3874         * remote.c (remote_set_permissions, read_ptid)
3875         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3876         (remote_static_tracepoint_marker_at)
3877         (remote_static_tracepoint_markers_by_strid)
3878         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3879         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3880         (parse_tracepoint_definition, parse_tsv_definition)
3881         (parse_static_tracepoint_marker_definition): Constify.
3882         * tracepoint.h (parse_static_tracepoint_marker_definition)
3883         (parse_trace_status, parse_tracepoint_status)
3884         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3885
3886 2017-09-29  Pedro Alves  <palves@redhat.com>
3887
3888         * remote.c (target_buf, target_buf_size): Delete.
3889         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3890         Use the connection's packet buffer instead.
3891         All callers adjusted.
3892         (_initialize_remote): Remove references to target_buf and
3893         target_buf_size.
3894
3895 2017-09-28  Pedro Alves  <palves@redhat.com>
3896
3897         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3898         unittests/common-utils-selftests.c.
3899         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3900         (COMMON_OBS): Remove utils-selftests.o.
3901         * utils-selftests.c: Move to ...
3902         * unittests/common-utils-selftests.c: ... here and rename self
3903         test to "string_printf".
3904
3905 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3906
3907         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3908         having NULL cus or tus.
3909
3910 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3911
3912         * arm-tdep.c: (convert_from_extended): Remove.
3913         (convert_to_extended): Likewise.
3914         (arm_extract_return_value): Use convert_typed_floating.
3915         (arm_store_return_value): Likewise.
3916
3917         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3918         * sh-tdep.c: Do not include "floatformat.h".
3919         (sh_littlebyte_bigword_type): New function.
3920         (sh_register_convert_to_virtual): Use convert_typed_floating.
3921         (sh_register_convert_to_raw): Likewise.
3922         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3923         (sh64_littlebyte_bigword_type): New function.
3924         (sh64_extract_return_value): Use convert_typed_floating.
3925         (sh64_register_convert_to_virtual): Likewise.
3926         (sh64_register_convert_to_raw): Likewise.
3927
3928 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3929
3930         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3931         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3932
3933         * gdbtypes.h (union type_specific): Make field floatformat hold
3934         just a single struct floatformat, not an array.
3935         (floatformat_from_type): Move here.
3936         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3937         changed TYPE_FLOATFORMAT definition.
3938         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3939         (recursive_dump_type): Likewise.
3940         (init_float_type): Install correct floatformat for byte order.
3941         (arch_float_type): Likewise.
3942
3943 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3944
3945         * gdbtypes.c (init_type): Change incoming argument from
3946         length-in-bytes to length-in-bits.  Assert length is a
3947         multiple of TARGET_CHAR_BITS.
3948         (arch_type, arch_flags_type): Likewise.
3949         (init_integer_type): Update call to init_type.
3950         (init_character_type): Likewise.
3951         (init_boolean_type): Likewise.
3952         (init_float_type): Likewise.
3953         (init_decfloat_type): Likewise.
3954         (init_complex_type): Likewise.
3955         (init_pointer_type): Likewise.
3956         (objfile_type): Likewise.
3957         (arch_integer_type): Update call to arch_type.
3958         (arch_character_type): Likewise.
3959         (arch_boolean_type): Likewise.
3960         (arch_float_type): Likewise.
3961         (arch_decfloat_type): Likewise.
3962         (arch_complex_type): Likewise.
3963         (arch_pointer_type): Likewise.
3964         (gdbtypes_post_init): Likewise.
3965
3966         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3967         (read_base_type): Likewise.
3968         * mdebugread.c (basic_type): Likewise.
3969         * stabsread.c (dbx_init_float_type): Likewise.
3970         (rs6000_builtin_type): Likewise.
3971         (read_range_type): Likewise.  Also, fix call to init_integer_type
3972         with erroneous length argument.
3973
3974         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3975         * d-lang.c (build_d_types): Likewise.
3976         * f-lang.c (build_fortran_types): Likewise.
3977         * go-lang.c (build_go_types): Likewise.
3978         * opencl-lang.c (build_opencl_types): Likewise.
3979         * jit.c (finalize_symtab): Likewise.
3980         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3981         (build_std_type_info_type): Likewise.
3982         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3983         update call to arch_flags_type.
3984
3985         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3986         arch_type.
3987         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3988         * windows-tdep.c (windows_get_tlb_type): Likewise.
3989
3990         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3991         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3992         * m32c-tdep.c (make_types): Likewise.
3993         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3994         (rl78_psw_type): Update call to arch_flags_type.
3995         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3996         * rx-tdep.c (rx_psw_type): Likewise.
3997         (rx_fpsw_type): Likewise.
3998         * sparc-tdep.c (sparc_psr_type): Likewise.
3999         (sparc_fsr_type): Likewise.
4000         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4001         (sparc64_ccr_type): Likewise.
4002         (sparc64_fsr_type): Likewise.
4003         (sparc64_fprs_type): Likewise.
4004
4005 2017-09-27  Tom Tromey  <tom@tromey.com>
4006
4007         * findcmd.c (find_command): Constify.
4008
4009 2017-09-27  Tom Tromey  <tom@tromey.com>
4010
4011         * ada-tasks.c (task_command_1, task_command): Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * symtab.c (maintenance_print_symbol_cache)
4016         (maintenance_flush_symbol_cache)
4017         (maintenance_print_symbol_cache_statistics): Constify.
4018
4019 2017-09-27  Tom Tromey  <tom@tromey.com>
4020
4021         * inferior.c (detach_inferior_command, kill_inferior_command)
4022         (inferior_command): Constify.
4023
4024 2017-09-27  Tom Tromey  <tom@tromey.com>
4025
4026         * regcache.c (regcache_print, maintenance_print_registers)
4027         (maintenance_print_raw_registers)
4028         (maintenance_print_cooked_registers)
4029         (maintenance_print_register_groups)
4030         (maintenance_print_remote_registers): Constify.
4031
4032 2017-09-27  Tom Tromey  <tom@tromey.com>
4033
4034         * printcmd.c (map_display_numbers, undisplay_command)
4035         (enable_disable_display_command, enable_display_command)
4036         (disable_display_command): Constify.
4037
4038 2017-09-27  Tom Tromey  <tom@tromey.com>
4039
4040         * breakpoint.h (delete_command): Don't declare.
4041         * breakpoint.c (delete_command, enable_once_command)
4042         (enable_count_command, enable_delete_command, breakpoint_1)
4043         (maintenance_info_breakpoints, stopin_command, stopat_command)
4044         (delete_command, delete_trace_command, save_breakpoints)
4045         (save_breakpoints_command, save_tracepoints_command): Constify.
4046
4047 2017-09-27  Tom Tromey  <tom@tromey.com>
4048
4049         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4050         (skip_ws, extract_identifier, macro_define_command)
4051         (macro_undef_command, macro_list_command): Constify.
4052
4053 2017-09-27  Tom Tromey  <tom@tromey.com>
4054
4055         * infcmd.c (environment_info, set_environment_command)
4056         (unset_environment_command, path_info, info_proc_cmd_1)
4057         (info_proc_cmd_mappings, info_proc_cmd_stat)
4058         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4059         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4060
4061 2017-09-27  Tom Tromey  <tom@tromey.com>
4062
4063         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4064         Constify.
4065
4066 2017-09-27  Tom Tromey  <tom@tromey.com>
4067
4068         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4069
4070 2017-09-27  Tom Tromey  <tom@tromey.com>
4071
4072         * demangle.c (demangle_command): Constify.
4073
4074 2017-09-27  Tom Tromey  <tom@tromey.com>
4075
4076         * progspace.c (maintenance_info_program_spaces_command):
4077         Constify.
4078
4079 2017-09-27  Tom Tromey  <tom@tromey.com>
4080
4081         * compile/compile.c (check_raw_argument, compile_file_command)
4082         (compile_code_command, compile_print_command): Constify.
4083
4084 2017-09-27  Tom Tromey  <tom@tromey.com>
4085
4086         * reggroups.c (maintenance_print_reggroups): Constify.
4087
4088 2017-09-27  Tom Tromey  <tom@tromey.com>
4089
4090         * dwarf2read.c (save_gdb_index_command): Constify.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * stap-probe.c (info_probes_stap_command): Constify.
4095
4096 2017-09-27  Tom Tromey  <tom@tromey.com>
4097
4098         * fork-child.c (unset_exec_wrapper_command): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * btrace.c (get_uint, get_context_size, no_chunk)
4103         (maint_btrace_packet_history_cmd)
4104         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4105         (maint_info_btrace_cmd): Constify.
4106
4107 2017-09-27  Tom Tromey  <tom@tromey.com>
4108
4109         * reverse.c (delete_bookmark_command): Constify.
4110
4111 2017-09-27  Tom Tromey  <tom@tromey.com>
4112
4113         * remote.c (set_memory_packet_size)
4114         (set_memory_write_packet_size, show_memory_write_packet_size)
4115         (set_memory_read_packet_size, show_memory_read_packet_size)
4116         (compare_sections_command, packet_command, remote_put_command)
4117         (remote_get_command, remote_delete_command): Constify.
4118
4119 2017-09-27  Tom Tromey  <tom@tromey.com>
4120
4121         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4122         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4123         (set_mipsfpu_auto_command): Constify.
4124
4125 2017-09-27  Tom Tromey  <tom@tromey.com>
4126
4127         * cli/cli-cmds.h (cd_command): Constify.
4128         * cli/cli-cmds.c (cd_command): Constify.
4129
4130 2017-09-27  Tom Tromey  <tom@tromey.com>
4131
4132         * thread.c (thread_name_command, thread_find_command): Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * probe.c (enable_probes_command, disable_probes_command):
4137         Constify.
4138
4139 2017-09-27  Tom Tromey  <tom@tromey.com>
4140
4141         * symfile.c (symbol_file_command): Constify.
4142         * gdbcore.h (deprecated_file_changed_hook): Constify.
4143         * exec.c (deprecated_file_changed_hook, exec_file_command)
4144         (file_command): Constify.
4145         * defs.h (symbol_file_command): Constify.
4146
4147 2017-09-27  Tom Tromey  <tom@tromey.com>
4148
4149         * remote-fileio.c (set_system_call_allowed)
4150         (show_system_call_allowed): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * tracepoint.c (delete_trace_variable_command)
4155         (tfind_end_command, tfind_start_command, tfind_pc_command)
4156         (tfind_tracepoint_command, tfind_line_command)
4157         (tfind_range_command, tfind_outside_command): Constify.
4158
4159 2017-09-27  Tom Tromey  <tom@tromey.com>
4160
4161         * ax-gdb.c (maint_agent_printf_command, agent_command)
4162         (agent_eval_command): Constify.
4163
4164 2017-09-27  Tom Tromey  <tom@tromey.com>
4165
4166         * tracepoint.c (info_scope_command): Constify.
4167         * python/python.c (gdbpy_decode_line): Constify.
4168         * python/py-breakpoint.c (bppy_init): Constify.
4169         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4170         * location.h: (new_linespec_location)
4171         (string_to_event_location_basic, string_to_event_location):
4172         Constify.
4173         * location.c (new_linespec_location)
4174         (string_to_event_location_basic, string_to_event_location):
4175         Constify.
4176         * linespec.h (decode_line_with_current_source)
4177         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4178         * linespec.c (linespec_lex_to_end)
4179         (decode_line_with_current_source)
4180         (decode_line_with_last_displayed): Constify.
4181         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4182         Constify.
4183         * cli/cli-cmds.c (edit_command, list_command): Constify.
4184         * breakpoint.h (until_break_command, watch_command_wrapper)
4185         (awatch_command_wrapper, rwatch_command_wrapper)
4186         (init_ada_exception_breakpoint): Constify.
4187         * breakpoint.c (break_command_1, dprintf_command)
4188         (break_range_command, watch_command_wrapper)
4189         (rwatch_command_wrapper, awatch_command_wrapper)
4190         (until_break_command, init_ada_exception_breakpoint)
4191         (strace_marker_create_sals_from_location, trace_command)
4192         (ftrace_command, strace_command, struct tracepoint): Constify.
4193         * ax-gdb.c (agent_command_1): Constify.
4194         * ada-lang.c (ada_exception_sal): Constify.
4195
4196 2017-09-27  Tom Tromey  <tom@tromey.com>
4197
4198         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4199         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4200         (get_context_size, no_chunk, get_insn_history_modifiers)
4201         (cmd_record_insn_history, get_call_history_modifiers)
4202         (cmd_record_call_history): Constify.
4203
4204 2017-09-27  Tom Tromey  <tom@tromey.com>
4205
4206         * source.c (show_substitute_path_command)
4207         (unset_substitute_path_command, set_substitute_path_command):
4208         Constify.
4209
4210 2017-09-27  Tom Tromey  <tom@tromey.com>
4211
4212         * typeprint.c (maintenance_print_type): Constify.
4213         * maint.c (maintenance_dump_me, maintenance_demangle)
4214         (maintenance_time_display, maintenance_info_sections)
4215         (maintenance_print_statistics, maintenance_deprecate)
4216         (maintenance_undeprecate): Constify.
4217         (maintenance_do_deprecate): Constify.  Use std::string.
4218         (maintenance_selftest): Constify.
4219         * gdbtypes.h (maintenance_print_type): Constify.
4220
4221 2017-09-27  Tom Tromey  <tom@tromey.com>
4222
4223         * hppa-tdep.c (unwind_command): Constify.
4224
4225 2017-09-27  Tom Tromey  <tom@tromey.com>
4226
4227         * target-descriptions.c (unset_tdesc_filename_cmd)
4228         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4229         Constify.
4230
4231 2017-09-27  Tom Tromey  <tom@tromey.com>
4232
4233         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4238
4239 2017-09-27  Tom Tromey  <tom@tromey.com>
4240
4241         * tui/tui-regs.c (tui_reg_command): Constify.
4242
4243 2017-09-27  Tom Tromey  <tom@tromey.com>
4244
4245         * skip.c (skip_file_command, skip_function_command)
4246         (skip_enable_command, skip_disable_command, skip_delete_command):
4247         Constify.
4248
4249 2017-09-27  Tom Tromey  <tom@tromey.com>
4250
4251         * record-btrace.c (cmd_record_btrace_bts_start)
4252         (cmd_record_btrace_pt_start): Constify.
4253
4254 2017-09-27  Tom Tromey  <tom@tromey.com>
4255
4256         * symmisc.c (maintenance_print_symbols)
4257         (maintenance_print_msymbols, maintenance_print_objfiles)
4258         (maintenance_info_symtabs, maintenance_check_symtabs)
4259         (maintenance_expand_symtabs, maintenance_info_line_tables):
4260         Constify.
4261
4262 2017-09-27  Tom Tromey  <tom@tromey.com>
4263
4264         * top.c (new_ui_command): Constify.
4265
4266 2017-09-27  Tom Tromey  <tom@tromey.com>
4267
4268         * symfile.c (add_symbol_file_command)
4269         (remove_symbol_file_command, list_overlays_command)
4270         (map_overlay_command, unmap_overlay_command)
4271         (overlay_auto_command, overlay_manual_command)
4272         (overlay_off_command, overlay_load_command): Constify.
4273
4274 2017-09-27  Tom Tromey  <tom@tromey.com>
4275
4276         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4277         (info_spu_mailbox_command, info_spu_dma_command)
4278         (info_spu_proxydma_command): Constify.
4279
4280 2017-09-27  Tom Tromey  <tom@tromey.com>
4281
4282         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4283
4284 2017-09-27  Tom Tromey  <tom@tromey.com>
4285
4286         * cli/cli-script.c (user_defined_command): Constify.
4287
4288 2017-09-27  Tom Tromey  <tom@tromey.com>
4289
4290         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4291         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4292         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4293         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4294         (dump_binary_value, append_binary_memory, append_binary_value):
4295         Constify.
4296         (struct dump_context) <func>: Constify.
4297         (add_dump_command): Update.
4298
4299 2017-09-27  Tom Tromey  <tom@tromey.com>
4300
4301         * cli/cli-cmds.c (show_version, show_configuration)
4302         (source_command, show_user): Constify.
4303
4304 2017-09-27  Tom Tromey  <tom@tromey.com>
4305
4306         * target.c (maintenance_print_target_stack): Constify.
4307
4308 2017-09-27  Tom Tromey  <tom@tromey.com>
4309
4310         * interps.c (interpreter_exec_cmd): Constify.
4311
4312 2017-09-27  Tom Tromey  <tom@tromey.com>
4313
4314         * record-full.c (cmd_record_full_restore): Constify.
4315
4316 2017-09-27  Tom Tromey  <tom@tromey.com>
4317
4318         * memattr.c (enable_mem_command, disable_mem_command)
4319         (delete_mem_command): Constify.
4320
4321 2017-09-27  Tom Tromey  <tom@tromey.com>
4322
4323         * value.c (show_convenience): Constify.
4324
4325 2017-09-27  Tom Tromey  <tom@tromey.com>
4326
4327         * gdbcore.h (core_file_command): Update.
4328         * corefile.c (core_file_command): Constify.
4329
4330 2017-09-27  Tom Tromey  <tom@tromey.com>
4331
4332         * user-regs.c (maintenance_print_user_registers): Constify.
4333
4334 2017-09-27  Tom Tromey  <tom@tromey.com>
4335
4336         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4337
4338 2017-09-27  Tom Tromey  <tom@tromey.com>
4339
4340         * cp-support.c (first_component_command): Constify.
4341
4342 2017-09-27  Tom Tromey  <tom@tromey.com>
4343
4344         * psymtab.c (maintenance_print_psymbols)
4345         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4346         Constify.
4347
4348 2017-09-27  Tom Tromey  <tom@tromey.com>
4349
4350         * windows-tdep.c (display_tib): Constify.
4351
4352 2017-09-27  Tom Tromey  <tom@tromey.com>
4353
4354         * linux-fork.c (delete_checkpoint_command)
4355         (detach_checkpoint_command): Constify.
4356
4357 2017-09-27  Tom Tromey  <tom@tromey.com>
4358
4359         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4360
4361 2017-09-27  Tom Tromey  <tom@tromey.com>
4362
4363         * arc-tdep.c (dump_arc_instruction_command): Constify.
4364
4365 2017-09-27  Tom Tromey  <tom@tromey.com>
4366
4367         * valprint.c (set_radix, show_radix): Constify.
4368
4369 2017-09-27  Tom Tromey  <tom@tromey.com>
4370
4371         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4372
4373 2017-09-27  Tom Tromey  <tom@tromey.com>
4374
4375         * command.h (not_just_help_class_command): Update.
4376         * cli/cli-decode.h (not_just_help_class_command): Update.
4377         * cli/cli-decode.c (not_just_help_class_command): Constify.
4378
4379 2017-09-27  Tom Tromey  <tom@tromey.com>
4380
4381         * gdb_bfd.c (maintenance_info_bfds): Constify.
4382
4383 2017-09-27  Tom Tromey  <tom@tromey.com>
4384
4385         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4386         overloads.
4387         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4388         (do_const_cfunc): New function.
4389         (cmd_cfunc_eq): New overload.
4390         (cli_user_command_p): Check do_const_cfunc.
4391         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4392         const_cfunc.
4393         * command.h (add_cmd): Add const overload and no-function
4394         overload.
4395         (set_cmd_cfunc): Add const overload.
4396         (cmd_const_cfunc_ftype): Declare.
4397         (cmd_cfunc_eq): Add const overload.
4398         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4399         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4400         overload.
4401
4402 2017-09-27  Tom Tromey  <tom@tromey.com>
4403
4404         * macroexp.c (get_next_token_for_substitution): New function.
4405         (substitute_args): Call it.  Check for __VA_OPT__.
4406
4407 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4408             Pedro Alves <palves@redhat.com>
4409
4410         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4411         producer_is_icc_lt_14.
4412         (producer_is_icc_lt_14): New function.
4413         (check_producer): Add code for checking version of ICC.
4414         (producer_is_icc): Move to producer.c.
4415         (read_structure_type): Restrict ICC workaround to ICC<14.
4416         * producer.c: Include selftest.h.
4417         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4418         New functions.
4419         * producer.h (producer_is_icc): New declaration.
4420
4421 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4422
4423         * Makefile.in (SFILES): Add producer.c.
4424         (COMMON_OBS): Add producer.o
4425         * amd64-tdep.c (producer.h): Add new include.
4426         * dwarf2read.c (producer.h): Add new include.
4427         * producer.c: New file.
4428         * producer.h: New file.
4429         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4430         producer.c.
4431         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4432         producer.h.
4433
4434 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4435
4436         * configure.ac: Search ncursesw before ncurses.
4437         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4438         * gdb_curses.h: Include <ncursesw/ncurses.h>
4439         * config.in, configure: Regenerate.
4440
4441 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4442
4443         PR gdb/22185
4444         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4445         obsolete.
4446         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4447         Remove i386sol2 support.
4448         * configure.nat <i386sol2>: Remove.
4449         <sol2-64>: Fold into ...
4450         <sol2>: ... this.
4451         Move common settings to default section.
4452         Add sol-thread.o.
4453         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4454         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4455         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4456         <i[34567]86-*-solaris*>: Remove.
4457         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4458
4459         * configure.ac: Remove wctype in libw check.
4460         (_MSE_INT_H): Don't define on Solaris 7-9.
4461         <solaris*>: Remove libthread_db.so.1 check.
4462         * configure: Regenerate.
4463         * config.in: Regenerate.
4464
4465         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4466         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4467         (gdb_ps_size_t): Remove.
4468         Use base types in users.
4469         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4470
4471         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4472
4473 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4474
4475         PR build/22206
4476         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4477         (adi_is_addr_mapped): Likewise.
4478         (PSR_ICC): Don't redefine.
4479         (PSR_IMPL): Likewise.
4480
4481 2017-09-25  Tom Tromey  <tom@tromey.com>
4482
4483         * regcache.c (regcache::dump): Use string_printf.
4484
4485 2017-09-25  Tom Tromey  <tom@tromey.com>
4486
4487         * regcache.c (class regcache_invalidator): New.
4488         (struct register_to_invalidate): Remove.
4489         (make_cleanup_regcache_invalidate): Remove.
4490         (regcache::raw_write): Use regcache_invalidator.
4491
4492 2017-09-25  Tom Tromey  <tom@tromey.com>
4493
4494         * spu-tdep.c (spu2ppu_sniffer): Update.
4495         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4496         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4497         Remove.
4498         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4499         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4500         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4501         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4502         (frame_pop): Update.
4503
4504 2017-09-25  Tom Tromey  <tom@tromey.com>
4505
4506         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4507         * regcache.h (regcache_xfree): Don't declare.
4508         * regcache.c (regcache_xfree): Remove.
4509         (do_regcache_xfree): Use delete.
4510         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4511         * linux-fork.c (free_fork): Use delete.
4512         (fork_save_infrun_state): Likewise.
4513         * jit.c (jit_dealloc_cache): Use delete.
4514         * infrun.c (discard_infcall_suspend_state): Use delete.
4515
4516 2017-09-25  Tom Tromey  <tom@tromey.com>
4517
4518         * regcache.h (regcache_xmalloc): Don't declare.
4519         (regcache_raw_set_cached_value): Update comment.
4520         * regcache.c (regcache_xmalloc): Remove.
4521         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4522         * jit.c (jit_frame_sniffer): Use new.
4523         * frame.c (frame_save_as_regcache): Use new.
4524
4525 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4526
4527         * NEWS: Advertise support for guarded-storage registers on IBM z.
4528
4529 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4530
4531         * s390-linux-nat.c (have_regset_gs): New static variable.
4532         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4533         control block and guarded-storage broadcast control regsets.
4534         (s390_read_description): Detect whether the target has
4535         guarded-storage support, return appropriate tdesc.
4536         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4537         (features/s390x-gs-linux64.c): Likewise.
4538         (struct gdbarch_tdep) <have_gs>: New field.
4539         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4540         (s390_gsbc_regset): New variables.
4541         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4542         and s390_gsbc_regset, if applicable.
4543         (s390_core_read_description): Check whether core file was from a
4544         target with guarded-storage support; include appropriate regsets.
4545         (s390_gdbarch_init): Add registers for guarded-storage support.
4546         (_initialize_s390_tdep): Initialize new target descriptions that
4547         include registers for guarded-storage support.
4548         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4549         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4550         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4551         (S390_NUM_REGS): Adjust macro definition.
4552         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4553         (tdesc_s390x_gs_linux64): New declarations.
4554
4555 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4556
4557         * features/s390-gs-linux64.xml: New file.
4558         * features/s390-gs.xml: New file.
4559         * features/s390-gsbc.xml: New file.
4560         * features/s390x-gs-linux64.xml: New file.
4561         * features/Makefile (WHICH): Add s390-gs-linux64 and
4562         s390x-gs-linux64.
4563         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4564         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4565         * features/s390-gs-linux64.c: New generated file.
4566         * features/s390x-gs-linux64.c: New file.
4567         * regformats/s390-gs-linux64.dat: New file.
4568         * regformats/s390x-gs-linux64.dat: New file.
4569
4570 2017-09-23  Tom Tromey  <tom@tromey.com>
4571
4572         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4573
4574 2017-09-22  Tom Tromey  <tom@tromey.com>
4575
4576         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4577         type to scoped_restore_tmpl.
4578         <scoped_input_handler>: Initialize m_quit_handler directly.
4579
4580 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4581
4582         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4583         (cd_command): Likewise.  Free "current_directory" before
4584         assigning to it.
4585         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4586         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4587         * top.c (gdb_dirbuf): Remove global declaration.
4588         * top.h (gdb_dirbuf): Likewise.
4589
4590 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4591
4592         * gnulib/aclocal.m4: Regenerate.
4593         * gnulib/config.in: Regenerate.
4594         * gnulib/configure: Regenerate.
4595         * gnulib/import/Makefile.am: Regenerate.
4596         * gnulib/import/Makefile.in: Regenerate.
4597         * gnulib/import/assure.h: New file.
4598         * gnulib/import/at-func.c: Likewise
4599         * gnulib/import/chdir-long.c: New file.
4600         * gnulib/import/chdir-long.h: New file.
4601         * gnulib/import/cloexec.c: New file.
4602         * gnulib/import/cloexec.h: New file.
4603         * gnulib/import/close.c: New file.
4604         * gnulib/import/closedir.c: New file.
4605         * gnulib/import/dirent-private.h: New file.
4606         * gnulib/import/dup-safer.c: New file.
4607         * gnulib/import/dup.c: New file.
4608         * gnulib/import/dup2.c: New file.
4609         * gnulib/import/error.c: New file.
4610         * gnulib/import/error.h: New file.
4611         * gnulib/import/exitfail.c: New file.
4612         * gnulib/import/exitfail.h: New file.
4613         * gnulib/import/fchdir.c: New file.
4614         * gnulib/import/fcntl.c: New file.
4615         * gnulib/import/fcntl.in.h: New file.
4616         * gnulib/import/fd-hook.c: New file.
4617         * gnulib/import/fd-hook.h: New file.
4618         * gnulib/import/fd-safer.c: New file.
4619         * gnulib/import/fdopendir.c: New file.
4620         * gnulib/import/filename.h: New file.
4621         * gnulib/import/filenamecat-lgpl.c: New file.
4622         * gnulib/import/filenamecat.h: New file.
4623         * gnulib/import/fstat.c: New file.
4624         * gnulib/import/fstatat.c: New file.
4625         * gnulib/import/getcwd-lgpl.c: New file.
4626         * gnulib/import/getcwd.c: New file.
4627         * gnulib/import/getdtablesize.c: New file.
4628         * gnulib/import/getlogin_r.c: New file.
4629         * gnulib/import/getprogname.c: New file.
4630         * gnulib/import/getprogname.h: New file.
4631         * gnulib/import/gettext.h: New file.
4632         * gnulib/import/glob-libc.h: New file.
4633         * gnulib/import/glob.c: New file.
4634         * gnulib/import/glob.in.h: New file.
4635         * gnulib/import/intprops.h: New file.
4636         * gnulib/import/m4/chdir-long.m4: New file.
4637         * gnulib/import/m4/close.m4: New file.
4638         * gnulib/import/m4/closedir.m4: New file.
4639         * gnulib/import/m4/d-ino.m4: New file.
4640         * gnulib/import/m4/d-type.m4: New file.
4641         * gnulib/import/m4/dup.m4: New file.
4642         * gnulib/import/m4/dup2.m4: New file.
4643         * gnulib/import/m4/error.m4: New file.
4644         * gnulib/import/m4/fchdir.m4: New file.
4645         * gnulib/import/m4/fcntl.m4: New file.
4646         * gnulib/import/m4/fcntl_h.m4: New file.
4647         * gnulib/import/m4/fdopendir.m4: New file.
4648         * gnulib/import/m4/filenamecat.m4: New file.
4649         * gnulib/import/m4/fstat.m4: New file.
4650         * gnulib/import/m4/fstatat.m4: New file.
4651         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4652         * gnulib/import/m4/getcwd-path-max.m4: New file.
4653         * gnulib/import/m4/getcwd.m4: New file.
4654         * gnulib/import/m4/getdtablesize.m4: New file.
4655         * gnulib/import/m4/getlogin_r.m4: New file.
4656         * gnulib/import/m4/getprogname.m4: New file.
4657         * gnulib/import/m4/glob.m4: New file.
4658         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4659         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4660         * gnulib/import/m4/mempcpy.m4: New file.
4661         * gnulib/import/m4/memrchr.m4: New file.
4662         * gnulib/import/m4/mode_t.m4: New file.
4663         * gnulib/import/m4/msvc-inval.m4: New file.
4664         * gnulib/import/m4/msvc-nothrow.m4: New file.
4665         * gnulib/import/m4/open.m4: New file.
4666         * gnulib/import/m4/openat.m4: New file.
4667         * gnulib/import/m4/opendir.m4: New file.
4668         * gnulib/import/m4/readdir.m4: New file.
4669         * gnulib/import/m4/realloc.m4: New file.
4670         * gnulib/import/m4/rewinddir.m4: New file.
4671         * gnulib/import/m4/save-cwd.m4: New file.
4672         * gnulib/import/m4/strdup.m4: New file.
4673         * gnulib/import/m4/strerror.m4: New file.
4674         * gnulib/import/m4/unistd-safer.m4: New file.
4675         * gnulib/import/mempcpy.c: New file.
4676         * gnulib/import/memrchr.c: New file.
4677         * gnulib/import/msvc-inval.c: New file.
4678         * gnulib/import/msvc-inval.h: New file.
4679         * gnulib/import/msvc-nothrow.c: New file.
4680         * gnulib/import/msvc-nothrow.h: New file.
4681         * gnulib/import/open.c: New file.
4682         * gnulib/import/openat-die.c: New file.
4683         * gnulib/import/openat-priv.h: New file.
4684         * gnulib/import/openat-proc.c: New file.
4685         * gnulib/import/openat.c: New file.
4686         * gnulib/import/openat.h: New file.
4687         * gnulib/import/opendir.c: New file.
4688         * gnulib/import/pipe-safer.c: New file.
4689         * gnulib/import/readdir.c: New file.
4690         * gnulib/import/realloc.c: New file.
4691         * gnulib/import/rewinddir.c: New file.
4692         * gnulib/import/save-cwd.c: New file.
4693         * gnulib/import/save-cwd.h: New file.
4694         * gnulib/import/strdup.c: New file.
4695         * gnulib/import/strerror-override.c: New file.
4696         * gnulib/import/strerror-override.h: New file.
4697         * gnulib/import/strerror.c: New file.
4698         * gnulib/import/unistd--.h: New file.
4699         * gnulib/import/unistd-safer.h: New file.
4700         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4701         "getcwd" and "glob".
4702         * ser-tcp.c: Undefine "close" before redefining it.
4703
4704 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4705
4706         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4707         get rid of res_val.
4708
4709 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4710
4711         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4712         <sol2,sparc>: Likewise.
4713         <sol2-64,i386>: Likewise.
4714
4715         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4716         -Wdeprecated-declarations on *-*-solaris*.
4717         * configure: Regenerate.
4718
4719         * procfs.c: Include "nat/inferior.h".
4720         (procfs_info_proc): Fix typo.
4721
4722 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4723
4724         * remote.c (vector): Include.
4725         (struct private_thread_info): Add field, thread_handle.
4726         (free_private_thread_info): Deallocate storage associated with
4727         thread handle.
4728         (get_private_info_thread): Initialize `thread_handle' field.
4729         (struct thread_item): Add field, thread_handle.
4730         (clear_threads_listing_context): Deallocate storage associated
4731         with thread handle.
4732         (start_thread): Add support for "handle" attribute.
4733         (thread_attributes): Add "handle".
4734         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4735         field.
4736         (remote_update_thread_list): Update thread_handle.
4737         (remote_thread_handle_to_thread_info): New function.
4738         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4739
4740 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4741
4742         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4743         function.
4744         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4745         * python/python-internal.h (thread_object_type): Declare.
4746
4747 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4748
4749         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4750         (target_thread_handle_to_thread_info): Declare.
4751         * target.c (target_thread_handle_to_thread_info): New function.
4752         * target-delegates.c: Regenerate.
4753         * gdbthread.h (find_thread_by_handle): Declare.
4754         * thread.c (find_thread_by_handle): New function.
4755         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4756         function.
4757         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4758
4759 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4760
4761         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4762
4763 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4764
4765         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4766
4767 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4768
4769         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4770         to gdb_target_obs.
4771
4772 2017-09-20  Tom Tromey  <tom@tromey.com>
4773
4774         * breakpoint.c (struct counted_command_line): Remove.
4775         (breakpoint_commands): Update.
4776         (alloc_counted_command_line, incref_counted_command_line)
4777         (decref_counted_command_line, do_cleanup_counted_command_line)
4778         (make_cleanup_decref_counted_command_line): Remove.
4779         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4780         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4781         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4782         (save_breakpoints): Update.
4783         * breakpoint.h (counted_command_line): Now a typedef to
4784         shared_ptr.
4785         (struct breakpoint) <commands>: Now a counted_command_line.
4786         (struct bpstats) <command>: Likewise.
4787
4788 2017-09-20  Tom Tromey  <tom@tromey.com>
4789
4790         * breakpoint.c (struct commands_info, do_map_commands_command):
4791         Remove.
4792         (commands_command_1): Update.
4793         (iterate_over_related_breakpoints): Take a function_view.
4794         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4795         (delete_command): Update.
4796         (map_breakpoint_numbers): Take a function_view.
4797         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4798         (disable_command): Update.
4799         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4800         (enable_command): Update.
4801         (struct disp_data, do_enable_breakpoint_disp)
4802         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4803         (do_map_enable_delete_breakpoint): Remove.
4804         (enable_once_command, enable_count_command, enable_delete_command)
4805         (delete_trace_variable_command): Update.
4806
4807 2017-09-20  Tom Tromey  <tom@tromey.com>
4808
4809         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4810         (bpstat_clear): Use delete.
4811         (bpstats): New constructors.
4812         (bpstat_copy, bpstat_stop_status): Use new.
4813         (dprintf_after_condition_true): Update.
4814         * breakpoint.h (bpstats::bpstats): Add constructors.
4815         (bpstats::~bpstats): Add destructor.
4816
4817 2017-09-20  Pedro Alves  <palves@redhat.com>
4818
4819         * eval.c (make_params): Delete, refactored as ...
4820         (class fake_method): ... this new type's ctor.
4821         (fake_method::~fake_method): New.
4822         (evaluate_subexp_standard): Use 'fake_method'.
4823
4824 2017-09-20  Tom Tromey  <tom@tromey.com>
4825
4826         * windows-nat.c (get_windows_debug_event, windows_wait)
4827         (do_initial_windows_stuff, windows_attach): Update.
4828         * utils.c (vwarning, internal_vproblem): Update.
4829         (ui_unregister_input_event_handler_cleanup)
4830         (prepare_to_handle_input): Remove.
4831         (class scoped_input_handler): New.
4832         (defaulted_query, prompt_for_continue): Update.
4833         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4834         Update.
4835         * top.c (undo_terminal_modifications_before_exit): Update.
4836         * target/target.h (target_terminal_init, target_terminal_inferior)
4837         (target_terminal_ours): Don't declare.
4838         (class target_terminal): New.
4839         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4840         (target_terminal_ours_for_output)
4841         (make_cleanup_restore_target_terminal): Don't declare.
4842         (target_terminal_info): Remove.
4843         * target.c (enum terminal_state, terminal_state): Remove.
4844         (target_terminal::terminal_state): Define.
4845         (target_terminal::init): Rename from target_terminal_init.
4846         (target_terminal::inferior): Rename from
4847         target_terminal_inferior.
4848         (target_terminal::ours): Rename from target_terminal_ours.
4849         (target_terminal::ours_for_output): Rename from
4850         target_terminal_ours_for_output.
4851         (target_terminal::info): New method.
4852         (cleanup_restore_target_terminal)
4853         (make_cleanup_restore_target_terminal): Remove.
4854         * solib.c (handle_solib_event): Update.
4855         * remote.c (remote_serial_quit_handler): Update.
4856         (remote_terminal_inferior, remote_wait_as): Update.
4857         * record-full.c (record_full_wait_1): Update.
4858         * nto-procfs.c (procfs_create_inferior): Update.
4859         * nat/fork-inferior.c (startup_inferior): Update.
4860         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4861         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4862         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4863         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4864         (mi_breakpoint_created, mi_breakpoint_deleted)
4865         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4866         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4867         (mi_user_selected_context_changed, report_initial_inferior):
4868         Update.
4869         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4870         (linux_nat_terminal_inferior): Update.
4871         * infrun.c (follow_fork_inferior)
4872         (handle_vfork_child_exec_or_exit, do_target_resume)
4873         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4874         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4875         Update.
4876         * inflow.c (child_terminal_init, info_terminal_command): Update.
4877         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4878         (attach_command): Update.
4879         * infcall.c (call_thread_fsm_should_stop): Update.
4880         * gnu-nat.c (gnu_attach): Update.
4881         * extension.c (struct active_ext_lang_state)
4882         (restore_active_ext_lang): Update.
4883         * exceptions.c (print_flush): Update.
4884         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4885         (struct quit_handler_cleanup_data, restore_quit_handler)
4886         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4887         Remove.
4888         * cp-support.c (gdb_demangle): Update.
4889         * breakpoint.c (update_inserted_breakpoint_locations)
4890         (insert_breakpoint_locations, handle_jit_event)
4891         (disable_breakpoints_in_unloaded_shlib): Update.
4892         * annotate.c (annotate_breakpoints_invalid)
4893         (annotate_frames_invalid): Update.
4894
4895 2017-09-20  Tom Tromey  <tom@tromey.com>
4896
4897         * main.c (catch_command_errors): Rename from
4898         catch_command_errors_const.
4899         (captured_main_1): Update.
4900
4901 2017-09-20  Pedro Alves  <palves@redhat.com>
4902
4903         * cli/cli-cmds.c (list_command): Use print_sal_location.
4904         (print_sal_location): New function.
4905         (ambiguous_line_spec): Use print_sal_location.
4906         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4907         * symtab.c (find_function_start_sal): Likewise.
4908         * symtab.h (symtab_and_line::symbol): New field.
4909
4910 2017-09-20  Pedro Alves  <palves@redhat.com>
4911
4912         * linespec.c (minsym_found): Handle non-text minsyms.
4913         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4914
4915 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4916
4917         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4918         backslash.
4919
4920 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4921
4922         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4923         vmovups instead vmovaps.
4924         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4925
4926 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4927
4928         * NEWS (Changes since GDB 8.0): Add starti.
4929         * infcmd.c (enum run_break): New.
4930         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4931         case.
4932         (run_command): Use enum run_how.
4933         (start_command): Likewise.
4934         (starti_command): New function.
4935         (RUN_ARGS_HELP): New macro.
4936         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4937         commands.  Add starti command.
4938
4939 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4940
4941         * Makefile.in (monitor.o): Remove the rule.
4942
4943 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4944
4945         * annotate.h (struct annotate_arg_emitter): Use
4946         DISABLE_COPY_AND_ASSIGN.
4947         * common/refcounted-object.h (refcounted_object): Likewise.
4948         * completer.h (struct completion_result): Likewise.
4949         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4950         * filename-seen-cache.h (filename_seen_cache): Likewise.
4951         * gdbcore.h (thread_section_name): Likewise.
4952         * gdb_regex.h (compiled_regex): Likewise.
4953         * gdbthread.h (scoped_restore_current_thread): Likewise.
4954         * inferior.h (scoped_restore_current_inferior): Likewise.
4955         * jit.c (jit_reader): Likewise.
4956         * linespec.h (struct linespec_result): Likewise.
4957         * mi/mi-parse.h (struct mi_parse): Likewise.
4958         * nat/fork-inferior.c (execv_argv): Likewise.
4959         * progspace.h (scoped_restore_current_program_space): Likewise.
4960         * python/python-internal.h (class gdbpy_enter): Likewise.
4961         * regcache.h (regcache): Likewise.
4962         * target-descriptions.c (struct tdesc_reg): Likewise.
4963         (struct tdesc_type): Likewise.
4964         (struct tdesc_feature): Likewise.
4965         * ui-out.h (ui_out_emit_type): Likewise.
4966
4967 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4968
4969         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4970         label abort_expression.
4971
4972 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4973
4974         * common/buffer.c (buffer_xml_printf): Adjust.
4975         * common/xml-utils.c (xml_escape_text): Change return type to
4976         std::string, update code accordingly.
4977         * common/xml-utils.h (xml_escape_text): Change return type to
4978         std::string.
4979         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4980         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4981         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4982         Adjust.
4983
4984 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4985
4986         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4987         (SUBDIR_UNITTESTS_OBS): Add new object file.
4988         * unittests/xml-utils-selftests.c: New file.
4989
4990 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4991
4992         * common/selftest.h (selftest): New struct/interface.
4993         (register_test): Add name parameter, add new overload.
4994         (run_tests): Add filter parameter.
4995         (for_each_selftest_ftype): New typedef.
4996         (for_each_selftest): New declaration.
4997         * common/selftest.c (tests): Change type to
4998         map<string, unique_ptr<selftest>>.
4999         (simple_selftest): New struct.
5000         (register_test): New function.
5001         (register_test): Add name parameter and use it.
5002         (run_tests): Add filter parameter and use it.  Add prints.
5003         Adjust to vector -> map change.
5004         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5005         registering selftests.
5006         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5007         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5008         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5009         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5010         * findvar.c (_initialize_findvar): Likewise.
5011         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5012         * maint.c (maintenance_selftest): Update call to run_tests.
5013         (maintenance_info_selftests): New function.
5014         (_initialize_maint_cmds): Register "maintenance info selftests"
5015         command.  Update "maintenance selftest" doc.
5016         * regcache.c (_initialize_regcache): Add names when registering
5017         selftests.
5018         * rust-exp.y (_initialize_rust_exp): Likewise.
5019         * selftest-arch.c (gdbarch_selftest): New struct.
5020         (gdbarch_tests): Remove.
5021         (register_test_foreach_arch): Add name parameter.  Call
5022         register_test.
5023         (tests_with_arch): Remove, move most content to
5024         gdbarch_selftest::operator().
5025         (_initialize_selftests_foreach_arch): Remove.
5026         * selftest-arch.h (register_test_foreach_arch): Add name
5027         parameter.
5028         (run_tests_with_arch): New declaration.
5029         * utils-selftests.c (_initialize_utils_selftests): Add names
5030         when registering selftests.
5031         * utils.c (_initialize_utils): Likewise.
5032         * unittests/array-view-selftests.c
5033         (_initialize_array_view_selftests): Likewise.
5034         * unittests/environ-selftests.c (_initialize_environ_selftests):
5035         Likewise.
5036         * unittests/function-view-selftests.c
5037         (_initialize_function_view_selftests): Likewise.
5038         * unittests/offset-type-selftests.c
5039         (_initialize_offset_type_selftests): Likewise.
5040         * unittests/optional-selftests.c
5041         (_initialize_optional_selftests): Likewise.
5042         * unittests/scoped_restore-selftests.c
5043         (_initialize_scoped_restore_selftests): Likewise.
5044         * NEWS: Document "maintenance selftest" and "maint info
5045         selftests".
5046
5047 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5048
5049         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5050         scoped_restore.
5051
5052 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5053
5054         * mi/mi-main.c (mi_load_progress): Make uiout variable
5055         a unique_ptr.
5056
5057 2017-09-15  Pedro Alves  <palves@redhat.com>
5058
5059         * compile/compile-c-types.c (convert_enum, convert_int)
5060         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5061
5062 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5063
5064         * dwarf2read.c (copy_string): Remove.
5065         (parse_macro_definition): Replace copy_string with savestring.
5066
5067 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5068
5069         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5070         gdb_target_obs.
5071         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5072         Likewise.
5073         (i[34567]86-*-linux*): Likewise.
5074
5075 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5076
5077         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5078         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5079         <stack>: Change type to std::vector.
5080         <stack_len, stack_allocated>: Remove.
5081         <grow_stack>: Remove.
5082         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5083         (dwarf_expr_context::~dwarf_expr_context): Remove.
5084         (dwarf_expr_context::grow_stack): Remove.
5085         (dwarf_expr_context::push): Adjust.
5086         (dwarf_expr_context::pop): Adjust.
5087         (dwarf_expr_context::fetch): Adjust.
5088         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5089         (dwarf_expr_context::stack_empty_p): Adjust.
5090         (dwarf_expr_context::execute_stack_op): Adjust.
5091
5092 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5093
5094         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5095         return type to bool.
5096         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5097
5098 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5099
5100         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5101         Change type to bool.
5102         (dwarf_stack_value) <in_stack_memory>: Likewise.
5103         (dwarf_expr_context) <push_address>: Change parameter type to
5104         bool.
5105         <fetch_in_stack_memory>: Change return type to bool.
5106         <push>: Change parameter type to bool.
5107         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5108         to bool.
5109         (dwarf_expr_context::push_address): Likewise.
5110         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5111         to bool.
5112         (dwarf_expr_context::execute_stack_op): Adjust.
5113         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5114
5115 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5116
5117         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5118         (struct dwarf_expr_context) <n_pieces>: Remove.
5119         <pieces>: Change type to std::vector.
5120         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5121         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5122         pieces.
5123         (dwarf_expr_context::add_piece): Adjust.
5124         * dwarf2loc.c (struct piece_closure): Initialize fields.
5125         <n_pieces>: Remove.
5126         <pieces>: Change type to std::vector.
5127         (allocate_piece_closure): Adjust, change parameter to
5128         std::vector rvalue and std::move it to piece_closure.
5129         (rw_pieced_value): Adjust.
5130         (check_pieced_synthetic_pointer): Adjust.
5131         (indirect_synthetic_pointer): Adjust.
5132         (coerce_pieced_ref): Adjust.
5133         (free_pieced_value_closure):  Adjust.  Use delete to free
5134         piece_closure.
5135         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5136         to allocate_piece_closure.
5137         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5138
5139 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5140
5141         * probe.h (probe_ops_cp): Remove typedef.
5142         (DEF_VEC_P (probe_ops_cp)): Remove.
5143         (all_probe_ops): Change type to std::vector.
5144         * probe.c (info_probes_for_ops): Adjust to vector change.
5145         (probe_linespec_to_ops): Likewise.
5146         (all_probe_ops): Change type to std::vector.
5147         (_initialize_probe): Adjust to vector change.
5148         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5149         * elfread.c (elf_get_probes): Likewise.
5150         * stap-probe.c (_initialize_stap_probe): Likewise.
5151
5152 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5153
5154         * probe.h (struct bound_probe): Define constructors.
5155         * probe.c (bound_probe_s): Remove typedef.
5156         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5157         (collect_probes): Change return type to std::vector, remove
5158         cleanup.
5159         (compare_probes): Return bool, change parameter type.  Change
5160         semantic to "less than".
5161         (gen_ui_out_table_header_info): Change parameter to std::vector
5162         and update.
5163         (exists_probe_with_pops): Likewise.
5164         (info_probes_for_ops): Update to std::vector change.
5165         (enable_probes_command): Likewise.
5166         (disable_probes_command): Likewise.
5167
5168 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5169
5170         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5171         vec to std::vector.
5172         * probe.c (parse_probes_in_pspace): Update.
5173         (find_probes_in_objfile): Update.
5174         (find_probe_by_pc): Update.
5175         (collect_probes): Update.
5176         (probe_any_get_probes): Update.
5177         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5178         return type to reference to std::vector.
5179         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5180         std::vector and update.
5181         (dtrace_process_dof): Likewise.
5182         (dtrace_get_probes): Likewise.
5183         * elfread.c (elf_get_probes): Change return type to std::vector,
5184         store an std::vector in bfd_data.
5185         (probe_key_free): Update to std::vector.
5186         * stap-probe.c (handle_stap_probe): Change parameter to
5187         std::vector and update.
5188         (stap_get_probes): Likewise.
5189         * symfile-debug.c (debug_sym_get_probes): Change return type to
5190         std::vector and update.
5191
5192 2017-09-11  Tom Tromey  <tom@tromey.com>
5193
5194         * breakpoint.c (program_breakpoint_here_p): Update.
5195         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5196         from make_show_memory_breakpoints_cleanup.  Return a
5197         scoped_restore_tmpl<int>.
5198         (restore_show_memory_breakpoints): Remove.
5199         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5200         * mem-break.c (memory_validate_breakpoint): Update.
5201         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5202         (ia64_memory_remove_breakpoint): Update.
5203         (ia64_breakpoint_from_pc): Update.
5204         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5205         from make_show_memory_breakpoints_cleanup.
5206
5207 2017-09-11  Tom Tromey  <tom@tromey.com>
5208
5209         * d-namespace.c (d_lookup_symbol): Use std::string.
5210         (find_symbol_in_baseclass): Likewise.
5211
5212 2017-09-11  Tom Tromey  <tom@tromey.com>
5213
5214         * ctf.c (ctf_start): Use std::string.
5215
5216 2017-09-11  Tom Tromey  <tom@tromey.com>
5217
5218         * ada-lang.c (is_known_support_routine): Update.
5219         (ada_unhandled_exception_name_addr_from_raise): Update.
5220         * guile/scm-frame.c (gdbscm_frame_name): Update.
5221         * python/py-frame.c (frapy_name): Update.
5222         (frapy_function): Update.
5223         * stack.h (find_frame_funname): Update.
5224         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5225         (print_frame): Update.
5226
5227 2017-09-11  Tom Tromey  <tom@tromey.com>
5228
5229         * findcmd.c (put_bits): Take a gdb::byte_vector.
5230         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5231         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5232         cleanups.
5233         (find_command): Update.
5234
5235 2017-09-11  Tom Tromey  <tom@tromey.com>
5236
5237         * cli/cli-script.c (class scoped_restore_hook_in): New.
5238         (clear_hook_in_cleanup): Remove.
5239         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5240         scoped_restore_hook_in.
5241
5242 2017-09-11  Tom Tromey  <tom@tromey.com>
5243
5244         * cli/cli-script.c (restore_interp): Remove.
5245         (read_command_lines): Use scoped_restore_interp.
5246         * interps.c (scoped_restore_interp::set_temp): Rename from
5247         interp_set_temp.
5248         * interps.h (class scoped_restore_interp): New.
5249         (interp_set_temp): Remove.
5250
5251 2017-09-11  Tom Tromey  <tom@tromey.com>
5252
5253         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5254         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5255         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5256         scoped_restore.
5257         (mi_cmd_break_insert_1): Update.
5258         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5259         scoped_restore.
5260
5261 2017-09-11  Tom Tromey  <tom@tromey.com>
5262
5263         * demangle.c (demangle_command): Update.
5264         * breakpoint.c (disable_command): Update.
5265         (enable_command): Update.
5266         (find_location_by_number): Make "number" const.  Use
5267         get_number_trailer.
5268         * cli/cli-utils.c (extract_arg): Return std::string.
5269         * probe.c (parse_probe_linespec): Update.  Change types.
5270         (collect_probes): Take string arguments.
5271         (parse_probe_linespec): Likewise.
5272         (info_probes_for_ops): Update.
5273         (enable_probes_command): Update.
5274         (disable_probes_command): Update.
5275         * break-catch-sig.c (catch_signal_split_args): Update.
5276         * mi/mi-parse.c (mi_parse): Update.
5277
5278 2017-09-11  Tom Tromey  <tom@tromey.com>
5279
5280         * language.h (language_enum): Make argument const.
5281         * language.c (language_enum): Make argument const.
5282
5283 2017-09-11  Tom Tromey  <tom@tromey.com>
5284
5285         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5286         as function.
5287         (skip_to_space): Rename from skip_to_space_const.
5288         * common/common-utils.c (skip_to_space): New function.
5289         (skip_to_space): Rename from skip_to_space_const.
5290         * cli/cli-utils.h (get_number): Rename from get_number_const.
5291         (extract_arg): Rename from extract_arg_const.
5292         * cli/cli-utils.c (get_number): Rename from get_number_const.
5293         (extract_arg): Rename from extract_arg_const.
5294         (number_or_range_parser::get_number): Use ::get_number.
5295         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5296         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5297         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5298         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5299         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5300         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5301         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5302         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5303
5304 2017-09-11  Tom Tromey  <tom@tromey.com>
5305
5306         * python/python.c (do_start_initialization): Use
5307         py-event-types.def to initialize types.
5308         Define all object type structures.
5309         * python/python-internal.h: Don't declare event initialization
5310         functions.
5311         * python/py-threadevent.c (thread_event_object_type): Don't
5312         define.
5313         * python/py-stopevent.c (stop_event_object_type): Don't define.
5314         * python/py-signalevent.c (signal_event_object_type): Don't
5315         declare or define.
5316         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5317         (clear_objfiles_event_object_type): Don't declare or define.
5318         * python/py-infevents.c (inferior_call_pre_event_object_type)
5319         (inferior_call_post_event_object_type)
5320         (register_changed_event_object_type)
5321         (memory_changed_event_object_type): Don't declare or define.
5322         * python/py-inferior.c (new_thread_event_object_type)
5323         (new_inferior_event_object_type)
5324         (inferior_deleted_event_object_type): Don't declare or define.
5325         * python/py-exitedevent.c (exited_event_object_type): Don't
5326         declare or define.
5327         * python/py-evts.c (gdbpy_initialize_py_events): Use
5328         py-all-events.def.
5329         * python/py-events.h (thread_event_object_type): Don't declare.
5330         (events_object): Use py-all-events.def.
5331         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5332         py-event-types.def.
5333         * python/py-event-types.def: New file.
5334         * python/py-continueevent.c (create_continue_event_object): Don't
5335         declare or define.
5336         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5337         declare or define.
5338         * python/py-all-events.def: New file.
5339
5340 2017-09-11  Tom Tromey  <tom@tromey.com>
5341
5342         * python/py-threadevent.c (create_thread_event_object): Return
5343         gdbpy_ref.
5344         * python/py-stopevent.h (create_stop_event_object)
5345         (create_breakpoint_event_object, create_signal_event_object):
5346         Update.
5347         * python/py-stopevent.c (create_stop_event_object): Return
5348         gdbpy_ref.
5349         (emit_stop_event): Update.
5350         * python/py-signalevent.c (create_signal_event_object): Return
5351         gdbpy_ref.
5352         * python/py-infevents.c (create_inferior_call_event_object):
5353         Update.
5354         * python/py-event.h (create_event_object)
5355         (create_thread_event_object): Update.
5356         * python/py-event.c (create_event_object): Return gdbpy_ref.
5357         * python/py-continueevent.c: Return gdbpy_ref.
5358         * python/py-bpevent.c (create_breakpoint_event_object): Return
5359         gdbpy_ref.
5360
5361 2017-09-11  Tom Tromey  <tom@tromey.com>
5362
5363         PR python/15622:
5364         * NEWS: Add entry.
5365         * python/python.c (do_start_initialization): Initialize new event
5366         types.
5367         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5368         (gdbpy_initialize_inferior_deleted_event)
5369         (gdbpy_initialize_new_thread_event): Declare.
5370         * python/py-threadevent.c (create_thread_event_object): Add option
5371         "thread" parameter.
5372         * python/py-inferior.c (new_thread_event_object_type)
5373         (new_inferior_event_object_type)
5374         (inferior_deleted_event_object_type): Declare.
5375         (python_new_inferior, python_inferior_deleted): New functions.
5376         (add_thread_object): Emit new_thread event.
5377         (gdbpy_initialize_inferior): Attach new functions to corresponding
5378         observers.
5379         (new_thread, new_inferior, inferior_deleted): Define new event
5380         types.
5381         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5382         registries.
5383         * python/py-events.h (events_object) <new_inferior,
5384         inferior_deleted, new_thread>: New fields.
5385         * python/py-event.h (create_thread_event_breakpoint): Add optional
5386         "thread" parameter.
5387
5388 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5389
5390         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5391         check current_ui instead.
5392         (internal_vproblem): Likewise.
5393
5394 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5395
5396         * thread.c (print_thread_info_1): Remove unnecessary calls to
5397         uiout->is_mi_like_p.
5398
5399 2017-09-09  Tom Tromey  <tom@tromey.com>
5400
5401         * namespace.h (add_using_directive): Update.
5402         * namespace.c (add_using_directive): Change type of excludes to
5403         std::vector.
5404         * dwarf2read.c (read_import_statement): Use std::vector.
5405         (read_namespace): Update.
5406         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5407
5408 2017-09-09  Tom Tromey  <tom@tromey.com>
5409
5410         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5411
5412 2017-09-09  Tom Tromey  <tom@tromey.com>
5413
5414         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5415
5416 2017-09-09  Tom Tromey  <tom@tromey.com>
5417
5418         * stack.c (func_command): Use gdb::def_vector.
5419
5420 2017-09-09  Tom Tromey  <tom@tromey.com>
5421
5422         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5423         ui_out_emit_list, ui_out_emit_tuple.
5424         (mi_cmd_var_update): Likewise.
5425
5426 2017-09-09  Tom Tromey  <tom@tromey.com>
5427
5428         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5429         ui_out_redirect_pop.
5430         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5431         ui_out_redirect_pop.
5432         * utils.c (do_ui_out_redirect_pop)
5433         (make_cleanup_ui_out_redirect_pop): Remove.
5434         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5435         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5436         * ui-out.h (ui_out_redirect_pop): New class.
5437
5438 2017-09-09  Tom Tromey  <tom@tromey.com>
5439
5440         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5441         (list_available_thread_groups, mi_cmd_list_thread_groups)
5442         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5443         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5444         Likewise.
5445
5446 2017-09-09  Tom Tromey  <tom@tromey.com>
5447
5448         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5449         ui_out_emit_tuple.
5450
5451 2017-09-09  Tom Tromey  <tom@tromey.com>
5452
5453         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5454         * stack.c (print_frame): Use ui_out_emit_tuple.
5455         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5456         (info_spu_mailbox_command, info_spu_dma_command)
5457         (info_spu_proxydma_command): Likewise.
5458         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5459         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5460         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5461         ui_out_emit_tuple.
5462         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5463
5464 2017-09-09  Tom Tromey  <tom@tromey.com>
5465
5466         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5467         (class ui_out_emit_table): Update comment.
5468         * ui-out.c (do_cleanup_table_end)
5469         (make_cleanup_ui_out_table_begin_end): Remove.
5470         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5471         (info_spu_dma_cmdlist): Likewise.
5472         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5473         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5474         ui_out_emit_table.
5475
5476 2017-09-09  Tom Tromey  <tom@tromey.com>
5477
5478         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5479         ui_out_emit_list, gdb::optional.
5480
5481 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5482
5483         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5484         prototype.
5485         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5486         prototype.
5487         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5488         prototype.
5489         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5490         * ada-exp.y: Remove _initialize_ada_exp prototype.
5491         * ada-lang.c: Remove _initialize_ada_language prototype.
5492         * ada-tasks.c: Remove _initialize_tasks prototype.
5493         * addrmap.c: Remove _initialize_addrmap prototype.
5494         * agent.c: Remove _initialize_agent prototype.
5495         * aix-thread.c: Remove _initialize_aix_thread prototype.
5496         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5497         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5498         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5499         prototype.
5500         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5501         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5502         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5503         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5504         prototype.
5505         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5506         prototype.
5507         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5508         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5509         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5510         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5511         prototype.
5512         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5513         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5514         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5515         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5516         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5517         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5518         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5519         prototype.
5520         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5521         prototype.
5522         * annotate.c: Remove _initialize_annotate prototype.
5523         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5524         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5525         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5526         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5527         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5528         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5529         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5530         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5531         prototype.
5532         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5533         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5534         * auto-load.c: Remove _initialize_auto_load prototype.
5535         * auxv.c: Remove _initialize_auxv prototype.
5536         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5537         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5538         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5539         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5540         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5541         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5542         prototype.
5543         * break-catch-throw.c: Remove _initialize_break_catch_throw
5544         prototype.
5545         * breakpoint.c: Remove _initialize_breakpoint prototype.
5546         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5547         * btrace.c: Remove _initialize_btrace prototype.
5548         * charset.c: Remove _initialize_charset prototype.
5549         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5550         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5551         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5552         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5553         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5554         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5555         * coffread.c: Remove _initialize_coffread prototype.
5556         * compile/compile.c: Remove _initialize_compile prototype.
5557         * complaints.c: Remove _initialize_complaints prototype.
5558         * completer.c: Remove _initialize_completer prototype.
5559         * copying.awk: Remove _initialize_copying prototype.
5560         * copying.c: Regenerate.
5561         * core-regset.c: Remove _initialize_core_regset prototype.
5562         * corefile.c: Remove _initialize_core prototype.
5563         * corelow.c: Remove _initialize_corelow prototype.
5564         * cp-abi.c: Remove _initialize_cp_abi prototype.
5565         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5566         * cp-support.c: Remove _initialize_cp_support prototype.
5567         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5568         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5569         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5570         * ctf.c: Remove _initialize_ctf prototype.
5571         * d-lang.c: Remove _initialize_d_language prototype.
5572         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5573         prototype.
5574         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5575         * dbxread.c: Remove _initialize_dbxread prototype.
5576         * dcache.c: Remove _initialize_dcache prototype.
5577         * demangle.c: Remove _initialize_demangler prototype.
5578         * disasm-selftests.c: Remove _initialize_disasm_selftests
5579         prototype.
5580         * disasm.c: Remove _initialize_disasm prototype.
5581         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5582         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5583         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5584         prototype.
5585         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5586         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5587         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5588         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5589         * elfread.c: Remove _initialize_elfread prototype.
5590         * exec.c: Remove _initialize_exec prototype.
5591         * extension.c: Remove _initialize_extension prototype.
5592         * f-lang.c: Remove _initialize_f_language prototype.
5593         * f-valprint.c: Remove _initialize_f_valprint prototype.
5594         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5595         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5596         * filesystem.c: Remove _initialize_filesystem prototype.
5597         * findcmd.c: Remove _initialize_mem_search prototype.
5598         * fork-child.c: Remove _initialize_fork_child prototype.
5599         * frame-base.c: Remove _initialize_frame_base prototype.
5600         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5601         * frame.c: Remove _initialize_frame prototype.
5602         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5603         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5604         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5605         * gcore.c: Remove _initialize_gcore prototype.
5606         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5607         * gdbarch.c: Regenerate.
5608         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5609         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5610         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5611         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5612         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5613         * go-lang.c: Remove _initialize_go_language prototype.
5614         * go32-nat.c: Remove _initialize_go32_nat prototype.
5615         * guile/guile.c: Remove _initialize_guile prototype.
5616         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5617         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5618         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5619         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5620         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5621         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5622         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5623         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5624         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5625         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5626         prototype.
5627         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5628         prototype.
5629         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5630         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5631         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5632         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5633         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5634         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5635         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5636         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5637         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5638         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5639         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5640         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5641         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5642         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5643         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5644         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5645         prototype.
5646         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5647         prototype.
5648         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5649         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5650         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5651         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5652         * infcall.c: Remove _initialize_infcall prototype.
5653         * infcmd.c: Remove _initialize_infcmd prototype.
5654         * inferior.c: Remove _initialize_inferiors prototype.
5655         * inflow.c: Remove _initialize_inflow prototype.
5656         * infrun.c: Remove _initialize_infrun prototype.
5657         * interps.c: Remove _initialize_interpreter prototype.
5658         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5659         * jit.c: Remove _initialize_jit prototype.
5660         * language.c: Remove _initialize_language prototype.
5661         * linux-fork.c: Remove _initialize_linux_fork prototype.
5662         * linux-nat.c: Remove _initialize_linux_nat prototype.
5663         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5664         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5665         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5666         * m2-lang.c: Remove _initialize_m2_language prototype.
5667         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5668         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5669         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5670         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5671         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5672         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5673         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5674         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5675         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5676         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5677         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5678         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5679         * machoread.c: Remove _initialize_machoread prototype.
5680         * macrocmd.c: Remove _initialize_macrocmd prototype.
5681         * macroscope.c: Remove _initialize_macroscope prototype.
5682         * maint.c: Remove _initialize_maint_cmds prototype.
5683         * mdebugread.c: Remove _initialize_mdebugread prototype.
5684         * memattr.c: Remove _initialize_mem prototype.
5685         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5686         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5687         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5688         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5689         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5690         * microblaze-linux-tdep.c: Remove
5691         _initialize_microblaze_linux_tdep prototype.
5692         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5693         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5694         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5695         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5696         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5697         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5698         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5699         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5700         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5701         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5702         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5703         prototype.
5704         * mipsread.c: Remove _initialize_mipsread prototype.
5705         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5706         prototype.
5707         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5708         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5709         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5710         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5711         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5712         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5713         prototype.
5714         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5715         * nto-procfs.c: Remove _initialize_procfs prototype.
5716         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5717         * objc-lang.c: Remove _initialize_objc_language prototype.
5718         * objfiles.c: Remove _initialize_objfiles prototype.
5719         * observer.c: Remove observer_test_first_notification_function,
5720         observer_test_second_notification_function,
5721         observer_test_third_notification_function, and
5722         _initialize_observer prototypes.
5723         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5724         * osabi.c: Remove _initialize_gdb_osabi prototype.
5725         * osdata.c: Remove _initialize_osdata prototype.
5726         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5727         * parse.c: Remove _initialize_parse prototype.
5728         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5729         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5730         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5731         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5732         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5733         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5734         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5735         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5736         * printcmd.c: Remove _initialize_printcmd prototype.
5737         * probe.c: Remove _initialize_probe prototype.
5738         * proc-api.c: Remove _initialize_proc_api prototype.
5739         * proc-events.c: Remove _initialize_proc_events prototype.
5740         * proc-service.c: Remove _initialize_proc_service prototype.
5741         * procfs.c: Remove _initialize_procfs prototype.
5742         * psymtab.c: Remove _initialize_psymtab prototype.
5743         * python/python.c: Remove _initialize_python prototype.
5744         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5745         * record-btrace.c: Remove _initialize_record_btrace prototype.
5746         * record-full.c: Remove _initialize_record_full prototype.
5747         * record.c: Remove _initialize_record prototype.
5748         * regcache.c: Remove _initialize_regcache prototype.
5749         * reggroups.c: Remove _initialize_reggroup prototype.
5750         * remote-notif.c: Remove _initialize_notif prototype.
5751         * remote-sim.c: Remove _initialize_remote_sim prototype.
5752         * remote.c: Remove _initialize_remote prototype.
5753         * reverse.c: Remove _initialize_reverse prototype.
5754         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5755         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5756         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5757         prototype.
5758         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5759         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5760         * rust-exp.y: Remove _initialize_rust_exp prototype.
5761         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5762         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5763         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5764         * score-tdep.c: Remove _initialize_score_tdep prototype.
5765         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5766         prototype.
5767         * ser-go32.c: Remove _initialize_ser_dos prototype.
5768         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5769         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5770         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5771         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5772         * serial.c: Remove _initialize_serial prototype.
5773         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5774         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5775         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5776         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5777         * skip.c: Remove _initialize_step_skip prototype.
5778         * sol-thread.c: Remove _initialize_sol_thread prototype.
5779         * solib-aix.c: Remove _initialize_solib_aix prototype.
5780         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5781         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5782         * solib-frv.c: Remove _initialize_frv_solib prototype.
5783         * solib-spu.c: Remove _initialize_spu_solib prototype.
5784         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5785         * solib-target.c: Remove _initialize_solib_target prototype.
5786         * solib.c: Remove _initialize_solib prototype.
5787         * source.c: Remove _initialize_source prototype.
5788         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5789         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5790         prototype.
5791         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5792         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5793         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5794         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5795         prototype.
5796         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5797         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5798         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5799         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5800         prototype.
5801         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5802         prototype.
5803         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5804         prototype.
5805         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5806         prototype.
5807         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5808         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5809         prototype.
5810         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5811         prototype.
5812         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5813         prototype.
5814         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5815         prototype.
5816         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5817         prototype.
5818         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5819         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5820         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5821         * stabsread.c: Remove _initialize_stabsread prototype.
5822         * stack.c: Remove _initialize_stack prototype.
5823         * stap-probe.c: Remove _initialize_stap_probe prototype.
5824         * std-regs.c: Remove _initialize_frame_reg prototype.
5825         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5826         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5827         * symfile.c: Remove _initialize_symfile prototype.
5828         * symmisc.c: Remove _initialize_symmisc prototype.
5829         * symtab.c: Remove _initialize_symtab prototype.
5830         * target-dcache.c: Remove _initialize_target_dcache prototype.
5831         * target-descriptions.c: Remove _initialize_target_descriptions
5832         prototype.
5833         * thread.c: Remove _initialize_thread prototype.
5834         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5835         prototype.
5836         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5837         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5838         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5839         prototype.
5840         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5841         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5842         * tracefile.c: Remove _initialize_tracefile prototype.
5843         * tracepoint.c: Remove _initialize_tracepoint prototype.
5844         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5845         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5846         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5847         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5848         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5849         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5850         * tui/tui.c: Remove _initialize_tui prototype.
5851         * typeprint.c: Remove _initialize_typeprint prototype.
5852         * user-regs.c: Remove _initialize_user_regs prototype.
5853         * utils.c: Remove _initialize_utils prototype.
5854         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5855         * valarith.c: Remove _initialize_valarith prototype.
5856         * valops.c: Remove _initialize_valops prototype.
5857         * valprint.c: Remove _initialize_valprint prototype.
5858         * value.c: Remove _initialize_values prototype.
5859         * varobj.c: Remove _initialize_varobj prototype.
5860         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5861         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5862         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5863         * windows-nat.c: Remove _initialize_windows_nat,
5864         _initialize_check_for_gdb_ini, and _initialize_loadable
5865         prototypes.
5866         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5867         * xcoffread.c: Remove _initialize_xcoffread prototype.
5868         * xml-support.c: Remove _initialize_xml_support prototype.
5869         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5870         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5871         prototype.
5872         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5873         prototype.
5874         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5875
5876 2017-09-08  Keith Seitz  <keiths@redhat.com>
5877
5878         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5879         field.
5880
5881 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5882
5883         * f-valprint.c (f_val_print): Remove check for one byte
5884         sized integers. Remove printing of character type.
5885
5886 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5887             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5888             Bernhard Heckel  <bernhard.heckel@intel.com>
5889
5890         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5891         to maintain proper indentation when printing pointers/refs.
5892
5893 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5894
5895         GDB 8.0.1 released.
5896
5897 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5898
5899         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5900
5901 2017-09-05  Tom Tromey  <tom@tromey.com>
5902
5903         * parse.c (funcall_chain): Now a std::vector.
5904         (start_arglist, end_arglist): Simplify.
5905         (free_funcalls): Remove.
5906         (parse_exp_in_context_1): Remove cleanup.
5907
5908 2017-09-05  Tom Tromey  <tom@tromey.com>
5909
5910         * go-exp.y (go_parse): Don't create a cleanup.
5911
5912 2017-09-05  Tom Tromey  <tom@tromey.com>
5913
5914         * d-exp.y (PrimaryExpression): Use std::string.
5915         (d_parse): Don't create a cleanup.
5916
5917 2017-09-05  Tom Tromey  <tom@tromey.com>
5918
5919         * utils.c (do_clear_parser_state): Remove.
5920         (make_cleanup_clear_parser_state): Remove.
5921         * p-exp.y (pascal_parse): Use scoped_restore.
5922         * m2-exp.y (m2_parse): Use scoped_restore.
5923         * f-exp.y (f_parse): Use scoped_restore.
5924         * d-exp.y (d_parse): Use scoped_restore.
5925         * c-exp.y (c_parse): Use scoped_restore.
5926         * ada-exp.y (ada_parse): Use scoped_restore.
5927         * utils.h (make_cleanup_clear_parser_state): Remove.
5928
5929 2017-09-06  Keith Seitz  <keiths@redhat.com>
5930
5931         * dwarf2read.c (dw2_linkage_name_attr): New function.
5932         (dw2_linkage_name): New function.
5933         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5934         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5935         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5936
5937 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5938
5939         * config/djgpp/djconfig.sh: Correct shell portability issue.
5940
5941 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5942
5943         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5944
5945 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5946
5947         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5948         * NEWS: Mention new FreeBSD/mips native configuration.
5949         * configure.host: Add aarch64*-*-freebsd*.
5950         * configure.nat: Likewise.
5951         * aarch64-fbsd-nat.c: New file.
5952
5953 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5954
5955         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5956         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5957         * NEWS: Mention new FreeBSD/aarch64 target.
5958         * configure.tgt: Add aarch64*-*-freebsd*.
5959         * aarch64-fbsd-tdep.c: New file.
5960         * aarch64-fbsd-tdep.h: New file.
5961
5962 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5963
5964         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5965
5966 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5967
5968         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5969         of TLS symbols.
5970
5971 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5972
5973         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5974         call.
5975
5976 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5977
5978         * infrun.c (follow_exec): Call add_thread after
5979         target_find_description.
5980
5981 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5982
5983         * infrun.c (handle_inferior_event_1): When exec'ing, read
5984         stop_pc after follow_exec.
5985
5986 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5987
5988         * remote.c (process_g_packet): Update error message.
5989
5990 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5991
5992         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5993         targets.
5994
5995 2017-09-05  Pedro Alves  <palves@redhat.com>
5996
5997         * eval.c (eval_call, evaluate_funcall): New functions, factored
5998         out from ...
5999         (evaluate_subexp_standard): ... this.
6000
6001 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6002
6003         * amd64-tdep.c (amd64_target_description): Create target
6004         descriptions.
6005         (_initialize_amd64_tdep): Don't call functions
6006         initialize_tdesc_amd64_*.  Add self tests.
6007         * arch/amd64.c (amd64_create_target_description): Add parameter
6008         is_linux.  Call set_tdesc_osabi if is_linux is true.
6009         * arch/amd64.h (amd64_create_target_description): Update the
6010         declaration.
6011         * arch/i386.c (i386_create_target_description): Add parameter
6012         is_linux.  Call set_tdesc_osabi if is_linux is true.
6013         * arch/i386.h (i386_create_target_description): Update
6014         declaration.
6015         * configure.tgt: Add i386.o to gdb_target_obs.
6016         * features/Makefile (XMLTOC): Remove i386/*.xml.
6017         * features/i386/amd64-avx-avx512.c: Remove.
6018         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6019         * features/i386/amd64-avx-mpx.c: Remove.
6020         * features/i386/amd64-avx.c: Remove.
6021         * features/i386/amd64-mpx.c: Remove.
6022         * features/i386/amd64.c: Remove.
6023         * features/i386/i386-avx-avx512.c: Remove.
6024         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6025         * features/i386/i386-avx-mpx.c: Remove.
6026         * features/i386/i386-avx.c: Remove.
6027         * features/i386/i386-mmx.c: Remove.
6028         * features/i386/i386-mpx.c: Remove.
6029         * features/i386/i386.c: Remove.
6030         * i386-tdep.c: Don't include features/i386/i386*.c., include
6031         target-descriptions.h and arch/i386.h.
6032         (i386_target_description): Create target descriptions.
6033         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6034         functions.  Do self tests.
6035
6036 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6037
6038         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6039         * features/i386/amd64-avx-avx512-linux.c: Removed.
6040         * features/i386/amd64-avx-linux.c: Removed.
6041         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6042         * features/i386/amd64-avx-mpx-linux.c: Removed.
6043         * features/i386/amd64-linux.c: Removed.
6044         * features/i386/amd64-mpx-linux.c: Removed.
6045         * features/i386/x32-avx-avx512-linux.c: Removed.
6046         * features/i386/x32-avx-linux.c: Removed.
6047         * features/i386/x32-linux.c: Removed.
6048
6049 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6050
6051         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6052         features/i386/*.c.
6053         (amd64_linux_read_description): Call
6054         amd64_create_target_description.
6055         * arch/amd64.c: New file.
6056         * arch/amd64.h: New file.
6057         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6058         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6059
6060 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6061
6062         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6063         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6064         (amd64_linux_read_description): Create target descriptions.
6065         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6066         functions.  Add unit tests.
6067         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6068         x32-core.xml.
6069         * features/i386/64bit-avx.c: Generated.
6070         * features/i386/64bit-avx512.c: Generated.
6071         * features/i386/64bit-core.c: Generated.
6072         * features/i386/64bit-linux.c: Generated.
6073         * features/i386/64bit-mpx.c: Generated.
6074         * features/i386/64bit-pkeys.c: Generated.
6075         * features/i386/64bit-segments.c: Generated.
6076         * features/i386/64bit-sse.c: Generated.
6077         * features/i386/x32-core.c: Generated.
6078         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6079         c files for amd64-linux and x32-linux.
6080
6081 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6082
6083         * amd64-linux-tdep.c (amd64_linux_read_description): New
6084         function.
6085         (amd64_linux_core_read_description): Call
6086         amd64_linux_read_description.
6087         (amd64_linux_init_abi): Likewise.
6088         (amd64_x32_linux_init_abi): Likewise.
6089         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6090         * x86-linux-nat.c (x86_linux_read_description): Call
6091         amd64_linux_read_description.
6092
6093 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6094
6095         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6096         comments.
6097
6098 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6099
6100         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6101         * features/i386/i386-avx-avx512-linux.c: Remove.
6102         * features/i386/i386-avx-linux.c: Remove.
6103         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6104         * features/i386/i386-avx-mpx-linux.c: Remove.
6105         * features/i386/i386-linux.c: Remove.
6106         * features/i386/i386-mmx-linux.c: Remove.
6107         * features/i386/i386-mpx-linux.c: Remove.
6108
6109 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6110
6111         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6112         (SFILES): Add arch/i386.c.
6113         (HFILES_NO_SRCDIR): Add arch/i386.h.
6114         * arch/i386.c: New file.
6115         * arch/i386.h: New file.
6116         * arch/tdesc.h (allocate_target_description): Declare.
6117         (set_tdesc_architecture): Declare.
6118         (set_tdesc_osabi): Declare.
6119         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6120         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6121         include arch/i386.h.
6122         (i386_linux_read_description): Remove code and call
6123         i386_create_target_description.
6124         (set_tdesc_architecture): New function.
6125         (set_tdesc_osabi): New function.
6126         * target-descriptions.h (allocate_target_description): Remove.
6127
6128 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6129
6130         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6131         * target-descriptions.c (tdesc_create_feature): Likewise, and
6132         adjust code.
6133         * features/i386/32bit-avx.c: Re-generated.
6134         * features/i386/32bit-avx512.c: Re-generated.
6135         * features/i386/32bit-core.c: Re-generated.
6136         * features/i386/32bit-linux.c: Re-generated.
6137         * features/i386/32bit-mpx.c: Re-generated.
6138         * features/i386/32bit-pkeys.c: Re-generated.
6139         * features/i386/32bit-sse.c: Re-generated.
6140
6141 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6142
6143         * regformats/regdef.h (struct reg): Override operator == and !=.
6144
6145 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6146
6147         * arch/tdesc.h: New file.
6148         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6149         * target-descriptions.c: Update comments.
6150         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6151         declarations.
6152         * features/i386/32bit-avx.c: Re-generated.
6153         * features/i386/32bit-avx512.c: Re-generated.
6154         * features/i386/32bit-core.c: Re-generated.
6155         * features/i386/32bit-linux.c: Re-generated.
6156         * features/i386/32bit-mpx.c: Re-generated.
6157         * features/i386/32bit-pkeys.c: Re-generated.
6158         * features/i386/32bit-sse.c: Re-generated.
6159
6160 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6161
6162         * regformats/regdat.sh: Update generated code.
6163
6164 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6165
6166         * regformats/regdat.sh: Adjust code order.
6167
6168 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6169
6170         * expprint.c (dump_subexp_body_standard): Use constant format
6171         string in fprintf_filtered call.
6172
6173 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6174
6175         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6176         NetBSD/i386.
6177         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6178
6179 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6180
6181         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6182
6183 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6184
6185         * bsd-kvm.o: Define _KMEMUSER.
6186         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6187         * configure: Regenerate.
6188
6189 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6190
6191         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6192         * i386-fbsd-nat.c: Likewise.
6193
6194 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6195
6196         * unittests/array-view-selftests.c: Add include of <array>.
6197
6198 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6199
6200         * spu-tdep.c (flush_ea_cache): Add missing argument to
6201         call_function_by_hand.
6202
6203 2017-09-04  Pedro Alves  <palves@redhat.com>
6204
6205         * NEWS (Safer support for debugging with no debug info): New.
6206
6207 2017-09-04  Pedro Alves  <palves@redhat.com>
6208
6209         * c-exp.y (function_method, function_method_void): Add current
6210         instance flags to TYPE_INSTANCE.
6211         * dwarf2read.c (check_modifier): New.
6212         (compute_delayed_physnames): Assert that only C++ adds delayed
6213         physnames.  Mark fn_fields as const/volatile depending on
6214         physname.
6215         * eval.c (make_params): New type_instance_flags parameter.  Use
6216         it as the new type's instance flags.
6217         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6218         flags element and pass it to make_params.
6219         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6220         instance flags element.
6221         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6222         * gdbtypes.h: Include "enum-flags.h".
6223         (type_instance_flags): New enum-flags type.
6224         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6225         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6226         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6227         (follow_type_instance_flags): New function.
6228         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6229         * parser-defs.h (follow_type_instance_flags): Declare.
6230         * valops.c (value_struct_elt_for_reference): const/volatile must
6231         match too.
6232
6233 2017-09-04  Pedro Alves  <palves@redhat.com>
6234
6235         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6236         function/method scopes; lookup the nested name as a function local
6237         static variable.
6238
6239 2017-09-04  Pedro Alves  <palves@redhat.com>
6240
6241         (%type <voidval>): Add function_method.
6242         * c-exp.y (exp): New production for calls with no arguments.
6243         (function_method, function_method_void_or_typelist): New
6244         productions.
6245         (exp): New production for "method()::static_var".
6246         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6247         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6248         Handle OP_FUNC_STATIC_VAR.
6249         * parse.c (operator_length_standard):
6250         Handle OP_FUNC_STATIC_VAR.
6251
6252 2017-09-04  Pedro Alves  <palves@redhat.com>
6253
6254         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6255         handling.
6256         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6257         Ditto.
6258         * parse.c (operator_length_standard, operator_check_standard):
6259         Ditto.
6260         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6261
6262 2017-09-04  Pedro Alves  <palves@redhat.com>
6263
6264         * ax-gdb.c: Include "typeprint.h".
6265         (gen_expr_for_cast): New function.
6266         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6267         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6268         type is unknown.
6269         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6270         nodebug_data_symbol.
6271         * eval.c: Include "typeprint.h".
6272         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6273         Error out if symbol has unknown type.
6274         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6275         evaluate_subexp_for_cast.
6276         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6277         OP_VAR_MSYM_VALUE.
6278         (evaluate_subexp_for_cast): New function.
6279         * gdbtypes.c (init_nodebug_var_type): New function.
6280         (objfile_type): Use it to initialize types of variables with no
6281         debug info.
6282         * typeprint.c (error_unknown_type): New.
6283         * typeprint.h (error_unknown_type): New declaration.
6284         * compile/compile-c-types.c (convert_type_basic): Handle
6285         TYPE_CODE_ERROR; warn and fallback to int for variables with
6286         unknown type.
6287
6288 2017-09-04  Pedro Alves  <palves@redhat.com>
6289
6290         * eval.c (evaluate_var_value): New function, factored out from ...
6291         (evaluate_subexp_standard): ... here.
6292
6293 2017-09-04  Pedro Alves  <palves@redhat.com>
6294
6295         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6296         Remove useless assignments to 'op'.
6297
6298 2017-09-04  Pedro Alves  <palves@redhat.com>
6299
6300         * eval.c (eval_skip_value): New function.
6301         (evaluate_subexp_standard): Use it.
6302
6303 2017-09-04  Pedro Alves  <palves@redhat.com>
6304
6305         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6306         function name from symbol/minsym and pass it to
6307         error_call_unknown_return_type.
6308
6309 2017-09-04  Pedro Alves  <palves@redhat.com>
6310
6311         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6312         * ax-gdb.c (gen_msym_var_ref): New function.
6313         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6314         * eval.c (evaluate_var_msym_value): New function.
6315         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6316         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6317         to call_function_by_hand.
6318         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6319         Handle OP_VAR_MSYM_VALUE.
6320         (union exp_element) <msymbol>: New field.
6321         * minsyms.h (struct type): Forward declare.
6322         (find_minsym_type_and_address): Declare.
6323         * parse.c (write_exp_elt_msym): New function.
6324         (write_exp_msymbol): Delete, refactored as ...
6325         (find_minsym_type_and_address): ... this new function.
6326         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6327         (operator_length_standard, operator_check_standard): Handle
6328         OP_VAR_MSYM_VALUE.
6329         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6330
6331 2017-09-04  Pedro Alves  <palves@redhat.com>
6332
6333         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6334         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6335         unknown.
6336         * ada-typeprint.c (print_func_type): Handle functions with unknown
6337         return type.
6338         * c-typeprint.c (c_type_print_base): Handle functions and methods
6339         with unknown return type.
6340         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6341         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6342         * compile/compile-c-types.c: Include "objfiles.h".
6343         (convert_func): For functions with unknown return type, warn and
6344         default to int.
6345         * compile/compile-object-run.c (compile_object_run): Adjust call
6346         to call_function_by_hand_dummy.
6347         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6348         call_function_by_hand.
6349         * eval.c (evaluate_subexp_standard): Adjust calls to
6350         call_function_by_hand.  Handle functions and methods with unknown
6351         return type.  Pass expect_type to call_function_by_hand.
6352         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6353         return type.
6354         * gcore.c (call_target_sbrk): Adjust call to
6355         call_function_by_hand.
6356         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6357         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6358         an integer address type instead of nodebug.
6359         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6360         call_function_by_hand.
6361         * infcall.c (error_call_unknown_return_type): New function.
6362         (call_function_by_hand): New "default_return_type" parameter.
6363         Pass it down.
6364         (call_function_by_hand_dummy): New "default_return_type"
6365         parameter.  Use it instead of defaulting to int.  If there's no
6366         default and the return type is unknown, throw an error.  If
6367         there's a default return type, and the called function has no
6368         debug info, then assume the function is prototyped.
6369         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6370         New "default_return_type" parameter.
6371         (error_call_unknown_return_type): New declaration.
6372         * linux-fork.c (call_lseek): Cast return type of lseek.
6373         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6374         call_function_by_hand.
6375         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6376         calls to call_function_by_hand.
6377         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6378         return type.
6379         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6380         (value_nsstring, print_object_command): Adjust calls to
6381         call_function_by_hand.
6382         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6383         functions with unknown return type.
6384         (pascal_type_print_func_varspec_suffix): New function.
6385         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6386         TYPE_CODE_METHOD>: Use it.
6387         * python/py-value.c (valpy_call): Adjust call to
6388         call_function_by_hand.
6389         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6390         call_function_by_hand.
6391         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6392         call_function_by_hand.
6393         * valops.c (value_allocate_space_in_inferior): Adjust call to
6394         call_function_by_hand.
6395         * typeprint.c (type_print_unknown_return_type): New function.
6396         * typeprint.h (type_print_unknown_return_type): New declaration.
6397
6398 2017-09-04  Pedro Alves  <palves@redhat.com>
6399
6400         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6401         types with more than one parameter as prototyped.
6402
6403 2017-09-04  Pedro Alves  <palves@redhat.com>
6404
6405         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6406         (disassemble_command): Use gdb_disassembly_flags instead of bare
6407         int.
6408         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6409         (dump_insns, do_mixed_source_and_assembly_deprecated)
6410         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6411         Use gdb_disassembly_flags instead of bare int.
6412         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6413         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6414         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6415         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6416         (enum gdb_disassembly_flag): ... values of this new enumeration.
6417         (gdb_disassembly_flags): Define.
6418         (gdb_disassembly)
6419         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6420         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6421         gdb_disassembly_flags instead of bare int.
6422         * record-btrace.c (btrace_insn_history)
6423         (record_btrace_insn_history, record_btrace_insn_history_range)
6424         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6425         instead of bare int.
6426         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6427         Use gdb_disassembly_flags instead of bare int.
6428         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6429         Define.
6430         * target-delegates.c: Regenerate.
6431         * target.c (target_insn_history, target_insn_history_from)
6432         (target_insn_history_range): Use gdb_disassembly_flags instead of
6433         bare int.
6434         * target.h: Include "disasm.h".
6435         (struct target_ops) <to_insn_history, to_insn_history_from,
6436         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6437         int.
6438         (target_insn_history, target_insn_history_from)
6439         (target_insn_history_range): Use gdb_disassembly_flags instead of
6440         bare int.
6441
6442 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6443
6444         * cli/cli-script.c (build_command_line): For if/while commands,
6445         check whether args is empty.
6446
6447 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6448
6449         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6450         (enum command_control_type): Likewise.
6451         (struct command_line): Likewise.
6452         (free_command_lines): Likewise.
6453         (struct command_lines_deleter): Likewise.
6454         (command_line_up): Likewise.
6455         (read_command_lines): Likewise.
6456         (read_command_lines_1): Likewise.
6457         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6458         (enum command_control_type): Likewise.
6459         (struct command_line): Likewise.
6460         (free_command_lines): Likewise.
6461         (struct command_lines_deleter): Likewise.
6462         (command_line_up): Likewise.
6463         (read_command_lines): Likewise.
6464         (read_command_lines_1): Likewise.
6465         * breakpoint.h: Include cli/cli-script.h.
6466         * extension-priv.h: Likewise.
6467         * gdbcmd.h: Likewise.
6468
6469 2017-09-04  Pedro Alves  <palves@redhat.com>
6470
6471         * ada-lang.c (is_known_support_routine): Move sal declaration to
6472         where it is initialized.
6473         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6474         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6475         (clear_command, update_static_tracepoint): Remove init_sal
6476         references.  Move declarations closer to initializations.
6477         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6478         initializations.
6479         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6480         references.  Move sal declarations closer to initializations.
6481         * frame.c (find_frame_sal): Return a symtab_and_line via function
6482         return instead of output parameter.  Remove init_sal references.
6483         * frame.h (find_frame_sal): Return a symtab_and_line via function
6484         return instead of output parameter.
6485         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6486         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6487         instead of memset.
6488         (gdbscm_find_pc_line): Remove init_sal reference.
6489         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6490         references.  Move declarations closer to initializations.
6491         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6492         initializations.
6493         (finish_backward): Remove init_sal references.  Move declarations
6494         closer to initializations.
6495         * infrun.c (process_event_stop_test, handle_step_into_function)
6496         (insert_hp_step_resume_breakpoint_at_frame)
6497         (insert_step_resume_breakpoint_at_caller): Likewise.
6498         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6499         (symbol_to_sal): Likewise.
6500         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6501         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6502         to its initialization.
6503         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6504         init_sal references.  Move declarations closer to initializations.
6505         * source.c (get_current_source_symtab_and_line): Remove brace
6506         initialization.
6507         (set_current_source_symtab_and_line): Now takes the sal by const
6508         reference.  Remove brace initialization.
6509         (line_info): Remove init_sal reference.
6510         * source.h (set_current_source_symtab_and_line): Now takes a
6511         symtab_and_line via const reference.
6512         * stack.c (set_current_sal_from_frame): Adjust.
6513         (print_frame_info): Adjust.
6514         (get_last_displayed_sal): Return the sal via function return
6515         instead of via output parameter.  Simplify.
6516         (frame_info): Adjust.
6517         * stack.h (get_last_displayed_sal): Return the sal via function
6518         return instead of via output parameter.
6519         * symtab.c (init_sal): Delete.
6520         (find_pc_sect_line): Remove init_sal references.  Move
6521         declarations closer to initializations.
6522         (find_function_start_sal): Remove init_sal references.  Move
6523         declarations closer to initializations.
6524         * symtab.h (struct symtab_and_line): In-class initialize all
6525         fields.
6526         * tracepoint.c (set_traceframe_context)
6527         (print_one_static_tracepoint_marker): Remove init_sal references.
6528         Move declarations closer to initializations.
6529         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6530         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6531         declarations closer to initializations.
6532         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6533         init_sal references.  Adjust.
6534
6535 2017-09-04  Pedro Alves  <palves@redhat.com>
6536
6537         * ax-gdb.c (agent_command_1): Use range-for.
6538         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6539         * breakpoint.c: Include "common/array-view.h".
6540         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6541         parameter from struct symtabs_and_lines to
6542         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6543         (breakpoint_sals_to_pc): Change sals parameter from struct
6544         symtabs_and_lines to std::vector reference.
6545         (check_fast_tracepoint_sals): Change sals parameter from struct
6546         symtabs_and_lines to std::array_view.  Use range-for.
6547         (decode_static_tracepoint_spec): Return a std::vector instead of
6548         symtabs_and_lines.  Update.
6549         (create_breakpoint): Update.
6550         (break_range_command, until_break_command, clear_command): Update.
6551         (base_breakpoint_decode_location, bkpt_decode_location)
6552         (bkpt_probe_create_sals_from_location)
6553         (bkpt_probe_decode_location, tracepoint_decode_location)
6554         (tracepoint_probe_decode_location)
6555         (strace_marker_create_sals_from_location): Return a std::vector
6556         instead of symtabs_and_lines.
6557         (strace_marker_create_breakpoints_sal): Update.
6558         (strace_marker_decode_location): Return a std::vector instead of
6559         symtabs_and_lines.  Update.
6560         (update_breakpoint_locations): Change struct symtabs_and_lines
6561         parameters to gdb::array_view.  Adjust.
6562         (location_to_sals): Return a std::vector instead of
6563         symtabs_and_lines.  Update.
6564         (breakpoint_re_set_default): Use std::vector instead of struct
6565         symtabs_and_lines.
6566         (decode_location_default): Return a std::vector instead of
6567         symtabs_and_lines.  Update.
6568         * breakpoint.h: Include "common/array-view.h".
6569         (struct breakpoint_ops) <decode_location>: Now returns a
6570         std::vector instead of returning a symtabs_and_lines via output
6571         parameter.
6572         (update_breakpoint_locations): Change sals parameters to use
6573         gdb::array_view.
6574         * cli/cli-cmds.c (edit_command, list_command): Update to use
6575         std::vector and gdb::array_view.
6576         (ambiguous_line_spec): Adjust to use gdb::array_view and
6577         range-for.
6578         (compare_symtabs): Rename to ...
6579         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6580         const reference and adjust.
6581         (filter_sals): Rewrite using std::vector and standard algorithms.
6582         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6583         (jump_command): Update to use std::vector.
6584         * linespec.c (struct linespec_state) <canonical_names>: Update
6585         comment.
6586         (add_sal_to_sals_basic): Delete.
6587         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6588         (decode_line_2, create_sals_line_offset)
6589         (convert_address_location_to_sals, convert_linespec_to_sals)
6590         (convert_explicit_location_to_sals, parse_linespec)
6591         (event_location_to_sals, decode_line_full, decode_line_1)
6592         (decode_line_with_current_source)
6593         (decode_line_with_last_displayed, decode_objc)
6594         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6595         (linespec_result::~linespec_result): Adjust to use std::vector
6596         instead of symtabs_and_lines.
6597         * linespec.h (linespec_sals::sals): Now a std::vector.
6598         (struct linespec_result): Use std::vector, bool, and in-class
6599         initialization.
6600         (decode_line_1, decode_line_with_current_source)
6601         (decode_line_with_last_displayed): Return std::vector.
6602         * macrocmd.c (info_macros_command): Use std::vector.
6603         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6604         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6605         std::vector.
6606         * probe.h (parse_probes): Return a std::vector.
6607         * python/python.c (gdbpy_decode_line): Use std::vector and
6608         gdb::array_view.
6609         * source.c (select_source_symtab, line_info): Use std::vector.
6610         * stack.c (func_command): Use std::vector.
6611         * symtab.h (struct symtabs_and_lines): Delete.
6612         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6613
6614 2017-09-04  Pedro Alves  <palves@redhat.com>
6615
6616         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6617         unittests/array-view-selftests.c.
6618         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6619         * common/array-view.h: New file.
6620         * unittests/array-view-selftests.c: New file.
6621
6622 2017-09-04  Pedro Alves  <palves@redhat.com>
6623
6624         * cli/cli-cmds.c (edit_command): Pass message to
6625         ambiguous_line_spec.
6626         (list_command): Pass message to ambiguous_line_spec.  Say
6627         "first"/"last" instead of "start" and "end" to be consistent with
6628         the manual.
6629         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6630         them to print formatted message.
6631
6632 2017-09-04  Pedro Alves  <palves@redhat.com>
6633
6634         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6635         ftrace_update_insns by reference instead of pointer.
6636
6637 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6638
6639         * i386-go32-tdep.c: Include x86-xstate.h.
6640         (i386_go32_init_abi): Call i386_target_description.
6641         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6642         if xcr0 is X86_XSTATE_X87_MASK.
6643         * i386-tdep.h (tdesc_i386): Remove the declaration.
6644         (tdesc_i386_mmx): Likewise.
6645
6646 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6647
6648         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6649         X86_XSTATE_SSE_MASK instead of 0.
6650
6651 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6652
6653         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6654         i386_target_description.
6655         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6656         i386_target_description.
6657         * i386-tdep.c (i386_gdbarch_init): Likewise.
6658
6659 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6660
6661         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6662         (x86_darwin_init_abi_64): Call amd64_target_description.
6663         * amd64-dicos-tdep.c: Likewise.
6664         * amd64-fbsd-nat.c: Likewise.
6665         * amd64-fbsd-tdep.c: Likewise.
6666         * amd64-nbsd-tdep.c: Likewise.
6667         * amd64-obsd-tdep.c: Likewise.
6668         * amd64-sol2-tdep.c: Likewise.
6669         * amd64-windows-tdep.c: Likewise.
6670         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6671
6672 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6673
6674         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6675         (btrace_function) <insn>: Change type to use std::vector.
6676         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6677         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6678         ftrace_update_insns, ftrace_compute_global_level_offset,
6679         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6680         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6681         change to std::vector.
6682         (ftrace_update_insns): Adjust to change to std::vector, change
6683         type of INSN parameter.
6684         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6685         * record-btrace.c (btrace_call_history_insn_range,
6686         btrace_compute_src_line_range,
6687         record_btrace_frame_prev_register): Adjust to change to
6688         std::vector.
6689         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6690         to change to std::vector.
6691
6692 2017-09-03  Tom Tromey  <tom@tromey.com>
6693
6694         * corefile.c (reopen_exec_file): Use std::string.
6695
6696 2017-09-03  Tom Tromey  <tom@tromey.com>
6697
6698         * compile/compile.c (compile_register_name_mangled): Return
6699         std::string.
6700         * compile/compile-loc2c.c (pushf_register_address): Update.
6701         (pushf_register): Update.
6702         * compile/compile-c-types.c (convert_array): Update.
6703         * compile/compile-c-symbols.c (generate_vla_size): Update.
6704         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6705         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6706         (convert_one_symbol): Update.
6707         (generate_c_for_for_one_variable): Update.
6708         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6709         std::string.
6710         (generate_register_struct): Update.
6711         * compile/compile-internal.h (c_get_range_decl_name): Return a
6712         std::string.
6713         (compile_register_name_mangled): Return std::string.
6714
6715 2017-09-03  Tom Tromey  <tom@tromey.com>
6716
6717         * utils.c (perror_string): Return a std::string.
6718         (throw_perror_with_name, perror_warning_with_name): Update.
6719
6720 2017-09-03  Tom Tromey  <tom@tromey.com>
6721
6722         * demangle.c (demangle_command): Use std::string,
6723         unique_xmalloc_ptr.
6724
6725 2017-09-03  Tom Tromey  <tom@tromey.com>
6726
6727         * cli/cli-setshow.c (do_set_command): Use std::string.
6728
6729 2017-09-03  Tom Tromey  <tom@tromey.com>
6730
6731         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6732
6733 2017-09-03  Tom Tromey  <tom@tromey.com>
6734
6735         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6736
6737 2017-09-03  Tom Tromey  <tom@tromey.com>
6738
6739         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6740         gdb::unique_xmalloc_ptr.
6741
6742 2017-09-03  Tom Tromey  <tom@tromey.com>
6743
6744         * thread.c (print_thread_info_1): Use string_printf.
6745         (thread_apply_command, thread_apply_all_command): Use
6746         std::string.
6747
6748 2017-09-03  Tom Tromey  <tom@tromey.com>
6749
6750         * valprint.c (val_print_string): Update.
6751         * gdbcore.h (memory_error_message): Return std::string.
6752         * corefile.c (memory_error_message): Return std::string.
6753         (memory_error): Update.
6754         * breakpoint.c (insert_bp_location): Update.
6755
6756 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6757
6758         * target/waitstatus.h (target_waitstatus_to_string): Change
6759         return type to std::string.
6760         * target/waitstatus.c (target_waitstatus_to_string): Return
6761         std::string.
6762         * target.h (target_waitstatus_to_string): Remove declaration.
6763         * infrun.c (resume, clear_proceed_status_thread,
6764         print_target_wait_results, do_target_wait, save_waitstatus,
6765         stop_all_threads): Adjust.
6766         * record-btrace.c (record_btrace_wait): Adjust.
6767         * target-debug.h
6768         (target_debug_print_struct_target_waitstatus_p): Adjust.
6769
6770 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6771
6772         PR gdb/22046
6773         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6774         detection.
6775
6776 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6777
6778         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6779         for setting/unsetting environment variables on the remote target.
6780         (New remote packets): Add entries for QEnvironmentHexEncoded,
6781         QEnvironmentUnset and QEnvironmentReset.
6782         * common/environ.c (gdb_environ::operator=): Extend method to
6783         handle m_user_set_env_list and m_user_unset_env_list.
6784         (gdb_environ::clear): Likewise.
6785         (match_var_in_string): Change type of first parameter from 'char
6786         *' to 'const char *'.
6787         (gdb_environ::set): Extend method to handle
6788         m_user_set_env_list and m_user_unset_env_list.
6789         (gdb_environ::unset): Likewise.
6790         (gdb_environ::clear_user_set_env): New method.
6791         (gdb_environ::user_set_envp): Likewise.
6792         (gdb_environ::user_unset_envp): Likewise.
6793         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6794         m_user_unset_env_list on move constructor/assignment.
6795         (unset): Add new default parameter 'update_unset_list = true'.
6796         (clear_user_set_env): New method.
6797         (user_set_envp): Likewise.
6798         (user_unset_envp): Likewise.
6799         (m_user_set_env_list): New std::set.
6800         (m_user_unset_env_list): Likewise.
6801         * common/rsp-low.c (hex2str): New function.
6802         (bin2hex): New overload for bin2hex function.
6803         * common/rsp-low.c (hex2str): New prototype.
6804         (str2hex): New overload prototype.
6805         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6806         QEnvironmentUnset and QEnvironmentReset.
6807         (remote_protocol_features): Add QEnvironmentHexEncoded,
6808         QEnvironmentUnset and QEnvironmentReset packets.
6809         (send_environment_packet): New function.
6810         (extended_remote_environment_support): Likewise.
6811         (extended_remote_create_inferior): Call
6812         extended_remote_environment_support.
6813         (_initialize_remote): Add QEnvironmentHexEncoded,
6814         QEnvironmentUnset and QEnvironmentReset packet configs.
6815         * unittests/environ-selftests.c (gdb_selftest_env_var):
6816         New variable.
6817         (test_vector_initialization): New function.
6818         (test_init_from_host_environ): Likewise.
6819         (test_reinit_from_host_environ): Likewise.
6820         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6821         Likewise.
6822         (test_unset_set_empty_vector): Likewise.
6823         (test_vector_clear): Likewise.
6824         (test_std_move): Likewise.
6825         (test_move_constructor):
6826         (test_self_move): Likewise.
6827         (test_set_unset_reset): Likewise.
6828         (run_tests): Rewrite in terms of the functions above.
6829
6830 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6831
6832         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6833         (adi_available): Use a temp variable of type CORE_ADDR as argument
6834         3 when calling target_auxv_search.
6835         (adi_normalize_address): Use masks and xor operators to calculate
6836         normalized address.
6837         (adi_read_versions, adi_write_versions, adi_print_versions)
6838         (do_examine, do_assign): Use paddress.
6839
6840 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6841
6842         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6843         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6844         out of loop and add supply of FIR.
6845         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6846         add collect of FIR.
6847
6848 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6849
6850         PR gdb/21827
6851         * cli/cli-script.c (define_command): Don't convert command name
6852         to lower case.
6853
6854 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6855
6856         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6857         Update all callers accordingly. Remove all code blocks handling
6858         the case where DISPP is not NULL.
6859
6860 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6861
6862         PR symtab/22003
6863         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6864         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6865         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6866
6867 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6868
6869         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6870         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6871         (read_comp_units_from_section): New parameter abbrev_section, use
6872         read_and_check_comp_unit_head, allocate signatured_type if needed.
6873         (create_all_comp_units): Update read_comp_units_from_section caller.
6874
6875 2017-08-23  Pedro Alves  <palves@redhat.com>
6876
6877         PR remote/21852
6878         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6879         to null_ptid and switch to thread without reading the registers
6880         after adding the inferior.
6881
6882 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6883
6884         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6885         compile-gcc.
6886         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6887         (compile_to_object): Implement compile_gcc.
6888         (_initialize_compile): Install "set compile-gcc".  Initialize
6889         compile_gcc.
6890
6891 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6892
6893         * compile/compile.c (compile_to_object): Conditionally call
6894         set_verbose.  Conditionally call compile or compile_v0.
6895
6896 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6897
6898         * sparc64-tdep.h: (adi_normalize_address): New export.
6899         * sparc-nat.h: (open_adi_tag_fd): New export.
6900         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6901         * sparc64-linux-tdep.c:
6902         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6903         (sparc64_linux_handle_segmentation_fault): New function.
6904         (sparc64_linux_init_abi): Register
6905         sparc64_linux_handle_segmentation_fault
6906         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6907         (sparc64_addr_bits_remove): New function.
6908         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6909         (MAX_PROC_NAME_SIZE): New macro.
6910         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6911         (sparc64adilist): New variable.
6912         (adi_proc_list): New variable.
6913         (find_adi_info): New function.
6914         (add_adi_info): New function.
6915         (get_adi_info_proc): New function.
6916         (get_adi_info): New function.
6917         (info_adi_command): New function.
6918         (read_maps_entry): New function.
6919         (adi_available): New function.
6920         (adi_normalize_address): New function.
6921         (adi_align_address): New function.
6922         (adi_convert_byte_count): New function.
6923         (adi_tag_fd): New function.
6924         (adi_is_addr_mapped): New function.
6925         (adi_read_versions): New function.
6926         (adi_write_versions): New function.
6927         (adi_print_versions): New function.
6928         (do_examine): New function.
6929         (do_assign): New function.
6930         (adi_examine_command): New function.
6931         (adi_assign_command): New function.
6932         (_initialize_sparc64_adi_tdep): New function.
6933
6934 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6935
6936         * breakpoint.c (breakpoints_info): Rename to ...
6937         (info_breakpoints_command): ... this.
6938         (watchpoints_info): Rename to ...
6939         (info_watchpoints_command): ... this.
6940         (tracepoints_info): Rename to ...
6941         (info_tracepoints_command): ... this.
6942         (_initialize_breakpoint): Adjust.
6943         * dcache.c (dcache_info): Rename to ...
6944         (info_display_command): ... this.
6945         (_initialize_dcache): Adjust.
6946         * frame.h (args_info): Rename to ...
6947         (info_args_command): ... this.
6948         (locals_info): Rename to ...
6949         (info_locals_command): ... this.
6950         * infcmd.c (nofp_registers_info): Rename to ...
6951         (info_registers_command): ... this.
6952         (float_info): Rename to ...
6953         (info_float_command): ... this.
6954         (program_info): Rename to ...
6955         (info_program_command): ... this.
6956         (all_registers_info): Rename to ...
6957         (info_all_registers_command): ... this.
6958         (vector_info): Rename to ...
6959         (info_vector_command): ... this.
6960         (float_info): Rename to ...
6961         (info_float_command): ... this.
6962         (_initialize_infcmd): Adjust.
6963         * inferior.h (term_info): Rename to ...
6964         (info_terminal_command): ... this.
6965         * inflow.c (term_info): Rename to ...
6966         (info_terminal_command): ... this.
6967         (_initialize_inflow): Adjust.
6968         * infrun.c (signals_info): Rename to ...
6969         (info_signals_command): ... this.
6970         (_initialize_infrun): Adjust.
6971         * objc-lang.c (classes_info): Rename to ...
6972         (info_classes_command): ... this.
6973         (selectors_info): Rename to ...
6974         (info_selectors_command): ... this.
6975         (_initialize_objc_language): Adjust.
6976         * printcmd.c (sym_info): Rename to ...
6977         (info_symbol_command): ... this.
6978         (address_info): Rename to ...
6979         (info_address_command): ... this.
6980         (display_info): Rename to ...
6981         (info_display_command): ... this.
6982         (_initialize_printcmd): Adjust.
6983         * reverse.c (bookmarks_info): Rename to ...
6984         (info_breakpoints_command): ... this.
6985         (_initialize_reverse): Adjust.
6986         * ser-go32.c (dos_info): Rename to ...
6987         (info_serial_command): ... this.
6988         (_initialize_ser_dos): Adjust.
6989         * skip.c (skip_info): Rename to ...
6990         (info_skip_command): ... this.
6991         (_initialize_step_skip): Adjust.
6992         * source.c (line_info): Rename to ...
6993         (info_line_command): ... this.
6994         (source_info): Rename to ...
6995         (info_source_command)
6996         * stack.c (frame_info): Rename to ...
6997         (info_frame_command): ... this.
6998         (locals_info): Rename to ...
6999         (info_locals_command): ... this.
7000         (args_info): Rename to ...
7001         (info_args_command): ... this.
7002         (_initialize_stack): Adjust.
7003         * symtab.c (sources_info): Rename to ...
7004         (info_sources_command): ... this.
7005         (variables_info): Rename to ...
7006         (info_variables_command): ... this.
7007         (functions_info): Rename to ...
7008         (info_functions_command): ... this.
7009         (types_info): Rename to ...
7010         (info_types_command): ... this.
7011         (_initialize_symtab): Adjust.
7012         * target.c (target_info): Rename to ...
7013         (info_target_command): ... this.
7014         (initialize_targets): Adjust.
7015         * tracepoint.c (tvariables_info): Rename to ...
7016         (info_tvariables_command): ... this.
7017         (scope_info): Rename to ...
7018         (info_scope_command): ... this.
7019         (trace_dump_actions): Adjust.
7020         (_initialize_tracepoint): Adjust.
7021
7022 2017-08-22  Tom Tromey  <tom@tromey.com>
7023
7024         * breakpoint.h (install_breakpoint): Update.
7025         * breakpoint.c (add_solib_catchpoint): Update.
7026         (install_breakpoint): Change argument to a std::unique_ptr.
7027         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7028         (create_breakpoint_sal, create_breakpoint): Update.
7029         (watch_command_1, catch_exec_command_1)
7030         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7031         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7032         Return the breakpoint.
7033         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7034         (new_single_step_breakpoint): Update.
7035         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7036         std::unique_ptr.
7037         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7038         std::unique_ptr.
7039         * break-catch-sig.c (create_signal_catchpoint): Use
7040         std::unique_ptr.
7041         * ada-lang.c (create_ada_exception_catchpoint): Use
7042         std::unique_ptr.
7043
7044 2017-08-22  Tom Tromey  <tom@tromey.com>
7045
7046         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7047
7048 2017-08-22  Tom Tromey  <tom@tromey.com>
7049
7050         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7051         (lookup_partial_symbol): Update.
7052
7053 2017-08-22  Tom Tromey  <tom@tromey.com>
7054
7055         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7056         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7057         (find_and_open_source, symtab_to_fullname): Update.
7058         * psymtab.c (psymtab_to_fullname): Update.
7059
7060 2017-08-22  Tom Tromey  <tom@tromey.com>
7061
7062         * exec.c (exec_file_attach): Update.
7063         * linux-thread-db.c (try_thread_db_load): Update.
7064         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7065         * utils.c (gdb_realpath): Change return type.
7066         (gdb_realpath_keepfile): Update.
7067         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7068         (_initialize_utils): Register the new self test.
7069         * source.c (openp): Update.
7070         (find_and_open_source): Update.
7071         * nto-tdep.c (nto_find_and_open_solib): Update.
7072         * main.c (set_gdb_data_directory): Update.
7073         (captured_main_1): Update.
7074         * dwarf2read.c (dwarf2_get_dwz_file): Update
7075         (dw2_map_symbol_filenames): Update.
7076         * auto-load.c (auto_load_safe_path_vec_update): Update.
7077         (filename_is_in_auto_load_safe_path_vec): Change type of
7078         "filename_realp".
7079         (auto_load_objfile_script): Update.
7080         (file_is_auto_load_safe): Update.  Use std::string.
7081         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7082
7083 2017-08-22  Tom Tromey  <tom@tromey.com>
7084
7085         * utils.c (gdb_realpath_keepfile): Return a
7086         gdb::unique_xmalloc_ptr.
7087         * exec.c (exec_file_attach): Update.
7088         * utils.h (gdb_realpath_keepfile): Return a
7089         gdb::unique_xmalloc_ptr.
7090
7091 2017-08-22  Tom Tromey  <tom@tromey.com>
7092
7093         * compile/compile.c (compile_file_command): Use
7094         gdb::unique_xmalloc_ptr, std::string.
7095         * utils.c (gdb_abspath): Change return type.
7096         * source.c (openp): Update.
7097         * objfiles.c (allocate_objfile): Update.
7098         * main.c (set_gdb_data_directory): Update.
7099         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7100
7101 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7102
7103         * cli-cmds.c (list_commands): List actual code around more than
7104         one location.
7105
7106 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7107
7108         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7109
7110 2017-08-21  Pedro Alves  <palves@redhat.com>
7111
7112         PR gdb/19487
7113         * c-exp.y (variable production): Handle function aliases.
7114         * minsyms.c (msymbol_is_text): New function.
7115         * minsyms.h (msymbol_is_text): Declare.
7116         * symtab.c (find_function_alias_target): New function.
7117         * symtab.h (find_function_alias_target): Declare.
7118
7119 2017-08-21  Pedro Alves  <palves@redhat.com>
7120
7121         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7122         typedefs.
7123         * typeprint.c (whatis_exp): If handling "whatis", and expression
7124         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7125         typedefs here.
7126         * valops.c (value_cast): Save "to" type before resolving
7127         stubs/typedefs.  Use that type as resulting value's type.
7128
7129 2017-08-18  Tom Tromey  <tom@tromey.com>
7130             Pedro Alves  <palves@redhat.com>
7131
7132         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7133         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7134         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7135         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7136         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7137         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7138         (linux_get_siginfo_data): Add "thread" argument.  Use
7139         scoped_restore.
7140         * linux-nat.c (linux_child_follow_fork)
7141         (check_stopped_by_watchpoint): Use scoped_restore.
7142         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7143         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7144         (restore_inferior_ptid, save_inferior_ptid): Remove.
7145         * btrace.c (btrace_fetch): Use scoped_restore.
7146         * bsd-uthread.c (bsd_uthread_fetch_registers)
7147         (bsd_uthread_store_registers): Use scoped_restore.
7148         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7149         scoped_restore.
7150         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7151         (aix_thread_xfer_partial): Use scoped_restore.
7152         * inferior.h (save_inferior_ptid): Remove.
7153
7154 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7155
7156         PR tdep/21818
7157         * arm-tdep.c (gdb_print_insn_arm): Mark
7158         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7159
7160 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7161
7162         * NEWS: Mention GDBserver's new option "--selftest".
7163         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7164         * selftest.c: Move it to common/selftest.c.
7165         * selftest.h: Move it to common/selftest.h.
7166         * selftest-arch.c (reset): New function.
7167         (tests_with_arch): Call reset.
7168
7169 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7170
7171         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7172         instead of exception_fprintf and printf_filtered.
7173
7174 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7175
7176         * selftest.c (register_self_test): Rename it to
7177         selftests::register_test.
7178         (run_self_tests): selftest::run_tests.
7179         * selftest.h: Update declarations.
7180         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7181         selftests::register_test_foreach_arch.
7182         * selftest-arch.h: Update declaration.
7183         * aarch64-tdep.c: Update.
7184         * arm-tdep.c: Likewise.
7185         * disasm-selftests.c: Likewise.
7186         * dwarf2loc.c: Likewise.
7187         * dwarf2-frame.c: Likewise.
7188         * findvar.c: Likewise.
7189         * gdbarch-selftests.c: Likewise.
7190         * maint.c (maintenance_selftest): Likewise.
7191         * regcache.c: Likewise.
7192         * rust-exp.y: Likewise.
7193         * selftest-arch.c: Likewise.
7194         * unittests/environ-selftests.c: Likewise.
7195         * unittests/function-view-selftests.c: Likewise.
7196         * unittests/offset-type-selftests.c: Likewise.
7197         * unittests/optional-selftests.c: Likewise.
7198         * unittests/scoped_restore-selftests.c: Likewise.
7199         * utils-selftests.c: Likewise.
7200
7201 2017-08-17  Pedro Alves  <palves@redhat.com>
7202
7203         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7204         local.
7205
7206 2017-08-17  Pedro Alves  <palves@redhat.com>
7207
7208         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7209         field.
7210         (reset_die_in_process): Delete, replaced by ...
7211         (process_die_scope): ... this new class.  Make it responsible for
7212         freeing cu->line_header too.
7213         (process_die): Use process_die_scope.
7214         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7215         cu->line_header_die_owner.  Don't release the line header if it's
7216         owned by the CU.
7217         (setup_type_unit_groups): Make the CU/DIE own the line header.
7218         Don't release the line header here.
7219
7220 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7221
7222         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7223
7224 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7225
7226         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7227         Single-Key mode
7228
7229 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7230
7231         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7232         mode command list.
7233
7234 2017-08-15  Stafford Horne  <shorne@gmail.com>
7235
7236         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7237
7238 2017-08-15  Stafford Horne  <shorne@gmail.com>
7239
7240         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7241
7242 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7243
7244         PR gdb/21954
7245         * infcmd.c (unset_environment_command): Use the 'clear' method on
7246         the environment instead of resetting it.
7247
7248 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7249
7250         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7251         platforms.
7252
7253 2017-08-14  Tom Tromey  <tom@tromey.com>
7254
7255         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7256         (print_binary_chars): Likewise.
7257         (BITS_IN_BYTES): Remove.
7258
7259 2017-08-14  Tom Tromey  <tom@tromey.com>
7260
7261         PR gdb/21675
7262         * valprint.c (LOW_ZERO): Change value to 034.
7263         (print_octal_chars): Add static_asserts for octal constants.
7264         * printcmd.c (print_scalar_formatted): Add 'd' case.
7265
7266 2017-08-11  Tom Tromey  <tom@tromey.com>
7267
7268         * symfile.c (add_symbol_file_command): Use std::vector.
7269
7270 2017-08-14  Tom Tromey  <tom@tromey.com>
7271
7272         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7273         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7274         std::move.
7275         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7276
7277 2017-08-11  Pedro Alves  <palves@redhat.com>
7278
7279         * infrun.c (process_event_stop_test): Adjust
7280         function_name_is_marked_for_skip call.
7281         * skip.c: Include <list>.
7282         (skiplist_entry): Make it a class with private fields, and
7283         getters/setters.
7284         (skiplist_entry_chain): Delete.
7285         (skiplist_entries): New.
7286         (skiplist_entry_count): Delete.
7287         (highest_skiplist_entry_num): New.
7288         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7289         (add_skiplist_entry): Delete.
7290         (skiplist_entry::skiplist_entry): New.
7291         (skiplist_entry::add_entry): New.
7292         (skip_file_command, skip_function): Adjust.
7293         (compile_skip_regexp): Delete.
7294         (skip_command): Don't compile regexp here.  Adjust to use
7295         skiplist_entry::add_entry.
7296         (skip_info): Adjust to use range-for and getters.
7297         (skip_enable_command, skip_disable_command): Adjust to use
7298         range-for and setters.
7299         (skip_delete_command): Adjust to use std::list.
7300         (add_skiplist_entry): Delete.
7301         (skip_file_p): Delete, refactored as ...
7302         (skiplist_entry::do_skip_file_p): ... this new method.
7303         (skip_gfile_p): Delete, refactored as ...
7304         (skiplist_entry::do_gskip_file_p): ... this new method.
7305         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7306         (skiplist_entry::skip_function_p): ... this new method.
7307         (function_name_is_marked_for_skip): Now returns bool, and takes
7308         the function sal by const reference.  Adjust to use range-for and
7309         skiplist_entry methods.
7310         (_initialize_step_skip): Remove references to
7311         skiplist_entry_chain, skiplist_entry_count.
7312         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7313         takes the function sal by const reference.
7314
7315 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7316
7317         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7318         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7319         (dwarf2_frame_cache):
7320         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7321         RETURN_MASK_ALL and set *this_case to NULL.
7322         * frame-unwind.h: Update comments.
7323
7324 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7325
7326         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7327         (dwarf2_frame_state_copy_regs): Remove.
7328         (dwarf2_frame_state_free_regs): Remove.
7329         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7330         (dwarf2_restore_rule): Call method .alloc_regs instead of
7331         dwarf2_frame_state_alloc_regs.
7332         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7333         constructor.  Call std::move.
7334         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7335         (dwarf2_frame_cache): Likewise.
7336
7337         [GDB_SELF_TEST]: Include selftest.h and
7338         selftest-arch.h.
7339         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7340         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7341         execute_cfa_program_test.
7342
7343         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7344         copy ctor, assignment operator, move assignment.
7345         <alloc_regs>: New method.
7346         <swap>: New method.
7347         (struct dwarf2_frame_state): Delete dtor.
7348         (dwarf2_frame_state_alloc_regs): Remove declaration.
7349         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7350         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7351
7352 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7353
7354         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7355         (dwarf2_frame_state::dwarf2_frame_state): New.
7356         (dwarf2_frame_state::~dwarf2_frame_state): New.
7357         (dwarf2_fetch_cfa_info): Update.
7358         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7359         rather than a pointer.  Update code.
7360         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7361         dtor.
7362         <data_align, code_align, retaddr_column>: Change them to const.
7363         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7364         to bool.
7365
7366 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7367
7368         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7369         <loc.exp>: New field.
7370         * dwarf2-frame.c (execute_cfa_program): Update.
7371         (dwarf2_frame_prev_register): Update.
7372
7373 2017-08-10  Pedro Alves  <palves@redhat.com>
7374
7375         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7376
7377 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7378
7379         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7380         (fbsd_pending_children): Use std::list.
7381         (fbsd_remember_child): Likewise.
7382         (fbsd_is_child_pending): Likewise.
7383         (fbsd_pending_vfork_done): Use std::forward_list.
7384         (fbsd_add_vfork_done): Likewise.
7385         (fbsd_is_vfork_done_pending): Likewise.
7386         (fbsd_next_vfork_done): Likewise.
7387
7388 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7389
7390         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7391         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7392         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7393         for `mapfilename'.
7394         (fbsd_xfer_partial): Use gdb::byte_vector.
7395         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7396
7397 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7398
7399         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7400         "filestuff.h".
7401         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7402
7403 2017-08-09  Tom Tromey  <tom@tromey.com>
7404
7405         * skip.c (skiplist_entry): New constructor.
7406         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7407         (skiplist_entry::file_is_glob): Now bool.
7408         (skiplist_entry::file, skiplist_entry::function): Now
7409         std::string.
7410         (make_skip_entry): Return a unique_ptr.  Use new.
7411         (free_skiplist_entry, free_skiplist_entry_cleanup)
7412         (make_free_skiplist_entry_cleanup): Remove.
7413         (skip_command, skip_disable_command, add_skiplist_entry)
7414         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7415         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7416         (function_name_is_marked_for_skip): Update.
7417         (skip_delete_command): Update.  Use delete.
7418
7419 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7420
7421         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7422         (aarch64_linux_core_read_description): New function.
7423         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7424
7425 2017-08-09  Pedro Alves  <palves@redhat.com>
7426
7427         * cp-name-parser.y (cp_comp_to_string): Return a
7428         gdb::unique_xmalloc_ptr<char>.
7429         * cp-support.c (replace_typedefs_qualified_name)
7430         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7431         (cp_canonicalize_string_full): Use op= instead of explicit
7432         convertion.
7433         (cp_class_name_from_physname, method_name_from_physname)
7434         (cp_func_name, cp_remove_params): Adjust to use
7435         gdb::unique_xmalloc_ptr<char>.
7436         * cp-support.h (cp_comp_to_string): Return a
7437         gdb::unique_xmalloc_ptr<char>.
7438         * python/py-type.c (typy_lookup_type): Adjust to use
7439         gdb::unique_xmalloc_ptr<char>.
7440
7441 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7442
7443         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7444
7445 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7446             Yao Qi  <yao.qi@linaro.org>
7447
7448         * cp-support.c (cp_canonicalize_string_full): Use
7449         gdb::unique_xmalloc_ptr<char>.
7450         (cp_canonicalize_string): Likewise.
7451
7452 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7453
7454         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7455         * regformats/i386/amd64-avx-avx512.dat: Remove.
7456         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7457         * regformats/i386/amd64-avx-mpx.dat:Remove.
7458         * regformats/i386/amd64-avx.dat: Remove.
7459         * regformats/i386/amd64-mpx.dat: Remove.
7460         * regformats/i386/i386-avx-avx512.dat: Remove.
7461         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7462         * regformats/i386/i386-avx-mpx.dat: Remove.
7463         * regformats/i386/i386-mmx.dat: Remove.
7464         * regformats/i386/i386-mpx.dat: Remove.
7465
7466 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7467
7468         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7469         * amd64-tdep.c: Don't include features/i386/x32*.c.
7470         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7471         functions.
7472         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7473         and i386/x32-avx-avx512.
7474         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7475         and i386/x32.xml.
7476         * features/i386/x32-avx-avx512.c: Removed.
7477         * features/i386/x32-avx-avx512.xml: Removed.
7478         * features/i386/x32-avx.c: Removed.
7479         * features/i386/x32-avx.xml: Removed.
7480         * features/i386/x32.c: Removed.
7481         * features/i386/x32.xml: Removed.
7482         * regformats/i386/x32-avx-avx512.dat: Removed.
7483         * regformats/i386/x32-avx.dat: Removed.
7484         * regformats/i386/x32.dat: Removed.
7485
7486 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7487
7488         PR breakpoints/21886
7489         * mem-break.c (default_memory_insert_breakpoint): Use
7490         `->placed_address' rather than `->reqstd_address' for the
7491         breakpoint location.
7492
7493 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7494
7495         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7496         assertions.
7497
7498 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7499
7500         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7501         a union of `tdep_info', `tdesc_data' and `id'.
7502         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7503         rather than `info.tdep_info'.
7504         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7505         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7506         * i386-tdep.c (i386_gdbarch_init): Likewise.
7507         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7508         * mips-tdep.c (mips_gdbarch_init): Likewise.
7509         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7510         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7511         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7512         `info.tdep_info'.
7513         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7514         `info.tdep_info'.
7515         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7516         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7517         `info.tdep_info'.
7518         * spu-tdep.c (spu_gdbarch_init): Likewise.
7519         * gdbarch.h: Regenerate.
7520
7521 2017-08-07  Leszek Swirski  <leszeks@google.com>
7522
7523         PR symtab/20899
7524         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7525
7526 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7527
7528         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7529         (gdbsim_open): Rename gdb_argv args object to argv.
7530
7531 2017-08-05  Tom Tromey  <tom@tromey.com>
7532
7533         * compile/compile-object-load.c (compile_object_load): Use
7534         gdb::unique_xmalloc_ptr.
7535         * cli/cli-dump.c (scan_filename): Rename from
7536         scan_filename_with_cleanup.  Change return type.
7537         (scan_expression): Rename from scan_expression_with_cleanup.
7538         Change return type.
7539         (dump_memory_to_file, dump_value_to_file, restore_command):
7540         Use gdb::unique_xmalloc_ptr.  Update.
7541         * cli/cli-cmds.c (find_and_open_script): Use
7542         gdb::unique_xmalloc_ptr.
7543         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7544         * symmisc.c (maintenance_print_symbols)
7545         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7546         * symfile.c (symfile_bfd_open, generic_load)
7547         (add_symbol_file_command, remove_symbol_file_command): Use
7548         gdb::unique_xmalloc_ptr.
7549         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7550         * psymtab.c (maintenance_print_psymbols): Use
7551         gdb::unique_xmalloc_ptr.
7552         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7553         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7554         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7555         (reload_shared_libraries_1): Likewise.
7556
7557 2017-08-05  Tom Tromey  <tom@tromey.com>
7558
7559         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7560         (rust_op_vector, rust_set_vector): New typedefs.
7561         (current_parser): New global.
7562         (work_obstack): Change to pointer type.  Update all users.
7563         (rust_ast, pstate): Remove globals.
7564         (struct rust_parser): New.
7565         (%union) <params, field_inits>: Change type.
7566         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7567         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7568         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7569         (convert_params_to_types, convert_params_to_expression): Change
7570         type of "params".
7571         (ast_string): Change type of "fields".
7572         (rust_parse): Make a rust_parser.  Remove cleanups.
7573         (rust_lex_tests): Make and install an auto_obstack.
7574
7575 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7576
7577         * configure.srv (ipa_x32_linux_regobj): New.
7578         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7579         instead of X86_TDESC_AVX512.
7580         (initialize_low_tracepoint): Call
7581         init_registers_x32_avx_avx512_linux.
7582
7583 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7584
7585         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7586
7587 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7588
7589         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7590
7591 2017-08-03  Tom Tromey  <tom@tromey.com>
7592
7593         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7594         Remove.
7595         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7596
7597 2017-08-03  Tom Tromey  <tom@tromey.com>
7598
7599         * python/py-param.c (compute_enum_values): Use gdb_argv.
7600
7601 2017-08-03  Tom Tromey  <tom@tromey.com>
7602
7603         * utils.h (struct gdb_argv_deleter): New.
7604         (gdb_argv): New class.
7605         * utils.c (gdb_argv::reset): New method.
7606         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7607         * tracefile.c (tsave_command): Use gdb_argv.
7608         * top.c (new_ui_command): Use gdb_argv.
7609         * symmisc.c (maintenance_print_symbols)
7610         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7611         * symfile.c (symbol_file_command, generic_load)
7612         (remove_symbol_file_command): Use gdb_argv.
7613         * stack.c (backtrace_command): Use gdb_argv.
7614         * source.c (add_path, show_substitute_path_command)
7615         (unset_substitute_path_command, set_substitute_path_command):
7616         Use gdb_argv.
7617         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7618         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7619         * remote.c (extended_remote_run, remote_put_command)
7620         (remote_get_command, remote_delete_command): Use gdb_argv.
7621         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7622         (gdbsim_open): Use gdb_argv.
7623         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7624         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7625         * procfs.c (procfs_info_proc): Use gdb_argv.
7626         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7627         * infrun.c (handle_command): Use gdb_argv.
7628         * inferior.c (add_inferior_command, clone_inferior_command):
7629         Use gdb_argv.
7630         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7631         * exec.c (exec_file_command): Use gdb_argv.
7632         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7633         * compile/compile.c (build_argc_argv): Use gdb_argv.
7634
7635 2017-08-03  Tom Tromey  <tom@tromey.com>
7636
7637         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7638
7639 2017-08-03  Tom Tromey  <tom@tromey.com>
7640
7641         * python/python.c (compute_python_string): Return std::string.
7642         (gdbpy_eval_from_control_command): Update.
7643         (do_start_initialization): Use std::string.
7644         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7645         xstrprintf.
7646         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7647         xstrprintf.
7648
7649 2017-08-03  Tom Tromey  <tom@tromey.com>
7650
7651         * top.h (do_restore_instream_cleanup): Remove.
7652         * top.c (do_restore_instream_cleanup): Remove.
7653         (read_command_file): Use scoped_restore.
7654         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7655
7656 2017-08-03  Tom Tromey  <tom@tromey.com>
7657
7658         * cli/cli-script.c (execute_user_command)
7659         (execute_control_command): Use scoped_restore.
7660
7661 2017-08-03  Tom Tromey  <tom@tromey.com>
7662
7663         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7664         (execute_user_command): Remove user_call_depth; use
7665         user_args_stack's size instead.
7666
7667 2017-08-03  Tom Tromey  <tom@tromey.com>
7668
7669         * top.h (in_user_command): Remove.
7670         * top.c (in_user_command): Remove.
7671         * cli/cli-script.c (do_restore_user_call_depth)
7672         (execute_user_command): Update.
7673
7674 2017-08-03  Tom Tromey  <tom@tromey.com>
7675
7676         * valops.c (search_struct_method): Use gdb::byte_vector.
7677         * valarith.c (value_concat): Use std::vector.
7678         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7679         (simple_search_memory): Likewise.
7680         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7681         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7682         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7683         * elfread.c (elf_rel_plt_read): Use std::string.
7684         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7685         * cli/cli-dump.c (restore_section_callback): Use
7686         gdb::byte_vector.
7687
7688 2017-08-03  Tom Tromey  <tom@tromey.com>
7689
7690         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7691
7692 2017-08-03  Tom Tromey  <tom@tromey.com>
7693
7694         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7695         (tui_register_format): Use scoped_restore.
7696
7697 2017-08-03  Tom Tromey  <tom@tromey.com>
7698
7699         * reverse.c (exec_direction_default): Remove.
7700         (exec_reverse_once): Use scoped_restore.
7701         * remote.c (restore_remote_timeout): Remove.
7702         (remote_flash_erase, remote_flash_write, remote_flash_done)
7703         (readchar, remote_serial_write): Use scoped_restore.
7704         * cli/cli-script.c (struct source_cleanup_lines_args)
7705         (source_cleanup_lines): Remove.
7706         (script_from_file): Use scoped_restore.
7707         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7708         (source_command): Use scoped_restore.
7709
7710 2017-08-03  Tom Tromey  <tom@tromey.com>
7711
7712         * utils.h (make_cleanup_free_so): Remove.
7713         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7714         * solist.h (struct so_deleter): New.
7715         (so_list_up): New typedef.
7716         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7717
7718 2017-08-03  Tom Tromey  <tom@tromey.com>
7719
7720         * utils.h (make_cleanup_restore_current_language): Remove.
7721         * utils.c (do_restore_current_language)
7722         (make_cleanup_restore_current_language): Remove.
7723         * parse.c (parse_exp_in_context_1)
7724         (parse_expression_with_language): Use
7725         scoped_restore_current_language.
7726         * mi/mi-main.c (mi_cmd_execute): Use
7727         scoped_restore_current_language.
7728         * language.h (scoped_restore_current_language): New class.
7729
7730 2017-08-03  Tom Tromey  <tom@tromey.com>
7731
7732         * compile/compile.c (cleanup_unlink_file): Remove.
7733         (compile_to_object): Use gdb::unlinker.
7734         (eval_compile_command): Likewise.
7735
7736 2017-08-03  Tom Tromey  <tom@tromey.com>
7737
7738         * utils.h (make_cleanup_fclose): Remove.
7739         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7740
7741 2017-08-03  Tom Tromey  <tom@tromey.com>
7742
7743         * top.c (open_terminal_stream): Return gdb_file_up.
7744         (new_ui_command): Update.
7745
7746 2017-08-03  Tom Tromey  <tom@tromey.com>
7747
7748         * source.c (print_source_lines_base, forward_search_command)
7749         (reverse_search_command): Use gdb_file_up.
7750
7751 2017-08-03  Tom Tromey  <tom@tromey.com>
7752
7753         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7754
7755 2017-08-03  Tom Tromey  <tom@tromey.com>
7756
7757         * cli/cli-cmds.c (find_and_open_script): Change return type.
7758         Remove "streamp" and "full_path" parameters.
7759         (source_script_with_search): Update.
7760         * auto-load.c (source_script_file): Update.
7761         * cli/cli-cmds.h (find_and_open_script): Change type.
7762         (open_script): New struct.
7763
7764 2017-08-03  Tom Tromey  <tom@tromey.com>
7765
7766         * xml-support.c (xml_fetch_content_from_file): Update.
7767         * ui-file.c (stdio_file::open): Update.
7768         * tracefile-tfile.c (tfile_start): Update.
7769         * remote.c (remote_file_put, remote_file_get): Update.
7770         * nat/linux-procfs.c (linux_proc_get_int)
7771         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7772         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7773         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7774         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7775         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7776         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7777         * linux-nat.c (linux_proc_pending_signals): Update.
7778         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7779         (file_closer): Remove.
7780         * compile/compile.c (compile_to_object): Update.
7781         * common/filestuff.h (struct gdb_file_deleter): New.
7782         (gdb_file_up): New typedef.
7783         (gdb_fopen_cloexec): Change return type.
7784         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7785         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7786         (dump_binary_file, restore_binary_file): Update.
7787         * auto-load.c (auto_load_objfile_script_1): Update.
7788
7789 2017-08-03  Tom Tromey  <tom@tromey.com>
7790
7791         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7792         (info_static_tracepoint_markers_command): Likewise.
7793         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7794         * skip.c (skip_info): Use ui_out_emit_table.
7795         * progspace.c (print_program_space): Use ui_out_emit_table.
7796         * osdata.c (info_osdata): Use ui_out_emit_table.
7797         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7798         ui_out_emit_table.
7799         * linux-thread-db.c (info_auto_load_libthread_db): Use
7800         ui_out_emit_table.
7801         * inferior.c (print_inferior): Use ui_out_emit_table.
7802         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7803         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7804         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7805         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7806         * ui-out.h (class ui_out_emit_table): New.
7807
7808 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7809
7810         * mips-tdep.c (mips_fpu_type_str): New function.
7811         (mips_dump_tdep): Call it.
7812
7813 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7814
7815         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7816         `->mips_fpu_type'.
7817
7818 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7819
7820         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7821
7822 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7823
7824         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7825
7826 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7827
7828         * cli/cli-cmds.c (maintenancechecklist): New variable.
7829         * gdbcmd.h (maintenancechecklist): Declare it.
7830         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7831         Call i386_linux_read_description with different masks.
7832         * maint.c (maintenance_check_command): New function.
7833         (_initialize_maint_cmds): Call add_prefix_cmd.
7834         * target-descriptions.c (tdesc_reg): override operator != and ==.
7835         (tdesc_type): Likewise.
7836         (tdesc_feature): Likewise.
7837         (target_desc): Likewise.
7838         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7839         (maintenance_check_xml_descriptions): New function.
7840         (_initialize_target_descriptions) Add command "xml-descriptions".
7841         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7842
7843 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7844
7845         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7846         Include features/i386/32bit-*.c.
7847         (i386_linux_read_description): Generate target description if it
7848         doesn't exist.
7849         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7850         functions.
7851         * features/i386/32bit-linux.c: Re-generated.
7852         * features/i386/32bit-sse.c: Likewise.
7853         * target-descriptions.c (print_c_feature::visit): Print code to
7854         set register number if needed.
7855         (print_c_feature) <m_next_regnum>: New field.
7856
7857 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7858
7859         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7860         (FEATURE_XMLFILES): New.
7861         (FEATURE_CFILES): New.
7862         New rules.
7863         (clean-cfiles): Remove generated c files.
7864         * features/i386/32bit-avx.c: Generated.
7865         * features/i386/32bit-avx512.c: Generated.
7866         * features/i386/32bit-core.c: Generated.
7867         * features/i386/32bit-linux.c: Generated.
7868         * features/i386/32bit-mpx.c: Generated.
7869         * features/i386/32bit-pkeys.c: Generated.
7870         * features/i386/32bit-sse.c: Generated.
7871         * target-descriptions.c: Include algorithm.
7872         (tdesc_element_visitor): Add method visit_end.
7873         (print_c_tdesc): Implement visit_end.
7874         (print_c_tdesc:: m_filename_after_features): Move it to
7875         protected.
7876         (print_c_feature): New class.
7877         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7878         name starts with "i386/32bit-".
7879
7880 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7881
7882         * target-descriptions.c (tdesc_element_visitor): New class.
7883         (tdesc_element): New class.
7884         (tdesc_reg): Inherit from tdesc_element.
7885         (tdesc_reg::accept): New function.
7886         (tdesc_type): Inherit from tdesc_element.
7887         (tdesc_type::accept): New function.
7888         (tdesc_feature): Inherit from tdesc_element.
7889         (tdesc_feature::accept): New function.
7890         (target_desc): Inherit from tdesc_element.
7891         (target_desc::target_desc): New.
7892         (target_desc::~target_desc): New.
7893         (target_desc::accept): New.
7894         (allocate_target_description): Use new.
7895         (free_target_description): Use delete.
7896         (print_c_tdesc): New class.
7897         (maint_print_c_tdesc_cmd): Adjust.
7898
7899         * features/aarch64.c: Re-generated.
7900         * features/arc-arcompact.c: Re-generated.
7901         * features/arc-v2.c: Re-generated.
7902         * features/arm/arm-with-iwmmxt.c: Re-generated.
7903         * features/arm/arm-with-m.c: Re-generated.
7904         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7905         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7906         * features/arm/arm-with-neon.c: Re-generated.
7907         * features/arm/arm-with-vfpv2.c: Re-generated.
7908         * features/arm/arm-with-vfpv3.c: Re-generated.
7909         * features/i386/amd64-avx-avx512.c: Re-generated.
7910         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7911         * features/i386/amd64-avx.c: Re-generated.
7912         * features/i386/amd64-avx-linux.c: Re-generated.
7913         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7914         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7915         * features/i386/amd64-avx-mpx.c: Re-generated.
7916         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7917         * features/i386/amd64.c: Re-generated.
7918         * features/i386/amd64-linux.c: Re-generated.
7919         * features/i386/amd64-mpx.c: Re-generated.
7920         * features/i386/amd64-mpx-linux.c: Re-generated.
7921         * features/i386/i386-avx-avx512.c: Re-generated.
7922         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7923         * features/i386/i386-avx.c: Re-generated.
7924         * features/i386/i386-avx-linux.c: Re-generated.
7925         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7926         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7927         * features/i386/i386-avx-mpx.c: Re-generated.
7928         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7929         * features/i386/i386.c: Re-generated.
7930         * features/i386/i386-linux.c: Re-generated.
7931         * features/i386/i386-mmx.c: Re-generated.
7932         * features/i386/i386-mmx-linux.c: Re-generated.
7933         * features/i386/i386-mpx.c: Re-generated.
7934         * features/i386/i386-mpx-linux.c: Re-generated.
7935         * features/i386/x32-avx-avx512.c: Re-generated.
7936         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7937         * features/i386/x32-avx.c: Re-generated.
7938         * features/i386/x32-avx-linux.c: Re-generated.
7939         * features/i386/x32.c: Re-generated.
7940         * features/i386/x32-linux.c: Re-generated.
7941         * features/microblaze.c: Re-generated.
7942         * features/microblaze-with-stack-protect.c: Re-generated.
7943         * features/mips64-dsp-linux.c: Re-generated.
7944         * features/mips64-linux.c: Re-generated.
7945         * features/mips-dsp-linux.c: Re-generated.
7946         * features/mips-linux.c: Re-generated.
7947         * features/nds32.c: Re-generated.
7948         * features/nios2.c: Re-generated.
7949         * features/nios2-linux.c: Re-generated.
7950         * features/rs6000/powerpc-32.c: Re-generated.
7951         * features/rs6000/powerpc-32l.c: Re-generated.
7952         * features/rs6000/powerpc-403.c: Re-generated.
7953         * features/rs6000/powerpc-403gc.c : Re-generated.
7954         * features/rs6000/powerpc-405.c: Re-generated.
7955         * features/rs6000/powerpc-505.c: Re-generated.
7956         * features/rs6000/powerpc-601.c: Re-generated.
7957         * features/rs6000/powerpc-602.c: Re-generated.
7958         * features/rs6000/powerpc-603.c: Re-generated.
7959         * features/rs6000/powerpc-604.c: Re-generated.
7960         * features/rs6000/powerpc-64.c: Re-generated.
7961         * features/rs6000/powerpc-64l.c: Re-generated.
7962         * features/rs6000/powerpc-7400.c: Re-generated.
7963         * features/rs6000/powerpc-750.c: Re-generated.
7964         * features/rs6000/powerpc-860.c: Re-generated.
7965         * features/rs6000/powerpc-altivec32.c: Re-generated.
7966         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7967         * features/rs6000/powerpc-altivec64.c: Re-generated.
7968         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7969         * features/rs6000/powerpc-cell32l.c: Re-generated.
7970         * features/rs6000/powerpc-cell64l.c: Re-generated.
7971         * features/rs6000/powerpc-e500.c: Re-generated.
7972         * features/rs6000/powerpc-e500l.c: Re-generated.
7973         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7974         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7975         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7976         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7977         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7978         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7979         * features/rs6000/powerpc-vsx32.c: Re-generated.
7980         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7981         * features/rs6000/powerpc-vsx64.c: Re-generated.
7982         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7983         * features/rs6000/rs6000.c: Re-generated.
7984         * features/s390-linux32.c: Re-generated.
7985         * features/s390-linux32v1.c: Re-generated.
7986         * features/s390-linux32v2.c: Re-generated.
7987         * features/s390-linux64.c: Re-generated.
7988         * features/s390-linux64v1.c: Re-generated.
7989         * features/s390-linux64v2.c: Re-generated.
7990         * features/s390-te-linux64.c: Re-generated.
7991         * features/s390-tevx-linux64.c: Re-generated.
7992         * features/s390-vx-linux64.c: Re-generated.
7993         * features/s390x-linux64.c: Re-generated.
7994         * features/s390x-linux64v1.c: Re-generated.
7995         * features/s390x-linux64v2.c: Re-generated.
7996         * features/s390x-te-linux64.c: Re-generated.
7997         * features/s390x-tevx-linux64.c: Re-generated.
7998         * features/s390x-vx-linux64.c: Re-generated.
7999         * features/sparc/sparc32-solaris.c: Re-generated.
8000         * features/sparc/sparc64-solaris.c: Re-generated.
8001         * features/tic6x-c62x.c: Re-generated.
8002         * features/tic6x-c62x-linux.c: Re-generated.
8003         * features/tic6x-c64x.c: Re-generated.
8004         * features/tic6x-c64x-linux.c: Re-generated.
8005         * features/tic6x-c64xp.c: Re-generated.
8006         * features/tic6x-c64xp-linux.c: Re-generated.
8007
8008 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8009
8010         * i386-linux-tdep.c (i386_linux_read_description): New function.
8011         (i386_linux_core_read_description): Call
8012         i386_linux_read_description.
8013         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8014         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8015         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8016         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8017         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8018         * x86-linux-nat.c (x86_linux_read_description): Call
8019         i386_linux_read_description.
8020
8021 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8022
8023         * NEWS: Mention it.
8024         * features/Makefile (%.c: %.xml): Pass the xml file name to
8025         command "maint print c-tdesc".
8026         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8027         name from 'arg'.
8028
8029 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8030
8031         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8032         in-class initialization.
8033         (tdesc_create_feature): Call new instead of XCNEW.
8034         (free_target_description): Ue delete.
8035
8036 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8037
8038         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8039
8040 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8041
8042         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8043         constant.
8044         (amd64_x32_init_abi): Likewise.
8045         * amd64-tdep.h (amd64_init_abi): Update declaration.
8046         (amd64_x32_init_abi): Likewise.
8047
8048 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8049
8050         PR tdep/21717
8051         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8052         condition for FPSCR.
8053         (arm_linux_store_inferior_registers): Likewise.
8054
8055 2017-07-22  Tom Tromey  <tom@tromey.com>
8056
8057         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8058         <syscalls_counts>: Now a std::vector.
8059         (get_catch_syscall_inferior_data): Use "new".
8060         (catch_syscall_inferior_data_cleanup): Use "delete".
8061         (insert_catch_syscall, remove_catch_syscall)
8062         (clear_syscall_counts): Update.
8063
8064 2017-07-22  Tom Tromey  <tom@tromey.com>
8065
8066         * break-catch-syscall.c (syscall_catchpoint)
8067         <syscalls_to_be_caught>: Now a std::vector<int>
8068         (~syscall_catchpoint): Remove.
8069         (insert_catch_syscall, remove_catch_syscall)
8070         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8071         (print_mention_catch_syscall, print_recreate_catch_syscall):
8072         Update.
8073         (create_syscall_event_catchpoint): Change type of "filter"
8074         parameter.
8075         (catch_syscall_split_args): Return a std::vector.
8076         (catch_syscall_command_1, catching_syscall_number_1): Update.
8077
8078 2017-07-22  Tom Tromey  <tom@tromey.com>
8079
8080         * break-catch-throw.c (struct exception_catchpoint)
8081         <exception_rx>: Now a std::string.
8082         (~exception_catchpoint): Remove.
8083         (print_one_detail_exception_catchpoint): Update.
8084         (handle_gnu_v3_exceptions): Change type of except_rx.
8085         (extract_exception_regexp): Return a std::string.
8086         (catch_exception_command_1): Update.
8087
8088 2017-07-22  Tom Tromey  <tom@tromey.com>
8089
8090         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8091         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8092         std::vector.
8093         <catch_all>: Now a bool.
8094         (~signal_catchpoint): Remove.
8095         (signal_catchpoint_insert_location)
8096         (signal_catchpoint_remove_location)
8097         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8098         (signal_catchpoint_print_mention)
8099         (signal_catchpoint_print_recreate)
8100         (signal_catchpoint_explains_signal): Update.
8101         (create_signal_catchpoint): Change type of "filter" and
8102         "catch_all".
8103         (catch_signal_split_args): Return a std::vector.  Change type of
8104         "catch_all".
8105         (catch_signal_command): Update.
8106
8107 2017-07-20  Pedro Alves  <palves@redhat.com>
8108
8109         * ada-lang.c (ada_language_defn): Make extern.
8110         (_initialize_ada_language): Remove add_language call.
8111         * c-lang.c (c_language_defn, cplus_language_defn)
8112         (asm_language_defn, minimal_language_defn): Make extern.
8113         (_initialize_c_language): Delete.
8114         * completer.c (compare_cstrings): Delete, moved to utils.h.
8115         * d-lang.c (d_language_defn): Make extern.
8116         (_initialize_d_language): Remove add_language calls.
8117         * defs.h (enum language): Add comment.
8118         * f-lang.c (f_language_defn): Make extern.
8119         (_initialize_f_language): Remove add_language call.
8120         * go-lang.c (go_language_defn): Make extern.
8121         (_initialize_go_language): Remove add_language call.
8122         * language.c: Include <algorithm>.
8123         (languages): Redefine as const array.
8124         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8125         (set_language_command): Handle "local".  Use for-range loop.
8126         (set_language): Remove loop.
8127         (language_enum): Rewrite.
8128         (language_def, language_str): Remove loops.
8129         (add_language): Delete.
8130         (add_set_language_command): New, based on add_languages.
8131         (skip_language_trampoline): Adjust.
8132         (local_language_defn): Delete.
8133         (language_gdbarch_post_init): Adjust.
8134         (_initialize_language): Remove add_language calls.  Call
8135         add_set_language_command.
8136         * language.h (add_language): Delete.
8137         (auto_language_defn)
8138         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8139         (asm_language_defn, c_language_defn, cplus_language_defn)
8140         (d_language_defn, f_language_defn, go_language_defn)
8141         (m2_language_defn, objc_language_defn, opencl_language_defn)
8142         (pascal_language_defn, rust_language_defn): Declare.
8143         * m2-lang.c (m2_language_defn): Make extern.
8144         (_initialize_m2_language): Remove add_language call.
8145         * objc-lang.c (objc_language_defn): Make extern.
8146         (_initialize_objc_language): Remove add_language call.
8147         * opencl-lang.c (opencl_language_defn): Make extern.
8148         (_initialize_opencl_language): Remove add_language call.
8149         * p-lang.c (pascal_language_defn): Make extern.
8150         (_initialize_pascal_language): Delete.
8151         * rust-lang.c (rust_language_defn): Make extern.
8152         (_initialize_rust_language): Delete.
8153         * utils.h (compare_cstrings): New static inline function.
8154
8155 2017-07-20  Pedro Alves  <palves@redhat.com>
8156
8157         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8158         (get_var_value): Constify parameters.
8159         (get_int_var_value): Change prototype.
8160         (to_fixed_range_type): Adjust.
8161         * ada-lang.h (get_int_var_value): Change prototype.
8162
8163 2017-07-20  Pedro Alves  <palves@redhat.com>
8164
8165         * dwarf2read.c (dw2_lookup_symbol): Use
8166         SYMBOL_MATCHES_SEARCH_NAME.
8167         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8168
8169 2017-07-20  Pedro Alves  <palves@redhat.com>
8170
8171         * block.c (block_iter_name_step, block_iter_name_first)
8172         (block_iter_name_next): Delete.
8173         (block_lookup_symbol_primary): Adjust to use
8174         dict_iter_match_first/dict_iter_match_next.
8175         * block.h (block_iter_name_first, block_iter_name_next): Delete
8176         declarations.
8177         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8178         dict_iter_match_first/dict_iter_match_next.
8179
8180 2017-07-20  Pedro Alves  <palves@redhat.com>
8181
8182         * cp-support.c (cp_find_first_component_aux): Add missing case for
8183         end of string.
8184
8185 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8186
8187         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8188         of dwo_cu's dwo_file.
8189
8190 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8191
8192         * remote.c (store_registers_using_G): Remove one line comment.
8193
8194 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8195
8196         * regcache.c (regcache_cpy): Simplify it.
8197         (regcache::cpy_no_passthrough): Remove it.
8198         * regcache.h (cpy_no_passthrough): Remove it.
8199         (regcache_dup, regcache_cpy): Update comments.
8200
8201 2017-07-18  Pedro Alves  <palves@redhat.com>
8202
8203         * remote-sim.c (sim_command_completer): Adjust to work with a
8204         completion_tracker instead of a VEC.
8205
8206 2017-07-17  Pedro Alves  <palves@redhat.com>
8207
8208         * completer.c (complete_source_filenames): New function.
8209         (complete_address_and_linespec_locations): New function.
8210         (location_completer): Use complete_address_and_linespec_locations.
8211         (completion_tracker::build_completion_result): Honor the tracker's
8212         request to suppress append.
8213         * completer.h (completion_tracker::suppress_append_ws)
8214         (completion_tracker::set_suppress_append_ws): New methods.
8215         (completion_tracker::m_suppress_append_ws): New field.
8216         (complete_source_filenames): New declaration.
8217         * linespec.c (linespec_complete_what): New.
8218         (struct ls_parser) <complete_what, completion_word,
8219         completion_quote_char, completion_quote_end, completion_tracker>:
8220         New fields.
8221         (string_find_incomplete_keyword_at_end): New.
8222         (linespec_lexer_lex_string): Record quote char.  If in completion
8223         mode, don't throw.
8224         (linespec_lexer_consume_token): Advance the completion word point.
8225         (linespec_lexer_peek_token): Save/restore completion info.
8226         (save_stream_and_consume_token): New.
8227         (set_completion_after_number): New.
8228         (linespec_parse_basic): Set what to complete next depending on
8229         token.  Handle function and label completions specially.
8230         (parse_linespec): Disable objc shortcut in completion mode.  Set
8231         what to complete next depending on token type.  Skip keyword if in
8232         completion mode.
8233         (complete_linespec_component, linespec_complete): New.
8234         * linespec.h (linespec_complete): Declare.
8235
8236 2017-07-17  Pedro Alves  <palves@redhat.com>
8237
8238         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8239         Handle 'operator<' / 'operator<<'.
8240
8241 2017-07-17  Pedro Alves  <palves@redhat.com>
8242
8243         * completer.c (collect_explicit_location_matches): Handle
8244         MATCH_LABEL.
8245         (convert_explicit_location_to_linespec): New, factored out from
8246         ...
8247         (convert_explicit_location_to_sals): ... this.
8248         (complete_label): New.
8249         (linespec_complete_label, find_label_symbols_in_block): New.
8250         (find_label_symbols): Add completion_mode parameter and adjust to
8251         call find_label_symbols_in_block.
8252         * linespec.h (linespec_complete_label): Declare.
8253
8254 2017-07-17  Pedro Alves  <palves@redhat.com>
8255
8256         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8257         complete_symbol_mode parameter.
8258         * cli/cli-cmds.c (complete_command): Get the completion result out
8259         of the handle_brkchars tracker if used a custom word point.
8260         * completer.c: Include "linespec.h".
8261         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8262         (advance_to_expression_complete_word_point): New.
8263         (completion_tracker::completes_to_completion_word): New.
8264         (complete_files_symbols): Pass down
8265         complete_symbol_mode::EXPRESSION.
8266         (explicit_options, probe_options): New.
8267         (collect_explicit_location_matches): Complete on the
8268         explictit_loc->foo instead of word.  Use
8269         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8270         keyword and options completions.
8271         (backup_text_ptr): Delete.
8272         (skip_keyword): New.
8273         (complete_explicit_location): Remove 'word' parameter.  Add
8274         language, quoted_arg_start and quoted_arg_end parameters.
8275         Rewrite, parsing left to right.
8276         (location_completer): Rewrite.
8277         (location_completer_handle_brkchars): New function.
8278         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8279         (enum complete_line_internal_reason): Adjust comments.
8280         (completion_tracker::discard_completions): New.
8281         (completer_handle_brkchars_func_for_completer): Handle
8282         location_completer.
8283         (gdb_custom_word_point_brkchars)
8284         (gdb_org_rl_basic_quote_characters): New.
8285         (gdb_completion_word_break_characters_throw)
8286         (completion_find_completion_word): Handle trackers that use a
8287         custom word point.
8288         (completion_tracker::advance_custom_word_point_by): New.
8289         (completion_tracker::build_completion_result): Don't rely on
8290         readline appending the quote char.
8291         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8292         use a custom word point.
8293         (gdb_rl_attempted_completion_function): Restore
8294         rl_basic_quote_characters.
8295         * completer.h (class completion_tracker): Extend intro comment.
8296         (completion_tracker::set_quote_char)
8297         (completion_tracker::quote_char)
8298         (completion_tracker::set_use_custom_word_point)
8299         (completion_tracker::use_custom_word_point)
8300         (completion_tracker::custom_word_point)
8301         (completion_tracker::set_custom_word_point)
8302         (completion_tracker::advance_custom_word_point_by)
8303         (completion_tracker::completes_to_completion_word)
8304         (completion_tracker::discard_completions): New methods.
8305         (completion_tracker::m_quote_char)
8306         (completion_tracker::m_use_custom_word_point)
8307         (completion_tracker::m_custom_word_point): New fields.
8308         (advance_to_expression_complete_word_point): Declare.
8309         * f-lang.c (f_collect_symbol_completion_matches): Add
8310         complete_symbol_mode parameter.
8311         * language.h (struct language_defn)
8312         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8313         parameter.
8314         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8315         (linespec_complete_function): New function.
8316         (linespec_lexer_lex_keyword): Adjust.
8317         * linespec.h (linespec_keywords, linespec_complete_function): New
8318         declarations.
8319         * location.c (find_end_quote): New function.
8320         (explicit_location_lex_one): Add explicit_completion_info
8321         parameter.  Save quoting info.  Don't throw if being called for
8322         completion.  Don't handle Ada operators here.
8323         (is_cp_operator, skip_op_false_positives, first_of)
8324         (explicit_location_lex_one_function): New function.
8325         (string_to_explicit_location): Replace 'dont_throw' parameter with
8326         an explicit_completion_info pointer parameter.  Handle it.  Don't
8327         use explicit_location_lex_one to lex function names.  Use
8328         explicit_location_lex_one_function instead.
8329         * location.h (struct explicit_completion_info): New.
8330         (string_to_explicit_location): Replace 'dont_throw' parameter with
8331         an explicit_completion_info pointer parameter.
8332         * symtab.c (default_collect_symbol_completion_matches_break_on):
8333         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8334         (default_collect_symbol_completion_matches)
8335         (collect_symbol_completion_matches): Add complete_symbol_mode
8336         parameter.
8337         (collect_symbol_completion_matches_type): Pass down
8338         complete_symbol_mode::EXPRESSION.
8339         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8340         parameter.  Handle LINESPEC mode.
8341         * symtab.h (complete_symbol_mode): New.
8342         (default_collect_symbol_completion_matches_break_on)
8343         (default_collect_symbol_completion_matches)
8344         (collect_symbol_completion_matches)
8345         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8346         parameter.
8347
8348 2017-07-17  Pedro Alves  <palves@redhat.com>
8349
8350         * utils.c (enum class strncmp_iw_mode): New.
8351         (strcmp_iw): Rename to ...
8352         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8353         parameters.  Handle them.
8354         (strncmp_iw): New.
8355         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8356         * utils.h (strncmp_iw): Declare.
8357         (strcmp_iw): Move describing comments here.
8358
8359 2017-07-17  Pedro Alves  <palves@redhat.com>
8360
8361         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8362         CP_OPERATOR_STR.
8363         * c-typeprint.c (is_type_conversion_operator): Use
8364         CP_OPERATOR_STR.
8365         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8366         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8367         CP_OPERATOR_LEN.
8368         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8369         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8370         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8371         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8372         CP_OPERATOR_STR.
8373         * location.c: Include "cp-support.h".
8374         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8375         CP_OPERATOR_STR.
8376         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8377         CP_OPERATOR_LEN.
8378
8379 2017-07-17  Pedro Alves  <palves@redhat.com>
8380
8381         * cli/cli-cmds.c (complete_command): Use a completion tracker
8382         along with completion_find_completion_word for handle_brkchars
8383         phase.
8384         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8385         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8386         (struct gdb_rl_completion_word_info): New.
8387         (gdb_rl_find_completion_word): New.
8388         (completion_find_completion_word): New.
8389         * completer.h (completion_find_completion_word): Declare.
8390
8391 2017-07-17  Pedro Alves  <palves@redhat.com>
8392
8393         * ada-lang.c (symbol_completion_match): Adjust comments.
8394         (symbol_completion_add): Replace vector parameter with
8395         completion_tracker parameter.  Use it.
8396         (ada_make_symbol_completion_list): Rename to...
8397         (ada_collect_symbol_completion_matches): ... this.  Add
8398         completion_tracker parameter and use it.
8399         (ada_language_defn): Adjust.
8400         * break-catch-syscall.c (catch_syscall_completer): Adjust
8401         prototype and work with completion_tracker instead of VEC.
8402         * breakpoint.c (condition_completer): Adjust prototype and work
8403         with completion_tracker instead of VEC.
8404         * c-lang.c (c_language_defn, cplus_language_defn)
8405         (asm_language_defn, minimal_language_defn): Adjust to renames.
8406         * cli/cli-cmds.c (complete_command): Rework using
8407         completion_tracker.  Catch exceptions when completing.
8408         * cli/cli-decode.c (integer_unlimited_completer)
8409         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8410         with completion_tracker instead of VEC.
8411         * command.h (struct completion_tracker): Forward declare.
8412         (completer_ftype, completer_handle_brkchars_ftype): Change
8413         types.
8414         (complete_on_cmdlist, complete_on_enum): Adjust.
8415         * completer.c: Include <algorithm>.
8416         (struct gdb_completer_state): New.
8417         (current_completion): New global.
8418         (readline_line_completion_function): Delete.
8419         (noop_completer, filename_completer)
8420         (filename_completer_handle_brkchars, complete_files_symbols)
8421         (linespec_location_completer): Adjust to work with a
8422         completion_tracker instead of a VEC.
8423         (string_or_empty): New.
8424         (collect_explicit_location_matches): Adjust to work with a
8425         completion_tracker instead of a VEC.
8426         (explicit_location_completer): Rename to ...
8427         (complete_explicit_location): ... this and adjust to work with a
8428         completion_tracker instead of a VEC.
8429         (location_completer): Adjust to work with a completion_tracker
8430         instead of a VEC.
8431         (add_struct_fields): Adjust to work with a completion_list instead
8432         of VEC.
8433         (expression_completer): Rename to ...
8434         (complete_expression): ... this and adjust to work with a
8435         completion_tracker instead of a VEC.  Use complete_files_symbols.
8436         (expression_completer): Reimplement on top of complete_expression.
8437         (symbol_completer): Adjust to work with a completion_tracker
8438         instead of a VEC.
8439         (enum complete_line_internal_reason): Add describing comments.
8440         (complete_line_internal_normal_command): Adjust to work with a
8441         completion_tracker instead of a VEC.
8442         (complete_line_internal): Rename to ...
8443         (complete_line_internal_1): ... this and adjust to work with a
8444         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8445         handle_brkchars phase.
8446         (new_completion_tracker): Delete.
8447         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8448         complete_line_internal_1.
8449         (free_completion_tracker): Delete.
8450         (INITIAL_COMPLETION_HTAB_SIZE): New.
8451         (completion_tracker::completion_tracker)
8452         (completion_tracker::~completion_tracker): New.
8453         (maybe_add_completion): Delete.
8454         (completion_tracker::maybe_add_completion)
8455         (completion_tracker::add_completion)
8456         (completion_tracker::add_completions): New.
8457         (throw_max_completions_reached_error): Delete.
8458         (complete_line): Adjust to work with a completion_tracker instead
8459         of a VEC.  Don't create a completion_tracker_t or check for max
8460         completions here.
8461         (command_completer, command_completer_handle_brkchars)
8462         (signal_completer, reg_or_group_completer_1)
8463         (reg_or_group_completer, default_completer_handle_brkchars):
8464         Adjust to work with a completion_tracker.
8465         (gdb_completion_word_break_characters_throw): New.
8466         (gdb_completion_word_break_characters): Reimplement.
8467         (line_completion_function): Delete.
8468         (completion_tracker::recompute_lowest_common_denominator)
8469         (expand_preserving_ws)
8470         (completion_tracker::build_completion_result)
8471         (completion_result::completion_result)
8472         (completion_result::completion_result)
8473         (completion_result::~completion_result)
8474         (completion_result::completion_result)
8475         (completion_result::release_match_list, compare_cstrings)
8476         (completion_result::sort_match_list)
8477         (completion_result::reset_match_list)
8478         (gdb_rl_attempted_completion_function_throw)
8479         (gdb_rl_attempted_completion_function): New.
8480         * completer.h (completion_list, struct completion_result)
8481         (class completion_tracker): New.
8482         (complete_line): Add completion_tracker parameter.
8483         (readline_line_completion_function): Delete.
8484         (gdb_rl_attempted_completion_function): New.
8485         (noop_completer, filename_completer, expression_completer)
8486         (location_completer, symbol_completer, command_completer)
8487         (signal_completer, reg_or_group_completer): Update prototypes.
8488         (completion_tracker_t, new_completion_tracker)
8489         (make_cleanup_free_completion_tracker): Delete.
8490         (enum maybe_add_completion_enum): Delete.
8491         (maybe_add_completion): Delete.
8492         (throw_max_completions_reached_error): Delete.
8493         * corefile.c (complete_set_gnutarget): Adjust to work with a
8494         completion_tracker instead of a VEC.
8495         * cp-abi.c (cp_abi_completer): Adjust to work with a
8496         completion_tracker instead of a VEC.
8497         * d-lang.c (d_language_defn): Adjust.
8498         * disasm.c (disassembler_options_completer): Adjust to work with a
8499         completion_tracker instead of a VEC.
8500         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8501         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8502         with a completion_tracker instead of a VEC.
8503         (f_language_defn): Adjust.
8504         * go-lang.c (go_language_defn): Adjust.
8505         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8506         Adjust to work with a completion_tracker instead of a VEC.
8507         * infrun.c (handle_completer): Likewise.
8508         * interps.c (interpreter_completer): Likewise.
8509         * interps.h (interpreter_completer): Likewise.
8510         * language.c (unknown_language_defn, auto_language_defn)
8511         (local_language_defn): Adjust.
8512         * language.h (language_defn::la_make_symbol_completion_list):
8513         Rename to ...
8514         (language_defn::la_collect_symbol_completion_matches): ... this
8515         and adjust to work with a completion_tracker instead of a VEC.
8516         * m2-lang.c (m2_language_defn): Adjust.
8517         * objc-lang.c (objc_language_defn): Adjust.
8518         * opencl-lang.c (opencl_language_defn): Adjust.
8519         * p-lang.c (pascal_language_defn): Adjust.
8520         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8521         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8522         with a completion_tracker.
8523         * rust-lang.c (rust_language_defn): Adjust.
8524         * symtab.c (free_completion_list, do_free_completion_list)
8525         (return_val, completion_tracker): Delete.
8526         (completion_list_add_name, completion_list_add_symbol)
8527         (completion_list_add_msymbol, completion_list_objc_symbol)
8528         (completion_list_add_fields, add_symtab_completions): Add
8529         completion_tracker parameter and use it.
8530         (default_make_symbol_completion_list_break_on_1): Rename to...
8531         (default_collect_symbol_completion_matches_break_on): ... this.
8532         Add completion_tracker parameter and use it instead of allocating
8533         a completion tracker here.
8534         (default_make_symbol_completion_list_break_on): Delete old
8535         implementation.
8536         (default_make_symbol_completion_list): Delete.
8537         (default_collect_symbol_completion_matches): New.
8538         (make_symbol_completion_list): Delete.
8539         (collect_symbol_completion_matches): New.
8540         (make_symbol_completion_type): Rename to ...
8541         (collect_symbol_completion_matches_type): ... this.  Add
8542         completion_tracker parameter and use it instead of VEC.
8543         (make_file_symbol_completion_list_1): Rename to...
8544         (collect_file_symbol_completion_matches): ... this.  Add
8545         completion_tracker parameter and use it instead of VEC.
8546         (make_file_symbol_completion_list): Delete.
8547         (add_filename_to_list): Use completion_list instead of a VEC.
8548         (add_partial_filename_data::list): Now a completion_list.
8549         (make_source_files_completion_list): Work with a completion_list
8550         instead of a VEC.
8551         * symtab.h: Include "completer.h".
8552         (default_make_symbol_completion_list_break_on)
8553         (default_make_symbol_completion_list, make_symbol_completion_list)
8554         (make_symbol_completion_type, make_file_symbol_completion_list)
8555         (make_source_files_completion_list): Delete.
8556         (default_collect_symbol_completion_matches_break_on)
8557         (default_collect_symbol_completion_matches)
8558         (collect_symbol_completion_matches)
8559         (collect_symbol_completion_matches_type)
8560         (collect_file_symbol_completion_matches)
8561         (make_source_files_completion_list): New.
8562         * top.c (init_main): Don't install a rl_completion_entry_function
8563         hook.  Install a rl_attempted_completion_function hook instead.
8564         * tui/tui-layout.c (layout_completer): Adjust to work with a
8565         completion_tracker.
8566         * tui/tui-regs.c (tui_reggroup_completer):
8567         * tui/tui-win.c (window_name_completer, focus_completer)
8568         (winheight_completer): Adjust to work with a completion_tracker.
8569         * value.c: Include "completer.h".
8570         (complete_internalvar): Adjust to work with a completion_tracker.
8571         * value.h (complete_internalvar): Likewise.
8572
8573 2017-07-17  Pedro Alves  <palves@redhat.com>
8574
8575         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8576         renames.
8577         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8578         comments to completer_ftype's declaration.
8579         <completer_handle_brkchars>: Change type to
8580         completer_handle_brkchars_ftype.
8581         * command.h (completer_ftype): Add describing comment and give
8582         names to parameters.
8583         (completer_ftype_void): Rename to ...
8584         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8585         (set_cmd_completer_handle_brkchars): Adjust.
8586         * completer.c (filename_completer_handle_brkchars): New function.
8587         (complete_line_internal_normal_command): New function, factored
8588         out from ...
8589         (complete_line_internal): ... here.
8590         (command_completer_handle_brkchars)
8591         (default_completer_handle_brkchars)
8592         (completer_handle_brkchars_func_for_completer): New functions.
8593         * completer.h (set_gdb_completion_word_break_characters): Delete
8594         declaration.
8595         (completer_handle_brkchars_func_for_completer): New declaration.
8596         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8597         completer_handle_brkchars_func_for_completer.
8598
8599 2017-07-17  Pedro Alves  <palves@redhat.com>
8600
8601         * completer.c (symbol_completer): New function, based on
8602         make_symbol_completion_list_fn.
8603         * completer.h (symbol_completer): New declaration.
8604         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8605         * python/py-cmd.c (completers): Adjust.
8606         * symtab.c (make_symbol_completion_list_fn): Delete.
8607         * symtab.h (make_symbol_completion_list_fn): Delete.
8608         * cli/cli-decode.c (add_cmd): Adjust.
8609
8610 2017-07-17  Pedro Alves  <palves@redhat.com>
8611
8612         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8613         * dwarf2read.c: Include "filename-seen-cache.h".
8614         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8615         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8616         * filename-seen-cache.c: New file.
8617         * filename-seen-cache.h: New file.
8618         * symtab.c: Include "filename-seen-cache.h".
8619         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8620         (create_filename_seen_cache, clear_filename_seen_cache)
8621         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8622         to filename-seen-cache.h/filename-seen-cache.c.
8623         (output_source_filename, sources_info)
8624         (maybe_add_partial_symtab_filename)
8625         (make_source_files_completion_list): Adjust to use
8626         filename_seen_cache.
8627
8628 2017-07-17  Pedro Alves  <palves@redhat.com>
8629
8630         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8631         fields.
8632         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8633         dwarf2_debug_sections*)): New.
8634         (dwarf2_per_objfile::dwarf2_per_objfile(const
8635         dwarf2_per_objfile&)): Declare as deleted.
8636         (dwarf2_per_objfile::operator=): Declare as deleted.
8637         (dwarf2_per_objfile::dwarf2_per_objfile)
8638         (dwarf2_per_objfile::~dwarf2_per_objfile)
8639         (dwarf2_per_objfile::free_cached_comp_units): New.
8640         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8641         ctor.  Call dwarf2_per_objfile's ctor manually.
8642         (dwarf2_locate_sections): Deleted/refactored as ...
8643         (dwarf2_per_objfile::locate_sections): ... this new method.
8644         (free_cached_comp_units): Defer to
8645         dwarf2_per_objfile::free_cached_comp_units.
8646         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8647
8648 2017-07-14  Tom Tromey  <tom@tromey.com>
8649
8650         PR rust/21764:
8651         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8652         parameter.
8653         <UNOP_SIZEOF>: Split into separate case.
8654         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8655
8656 2017-07-14  Tom Tromey  <tom@tromey.com>
8657
8658         PR rust/21763:
8659         * symtab.c (symbol_matches_domain): Add language_rust to special
8660         case.
8661         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8662         treat LOC_TYPEDEF symbols as variables.
8663
8664 2017-07-14  Pedro Alves  <palves@redhat.com>
8665
8666         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8667         symtabs matching all symtabs with SRCFILE as file name instead of
8668         only considering the first hit, with lookup_symtab.
8669
8670 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8671
8672         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8673         operator_name parameters.
8674         (gen_expr): Update function call.
8675
8676 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8677
8678         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8679         parameter.
8680         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8681         Likewise.
8682         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8683         parameter, use agent_expr::gdbarch instead, update function
8684         calls.
8685         (locexpr_tracepoint_var_ref): Likewise.
8686         (loclist_tracepoint_var_ref): Likewise.
8687         * ax-gdb.c (gen_trace_static_fields): Likewise.
8688         (gen_traced_pop): Likewise.
8689         (gen_frame_args_address): Likewise.
8690         (gen_frame_locals_address): Likewise.
8691         (gen_var_ref): Likewise.
8692         (gen_struct_ref_recursive): Likewise.
8693         (gen_static_field): Likewise.
8694         (gen_maybe_namespace_elt): Likewise.
8695         (gen_expr): Likewise.
8696         (gen_trace_for_var): Likewise.
8697         (gen_trace_for_expr): Likewise.
8698         (gen_trace_for_return_address): Likewise.
8699
8700 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8701
8702         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8703         parameter.
8704         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8705
8706 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8707
8708         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8709         from ax, update calls.
8710         (gen_usual_arithmetic): Likewise.
8711         (gen_integral_promotions): Likewise.
8712         (gen_bitfield_ref): Likewise.
8713         (gen_primitive_field): Likewise.
8714         (gen_struct_ref_recursive): Likewise.
8715         (gen_struct_ref): Likewise.
8716         (gen_maybe_namespace_elt): Likewise.
8717         (gen_struct_elt_for_reference): Likewise.
8718         (gen_namespace_elt): Likewise.
8719         (gen_aggregate_elt_ref): Likewise.
8720         (gen_expr): Get gdbarch from ax, update calls.
8721         (gen_expr_binop_rest): Likewise.
8722
8723 2017-07-13  Pedro Alves  <palves@redhat.com>
8724
8725         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8726         as default tdesc.
8727         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8728         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8729         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8730         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8731         tdep.
8732         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8733         Get final tdesc from the tdep.
8734         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8735         default tdesc.
8736         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8737         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8738         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8739         Use it as default tdesc.
8740         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8741         down to amd_init_abi.  No longer handle fallback tdesc here.
8742         * amd64-tdep.h (tdesc_x32): Declare.
8743         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8744         parameter.
8745         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8746         as default tdesc.
8747
8748 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8749
8750         * s390-linux-tdep.c (s390_process_record): Add support for
8751         instructions new in arch12.
8752
8753 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8754
8755         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8756         PT_GETFSBASE and PT_GETGSBASE.
8757         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8758         PT_SETGSBASE.
8759
8760 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8761
8762         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8763         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8764         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8765         those rules.
8766         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8767         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8768         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8769         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8770         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8771         * features/i386/amd64.xml: Add 64bit-segments.xml.
8772         * features/i386/amd64-avx-avx512.c: Regenerated.
8773         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8774         * features/i386/amd64-avx-mpx.c: Regenerated.
8775         * features/i386/amd64-avx.c: Regenerated.
8776         * features/i386/amd64-mpx.c: Regenerated.
8777         * features/i386/amd64.c: Regenerated.
8778         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8779         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8780         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8781         * regformats/i386/amd64-avx.dat: Regenerated.
8782         * regformats/i386/amd64-mpx.dat: Regenerated.
8783         * regformats/i386/amd64.dat: Regenerated.
8784
8785 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8786
8787         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8788         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8789
8790 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8791
8792         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8793         unsetenv.
8794         * gnulib/aclocal.m4: Regenerate.
8795         * gnulib/config.in: Regenerate.
8796         * gnulib/configure: Regenerate.
8797         * gnulib/import/Makefile.am: Regenerate.
8798         * gnulib/import/Makefile.in: Regenerate.
8799         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8800         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8801         * gnulib/import/m4/environ.m4: New file.
8802         * gnulib/import/m4/setenv.m4: New file.
8803         * gnulib/import/setenv.c: New file.
8804         * gnulib/import/unsetenv.c: New file.
8805
8806 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8807
8808         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8809         address when op is DW_OP_addr.
8810
8811 2017-07-09  Tom Tromey  <tom@tromey.com>
8812
8813         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8814         check and apply to outer type.
8815
8816 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8817
8818         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8819         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8820         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8821         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8822
8823 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8824
8825         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8826
8827 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8828
8829         * corelow.c (get_core_siginfo): Remove.
8830         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8831         instead of get_core_siginfo.
8832         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8833         * gdbarch.h: Re-generate.
8834         * gdbarch.c: Re-generate.
8835         * linux-tdep.c (linux_core_xfer_siginfo): New.
8836         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8837
8838 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8839
8840         * corelow.c (thread_section_name): Move to ...
8841         * gdbcore.h (thread_section_name): ... here.
8842
8843 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8844
8845         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8846         (struct siginfo32): New.
8847         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8848         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8849         via ptrace(PT_LWPINFO).
8850
8851 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8852
8853         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8854         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8855         (fbsd_get_siginfo_type): New.
8856         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8857         (_initialize_fbsd_tdep): New.
8858
8859 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8860
8861         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8862         a singular dwo_unit*) to support multiple CUs in the same way that
8863         multiple TUs are supported.
8864         (create_cus_hash_table): Replace create_dwo_cu with a function for
8865         parsing multiple CUs from a DWO file.
8866         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8867         create_dwo_cu.
8868         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8869         htab_find, rather than comparing the signature to a singleton CU in
8870         the dwo_file.
8871
8872 2017-07-06  Pedro Alves  <palves@redhat.com>
8873
8874         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8875
8876 2017-07-04  Pedro Alves  <palves@redhat.com>
8877
8878         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8879         * gdbtypes.h (TYPE_STATIC): Delete.
8880         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8881         is_synchronized, is_native>: Delete.
8882         <dummy>: Bump.
8883         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8884         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8885         (TYPE_FN_FIELD_ABSTRACT): Delete.
8886
8887 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8888
8889         * buffer.h (buffer_finish): Fix spelling mistakes.
8890
8891 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8892
8893         * .dir-locals.el: Automatically switch to C-style comments in
8894         versions of Emacs that support the feature.
8895
8896 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8897             Pedro Alves  <palves@redhat.com>
8898
8899         PR cli/21688
8900         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8901         (process_next_line): New variable 'inline_cmd'.
8902         Adjust 'if' clauses for "python", "compile" and "guile" to use
8903         'command_name_equals' and check for '!inline_cmd'.
8904
8905 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8906
8907         PR cli/21688
8908         * cli/cli-script.c (command_name_equals_not_inline): New function.
8909         (process_next_line): Adjust 'if' clauses for "python", "compile"
8910         and "guile" to use command_name_equals_not_inline.
8911
8912 2017-06-29  Pedro Alves  <palves@redhat.com>
8913
8914         * completer.c (expression_completer): Call
8915         linespec_location_completer instead of location_completer.
8916
8917 2017-06-29  Pedro Alves  <palves@redhat.com>
8918
8919         * completer.c (expression_completer): Remove code that recomputes
8920         'text' from 'word'.
8921
8922 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8923
8924         * regformats/regdat.sh: Generate code with
8925         "ifndef IN_PROCESS_AGENT".
8926
8927 2017-06-28  Pedro Alves  <palves@redhat.com>
8928
8929         * command.h: Include "common/scoped_restore.h".
8930
8931 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8932
8933         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8934         instead of obstack_grow.
8935
8936 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8937
8938         PR gdb/21337
8939         * symfile.c (reread_symbols): Call objfiles_changed just before
8940         read_symbols.
8941
8942 2017-06-27  Pedro Alves  <palves@redhat.com>
8943
8944         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8945         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8946         (completion_list_add_symbol, completion_list_add_msymbol):
8947         ... these new functions.
8948         (add_symtab_completions)
8949         (default_make_symbol_completion_list_break_on_1): Adjust.
8950
8951 2017-06-27  Pedro Alves  <palves@redhat.com>
8952
8953         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8954         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8955         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8956         dtor.
8957         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8958         'storage_obstack' field an auto_obstack.  In-class initialize all
8959         non-bitfield fields.  Make minsyms_read bool.
8960         * symfile.c (read_symbols): Adjust.
8961
8962 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8963
8964         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8965         (gdbsim_store_register): Likewise.
8966
8967 2017-06-27  Pedro Alves  <palves@redhat.com>
8968
8969         * c-exp.y (name_obstack): Now an auto_obstack.
8970         (yylex): Use auto_obstack::clear.
8971         (c_parse): Use auto_obstack::clear instead of reinitializing and
8972         freeing the obstack.
8973         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8974         * d-exp.y (name_obstack): Now an auto_obstack.
8975         (yylex): Use auto_obstack::clear.
8976         (d_parse): Use auto_obstack::clear instead of reinitializing and
8977         freeing the obstack.
8978         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8979         auto_obstack.
8980         * dwarf2read.c (create_addrmap_from_index)
8981         (dwarf2_build_psymtabs_hard)
8982         (update_enumeration_type_from_children): Likewise.
8983         * gdb_obstack.h (auto_obstack): New type.
8984         * go-exp.y (name_obstack): Now an auto_obstack.
8985         (build_packaged_name): Use auto_obstack::clear.
8986         (go_parse): Use auto_obstack::clear instead of reinitializing and
8987         freeing the obstack.
8988         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8989         auto_obstack.
8990         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8991         * rust-exp.y (work_obstack): Now an auto_obstack.
8992         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8993         reinitializing and freeing the obstack.
8994         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8995         (host_char_to_target): Use auto_obstack.
8996         * utils.h (make_cleanup_obstack_free): Delete declaration.
8997         * valprint.c (generic_emit_char, generic_printstr): Use
8998         auto_obstack.
8999
9000 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9001
9002         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9003         thread.
9004         (darwin_init_thread_list): Don't update dummy thread.
9005         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9006
9007 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9008
9009         * record-full.c (netorder16): Remove.
9010
9011 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9012
9013         * common/diagnostics.h: Define macros for GCC.
9014         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9015         * common/vec.h: Include diagnostics.h.
9016         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9017         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9018         warning.
9019
9020 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9021
9022         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9023         New macro.
9024         * ada-lex.l: Ignore deprecated register warnings.
9025
9026 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9027
9028         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9029         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9030
9031 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9032
9033         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9034         its own line.
9035
9036 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9037
9038         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9039
9040 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9041
9042         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9043         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9044         (xtensa_register_read_masked): Likewise.
9045
9046 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9047
9048         * common/environ.c (gdb_environ::unset): Update comment.
9049
9050 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9051
9052         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9053         registers.
9054
9055 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9056
9057         * record-full.c (record_full_exec_insn): Use byte_vector.
9058
9059 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9060
9061         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9062         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9063
9064 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9065
9066         * remote.c (cached_reg): Move from here...
9067         * regcache.h (cached_reg): ...to here.
9068         * python/py-unwind.c (struct reg_info): Remove.
9069         (cached_frame_info): Use cached_reg_t.
9070         (pyuw_prev_register): Likewise.
9071         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9072         (pyuw_dealloc_cache): Free all registers.
9073
9074 2017-06-22  Pedro Alves  <palves@redhat.com>
9075             Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9078         warning.
9079         * common/diagnostics.h: New file.
9080
9081 2017-06-22  Pedro Alves  <palves@redhat.com>
9082
9083         * common/agent.h: Add include guards.
9084
9085 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9086
9087         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9088         talk about addressable units instead of bytes.
9089
9090 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9091
9092         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9093         of '::const_iterator'.
9094
9095 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9096
9097         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9098         'unittests/environ-selftests.c'.
9099         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9100         * charset.c (find_charset_names): Declare object 'iconv_env'.
9101         Update code to use 'iconv_env' object.  Remove call to
9102         'free_environ'.
9103         * common/environ.c: Include <utility>.
9104         (make_environ): Delete function.
9105         (free_environ): Delete function.
9106         (gdb_environ::clear): New function.
9107         (gdb_environ::operator=): New function.
9108         (gdb_environ::get): Likewise.
9109         (environ_vector): Delete function.
9110         (set_in_environ): Delete function.
9111         (gdb_environ::set): New function.
9112         (unset_in_environ): Delete function.
9113         (gdb_environ::unset): New function.
9114         (gdb_environ::envp): Likewise.
9115         * common/environ.h: Include <vector>.
9116         (struct gdb_environ): Delete; transform into...
9117         (class gdb_environ): ... this class.
9118         (free_environ): Delete prototype.
9119         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9120         environ_vector): Likewise.
9121         * infcmd.c (run_command_1): Update code to call
9122         'envp' from 'gdb_environ' class.
9123         (environment_info): Update code to call methods from 'gdb_environ'
9124         class.
9125         (unset_environment_command): Likewise.
9126         (path_info): Likewise.
9127         (path_command): Likewise.
9128         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9129         (inferior::inferior): Initialize 'environment' using the host's
9130         information.
9131         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9132         Include "environ.h".
9133         (class inferior) <environment>: Change type from 'struct
9134         gdb_environ' to 'gdb_environ'.
9135         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9136         methods from 'gdb_environ' class.
9137         * solib.c (solib_find_1): Likewise
9138         * unittests/environ-selftests.c: New file.
9139
9140 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9141
9142         * features/i386/i386-linux.xml: Exchange the order of including
9143         32bit-linux.xml and 32bit-sse.xml.
9144         * features/i386/i386-linux.c: Regenerated.
9145
9146 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9147
9148         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9149         Delete copy ctor and assignment operator.
9150         (tdesc_type): Likewise.
9151         (tdesc_feature): Likewise.
9152         (tdesc_free_reg): Remove.
9153         (tdesc_create_reg): Use new.
9154         (tdesc_free_type): Remove.
9155         (tdesc_create_vector): Use new.
9156         (tdesc_create_union): Likewise.
9157         (tdesc_create_flags): Likewise.
9158         (tdesc_create_enum): Likewise.
9159         (tdesc_free_feature): Delete.
9160         (free_target_description): Use delete.
9161
9162 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9163
9164         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9165         registers.
9166
9167 2017-06-19  Pedro Alves  <palves@redhat.com>
9168
9169         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9170         after gdb::unlinker.
9171
9172 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9173
9174         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9175         gdb_environ to access an environment variable.
9176
9177 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9178
9179         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9180         gdb_byte*.
9181
9182 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9183
9184         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9185
9186 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9187
9188         * configure: Re-generate.
9189         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9190
9191 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9192
9193         * configure: Re-generate.
9194         * warning.m4: Pass -Werror to compiler when checking for
9195         supported warning flags.
9196
9197 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9198
9199         * Makefile.in (COMPILE.pre): Add "-x c++".
9200
9201 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9202             Pedro Alves  <palves@redhat.com>
9203             Yao Qi  <yao.qi@linaro.org>
9204
9205         * defs.h (RequireLongest): New.
9206         (extract_integer): Declare function template.
9207         (extract_signed_integer): Remove the declaration, but define it
9208         static inline.
9209         (extract_unsigned_integer): Likewise.
9210         (store_integer): Declare function template.
9211         (store_signed_integer): Remove the declaration, but define it
9212         static inline.
9213         (store_unsigned_integer): Likewise.
9214         * findvar.c (extract_integer): New function template.
9215         (extract_signed_integer): Remove.
9216         (extract_unsigned_integer): Remove.
9217         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9218         instantiations.
9219         (store_integer): New function template.
9220         (store_signed_integer): Remove.
9221         (store_unsigned_integer): Remove.
9222         (store_integer): Explicit instantiations.
9223         * regcache.c (regcache_raw_read_signed): Update.
9224         (regcache::raw_read): New function.
9225         (regcache::raw_read_signed): Remove.
9226         (regcache::raw_read_unsigned): Remove.
9227         (regcache_raw_read_unsigned): Update.
9228         (regcache_raw_write_unsigned): Update.
9229         (regcache::raw_write_signed): Remove.
9230         (regcache::raw_write): New function.
9231         (regcache_cooked_read_signed): Update.
9232         (regcache::raw_write_unsigned): Remove.
9233         (regcache::cooked_read_signed): Remove.
9234         (regcache_cooked_read_unsigned): Update.
9235         (regcache::cooked_read_unsigned): Remove.
9236         (regcache_cooked_write_signed): Update.
9237         (regcache_cooked_write_unsigned): Update.
9238         * regcache.h (regcache) <raw_read_signed>: Remove.
9239         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9240         <raw_read, raw_write>: New.
9241         <cooked_read_signed, cooked_write_signed>: Remove.
9242         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9243         <cooked_read, cooked_write>: New.
9244         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9245         (sh64_pseudo_register_write): Update.
9246
9247 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9248
9249         * arc-tdep.c (arc_disassembler_options): New variable.
9250         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9251         of default_print_insn.
9252         (arc_delayed_print_insn): Set info->section when needed,
9253         use default_print_insn to retrieve a disassembler.
9254
9255 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9256
9257         PR gdb/21574
9258         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9259         to mention $SHELL and startup-with-shell.
9260
9261 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9262
9263         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9264
9265 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9266
9267         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9268         default_print_insn instead of print_insn_aarch64.
9269         * arm-tdep.c (gdb_print_insn_arm): Call
9270         default_print_insn instead of print_insn_big_arm
9271         and print_insn_little_arm.
9272         * i386-tdep.c (i386_print_insn): Call default_print_insn
9273         instead of print_insn_i386.
9274         * ia64-tdep.c (ia64_print_insn): Call
9275         default_print_insn instead of print_insn_ia64.
9276         * mips-tdep.c (gdb_print_insn_mips): Call
9277         default_print_insn instead of print_insn_big_mips
9278         and print_insn_little_mips.
9279         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9280         instead of print_insn_spu.
9281
9282 2017-06-14  Pedro Alves  <palves@redhat.com>
9283
9284         * ada-lang.c: Include "common/byte-vector.h".
9285         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9286         * charset.c (wchar_iterator::iterate): Resize the vector instead
9287         of reserving it.
9288         * common/byte-vector.h: Include "common/def-vector.h".
9289         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9290         * cli/cli-dump.c: Include "common/byte-vector.h".
9291         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9292         * common/byte-vector.h: New file.
9293         * common/def-vector.h: New file.
9294         * common/default-init-alloc.h: New file.
9295         * dwarf2loc.c: Include "common/byte-vector.h".
9296         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9297         instead of reserving it.
9298         * dwarf2read.c: Include "common/byte-vector.h".
9299         (data_buf::m_vec): Now a gdb::byte_vector.
9300         * gdb_regex.c: Include "common/def-vector.h".
9301         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9302         * mi/mi-main.c: Include "common/byte-vector.h".
9303         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9304         * printcmd.c: Include "common/byte-vector.h".
9305         (print_scalar_formatted): Use gdb::byte_vector.
9306         * valprint.c: Include "common/byte-vector.h".
9307         (maybe_negate_by_bytes, print_decimal_chars): Use
9308         gdb::byte_vector.
9309
9310 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9311
9312         * darwin-nat.c: Include "nat/fork-inferior.h".
9313
9314 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9315
9316         * configure.nat: Factor out Darwin bits that are not
9317         architecture-specific.  Add fork-inferior.o.
9318
9319 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9320
9321         * configure.nat: Factor out AIX bits that are not
9322         architecture-specific.  Add fork-inferior.o.
9323
9324 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9325
9326         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9327         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9328         wrappers that just call rw_pieced_value.
9329
9330 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9331
9332         * dwarf2loc.c (write_pieced_value): When writing the data for a
9333         memory piece, use write_memory_with_notification instead of
9334         write_memory.
9335
9336 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9337
9338         * valops.c (read_value_memory): Change embedded_offset to
9339         represent a bit offset instead of a byte offset.
9340         * value.h (read_value_memory): Adjust comment.
9341
9342 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9343
9344         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9345         dest_offset_bits and source_offset_bits.
9346         (write_pieced_value): Likewise.
9347
9348 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9349
9350         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9351         given by DW_OP_bit_piece.
9352         (write_pieced_value): Likewise.
9353
9354 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9355
9356         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9357         some other preparations to the places where sufficient information
9358         is available.
9359         (write_pieced_value): Likewise.
9360
9361 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9362
9363         * dwarf2loc.c (bits_to_bytes): New function.
9364         (read_pieced_value): Fix offset calculations for register pieces
9365         on big-endian targets.
9366         (write_pieced_value): Likewise.
9367
9368 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9369
9370         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9371         (write_pieced_value): Likewise.
9372
9373 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9374
9375         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9376         transfer the source value's least significant bits, instead of its
9377         lowest-addressed ones.  Rename type_len to max_offset.
9378         (read_pieced_value): Mirror above changes to write_pieced_value as
9379         applicable.
9380
9381 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9382
9383         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9384         truncate full bytes from dest_offset_bits before using it as an
9385         offset into the buffer.
9386
9387 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9388
9389         * dwarf2loc.c (write_pieced_value): Include transfer size in
9390         byte-wise check.
9391
9392 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9393
9394         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9395         calculation of this_size.
9396
9397 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9398
9399         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9400         when targeting a bit-field.
9401         (write_pieced_value): Likewise.
9402
9403 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9404
9405         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9406         (allocate_piece_closure): Drop addr_size parameter.
9407         (dwarf2_evaluate_loc_desc_full): Adjust call to
9408         allocate_piece_closure.
9409
9410 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9411
9412         PR gdb/21226
9413         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9414         the LSB end, independent of endianness.
9415
9416 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9417
9418         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9419         size capping.
9420
9421 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9422
9423         * mips-linux-nat.c: Move include features/mips*-linux.c to
9424         mips-linux-tdep.c.
9425         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9426         to mips-linux-tdep.c.
9427         * mips-linux-tdep.c: Include features/mips*-linux.c
9428         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9429         functions.
9430         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9431         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9432         (tdesc_mips64_dsp_linux): Declare.
9433
9434 2017-06-12  Tom Tromey  <tom@tromey.com>
9435
9436         * valprint.h (val_print_type_code_int): Remove.
9437         * valprint.c (generic_val_print_int): Always call
9438         val_print_scalar_formatted.
9439         (val_print_type_code_int): Remove.
9440         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9441         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9442         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9443         * ada-valprint.c (ada_val_print_num): Use
9444         val_print_scalar_formatted.
9445
9446 2017-06-12  Tom Tromey  <tom@tromey.com>
9447
9448         * printcmd.c (print_scalar_formatted): Unify the two switches.
9449         Don't convert scalars to LONGEST.
9450
9451 2017-06-12  Tom Tromey  <tom@tromey.com>
9452
9453         PR exp/16225:
9454         * valprint.h (print_decimal_chars): Update.
9455         * valprint.c (maybe_negate_by_bytes): New function.
9456         (print_decimal_chars): Add "is_signed" argument.
9457         * printcmd.c (print_scalar_formatted): Update.
9458
9459 2017-06-12  Tom Tromey  <tom@tromey.com>
9460
9461         PR exp/16225:
9462         * valprint.h (print_binary_chars, print_hex_chars): Update.
9463         * valprint.c (val_print_type_code_int): Update.
9464         (print_binary_chars): Add "zero_pad" argument.
9465         (emit_octal_digit): New function.
9466         (print_octal_chars): Don't zero-pad.
9467         (print_decimal_chars): Likewise.
9468         (print_hex_chars): Add "zero_pad" argument.
9469         * sh64-tdep.c (sh64_do_fp_register): Update.
9470         * regcache.c (regcache::dump): Update.
9471         * printcmd.c (print_scalar_formatted): Update.
9472         * infcmd.c (default_print_one_register_info): Update.
9473
9474 2017-06-12  Pedro Alves  <palves@redhat.com>
9475             Alan Hayward  <alan.hayward@arm.com>
9476
9477         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9478         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9479         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9480         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9481         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9482
9483 2017-06-12  Pedro Alves  <palves@redhat.com>
9484
9485         * dwarf2read.c (mapped_symtab::data): Now a vector of
9486         symtab_index_entry instead of vector of
9487         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9488         whether an element's name is NULL instead of checking whether the
9489         element itself is NULL.
9490         (find_slot): Change return type.  Adjust.
9491         (hash_expand, , add_index_entry, uniquify_cu_indices)
9492         (write_hash_table): Adjust.
9493
9494 2017-06-12  Pedro Alves  <palves@redhat.com>
9495
9496         * dwarf2read.c (recursively_count_psymbols): New function.
9497         (write_psymtabs_to_index): Call it to compute number of psyms and
9498         pass estimate size of psyms_seen to unordered_set's ctor.
9499
9500 2017-06-12  Pedro Alves  <palves@redhat.com>
9501
9502         * dwarf2read.c (write_hash_table): Check if key already exists
9503         before emplacing.
9504
9505 2017-06-12  Pedro Alves  <palves@redhat.com>
9506
9507         * dwarf2read.c (data_buf::append_space): Rename to...
9508         (data_buf::grow): ... this, and make private.  Adjust all callers.
9509         (data_buf::append_uint): New method.
9510         (add_address_entry, write_one_signatured_type)
9511         (write_psymtabs_to_index): Use it.
9512
9513 2017-06-12  Pedro Alves  <palves@redhat.com>
9514
9515         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9516         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9517         (data_buf::file_write): Call ::fwrite directly.
9518
9519 2017-06-12  Pedro Alves  <palves@redhat.com>
9520
9521         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9522         std::vector::erase.
9523
9524 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9525
9526         Code cleanup: C++ify .gdb_index producer.
9527         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9528         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9529         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9530         (create_strtab, add_string): Remove.
9531         (file_write, data_buf): New.
9532         (struct symtab_index_entry): Use std::vector for cu_indices.
9533         (struct mapped_symtab): Use std::vector for data.
9534         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9535         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9536         Remove.
9537         (find_slot): Change return type.  Update it to the new data structures.
9538         (hash_expand, add_index_entry): Update it to the new data structures.
9539         (offset_type_compare): Remove.
9540         (uniquify_cu_indices): Update it to the new data structures.
9541         (c_str_view, c_str_view_hasher, vector_hasher): New.
9542         (add_indices_to_cpool): Remove.
9543         (write_hash_table): Update it to the new data structures.
9544         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9545         (eq_psymtab_cu_index): Remove.
9546         (psym_index_map): New typedef.
9547         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9548         reference and std::unordered_map for cu_index_htab.
9549         (add_address_entry, add_address_entry_worker, write_address_map)
9550         (write_psymbols): Update it to the new data structures.
9551         (write_obstack): Remove.
9552         (struct signatured_type_index_data): Change types_list to a data_buf
9553         reference and psyms_seen to a std::unordered_set reference.
9554         (write_one_signatured_type, recursively_write_psymbols)
9555         (write_psymtabs_to_index): Update it to the new data structures.
9556
9557 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9558
9559         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9560         separate-debug-file commands.
9561         * symfile.h (separate_debug_file_debug): New global.
9562         * symfile.c (separate_debug_file_debug): New global.
9563         (separate_debug_file_exists, find_separate_debug_file): Add
9564         debug output.
9565         (_initialize_symfile): Add "set debug separate-debug-file"
9566         command.
9567         * build-id.c (build_id_to_debug_bfd,
9568         find_separate_debug_file_by_buildid): Add debug output.
9569
9570 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9571
9572         * gdbarch.sh (displaced_step_free_closure): Remove.
9573         * gdbarch.h, gdbarch.c: Re-generate.
9574         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9575         displaced_step_free_closure.
9576         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9577         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9578         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9579         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9580         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9581         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9582         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9583         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9584         * infrun.c (displaced_step_clear): Call xfree instead of
9585         gdbarch_displaced_step_free_closure.
9586
9587 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9588
9589         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9590         NULL".
9591
9592 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9593
9594         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9595         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9596         (mn10300_push_dummy_call): Likewise.
9597
9598 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9599
9600         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9601
9602 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9603
9604         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9605
9606 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9607
9608         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9609         able to start inferiors using a shell.
9610         (New remote packets): Announce new packet "QStartupWithShell".
9611         * remote.c: Add PACKET_QStartupWithShell.
9612         (extended_remote_create_inferior): Handle new
9613         PACKET_QStartupWithShell.
9614         (remote_protocol_features) <QStartupWithShell>: New entry for
9615         PACKET_QStartupWithShell.
9616         (_initialize_remote): Call "add_packet_config_cmd" for
9617         QStartupShell.
9618
9619 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9620             Pedro Alves  <palves@redhat.com>
9621
9622         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9623         and "nat/fork-inferior.h".
9624         * common/common-inferior.h: New file, with contents from
9625         "gdb/inferior.h".
9626         * commom/common-utils.c: Include "common-utils.h".
9627         (stringify_argv): New function.
9628         * common/common-utils.h (stringify_argv): New prototype.
9629         * configure.nat: Add "fork-inferior.o" as a dependency for
9630         "*linux*", "fbsd*" and "nbsd*" hosts.
9631         * corefile.c (get_exec_file): Update comment.
9632         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9633         instead of "startup_inferior".
9634         (darwin_create_inferior): Call "add_thread_silent" after
9635         "fork_inferior".
9636         * fork-child.c: Cleanup unnecessary includes.
9637         (SHELL_FILE): Move to "common/common-fork-child.c".
9638         (environ): Likewise.
9639         (exec_wrapper): Initialize.
9640         (get_exec_wrapper): New function.
9641         (breakup_args): Move to "common/common-fork-child.c"; rename to
9642         "breakup_args_for_exec".
9643         (escape_bang_in_quoted_argument): Move to
9644         "common/common-fork-child.c".
9645         (saved_ui): New variable.
9646         (prefork_hook): New function.
9647         (postfork_hook): Likewise.
9648         (postfork_child_hook): Likewise.
9649         (gdb_startup_inferior): Likewise.
9650         (fork_inferior): Move to "common/common-fork-child.c".  Update
9651         function to support gdbserver.
9652         (startup_inferior): Likewise.
9653         * gdbcore.h (get_exec_file): Remove declaration.
9654         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9655         instead of "startup_inferior".  Call "add_thread_silent" after
9656         "fork_inferior".
9657         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9658         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9659         instead of "startup_inferior".  Call "add_thread_silent" after
9660         "fork_inferior".
9661         * inferior.h: Include "common-inferior.h".
9662         (trace_start_error): Move to "common/common-utils.h".
9663         (trace_start_error_with_name): Likewise.
9664         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9665         (startup_inferior): Likewise.
9666         (gdb_startup_inferior): New prototype.
9667         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9668         * nat/fork-inferior.h: New file.
9669         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9670         instead of "startup_inferior".  Call "add_thread_silent" after
9671         "fork_inferior".
9672         * target.h (target_terminal_init): Move prototype to
9673         "target/target.h".
9674         (target_terminal_inferior): Likewise.
9675         (target_terminal_ours): Likewise.
9676         * target/target.h (target_terminal_init): New prototype, moved
9677         from "target.h".
9678         (target_terminal_inferior): Likewise.
9679         (target_terminal_ours): Likewise.
9680         * utils.c (gdb_flush_out_err): New function.
9681
9682 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9683
9684         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9685         * common/common-gdbthread.h: New file, with parts from
9686         "gdb/gdbthread.h".
9687         * gdbthread.h: Include "common-gdbthread.h".
9688         (switch_to_thread): Moved to "common/common-gdbthread.h".
9689
9690 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9691
9692         * Makefile.in (SFILES): Add "common/job-control.c".
9693         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9694         (COMMON_OBS): Add "job-control.o".
9695         * common/job-control.c: New file, with contents from
9696         "gdb/inflow.c".
9697         * common/job-control.h: New file, with contents from "terminal.h".
9698         * fork-child.c: Include "job-control.h".
9699         * inflow.c: Include "job-control.h".
9700         (gdb_setpgid): Move to "common/common-inflow.c".
9701         (_initialize_inflow): Move setting of "job_control" to
9702         "handle_job_control".
9703         * terminal.h (job_control): Moved to "common/common-terminal.h".
9704         (gdb_setpgid): Likewise.
9705         * top.c: Include "job_control.h".
9706         * utils.c: Likewise.
9707         (job_control): Moved to "job-control.c".
9708
9709 2017-06-07  Pedro Alves  <palves@redhat.com>
9710
9711         * Makefile.in (SFILES): Add gdb_regex.c.
9712         (COMMON_OBS): Add gdb_regex.o.
9713         * ada-lang.c (ada_add_standard_exceptions)
9714         (ada_add_exceptions_from_frame, name_matches_regex)
9715         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9716         parameter type to compiled_regex.  Adjust.
9717         (ada_exceptions_list): Use compiled_regex.
9718         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9719         std::unique_ptr<compiled_regex>.
9720         (exception_catchpoint::~exception_catchpoint): Remove regfree
9721         call.
9722         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9723         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9724         * breakpoint.c (solib_catchpoint::compiled): Now a
9725         std::unique_ptr<compiled_regex>.
9726         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9727         (check_status_catch_solib): Adjust to use compiled_regex.
9728         (add_solib_catchpoint): Adjust to use compiled_regex.
9729         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9730         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9731         compiled_regex reference.  Adjust to use it.
9732         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9733         declaration.  Include "gdb_regex.h".
9734         (apropos_cmd): Change regex parameter to compiled_regex reference.
9735         * gdb_regex.c: New file.
9736         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9737         declarations.
9738         (class compiled_regex): New.
9739         * linux-tdep.c: Include "common/gdb_optional.h".
9740         (struct mapping_regexes): New, factored out from
9741         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9742         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9743         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9744         * probe.c: Include "common/gdb_optional.h".
9745         (collect_probes): Use compiled_regex and gdb::optional and remove
9746         cleanups.
9747         * skip.c: Include "common/gdb_optional.h".
9748         (skiplist_entry::compiled_function_regexp): Now a
9749         gdb::optional<compiled_regex>.
9750         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9751         (free_skiplist_entry): Remove regfree call.
9752         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9753         compiled_regex and gdb::optional.
9754         * symtab.c: Include "common/gdb_optional.h".
9755         (search_symbols): Use compiled_regex and gdb::optional.
9756         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9757         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9758         to gdb_regex.c.
9759
9760 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9761
9762         * regcache.c (regcache::save): Avoid buffer use.
9763         (regcache::dump): Likewise.
9764
9765 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9766
9767         * sh-tdep.c (sh_pseudo_register_read): Remove
9768         MAX_REGISTER_SIZE.
9769         (sh_pseudo_register_write): Likewise.
9770         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9771         (sh64_pseudo_register_write): Likewise
9772
9773 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9774
9775         * aarch64-tdep.c (aarch64_store_return_value): Use
9776         V_REGISTER_SIZE.
9777         (aarch64_pseudo_read_value): Likewise.
9778         (aarch64_pseudo_write): Likewise.
9779
9780 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9781
9782         * regformats/regdef.h (set_register_cache): Remove the
9783         declaration.
9784
9785 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9786
9787         * frame.c (frame_unwind_register_signed): Use
9788         frame_unwind_register_value.
9789
9790 2017-06-06  Pedro Alves  <palves@redhat.com>
9791
9792         PR breakpoints/21553
9793         * breakpoint.c (create_breakpoints_sal_default)
9794         (init_breakpoint_sal, create_breakpoint_sal): Use
9795         gdb::unique_xmalloc_ptr for string parameters.
9796         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9797         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9798         (base_breakpoint_create_breakpoints_sal)
9799         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9800         (strace_marker_create_breakpoints_sal)
9801         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9802         string parameters.
9803         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9804         gdb::unique_xmalloc_ptr for string parameters.
9805         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9806         parameters.
9807
9808 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9809
9810         * alpha-tdep.c (alpha_register_to_value): Use
9811         get_frame_register_value.
9812         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9813
9814 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9815
9816         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9817         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9818         (ia64_value_to_register): Likewise.
9819         (ia64_extract_return_value): Likewise.
9820         (ia64_store_return_value): Likewise.
9821         (ia64_push_dummy_call): Likewise.
9822
9823 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9824
9825         GDB 8.0 released.
9826
9827 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9828
9829         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9830
9831 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9832
9833         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9834         parameter.
9835         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9836
9837 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9838
9839         * event-loop.c (poll_timers): Unallocate timer using delete
9840         instead of xfree.
9841
9842 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9843
9844         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9845         (struct breakpoint) <~breakpoint>: New.
9846         (struct watchpoint): Inherit from breakpoint.
9847         <~watchpoint>: New.
9848         <base>: Remove.
9849         (struct tracepoint): Inherit from breakpoint.
9850         <base>: Remove.
9851         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9852         (struct longjmp_breakpoint): Inherit from breakpoint.
9853         <~longjmp_breakpoint>: New.
9854         <base>: Remove.
9855         (new_breakpoint_from_type): Remove casts.
9856         (watchpoint_in_thread_scope): Remove reference to base field.
9857         (watchpoint_del_at_next_stop): Likewise.
9858         (update_watchpoint): Likewise.
9859         (watchpoint_check): Likewise.
9860         (bpstat_check_watchpoint): Likewise.
9861         (set_longjmp_breakpoint): Likewise.
9862         (struct fork_catchpoint): Inherit from breakpoint.
9863         <base>: Remove.
9864         (struct solib_catchpoint): Inherit from breakpoint.
9865         <~solib_catchpoint>: New.
9866         <base>: Remove.
9867         (dtor_catch_solib): Change to ...
9868         (solib_catchpoint::~solib_catchpoint): ... this.
9869         (breakpoint_hit_catch_solib): Remove reference to base field.
9870         (add_solib_catchpoint): Likewise.
9871         (create_fork_vfork_event_catchpoint): Likewise.
9872         (struct exec_catchpoint): Inherit from breakpoint.
9873         <~exec_catchpoint>: New.
9874         <base>: Remove.
9875         (dtor_catch_exec): Change to ...
9876         (exec_catchpoint::~exec_catchpoint): ... this.
9877         (dtor_watchpoint): Change to ...
9878         (watchpoint::~watchpoint): ... this.
9879         (watch_command_1): Remove reference to base field.
9880         (catch_exec_command_1): Likewise.
9881         (base_breakpoint_dtor): Change to ...
9882         (breakpoint::~breakpoint): ... this.
9883         (base_breakpoint_ops): Remove dtor field value.
9884         (longjmp_bkpt_dtor): Change to ...
9885         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9886         (strace_marker_create_breakpoints_sal): Remove reference to base
9887         field.
9888         (delete_breakpoint): Don't manually call breakpoint destructor.
9889         (create_tracepoint_from_upload): Remove reference to base field.
9890         (trace_pass_set_count): Likewise.
9891         (initialize_breakpoint_ops): Don't initialize
9892         momentary_breakpoint_ops, don't set dtors.
9893         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9894         <~ada_catchpoint>: New.
9895         <base>: Remove.
9896         (create_excep_cond_exprs): Remove reference to base field.
9897         (dtor_exception): Change to ...
9898         (ada_catchpoint::~ada_catchpoint): ... this.
9899         (dtor_catch_exception): Remove.
9900         (dtor_catch_exception_unhandled): Remove.
9901         (dtor_catch_assert): Remove.
9902         (create_ada_exception_catchpoint): Remove reference to base
9903         field.
9904         (initialize_ada_catchpoint_ops): Don't set dtors.
9905         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9906         breakpoint.
9907         <~signal_catchpoint>: New.
9908         <base>: Remove.
9909         (signal_catchpoint_dtor): Change to ...
9910         (signal_catchpoint::~signal_catchpoint): ... this.
9911         (create_signal_catchpoint): Remove reference to base field.
9912         (initialize_signal_catchpoint_ops): Don't set dtor.
9913         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9914         from breakpoint.
9915         <~syscall_catchpoint>: New.
9916         <base>: Remove.
9917         (dtor_catch_syscall): Change to ...
9918         (syscall_catchpoint::~syscall_catchpoint): ... this.
9919         (create_syscall_event_catchpoint): Remove reference to base
9920         field.
9921         (initialize_syscall_catchpoint_ops): Don't set dtor.
9922         * break-catch-throw.c (struct exception_catchpoint): Inherit
9923         from breakpoint.
9924         <~exception_catchpoint>: New.
9925         <base>: Remove.
9926         (dtor_exception_catchpoint): Change to ...
9927         (exception_catchpoint::~exception_catchpoint): ... this.
9928         (handle_gnu_v3_exceptions): Remove reference to base field.
9929         (initialize_throw_catchpoint_ops): Don't set dtor.
9930         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9931         field.
9932         * remote.c (remote_get_tracepoint_status): Likewise.
9933         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9934         * tracefile.c (tracefile_fetch_registers): Likewise.
9935         * tracepoint.c (actions_command): Likewise.
9936         (validate_actionline): Likewise.
9937         (tfind_1): Likewise.
9938         (get_traceframe_location): Likewise.
9939         (find_matching_tracepoint_location): Likewise.
9940         (parse_tracepoint_status): Likewise.
9941         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9942
9943 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9944
9945         * breakpoint.c (struct longjmp_breakpoint): New struct.
9946         (is_tracepoint_type): Change return type to bool.
9947         (is_longjmp_type): New function.
9948         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9949         (set_raw_breakpoint_without_location): Use
9950         new_breakpoint_from_type.
9951         (set_raw_breakpoint): Likewise.
9952
9953 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9954
9955         * breakpoint.c (new_breakpoint_from_type): New function.
9956         (create_breakpoint_sal): Use new_breakpoint_from_type and
9957         unique_ptr.
9958         (create_breakpoint): Likewise.
9959
9960 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9961
9962         * memattr.c (mem_info_command): Rename to ...
9963         (info_mem_command): ... this.
9964         (mem_enable_command): Rename to ...
9965         (enable_mem_command): ... this.
9966         (mem_disable_command): Rename to ...
9967         (disable_mem_command): ... this.
9968         (mem_delete_command): Rename to ...
9969         (delete_mem_command): ... this.
9970         (_initialize_mem): Adjust function names.
9971
9972 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9973
9974         * btrace.c (handle_pt_insn_events): New.
9975         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9976         STATUS.  Split into this and ...
9977         (handle_pt_insn_event_flags): ... this.
9978
9979 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9980
9981         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9982         and struct pt_insn.resynced.
9983         * configure: Regenerated.
9984         * config.in: Regenerated.
9985
9986 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9987
9988         * btrace.c (ftrace_find_call_by_number): New function.
9989         (ftrace_new_function): Store objects, not pointers.
9990         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9991         ftrace_new_gap, ftrace_update_function,
9992         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9993         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9994         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9995         btrace_ends_with_single_insn, btrace_call_get): Account for
9996         btrace_thread_info::functions now storing objects.
9997         * btrace.h (struct btrace_thread_info): Add constructor.
9998         (struct btrace_thread_info) <functions>: Make std::vector.
9999         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10000         Initialize with default values.
10001         * record-btrace.c (record_btrace_frame_sniffer): Account for
10002         btrace_thread_info::functions now storing objects.
10003
10004 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10005
10006         * btrace.c: Remove typedef bfun_s.
10007         (ftrace_new_gap): Directly add gaps to the list of gaps.
10008         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10009         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10010         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10011         instead of gdb VEC.
10012
10013 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10014
10015         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10016         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10017         with btrace_thread_info::next_segment and
10018         btrace_thread_info::prev_segment.
10019         * btrace.h: Remove struct btrace_func_link.
10020         (struct btrace_function): Replace pair of function segment pointers
10021         with pair of indices.
10022         * python/py-record-btrace.c (btpy_call_prev_sibling,
10023         btpy_call_next_sibling): Replace references to
10024         btrace_thread_info::segment with btrace_thread_info::next_segment and
10025         btrace_thread_info::prev_segment.
10026         * record-btrace.c (record_btrace_frame_this_id): Use
10027         btrace_find_call_by_number.
10028
10029 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10030
10031         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10032         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10033         btrace_insn_next, btrace_insn_prev): Remove references to
10034         btrace_thread_info::flow.
10035         * btrace.h (struct btrace_function): Remove FLOW.
10036
10037 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10038
10039         * btrace.c (ftrace_find_call_by_number): New function.
10040         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10041         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10042         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10043         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10044         index.
10045         * btrace.h (struct btrace_function): Turn UP into an index.
10046         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10047         as an index.
10048         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10049         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10050         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10051
10052 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10053
10054         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10055         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10056         ftrace_update_function, ftrace_compute_global_level_offset,
10057         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10058         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10059         btrace_insn_end, btrace_is_empty): Remove references to
10060         btrace_thread_info::begin and btrace_thread_info::end.
10061         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10062         (struct btrace_thread_info) <functions>: Adjust comment.
10063         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10064         btrace_thread_info::begin.
10065
10066 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10067
10068         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10069         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10070         ftrace_update_function): Remove arguments that implicitly were always
10071         BTINFO->END.
10072         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10073         Don't pass BTINFO->END.
10074
10075 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10076
10077         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10078         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10079         btrace_find_insn_by_number): Replace function segment pointer with
10080         index.
10081         (btrace_insn_cmp): Simplify.
10082         * btrace.h: (struct btrace_insn_iterator) Rename index to
10083         insn_index.  Replace function segment pointer with index into function
10084         segment vector.
10085         * record-btrace.c (record_btrace_call_history): Replace function
10086         segment pointer use with index.
10087         (record_btrace_frame_sniffer): Retrieve function call segment through
10088         vector.
10089         (record_btrace_set_replay): Remove defunc't safety check.
10090
10091 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10092
10093         * btrace.c (btrace_ends_with_single_insn): New function.
10094         (btrace_call_get, btrace_call_number, btrace_call_begin,
10095         btrace_call_end, btrace_call_next, btrace_call_prev,
10096         btrace_find_call_by_number): Use index into call segment vector
10097         instead of pointer.
10098         (btrace_call_cmp): Simplify.
10099         * btrace.h (struct btrace_call_iterator): Replace function call segment
10100         pointer with index into vector.
10101         * record-btrace.c (record_btrace_call_history): Use index instead of
10102         pointer.
10103
10104 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10105
10106         * btrace.c (btrace_insn_begin, btrace_insn_end,
10107         btrace_find_insn_by_number): Add btinfo to iterator.
10108         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10109
10110 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10111
10112         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10113         and save pointers directly.
10114         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10115         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10116         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10117         changed signature of functions.
10118         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10119         (btrace_fetch): Remove code that adds btrace_function pointers to
10120         vector of btrace_functions.
10121         (btrace_clear): Simplify freeing vector of btrace_functions.
10122
10123 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10124
10125         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10126         Replace VEC_* with std::vector functions.
10127         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10128         (struct btrace_thread_info)<functions>: Change type to std::vector.
10129
10130 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10131
10132         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10133         "Removed targets and native configurations" up.  Merge duplicate
10134         "New commands" sub-sections.  Add "New options" sub-sections.
10135
10136 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10137
10138         * defs.h (copy_integer_to_size): New declaration.
10139         * findvar.c (copy_integer_to_size): New function.
10140         (do_cint_test): New selftest function.
10141         (copy_integer_to_size_test): Likewise.
10142         (_initialize_findvar): Likewise.
10143         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10144         (mips_fbsd_collect_reg): Use raw_collect_integer.
10145         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10146         (mips64_fill_gregset): Use raw_collect_integer
10147         (mips64_fill_fpregset): Use raw_supply_integer.
10148         * regcache.c (regcache::raw_supply_integer): New function.
10149         (regcache::raw_collect_integer): Likewise.
10150         * regcache.h: (regcache::raw_supply_integer): New declaration.
10151         (regcache::raw_collect_integer): Likewise.
10152
10153 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10154
10155         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10156         (COMMON_OBS): Add gdbarch-selftests.o.
10157         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10158         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10159         * gdbarch-selftests.c: New file.
10160         * regcache.h (regcache) <~regcache>: Mark it virtual if
10161         GDB_SELF_TEST.
10162         <raw_write>: Likewise.
10163
10164 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10165
10166         * regcache.c (current_regcache): Change it to
10167         regcache::current_regcache.
10168         (regcache_observer_target_changed): Update.
10169         (regcache_thread_ptid_changed): Make it a regcache static
10170         method.
10171         (regcache_thread_ptid_changed): Update.
10172         (class regcache_access): New.
10173         (current_regcache_test): Update.
10174         (_initialize_regcache): Update.
10175         * regcache.h: Include forward_list.
10176         (regcache): Declare regcache_thread_ptid_changed and declare
10177         registers_changed_ptid as friend.
10178
10179 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10180
10181         * i387-tdep.c (i387_register_to_value): Use register_size
10182         instead of TYPE_LENGTH.
10183         * m68k-tdep.c (m68k_register_to_value): Likewise.
10184
10185 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10186
10187         * i387-tdep.c (i387_convert_register_p): Return false if type
10188         code isn't TYPE_CODE_FLT.
10189
10190 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10191
10192         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10193         length is 4.
10194         (alpha_register_to_value): Remove type length check.
10195         (alpha_value_to_register): Likewise.
10196
10197 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10198
10199         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10200         TYPE_CODE_FLT.
10201
10202 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10203
10204         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10205         TYPE_CODE_FLT or not.
10206
10207 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10208
10209         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10210         * avr-tdep.c (avr_gdbarch_init): Likewise.
10211         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10212         * cris-tdep.c (cris_gdbarch_init): Likewise.
10213         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10214         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10215         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10216         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10217         * mep-tdep.c (mep_gdbarch_init): Likewise.
10218         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10219         * mips-tdep.c (mips_gdbarch_init): Likewise.
10220         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10221         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10222         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10223         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10224         * v850-tdep.c (v850_gdbarch_init): Likewise.
10225
10226 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10227
10228         * selftest-arch.c (tests_with_arch): Call registers_changed
10229         and reinit_frame_cache.
10230         * selftest.c (run_self_tests): Likewise.
10231
10232 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10233
10234         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10235         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10236
10237 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10238
10239         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10240         set_gdbarch_print_insn.
10241
10242 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10243
10244         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10245         set_gdbarch_print_insn.
10246
10247 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10248
10249         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10250         set_gdbarch_print_insn.
10251         * arc-tdep.c (arc_gdbarch_init): Likewise.
10252         * arch-utils.c: include dis-asm.h.
10253         (default_print_insn): New function.
10254         * arch-utils.h (default_print_insn): Declare.
10255         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10256         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10257         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10258         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10259         * frv-tdep.c (frv_gdbarch_init): Likewise.
10260         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10261         * gdbarch.sh (print_insn): Use default_print_insn.
10262         * gdbarch.c: Regenerated.
10263         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10264         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10265         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10266         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10267         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10268         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10269         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10270         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10271         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10272         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10273         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10274         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10275         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10276         * mt-tdep.c (mt_gdbarch_init): Likewise.
10277         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10278         * nios2-tdep.c (nios2_print_insn): Remove.
10279         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10280         * rx-tdep.c (rx_gdbarch_init): Likewise.
10281         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10282         * score-tdep.c (score_print_insn): Remove.
10283         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10284         * sh-tdep.c (sh_gdbarch_init): Likewise.
10285         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10286         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10287         * tic6x-tdep.c (tic6x_print_insn): Remove.
10288         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10289         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10290         * v850-tdep.c (v850_gdbarch_init): Likewise.
10291         * vax-tdep.c (vax_gdbarch_init): Likewise.
10292         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10293         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10294
10295 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10296
10297         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10298         (MIPS_FP0_REGNUM): Remove.
10299         (MIPS_FSR_REGNUM): Remove.
10300         (mips_fbsd_supply_fpregs): Use mips_regnum.
10301         (mips_fbsd_supply_gregs): Likewise.
10302         (mips_fbsd_collect_fpregs): Likewise.
10303         (mips_fbsd_collect_gregs): Likewise.
10304
10305 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10306
10307         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10308         (getpfpregs_supplies): New function.
10309         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10310         getfpregs_supplies.
10311         (mips_fbsd_store_inferior_registers): Likewise.
10312
10313 2017-05-22  Pedro Alves <palves@redhat.com>
10314
10315         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10316         maintainer.
10317
10318 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10319
10320         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10321         (store_register): Likewise.
10322         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10323         (get_decimal_float_return_value): Likewise.
10324         (do_ppc_sysv_return_value): Likewise.
10325         (ppc64_sysv_abi_push_integer): Likewise.
10326         (ppc64_sysv_abi_push_freg): Likewise.
10327         (ppc64_sysv_abi_return_value_base): Likewise.
10328         (ppc64_sysv_abi_return_value): Likewise.
10329         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10330         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10331         * rs6000-nat.c: Likewise.
10332         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10333         (rs6000_value_to_register): Likewise.
10334         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10335
10336 2017-05-21  Tom Tromey  <tom@tromey.com>
10337
10338         PR rust/21466:
10339         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10340         arrays as "[T]", not "[T; ]".
10341
10342 2017-05-19  Tom Tromey  <tom@tromey.com>
10343
10344         PR rust/21484:
10345         * rust-lang.c (exp_descriptor_rust): New function.
10346         (rust_language_defn): Use it.
10347         * p-lang.c (pascal_language_defn): Update.
10348         * opencl-lang.c (opencl_language_defn): Update.
10349         * objc-lang.c (objc_language_defn): Update.
10350         * m2-lang.c (m2_language_defn): Update.
10351         * language.h (struct language_defn)
10352         <la_watch_location_expression>: New member.
10353         * language.c (unknown_language_defn, auto_language_defn)
10354         (local_language_defn): Update.
10355         * go-lang.c (go_language_defn): Update.
10356         * f-lang.c (f_language_defn): Update.
10357         * d-lang.c (d_language_defn): Update.
10358         * c-lang.h (c_watch_location_expression): Declare.
10359         * c-lang.c (c_watch_location_expression): New function.
10360         (c_language_defn, cplus_language_defn, asm_language_defn)
10361         (minimal_language_defn): Use it.
10362         * breakpoint.c (watch_command_1): Call
10363         la_watch_location_expression.
10364         * ada-lang.c (ada_language_defn): Update.
10365
10366 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10367
10368         PR tui/21482
10369         * gdb_curses.h (NOMACROS): Define.
10370         (NCURSES_NOMACROS): Define.
10371
10372 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10373
10374         PR tui/21482
10375         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10376         arg to char *.
10377         * tui/tui-wingeneral.c (box_win): Likewise.
10378         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10379         (tui_show_source_line): Likewise.
10380         (tui_show_exec_info_content): Likewise.
10381
10382 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10383
10384         * sparc-tdep.c (sparc_structure_return_p)
10385         (sparc_arg_on_registers_p): New functions.
10386         (sparc32_store_arguments): Use them.
10387         * sparc64-tdep.c (sparc64_16_byte_align_p)
10388         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10389         Handle TYPE_CODE_ARRAY.
10390
10391 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10392
10393         * cli/cli-decode.c (add_alias_cmd): New function.
10394         * command.h (add_alias_cmd): Declare.
10395         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10396         instead call add_alias_cmd.
10397
10398 2017-05-17  Pedro Alves  <palves@redhat.com>
10399
10400         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10401         (nat_makefile_frag): ... this.  All references updated.
10402         * configure.ac: Likewise.
10403         * configure.nat: Likewise.  Enhance comments.
10404         * configure: Regenerate.
10405
10406 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10407
10408         * procfs.c (procfs_create_inferior): Change prototype to match
10409         definition.
10410
10411 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10412
10413         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10414         C++ compiler warning.
10415
10416 2017-05-12  Tom Tromey  <tom@tromey.com>
10417
10418         PR rust/21483:
10419         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10420         recurse, just call value_struct_elt directly.
10421
10422 2017-05-12  Tom Tromey  <tom@tromey.com>
10423
10424         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10425         OP_RUST_ARRAY>: Fix.
10426
10427 2017-05-12  Tom Tromey  <tom@tromey.com>
10428
10429         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10430
10431 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10432
10433         * regcache.c: Include <forward_list>.
10434         (struct regcache_list): Remove.
10435         (current_regcache): Update.
10436         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10437         (regcache_thread_ptid_changed): Likewise.
10438         (registers_changed_ptid): Likewise.
10439         (current_regcache_size): Likewise.
10440
10441 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10442
10443         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10444         (current_regcache_size): New function.
10445         (current_regcache_test): New function.
10446         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10447
10448 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10449
10450         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10451         (print_gp_register_row): Use get_frame_register_value.
10452
10453 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10454
10455         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10456         (mips_supply_fpregset): Likewise.
10457         (mips64_supply_gregset): Likewise.
10458
10459 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10460
10461         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10462         regcache->raw_supply_zeroed.
10463
10464 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10465
10466         * configure.nat: Rearrange 'case' statements to match
10467         host before cpu.
10468
10469 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10470
10471         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10472         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10473         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10474         "@nat_extra_makefile_frag@".
10475         (Makefile): Remove dependency on "@frags@".
10476         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10477         (data-directory/Makefile): Likewise.
10478         * config/aarch64/linux.mh: Deleted; moved contents to
10479         "gdb/configure.nat".
10480         * config/alpha/alpha-linux.mh: Likewise.
10481         * config/alpha/nbsd.mh: Likewise.
10482         * config/arm/linux.mh: Likewise.
10483         * config/arm/nbsdelf.mh: Likewise.
10484         * config/i386/cygwin.mh: Likewise.
10485         * config/i386/cygwin64.mh: Likewise.
10486         * config/i386/darwin.mh: Likewise.
10487         * config/i386/fbsd.mh: Likewise.
10488         * config/i386/fbsd64.mh: Likewise.
10489         * config/i386/go32.mh: Likewise.
10490         * config/i386/i386gnu.mh: Likewise.
10491         * config/i386/i386sol2.mh: Likewise.
10492         * config/i386/linux.mh: Likewise.
10493         * config/i386/linux64.mh: Likewise.
10494         * config/i386/mingw.mh: Likewise.
10495         * config/i386/mingw64.mh: Likewise.
10496         * config/i386/nbsd64.mh: Likewise.
10497         * config/i386/nbsdelf.mh: Likewise.
10498         * config/i386/nto.mh: Likewise.
10499         * config/i386/obsd.mh: Likewise.
10500         * config/i386/obsd64.mh: Likewise.
10501         * config/i386/sol2-64.mh: Likewise.
10502         * config/ia64/linux.mh: Likewise.
10503         * config/m32r/linux.mh: Likewise.
10504         * config/m68k/linux.mh: Likewise.
10505         * config/m68k/nbsdelf.mh: Likewise.
10506         * config/m68k/obsd.mh: Likewise.
10507         * config/m88k/obsd.mh: Likewise.
10508         * config/mips/fbsd.mh: Likewise.
10509         * config/mips/linux.mh: Likewise.
10510         * config/mips/nbsd.mh: Likewise.
10511         * config/mips/obsd64.mh: Likewise.
10512         * config/pa/linux.mh: Likewise.
10513         * config/pa/nbsd.mh: Likewise.
10514         * config/pa/obsd.mh: Likewise.
10515         * config/powerpc/aix.mh: Likewise.
10516         * config/powerpc/fbsd.mh: Likewise.
10517         * config/powerpc/linux.mh: Likewise.
10518         * config/powerpc/nbsd.mh: Likewise.
10519         * config/powerpc/obsd.mh: Likewise.
10520         * config/powerpc/ppc64-linux.mh: Likewise.
10521         * config/powerpc/spu-linux.mh: Likewise.
10522         * config/s390/linux.mh: Likewise.
10523         * config/sh/nbsd.mh: Likewise.
10524         * config/sparc/fbsd.mh: Likewise.
10525         * config/sparc/linux.mh: Likewise.
10526         * config/sparc/linux64.mh: Likewise.
10527         * config/sparc/nbsd64.mh: Likewise.
10528         * config/sparc/nbsdelf.mh: Likewise.
10529         * config/sparc/obsd64.mh: Likewise.
10530         * config/sparc/sol2.mh: Likewise.
10531         * config/tilegx/linux.mh: Likewise.
10532         * config/vax/nbsdelf.mh: Likewise.
10533         * config/vax/obsd.mh: Likewise.
10534         * config/xtensa/linux.mh: Likewise.
10535         * config/i386/i386gnu.mn: New file, with excerpts from
10536         "config/i386/i386gnu.mh".
10537         * configure: Regenerate.
10538         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10539         *.mh files under "gdb/config".
10540         * configure.nat: New file, with contents from the
10541         "gdb/config/*/*.mh" files.
10542
10543 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10544
10545         * btrace.c (btrace_clear): Free insn vector.
10546
10547 2017-05-05  Pedro Alves  <palves@redhat.com>
10548
10549         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10550         * configure: Regenerate.
10551
10552 2017-05-04  Pedro Alves  <palves@redhat.com>
10553
10554         * Makefile.in (SFILES): Add progspace-and-thread.c.
10555         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10556         (COMMON_OBS): Add progspace-and-thread.o.
10557         * breakpoint.c: Include "progspace-and-thread.h".
10558         (update_inserted_breakpoint_locations)
10559         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10560         Use scoped_restore_current_pspace_and_thread.
10561         (create_std_terminate_master_breakpoint): Use
10562         scoped_restore_current_program_space.
10563         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10564         (print_breakpoint_location): Use
10565         scoped_restore_current_program_space.
10566         (bp_loc_is_permanent): Use
10567         scoped_restore_current_pspace_and_thread.
10568         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10569         (download_tracepoint_locations): Use
10570         scoped_restore_current_pspace_and_thread.
10571         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10572         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10573         (enum step_over_calls_kind): Moved from inferior.h.
10574         (class scoped_restore_current_thread): New class.
10575         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10576         declaration.
10577         (scoped_restore_current_thread): New class.
10578         * infcmd.c: Include "common/gdb_optional.h".
10579         (continue_1, proceed_after_attach): Use
10580         scoped_restore_current_thread.
10581         (notice_new_inferior): Use scoped_restore_current_thread.
10582         * inferior.c: Include "progspace-and-thread.h".
10583         (restore_inferior, save_current_inferior): Delete.
10584         (add_inferior_command, clone_inferior_command): Use
10585         scoped_restore_current_pspace_and_thread.
10586         * inferior.h (scoped_restore_current_inferior): New class.
10587         * infrun.c: Include "progspace-and-thread.h" and
10588         "common/gdb_optional.h".
10589         (follow_fork_inferior): Use
10590         scoped_restore_current_pspace_and_thread.
10591         (scoped_restore_exited_inferior): New class.
10592         (handle_vfork_child_exec_or_exit): Use
10593         scoped_restore_exited_inferior,
10594         scoped_restore_current_pspace_and_thread,
10595         scoped_restore_current_thread and scoped_restore.
10596         (fetch_inferior_event): Use scoped_restore_current_thread.
10597         * linespec.c (decode_line_full, decode_line_1): Use
10598         scoped_restore_current_program_space.
10599         * mi/mi-main.c: Include "progspace-and-thread.h".
10600         (exec_continue): Use scoped_restore_current_thread.
10601         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10602         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10603         * proc-service.c (ps_pglobal_lookup): Use
10604         scoped_restore_current_program_space.
10605         * progspace-and-thread.c: New file.
10606         * progspace-and-thread.h: New file.
10607         * progspace.c (release_program_space, clone_program_space): Use
10608         scoped_restore_current_program_space.
10609         (restore_program_space, save_current_program_space)
10610         (save_current_space_and_thread): Delete.
10611         (switch_to_program_space_and_thread): Moved to
10612         progspace-and-thread.c.
10613         * progspace.h (save_current_program_space)
10614         (save_current_space_and_thread): Delete declarations.
10615         (scoped_restore_current_program_space): New class.
10616         * remote.c (remote_btrace_maybe_reopen): Use
10617         scoped_restore_current_thread.
10618         * symtab.c: Include "progspace-and-thread.h".
10619         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10620         * thread.c (print_thread_info_1): Use
10621         scoped_restore_current_thread.
10622         (struct current_thread_cleanup): Delete.
10623         (do_restore_current_thread_cleanup)
10624         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10625         (scoped_restore_current_thread::~scoped_restore_current_thread):
10626         ... this new dtor.
10627         (make_cleanup_restore_current_thread): Rename/convert to ...
10628         (scoped_restore_current_thread::scoped_restore_current_thread):
10629         ... this new ctor.
10630         (thread_apply_all_command): Use scoped_restore_current_thread.
10631         (thread_apply_command): Use scoped_restore_current_thread.
10632         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10633         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10634
10635 2017-05-04  Pedro Alves  <palves@redhat.com>
10636
10637         * thread.c (make_cleanup_restore_current_thread): Move
10638         find_thread_ptid call before the is_stopped call.  Assert that the
10639         thread is found.  Replace is_stopped call by checking the thread's
10640         state directly.  Remove unnecessary NULL-thread check.
10641
10642 2017-05-04  Pedro Alves  <palves@redhat.com>
10643
10644         * corelow.c (thread_section_name): New class.
10645         (get_core_register_section, get_core_siginfo): Use it.
10646
10647 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10648
10649         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10650         (get_core_register_section): Remove xfree of NULL pointer.
10651
10652 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10653
10654         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10655         * regcache.c (regcache::raw_supply_zeroed): New function.
10656         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10657
10658 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10659
10660         * gdbarch.sh: Remove commented out definition of
10661         TARGET_CHAR_BIT.
10662         * gdbarch.h: Re-generate.
10663
10664 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10665
10666         * configure: Regenerate.
10667
10668 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10669
10670         * solib-target.c (solib_target_relocate_section_addresses):
10671         Remove num_section_bases, num_bases, segment_bases variables.
10672
10673 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10674
10675         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10676
10677 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10678
10679         * solib-target.c: Include <vector>
10680         (struct lm_info_target) <~lm_info_target>: Remove.
10681         <segment_bases, section_bases>: Change type to
10682         std::vector<CORE_ADDR>.
10683         (library_list_start_segment, library_list_start_section,
10684         library_list_end_library,
10685         solib_target_relocate_section_addresses): Adjust.
10686
10687 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10688
10689         * gdbarch.sh (software_single_step): Change return type to
10690         std::vector<CORE_ADDR>.
10691         * gdbarch.c, gdbarch.h: Re-generate.
10692         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10693         Adjust.
10694         (arm_deal_with_atomic_sequence_raw): Adjust.
10695         (thumb_get_next_pcs_raw): Adjust.
10696         (arm_get_next_pcs_raw): Adjust.
10697         (arm_get_next_pcs): Adjust.
10698         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10699         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10700         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10701         (alpha_software_single_step): Adjust.
10702         * alpha-tdep.h (alpha_software_single_step): Adjust.
10703         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10704         * arm-tdep.c (arm_software_single_step): Adjust.
10705         (arm_breakpoint_kind_from_current_state): Adjust.
10706         * arm-tdep.h (arm_software_single_step): Adjust.
10707         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10708         * cris-tdep.c (cris_software_single_step): Adjust.
10709         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10710         (micromips_deal_with_atomic_sequence): Adjust.
10711         (deal_with_atomic_sequence): Adjust.
10712         (mips_software_single_step): Adjust.
10713         * mips-tdep.h (mips_software_single_step): Adjust.
10714         * moxie-tdep.c (moxie_software_single_step): Adjust.
10715         * nios2-tdep.c (nios2_software_single_step): Adjust.
10716         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10717         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10718         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10719         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10720         * sparc-tdep.c (sparc_software_single_step): Adjust.
10721         * spu-tdep.c (spu_software_single_step): Adjust.
10722         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10723
10724 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10725
10726         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10727         * gdbarch.h: Re-generate.
10728
10729 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10730
10731         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10732         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10733         * python/py-instruction.c, python/py-instruction.h: New file.
10734         * python/py-record.c: Add py-instruction.h include.
10735         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10736         gdb.RecordInstruction.
10737         * python/python-internal.h: Add gdbpy_initialize_instruction
10738         declaration.
10739         * python/python.c (do_start_initialization): Add
10740         gdbpy_initialize_instruction.
10741
10742 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10743
10744         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10745         Remove.
10746         (btrace_func_from_recpy_func): New function.
10747         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10748         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10749         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10750         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10751         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10752         Also, use new helper functions.
10753         (btpy_list_item): Use new helper functions.
10754         (recpy_bt_function_call_history): Use new type name.
10755         (btpy_call_getset): Remove.
10756         (gdbpy_initialize_btrace): Remove code to initialize
10757         gdb.BtraceFunctionCall.
10758         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10759         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10760         recpy_bt_func_prev, recpy_bt_func_next): New export.
10761         * python/py-record.c (recpy_func_type): New static object.
10762         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10763         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10764         recpy_func_next): New function.
10765         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10766         (recpy_func_getset): New static object.
10767         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10768         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10769
10770 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10771
10772         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10773         (btpy_object, btpy_insn_type, btpy_new): Remove.
10774         (btpy_list_object): Use gdb.RecordInstruction type instead of
10775         gdb.BtraceInstruction type.
10776         (btrace_insn_from_recpy_insn): New function.
10777         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10778         btpy_new.
10779         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10780         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10781         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10782         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10783         instead of btpy_object.
10784         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10785         btpy_insn_data, btpy_insn_decode): Rename to ...
10786         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10787         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10788         recpy_bt_insn_decode): This.  Also, use new helper functions.
10789         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10790         recpy_insn_type.
10791         (btpy_insn_getset): Remove.
10792         (gdbpy_initialize_btrace): Remove code to initialize
10793         gdb.BtraceInstruction.  Use recpy_element_object.
10794         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10795         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10796         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10797         * python/py-record.c (recpy_insn_type): New static object.
10798         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10799         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10800         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10801         New function.
10802         (recpy_insn_getset): New static object.
10803         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10804         * python/py-record.h (recpy_element_object): New typedef.
10805         (recpy_insn_type, recpy_insn_new): New export.
10806
10807 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10808
10809         * py-record-btrace.c (btpy_insn_new): Removed.
10810         (btpy_insn_or_gap_new): New function.
10811         (btpy_insn_error): Removed.
10812         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10813         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10814         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10815         btpy_insn_or_gap_new instead of btpy_insn_new.
10816         (btpy_insn_getset): Remove btpy_insn_error.
10817         * py-record.c (recpy_gap_type): New static object.
10818         (recpy_gap_object): New typedef.
10819         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10820         recpy_gap_reason_string): New function.
10821         (recpy_gap_getset): New static object.
10822         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10823         * py-record.h (recpy_gap_new): New export.
10824
10825 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10826
10827         * python/py-record.c (recpy_ptid): Remove.
10828         (recpy_record_getset): Remove recpy_ptid.
10829
10830 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10831
10832         * btrace.c (btrace_fetch): Set inferior_ptid.
10833         * python/py-record-btrace.c: Add "py-record.h" include.
10834         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10835         recpy_bt_end, recpy_bt_instruction_history,
10836         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10837         in gdb.Record object instead of current ptid.
10838         * python/py-record.c: Include new "py-record.h" file.
10839         (recpy_record_object): Moved to py-record.h.
10840         * python/py-record.h: New file.
10841
10842 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10843
10844         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10845         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10846         indentation.
10847
10848 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10849
10850         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10851         the past maintainers section.
10852
10853 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10854
10855         * infcmd.c (get_return_value): Use regcache ctor, and remove
10856         cleanup.
10857
10858 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10859             Pedro Alves  <palves@redhat.com>
10860
10861         * regcache.c (regcache::regcache): New tag dispatch ctor.
10862         (do_cooked_read): Moved above.
10863         (regcache_dup): Use the tag dispatch ctor..
10864         * regcache.h (regcache): Declare ctor, delete copy ctor and
10865         assignment operator, remove friend regcache_dup.
10866
10867 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10868
10869         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10870         call method save instead of regcache_cpy.
10871         * regcache.h (struct regcache): Make regcache_dup a friend.
10872
10873 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10874
10875         * regcache.c (struct regcache): Move to regcache.h
10876         (regcache::arch): New method.
10877         (regcache_get_ptid): Update.
10878         (get_regcache_arch): Call arch method.
10879         (get_regcache_aspace): Call method aspace.
10880         (register_buffer): Change it to method.
10881         (regcache_save): Change it to regcache::save.
10882         (regcache_restore): Likewise.
10883         (regcache_cpy_no_passthrough): Remove the declaration.
10884         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10885         (regcache_cpy_no_passthrough): Change it to method
10886         cpy_no_passthrough.
10887         (regcache_register_status): Change it to method
10888         get_register_status.
10889         (regcache_invalidate): Change it to method invalidate.
10890         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10891         (regcache_raw_update): Change it to method raw_update.
10892         (regcache_raw_read): Likewise.
10893         (regcache_raw_read_signed): Likewise.
10894         (regcache_raw_read_unsigned): Likewise.
10895         (regcache_raw_write_signed): Likewise.
10896         (regcache_raw_write_unsigned): Likewise.
10897         (regcache_cooked_read): Likewise.
10898         (regcache_cooked_read_value): Likewise.
10899         (regcache_cooked_read_signed): Likewise.
10900         (regcache_cooked_read_unsigned): Likewise.
10901         (regcache_cooked_write_signed): Likewise.
10902         (regcache_cooked_write_unsigned): Likewise.
10903         (regcache_raw_set_cached_value): Likewise.
10904         (regcache_raw_write): Likewise.
10905         (regcache_cooked_write): Likewise.
10906         (regcache_xfer_part): Likewise.
10907         (regcache_raw_read_part): Likewise.
10908         (regcache_raw_write_part): Likewise.
10909         (regcache_cooked_read_part): Likewise.
10910         (regcache_cooked_write_part): Likewise.
10911         (regcache_raw_supply): Likewise.
10912         (regcache_raw_collect): Likewise.
10913         (regcache_transfer_regset): Likewise.
10914         (regcache_supply_regset): Likewise.
10915         (regcache_collect_regset): Likewise.
10916         (regcache_debug_print_register): Likewise.
10917         (enum regcache_dump_what): Move it to regcache.h.
10918         (regcache_dump): Change it to method dump.
10919         * regcache.h (enum regcache_dump_what): New.
10920         (class regcache): New.
10921         * target.c (target_fetch_registers): Call method
10922         debug_print_register.
10923         (target_store_registers): Likewise.
10924
10925 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10926
10927         * windows-nat.c (struct lm_info_windows): Initialize field.
10928         (windows_make_so): Allocate lm_info_windows with new.
10929         (windows_free_so): Free lm_info_windows with delete.
10930
10931 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10932
10933         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10934         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10935         cleanup.
10936         (darwin_free_so): Free lm_info_darwin with delete.
10937
10938 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10939
10940         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10941         <l_addr_p>: Change type to bool.
10942         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10943         (svr4_free_so): Free lm_info_svr4 with delete.
10944         (svr4_copy_library_list): Replace memcpy with call to copy
10945         constructor.
10946         (library_list_start_library, svr4_default_sos): Allocate
10947         lm_info_svr4 with new.
10948
10949 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10950
10951         * solib-target.c (struct lm_info_target): Add destructor,
10952         initialize fields.
10953         <name>: Change type to std::string.
10954         (library_list_start_library): Allocate lm_info_target with new.
10955         (solib_target_free_library_list): Free lm_info_target with
10956         delete.
10957         (solib_target_current_sos): Adapt to std::string.
10958         (solib_target_free_so): Free lm_info_target with delete.
10959
10960 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10961
10962         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10963         fields.
10964         (frv_current_sos): Allocate lm_info_frv with new.
10965         (frv_relocate_main_executable): Free lm_info_frv with delete,
10966         allocate with new.
10967         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10968
10969 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10970
10971         * solib-frv.c (struct lm_info_frv): Fix indentation.
10972
10973 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10974
10975         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10976         map field.
10977         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10978         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10979         and allocate with new.
10980         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10981
10982 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10983
10984         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10985         <filename, member_name>: Change type to std::string.
10986         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10987         (library_list_start_library): Allocate lm_info_aix with new.
10988         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10989         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10990         with copy constructor.
10991
10992 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10993
10994         * solist.h (struct lm_info): Remove.
10995         (struct lm_info_base): New class.
10996         (struct so_list) <lm_info>: Change type to lm_info_base *.
10997         * nto-tdep.c (struct lm_info): Remove.
10998         (lm_addr): Adjust.
10999         * solib-aix.c (struct lm_info): Rename to ...
11000         (struct lm_info_aix): ... this.  Extend lm_info_base.
11001         (lm_info_p): Rename to ...
11002         (lm_info_aix_p): ... this, and adjust.
11003         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11004         solib_aix_parse_libraries, library_list_start_library,
11005         solib_aix_free_library_list, solib_aix_parse_libraries,
11006         solib_aix_get_library_list,
11007         solib_aix_relocate_section_addresses, solib_aix_free_so,
11008         solib_aix_get_section_offsets,
11009         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11010         Adjust.
11011         (struct solib_aix_inferior_data) <library_list>: Adjust.
11012         * solib-darwin.c (struct lm_info): Rename to ...
11013         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11014         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11015         * solib-dsbt.c (struct lm_info): Rename to ...
11016         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11017         (struct dsbt_info) <main_executable_lm_info): Adjust.
11018         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11019         dsbt_relocate_section_addresses): Adjust.
11020         * solib-frv.c (struct lm_info): Rename to ...
11021         (struct lm_info_frv): ... this.  Extend lm_info_base.
11022         (main_executable_lm_info): Adjust.
11023         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11024         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11025         find_canonical_descriptor_in_load_object,
11026         frv_fdpic_find_canonical_descriptor): Adjust.
11027         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11028         to lm_info_svr4.
11029         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11030         svr4_clear_so, svr4_copy_library_list,
11031         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11032         svr4_current_sos, svr4_fetch_objfile_link_map,
11033         solist_update_incremental): Adjust.
11034         * solib-svr4.h (struct lm_info_svr4): Move here from
11035         solib-svr4.c.
11036         * solib-target.c (struct lm_info): Rename to ...
11037         (struct lm_info_target): ... this.  Extend lm_info_base.
11038         (lm_info_p): Rename to ...
11039         (lm_info_target_p): ... this.
11040         (solib_target_parse_libraries, library_list_start_segment,
11041         library_list_start_section, library_list_start_library,
11042         library_list_end_library, solib_target_free_library_list,
11043         solib_target_current_sos, solib_target_free_so,
11044         solib_target_relocate_section_addresses): Adjust.
11045         * windows-nat.c (struct lm_info): Rename to ...
11046         (struct lm_info_windows): ... this.  Extend lm_info_base.
11047         (windows_make_so, handle_load_dll, handle_unload_dll,
11048         windows_xfer_shared_libraries): Adjust.
11049
11050 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11051
11052         * solib-darwin.c (struct darwin_so_list): Remove.
11053         (darwin_current_sos): Allocate an so_list object instead of a
11054         darwin_so_list, separately allocate an lm_info object.
11055         (darwin_free_so): Free lm_info.
11056
11057 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11058
11059         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11060         with fprintf_filtered.
11061
11062 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11063
11064         * regcache.c (regcache::regcache): New function.
11065         (regcache::~regcache): New function.
11066         (regcache_xmalloc_1): Remove.
11067         (regcache_xmalloc): Call new regcache.
11068         (regcache_xfree): Call delete regcache.
11069         (get_thread_arch_aspace_regcache): Call new regcache.
11070
11071 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11072
11073         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11074         lwp instead of ptid_get_lwp.
11075
11076 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11077
11078         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11079         lwp_info instead of getting from inferior_ptid.
11080
11081 2017-04-27  Keith Seitz  <keiths@redhat.com>
11082
11083         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11084         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11085         (CV_CONVERSION_BADNESS): Define.
11086         (rank_one_type): Remove overly restrictive rvalue reference
11087         rank checks.
11088         Add cv-qualifier checks and subranks for type equality.
11089         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11090         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11091         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11092
11093 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11094
11095         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11096         count when creating the object.
11097
11098 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11099             Ulrich Weigand  <uweigand@de.ibm.com>
11100
11101         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11102         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11103         is used in AIX.
11104         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11105         (process_xcoff_symbol): Likewise.
11106         (scan_xcoff_symtab): Likewise.
11107
11108 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11109
11110         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11111         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11112         (ia64_access_reg): Use get_frame_register_unsigned.
11113         (ia64_access_rse_reg): Likewise.
11114         (ia64_libunwind_frame_prev_register): Likewise.
11115
11116 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11117
11118         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11119         * gdbarch.c: Regenerated.
11120         * gdbarch.h: Regenerated.
11121         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11122         visibility external.
11123         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11124         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11125         (enum cfa_how_kind): Move to ...
11126         (struct dwarf2_frame_state_reg_info): Likewise.
11127         (struct dwarf2_frame_state): Likewise.
11128         * dwarf2-frame.h: ... here.
11129         (dwarf2_frame_state_alloc_regs): New declaration.
11130         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11131         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11132
11133 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11134
11135         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11136         regcache_raw_read_unsigned.
11137         (xtensa_pseudo_register_write): Likewise.
11138
11139 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11140
11141         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11142         (nds32_pseudo_register_write): Likewise.
11143
11144 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11145
11146         * regcache.c (struct regcache) <readonly_p>: Change its type
11147         to bool.
11148         (regcache_xmalloc_1): Update parameter type and callers update.
11149
11150 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11151
11152         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11153         set_gdbarch_wchar_bit.
11154         * arm-tdep.c (arm_gdbarch_init): Likewise.
11155
11156 2017-04-25  Pedro Alves  <palves@redhat.com>
11157
11158         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11159         (BothAreRelocatable, memcopy, memmove): Don't define.
11160         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11161         macros.
11162
11163 2017-04-25  Pedro Alves  <palves@redhat.com>
11164
11165         * common/common-defs.h: Include "common/poison.h".
11166         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11167         and adjust.
11168         * common/poison.h: New file.
11169         * common/traits.h: Include <type_traits>.
11170         (Not, Or, Requires): New, moved from common/function-view.h.
11171
11172 2017-04-25  Pedro Alves  <palves@redhat.com>
11173
11174         * breakpoint.h (struct breakpoint): In-class initialize all
11175         fields.  Make boolean fields "bool".
11176         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11177         memset call and initializations no longer necessary.
11178
11179 2017-04-25  Pedro Alves  <palves@redhat.com>
11180
11181         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11182         reference.
11183         (pt_btrace_insn): New function.
11184         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11185
11186 2017-04-25  Pedro Alves  <palves@redhat.com>
11187
11188         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11189         "base" field and inherit from "bp_location" instead.  Add
11190         non-default ctor.
11191         (allocate_location_exception): Use new non-default ctor.
11192         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11193         (init_bp_location): Convert to ...
11194         (bp_location::bp_location): ... this new ctor, and remove memset
11195         call.
11196         (base_breakpoint_allocate_location): Use the new non-default ctor.
11197         * breakpoint.h (bp_location): Now a class.  Declare default and
11198         non-default ctors.  In-class initialize all members.
11199         (init_bp_location): Remove declaration.
11200
11201 2017-04-25  Pedro Alves  <palves@redhat.com>
11202
11203         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11204         assignment operator.
11205
11206 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11207
11208         * doublest.c (convert_doublest_to_floatformat): Call
11209         floatformat_totalsize_bytes.
11210
11211 2017-04-22  Tom Tromey  <tom@tromey.com>
11212
11213         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11214         ui_out_emit_list.
11215         * stack.c (print_frame): Use ui_out_emit_list.
11216         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11217         ui_out_emit_list.
11218         * mi/mi-main.c (print_one_inferior)
11219         (mi_cmd_data_list_register_names)
11220         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11221         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11222         ui_out_emit_list.
11223         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11224         (mi_output_solib_attribs): Use ui_out_emit_list,
11225         ui_out_emit_tuple.
11226         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11227         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11228         (mi_cmd_stack_list_args, list_args_or_locals): Use
11229         ui_out_emit_list.
11230         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11231         * breakpoint.c (print_solib_event, output_thread_groups): Use
11232         ui_out_emit_list.
11233
11234 2017-04-22  Tom Tromey  <tom@tromey.com>
11235
11236         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11237         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11238         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11239
11240 2017-04-22  Tom Tromey  <tom@tromey.com>
11241
11242         * tracepoint.c (tvariables_info_1)
11243         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11244
11245 2017-04-22  Tom Tromey  <tom@tromey.com>
11246
11247         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11248         annotate_arg_emitter.
11249         * breakpoint.c (print_mention_watchpoint)
11250         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11251         * annotate.h (struct annotate_arg_emitter): New.
11252
11253 2017-04-22  Tom Tromey  <tom@tromey.com>
11254
11255         * record-btrace.c (record_btrace_insn_history)
11256         (record_btrace_insn_history_range, record_btrace_call_history)
11257         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11258         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11259         ui_out_emit_tuple.
11260         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11261         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11262         * skip.c (skip_info): Use ui_out_emit_tuple.
11263         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11264         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11265         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11266         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11267         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11268         ui_out_emit_tuple.
11269         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11270         (output_register, mi_cmd_data_read_memory)
11271         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11272         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11273         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11274         Use ui_out_emit_tuple.
11275         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11276         ui_out_emit_tuple.
11277         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11278         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11279         * linux-thread-db.c (info_auto_load_libthread_db): Use
11280         ui_out_emit_tuple.
11281         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11282         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11283         * disasm.c (do_mixed_source_and_assembly_deprecated)
11284         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11285         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11286         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11287         * breakpoint.c (print_one_breakpoint_location)
11288         (print_one_breakpoint): Use ui_out_emit_tuple.
11289         * auto-load.c (print_script, info_auto_load_cmd): Use
11290         ui_out_emit_tuple.
11291         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11292
11293 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11294
11295         * thread.c (print_thread_info_1): Remove dead code.
11296
11297 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11298
11299         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11300         GDB_SELF_TEST.
11301         * arm-tdep.c (selftests::arm_record_test): Likewise.
11302
11303 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11304
11305         * regcache.c (regcache_restore): Remove argument 2.  Replace
11306         argument 3 with regcache.  Get register status from
11307         src->register_status and get register contents from
11308         register_buffer (src, regnum).
11309         (regcache_cpy): Update.
11310
11311 2017-04-19  Pedro Alves  <palves@redhat.com>
11312
11313         * gdbthread.h (thread): Add missing closing parenthesis in
11314         comment.
11315
11316 2017-04-19  Pedro Alves  <palves@redhat.com>
11317
11318         * common/refcounted-object.h: New file.
11319         * gdbthread.h: Include "common/refcounted-object.h".
11320         (thread_info): Inherit from refcounted_object and add comments.
11321         (thread_info::incref, thread_info::decref)
11322         (thread_info::m_refcount): Delete.
11323         (thread_info::deletable): Use the refcounted_object::refcount()
11324         method.
11325         * inferior.c (current_inferior_): Add comment.
11326         (set_current_inferior): Increment/decrement refcounts.
11327         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11328         not-deletable instead of comparing with the current inferior.
11329         (initialize_inferiors): Increment the initial inferior's refcount.
11330         * inferior.h (struct inferior): Forward declare.
11331         Include "common/refcounted-object.h".
11332         (current_inferior, set_current_inferior): Move declaration to
11333         before struct inferior's definition, and fix comment.
11334         (inferior): Inherit from refcounted_object.  Add comments.
11335         * thread.c (switch_to_thread_no_regs): Reference the thread's
11336         inferior pointer directly instead of doing a ptid lookup.
11337         (switch_to_no_thread): New function.
11338         (switch_to_thread(thread_info *)): New function, factored out
11339         from ...
11340         (switch_to_thread(ptid_t)): ... this.
11341         (restore_current_thread): Delete.
11342         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11343         fields, and add 'inf' field.
11344         (do_restore_current_thread_cleanup): Check whether old->inf is
11345         alive instead of looking up an inferior by ptid.  Use
11346         switch_to_thread and switch_to_no_thread.
11347         (restore_current_thread_cleanup_dtor): Use old->inf directly
11348         instead of lookup up an inferior by id.  Decref the inferior.
11349         Don't restore 'removable'.
11350         (make_cleanup_restore_current_thread): Same the inferior pointer
11351         in old, instead of the inferior number.  Incref the inferior.
11352         Don't save/clear 'removable'.
11353
11354 2017-04-19  Pedro Alves  <palves@redhat.com>
11355
11356         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11357         unittests/scoped_restore-selftests.c.
11358         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11359         * common/scoped_restore.h (scoped_restore_base): Make "class".
11360         (scoped_restore_base::release): New public method.
11361         (scoped_restore_base::scoped_restore_base): New protected ctor.
11362         (scoped_restore_base::m_saved_var): New protected field.
11363         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11364         scoped_restore_base base class instead of m_saved_var directly.
11365         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11366         (scoped_restore_tmpl::scoped_restore_tmpl(const
11367         scoped_restore_tmpl<T>&)): Likewise.
11368         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11369         method.
11370         (scoped_restore_tmpl::saved_var): New method.
11371         (scoped_restore_tmpl::m_saved_var): Delete.
11372         * inferior.h (inferior::detaching): Now a bool.
11373         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11374         cleanup.
11375         * unittests/scoped_restore-selftests.c: New file.
11376
11377 2017-04-19  Pedro Alves  <palves@redhat.com>
11378
11379         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11380         Re-sort in alphabetic order.
11381
11382 2017-04-18  Pedro Alves  <palves@redhat.com>
11383
11384         * xml-support.c (obstack_xml_printf): Delete.
11385         * xml-support.h (obstack_xml_printf): Delete.
11386
11387 2017-04-18  Pedro Alves  <palves@redhat.com>
11388
11389         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11390         vdebug, verror, body_text, start_element, end_element, name,
11391         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11392         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11393         is_xinclude>: Make private and add m_ prefix.
11394         (gdb_xml_parser::body_text): New method, based on ...
11395         (gdb_xml_body_text): ... this.  Adjust.
11396         (gdb_xml_parser::vdebug): New method, based on ...
11397         (gdb_xml_debug): ... this.  Adjust.
11398         (gdb_xml_parser::verror): New method, based on ...
11399         (gdb_xml_error): ... this.  Adjust.
11400         (gdb_xml_parser::start_element): New method, based on ...
11401         (gdb_xml_start_element): ... this.  Adjust.
11402         (gdb_xml_start_element_wrapper): Defer to
11403         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11404         (gdb_xml_parser::end_element): New method, based on ...
11405         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11406         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11407         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11408         (gdb_xml_parser::use_dtd): New method, based on ...
11409         (gdb_xml_use_dtd): ... this.  Adjust.
11410         (gdb_xml_parser::parse): New method, based on ...
11411         (gdb_xml_parse): ... this.  Adjust.
11412         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11413         (xinclude_start_include): Adjust to call the parser's name method.
11414         (xml_xinclude_default, xml_xinclude_start_doctype)
11415         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11416         method.
11417         (xml_process_xincludes): Adjust to call parser methods.
11418         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11419         declarations.
11420
11421 2017-04-18  Pedro Alves  <palves@redhat.com>
11422
11423         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11424         gdb::optional<std::string>.
11425         * xml-support.c: Include <string>.
11426         (scope_level::scope_level(scope_level &&))
11427         (scope_level::~scope_level): Delete.
11428         (scope_level::body): Now a std::string.
11429         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11430         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11431         parameter.
11432         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11433         (xinclude_parsing_data::output): Now a std::string reference.
11434         (xinclude_start_include): Adjust.
11435         (xml_xinclude_default): Adjust.
11436         (xml_process_xincludes): Add 'output' parameter, and return bool.
11437         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11438         and return bool.
11439         * xml-tdesc.c: Include <unordered_map> and <string>.
11440         (tdesc_xml_cache): Delete.
11441         (tdesc_xml_cache_s): Delete.
11442         (xml_cache): Now an std::unordered_map.
11443         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11444         (target_fetch_description_xml): Change return type to
11445         gdb::optional<std::string>, and adjust.
11446         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11447         (target_fetch_description_xml): Change return type to
11448         gdb::optional<std::string>.
11449
11450 2017-04-18  Pedro Alves  <palves@redhat.com>
11451
11452         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11453         unittests/optional-selftests.c.
11454         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11455         * unittests/optional-selftests.c: New file.
11456         * unittests/optional/assignment/1.cc: New file.
11457         * unittests/optional/assignment/2.cc: New file.
11458         * unittests/optional/assignment/3.cc: New file.
11459         * unittests/optional/assignment/4.cc: New file.
11460         * unittests/optional/assignment/5.cc: New file.
11461         * unittests/optional/assignment/6.cc: New file.
11462         * unittests/optional/assignment/7.cc: New file.
11463         * unittests/optional/cons/copy.cc: New file.
11464         * unittests/optional/cons/default.cc: New file.
11465         * unittests/optional/cons/move.cc: New file.
11466         * unittests/optional/cons/value.cc: New file.
11467         * unittests/optional/in_place.cc: New file.
11468         * unittests/optional/observers/1.cc: New file.
11469         * unittests/optional/observers/2.cc: New file.
11470
11471 2017-04-18  Pedro Alves  <palves@redhat.com>
11472
11473         * common/gdb_optional.h: Include common/traits.h.
11474         (in_place_t): New type.
11475         (in_place): New constexpr variable.
11476         (optional::optional): Remove member initialization of
11477         m_instantiated.
11478         (optional::optional(in_place_t...)): New constructor.
11479         (optional::~optional): Use reset.
11480         (optional::optional(const optional&)): New.
11481         (optional::optional(const optional&&)): New.
11482         (optional::optional(T &)): New.
11483         (optional::optional(T &&)): New.
11484         (operator::operator=(const optional &)): New.
11485         (operator::operator=(optional &&)): New.
11486         (operator::operator= (const T &))
11487         (operator::operator= (T &&))
11488         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11489         (operator::reset): New.
11490         (operator::m_instantiated):: Add in-class initializer.
11491         * common/traits.h: Include <type_traits>.
11492         (struct And): New types.
11493
11494 2017-04-18  Pedro Alves  <palves@redhat.com>
11495
11496         * xml-support.c: Include <vector>.
11497         (scope_level::scope_level(const gdb_xml_element *))
11498         (scope_level::scope_level(scope_level&&)): New.
11499         (scope_level::~scope_level): New.
11500         (scope_level_s): Delete.
11501         (gdb_xml_parser::scopes): Now a std::vector.
11502         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11503         Use std::vector.
11504         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11505         scope cleanup code.
11506         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11507         of the scopes member.  Use std::vector::emplace_back.
11508
11509 2017-04-18  Pedro Alves  <palves@redhat.com>
11510
11511         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11512         a bool.
11513         (gdb_xml_end_element): Change type of first parameter.
11514         (gdb_xml_cleanup): Rename to ...
11515         (gdb_xml_parser::~gdb_xml_parser): ... this.
11516         (gdb_xml_create_parser_and_cleanup): Delete with ...
11517         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11518         to this new ctor.
11519         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11520         using gdb_xml_create_parser_and_cleanup.
11521         (xinclude_parsing_data): Add ctor/dtor.
11522         (xml_xinclude_cleanup): Delete.
11523         (xml_process_xincludes): Create a local xinclude_parsing_data
11524         instead of heap-allocating one.  Create a local gdb_xml_parser
11525         instead of heap-allocating one with
11526         gdb_xml_create_parser_and_cleanup.
11527
11528 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11529
11530         PR threads/20743
11531         * fbsd-nat.c (resume_one_thread_cb): Remove.
11532         (resume_all_threads_cb): Remove.
11533         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11534         iterate_over_threads.
11535
11536 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11537
11538         * NEWS: Create a new section for the next release branch.
11539         Rename the section of the current branch, now that it has
11540         been cut.
11541
11542 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11543
11544         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11545         * version.in: Bump version to 8.0.50.DATE-git.
11546
11547 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11548
11549         PR gdb/21385
11550         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11551         independently of the host, and fix build breakage on Cygwin.
11552
11553 2017-04-13  Pedro Alves  <palves@redhat.com>
11554
11555         * inferior.c (free_inferior): Convert to ...
11556         (inferior::~inferior): ... this dtor.
11557         (inferior::inferior): New ctor, factored out from ...
11558         (add_inferior_silent): ... here.  Allocate the inferior with a new
11559         expression.
11560         (delete_inferior): Call delete instead of free_inferior.
11561         * inferior.h (gdb_environ, continuation): Forward declare.
11562         (inferior): Now a class.  Add in-class initialization to all
11563         members.  Make boolean fields bool, except 'detaching'.
11564         (inferior::inferior): New explicit ctor.
11565         (inferior::~inferior): New.
11566
11567 2017-04-13  Pedro Alves  <palves@redhat.com>
11568
11569         * inferior.c (init_inferior_list): Delete.
11570         * inferior.h (init_inferior_list): Delete.
11571
11572 2017-04-13  Pedro Alves  <palves@redhat.com>
11573
11574         PR threads/13217
11575         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11576         (top level): Call it twice, with different thread sets.
11577
11578 2017-04-13  Pedro Alves  <palves@redhat.com>
11579
11580         * thread.c: Include <algorithm>.
11581         (thread_array_cleanup): Delete.
11582         (scoped_inc_dec_ref): New class.
11583         (live_threads_count): New function.
11584         (set_thread_refcount): Delete.
11585         (tp_array_compar_ascending): Now a bool.
11586         (tp_array_compar): Convert to a std::sort comparison function.
11587         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11588         and live_threads_count.
11589
11590 2017-04-13  Pedro Alves  <palves@redhat.com>
11591
11592         * infrun.c (follow_fork_inferior): Also switch the current
11593         inferior.
11594
11595 2017-04-13  Pedro Alves  <palves@redhat.com>
11596
11597         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11598         before calling create_internal_breakpoint.
11599
11600 2017-04-13  Pedro Alves  <palves@redhat.com>
11601
11602         * fork-child.c (execv_argv): New class.
11603         (breakup_args): Refactored as ...
11604         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11605         Copy arguments to storage and replace separators with NULL
11606         terminators in place.
11607         (escape_bang_in_quoted_argument): Adjust to return bool.
11608         (execv_argv::execv_argv): New ctor.
11609         (execv_argv::init_for_shell): New method, factored out from
11610         fork_inferior.  Don't strdup strings into the vector.
11611         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11612         Remove free_vector_argv call.
11613
11614 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11615
11616         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11617         tdep->rx_psw_type.
11618
11619 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11620
11621         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11622         * rx-tdep.c (rx_gdbarch_init): Likewise.
11623
11624 2017-04-13  Pedro Alves  <palves@redhat.com>
11625
11626         * breakpoint.h (struct breakpoint): Reindent.
11627
11628 2017-04-13  Pedro Alves  <palves@redhat.com>
11629
11630         * breakpoint.c (bp_location): Rename to ...
11631         (bp_locations): ... this.  All references updated.
11632         (bp_location_count): Rename to ...
11633         (bp_locations_count): ... this.  All references updated.
11634         (bp_location_placed_address_before_address_max): Rename to ...
11635         (bp_locations_placed_address_before_address_max): ... this.  All
11636         references updated.
11637         (bp_location_shadow_len_after_address_max): Rename to ...
11638         (bp_locations_shadow_len_after_address_max): ... this.  All
11639         references updated.
11640         (bp_location_compare_addrs): Rename to ...
11641         (bp_locations_compare_addrs): ... this.  All references updated.
11642         (bp_location_compare):Rename to ...
11643         (bp_locations_compare): ... this.  All references updated.
11644         (bp_location_target_extensions_update): Rename to ...
11645         (bp_locations_target_extensions_update): ... this.  All references
11646         updated.
11647
11648 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11649
11650         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11651         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11652         'sgtty.h'.
11653         * common/gdb_termios.h: New file, with parts of "terminal.h".
11654         * inflow.c: Include "gdb_termios.h".
11655         * ser-unix.c: Include "gdb_termios.h".
11656         * terminal.h: Move terminal-related defines to
11657         "common/gdb_termios.h".
11658
11659 2017-04-12  Tom Tromey  <tom@tromey.com>
11660
11661         * probe.c (parse_probes): Update.
11662         * location.h (delete_event_location): Don't declare.
11663         (event_location_deleter::operator()): Update.
11664         * location.c (event_location_deleter::operator()): Rename from
11665         delete_event_location.
11666         * linespec.h (linespec_result) <location>: Change type to
11667         event_location_up.
11668         * linespec.c (canonicalize_linespec, event_location_to_sals)
11669         (decode_objc): Update.
11670         (linespec_result): Don't call delete_event_location.
11671         * breakpoint.c (create_breakpoints_sal)
11672         (bkpt_probe_create_sals_from_location)
11673         (strace_marker_create_sals_from_location): Update.
11674
11675 2017-04-12  Tom Tromey  <tom@tromey.com>
11676
11677         * linespec.h (struct linespec_result): Add constructor and
11678         destructor.
11679         (init_linespec_result, destroy_linespec_result)
11680         (make_cleanup_destroy_linespec_result): Don't declare.
11681         * linespec.c (init_linespec_result): Remove.
11682         (linespec_result::~linespec_result): Rename from
11683         destroy_linespec_result.  Update.
11684         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11685         Remove.
11686         * breakpoint.c (create_breakpoint, break_range_command)
11687         (decode_location_default): Update.
11688         * ax-gdb.c (agent_command_1): Update.
11689
11690 2017-04-12  Tom Tromey  <tom@tromey.com>
11691
11692         * remote.c (remote_download_tracepoint): Update.
11693         * python/py-breakpoint.c (bppy_get_location): Update.
11694         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11695         (gdbscm_breakpoint_location): Update.
11696         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11697         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11698         Change type to event_location_up.
11699         * breakpoint.c (create_overlay_event_breakpoint)
11700         (create_longjmp_master_breakpoint)
11701         (create_std_terminate_master_breakpoint)
11702         (create_exception_master_breakpoint)
11703         (breakpoint_event_location_empty_p, print_breakpoint_location)
11704         (print_one_breakpoint_location, create_thread_event_breakpoint)
11705         (init_breakpoint_sal, create_breakpoint)
11706         (print_recreate_ranged_breakpoint, break_range_command)
11707         (init_ada_exception_breakpoint, say_where): Update.
11708         (base_breakpoint_dtor): Don't call delete_event_location.
11709         (bkpt_print_recreate, tracepoint_print_recreate)
11710         (dprintf_print_recreate, update_static_tracepoint)
11711         (breakpoint_re_set_default): Update.
11712
11713 2017-04-12  Tom Tromey  <tom@tromey.com>
11714
11715         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11716         type of "to_do".  Update.
11717         (compute_stack_depth): Use std::vector.
11718
11719 2017-04-12  Tom Tromey  <tom@tromey.com>
11720
11721         * printcmd.c (find_instruction_backward): Use std::vector.
11722
11723 2017-04-12  Tom Tromey  <tom@tromey.com>
11724
11725         * symfile.c (objfilep): Remove typedef.
11726         (reread_symbols): Use a std::vector.
11727
11728 2017-04-12  Tom Tromey  <tom@tromey.com>
11729
11730         * mi/mi-main.c (exec_direction_forward): Remove.
11731         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11732         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11733         scoped_restore.
11734         * guile/guile.c (guile_repl_command, guile_command)
11735         (gdbscm_execute_gdb_command): Use scoped_restore.
11736         * go-exp.y (go_parse): Use scoped_restore.
11737         * d-exp.y (d_parse): Use scoped_restore.
11738         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11739         * c-exp.y (c_parse): Use scoped_restore.
11740
11741 2017-04-12  Tom Tromey  <tom@tromey.com>
11742
11743         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11744         (mi_parse): Update return type.
11745         (mi_parse_free): Remove.
11746         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11747         (mi_parse::~mi_parse): Rename from mi_parse_free.
11748         (mi_parse_cleanup): Remove.
11749         (mi_parse): Return a unique_ptr.  Use new.
11750         * mi/mi-main.c (mi_execute_command): Update.
11751
11752 2017-04-12  Tom Tromey  <tom@tromey.com>
11753
11754         * location.c (explicit_location_lex_one): Return a
11755         unique_xmalloc_ptr.
11756         (string_to_explicit_location): Update.  Remove cleanups.
11757
11758 2017-04-12  Tom Tromey  <tom@tromey.com>
11759
11760         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11761         (compare_value_and_voffset): Change type.  Update.
11762         (compute_vtable_size): Change type of "offset_vec".
11763         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11764         (gnuv3_get_typeid): Remove extraneous declaration.
11765
11766 2017-04-12  Tom Tromey  <tom@tromey.com>
11767
11768         * charset.h (wchar_iterator): Fix comment.
11769
11770 2017-04-12  Tom Tromey  <tom@tromey.com>
11771
11772         * charset.c (iconv_wrapper): New class.
11773         (cleanup_iconv): Remove.
11774         (convert_between_encodings): Use it.
11775
11776 2017-04-12  Tom Tromey  <tom@tromey.com>
11777
11778         * symfile.h (increment_reading_symtab): Update type.
11779         * symfile.c (decrement_reading_symtab): Remove.
11780         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11781         * psymtab.c (psymtab_to_symtab): Update.
11782         * dwarf2read.c (dw2_instantiate_symtab): Update.
11783
11784 2017-04-12  Tom Tromey  <tom@tromey.com>
11785
11786         * jit.c (struct jit_reader): Declare separately.  Add constructor
11787         and destructor.  Change type of "handle".
11788         (loaded_jit_reader): Define separately.
11789         (jit_reader_load): Update.  New "new".
11790         (jit_reader_unload_command): Use "delete".
11791         * gdb-dlfcn.h (struct dlclose_deleter): New.
11792         (gdb_dlhandle_up): New typedef.
11793         (gdb_dlopen, gdb_dlsym): Update types.
11794         (gdb_dlclose): Remove.
11795         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11796         (gdb_dlsym): Change type of "handle".
11797         (make_cleanup_dlclose): Remove.
11798         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11799         * compile/compile-c-support.c (load_libcc): Update.
11800
11801 2017-04-12  Tom Tromey  <tom@tromey.com>
11802
11803         * symtab.h (find_pcs_for_symtab_line): Change return type.
11804         * symtab.c (find_pcs_for_symtab_line): Change return type.
11805         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11806         type of "vec".  Update.
11807         (ltpy_get_pcs_for_line): Update.
11808         * linespec.c (decode_digits_ordinary): Update.
11809
11810 2017-04-12  Tom Tromey  <tom@tromey.com>
11811
11812         * tracepoint.c (actions_command): Update.
11813         * python/python.c (python_command, python_interactive_command):
11814         Update.
11815         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11816         * guile/guile.c (guile_command): Update.
11817         * defs.h (read_command_lines, read_command_lines_1): Return
11818         command_line_up.
11819         (command_lines_deleter): New struct.
11820         (command_line_up): New typedef.
11821         * compile/compile.c (compile_code_command)
11822         (compile_print_command): Update.
11823         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11824         command_line_up.
11825         (make_cleanup_free_command_lines): Remove.
11826         * cli/cli-script.c (get_command_line, read_command_lines_1)
11827         (copy_command_lines): Return command_line_up.
11828         (while_command, if_command, read_command_lines, define_command)
11829         (document_command): Update.
11830         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11831         Remove.
11832         * breakpoint.h (breakpoint_set_commands): Change type of
11833         "commands".
11834         * breakpoint.c (breakpoint_set_commands): Change type of
11835         "commands".  Update.
11836         (do_map_commands_command, update_dprintf_command_list)
11837         (create_tracepoint_from_upload): Update.
11838
11839 2017-04-12  Tom Tromey  <tom@tromey.com>
11840
11841         * tracepoint.c (scope_info): Update.
11842         * spu-tdep.c (spu_catch_start): Update.
11843         * python/python.c (gdbpy_decode_line): Update.
11844         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11845         * python/py-breakpoint.c (bppy_init): Update.
11846         * probe.c (parse_probes): Update.
11847         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11848         * location.h (event_location_deleter): New struct.
11849         (event_location_up): New typedef.
11850         (new_linespec_location, new_address_location, new_probe_location)
11851         (new_explicit_location, copy_event_location)
11852         (string_to_event_location, string_to_event_location_basic)
11853         (string_to_explicit_location): Update return type.
11854         (make_cleanup_delete_event_location): Remove.
11855         * location.c (new_linespec_location, new_address_location)
11856         (new_probe_location, new_explicit_location, copy_event_location):
11857         Return event_location_up.
11858         (delete_event_location_cleanup)
11859         (make_cleanup_delete_event_location): Remove.
11860         (string_to_explicit_location, string_to_event_location_basic)
11861         (string_to_event_location): Return event_location_up.
11862         * linespec.c (canonicalize_linespec, event_location_to_sals)
11863         (decode_line_with_current_source)
11864         (decode_line_with_last_displayed, decode_objc): Update.
11865         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11866         * completer.c (location_completer): Update.
11867         * cli/cli-cmds.c (edit_command, list_command): Update.
11868         * breakpoint.c (create_overlay_event_breakpoint)
11869         (create_longjmp_master_breakpoint)
11870         (create_std_terminate_master_breakpoint)
11871         (create_exception_master_breakpoint)
11872         (create_thread_event_breakpoint): Update.
11873         (init_breakpoint_sal): Update.  Remove some dead code.
11874         (create_breakpoint_sal): Change type of "location".  Update.
11875         (create_breakpoints_sal, create_breakpoint, break_command_1)
11876         (dprintf_command, break_range_command, until_break_command)
11877         (init_ada_exception_breakpoint)
11878         (strace_marker_create_sals_from_location)
11879         (update_static_tracepoint, trace_command, ftrace_command)
11880         (strace_command, create_tracepoint_from_upload): Update.
11881         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11882         * ax-gdb.c (agent_command_1): Update.
11883
11884 2017-04-12  Pedro Alves  <palves@redhat.com>
11885
11886         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11887         * configure.tgt: Handle i[34567]86-*-go32* and
11888         i[34567]86-*-msdosdjgpp*.
11889         * i386-tdep.c (i386_svr4_reg_to_regnum):
11890         Make extern.
11891         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11892         i386-go32-tdep.c.
11893         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11894         * i386-go32-tdep.c: New file.
11895         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11896         declarations.
11897
11898 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11899
11900         * aix-thread.c (pd_status2str): Change return type to const char *.
11901
11902 2017-04-12  Pedro Alves  <palves@redhat.com>
11903
11904         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11905         calls to set_gdbarch_gnu_triplet_regexp.
11906
11907 2017-04-12  Pedro Alves  <palves@redhat.com>
11908
11909         PR gdb/21323
11910         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11911         New enum value.
11912         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11913         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11914         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11915         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11916         * gdbarch.h, gdbarch.c: Regenerate.
11917         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11918         gdbarch_wchar_bit and gdbarch_wchar_signed.
11919         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11920         * arm-tdep.c (arm_gdbarch_init): Likewise.
11921         * avr-tdep.c (avr_gdbarch_init): Likewise.
11922         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11923         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11924         * i386-tdep.c (i386_go32_init_abi): Likewise.
11925         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11926         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11927         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11928         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11929         * sh-tdep.c (sh_gdbarch_init): Likewise.
11930         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11931         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11932         * windows-tdep.c (windows_init_abi): Likewise.
11933         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11934
11935 2017-04-12  Pedro Alves  <palves@redhat.com>
11936
11937         PR c++/21323
11938         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11939         cplus_primitive_type_char32_t>: New enum values.
11940         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11941         and cplus_primitive_type_char32_t.
11942         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11943         32, use the archtecture's built-in type for char16_t and char32_t,
11944         respectively.  Otherwise, fallback to init_integer_type as before,
11945         but make the type unsigned, and issue a complaint.
11946         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11947
11948 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11949
11950         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11951         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11952
11953 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11954
11955         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11956         'const char *'.
11957
11958 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11959
11960         * common/common-utils.c (free_vector_argv): New function.
11961         * common/common-utils.h: Include <vector>.
11962         (free_vector_argv): New prototype.
11963         * darwin-nat.c (darwin_create_inferior): Rewrite function
11964         prototype in order to constify "exec_file" and accept a
11965         "std::string" for "allargs".
11966         * fork-child.c: Include <vector>.
11967         (breakup_args): Rewrite function, using C++.
11968         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11969         and accept "std::string" for "allargs".  Update the code to
11970         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11971         and "execvp".
11972         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11973         order to constify "exec_file" and accept a "std::string" for
11974         "allargs".
11975         * go32-nat.c (go32_create_inferior): Likewise.
11976         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11977         * infcmd.c (run_command_1): Constify "exec_file".  Use
11978         "std::string" for inferior arguments.
11979         * inferior.h (fork_inferior): Update prototype.
11980         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11981         prototype in order to constify "exec_file" and accept a
11982         "std::string" for "allargs".
11983         * nto-procfs.c (procfs_create_inferior): Likewise.
11984         * procfs.c (procfs_create_inferior): Likewise.
11985         * remote-sim.c (gdbsim_create_inferior): Likewise.
11986         * remote.c (extended_remote_run): Update code to accept
11987         "std::string" as argument.
11988         (extended_remote_create_inferior): Rewrite function prototype in
11989         order to constify "exec_file" and accept a "std::string" for
11990         "allargs".
11991         * rs6000-nat.c (super_create_inferior): Likewise.
11992         (rs6000_create_inferior): Likewise.
11993         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11994         * windows-nat.c (windows_create_inferior): Likewise.
11995
11996 2017-04-11  Pedro Alves  <palves@redhat.com>
11997
11998         * thread.c: Fix whitespace throughout.
11999
12000 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12001
12002         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12003
12004 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12005
12006         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12007
12008 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12009
12010         PR gdb/21364
12011         * osdata.c (info_osdata): Check if 'type' is an empty string
12012         instead of NULL.
12013
12014 2017-04-10  Pedro Alves  <palves@redhat.com>
12015
12016         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12017         (ptid_to_global_thread_id, in_thread_list)
12018         (do_captured_list_thread_ids, set_resumed, set_running)
12019         (set_executing, set_stop_requested, finish_thread_state)
12020         (validate_registers_access, can_access_registers_ptid)
12021         (print_thread_info_1, switch_to_thread)
12022         (do_restore_current_thread_cleanup)
12023         (make_cleanup_restore_current_thread, thread_command)
12024         (thread_name_command): Use operator== instead of ptid_equal.
12025
12026 2017-04-10  Pedro Alves  <palves@redhat.com>
12027
12028         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12029         (current_thread_cleanup_chain): Delete.
12030         (restore_current_thread_cleanup_dtor)
12031         (make_cleanup_restore_current_thread): Remove references to
12032         current_thread_cleanup_chain.
12033
12034 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12035
12036         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12037         REG_UNKNOWN.
12038
12039 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12040
12041         PR gdb/19942
12042         * gdbthread.h (thread_info::deletable): New method.
12043         (thread_info::incref): New method.
12044         (thread_info::decref): New method.
12045         (thread_info::refcount): Move it to private.
12046         * infrun.c (save_stop_context): Call inc_refcount.
12047         (release_stop_context_cleanup): Likewise.
12048         * thread.c (set_thread_exited): New function.
12049         (init_thread_list): Delete "tp" only it is deletable, otherwise
12050         call set_thread_exited.
12051         (delete_thread_1): Call set_thread_exited.
12052         (current_thread_cleanup) <inferior_pid>: Remove.
12053         <thread>: New field.
12054         (restore_current_thread_ptid_changed): Removed.
12055         (do_restore_current_thread_cleanup): Adjust.
12056         (restore_current_thread_cleanup_dtor): Don't call
12057         find_thread_ptid.
12058         (set_thread_refcount): Use dec_refcount.
12059         (make_cleanup_restore_current_thread): Adjust.
12060         (thread_apply_all_command): Call inc_refcount.
12061         (_initialize_thread): Don't call
12062         observer_attach_thread_ptid_changed.
12063
12064 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12065
12066         * thread.c (delete_thread_1): Hoist code on marking thread as
12067         exited.
12068
12069 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12070
12071         * windows-nat.c (windows_detach): Initialize ptid with
12072         minus_one_ptid.
12073
12074 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12075
12076         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12077
12078 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12079
12080         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12081         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12082         (bfin_pseudo_register_write): Likewise
12083
12084 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12085
12086         * common/ptid.h (struct ptid): Change to...
12087         (class ptid_t): ... this.
12088         <ptid_t>: New constructors.
12089         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12090         matches>: New methods.
12091         <make_null, make_minus_one>: New static methods.
12092         <pid>: Rename to...
12093         <m_pid>: ...this.
12094         <lwp>: Rename to...
12095         <m_lwp>: ...this.
12096         <tid>: Rename to...
12097         <m_tid>: ...this.
12098         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12099         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12100         as references, move comment to class ptid_t.
12101         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12102         ptid_t static methods.
12103         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12104         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12105         Take ptid arguments as references, implement using ptid_t methods.
12106         * unittests/ptid-selftests.c: New file.
12107         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12108         unittests/ptid-selftests.c.
12109         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12110
12111 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12112
12113         * python/python.c (python_run_simple_file): Cast mode literal to
12114         non-const char pointer as expected by PyFile_FromString.
12115
12116 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12117
12118         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12119         minus_one_ptid and null_ptid.
12120
12121 2017-04-05  Pedro Alves  <palves@redhat.com>
12122
12123         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12124         * configure: Regenerate.
12125
12126 2017-04-05  Pedro Alves  <palves@redhat.com>
12127
12128         * ada-exp.y (yyerror): Constify.
12129         * ada-lang.c (bound_name, get_selections)
12130         (ada_variant_discrim_type)
12131         (ada_variant_discrim_name, ada_value_struct_elt)
12132         (ada_lookup_struct_elt_type, is_unchecked_variant)
12133         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12134         (catch_ada_exception_command_split)
12135         (catch_ada_assert_command_split, catch_assert_command)
12136         (ada_op_name): Constify.
12137         * ada-lang.h (ada_yyerror, get_selections)
12138         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12139         * arc-tdep.c (arc_print_frame_cache): Constify.
12140         * arm-tdep.c (arm_skip_stub): Constify.
12141         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12142         (gen_aggregate_elt_ref): Constify.
12143         * bcache.c (print_bcache_statistics): Constify.
12144         * bcache.h (print_bcache_statistics): Constify.
12145         * break-catch-throw.c (catch_exception_command_1):
12146         * breakpoint.c (struct ep_type_description::description):
12147         Constify.
12148         (add_solib_catchpoint): Constify.
12149         (catch_fork_command_1): Add cast.
12150         (add_catch_command): Constify.
12151         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12152         Constify.
12153         * bsd-uthread.c (bsd_uthread_state): Constify.
12154         * buildsym.c (patch_subfile_names): Constify.
12155         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12156         Constify.
12157         * c-exp.y (yyerror): Constify.
12158         (token::oper): Constify.
12159         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12160         * c-varobj.c (cplus_describe_child): Constify.
12161         * charset.c (find_charset_names): Add cast.
12162         (find_charset_names): Constify array and add const_cast.
12163         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12164         (edit_command): Constify.
12165         * cli/cli-decode.c (lookup_cmd): Constify.
12166         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12167         Constify.
12168         (struct dump_context): Constify.
12169         (add_dump_command, restore_command): Constify.
12170         * cli/cli-script.c (get_command_line): Constify.
12171         * cli/cli-script.h (get_command_line): Constify.
12172         * cli/cli-utils.c (check_for_argument): Constify.
12173         * cli/cli-utils.h (check_for_argument): Constify.
12174         * coff-pe-read.c (struct read_pe_section_data): Constify.
12175         * command.h (lookup_cmd): Constify.
12176         * common/print-utils.c (decimal2str): Constify.
12177         * completer.c (gdb_print_filename): Constify.
12178         * corefile.c (set_gnutarget): Constify.
12179         * cp-name-parser.y (yyerror): Constify.
12180         * cp-valprint.c (cp_print_class_member): Constify.
12181         * cris-tdep.c (cris_register_name, crisv32_register_name):
12182         Constify.
12183         * d-exp.y (yyerror): Constify.
12184         (struct token::oper): Constify.
12185         * d-lang.h (d_yyerror): Constify.
12186         * dbxread.c (struct header_file_location::name): Constify.
12187         (add_old_header_file, add_new_header_file, last_function_name)
12188         (dbx_next_symbol_text, add_bincl_to_list)
12189         (find_corresponding_bincl_psymtab, set_namestring)
12190         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12191         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12192         * defs.h (command_line_input, print_address_symbolic)
12193         (deprecated_readline_begin_hook): Constify.
12194         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12195         Constify.
12196         * event-top.c (handle_line_of_input): Constify and add cast.
12197         * exceptions.c (catch_errors): Constify.
12198         * exceptions.h (catch_errors): Constify.
12199         * expprint.c (print_subexp_standard, op_string, op_name)
12200         (op_name_standard, dump_raw_expression, dump_raw_expression):
12201         * expression.h (op_name, op_string, dump_raw_expression):
12202         Constify.
12203         * f-exp.y (yyerror): Constify.
12204         (struct token::oper): Constify.
12205         (struct f77_boolean_val::name): Constify.
12206         * f-lang.c (f_word_break_characters): Constify.
12207         * f-lang.h (f_yyerror): Constify.
12208         * fork-child.c (fork_inferior): Add cast.
12209         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12210         (new_variant): Constify.
12211         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12212         * gdbarch.c: Regenerate.
12213         * gdbcore.h (set_gnutarget): Constify.
12214         * go-exp.y (yyerror): Constify.
12215         (token::oper): Constify.
12216         * go-lang.h (go_yyerror): Constify.
12217         * go32-nat.c (go32_sysinfo): Constify.
12218         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12219         * guile/scm-cmd.c (cmdscm_function): Constify.
12220         * guile/scm-param.c (pascm_param_value): Constify.
12221         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12222         (h8300sx_register_name): Constify.
12223         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12224         Constify.
12225         * ia64-tdep.c (ia64_register_names): Constify.
12226         * infcmd.c (construct_inferior_arguments): Constify.
12227         (path_command, attach_post_wait): Constify.
12228         * language.c (show_range_command, show_case_command)
12229         (unk_lang_error): Constify.
12230         * language.h (language_defn::la_error)
12231         (language_defn::la_name_of_this): Constify.
12232         * linespec.c (decode_line_2): Constify.
12233         * linux-thread-db.c (thread_db_err_str): Constify.
12234         * lm32-tdep.c (lm32_register_name): Constify.
12235         * m2-exp.y (yyerror): Constify.
12236         * m2-lang.h (m2_yyerror): Constify.
12237         * m32r-tdep.c (m32r_register_names): Constify and make static.
12238         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12239         * m88k-tdep.c (m88k_register_name): Constify.
12240         * macroexp.c (appendmem): Constify.
12241         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12242         (upgrade_type, parse_external, parse_partial_symbols)
12243         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12244         (new_symbol): Constify.
12245         * memattr.c (mem_info_command): Constify.
12246         * mep-tdep.c (register_name_from_keyword): Constify.
12247         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12248         Constify.
12249         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12250         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12251         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12252         cast.
12253         (mi_execute_async_cli_command): Constify.
12254         * mips-tdep.c (mips_register_name): Constify.
12255         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12256         (am33_register_name, am33_2_register_name)
12257         * moxie-tdep.c (moxie_register_names): Constify.
12258         * nat/linux-osdata.c (osdata_type): Constify fields.
12259         * nto-tdep.c (nto_parse_redirection): Constify.
12260         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12261         (lookup_child_selector): Constify.
12262         (objc_methcall::name): Constify.
12263         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12264         (lookup_struct_typedef): Constify.
12265         * objfiles.c (pc_in_section): Constify.
12266         * objfiles.h (pc_in_section): Constify.
12267         * p-exp.y (struct token::oper): Constify.
12268         (yyerror): Constify.
12269         * p-lang.h (pascal_yyerror): Constify.
12270         * parser-defs.h (op_name_standard): Constify.
12271         (op_print::string): Constify.
12272         (exp_descriptor::op_name): Constify.
12273         * printcmd.c (print_address_symbolic): Constify.
12274         * psymtab.c (print_partial_symbols): Constify.
12275         * python/py-breakpoint.c (stop_func): Constify.
12276         (bppy_get_expression): Constify.
12277         * python/py-cmd.c (cmdpy_completer::name): Constify.
12278         (cmdpy_function): Constify.
12279         * python/py-event.c (evpy_add_attribute)
12280         (gdbpy_initialize_event_generic): Constify.
12281         * python/py-event.h (evpy_add_attribute)
12282         (gdbpy_initialize_event_generic): Constify.
12283         * python/py-evts.c (add_new_registry): Constify.
12284         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12285         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12286         * python/py-inferior.c (get_buffer): Add cast.
12287         * python/py-param.c (parm_constant::name): Constify.
12288         * python/py-unwind.c (fprint_frame_id): Constify.
12289         * python/python.c (gdbpy_parameter_value): Constify.
12290         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12291         * remote.c (memory_packet_config::name): Constify.
12292         (show_packet_config_cmd, remote_write_bytes)
12293         (remote_buffer_add_string):
12294         * reverse.c (exec_reverse_once): Constify.
12295         * rs6000-tdep.c (variant::name, variant::description): Constify.
12296         * rust-exp.y (rustyyerror): Constify.
12297         * rust-lang.c (rust_op_name): Constify.
12298         * rust-lang.h (rustyyerror): Constify.
12299         * serial.h (serial_ops::name): Constify.
12300         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12301         (sh_sh3e_register_name, sh_sh2e_register_name)
12302         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12303         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12304         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12305         (sh_sh4al_dsp_register_name): Constify.
12306         * sh64-tdep.c (sh64_register_name): Constify.
12307         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12308         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12309         * stabsread.c (patch_block_stabs, read_type_number)
12310         (ref_map::stabs, ref_add, process_reference)
12311         (symbol_reference_defined, define_symbol, define_symbol)
12312         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12313         (read_one_struct_field, read_struct_fields, read_baseclasses)
12314         (read_tilde_fields, read_struct_type, read_array_type)
12315         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12316         (read_huge_number, read_range_type, read_args, common_block_start)
12317         (find_name_end): Constify.
12318         * stabsread.h (common_block_start, define_symbol)
12319         (process_one_symbol, symbol_reference_defined, ref_add):
12320         * symfile.c (get_section_index, add_symbol_file_command):
12321         * symfile.h (get_section_index): Constify.
12322         * target-descriptions.c (tdesc_type::name): Constify.
12323         (tdesc_free_type): Add cast.
12324         * target.c (find_default_run_target):
12325         (add_deprecated_target_alias, find_default_run_target)
12326         (target_announce_detach): Constify.
12327         (do_option): Constify.
12328         * target.h (add_deprecated_target_alias): Constify.
12329         * thread.c (print_thread_info_1): Constify.
12330         * top.c (deprecated_readline_begin_hook, command_line_input):
12331         Constify.
12332         (init_main): Add casts.
12333         * top.h (handle_line_of_input): Constify.
12334         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12335         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12336         (tfind_command): Rename to ...
12337         (tfind_command_1): ... this and constify.
12338         (tfind_command): New function.
12339         (tfind_end_command, tfind_start_command): Adjust.
12340         (encode_source_string): Constify.
12341         * tracepoint.h (encode_source_string): Constify.
12342         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12343         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12344         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12345         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12346         * tui/tui-win.c (parse_scrolling_args): Constify.
12347         * tui/tui-windata.c (tui_erase_data_content): Constify.
12348         * tui/tui-windata.h (tui_erase_data_content): Constify.
12349         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12350         * tui/tui.c (tui_enable): Add cast.
12351         * utils.c (defaulted_query): Constify.
12352         (init_page_info): Add cast.
12353         (puts_debug, subset_compare): Constify.
12354         * utils.h (subset_compare): Constify.
12355         * varobj.c (varobj_format_string): Constify.
12356         * varobj.h (varobj_format_string): Constify.
12357         * vax-tdep.c (vax_register_name): Constify.
12358         * windows-nat.c (windows_detach): Constify.
12359         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12360         * xml-support.c (gdb_xml_end_element): Constify.
12361         * xml-tdesc.c (tdesc_start_reg): Constify.
12362         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12363         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12364         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12365
12366 2017-04-05  Pedro Alves  <palves@redhat.com>
12367
12368         * proc-api.c (struct trans): Constify.
12369         (procfs_note): Constify.
12370         * proc-events.c (struct trans, syscall_table):
12371         * proc-flags.c (struct trans): Constify.
12372         * proc-utils.h (procfs_note): Constify.
12373         * proc-why.c (struct trans): Constify.
12374         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12375         (procfs_detach): Constify.
12376         * sol-thread.c (struct string_map): Constify.
12377         (td_err_string, td_state_string): Constify.
12378
12379 2017-04-05  Pedro Alves  <palves@redhat.com>
12380
12381         * proc-api.c (procfs_filename): Don't initialize
12382         procfs_filename.
12383         (prepare_to_trace): Assume procfs_filename is non-NULL.
12384         (_initialize_proc_api): Give procfs_filename a default value here.
12385
12386 2017-04-05  Pedro Alves  <palves@redhat.com>
12387
12388         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12389         'cond_string' parameter.
12390         (extract_exception_regexp): Constify 'string' parameter.
12391         (catch_exception_command_1): Constify.
12392         * breakpoint.c (init_catchpoint)
12393         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12394         parameter.
12395         (ep_parse_optional_if_clause, catch_fork_command_1)
12396         (catch_exec_command_1): Constify.
12397         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12398         parameter.
12399         (ep_parse_optional_if_clause): Constify.
12400         * cli/cli-utils.c (remove_trailing_whitespace)
12401         (check_for_argument): Constify.
12402         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12403         non-const overload.
12404         (check_for_argument): Likewise.
12405
12406 2017-04-05  Pedro Alves  <palves@redhat.com>
12407
12408         * event-top.c (command_line_handler): Add cast to execute_command
12409         call.
12410         * record-btrace.c (cmd_record_btrace_bts_start)
12411         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12412         (cmd_record_btrace_start): Add cast to execute_command call.
12413         * record-full.c (record_full_goto_insn):
12414         * record.c (record_start, record_stop): Add cast to
12415         execute_command_to_string calls.
12416         (cmd_record_start): Add cast to execute_command calls.
12417
12418 2017-04-05  Pedro Alves  <palves@redhat.com>
12419
12420         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12421         static inline function.
12422         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12423         array and use gdb_PyArg_ParseTupleAndKeywords.
12424         * python/py-cmd.c (cmdpy_init): Likewise.
12425         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12426         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12427         (infpy_search_memory): Likewise.
12428         * python/py-objfile.c (objfpy_add_separate_debug_file)
12429         (gdbpy_lookup_objfile): Likewise.
12430         * python/py-symbol.c (gdbpy_lookup_symbol)
12431         (gdbpy_lookup_global_symbol): Likewise.
12432         * python/py-type.c (gdbpy_lookup_type): Likewise.
12433         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12434         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12435         Likewise.
12436
12437 2017-04-05  Pedro Alves  <palves@redhat.com>
12438
12439         * python/python-internal.h (gdb_PyGetSetDef): New type.
12440         * python/py-block.c (block_object_getset)
12441         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12442         * python/py-event.c (event_object_getset)
12443         (finish_breakpoint_object_getset): Likewise.
12444         * python/py-inferior.c (inferior_object_getset): Likewise.
12445         * python/py-infthread.c (thread_object_getset): Likewise.
12446         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12447         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12448         * python/py-objfile.c (objfile_getset): Likewise.
12449         * python/py-progspace.c (pspace_getset): Likewise.
12450         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12451         Likewise.
12452         * python/py-record.c (recpy_record_getset): Likewise.
12453         * python/py-symbol.c (symbol_object_getset): Likewise.
12454         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12455         Likewise.
12456         * python/py-type.c (type_object_getset, field_object_getset):
12457         Likewise.
12458         * python/py-value.c (value_object_getset): Likewise.
12459
12460 2017-04-05  Pedro Alves  <palves@redhat.com>
12461
12462         * python/python-internal.h (gdb_PyObject_CallMethod)
12463         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12464         New functions.
12465         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12466         (PySys_GetObject, PySys_SetPath): New macros.
12467
12468 2017-04-05  Pedro Alves  <palves@redhat.com>
12469
12470         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12471         info_osdata_command.
12472         * osdata.c (info_osdata_command): Rename to ...
12473         (info_osdata): ... this.  Constify 'type' parameter, and remove
12474         the 'from_tty' parameter.  Accept NULL TYPE.
12475         (info_osdata_command): New function.
12476         * osdata.h (info_osdata_command): Remove declaration.
12477         (info_osdata): New declaration.
12478
12479 2017-04-05  Pedro Alves  <palves@redhat.com>
12480
12481         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12482         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12483         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12484         parameter.
12485         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12486         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12487         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12488         parameter.
12489         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12490         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12491         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12492         (mi_cmd_file_list_exec_source_files)
12493         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12494         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12495         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12496         parameter.
12497         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12498         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12499         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12500         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12501         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12502         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12503         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12504         'command' parameter.
12505         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12506         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12507         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12508         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12509         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12510         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12511         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12512         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12513         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12514         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12515         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12516         parameter.
12517         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12518         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12519         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12520         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12521         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12522         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12523         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12524         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12525         (mi_cmd_data_list_changed_registers)
12526         (mi_cmd_data_write_register_values)
12527         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12528         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12529         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12530         (mi_cmd_list_features, mi_cmd_list_target_features)
12531         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12532         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12533         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12534         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12535         (mi_cmd_trace_frame_collected): Constify 'command'
12536         parameter.
12537         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12538         'command' parameter.
12539
12540 2017-04-05  Pedro Alves  <palves@redhat.com>
12541
12542         * ada-lang.c (ada_completer_word_break_characters): Now a const
12543         array.
12544         (ada_get_gdb_completer_word_break_characters): Constify.
12545         * completer.c (gdb_completer_command_word_break_characters)
12546         (gdb_completer_file_name_break_characters)
12547         (gdb_completer_quote_characters): Now const arrays.
12548         (get_gdb_completer_quote_characters): Constify.
12549         (set_rl_completer_word_break_characters): New function.
12550         (set_gdb_completion_word_break_characters)
12551         (complete_line_internal): Use it.
12552         * completer.h (get_gdb_completer_quote_characters): Constify.
12553         (set_rl_completer_word_break_characters): Declare.
12554         * f-lang.c (f_word_break_characters): Constify.
12555         * language.c (default_word_break_characters): Constify.
12556         * language.h (language_defn::la_word_break_characters): Constify.
12557         (default_word_break_characters): Constify.
12558         * top.c (init_main): Use set_rl_completer_word_break_characters.
12559
12560 2017-04-05  Pedro Alves  <palves@redhat.com>
12561
12562         * aix-thread.c (aix_thread_pid_to_str)
12563         (aix_thread_extra_thread_info): Constify.
12564         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12565         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12566         (bsd_uthread_pid_to_str): Constify.
12567         * corelow.c (core_pid_to_str): Constify.
12568         * darwin-nat.c (darwin_pid_to_str): Constify.
12569         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12570         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12571         Constify.
12572         * gnu-nat.c (gnu_pid_to_str): Constify.
12573         * go32-nat.c (go32_pid_to_str): Constify.
12574         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12575         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12576         * inferior.c (inferior_pid_to_str): Constify.
12577         * linux-nat.c (linux_nat_pid_to_str): Constify.
12578         * linux-tdep.c (linux_core_pid_to_str): Constify.
12579         * linux-thread-db.c (thread_db_pid_to_str)
12580         (thread_db_extra_thread_info): Constify.
12581         * nto-tdep.c (nto_extra_thread_info): Constify.
12582         * nto-tdep.h (nto_extra_thread_info): Constify.
12583         * obsd-nat.c (obsd_pid_to_str): Constify.
12584         * procfs.c (procfs_pid_to_str): Constify.
12585         * ravenscar-thread.c (ravenscar_extra_thread_info)
12586         (ravenscar_pid_to_str): Constify.
12587         * remote-sim.c (gdbsim_pid_to_str): Constify.
12588         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12589         Constify.
12590         * sol-thread.c (solaris_pid_to_str): Constify.
12591         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12592         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12593         * target.c (default_pid_to_str, target_pid_to_str)
12594         (normal_pid_to_str, default_pid_to_str): Constify.
12595         * target.h (target_ops::to_pid_to_str)
12596         (target_ops::to_extra_thread_info): Constify.
12597         (target_pid_to_str, normal_pid_to_str): Constify.
12598         * windows-nat.c (windows_pid_to_str): Constify.
12599         * gdbarch.sh (core_pid_to_str): Constify.
12600         * target-delegates.c: Regenerate.
12601         * gdbarch.h, gdbarch.c: Regenerate.
12602
12603 2017-04-05  Pedro Alves  <palves@redhat.com>
12604
12605         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12606         the memory of the temporary warning_pre_print override.
12607         * utils.c (warning_pre_print): Constify.
12608         * utils.h (warning_pre_print): Constify.
12609
12610 2017-04-05  Pedro Alves  <palves@redhat.com>
12611
12612         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12613         (shell_command): New function.
12614         (make_command): Use std::string.
12615         (init_cli_cmds): Register shell_command instead of shell_escape.
12616
12617 2017-04-05  Pedro Alves  <palves@redhat.com>
12618
12619         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12620         * tracepoint.c (default_collect): Don't initialize.
12621
12622 2017-04-05  Pedro Alves  <palves@redhat.com>
12623
12624         * macroexp.c (macro_buffer::shared): Now a bool.
12625         (init_buffer): Update.
12626         (init_shared_buffer): Constify 'addr' parameter.
12627         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12628         casts.
12629
12630 2017-04-05  Pedro Alves  <palves@redhat.com>
12631
12632         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12633         * disasm.c (set_disassembler_options): Constify local.
12634         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12635
12636 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12637
12638         PR gdb/21352
12639         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12640         option.
12641
12642 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12643
12644         * frame.c (frame_unwind_register_unsigned): Call
12645         frame_unwind_register_value.
12646
12647 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12648
12649         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12650         Use gdb_test_multiple, and don't match anchor.
12651
12652 2017-04-05  Pedro Alves  <palves@redhat.com>
12653
12654         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12655         (Write After Approval): Remove Simon Marchi.
12656
12657 2017-04-05  Pedro Alves  <palves@redhat.com>
12658
12659         * common/gdb_optional.h (optional::optional): Make constexpr and
12660         initialize m_dummy.
12661
12662 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12663
12664         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12665         (amd64fbsd_jmp_buf_reg_offset): Remove.
12666         (amd64fbsd_supply_uthread): Remove function.
12667         (amd64fbsd_collect_uthread): Remove function.
12668         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12669         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12670         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12671         (fbsd-nat.c): Update comment.
12672         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12673         (i386fbsd_jmp_buf_reg_offset): Remove.
12674         (i386fbsd_supply_uthread): Remove function.
12675         (i386fbsd_collect_uthread): Remove function.
12676         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12677
12678 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12679
12680         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12681         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12682         * NEWS: Mention that support for FreeBSD/alpha was removed.
12683         * alpha-fbsd-tdep.c: Delete file.
12684         * config/alpha/fbsd.mh: Delete file.
12685         * configure.host: Delete alpha*-*-freebsd* and
12686         alpha*-*-kfreebsd*-gnu.
12687         * configure.tgt: Delete alpha*-*-freebsd* and
12688         alpha*-*-kfreebsd*-gnu.
12689
12690 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12691
12692         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12693         amd64bsd_store_inferior_registers): Use ptid from regcache.
12694
12695 2017-04-04  Pedro Alves  <palves@redhat.com>
12696
12697         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12698         data fields, make them private and add "m_" prefixes.
12699         (lnp_state_machine::lnp_state_machine): New ctor.
12700         (record_line, check_line_address, handle_set_discriminator)
12701         (handle_set_address, handle_advance_pc, handle_special_opcode)
12702         (handle_advance_line, handle_set_file, handle_negate_stmt)
12703         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12704         (end_sequence, advance_line): New methods.
12705         (m_gdbarch, m_record_lines_p): New fields.
12706         (lnp_reader_state): Delete.
12707         (dwarf_record_line): Rename to ...
12708         (lnp_state_machine::record_line): ... adjust.
12709         (init_lnp_state_machine): Delete.
12710         (lnp_state_machine::lnp_state_machine): New.
12711         (check_line_address): Rename to ...
12712         (lnp_state_machine::check_line_address): This.
12713         (dwarf_decode_lines_1): Remove reference to "reader_state".
12714         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12715         State machine internal state manipulation moved to
12716         lnp_state_machine methods.
12717
12718 2017-04-04  Pedro Alves  <palves@redhat.com>
12719
12720         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12721         unittests/offset-type-selftests.c.
12722         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12723         * common/offset-type.h: New file.
12724         * common/preprocessor.h: New file.
12725         * common/traits.h: New file.
12726         * common/valid-expr.h: New file.
12727         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12728         sect_offset and cu_offset strong typedefs throughout.
12729         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12730         typedefs throughout.
12731         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12732         sect_offset and cu_offset strong typedefs throughout.
12733         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12734         typedefs throughout.
12735         * gdbtypes.h: Include "common/offset-type.h".
12736         (cu_offset): Now an offset type (strong typedef) instead of a
12737         struct.
12738         (sect_offset): Likewise.
12739         (union call_site_parameter_u): Rename "param_offset" field to
12740         "param_cu_off".
12741         * unittests/offset-type-selftests.c: New file.
12742
12743 2017-04-04  Pedro Alves  <palves@redhat.com>
12744
12745         * common/underlying.h: New file.
12746         * dwarf2read.c: Include "common/gdb_optional.h" and
12747         "common/underlying.h".
12748         (dir_index, file_name_index): New types.
12749         (file_entry): Use them.
12750         (file_entry::include): Use to_underlying.
12751         (line_header::add_file_name): Use dir_index.
12752         (read_formatted_entries): Use gdb::optional.  Read form before
12753         writting to file_entry.
12754         (dwarf_decode_line_header): Use dir_index.
12755         (lnp_state_machine::current_file): Use to_underlying.
12756         (lnp_state_machine::file): Change type to file_name_index.
12757         (dwarf_record_line): Use to_underlying.
12758         (init_lnp_state_machine): Use file_name_index.
12759         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12760
12761 2017-04-04  Pedro Alves  <palves@redhat.com>
12762
12763         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12764         operator bool, has_value and get methods.
12765
12766 2017-04-04  Pedro Alves  <palves@redhat.com>
12767
12768         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12769         fields.
12770         (line_header): Initialize all data fields.  Change type of
12771         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12772         Change type of include_dirs to std::vector<const char *>.  Remove
12773         num_include_dirs, include_dirs_size.  Change type of file_names to
12774         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12775         (line_header::line_header): New.
12776         (line_header::add_include_dir, line_header::add_file_name): New
12777         methods.
12778         (line_header::include_dir_at): Remove NULL check.
12779         (line_header::file_name_at): Add const overload.
12780         (line_header_up): New unique_ptr typedef.
12781         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12782         std::vector.  Remove free_line_header call.
12783         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12784         free_line_header call.
12785         (free_cu_line_header): Delete.
12786         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12787         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12788         Adjust to use std::vector.
12789         (free_line_header): Delete.
12790         (free_line_header_voidp): Use delete.
12791         (add_include_dir): Replace with ...
12792         (line_header::add_include_dir): ... this method.  Use std::vector.
12793         (add_file_name): Replace with ...
12794         (line_header::add_file_name): ... this method.  Use std::vector.
12795         (add_include_dir_stub): Delete.
12796         (read_formatted_entries): Remove memset.
12797         (dwarf_decode_line_header): Return a line_header_up instead of a
12798         raw pointer.  Remove cleanup handling.  Pass lambdas to
12799         read_formatted_entries.  Adjust to use line_header methods.
12800         (dwarf_decode_lines_1): Adjust to use line_header methods.
12801         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12802         use std::vector.
12803
12804 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12805
12806         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12807         instead of struct ptid.
12808
12809 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12810
12811         * frame.c (get_frame_register_bytes): Unwind using value.
12812         (put_frame_register_bytes): Likewise.
12813
12814 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12815
12816         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12817         aggregate-like.
12818
12819 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12820
12821         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12822
12823 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12824
12825         * gdbthread.h (struct thread_info): Declare constructor and
12826         destructor.  Add some in-class member initializers.
12827         * thread.c (free_thread): Remove.
12828         (init_thread_list): Call delete instead of free_thread.
12829         (new_thread): Call thread_info constructor.
12830         (thread_info::thread_info): New function.
12831         (thread_info::~thread_info): New function.
12832         (delete_thread_1): Call delete instead of free_thread.
12833         (make_cleanup_restore_current_thread): Move tp and frame to
12834         inner block.
12835
12836 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12837
12838         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12839         (arc_skip_prologue): Likewise.
12840         (arc_make_frame_cache): Likewise.
12841         (arc_pv_get_operand): New function.
12842         (arc_is_in_prologue): Likewise.
12843         (arc_analyze_prologue): Likewise.
12844         (arc_print_frame_cache): Likewise.
12845         (MAX_PROLOGUE_LENGTH): New constant.
12846
12847 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12848
12849         * configure.tgt: Add arc-insn.o.
12850         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12851         (dump_arc_instruction_command): New function.
12852         (arc_fprintf_disasm): Likewise.
12853         (arc_disassemble_info): Likewise.
12854         (arc_insn_get_operand_value): Likewise.
12855         (arc_insn_get_operand_value_signed): Likewise.
12856         (arc_insn_get_memory_base_reg): Likewise.
12857         (arc_insn_get_memory_offset): Likewise.
12858         (arc_insn_get_branch_target): Likewise.
12859         (arc_insn_dump): Likewise.
12860         (arc_insn_get_linear_next_pc): Likewise.
12861         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12862         (arc_disassemble_info): Likewise.
12863         (arc_insn_get_branch_target): Likewise.
12864         (arc_insn_get_linear_next_pc): Likewise.
12865         * NEWS: Mention new "maint print arc arc-instruction".
12866
12867 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12868
12869         * arc-tdep (maintenance_print_arc_list): New variable.
12870         (maintenance_print_arc_command): New function.
12871
12872 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12873
12874         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12875         Add "limm" and "reserved".
12876         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12877         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12878         * arc-tdep.h (arc_regnum): Likewise.
12879
12880 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12881
12882         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12883         for THREADPTR register.
12884         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12885         register.
12886         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12887         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12888         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12889
12890 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12891
12892         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12893         registers above gdbarch_num_regs (gdbarch) as privileged in
12894         call0 ABI.
12895
12896 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12897
12898         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12899         for a single specified register or for all registers in
12900         a0_base..a0_base + C0_NREGS range.
12901         (supply_gregset_reg): Call regcache_raw_supply for a single
12902         specified register or for all registers in a0_base..a0_base +
12903         C0_NREGS range.
12904
12905 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12906
12907         * arch/xtensa.h (C0_NREGS): Add definition.
12908         * xtensa-tdep.c (C0_NREGS): Remove definition.
12909
12910 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12911
12912         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12913         Drop xtensa_default_isa initialization.
12914         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12915
12916 2017-03-27  Pedro Alves  <palves@redhat.com>
12917
12918         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12919         (file_entry::include_dir): New method.
12920         (line_header::include_dir_at, line_header::file_name_at): New
12921         methods.
12922         (setup_type_unit_groups, setup_type_unit_groups)
12923         (psymtab_include_file_name): Simplify using the new methods.
12924         (lnp_state_machine) <the_line_header>: New field.
12925         <file>: Add comment.
12926         (lnp_state_machine::current_file): New method.
12927         (dwarf_record_line): Simplify using the new methods.
12928         (init_lnp_state_machine): Initialize the "the_line_header" field.
12929         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12930         Simplify using the new methods.
12931
12932 2017-03-27  Pedro Alves  <palves@redhat.com>
12933
12934         * cp-name-parser.y (make_empty): Delete.
12935         (demangler_special, nested_name, ptr_operator, array_indicator)
12936         (direct_declarator, declarator_1): Use fill_comp instead of
12937         make_empty.
12938
12939 2017-03-27  Pedro Alves  <palves@redhat.com>
12940
12941         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12942         to ATTRIBUTE_PRINTF.
12943         * solib-target.c (library_list_start_list): Print "string" not
12944         "version".
12945         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12946         gdb_xml_error call.
12947
12948 2017-03-27  Pedro Alves  <palves@redhat.com>
12949
12950         * dwarf2read.c (struct file_and_directory): New.
12951         (dwarf2_get_dwz_file): Adjust to use std::string.
12952         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12953         (find_file_and_directory): Adjust to return a file_and_directory
12954         object.
12955         (read_file_scope): Adjust to use file_and_directory.  Remove
12956         make_cleanup/do_cleanups calls.
12957         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12958         make_cleanup/do_cleanups calls.
12959         * python/python.c (do_start_initialization): Adjust to ldirname
12960         returning a std::string.
12961         * utils.c (ldirname): Now returns a std::string.
12962         * utils.h (ldirname): Change return type to std::string.
12963         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12964         returning a std::string.
12965         * xml-tdesc.c (file_read_description_xml): Likewise.
12966
12967 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12968
12969         * regcache.c (regcache_debug_print_register): New function.
12970         * regcache.h (regcache_debug_print_register): New declaration.
12971         * target.c (debug_print_register): Remove.
12972         (target_fetch_registers): Call regcache_debug_print_register.
12973         (target_store_registers): Likewise.
12974
12975 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12976
12977         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12978         reference beyond the 'lh->include_dirs' array before accessing to
12979         it.
12980         (psymtab_include_file_name): Likewise.
12981         (dwarf_decode_lines_1): Likewise.
12982         (dwarf_decode_lines): Likewise.
12983         (file_file_name): Likewise.
12984
12985 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12986
12987         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12988         inferior_ptid.
12989         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12990         ps_lsetfpregs): Likewise.
12991         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12992         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12993         ps_lsetfpregs): Likewise.
12994         * target.c (target_fetch_registers, target_store_registers):
12995         Remove asserts.
12996
12997 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12998
12999         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13000
13001 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13002
13003         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13004         (_initialize_aarch64_tdep): Register it.
13005         (aarch64_record_load_store): Handle PRFM instruction.
13006         (aarch64_process_record_test): New function.
13007
13008 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13009
13010         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13011         indentation.
13012
13013 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13014
13015         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13016
13017 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13018
13019         python/python.c (do_start_initialization): Fix memory leak.
13020
13021 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13022
13023         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13024         using get_ptrace_pid.
13025         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13026         inferior_ptid.
13027         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13028         inferior_ptid instead of pid.
13029
13030 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13031
13032         * aarch64-tdep.c: Wrap locally used classes in anonymous
13033         namespace.
13034         * arm-tdep.c: Likewise.
13035         * linespec.c: Likewise.
13036         * ui-out.c: Likewise.
13037
13038 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13039
13040         PR gdb/19637
13041         * python/lib/gdb/printer/bound_registers.py: Import sys.
13042
13043 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13044
13045         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13046         windows_thread_info parameter and use it instead of
13047         current_thread.
13048         (windows_fetch_inferior_registers): Don't set current_thread,
13049         pass the thread to do_windows_fetch_inferior_registers.  Use
13050         ptid from regcache instead of inferior_ptid.
13051         (do_windows_store_inferior_registers): Add windows_thread_info
13052         parameter and use it instead of current_thread.
13053         (windows_store_inferior_registers): Don't set current_thread,
13054         pass the thread to do_windows_store_inferior_registers.  Use
13055         ptid from regcache instead of inferior_ptid.
13056
13057 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13058
13059         * ser-mingw.c (ser_windows_raw): Remove reference to
13060         struct serial::current_timeout.
13061
13062 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13063
13064         PR tdep/20928
13065         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13066         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13067         (sparc64_fsr_type): Fix %fsr decoding.
13068
13069 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13070
13071         * python/py-record-btrace.c (btpy_insn_data): Change return type
13072         for Python 2.
13073
13074 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13075
13076         * spu-linux-nat.c (spu_fetch_inferior_registers,
13077         spu_store_inferior_registers): Use ptid from regcache, set and
13078         restore inferior_ptid.
13079         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13080         Likewise.
13081
13082 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13083
13084         * i386-linux-nat.c (fetch_register, store_register,
13085         i386_linux_fetch_inferior_registers,
13086         i386_linux_store_inferior_registers): Use ptid from regcache.
13087         * ia64-linux-nat.c (ia64_linux_fetch_register,
13088         ia64_linux_store_register): Likewise.
13089         * inf-ptrace.c (inf_ptrace_fetch_register,
13090         inf_ptrace_store_register): Likewise.
13091         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13092         m32r_linux_store_inferior_registers): Likewise.
13093         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13094         m68kbsd_store_inferior_registers): Likewise.
13095         * m68k-linux-nat.c (fetch_register, store_register,
13096         m68k_linux_fetch_inferior_registers,
13097         m68k_linux_store_inferior_registers): Likewise.
13098         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13099         m88kbsd_store_inferior_registers): Likewise.
13100         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13101         mips_fbsd_store_inferior_registers): Likewise.
13102         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13103         mips64_linux_regsets_store_registers): Likewise.
13104         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13105         mipsnbsd_store_inferior_registers): Likewise.
13106         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13107         mips64obsd_store_inferior_registers): Likewise.
13108         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13109         Likewise.
13110         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13111         ppcfbsd_store_inferior_registers): Likewise.
13112         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13113         ppc_linux_store_inferior_registers): Likewise.
13114         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13115         ppcnbsd_store_inferior_registers): Likewise.
13116         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13117         ppcobsd_store_registers): Likewise.
13118         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13119         Likewise.
13120         * ravenscar-thread.c (ravenscar_fetch_registers,
13121         ravenscar_store_registers, ravenscar_prepare_to_store):
13122         Likewise.
13123         * record-btrace.c (record_btrace_fetch_registers,
13124         record_btrace_store_registers, record_btrace_prepare_to_store):
13125         Likewise.
13126         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13127         Lookup inferior using ptid from regcache, instead of
13128         current_inferior.
13129         * remote.c (remote_fetch_registers, remote_store_registers): Use
13130         ptid from regcache.
13131         * rs6000-nat.c (fetch_register, store_register): Likewise.
13132         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13133         s390_linux_store_inferior_registers): Likewise.
13134         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13135         shnbsd_store_inferior_registers): Likewise.
13136         * sol-thread.c (sol_thread_fetch_registers,
13137         sol_thread_store_registers): Likewise.
13138         * sparc-nat.c (sparc_fetch_inferior_registers,
13139         sparc_store_inferior_registers): Likewise.
13140         * tilegx-linux-nat.c (fetch_inferior_registers,
13141         store_inferior_registers): Likewise.
13142         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13143         vaxbsd_store_inferior_registers): Likewise.
13144         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13145         store_xtregs): Likewise.
13146
13147 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13148
13149         PR gdb/14441
13150         * NEWS: Mention support for rvalue references in GDB and python.
13151         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13152         supports both lvalue and rvalue references.
13153
13154 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13155
13156         PR gdb/14441
13157         * gdbtypes.c (rank_one_type): Implement overloading
13158         resolution rules regarding rvalue references.
13159
13160 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13161
13162         PR gdb/14441
13163         * aarch64-tdep.c (aarch64_type_align)
13164         (aarch64_extract_return_value, aarch64_store_return_value): Change
13165         lvalue reference type checks to general reference type checks.
13166         * amd64-tdep.c (amd64_classify): Likewise.
13167         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13168         Likewise.
13169         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13170         (arm_store_return_value): Likewise.
13171         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13172         * c-typeprint.c (c_print_type): Likewise.
13173         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13174         (cplus_number_of_children, cplus_describe_child): Likewise.
13175         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13176         * completer.c (expression_completer): Likewise.
13177         * cp-support.c (make_symbol_overload_list_adl_namespace):
13178         Likewise.
13179         * darwin-nat-info.c (info_mach_region_command): Likewise.
13180         * dwarf2loc.c (entry_data_value_coerce_ref)
13181         (value_of_dwarf_reg_entry): Likewise.
13182         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13183         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13184         Likewise.
13185         * findvar.c (extract_typed_address, store_typed_address):
13186         Likewise.
13187         * gdbtypes.c (rank_one_type): Likewise.
13188         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13189         * infcall.c (value_arg_coerce): Likewise.
13190         * language.c (pointer_type): Likewise.
13191         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13192         Likewise.
13193         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13194         * mn10300-tdep.c (mn10300_type_align): Likewise.
13195         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13196         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13197         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13198         Likewise.
13199         * printcmd.c (print_formatted, x_command): Likewise.
13200         * python/py-type.c (typy_get_composite, typy_template_argument):
13201         Likewise.
13202         * python/py-value.c (valpy_referenced_value)
13203         (valpy_get_dynamic_type, value_has_field): Likewise.
13204         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13205         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13206         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13207         * spu-tdep.c (spu_scalar_value_p): Likewise.
13208         * symtab.c (lookup_symbol_aux): Likewise.
13209         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13210         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13211         Likewise.
13212         * valops.c (value_cast_pointers, value_cast)
13213         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13214         (value_struct_elt, value_struct_elt_bitpos)
13215         (value_find_oload_method_list, find_overload_match)
13216         (value_rtti_indirect_type): Likewise.
13217         * valprint.c (val_print_scalar_type_p, generic_val_print):
13218         Likewise.
13219         * value.c (value_actual_type, value_as_address, unpack_long)
13220         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13221         (coerce_ref): Likewise.
13222         * varobj.c (varobj_get_value_type): Likewise.
13223
13224 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13225
13226         PR gdb/14441
13227         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13228         table of constants.
13229         * python/lib/gdb/command/explore.py: Support exploring values
13230         of rvalue reference types.
13231         * python/lib/gdb/types.py: Implement get_basic_type() for
13232         rvalue reference types.
13233         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13234         constant.
13235         * python/py-value.c (valpy_getitem): Add an rvalue reference
13236         check.
13237         (valpy_reference_value): Add new parameter "refcode".
13238         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13239         New wrappers for valpy_reference_value().
13240         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13241         (gdbpy_invoke_xmethod): Likewise.
13242
13243 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13244
13245         PR gdb/14441
13246         * dwarf2read.c (process_die, read_type_die_1): Handle the
13247         DW_TAG_rvalue_reference_type DIE.
13248         (read_tag_reference_type): Add new parameter "refcode".
13249
13250 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13251
13252         PR gdb/14441
13253         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13254         (c_type_print_modifier, c_type_print_varspec_suffix)
13255         (c_type_print_base): Support printing rvalue reference types.
13256         * c-valprint.c (c_val_print, c_value_print): Support printing
13257         rvalue reference values.
13258
13259 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13260
13261         PR gdb/14441
13262         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13263         typename.
13264         * cp-support.c (replace_typedefs): Handle
13265         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13266         * python/py-type.c (typy_lookup_type): Likewise.
13267
13268 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13269
13270         PR gdb/14441
13271         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13272         * parse.c (insert_type): Change assert statement.
13273         (follow_types): Handle rvalue reference types.
13274         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13275         constant.
13276
13277 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13278
13279         PR gdb/14441
13280         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13281         value_ref() interface.
13282         * c-valprint.c (c_value_print): Likewise.
13283         * infcall.c (value_arg_coerce): Likewise.
13284         * python/py-value.c (valpy_reference_value): Likewise.
13285         * valops.c (value_cast, value_reinterpret_cast)
13286         (value_dynamic_cast, typecmp): Likewise.
13287         (value_ref): Parameterize by kind of return value reference type.
13288         * value.h (value_ref): Add new parameter "refcode".
13289
13290 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13291
13292         PR gdb/14441
13293         * dwarf2read.c (read_tag_reference_type): Use
13294         lookup_lvalue_reference_type() instead of lookup_reference_type().
13295         * eval.c (evaluate_subexp_standard): Likewise.
13296         * f-exp.y: Likewise.
13297         * gdbtypes.c (make_reference_type, lookup_reference_type):
13298         Generalize with rvalue reference types.
13299         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13300         convenience wrappers for lookup_reference_type().
13301         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13302         reference kind parameter.
13303         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13304         wrappers for lookup_reference_type().
13305         * guile/scm-type.c (gdbscm_type_reference): Use
13306         lookup_lvalue_reference_type() instead of lookup_reference_type().
13307         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13308         * parse.c (follow_types): Likewise.
13309         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13310         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13311         Likewise.
13312         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13313         (gdbpy_invoke_xmethod): Likewise.
13314         * stabsread.c: Provide extra argument to make_reference_type()
13315         call.
13316         * valops.c (value_ref, value_rtti_indirect_type): Use
13317         lookup_lvalue_reference_type() instead of lookup_reference_type().
13318
13319 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13320
13321         PR gdb/14441
13322         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13323         (TYPE_IS_REFERENCE): New macro.
13324         (struct type): Add rvalue_reference_type field.
13325         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13326
13327 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13328
13329         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13330         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13331         New function definition.
13332         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13333         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13334         New function declaration.
13335         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13336         * mi/mi-interp.h: New file.
13337         * solib.c (info_sharedlibrary_command): Replace for loop with
13338         ALL_SO_LIBS macro
13339         * solib.h (update_solib_list): New function declaration.
13340         (so_list_head): Move macro.
13341         * solist.h (ALL_SO_LIBS): New macro.
13342
13343 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13344
13345         * infcmd.c (post_create_inferior): Remove unused argument in
13346         call to solib_add.
13347         * remote.c (remote_start_remote): Likewise.
13348         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13349         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13350         (enable_break): Likewise.
13351         * solib.c (update_solib_list): Remove unused target argument
13352         and its documentation.
13353         (solib_add): Remove unused target argument.  Remove unused
13354         argument in call to update_solib_list.
13355         (info_sharedlibrary_command): Remove unused argument in call
13356         to update_solib_list.
13357         (sharedlibrary_command): Remove unused argument in call to
13358         solib_add.
13359         (handle_solib_event): Likewise.
13360         (reload_shared_libraries): Likewise.
13361         * solib.h (solib_add): Remove unused target argument.
13362
13363 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13364
13365         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13366         (s390_displaced_step_fixup): Cover relative branches with the
13367         default fixup handling.  This fixes lack of support for some
13368         relative branch instructions.
13369
13370 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13371
13372         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13373         ptid from regcache.
13374
13375 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13376
13377         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13378         i386_darwin_store_inferior_registers): Use ptid from regcache.
13379
13380 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13381
13382         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13383         i386bsd_store_inferior_registers): Use ptid from regcache.
13384
13385 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13386
13387         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13388         hppaobsd_store_registers): Use ptid from regcache.
13389
13390 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13391
13392         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13393         hppanbsd_store_registers): Use ptid from regcache.
13394
13395 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13396
13397         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13398         from regcache.  Use get_ptrace_pid.
13399
13400 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13401
13402         * corelow.c (get_core_register_section): Use ptid from regcache,
13403         update doc.
13404
13405 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13406
13407         * bsd-uthread.c (bsd_uthread_fetch_registers,
13408         bsd_uthread_store_registers): Use ptid from regcache, set and
13409         restore inferior_ptid.
13410
13411 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13412
13413         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13414         fetch_fp_regs, store_register, store_regs, store_fp_register,
13415         store_fp_regs): Use ptid from regcache.
13416
13417 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13418
13419         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13420         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13421         store_vfp_regs): Use ptid from regcache.
13422
13423 2017-03-17  Pedro Alves  <palves@redhat.com>
13424
13425         PR remote/21188
13426         * ser-base.c (ser_base_wait_for): Add comment.
13427         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13428         version.
13429         * ser-unix.c (hardwire_raw): Remove reference to
13430         scb->current_timeout.
13431         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13432         (hardwire_ops): Install ser_base_readchar instead of
13433         hardwire_readchar.
13434         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13435         Remove fields.
13436
13437 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13438
13439         PR gdb/19637
13440         * python/lib/gdb/printer/bound_registers.py: Add support for
13441         Python 3.
13442
13443 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13444
13445         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13446         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13447         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13448         byte_offset to subobj_byte_offset.  Fix the handling of
13449         DWARF_VALUE_STACK on big-endian targets when coming via an
13450         implicit pointer.
13451         (dwarf2_evaluate_loc_desc): Adjust call to
13452         dwarf2_evaluate_loc_desc_full.
13453         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13454         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13455
13456 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13457
13458         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13459         and REVSH instructions.
13460
13461 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13462
13463         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13464         (arm_record_test): Declare.
13465         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13466         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13467         align with the manual.
13468         (thumb_record_misc): Adjust the code order to align with the
13469         manual.
13470         (thumb2_record_decode_insn_handler): Fix instruction matching.
13471         (instruction_reader_thumb): New class.
13472         (arm_record_test): New function.
13473
13474 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13475
13476         * arm-tdep.c (abstract_memory_reader): New class.
13477         (instruction_reader): New class.
13478         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13479         (decode_insn): Likewise.
13480
13481 2017-03-16  Doug Evans  <dje@google.com>
13482
13483         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13484         member.  Change type of TYPE member to SCM.  All uses updated.
13485         (lsscm_make_lazy_string_smob): Add assert.
13486         (lsscm_make_lazy_string): Flag bad length values.
13487         (lsscm_elt_type): New function.
13488         (gdbscm_lazy_string_to_value): Rewrite to use
13489         lsscm_safe_lazy_string_to_value.
13490         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13491         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13492         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13493         in incoming type.
13494         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13495         * guile/scm-type.c (tyscm_scm_to_type): New function.
13496
13497 2017-03-15  Doug Evans  <dje@google.com>
13498
13499         PR python/17728, python/18439, python/18779
13500         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13501         member.  Change type of TYPE member to PyObject *.  All uses updated.
13502         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13503         (gdbpy_create_lazy_string_object): Flag bad length values.
13504         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13505         Handle typedefs in incoming type.
13506         (stpy_lazy_string_elt_type): New function.
13507         (gdbpy_extract_lazy_string): Call it.
13508         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13509         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13510         typedefs in incoming type.
13511
13512 2017-03-16  Doug Evans  <dje@google.com>
13513
13514         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13515         * guile/scm-type.c (tyscm_scm_to_type): New function.
13516
13517 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13518
13519         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13520         "ULONGEST" for "skip".
13521
13522 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13523
13524         PR gdb/21220
13525         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13526         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13527         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13528         over ptrace peek/poke until end of buffer or error.
13529
13530 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13531
13532         * parse.c (length_of_subexp): Make static.
13533         * parser-defs.h (length_of_subexp): Remove.
13534
13535 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13536
13537         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13538         as well.
13539
13540 2017-03-14  Pedro Alves  <palves@redhat.com>
13541
13542         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13543         (main): Use std::unique_ptr.  Remove calls to
13544         cp_demangled_name_parse_free.
13545
13546 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13547
13548         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13549         alphabsd_store_inferior_registers): Use regcache->ptid instead
13550         of inferior_ptid.
13551
13552 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13553
13554         * aix-thread.c (aix_thread_fetch_registers,
13555         aix_thread_store_registers): Use regcache->ptid instead of
13556         inferior_ptid.
13557
13558 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13559
13560         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13561         store_gregs_to_thread, fetch_fpregs_from_thread,
13562         store_fpregs_to_thread): Use regcache->ptid instead of
13563         inferior_ptid.
13564
13565 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13566
13567         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13568         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13569         instead of inferior_ptid.
13570
13571 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13572
13573         * target.c (target_fetch_registers, target_store_registers): Add
13574         assert.
13575
13576 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13577
13578         * regcache.h (regcache_get_ptid): New function.
13579         * regcache.c (regcache_get_ptid): New function.
13580
13581 2017-03-13  Mark Wielaard  <mark@klomp.org>
13582
13583         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13584
13585 2017-03-10  Keith Seitz  <keiths@redhat.com>
13586
13587         PR c++/8218
13588         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13589
13590 2017-03-08  Pedro Alves  <palves@redhat.com>
13591
13592         PR gdb/18360
13593         * infrun.c (start_step_over, do_target_resume, resume)
13594         (restart_threads): Assert we're not resuming a thread that is
13595         meant to be stopped.
13596         (infrun_thread_stop_requested_callback): Delete.
13597         (infrun_thread_stop_requested): If the thread is internally
13598         stopped, queue a pending stop event and clear the thread's
13599         inline-frame state.
13600         (handle_stop_requested): New function.
13601         (handle_syscall_event, handle_inferior_event_1): Use
13602         handle_stop_requested.
13603         (handle_stop_requested): New function.
13604         (handle_signal_stop): Set the thread's stop_signal here instead of
13605         at caller.
13606         (finish_step_over): Clear step over info unconditionally.
13607         (handle_signal_stop): If the user had interrupted the event
13608         thread, consider the stop a random signal.
13609         (handle_signal_stop) <signal arrived while stepping over
13610         breakpoint>: Don't restart threads here.
13611         (stop_waiting): Don't clear step-over info here.
13612
13613 2017-03-08  Pedro Alves  <palves@redhat.com>
13614
13615         PR 21206
13616         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13617         goes to argument 2, not 1.
13618
13619 2017-03-08  Pedro Alves  <palves@redhat.com>
13620
13621         PR cli/21218
13622         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13623         display_gdb_prompt.
13624         (command_line_input): Add comment.
13625
13626 2017-03-08  Pedro Alves  <palves@redhat.com>
13627
13628         PR tui/21216
13629         * tui/tui-file.c (tui_file::write): New.
13630         * tui/tui-file.h (tui_file): Override "write".
13631         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13632         factored out from ...
13633         (tui_puts): ... here.
13634         (tui_putc): Use them.
13635         (tui_write): New function.
13636         * tui/tui-io.h (tui_write): Declare.
13637
13638 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13639
13640         * Makefile.in (SFILES): Replace "environ.c" with
13641         "common/environ.c".
13642         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13643         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13644         to...
13645         * common/environ.c: ... here.
13646         * environ.h: Moved to...
13647         * common/environ.h: ... here.
13648
13649 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13650
13651         * gdbarch.sh (pstring_ptr): New static function.
13652         (gdbarch_disassembler_options): Use it.
13653         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13654         not valid_disassembler_option->name.
13655         * gdbarch.c: Regenerate.
13656
13657 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13658
13659         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13660
13661 2017-03-07  Pedro Alves  <palves@redhat.com>
13662
13663         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13664
13665 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13666
13667         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13668         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13669         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13670         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13671
13672 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13673
13674         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13675
13676 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13677
13678         * remote.c (remote_add_target_side_commands): Use range-based
13679         for loop.
13680
13681 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13682
13683         PR gdb/21165
13684         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13685         value is lazy.
13686         * valprint.c (common_val_print): Likewise.
13687
13688 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13689
13690         * NEWS: Mention new set/show disassembler-options commands.
13691         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13692         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13693         (prospective_options): New static variable.
13694         (gdb_disassembler::gdb_disassembler): Initialize
13695         m_di.disassembler_options.
13696         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13697         (get_disassembler_options): New function.
13698         (set_disassembler_options): Likewise.
13699         (set_disassembler_options_sfunc): Likewise.
13700         (show_disassembler_options_sfunc): Likewise.
13701         (disassembler_options_completer): Likewise.
13702         (_initialize_disasm): Likewise.
13703         * disasm.h (get_disassembler_options): New prototype.
13704         (set_disassembler_options): Likewise.
13705         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13706         (gdbarch_verify_disassembler_options): Likewise.
13707         * gdbarch.c: Regenerate.
13708         * gdbarch.h: Likewise.
13709         * arm-tdep.c (num_disassembly_options): Delete.
13710         (set_disassembly_style): Likewise.
13711         (arm_disassembler_options): New static variable.
13712         (set_disassembly_style_sfunc): Convert short style name into long
13713         option name.  Call set_disassembler_options.
13714         (show_disassembly_style_sfunc): New function.
13715         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13716         set_gdbarch_verify_disassembler_options.
13717         (_initialize_arm_tdep): Delete regnames variable and update callers.
13718         (arm_disassembler_options): Initialize.
13719         (disasm_options): New variable.
13720         (num_disassembly_options): Rename from this...
13721         (num_disassembly_styles): ...to this.  Compute by scanning through
13722         disasm_options.
13723         (valid_disassembly_styles): Initialize using disasm_options.
13724         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13725         set_arm_regname_option.
13726         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13727         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13728         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13729         set_gdbarch_verify_disassembler_options.
13730         * s390-tdep.c (s390_disassembler_options): New static variable.
13731         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13732         set_gdbarch_verify_disassembler_options.
13733
13734 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13735
13736         * remote.c (remote_add_target_side_condition): Remove "struct"
13737         keyword from range-based for loop.
13738
13739 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13740
13741         * remote.c (remote_add_target_side_condition): Use range-based
13742         for loop.  Update comment.
13743
13744 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13745
13746         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13747
13748 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13749
13750         * regcache.c (regcache_raw_update): New function.
13751         (regcache_raw_read): Move code to regcache_raw_update.
13752         * regcache.h (regcache_raw_update): New declaration.
13753         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13754
13755 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13756
13757         * dwarf2read.c (create_debug_type_hash_table): Initialize
13758         header.signature and header.type_offset_in_tu.
13759
13760 2017-02-24  Pedro Alves  <palves@redhat.com>
13761
13762         * symtab.c (make_file_symbol_completion_list_1): Use
13763         add_symtab_completions.
13764
13765 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13766
13767         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13768
13769 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13770
13771         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13772         I386_MAX_REGISTER_SIZE.
13773         (i386_pseudo_register_write): Likewise.
13774         (i386_process_record): Likewise.
13775         * i387-tdep.c (i387_supply_xsave): Likewise.
13776         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13777         (store_register): Likewise.
13778
13779 2017-02-23  Pedro Alves  <palves@redhat.com>
13780
13781         * ada-lang.c: Include "common/function-view.h".
13782         (ada_iterate_over_symbols): Adjust to use function_view as
13783         callback type.
13784         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13785         (ada_make_symbol_completion_list): Use a lambda.
13786         (ada_exc_search_name_matches): Delete.
13787         (name_matches_regex): New.
13788         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13789         * compile/compile-c-support.c: Include "common/function-view.h".
13790         (print_one_macro): Change prototype to accept a ui_file pointer.
13791         (write_macro_definitions): Use a lambda.
13792         * dwarf2read.c: Include "common/function-view.h".
13793         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13794         (dw2_expand_symtabs_matching): Adjust to use function_view as
13795         callback type.
13796         * language.h: Include "common/function-view.h".
13797         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13798         function_view as callback type.
13799         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13800         * linespec.c: Include "common/function-view.h".
13801         (collect_info::add_symbol): New method.
13802         (struct symbol_and_data_callback, iterate_inline_only, struct
13803         symbol_matcher_data, iterate_name_matcher): Delete.
13804         (iterate_over_all_matching_symtabs): Adjust to use function_view
13805         as callback type and lambdas.
13806         (iterate_over_file_blocks): Adjust to use function_view as
13807         callback type.
13808         (decode_compound_collector): Now a class with private fields.
13809         (decode_compound_collector::release_symbols): New method.
13810         (collect_one_symbol): Rename to...
13811         (decode_compound_collector::operator()): ... this and adjust.
13812         (lookup_prefix_sym): decode_compound_collector construction bits
13813         move to decode_compound_collector ctor.  Pass the
13814         decode_compound_collector object directly as callback.  Remove
13815         cleanups and use decode_compound_collector::release_symbols
13816         instead.
13817         (symtab_collector): Now a class with private fields.
13818         (symtab_collector::release_symtabs): New method.
13819         (add_symtabs_to_list): Rename to...
13820         (symtab_collector::operator()): ... this and adjust.
13821         (collect_symtabs_from_filename): symtab_collector construction
13822         bits move to symtab_collector ctor.  Pass the symtab_collector
13823         object directly as callback.  Remove cleanups and use
13824         symtab_collector::release_symtabs instead.
13825         (collect_symbols): Delete.
13826         (add_matching_symbols_to_info): Use lambdas.
13827         * macrocmd.c (print_macro_callback): Delete.
13828         (info_macro_command): Use a lambda.
13829         (info_macros_command): Pass print_macro_definition as callable
13830         directly.
13831         (print_one_macro): Remove 'ignore' parameter.
13832         (macro_list_command): Adjust.
13833         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13834         (macro_for_each_data::user_data): Delete field.
13835         (foreach_macro): Adjust to call the function_view.
13836         (macro_for_each): Adjust to use function_view as callback type.
13837         (foreach_macro_in_scope): Adjust to call the function_view.
13838         (macro_for_each_in_scope): Adjust to use function_view as callback
13839         type.
13840         * macrotab.h: Include "common/function-view.h".
13841         (macro_callback_fn): Declare a prototype instead of a pointer.
13842         Remove "user_data" parameter.
13843         (macro_for_each, macro_for_each_in_scope): Adjust to use
13844         function_view as callback type.
13845         * psymtab.c (partial_map_expand_apply)
13846         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13847         Adjust to use function_view as callback type and to return bool.
13848         (psym_expand_symtabs_matching): Adjust to use function_view as
13849         callback types.
13850         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13851         to use function_view as callback type and to return bool.
13852         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13853         callback types.
13854         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13855         as callback types.
13856         * symfile.h: Include "common/function-view.h".
13857         (expand_symtabs_file_matcher_ftype)
13858         (expand_symtabs_symbol_matcher_ftype)
13859         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13860         return bool.
13861         (quick_symbol_functions::map_symtabs_matching_filename)
13862         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13863         function_view as callback type and return bool.
13864         (expand_symtabs_matching): Adjust to use function_view as callback
13865         type.
13866         (maintenance_expand_name_matcher)
13867         (maintenance_expand_file_matcher): Delete.
13868         (maintenance_expand_symtabs): Use lambdas.
13869         * symtab.c (iterate_over_some_symtabs): Adjust to use
13870         function_view as callback types and return bool.
13871         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13872         of a cleanup.
13873         (lookup_symtab_callback): Delete.
13874         (lookup_symtab): Use a lambda.
13875         (iterate_over_symbols): Adjust to use function_view as callback
13876         type.
13877         (struct search_symbols_data, search_symbols_file_matches)
13878         (search_symbols_name_matches): Delete.
13879         (search_symbols): Use a pair of lambdas.
13880         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13881         (symtab_expansion_callback): Delete.
13882         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13883         * symtab.h: Include "common/function-view.h".
13884         (iterate_over_some_symtabs): Adjust to use function_view as
13885         callback type and return bool.
13886         (iterate_over_symtabs): Adjust to use function_view as callback
13887         type.
13888         (symbol_found_callback_ftype): Remove 'data' parameter and return
13889         bool.
13890         (iterate_over_symbols): Adjust to use function_view as callback
13891         type.
13892
13893 2017-02-23  Pedro Alves  <palves@redhat.com>
13894
13895         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13896         (%.o) <unittests/%.c>: New pattern.
13897         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13898         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13899         * common/function-view.h: New file.
13900         * unittests/function-view-selftests.c: New file.
13901         * configure: Regenerate.
13902
13903 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13904
13905         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13906         inferior_ptid.
13907         * go32-nat.c (go32_thread_alive): Likewise.
13908
13909 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13910
13911         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13912         delete.
13913
13914 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13915
13916         * varobj.c (varobj_clear_saved_item): Use delete instead of
13917         xfree.
13918         (update_dynamic_varobj_children): Likewise.
13919
13920 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13921
13922         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13923
13924 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13925
13926         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13927         m_enum_value to 0 in default constructor.
13928
13929 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13930
13931         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13932         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13933         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13934         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13935         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13936         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13937         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13938         IS_STORE_CONDITIONAL_INSN.
13939
13940 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13941
13942         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13943
13944 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13945
13946         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13947
13948 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13949
13950         * dwarf2read.c (skip_one_die, read_attribute_value)
13951         (dwarf2_const_value_attr, dump_die_shallow)
13952         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13953         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13954
13955 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13956
13957         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13958         (dwarf_parse_macro_header): Accept DWARF version 5.
13959         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13960
13961 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13962
13963         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13964         DW_AT_GNU_*.
13965         * common/common-exceptions.h (enum errors): Likewise.
13966         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13967         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13968         (dwarf_expr_context::execute_stack_op): Likewise.
13969         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13970         Likewise.
13971         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13972         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13973         (show_entry_values_debug, call_site_to_target_addr)
13974         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13975         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13976         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13977         (value_of_dwarf_block_entry, indirect_pieced_value)
13978         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13979         (disassemble_dwarf_expression): Likewise.
13980         * dwarf2read.c (process_die, inherit_abstract_dies)
13981         (read_call_site_scope): Likewise.
13982         * gdbtypes.h (struct func_type, struct call_site_parameter)
13983         (struct call_site): Likewise.
13984         * stack.c (read_frame_arg): Likewise.
13985         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13986
13987 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13988
13989         * defs.h (read_unsigned_leb128): New declaration.
13990         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13991         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13992         (dwarf2_find_location_expression): Call also
13993         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13994         * dwarf2loc.h (dwarf2_version): New declaration.
13995         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13996         rnglists.
13997         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13998         .debug_rnglists.
13999         (struct dwop_section_names): Add loclists_dwo.
14000         (dwop_section_names): Add .debug_loclists.dwo.
14001         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14002         (struct dwarf2_per_cu_data): Add dwarf_version.
14003         (struct dwo_sections): Add loclists.
14004         (struct attr_abbrev): Add implicit_const.
14005         (read_indirect_line_string): New declaration.
14006         (read_unsigned_leb128): Delete declaration.
14007         (rcuh_kind): New definition.
14008         (read_and_check_comp_unit_head): Change parameter
14009         is_debug_types_section to section_kind.
14010         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14011         (read_comp_unit_head): Change parameter abfd to section, add parameter
14012         section_kind.  Handle DWARF-5.
14013         (error_check_comp_unit_head): Accept also DWARF version 5.
14014         (read_and_check_comp_unit_head): Change parameter
14015         is_debug_types_section to section_kind.
14016         (read_and_check_type_unit_head): Delete function.
14017         (read_abbrev_offset): Handle DWARF-5.
14018         (create_debug_type_hash_table): Add parameter section_kind.  Process
14019         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14020         comp_unit_head.
14021         (create_debug_types_hash_table): Update create_debug_type_hash_table
14022         caller.
14023         (create_all_type_units): Call create_debug_type_hash_table.
14024         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14025         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14026         caller.
14027         (skip_one_die): Handle DW_FORM_implicit_const.
14028         (dwarf2_rnglists_process): New function.
14029         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14030         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14031         (read_attribute_value): Handle DW_FORM_implicit_const,
14032         DW_FORM_line_strp.
14033         (read_attribute): Handle DW_FORM_implicit_const.
14034         (read_indirect_string_at_offset_from): New function from
14035         read_indirect_string_at_offset.
14036         (read_indirect_string_at_offset): Call
14037         read_indirect_string_at_offset_from.
14038         (read_indirect_line_string_at_offset): New function.
14039         (read_indirect_string): New function comment.
14040         (read_indirect_line_string): New function.
14041         (read_unsigned_leb128): Make it global.
14042         (dwarf2_string_attr): Handle DWARF-5.
14043         (add_include_dir_stub, read_formatted_entries): New functions.
14044         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14045         Handle DWARF-5.
14046         (per_cu_header_read_in): Update read_comp_unit_head caller.
14047         (dwarf2_version): New function.
14048         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14049         rnglists.
14050         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14051         fields.
14052
14053 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14054
14055         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14056
14057 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14058
14059         * dwarf2read.c (dwarf2_ranges_process): New function from
14060         dwarf2_ranges_read.
14061         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14062         dwarf2_ranges_process.
14063
14064 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14065
14066         * dwarf2read.c (create_debug_type_hash_table): New function from
14067         create_debug_types_hash_table.
14068         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14069         (create_all_type_units, open_and_init_dwo_file): Update
14070         create_debug_types_hash_table callers.
14071
14072 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14073
14074         PR gdb/16188
14075         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14076         refer to 'ap', not 'args'.
14077
14078 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14079             Pedro Alves  <palves@redhat.com>
14080
14081         PR gdb/16188
14082         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14083         calls succeeded.
14084         * fork-child.c (trace_start_error): New function.
14085         (trace_start_error_with_name): Likewise.
14086         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14087         * inf-ptrace.c (inf_ptrace_me): Likewise.
14088         * inferior.h (trace_start_error): New prototype.
14089         (trace_start_error_with_name): Likewise.
14090
14091 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14092
14093         PR gdb/21164
14094         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14095         NULL before using it.
14096         * symmisc.c (maintenance_print_symbols): Likewise.
14097         (maintenance_print_msymbols): Likewise.
14098
14099 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14100
14101         * NEWS: Add record Python bindings entry.
14102
14103 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14104
14105         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14106         py-record-full.o.
14107         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14108         * python/py-record-btrace.c, python/py-record-btrace.h,
14109         python/py-record-full.c, python/py-record-full.h: New file.
14110         * python/py-record.c: Add include for py-record-btrace.h and
14111         py-record-full.h.
14112         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14113         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14114         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14115         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14116         New definition.
14117         (gdbpy_initialize_btrace): New export.
14118         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14119
14120 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14121
14122         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14123         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14124         * python/py-record.c: New file.
14125         * python/python-internal.h (gdbpy_start_recording,
14126         gdbpy_current_recording, gdpy_stop_recording,
14127         gdbpy_initialize_record): New export.
14128         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14129         (python_GdbMethods): Add gdbpy_start_recording,
14130         gdbpy_current_recording and gdbpy_stop_recording.
14131
14132 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14133
14134         * record-btrace.c (record_btrace_record_method): New function.
14135         (init_record_btrace_ops): Initialize to_record_method.
14136         * record-full.c (record_full_record_method): New function.
14137         (init_record_full_ops, init_record_full_core_ops): Add
14138         record_full_record_method.
14139         * record.h (enum record_method): New enum.
14140         * target-debug.h (target_debug_print_enum_record_method: New define.
14141         * target-delegates.c: Regenerate.
14142         * target.c (target_record_method): New function.
14143         * target.h: Include record.h.
14144         (struct target_ops) <to_record_method>: New field.
14145         (target_record_method): New export.
14146
14147 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14148
14149         * record.h (record_start, record_stop): New export.
14150         * record.c (record_start, record_stop): New function.
14151
14152 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14153
14154         * btrace.c (btrace_fetch): Copy function call segments pointer
14155         into a vector.
14156         (btrace_clear): Clear the vector.
14157         (btrace_find_insn_by_number): Use binary search to find the correct
14158         function call segment.
14159         * btrace.h (brace_fun_p): New typedef.
14160         (struct btrace_thread_info) <functions>: New field.
14161
14162 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14163
14164         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14165         * btrace.c (btrace_decode_error): ... here.  New function.
14166         * btrace.h (btrace_decode_error): New export.
14167
14168 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14169
14170         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14171         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14172         btrace_find_insn_by_number): Remove special case for gaps.
14173         * btrace.h (btrace_insn_get_error): New export.
14174         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14175         * record-btrace.c (btrace_insn_history): Print number for gaps.
14176         (record_btrace_info, record_btrace_goto): Handle gaps.
14177
14178 2017-02-14  Tom Tromey  <tom@tromey.com>
14179
14180         PR python/13598:
14181         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14182         event.
14183         * python/py-evts.c (gdbpy_initialize_py_events): Add
14184         before_prompt registry.
14185         * python/py-events.h (events_object) <before_prompt>: New field.
14186
14187 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14188
14189         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14190
14191 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14192
14193         * symfile (_initialize_symfile): Add usage text to the load command's
14194         help text.
14195
14196 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14197
14198         * utils.c (defaulted_query): Don't query on secondary UIs.
14199
14200 2017-02-10  Tom Tromey  <tom@tromey.com>
14201
14202         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14203
14204 2017-02-10  Tom Tromey  <tom@tromey.com>
14205
14206         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14207         "cleanup" local.
14208         * python/py-type.c (typy_legacy_template_argument): Remove
14209         unnecessary "cleanup" local.
14210
14211 2017-02-10  Tom Tromey  <tom@tromey.com>
14212
14213         * python/python.c (do_start_initialization): New function, from
14214         _initialize_python.
14215         (_initialize_python): Call do_start_initialization.
14216         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14217         goto.
14218
14219 2017-02-10  Tom Tromey  <tom@tromey.com>
14220
14221         * python/py-prettyprint.c (pretty_print_one_value): Use
14222         gdbpy_ref.
14223
14224 2017-02-10  Tom Tromey  <tom@tromey.com>
14225
14226         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14227         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14228         gdbpy_ref.
14229         * python/py-type.c (field_new): Use gdbpy_ref.
14230         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14231         gdbpy_ref.
14232         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14233         (py_free_pspace): Likewise.
14234         (pspace_to_pspace_object): Likewise.
14235         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14236         (py_free_objfile): Likewise.
14237         (objfile_to_objfile_object): Likewise.
14238         * python/py-inferior.c (delete_thread_object): Use
14239         gdbpy_ref.
14240         (infpy_read_memory): Likewise.
14241         (py_free_inferior): Likewise.
14242         * python/py-evtregistry.c (create_eventregistry_object): Use
14243         gdbpy_ref.
14244         * python/py-event.c (create_event_object): Use gdbpy_ref.
14245
14246 2017-02-10  Tom Tromey  <tom@tromey.com>
14247
14248         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14249         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14250         used.
14251         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14252         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14253         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14254         python/py-framefilter.c, python/py-function.c,
14255         python/py-inferior.c, python/py-infevents.c,
14256         python/py-linetable.c, python/py-newobjfileevent.c,
14257         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14258         python/py-signalevent.c, python/py-stopevent.c,
14259         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14260         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14261         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14262         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14263
14264 2017-02-10  Tom Tromey  <tom@tromey.com>
14265
14266         * ui-out.h (ui_out_emit_type): New class.
14267         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14268         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14269         and ui_out_emit_tuple.
14270         (enumerate_locals): Likewise.
14271         (py_mi_print_variables, py_print_locals, py_print_args): Use
14272         ui_out_emit_list.
14273         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14274         ui_out_emit_list.
14275         * common/gdb_optional.h: New file.
14276
14277 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14278
14279         * MAINTAINERS (Write After Approval): Update my e-mail address.
14280
14281 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14282
14283         PR gdb/21122
14284         * breakpoint.c (_initialize_breakpoint): Update the help description
14285         of the 'commands' command to indicate that it takes a list argument.
14286
14287 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14288
14289         * interps.c (current_interp_set_logging): Remove "return".
14290
14291 2017-02-09  Gary Benson  <gbenson@redhat.com>
14292
14293         * symtab.c (add_symtab_completions): Prevent NULL pointer
14294         dereference.
14295
14296 2017-02-08  Pedro Alves  <palves@redhat.com>
14297
14298         * interps.c (interp::interp): Remove reference to quiet_p.
14299         (interp_set): Make static.  Remove dead "Switching to" output
14300         code.
14301         (interp_quiet_p, interp_set_quiet): Delete.
14302         (interpreter_exec_cmd): Don't set the interpreter quiet.
14303         * interps.h (interp_quiet_p): Make static.
14304         (class interp) <quiet_p>: Remove field
14305
14306 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14307
14308         * cli/cli-decode.c (find_command_name_length): Make it extern.
14309         * cli/cli-decode.h (find_command_name_length): Declare.
14310         * cli/cli-script.c (command_name_equals, line_first_arg):
14311         New functions.
14312         (process_next_line): Use cli-decode to parse command names.
14313         (build_command_line): Make args a constant pointer.
14314
14315 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14316
14317         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14318         Remove case-insensitive search.
14319
14320 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14321
14322         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14323         at the end of the line.  Avoids an ARI warning.
14324
14325 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14326
14327         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14328         rdseed instructions.
14329         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14330
14331 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14332
14333         PR tdep/20936
14334         Provide and use sparc32 and sparc64 target description XML files.
14335         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14336         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14337         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14338         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14339         * features/sparc/sparc32-solaris.xml: New file.
14340         * features/sparc/sparc64-solaris.xml: New file.
14341         * features/sparc/sparc32-solaris.c: Generated.
14342         * features/sparc/sparc64-solaris.c: Generated.
14343         * sparc-tdep.h: Account for differences in target descriptions.
14344         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14345         (sparc32_register_type): Use target provided registers.
14346         (validate_tdesc_registers): New function.
14347         (sparc32_gdbarch_init): Use tdesc_has_registers.
14348         Set pseudoregister functions.
14349         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14350         (sparc64_register_type): Use target provided registers.
14351         (sparc64_init_abi): Set pseudoregister functions.
14352
14353 2017-02-03  Tom Tromey  <tom@tromey.com>
14354
14355         PR rust/21097:
14356         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14357         with a single member.
14358
14359 2017-02-03  Pedro Alves  <palves@redhat.com>
14360
14361         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14362         (cli_interp_base::~cli_interp_base): New.
14363         (cli_interp): New struct.
14364         (as_cli_interp): Cast the interp itself to cli_interp.
14365         (cli_interpreter_pre_command_loop): Rename to ...
14366         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14367         parameter.
14368         (cli_interpreter_init): Rename to ...
14369         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14370         boolean.  Make extern.
14371         (cli_interpreter_resume): Rename to ...
14372         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14373         extern.
14374         (cli_interpreter_suspend): Rename to ...
14375         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14376         extern.
14377         (cli_interpreter_exec): Rename to ...
14378         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14379         extern.
14380         (cli_interpreter_supports_command_editing): Rename to ...
14381         (cli_interp_base::supports_command_editing): ... this.  Remove
14382         'interp' parameter.  Make extern.
14383         (cli_ui_out): Rename to ...
14384         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14385         Make extern.
14386         (cli_set_logging): Rename to ...
14387         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14388         parameter.  Make extern.
14389         (cli_interp_procs): Delete.
14390         (cli_interp_factory): Adjust to use "new".
14391         * cli/cli-interp.h: Include "interps.h".
14392         (struct cli_interp_base): New struct.
14393         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14394         (interp_new): Delete.
14395         (interp::interp, interp::~interp): New.
14396         (interp_set): Use bool, and return void.  Assume the interpreter
14397         has suspend, init and resume methods, and that the all return
14398         void.
14399         (set_top_level_interpreter): interp_set returns void.
14400         (interp_ui_out): Adapt.
14401         (current_interp_set_logging): Adapt.
14402         (interp_data): Delete.
14403         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14404         (interp_exec): Adapt.
14405         (top_level_interpreter_data): Delete.
14406         * interps.h (interp_init_ftype, interp_resume_ftype)
14407         (interp_suspend_ftype, interp_exec_ftype)
14408         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14409         (class interp): New.
14410         (interp_new): Delete.
14411         (interp_set): Now returns void.  Use bool.
14412         (interp_data, top_level_interpreter_data): Delete.
14413         * mi/mi-common.h: Include interps.h.
14414         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14415         init, resume, suspect, exec, interp_ui_out, set_logging and
14416         pre_command_loop methods.
14417         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14418         (mi_interpreter_init): Rename to ...
14419         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14420         bool, return void and make extern.  Adjust.
14421         (mi_interpreter_resume): ... Rename to ...
14422         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14423         return void and make extern.  Adjust.
14424         (mi_interpreter_suspend): ... Rename to ...
14425         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14426         return void and make extern.  Adjust.
14427         (mi_interpreter_exec): ... Rename to ...
14428         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14429         extern.  Adjust.
14430         (mi_interpreter_pre_command_loop): ... Rename to ...
14431         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14432         parameter and make extern.
14433         (mi_on_normal_stop_1): Adjust.
14434         (mi_ui_out): Rename to ...
14435         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14436         parameter and make extern.  Adjust.
14437         (mi_set_logging): Rename to ...
14438         (mi_interp::set_logging): ... this.  Remove the 'interp'
14439         parameter and make extern.  Adjust.
14440         (mi_interp_procs): Delete.
14441         (mi_interp_factory): Adjust to use 'new'.
14442         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14443         (mi_print_exception, mi_execute_command, mi_load_progress):
14444         Adjust.
14445         * tui/tui-interp.c (tui_interp): New class.
14446         (as_tui_interp): Return a tui_interp pointer.
14447         (tui_on_normal_stop, tui_on_signal_received)
14448         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14449         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14450         to use interp::interp_ui_out.
14451         (tui_init): Rename to ...
14452         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14453         bool, return void and make extern.  Adjust.
14454         (tui_resume): Rename to ...
14455         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14456         return void and make extern.  Adjust.
14457         (tui_suspend): Rename to ...
14458         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14459         return void and make extern.  Adjust.
14460         (tui_ui_out): Rename to ...
14461         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14462         parameter, and make extern.  Adjust.
14463         (tui_exec): Rename to ...
14464         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14465         make extern.
14466         (tui_interp_procs): Delete.
14467         (tui_interp_factory): Use "new".
14468
14469 2017-02-02  Tom Tromey  <tom@tromey.com>
14470
14471         * rust-exp.y (ends_raw_string, space_then_number)
14472         (rust_identifier_start_p): Return bool.
14473         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14474         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14475         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14476         (rust_chartype_p): Return bool.
14477         (val_print_struct, rust_print_struct_def, rust_print_type):
14478         Update.
14479         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14480         Return bool.
14481
14482 2017-02-02  Tom Tromey  <tom@tromey.com>
14483
14484         * rust-lang.c: Reindent.
14485
14486 2017-02-02  Tom Tromey  <tom@tromey.com>
14487
14488         * rust-lang.h (rust_crate_for_block): Update.
14489         * rust-lang.c (rust_crate_for_block): Return std::string.
14490         (rust_get_disr_info): Use std:;string, not
14491         gdb::unique_xmalloc_ptr.
14492         * rust-exp.y (crate_name): Update.
14493
14494 2017-02-02  Pedro Alves  <palves@redhat.com>
14495
14496         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14497         field out of gdb_disassembler_test and make it static.
14498
14499 2017-02-02  Pedro Alves  <palves@redhat.com>
14500
14501         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14502         mi1_interp and mi_interp fields.
14503
14504 2017-02-02  Pedro Alves  <palves@redhat.com>
14505
14506         * cli/cli-interp.c (struct saved_output_files, saved_output):
14507         Moved from cli/cli-logging.c.
14508         (cli_set_logging): New function.
14509         (cli_interp_procs): Install cli_set_logging.
14510         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14511         Declare.
14512         * cli/cli-logging.c (struct saved_output_files, saved_output):
14513         Moved to cli/cli-interp.c.
14514         (pop_output_files): Don't save outputs here.
14515         (make_logging_output): New function.
14516         (handle_redirections): Don't build tee nor save previous outputs
14517         here.
14518         * interps.c (current_interp_set_logging): Change prototype.
14519         Assume there's always a set_logging_proc method installed.
14520         * interps.h (interp_set_logging_ftype): Change prototype.
14521         (current_interp_set_logging): Change prototype and adjust comment.
14522         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14523         use make_logging_output.
14524         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14525 2017-02-02  Pedro Alves  <palves@redhat.com>
14526
14527         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14528         from ...
14529         (set_logging_overwrite): ... here.
14530         (logging_no_redirect_file): Delete.
14531         (set_logging_redirect): Don't handle redirection on the fly.
14532         Instead warn that "logging off" / "logging on" is necessary.
14533         (pop_output_files): Delete references to logging_no_redirect_file.
14534         (show_logging_command): Always speak in terms of what will happen
14535         once logging is reenabled.
14536
14537 2017-02-02  Pedro Alves  <palves@redhat.com>
14538
14539         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14540
14541 2017-02-02  Pedro Alves  <palves@redhat.com>
14542
14543         * disasm.c (gdb_pretty_print_insn): Rename to ...
14544         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14545         Remove gdbarch parameter.  Adapt to clear the object's buffers
14546         instead of allocating new buffers, and to print using the object's
14547         gdb_disassembler instead of calling gdb_print_insn.
14548         (dump_insns): Use gdb_pretty_print_disassembler.
14549         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14550         (gdb_pretty_print_disassembler): New class.
14551         * record-btrace.c (btrace_insn_history): Use
14552         gdb_pretty_print_disassembler.
14553
14554 2017-02-02  Pedro Alves  <palves@redhat.com>
14555
14556         * ada-lang.c (type_as_string): Use string_file.
14557         * ada-valprint.c (ada_print_floating): Use string_file.
14558         * ada-varobj.c (ada_varobj_scalar_image)
14559         (ada_varobj_get_value_image): Use string_file.
14560         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14561         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14562         * breakpoint.c (update_inserted_breakpoint_locations)
14563         (insert_breakpoint_locations, reattach_breakpoints)
14564         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14565         (print_it_watchpoint): Use string_file.
14566         (save_breakpoints): Use stdio_file.
14567         * c-exp.y (oper): Use string_file.
14568         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14569         tee_file.
14570         (pop_output_files): Use delete.
14571         (handle_redirections): Use stdio_file and tee_file.
14572         * cli/cli-setshow.c (do_show_command): Use string_file.
14573         * compile/compile-c-support.c (c_compute_program): Use
14574         string_file.
14575         * compile/compile-c-symbols.c (generate_vla_size): Take a
14576         'string_file &' instead of a 'ui_file *'.
14577         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14578         of a 'ui_file *'.  Use string_file.
14579         (generate_c_for_variable_locations): Take a 'string_file &'
14580         instead of a 'ui_file *'.
14581         * compile/compile-internal.h (generate_c_for_for_one_variable):
14582         Take a 'string_file &' instead of a 'ui_file *'.
14583         * compile/compile-loc2c.c (push, pushf, unary, binary)
14584         (print_label, pushf_register_address, pushf_register)
14585         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14586         'ui_file *'.  Adjust.
14587         * compile/compile.c (compile_to_object): Use string_file.
14588         * compile/compile.h (compile_dwarf_expr_to_c)
14589         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14590         'ui_file *'.
14591         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14592         (replace_typedefs_qualified_name): Use string_file and
14593         obstack_copy0.
14594         * disasm.c (gdb_pretty_print_insn): Use string_file.
14595         (gdb_disassembly): Adjust reference the null_stream global.
14596         (do_ui_file_delete): Delete.
14597         (gdb_insn_length): Use null_stream.
14598         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14599         * dwarf2loc.c (dwarf2_compile_property_to_c)
14600         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14601         'string_file &' instead of a 'ui_file *'.
14602         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14603         * dwarf2read.c (do_ui_file_peek_last): Delete.
14604         (dwarf2_compute_name): Use string_file.
14605         * event-top.c (gdb_setup_readline): Use stdio_file.
14606         * gdbarch.sh (verify_gdbarch): Use string_file.
14607         * gdbtypes.c (safe_parse_type): Use null_stream.
14608         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14609         string_file.
14610         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14611         'string_file *' instead of a 'ui_file *'.
14612         (gdbscm_arch_disassemble): Use string_file.
14613         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14614         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14615         inherits from ui_file.
14616         (ioscm_file_port_delete, ioscm_file_port_rewind)
14617         (ioscm_file_port_put): Delete.
14618         (ioscm_file_port_write): Rename to ...
14619         (ioscm_file_port::write): ... this.  Remove file_port_magic
14620         checks.
14621         (ioscm_file_port_new): Delete.
14622         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14623         ui_file_up.
14624         * guile/scm-type.c (tyscm_type_name): Use string_file.
14625         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14626         Use string_file.
14627         * infcmd.c (print_return_value_1): Use string_file.
14628         * infrun.c (print_target_wait_results): Use string_file.
14629         * language.c (add_language): Use string_file.
14630         * location.c (explicit_to_string_internal): Use string_file.
14631         * main.c (captured_main_1): Use null_file.
14632         * maint.c (maintenance_print_architecture): Use stdio_file.
14633         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14634         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14635         event_channel>: Change type to mi_console_file pointer.
14636         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14637         (mi_console_file_delete): Delete.
14638         (struct mi_console_file): Delete.
14639         (mi_console_file_magic): Delete.
14640         (mi_console_file_new): Delete.
14641         (mi_console_file::mi_console_file): New.
14642         (mi_console_file_delete): Delete.
14643         (mi_console_file_fputs): Delete.
14644         (mi_console_file::write): New.
14645         (mi_console_raw_packet): Delete.
14646         (mi_console_file::flush): New.
14647         (mi_console_file_flush): Delete.
14648         (mi_console_set_raw): Rename to ...
14649         (mi_console_file::set_raw): ... this.
14650         * mi/mi-console.h (class mi_console_file): New class.
14651         (mi_console_file_new, mi_console_set_raw): Delete.
14652         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14653         (mi_set_logging): Use delete and tee_file.  Adjust.
14654         * mi/mi-main.c (output_register): Use string_file.
14655         (mi_cmd_data_evaluate_expression): Use string_file.
14656         (mi_cmd_data_read_memory): Use string_file.
14657         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14658         * mi/mi-out.c (mi_ui_out::main_stream): New.
14659         (mi_ui_out::rewind): Use main_stream and
14660         string_file.
14661         (mi_ui_out::put): Use main_stream and string_file.
14662         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14663         Allocate a 'string_file' instead.
14664         (mi_out_new): Don't allocate a mem_fileopen stream here.
14665         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14666         (mi_ui_out::main_stream): Declare method.
14667         * printcmd.c (eval_command): Use string_file.
14668         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14669         * python/py-arch.c (archpy_disassemble): Use string_file.
14670         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14671         * python/py-frame.c (frapy_str): Use string_file.
14672         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14673         Use string_file.
14674         * python/py-type.c (typy_str): Use string_file.
14675         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14676         * python/py-value.c (valpy_str): Use string_file.
14677         * record-btrace.c (btrace_insn_history): Use string_file.
14678         * regcache.c (regcache_print): Use stdio_file.
14679         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14680         * remote.c (escape_buffer): Use string_file.
14681         * rust-lang.c (rust_get_disr_info): Use string_file.
14682         * serial.c (serial_open_ops_1): Use stdio_file.
14683         (do_serial_close): Use delete.
14684         * stack.c (print_frame_arg): Use string_file.
14685         (print_frame_args): Remove local mem_fileopen stream, not used.
14686         (print_frame): Use string_file.
14687         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14688         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14689         Take a 'string_file *' instead of a 'ui_file *'.
14690         * top.c (new_ui): Use stdio_file and stderr_file.
14691         (free_ui): Use delete.
14692         (execute_command_to_string): Use string_file.
14693         (quit_confirm): Use string_file.
14694         * tracepoint.c (collection_list::append_exp): Use string_file.
14695         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14696         * tui/tui-file.c: Don't include "ui-file.h".
14697         (enum streamtype, struct tui_stream): Delete.
14698         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14699         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14700         (tui_file::tui_file): New method.
14701         (tui_file_fputs): Delete.
14702         (tui_file_get_strbuf): Delete.
14703         (tui_file::puts): New method.
14704         (tui_file_adjust_strbuf): Delete.
14705         (tui_file_flush): Delete.
14706         (tui_file::flush): New method.
14707         * tui/tui-file.h: Tweak intro comment.
14708         Include ui-file.h.
14709         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14710         (tui_file_adjust_strbuf): Delete declarations.
14711         (class tui_file): New class.
14712         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14713         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14714         (tui_register_format): Use string_stream.
14715         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14716         (tui_get_function_from_frame): Use string_file.
14717         * typeprint.c (type_to_string): Use string_file.
14718         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14719         (null_stream): New global.
14720         (ui_file_delete): Delete.
14721         (ui_file::ui_file): New.
14722         (null_file_isatty): Delete.
14723         (ui_file::~ui_file): New.
14724         (null_file_rewind): Delete.
14725         (ui_file::printf): New.
14726         (null_file_put): Delete.
14727         (null_file_flush): Delete.
14728         (ui_file::putstr): New.
14729         (null_file_write): Delete.
14730         (ui_file::putstrn): New.
14731         (null_file_read): Delete.
14732         (ui_file::putc): New.
14733         (null_file_fputs): Delete.
14734         (null_file_write_async_safe): Delete.
14735         (ui_file::vprintf): New.
14736         (null_file_delete): Delete.
14737         (null_file::write): New.
14738         (null_file_fseek): Delete.
14739         (null_file::puts): New.
14740         (ui_file_data): Delete.
14741         (null_file::write_async_safe): New.
14742         (gdb_flush, ui_file_isatty): Adjust.
14743         (ui_file_put, ui_file_rewind): Delete.
14744         (ui_file_write): Adjust.
14745         (ui_file_write_for_put): Delete.
14746         (ui_file_write_async_safe, ui_file_read): Adjust.
14747         (ui_file_fseek): Delete.
14748         (fputs_unfiltered): Adjust.
14749         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14750         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14751         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14752         (set_ui_file_data): Delete.
14753         (string_file::~string_file, string_file::write)
14754         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14755         (do_ui_file_as_string, ui_file_as_string): Delete.
14756         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14757         (struct mem_file): Delete.
14758         (mem_file_new): Delete.
14759         (stdio_file::stdio_file): New.
14760         (mem_file_delete): Delete.
14761         (stdio_file::stdio_file): New.
14762         (mem_fileopen): Delete.
14763         (stdio_file::~stdio_file): New.
14764         (mem_file_rewind): Delete.
14765         (stdio_file::set_stream): New.
14766         (mem_file_put): Delete.
14767         (stdio_file::open): New.
14768         (mem_file_write): Delete.
14769         (stdio_file_magic, struct stdio_file): Delete.
14770         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14771         (stdio_file::flush): New.
14772         (stdio_file_read): Rename to ...
14773         (stdio_file::read): ... this.  Adjust.
14774         (stdio_file_write): Rename to ...
14775         (stdio_file::write): ... this.  Adjust.
14776         (stdio_file_write_async_safe): Rename to ...
14777         (stdio_file::write_async_safe) ... this.  Adjust.
14778         (stdio_file_fputs): Rename to ...
14779         (stdio_file::puts) ... this.  Adjust.
14780         (stdio_file_isatty): Delete.
14781         (stdio_file_fseek): Delete.
14782         (stdio_file::isatty): New.
14783         (stderr_file_write): Rename to ...
14784         (stderr_file::write) ... this.  Adjust.
14785         (stderr_file_fputs): Rename to ...
14786         (stderr_file::puts) ... this.  Adjust.
14787         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14788         (stderr_file::stderr_file): New.
14789         (tee_file_magic): Delete.
14790         (struct tee_file): Delete.
14791         (tee_file::tee_file): New.
14792         (tee_file_new): Delete.
14793         (tee_file::~tee_file): New.
14794         (tee_file_delete): Delete.
14795         (tee_file_flush): Rename to ...
14796         (tee_file::flush): ... this.  Adjust.
14797         (tee_file_write): Rename to ...
14798         (tee_file::write): ... this.  Adjust.
14799         (tee_file::write_async_safe): New.
14800         (tee_file_fputs): Rename to ...
14801         (tee_file::puts): ... this.  Adjust.
14802         (tee_file_isatty): Rename to ...
14803         (tee_file::isatty): ... this.  Adjust.
14804         * ui-file.h (struct obstack, struct ui_file): Don't
14805         forward-declare.
14806         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14807         (ui_file_write_ftype)
14808         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14809         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14810         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14811         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14812         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14813         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14814         (set_ui_file_fseek): Delete.
14815         (ui_file_data, ui_file_delete, ui_file_rewind)
14816         (struct ui_file): New.
14817         (ui_file_up): New.
14818         (class null_file): New.
14819         (null_stream): Declare.
14820         (ui_file_write_for_put, ui_file_put): Delete.
14821         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14822         Delete.
14823         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14824         (gdb_fopen, tee_file_new): Delete.
14825         (struct string_file): New.
14826         (struct stdio_file): New.
14827         (stdio_file_up): New.
14828         (struct stderr_file): New.
14829         (class tee_file): New.
14830         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14831         of a 'ui_file *'.  Adjust.
14832         * ui-out.h (class ui_out) <field_stream>: Likewise.
14833         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14834         (null_stream): Delete.
14835         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14836         Adjust.
14837         * utils.h (struct ui_file): Delete forward declaration..
14838         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14839         (error_stream): Take a 'string_file &' instead of a
14840         'ui_file *'.
14841         * varobj.c (varobj_value_get_print_value): Use string_file.
14842         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14843         * gdbarch.c: Regenerate.
14844
14845 2017-02-02  Pedro Alves  <palves@redhat.com>
14846
14847         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14848         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14849         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14850         Adjust to call gdb_print_insn instead of
14851         gdb_disassembler::print_insn.
14852         (dump_insns, do_mixed_source_and_assembly_deprecated)
14853         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14854         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14855         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14856         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14857         declaration.
14858         (gdb_pretty_print_insn): Re-add declaration.
14859         * record-btrace.c (btrace_insn_history): Don't allocate a
14860         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14861
14862 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14863
14864         * disasm.h (gdb_disassembly): Remove file_string parameter.
14865         * disasm.c (gdb_disassembly): Likewise.
14866         * cli/cli-cmds.c (print_disassembly): Adapt.
14867         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14868         * stack.c (do_gdb_disassembly): Likewise.
14869
14870 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14871
14872         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14873         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14874         targets.  And if the implicit value is longer than needed, extract
14875         the first bytes instead of the "least significant" ones.
14876
14877 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14878
14879         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14880         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14881         (btrace_fetch): Assert can_access_registers_ptid.
14882         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14883         validate_registers_access.
14884
14885 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14886
14887         * gdbthread.h (can_access_registers_ptid): New.
14888         * thread.c (can_access_registers_ptid): New.
14889
14890 2017-02-01  Pedro Alves  <palves@redhat.com>
14891
14892         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14893
14894 2017-01-31  Pedro Alves  <palves@redhat.com>
14895
14896         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14897         Fix typos.
14898
14899 2017-01-31  Pedro Alves  <palves@redhat.com>
14900
14901         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14902         not used.
14903
14904 2017-01-31  Pedro Alves  <palves@redhat.com>
14905
14906         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14907
14908 2017-01-31  Pedro Alves  <palves@redhat.com>
14909
14910         * common/scoped_restore.h
14911         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14912         change the value's parameter type to T2.
14913         (make_scoped_restore): Likewise.
14914
14915 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14916             Richard Henderson  <rth@redhat.com>
14917
14918         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14919         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14920         GS_BASE for older kernels.
14921         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14922         GS_BASE for older kernels.
14923         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14924         and GS_BASE to the offset table.
14925         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14926         system register group.
14927         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14928         for older kernels.
14929         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14930         amd64 ABI.
14931         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14932         AMD64_GSBASE_REGNUM.
14933         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14934         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14935         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14936         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14937         i386/64bit-segments.xml in those rules.
14938         * features/i386/64bit-segments.xml: New file.
14939         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14940         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14941         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14942         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14943         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14944         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14945         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14946         * features/i386/amd64-avx-linux.c: Regenerated.
14947         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14948         * features/i386/amd64-avx-mpx.c: Regenerated.
14949         * features/i386/amd64-avx512-linux.c: Regenerated.
14950         * features/i386/amd64-linux.c: Regenerated.
14951         * features/i386/amd64-mpx-linux.c: Regenerated.
14952         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14953         * features/i386/i386-avx-mpx.c: Regenerated.
14954         * features/i386/x32-avx-linux.c: Regenerated.
14955         * features/i386/x32-avx512-linux.c: Regenerated.
14956         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14957         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14958         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14959         * regformats/i386/amd64-linux.dat: Regenerated.
14960         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14961         * regformats/i386/x32-avx-linux.dat: Regenerated.
14962         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14963         * regformats/i386/x32-linux.dat: Regenerated.
14964
14965 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14966
14967         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14968         Set to AMD64_NUM_REGS.
14969
14970 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14971
14972         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14973         that checks validity of a register number.
14974
14975 2017-01-27  Kees Cook  <keescook@google.com>
14976
14977         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14978         fetch_fpregs if target has fpa registers.
14979         (arm_linux_store_inferior_registers): Call store_fpregs if target
14980         has fpa registers.
14981
14982 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14983
14984         * cris-tdep.c (cris_gdbarch_init): Remove check for
14985         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14986
14987 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14988
14989         * corelow.c (get_core_register_section): Check for regset
14990         existence before checking for REGSET_VARIABLE_SIZE.
14991
14992 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14993             Pedro Alves  <palves@redhat.com>
14994
14995         PR gdb/20939
14996         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14997         call memory_error, save memaddr instead.
14998         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14999         negative, cal memory_error.
15000         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15001
15002 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15003
15004         * disasm-selftests.c (memory_error_test): New function.
15005         (_initialize_disasm_selftests): Register memory_error_test.
15006
15007 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15008
15009         * Makefile.in (SFILES): Add disasm-selftests.c and
15010         selftest-arch.c.
15011         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15012         * disasm-selftests.c: New file.
15013         * selftest-arch.c: New file.
15014         * selftest-arch.h: New file.
15015
15016 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15017
15018         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15019         to bfd_arch_mep.  Don't return 0 if section is not
15020         found.  Call print_insn_mep.
15021
15022 2017-01-26  Pedro Alves  <palves@redhat.com>
15023             Yao Qi  <yao.qi@linaro.org>
15024
15025         * arm-tdep.c: Include "disasm.h".
15026         (gdb_print_insn_arm): Update code to get gdbarch.
15027         * disasm.c (dis_asm_read_memory): Change it to
15028         gdb_disassembler::dis_asm_read_memory.
15029         (dis_asm_memory_error): Likewise.
15030         (dis_asm_print_address): Likewise.
15031         (gdb_pretty_print_insn): Change it to
15032         gdb_disassembler::pretty_print_insn.
15033         (dump_insns): Add one argument gdb_disassemlber.  All
15034         callers updated.
15035         (do_mixed_source_and_assembly_deprecated): Likewise.
15036         (do_mixed_source_and_assembly): Likewise.
15037         (do_assembly_only): Likewise.
15038         (gdb_disassembler::gdb_disassembler): New.
15039         (gdb_disassembler::print_insn): New.
15040         * disasm.h (class gdb_disassembler): New.
15041         (gdb_pretty_print_insn): Remove declaration.
15042         (gdb_disassemble_info): Likewise.
15043         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15044         (gdbscm_disasm_read_memory_worker): Update.
15045         (gdbscm_disasm_read_memory): Update.
15046         (gdbscm_disasm_memory_error): Remove.
15047         (gdbscm_disasm_print_address): Remove.
15048         (gdbscm_disassembler::gdbscm_disassembler): New.
15049         (gdbscm_print_insn_from_port): Update.
15050         * mips-tdep.c: Include disasm.h.
15051         (gdb_print_insn_mips): Update code to get gdbarch.
15052         * record-btrace.c (btrace_insn_history): Update.
15053         * spu-tdep.c: Include disasm.h.
15054         (struct spu_dis_asm_data): Remove.
15055         (struct spu_dis_asm_info): New.
15056         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15057         SPU id.
15058         (gdb_print_insn_spu): Cast disassemble_info to
15059         spu_dis_asm_info.
15060
15061 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15062
15063         * disasm.c (do_ui_file_delete): Delete.
15064         (gdb_insn_length): Move code creating stream to ...
15065         * utils.c (null_stream): ... here.  New function.
15066         * utils.h (null_stream): Declare.
15067
15068 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15069
15070         * python/py-inferior.c (find_thread_object): Return directly
15071         from the loop.  Remove "found" variable.
15072
15073 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15074
15075         GDB 7.12.1 released.
15076
15077 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15078
15079         * python/py-function.c (fnpy_call): Reorder declarations to have
15080         the gdbpy_enter object declared first.
15081         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15082
15083 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15084
15085         PR python/21068
15086         * python/python-internal.h (PyMem_RawMalloc): Define for
15087         Python < 3.4.
15088         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15089         PyMem_RawMalloc instead of PyMem_Malloc.
15090
15091 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15092             Luis Machado  <lgustavo@codesourcery.com>
15093
15094         * NEWS (New commands): Mention flash-erase.
15095         (New MI commands): Mention target-flash-erase.
15096         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15097         command.
15098         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15099         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15100         * target.c (flash_erase_command): New function.
15101         (initialize_targets): Add new flash-erase command.
15102         * target.h (flash_erase_command): New declaration.
15103
15104 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15105
15106         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15107         HAVE_SYS_PROCFS_H is defined.
15108
15109 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15110
15111         * remote.c (struct cached_reg): Change data into a pointer.
15112         * (stop_reply_dtr): Free data pointers before deleting vector.
15113         (process_stop_reply): Likewise.
15114         (remote_parse_stop_reply): Allocate space for data
15115
15116 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15117
15118         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15119         MAX_REGISTER_SIZE.
15120         (amd64_pseudo_register_read_value): Likewise.
15121         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15122         (store_register_using_P): Likewise.
15123         * regcache.c (regcache_xfer_part): Likewise.
15124
15125 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15126
15127         Split real and pseudo registers.
15128         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15129         (sparc32_pseudo_regnum): New enum.
15130         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15131         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15132         (SPARC32_CP0_REGISTERS): New macro.
15133         (sparc32_pseudo_register_name): New function.
15134         (sparc32_register_name): Use sparc32_pseudo_register_name.
15135         (sparc32_pseudo_register_type): New function.
15136         (sparc32_register_type): Use sparc32_pseudo_register_type.
15137         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15138         pseudo register numbers.
15139         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15140         (SPARC64_CP0_REGISTERS): New macro.
15141         (sparc64_pseudo_register_name): New function.
15142         (sparc64_register_name): Use sparc64_pseudo_register_name.
15143         (sparc64_pseudo_register_type): New function.
15144         (sparc64_register_type): Use sparc64_pseudo_register_type.
15145         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15146         pseudo register numbers.
15147         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15148         sparc64_store_arguments): Handle pseudo register numbers.
15149
15150 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15151
15152         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15153         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15154         output.
15155         (getpkt_or_notif_sane_1): Likewise.
15156
15157 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15158
15159         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15160         of CC.  Pass "-x c++-header" instead of "-x c".
15161
15162 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15163
15164         * remote.c (remote_can_async_p): Update comment.
15165
15166 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15167
15168         * linux-nat.c (linux_nat_can_async_p): Update comment.
15169
15170 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15171
15172         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15173
15174 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15175
15176         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15177
15178 2017-01-10  Tom Tromey  <tom@tromey.com>
15179
15180         * python/py-type.c (typy_legacy_template_argument): Update.
15181         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15182         ~demangle_parse_info): Declare new members.
15183         (cp_demangled_name_to_comp): Return unique_ptr.
15184         (cp_demangled_name_parse_free)
15185         (make_cleanup_cp_demangled_name_parse_free)
15186         (cp_new_demangle_parse_info): Remove.
15187         * cp-support.c (do_demangled_name_parse_free_cleanup)
15188         (make_cleanup_cp_demangled_name_parse_free): Remove.
15189         (inspect_type, cp_canonicalize_string_full)
15190         (cp_canonicalize_string): Update.
15191         (mangled_name_to_comp): Change return type.
15192         (cp_class_name_from_physname, method_name_from_physname)
15193         (cp_func_name, cp_remove_params): Update.
15194         * cp-name-parser.y (demangle_parse_info): New constructor, from
15195         cp_new_demangle_parse_info.
15196         (~demangle_parse_info): New destructor, from
15197         cp_demangled_name_parse_free.
15198         (cp_merge_demangle_parse_infos): Update.
15199         (cp_demangled_name_to_comp): Change return type.
15200
15201 2017-01-10  Tom Tromey  <tom@tromey.com>
15202
15203         * top.c (prevent_dont_repeat): Change return type.
15204         * python/python.c (execute_gdb_command): Use std::string.
15205         Update.
15206         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15207         * command.h (prevent_dont_repeat): Change return type.
15208         * breakpoint.c (bpstat_do_actions_1): Update.
15209
15210 2017-01-10  Tom Tromey  <tom@tromey.com>
15211
15212         * value.h (scoped_value_mark::~scoped_value_mark): Call
15213         free_to_mark.
15214         (scoped_value_mark::free_to_mark): New method.
15215         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15216         scoped_value_mark.
15217
15218 2017-01-10  Tom Tromey  <tom@tromey.com>
15219
15220         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15221         (valpy_reference_value, valpy_const_value, valpy_get_address)
15222         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15223         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15224         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15225         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15226         scoped_value_mark.
15227         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15228         * value.h (scoped_value_mark): New class.
15229
15230 2017-01-10  Tom Tromey  <tom@tromey.com>
15231
15232         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15233         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15234         * psymtab.c (discard_psymtabs_upto): Remove.
15235         (make_cleanup_discard_psymtabs): Remove.
15236         (struct psymtab_state): Remove.
15237
15238 2017-01-10  Tom Tromey  <tom@tromey.com>
15239
15240         * record-full.c (record_full_save_cleanups): Remove.
15241         (record_full_save): Use gdb::unlinker.
15242         * gcore.c (do_bfd_delete_cleanup): Remove.
15243         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15244         cleanups.
15245         * dwarf2read.c (unlink_if_set): Remove.
15246         (write_psymtabs_to_index): Use gdb::unlinker.
15247         * common/gdb_unlinker.h: New file.
15248
15249 2017-01-10  Tom Tromey  <tom@tromey.com>
15250
15251         * windows-tdep.c (windows_xfer_shared_library): Update.
15252         * windows-nat.c (windows_make_so): Update.
15253         * utils.h (make_cleanup_bfd_unref): Remove.
15254         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15255         * symfile.h (symfile_bfd_open)
15256         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15257         * symfile.c (read_symbols, symbol_file_add)
15258         (separate_debug_file_exists): Update.
15259         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15260         (generic_load, reread_symbols): Update.
15261         * symfile-mem.c (symbol_file_add_from_memory): Update.
15262         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15263         (spu_symbol_file_add_from_memory): Update.
15264         * solist.h (struct target_so_ops) <bfd_open>: Return
15265         gdb_bfd_ref_ptr.
15266         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15267         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15268         gdb_bfd_ref_ptr.
15269         (solib_map_sections, reload_shared_libraries_1): Update.
15270         * solib-svr4.c (enable_break): Update.
15271         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15272         * solib-frv.c (enable_break2): Update.
15273         * solib-dsbt.c (enable_break): Update.
15274         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15275         gdb_bfd_ref_ptr.
15276         (darwin_solib_get_all_image_info_addr_at_init): Update.
15277         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15278         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15279         * record-full.c (record_full_save): Update.
15280         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15281         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15282         * minidebug.c (find_separate_debug_file_in_section): Return
15283         gdb_bfd_ref_ptr.
15284         * machoread.c (macho_add_oso_symfile): Change abfd to
15285         gdb_bfd_ref_ptr.
15286         (macho_symfile_read_all_oso): Update.
15287         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15288         (macho_symfile_read): Update.
15289         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15290         (jit_bfd_try_read_symtab): Update.
15291         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15292         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15293         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15294         gdb_bfd_ref_ptr.
15295         (gdb_bfd_ref_policy): New struct.
15296         (gdb_bfd_ref_ptr): New typedef.
15297         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15298         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15299         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15300         gdb_bfd_ref_ptr.
15301         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15302         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15303         (gcore_command): Update.
15304         * exec.c (exec_file_attach): Update.
15305         * elfread.c (elf_symfile_read): Update.
15306         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15307         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15308         (open_and_init_dwo_file): Update.
15309         (open_dwp_file): Return gdb_bfd_ref_ptr.
15310         (open_and_init_dwp_file): Update.
15311         * corelow.c (core_open): Update.
15312         * compile/compile-object-load.c (compile_object_load): Update.
15313         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15314         * coffread.c (coff_symfile_read): Update.
15315         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15316         gdb_bfd_ref_ptr.  Rename.
15317         (dump_bfd_file, restore_command): Update.
15318         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15319         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15320         (find_separate_debug_file_by_buildid): Update.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * common/gdb_ref_ptr.h: New file.
15325         * python/py-ref.h (struct gdbpy_ref_policy): New.
15326         (gdbpy_ref): Now a typedef.
15327
15328 2017-01-10  Tom Tromey  <tom@tromey.com>
15329
15330         * utils.h (make_cleanup_htab_delete): Don't declare.
15331         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15332         Remove.
15333         * linespec.c (decode_compound_collector): Add constructor,
15334         destructor.
15335         (lookup_prefix_sym): Remove cleanup.
15336         (symtab_collector): Add constructor, destructor.
15337         (collect_symtabs_from_filename): Remove cleanup.
15338         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15339         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15340         Use htab_up.
15341         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15342         * dwarf2read.c (dw2_expand_symtabs_matching)
15343         (dw2_map_symbol_filenames, dwarf_decode_macros)
15344         (write_psymtabs_to_index): Use htab_up.
15345         * dwarf2loc.c (func_verify_no_selftailcall)
15346         (call_site_find_chain_1, func_verify_no_selftailcall)
15347         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15348         std::vector, gdb::unique_xmalloc_ptr.
15349         (call_sitep): Remove typedef.
15350         (dwarf2_locexpr_baton_eval): Remove unused variable.
15351
15352 2017-01-10  Tom Tromey  <tom@tromey.com>
15353
15354         * python/python-internal.h (make_cleanup_py_decref)
15355         (make_cleanup_py_xdecref): Don't declare.
15356         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15357         (py_xdecref, make_cleanup_py_xdecref): Remove.
15358
15359 2017-01-10  Tom Tromey  <tom@tromey.com>
15360
15361         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15362         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15367
15368 2017-01-10  Tom Tromey  <tom@tromey.com>
15369
15370         * python/py-utils.c (unicode_to_encoded_string)
15371         (python_string_to_target_string)
15372         (python_string_to_target_python_string)
15373         (python_string_to_host_string, gdbpy_obj_to_string)
15374         (get_addr_from_python): Use gdbpy_ref.
15375
15376 2017-01-10  Tom Tromey  <tom@tromey.com>
15377
15378         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15379         gdbpy_ref.
15380
15381 2017-01-10  Tom Tromey  <tom@tromey.com>
15382
15383         * python/python.c (eval_python_command, gdbpy_decode_line)
15384         (gdbpy_run_events, gdbpy_start_type_printers)
15385         (gdbpy_apply_type_printers): Use gdbpy_ref.
15386
15387 2017-01-10  Tom Tromey  <tom@tromey.com>
15388
15389         * python/py-param.c (get_doc_string, compute_enum_values): Use
15390         gdbpy_ref.
15391
15392 2017-01-10  Tom Tromey  <tom@tromey.com>
15393
15394         * python/py-inferior.c (find_thread_object, build_inferior_list):
15395         Use gdbpy_ref.
15396
15397 2017-01-10  Tom Tromey  <tom@tromey.com>
15398
15399         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15400
15401 2017-01-10  Tom Tromey  <tom@tromey.com>
15402
15403         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15404         gdbpy_ref.
15405
15406 2017-01-10  Tom Tromey  <tom@tromey.com>
15407
15408         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15409         extra incref.
15410         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15411         Use gdbpy_ref.
15412
15413 2017-01-10  Tom Tromey  <tom@tromey.com>
15414
15415         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15416         gdbpy_ref.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15421         decref results of PyArg_ParseTupleAndKeywords.
15422
15423 2017-01-10  Tom Tromey  <tom@tromey.com>
15424
15425         * python/python.c (python_run_simple_file): Use
15426         unique_xmalloc_ptr, gdbpy_ref.
15427
15428 2017-01-10  Tom Tromey  <tom@tromey.com>
15429
15430         * python/py-prettyprint.c (print_stack_unless_memory_error)
15431         (print_string_repr, print_children): Use gdbpy_ref.
15432         (dummy_python_frame): New class.
15433         (dummy_python_frame::dummy_python_frame): Rename from
15434         push_dummy_python_frame.
15435         (py_restore_tstate): Remove.
15436
15437 2017-01-10  Tom Tromey  <tom@tromey.com>
15438
15439         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/python.c (ensure_python_env, restore_python_env):
15444         Remove.
15445         * python/python-internal.h (ensure_python_env): Don't declare.
15446         * varobj.h (varobj_ensure_python_env): Don't declare.
15447         * varobj.c (varobj_ensure_python_env): Remove.
15448
15449 2017-01-10  Tom Tromey  <tom@tromey.com>
15450
15451         * varobj.c (varobj_value_get_print_value): Use
15452         gdbpy_enter_varobj.
15453
15454 2017-01-10  Tom Tromey  <tom@tromey.com>
15455
15456         * python/py-prettyprint.c (print_string_repr, print_children):
15457         Update.
15458         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15459         of "encoding".
15460         * varobj.c (varobj_value_get_print_value): Update.
15461         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15462
15463 2017-01-10  Tom Tromey  <tom@tromey.com>
15464
15465         * varobj.c (varobj_get_display_hint)
15466         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15467         (varobj_set_visualizer, free_variable): Use
15468         gdbpy_enter_varobj.
15469
15470 2017-01-10  Tom Tromey  <tom@tromey.com>
15471
15472         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15473         (do_finish_initialization): New function.  Use gdbpy_ref.
15474         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15475         do_finish_initialization.
15476
15477 2017-01-10  Tom Tromey  <tom@tromey.com>
15478
15479         * python/py-param.c (get_set_value, get_show_value): Use
15480         gdbpy_enter, gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15485
15486 2017-01-10  Tom Tromey  <tom@tromey.com>
15487
15488         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15489
15490 2017-01-10  Tom Tromey  <tom@tromey.com>
15491
15492         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15493         Use gdbpy_enter_varobj.
15494
15495 2017-01-10  Tom Tromey  <tom@tromey.com>
15496
15497         * varobj.c (gdbpy_enter_varobj): New constructor.
15498         * python/python-internal.h (gdbpy_enter_varobj): New class.
15499         * python/py-varobj.c (py_varobj_get_iterator): Use
15500         gdbpy_enter_varobj.
15501
15502 2017-01-10  Tom Tromey  <tom@tromey.com>
15503
15504         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15505         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15506         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15507         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15508         unique_xmalloc_ptr.
15509         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15510
15511 2017-01-10  Tom Tromey  <tom@tromey.com>
15512
15513         * python/py-xmethods.c (invoke_match_method): Use
15514         gdbpy_ref.
15515
15516 2017-01-10  Tom Tromey  <tom@tromey.com>
15517
15518         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15519         gdbpy_enter, gdbpy_ref.
15520
15521 2017-01-10  Tom Tromey  <tom@tromey.com>
15522
15523         * python/python.c (python_interactive_command): Use gdbpy_enter.
15524
15525 2017-01-10  Tom Tromey  <tom@tromey.com>
15526
15527         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15528         gdbpy_ref.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15533         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15534
15535 2017-01-10  Tom Tromey  <tom@tromey.com>
15536
15537         * utils.h (htab_deleter): New struct.
15538         (htab_up): New typedef.
15539         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15540         gdbpy_enter, gdbpy_ref, htab_up.
15541
15542 2017-01-10  Tom Tromey  <tom@tromey.com>
15543
15544         * python/py-unwind.c (pending_frame_invalidate): Remove.
15545         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15546
15547 2017-01-10  Tom Tromey  <tom@tromey.com>
15548
15549         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15550         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15551
15552 2017-01-10  Tom Tromey  <tom@tromey.com>
15553
15554         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15555
15556 2017-01-10  Tom Tromey  <tom@tromey.com>
15557
15558         * python/python.c (gdbpy_eval_from_control_command)
15559         (gdbpy_source_script, gdbpy_run_events)
15560         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15561         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15562         gdbpy_enter.
15563
15564 2017-01-10  Tom Tromey  <tom@tromey.com>
15565
15566         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15567
15568 2017-01-10  Tom Tromey  <tom@tromey.com>
15569
15570         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15571
15572 2017-01-10  Tom Tromey  <tom@tromey.com>
15573
15574         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15575         (python_on_inferior_call_pre, python_on_inferior_call_post)
15576         (python_on_memory_change, python_on_register_change)
15577         (python_inferior_exit, python_new_objfile, add_thread_object)
15578         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15579
15580 2017-01-10  Tom Tromey  <tom@tromey.com>
15581
15582         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15583         (bpfinishpy_handle_exit): Use gdbpy_enter.
15584
15585 2017-01-10  Tom Tromey  <tom@tromey.com>
15586
15587         * python/py-cmd.c (cmdpy_destroyer)
15588         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15589         gdbpy_enter.
15590
15591 2017-01-10  Tom Tromey  <tom@tromey.com>
15592
15593         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15594         gdbpy_enter.
15595         (gdbpy_breakpoint_has_cond): Likewise.
15596
15597 2017-01-10  Tom Tromey  <tom@tromey.com>
15598
15599         * python/python.c (gdbpy_enter): New constructor.
15600         (~gdbpy_enter): New destructor.
15601         (restore_python_env, ensure_python_env): Rewrite.
15602         * python/python-internal.h (gdbpy_enter): New class.
15603
15604 2017-01-10  Tom Tromey  <tom@tromey.com>
15605
15606         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15607
15608 2017-01-10  Tom Tromey  <tom@tromey.com>
15609
15610         * python/py-value.c (value_has_field, get_field_flag)
15611         (get_field_type, valpy_getitem, convert_value_from_python): Use
15612         gdbpy_ref.
15613
15614 2017-01-10  Tom Tromey  <tom@tromey.com>
15615
15616         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15617         gdbpy_ref.
15618
15619 2017-01-10  Tom Tromey  <tom@tromey.com>
15620
15621         * python/py-prettyprint.c (search_pp_list)
15622         (find_pretty_printer_from_objfiles)
15623         (find_pretty_printer_from_progspace)
15624         (find_pretty_printer_from_gdb, find_pretty_printer)
15625         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15626         gdbpy_ref.
15627
15628 2017-01-10  Tom Tromey  <tom@tromey.com>
15629
15630         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15631
15632 2017-01-10  Tom Tromey  <tom@tromey.com>
15633
15634         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15635         (ltpy_get_all_source_lines): Use gdbpy_ref.
15636
15637 2017-01-10  Tom Tromey  <tom@tromey.com>
15638
15639         * python/py-framefilter.c (extract_sym, extract_value)
15640         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15641         gdbpy_ref.
15642
15643 2017-01-10  Tom Tromey  <tom@tromey.com>
15644
15645         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15646
15647 2017-01-10  Tom Tromey  <tom@tromey.com>
15648
15649         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15650
15651 2017-01-10  Tom Tromey  <tom@tromey.com>
15652
15653         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15654         gdbpy_ref.
15655
15656 2017-01-10  Tom Tromey  <tom@tromey.com>
15657
15658         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15659
15660 2017-01-10  Tom Tromey  <tom@tromey.com>
15661
15662         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15663         (typy_range): Use gdbpy_ref.
15664
15665 2017-01-10  Tom Tromey  <tom@tromey.com>
15666
15667         * python/py-threadevent.c (create_thread_event_object): Use
15668         gdbpy_ref.
15669         * python/py-stopevent.c (create_stop_event_object): Simplify.
15670         (emit_stop_event): Use gdbpy_ref.
15671         * python/py-signalevent.c (create_signal_event_object): Use
15672         gdbpy_ref.
15673         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15674         (emit_new_objfile_event, create_clear_objfiles_event_object)
15675         (emit_clear_objfiles_event): Use gdbpy_ref.
15676         * python/py-infevents.c (create_inferior_call_event_object)
15677         (create_register_changed_event_object)
15678         (create_memory_changed_event_object, emit_inferior_call_event)
15679         (emit_memory_changed_event, emit_register_changed_event): Use
15680         gdbpy_ref.
15681         * python/py-exitedevent.c (create_exited_event_object)
15682         (emit_exited_event): Use gdbpy_ref.
15683         * python/py-event.h (evpy_emit_event): Remove
15684         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15685         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15686         * python/py-continueevent.c (emit_continue_event): Use
15687         gdbpy_ref.
15688         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15689         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15690         gdbpy_ref.
15691         * python/py-bpevent.c (create_breakpoint_event_object): Use
15692         gdbpy_ref.
15693
15694 2017-01-10  Tom Tromey  <tom@tromey.com>
15695
15696         * python/py-ref.h: New file.
15697
15698 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15699
15700         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15701         void.
15702         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15703         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15704         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15705         * ui-out.c (ui_out::redirect): Likewise.
15706         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15707         * cli/cli-logging.c (set_logging_redirect): Update call site of
15708         ui_out::redirect.
15709         (handle_redirections): Likewise.
15710         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15711         * top.c (execute_command_to_string): Likewise.
15712         * utils.c (do_ui_out_redirect_pop): Likewise.
15713
15714 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15715
15716         * stack.c (_initialize_stack): Update "frame" command help message.
15717
15718 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15719
15720         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15721
15722 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15723
15724         * x86-linux-nat.h: Include gdb_proc_service.h.
15725
15726 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15727
15728         * ser-base.h: Include serial.h.
15729
15730 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15731
15732         * ppc-linux-tdep.h: Include ppc-tdep.h.
15733
15734 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15735
15736         * nat/amd64-linux-siginfo.h: Include signal.h.
15737
15738 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15739
15740         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15741
15742 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15743
15744         * mi/mi-parse.h: Include mi-cmds.h.
15745
15746 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15747
15748         * inf-loop.c: Don't include "target.h".
15749         * inf-loop.h: Include it here.
15750
15751 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15752
15753         * dfp.h: Include "dboulest.h" and "expression.h".
15754
15755 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15756
15757         * ax-gdb.h: Include "ax.h".
15758
15759 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15760
15761         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15762         with nat/gdb_ptrace.h.
15763
15764 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15765
15766         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15767         new line.
15768         (mips64_fbsd_sigframe_init): Likewise.
15769
15770 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15771
15772         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15773         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15774
15775 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15776
15777         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15778         * NEWS: Mention new FreeBSD/mips native configuration.
15779         * config/mips/fbsd.mh: New file.
15780         * configure.host: Add mips*-*-freebsd*.
15781         * mips-fbsd-nat.c: New file.
15782
15783 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15784
15785         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15786         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15787         * NEWS: Mention new FreeBSD/mips target.
15788         * configure.tgt: Add mips*-*-freebsd*.
15789         * mips-fbsd-tdep.c: New file.
15790         * mips-fbsd-tdep.h: New file.
15791
15792 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15793
15794         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15795         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15796
15797 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15798
15799         Update copyright year range in all GDB files.
15800
15801 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15802
15803         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15804
15805 For older changes see ChangeLog-2016.
15806 \f
15807 Local Variables:
15808 mode: change-log
15809 left-margin: 8
15810 fill-column: 74
15811 version-control: never
15812 coding: utf-8
15813 End: