Fix mapped_index::find_name_components_bounds upper bound computation
[external/binutils.git] / gdb / ChangeLog
1 2017-11-21  Pedro Alves  <palves@redhat.com>
2
3         * dwarf2read.c (mapped_index::find_name_components_bounds)
4         <completion mode, upper bound>: Use std::lower_bound instead of
5         std::upper_bound.
6         (test_mapped_index_find_name_component_bounds): Remove incorrect
7         "t1_fund" from expected symbols.
8
9 2017-11-21  Pedro Alves  <palves@redhat.com>
10
11         * dwarf2read.c (mapped_index::name_components_casing): New field.
12         (mapped_index) <build_name_components,
13         find_name_components_bounds): Declare new methods.
14         (mapped_index::find_name_components_bounds)
15         (mapped_index::build_name_components): New methods, factored out
16         from dw2_expand_symtabs_matching_symbol.
17         (check_find_bounds_finds)
18         (test_mapped_index_find_name_component_bounds): New.
19         (run_test): Rename to ...
20         (test_dw2_expand_symtabs_matching_symbol): ... this.
21         (run_test): Reimplement.
22
23 2017-11-21  Pedro Alves  <palves@redhat.com>
24
25         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
26         (symbol_end): Use cp_ident_is_alnum.
27         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
28         * dwarf2read.c (make_sort_after_prefix_name): New function.
29         (dw2_expand_symtabs_matching_symbol): Use it.
30         (test_symbols): Add more symbols.
31         (run_test): Add tests.
32
33 2017-11-17  Tom Tromey  <tom@tromey.com>
34
35         * symtab.h (enum symbol_subclass_kind): New.
36         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
37         Remove.
38         <subclass>: New member.
39         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
40         * rust-lang.c (rust_get_trait_object_pointer): Update.
41         * dwarf2read.c (read_func_scope): Update.
42         (read_variable): Update.
43
44 2017-11-17  Tom Tromey  <tom@tromey.com>
45
46         * dwarf2read.c (read_func_scope): Update.
47         * symtab.h (struct template_symbol): Derive from symbol.
48         <base>: Remove.
49
50 2017-11-17  Tom Tromey  <tom@tromey.com>
51
52         * symtab.h (struct symbol) <is_rust_vtable>: New member.
53         (struct rust_vtable_symbol): New.
54         (find_symbol_at_address): Declare.
55         * symtab.c (find_symbol_at_address): New function.
56         * symfile.h (struct quick_symbol_functions)
57         <find_compunit_symtab_by_address>: New member.
58         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
59         function.
60         (debug_sym_quick_functions): Link to
61         debug_qf_find_compunit_symtab_by_address.
62         * rust-lang.c (rust_get_trait_object_pointer): New function.
63         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
64         rust_get_trait_object_pointer.
65         * psymtab.c (psym_relocate): Clear psymbol_map.
66         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
67         functions.
68         (psym_functions): Link to psym_find_compunit_symtab_by_address.
69         * objfiles.h (struct objfile) <psymbol_map>: New member.
70         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
71         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
72         (rust_containing_type, read_variable): New functions.
73
74 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
75
76         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
77
78 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
79
80         * common/filestuff.c: Include <algorithm>.
81         (open_fds): Change type to std::vector<int>.
82         (do_mark_open_fd): Adjust.
83         (unmark_fd_no_cloexec): Adjust.
84         (do_close): Adjust.
85
86 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
87
88         * breakpoint.c (output_thread_groups): Take an std::vector.
89         (print_one_breakpoint_location): Adjust.
90
91 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
92
93         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
94         (ada_evaluate_subexp_for_cast): New function.
95         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
96         ada_evaluate_subexp_for_cast.
97         (ada_evaluate_subexp) <nosideret>: Replace code by call to
98         eval_skip_value.
99         * eval.c (evaluate_var_value): Make non-static.
100         (evaluate_var_msym_value, eval_skip_value): Likewise.
101         * value.h (evaluate_var_value, evaluate_var_msym_value)
102         (eval_skip_value): Declare.
103
104 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
105
106         * ada-lang.c (ada_value_cast): Remove parameter "noside".
107         Update all callers.
108
109 2017-11-16  Pedro Alves  <palves@redhat.com>
110
111         * python/py-unwind.c (pyuw_sniffer): Translate
112         PyExc_KeyboardInterrupt to a GDB Quit exception.
113
114 2017-11-16  Pedro Alves  <palves@redhat.com>
115
116         * infrun.c (resume_cleanups): Delete.
117         (resume): No longer install a resume_cleanups cleanup nor call
118         QUIT.
119         (proceed): Pass the terminal to the inferior.
120         (keep_going_pass_signal): No longer install a resume_cleanups
121         cleanup.
122
123 2017-11-16  Pedro Alves  <palves@redhat.com>
124
125         * inf-loop.c (inferior_event_handler): Don't swallow the exception
126         if the prompt is blocked.
127
128 2017-11-16  Pedro Alves  <palves@redhat.com>
129
130         * breakpoint.c (insert_bp_location): Replace bp_err and
131         bp_err_message locals by a gdb_exception local.
132
133 2017-11-16  Pedro Alves  <palves@redhat.com>
134
135         * inflow.c (scoped_ignore_sigttou): New class.
136         (child_terminal_ours_1, new_tty): Use it.
137
138 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
139
140         * target-float.c (decimal_from_number): Add byte_order argument and
141         call match_endianness.  Error if unknown floating-point type.
142         (decimal_to_number): Add byte_order argument and call match_endianness.
143         (decimal_from_longest): Update call.  Do not call match_endianness.
144         (decimal_from_ulongest): Likewise.
145         (decimal_binop): Likewise.
146         (decimal_is_zero): Likewise.
147         (decimal_compare): Likewise.
148         (decimal_convert): Likewise.
149
150 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
151
152         * python/python.c (gdbpy_rbreak): New function.
153         * NEWS: Document Python rbreak feature.
154
155 2017-11-16  Yao Qi  <yao.qi@linaro.org>
156
157         * features/tic6x-c62x.xml: Remove.
158         * features/tic6x-c64x.xml: Remove.
159         * features/tic6x-c64xp.xml: Remove.
160
161 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
162
163         * symtab.h: Include <array>.
164
165 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
166
167         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
168         (bsd_kvm_proc_cmd): Likewise.
169
170 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
171
172         * tui/tui-win.c (window_name_completer): Replace VEC with
173         std::vector.
174
175 2017-11-15  Andrew Cagney  <cagney@gnu.org>
176
177         * MAINTAINERS: Remove no-longer applicable entries.
178
179 2017-11-15  Andrew Cagney  <cagney@gnu.org>
180
181         * MAINTAINERS: Move self to Past Maintainers.
182
183 2017-11-15  Yao Qi  <yao.qi@linaro.org>
184
185         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
186         * features/nios2-linux.c: Remove.
187         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
188         initialize_tdesc_nios2_linux.
189
190 2017-11-15  Yao Qi  <yao.qi@linaro.org>
191
192         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
193         M68HC11_LAST_HARD_REG + 1.
194
195 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
196
197         PR gdb/22388
198         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
199         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
200         Return TARGET_XFER_EOF if size of returned data is 0.
201
202 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
203
204         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
205         memory-map-selftests.c.
206         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
207         * memory-map.c (memory_map_start_memory): Fix computation of hi
208         address.
209         * unittests/memory-map-selftests.c: New file.
210
211 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
212
213         * ada-lang.c: Fix some typos in the general command documenting
214         how Ada expressions are being evaluated and how their result
215         is printed.
216
217 2017-11-09  Tom Tromey  <tom@tromey.com>
218
219         * psymtab.c (psymbol_hash): Do not hash string contents.
220         (psymbol_compare): Add comment.
221
222 2017-11-09  Tom Tromey  <tom@tromey.com>
223
224         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
225
226 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
227
228         * ada-exp.y (write_var_from_sym): Remove parameter
229         "orig_left_context".  Update all callers.
230
231 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
232
233         * tracepoint.h (class collection_list) <stringify>: Return
234         std::vector<std::string>.
235         (encode_actions_rsp): Change parameters to
236         std::vector<std::string> *.
237         * tracepoint.c (collection_list::stringify): Return
238         std::vector<std::string> and adjust accordingly.
239         (encode_actions_rsp): Changee parameters to
240         std::vector<std::string> and adjust accordingly.
241         * remote.c (free_actions_list),
242         free_actions_list_cleanup_wrapper): Remove.
243         (remote_download_tracepoint): Adjust to std::vector.
244
245 2017-11-08  Tom Tromey  <tom@tromey.com>
246
247         * dwarf2read.c (symbolp): Remove typedef.
248         (read_func_scope): Use std::vector.
249         (process_structure_scope): Use std::vector.
250
251 2017-11-08  Pedro Alves  <palves@redhat.com>
252
253         * ada-lang.c (ada_make_symbol_completion_list): Use
254         completion_skip_symbol.
255         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
256         (symbol_is_function_or_method(symbol*)): New.
257         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
258         completion_skip_symbol.
259         (default_collect_symbol_completion_matches_break_on): Use
260         completion_skip_symbol.  Pass down mode.
261         (collect_file_symbol_completion_matches): Pass down mode.
262         * symtab.h (symbol_is_function_or_method): New declarations.
263         (completion_skip_symbol): New template function.
264
265 2017-11-08  Pedro Alves  <palves@redhat.com>
266
267         * linespec.c (iterate_over_all_matching_symtabs): Add
268         search_domain parameter.  Pass it down to expand_symtabs_matching.
269         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
270         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
271         search_domain.
272         (add_all_symbol_names_from_pspace): Add search_domain parameter.
273         Pass it down.
274         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
275         symbols.
276         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
277         it down.
278
279 2017-11-08  Pedro Alves  <palves@redhat.com>
280
281         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
282         text_len locals and don't pass them down.
283         * symtab.c (completion_list_add_name): Remove
284         sym_text/sym_text_len parameters and adjust.
285         (completion_list_add_symbol, completion_list_add_msymbol)
286         (completion_list_objc_symbol, completion_list_add_fields)
287         (add_symtab_completions): Likewise.
288         (default_collect_symbol_completion_matches_break_on)
289         (collect_file_symbol_completion_matches): Remove sym_text_len
290         local and don't pass it down.
291         * symtab.h (completion_list_add_name): Remove
292         sym_text/sym_text_len parameters.
293
294 2017-11-08  Pedro Alves  <palves@redhat.com>
295
296         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
297         unittests/lookup_name_info-selftests.c.
298         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
299         * cp-support.c: Include "selftest.h".
300         (cp_remove_params_1): Rename from cp_remove_params.  Add
301         'require_param' parameter, and handle it.
302         (cp_remove_params): Reimplement.
303         (cp_remove_params_if_any): New.
304         (selftests::quote): New.
305         (selftests::check_remove_params): New.
306         (selftests::test_cp_remove_params): New.
307         (_initialize_cp_support): Install
308         selftests::test_cp_remove_params.
309         * cp-support.h (cp_remove_params_if_any): Declare.
310         * dwarf2read.c :Include "selftest.h".
311         (dw2_expand_symtabs_matching_symbol): Use
312         lookup_name_info::make_ignore_params.
313         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
314         (selftests::dw2_expand_symtabs_matching::string_or_null)
315         (selftests::dw2_expand_symtabs_matching::check_match)
316         (selftests::dw2_expand_symtabs_matching::test_symbols)
317         (selftests::dw2_expand_symtabs_matching::run_test): New.
318         (_initialize_dwarf2_read): Register
319         selftests::dw2_expand_symtabs_matching::run_test.
320         * psymtab.c (psym_expand_symtabs_matching): Use
321         lookup_name_info::make_ignore_params.
322         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
323         If the lookup name wants to ignore parameters, strip them.
324         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
325         code handling '('.
326         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
327         (default_collect_symbol_completion_matches_break_on): Don't try to
328         strip parameters.
329         * symtab.h (lookup_name_info::lookup_name_info): Add
330         'ignore_parameters' parameter.
331         (lookup_name_info::ignore_parameters)
332         (lookup_name_info::make_ignore_params): New methods.
333         (lookup_name_info::m_ignore_parameters): New field.
334         * unittests/lookup_name_info-selftests.c: New file.
335
336 2017-11-08  Pedro Alves  <palves@redhat.com>
337
338         * dwarf2read.c (dw2_expand_marked_cus)
339         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
340         (dw2_expand_symtabs_matching): Move further below.
341         (dw2_expand_marked_cus): Reindent.
342
343 2017-11-08  Pedro Alves  <palves@redhat.com>
344
345         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
346         (struct name_component): New.
347         (mapped_index::name_components): New field.
348         (mapped_index::symbol_name_at): New method.
349         (dwarf2_read_index): Call mapped_index ctor.
350         (dw2_map_matching_symbols): Add comment about name_components
351         table.
352         (dw2_expand_symtabs_matching): Factor part to...
353         (dw2_expand_symtabs_matching_symbol): ... this new function.
354         Build name components table, and lookup symbols in it before
355         calling the name matcher.
356         (dw2_expand_marked_cus): New, factored out from
357         dw2_expand_symtabs_matching.
358         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
359
360 2017-11-08   Pedro Alves  <palves@redhat.com>
361
362         * ada-lang.c (ada_encode): Rename to ..
363         (ada_encode_1): ... this.  Add throw_errors parameter and handle
364         it.
365         (ada_encode): Reimplement.
366         (match_name): Delete, folded into full_name.
367         (resolve_subexp): No longer pass the encoded name to
368         ada_lookup_symbol_list.
369         (should_use_wild_match): Delete.
370         (name_match_type_from_name): New.
371         (ada_lookup_simple_minsym): Use lookup_name_info and the
372         language's symbol_name_matcher_ftype.
373         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
374         (ada_add_block_renamings): Adjust to use lookup_name_info.
375         (ada_lookup_name): New.
376         (add_nonlocal_symbols, ada_add_all_symbols)
377         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
378         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
379         (ada_name_for_lookup): Delete.
380         (ada_lookup_encoded_symbol): Construct a verbatim name.
381         (wild_match): Reverse sense of return type.  Use bool.
382         (full_match): Reverse sense of return type.  Inline bits of old
383         match_name here.
384         (ada_add_block_symbols): Adjust to use lookup_name_info.
385         (symbol_completion_match): Delete, folded into...
386         (ada_lookup_name_info::matches): ... .this new method.
387         (symbol_completion_add): Delete.
388         (ada_collect_symbol_completion_matches): Add name_match_type
389         parameter.  Adjust to use lookup_name_info and
390         completion_list_add_name.
391         (get_var_value, ada_add_global_exceptions): Adjust to use
392         lookup_name_info.
393         (ada_get_symbol_name_cmp): Delete.
394         (do_wild_match, do_full_match): New functions.
395         (ada_lookup_name_info::ada_lookup_name_info): New method.
396         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
397         functions.
398         (ada_language_defn): Install ada_get_symbol_name_matcher.
399         * ada-lex.l (processId): If name starts with '<', copy it
400         verbatim.
401         * block.c (block_iter_match_step, block_iter_match_first)
402         (block_iter_match_next, block_lookup_symbol)
403         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
404         lookup_name_info.
405         * block.h (block_iter_match_first, block_iter_match_next)
406         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
407         * c-lang.c (c_language_defn, cplus_language_defn)
408         (asm_language_defn, minimal_language_defn): Adjust comments to
409         refer to la_get_symbol_name_matcher.
410         * completer.c (complete_files_symbols)
411         (collect_explicit_location_matches, symbol_completer): Pass a
412         symbol_name_match_type down.
413         * completer.h (class completion_match, completion_match_result):
414         New classes.
415         (completion_tracker::reset_completion_match_result): New method.
416         (completion_tracker::m_completion_match_result): New field.
417         * cp-support.c (make_symbol_overload_list_block): Adjust to use
418         lookup_name_info.
419         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
420         functions.
421         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
422         * d-lang.c: Adjust comments to refer to
423         la_get_symbol_name_matcher.
424         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
425         Adjust to use lookup_name_info.
426         (dict_iter_match_first, dict_iter_match_next)
427         (iter_match_first_hashed, iter_match_next_hashed)
428         (iter_match_first_linear, iter_match_next_linear): Adjust to work
429         with a lookup_name_info.
430         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
431         Likewise.
432         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
433         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
434         (gdb_index_symbol_name_matcher): New class.
435         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
436         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
437         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
438         with a symbol_name_match_type.
439         (f_language_defn): Adjust comments to refer to
440         la_get_symbol_name_matcher.
441         * go-lang.c (go_language_defn): Adjust comments to refer to
442         la_get_symbol_name_matcher.
443         * language.c (default_symbol_name_matcher)
444         (language_get_symbol_name_matcher): New functions.
445         (unknown_language_defn, auto_language_defn): Adjust comments to
446         refer to la_get_symbol_name_matcher.
447         * language.h (symbol_name_cmp_ftype): Delete.
448         (language_defn) <la_collect_symbol_completion_matches>: Add match
449         type parameter.
450         <la_get_symbol_name_cmp>: Delete field.
451         <la_get_symbol_name_matcher>: New field.
452         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
453         (default_symbol_name_matcher, language_get_symbol_name_matcher):
454         Declare.
455         * linespec.c (iterate_over_all_matching_symtabs)
456         (iterate_over_file_blocks): Adjust to use lookup_name_info.
457         (find_methods): Add language parameter, and use lookup_name_info
458         and the language's symbol_name_matcher_ftype.
459         (linespec_complete_function): Adjust.
460         (lookup_prefix_sym): Use lookup_name_info.
461         (add_all_symbol_names_from_pspace): Adjust.
462         (find_superclass_methods): Add language parameter and pass it
463         down.
464         (find_method): Pass symbol language down.
465         (find_linespec_symbols): Don't demangle or Ada encode here.
466         (search_minsyms_for_name): Add lookup_name_info parameter.
467         (add_matching_symbols_to_info): Add name_match_type parameter.
468         Use lookup_name_info.
469         * m2-lang.c (m2_language_defn): Adjust comments to refer to
470         la_get_symbol_name_matcher.
471         * minsyms.c: Include <algorithm>.
472         (add_minsym_to_demangled_hash_table): Remove table parameter and
473         add objfile parameter.  Use search_name_hash, and add language to
474         demangled languages vector.
475         (struct found_minimal_symbols): New struct.
476         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
477         New functions.
478         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
479         input names here.  Use lookup_name_info instead.  Lookup up
480         demangled names once for each language in the demangled names
481         vector.
482         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
483         demangled names once for each language in the demangled names
484         vector.
485         (build_minimal_symbol_hash_tables): Adjust.
486         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
487         lookup_name_info.
488         * objc-lang.c (objc_language_defn): Adjust comment to refer to
489         la_get_symbol_name_matcher.
490         * objfiles.h: Include <vector>.
491         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
492         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
493         la_get_symbol_name_matcher.
494         * p-lang.c (pascal_language_defn): Adjust comment to refer to
495         la_get_symbol_name_matcher.
496         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
497         (match_partial_symbol): Use symbol_name_match_type,
498         lookup_name_info and psymbol_name_matches.
499         (lookup_partial_symbol): Use lookup_name_info.
500         (map_block): Use symbol_name_match_type and lookup_name_info.
501         (psym_map_matching_symbols): Use symbol_name_match_type.
502         (psymbol_name_matches): New.
503         (recursively_search_psymtabs): Use lookup_name_info and
504         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
505         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
506         'kind' parameter to 'domain'.
507         * rust-lang.c (rust_language_defn): Adjust comment to refer to
508         la_get_symbol_name_matcher.
509         * symfile-debug.c (debug_qf_map_matching_symbols)
510         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
511         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
512         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
513         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
514         Adjust to use symbol_name_match_type.
515         <expand_symtabs_matching>: Adjust to use lookup_name_info.
516         (expand_symtabs_matching): Adjust to use lookup_name_info.
517         * symmisc.c (maintenance_expand_symtabs): Use
518         lookup_name_info::match_any ().
519         * symtab.c (symbol_matches_search_name): New.
520         (eq_symbol_entry): Adjust to use lookup_name_info and the
521         language's matcher.
522         (demangle_for_lookup_info::demangle_for_lookup_info): New.
523         (lookup_name_info::match_any): New.
524         (iterate_over_symbols, search_symbols): Use lookup_name_info.
525         (compare_symbol_name): Add language, lookup_name_info and
526         completion_match_result parameters, and use them.
527         (completion_list_add_name): Make extern.  Add language and
528         lookup_name_info parameters.  Use them.
529         (completion_list_add_symbol, completion_list_add_msymbol)
530         (completion_list_objc_symbol): Add lookup_name_info parameters and
531         adjust.  Pass down language.
532         (completion_list_add_fields): Add lookup_name_info parameters and
533         adjust.  Pass down language.
534         (add_symtab_completions): Add lookup_name_info parameters and
535         adjust.
536         (default_collect_symbol_completion_matches_break_on): Add
537         name_match_type parameter, and use it.  Use lookup_name_info.
538         (default_collect_symbol_completion_matches)
539         (collect_symbol_completion_matches): Add name_match_type
540         parameter, and pass it down.
541         (collect_symbol_completion_matches_type): Adjust.
542         (collect_file_symbol_completion_matches): Add name_match_type
543         parameter, and use lookup_name_info.
544         * symtab.h: Include <string> and "common/gdb_optional.h".
545         (enum class symbol_name_match_type): New.
546         (class ada_lookup_name_info): New.
547         (struct demangle_for_lookup_info): New.
548         (class lookup_name_info): New.
549         (symbol_name_matcher_ftype): New.
550         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
551         (symbol_matches_search_name): Declare.
552         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
553         (default_collect_symbol_completion_matches)
554         (collect_symbol_completion_matches)
555         (collect_file_symbol_completion_matches): Add name_match_type
556         parameter.
557         (iterate_over_symbols): Use lookup_name_info.
558         (completion_list_add_name): Declare.
559         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
560         (strncmp_iw_with_mode): Now extern.
561         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
562         (strncmp_iw_with_mode): Declare.
563
564 2017-11-08  Keith Seitz  <keiths@redhat.com>
565             Pedro Alves  <palves@redhat.com>
566
567         * ada-lang.c (ada_language_defn): Install
568         default_search_name_hash.
569         * buildsym.c (struct buildsym_compunit): <language>: New field.
570         (finish_block_internal): Pass language when creating dictionaries.
571         (start_buildsym_compunit, start_symtab): New language parameters.
572         Use them.
573         (restart_symtab): Pass down compilation unit's language.
574         * buildsym.h (enum language): Forward declare.
575         (start_symtab): New 'language' parameter.
576         * c-lang.c (c_language_defn, cplus_language_defn)
577         (asm_language_defn, minimal_language_defn): Install
578         default_search_name_hash.
579         * coffread.c (coff_start_symtab): Adjust.
580         * d-lang.c (d_language_defn): Install default_search_name_hash.
581         * dbxread.c (struct symloc): Add 'pst_language' field.
582         (PST_LANGUAGE): Define.
583         (start_psymtab, read_ofile_symtab): Use it.
584         (process_one_symbol): New 'language' parameter.  Pass it down.
585         * dictionary.c (struct dictionary) <language>: New field.
586         (DICT_LANGUAGE): Define.
587         (dict_create_hashed, dict_create_hashed_expandable)
588         (dict_create_linear, dict_create_linear_expandable): New parameter
589         'language'.  Set the dictionary's language.
590         (iter_match_first_hashed): Adjust to rename.
591         (insert_symbol_hashed): Assert we don't see mismatching
592         languages.  Adjust to rename.
593         (dict_hash): Rename to ...
594         (default_search_name_hash): ... this and make extern.
595         * dictionary.h (struct language_defn): Forward declare.
596         (dict_create_hashed): New parameter 'language'.
597         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
598         * f-lang.c (f_language_defn): Install default_search_name_hash.
599         * go-lang.c (go_language_defn): Install default_search_name_hash.
600         * jit.c (finalize_symtab): Pass compunit's language to dictionary
601         creation.
602         * language.c (unknown_language_defn, auto_language_defn):
603         * language.h (language_defn::la_search_name_hash): New field.
604         (default_search_name_hash): Declare.
605         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
606         * mdebugread.c (new_block): New parameter 'language'.
607         * mdebugread.c (parse_symbol): Pass symbol language to block
608         allocation.
609         (psymtab_to_symtab_1): Pass down language.
610         (new_symtab): Pass compunit's language to block allocation.
611         * objc-lang.c (objc_language_defn): Install
612         default_search_name_hash.
613         * opencl-lang.c (opencl_language_defn):
614         * p-lang.c (pascal_language_defn): Install
615         default_search_name_hash.
616         * rust-lang.c (rust_language_defn): Install
617         default_search_name_hash.
618         * stabsread.h (enum language): Forward declare.
619         (process_one_symbol): Add 'language' parameter.
620         * symtab.c (search_name_hash): New function.
621         * symtab.h (search_name_hash): Declare.
622         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
623
624 2017-11-08  Pedro Alves  <palves@redhat.com>
625
626         * cp-name-parser.y (main): Don't initialize extra_chars.
627
628 2017-11-07  Tom Tromey  <tom@tromey.com>
629
630         * event-top.h (command_handler): Constify.
631         * record-full.c (cmd_record_full_start): Update.
632         * thread.c (thread_apply_all_command): Update.
633         * printcmd.c (eval_command): Update.
634         * mi/mi-main.c (mi_execute_cli_command): Update.
635         (mi_execute_async_cli_command): Update.
636         * tui/tui-stack.c (tui_update_command): Update.
637         * cli/cli-interp.c (safe_execute_command): Constify.
638         * record.c (record_start): Update.
639         (record_start, record_stop, cmd_record_start): Update.
640         * record-btrace.c (cmd_record_btrace_bts_start): Update.
641         (cmd_record_btrace_pt_start): Update.
642         (cmd_record_btrace_start): Update.
643         (cmd_record_btrace_start): Update.
644         * reverse.c (exec_reverse_once): Update.
645         * python/python.c (execute_gdb_command): Don't copy the command.
646         * event-top.c (command_line_handler): Update.
647         (command_handler): Constify.
648         * defs.h (deprecated_call_command_hook): Constify.
649         * cli/cli-script.h (execute_user_command): Constify.
650         * cli/cli-script.c (execute_user_command): Constify.
651         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
652         (enum command_control_type): Update.
653         * main.c (catch_command_errors): Remove non-const overload.
654         (catch_command_errors_ftype): Remove.
655         * python/py-cmd.c (cmdpy_function): Constify.
656         * guile/scm-cmd.c (cmdscm_function): Constify.
657         * cli/cli-dump.c (call_dump_func): Constify.
658         * cli/cli-decode.c (do_const_cfunc): Constify.
659         (do_sfunc): Constify.
660         (cmd_func): Constify.
661         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
662         * top.h (execute_command): Constify.
663         * top.c (execute_command): Constify.
664         (execute_command_to_string): Constify.
665         (deprecated_call_command_hook): Constify.
666         * command.h (cmd_func): Constify.
667         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
668
669 2017-11-07  Tom Tromey  <tom@tromey.com>
670
671         * ada-lang.c (catch_ada_exception_command): Constify.
672         (catch_assert_command): Constify.
673         * break-catch-throw.c (catch_catch_command, catch_throw_command)
674         (catch_rethrow_command): Constify.
675         (catch_exception_command_1): Constify.
676         * breakpoint.h (add_catch_command): Constify.
677         * break-catch-syscall.c (catch_syscall_command_1): Constify.
678         (catch_syscall_split_args): Constify.
679         * break-catch-sig.c (catch_signal_command): Constify.
680         (catch_signal_split_args): Constify.
681         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
682         cmd_const_sfunc_ftype.
683         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
684         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
685         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
686         (add_setshow_string_cmd, struct cmd_list_element)
687         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
688         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
689         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
690         Constify.
691         (set_cmd_sfunc): Constify.
692         (empty_sfunc): Constify.
693         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
694         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
695         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
696         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
697         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
698         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
699         Constify.
700         (set_cmd_sfunc): Constify.
701         (cmd_sfunc_ftype): Remove.
702         * compile/compile.c (set_compile_args): Constify.
703         * infrun.c (set_disable_randomization): Constify.
704         * infcmd.c (set_args_command, set_cwd_command): Constify.
705         * breakpoint.c (set_condition_evaluation_mode): Constify.
706         (add_catch_command): Constify.
707         (catch_fork_command_1, catch_exec_command_1)
708         (catch_load_command_1, catch_unload_command_1): Constify.
709         (catch_load_or_unload): Constify.
710         * guile/scm-param.c (pascm_set_func): Constify.
711         (add_setshow_generic): Constify.
712         * python/py-param.c (get_set_value): Constify.
713         * top.h (set_verbose): Constify.
714         * tui/tui-win.c (tui_set_var_cmd): Constify.
715         * mi/mi-main.c (set_mi_async_command): Constify.
716         * cli/cli-logging.c (set_logging_overwrite)
717         (set_logging_redirect): Constify.
718         * value.c (set_max_value_size): Constify.
719         * valprint.c (set_input_radix, set_output_radix): Constify.
720         * utils.c (set_width_command, set_height_command): Constify.
721         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
722         * tracepoint.c (set_disconnected_tracing)
723         (set_circular_trace_buffer, set_trace_buffer_size)
724         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
725         * top.c (set_history_size_command, set_verbose, set_editing)
726         (set_gdb_datadir, set_history_filename): Constify.
727         * target.c (set_targetdebug, maint_set_target_async_command)
728         (maint_set_target_non_stop_command, set_target_permissions)
729         (set_write_memory_permission): Constify.
730         (open_target): Constify.
731         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
732         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
733         * symtab.c (set_symbol_cache_size_handler): Constify.
734         * symfile.c (set_ext_lang_command): Constify.
735         * symfile-debug.c (set_debug_symfile): Constify.
736         * source.c (set_directories_command): Constify.
737         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
738         * serial.c (set_parity): Constify.
739         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
740         * remote.c (set_remote_exec_file, set_remotebreak)
741         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
742         * record.c (set_record_insn_history_size)
743         (set_record_call_history_size): Constify.
744         * record-full.c (set_record_full_insn_max_num): Constify.
745         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
746         * osabi.c (set_osabi): Constify.
747         * mips-tdep.c (set_mips64_transfers_32bit_regs)
748         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
749         * maint.c (maintenance_set_profile_cmd): Constify.
750         * linux-thread-db.c (set_libthread_db_search_path): Constify.
751         * language.c (set_language_command, set_range_command)
752         (set_case_command): Constify.
753         * infrun.c (set_non_stop, set_observer_mode)
754         (set_stop_on_solib_events, set_schedlock_func)
755         (set_exec_direction_func): Constify.
756         * infcmd.c (set_inferior_tty_command): Constify.
757         * disasm.c (set_disassembler_options_sfunc): Constify.
758         * demangle.c (set_demangling_command): Constify.
759         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
760         * cris-tdep.c (set_cris_version, set_cris_mode)
761         (set_cris_dwarf2_cfi): Constify.
762         * corefile.c (set_gnutarget_command): Constify.
763         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
764         (set_target_wide_charset_sfunc): Constify.
765         * breakpoint.c (update_dprintf_commands): Constify.
766         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
767         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
768         (set_disassembly_style_sfunc): Constify.
769         * arch-utils.c (set_endian, set_architecture): Constify.
770         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
771         * agent.c (set_can_use_agent): Constify.
772
773 2017-11-07  Tom Tromey  <tom@tromey.com>
774
775         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
776         (go32_pde, go32_pte, go32_pte_for_address): Constify.
777         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
778         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
779         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
780         (parse_int_arg, show_thread_default_detach_sc_cmd)
781         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
782         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
783         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
784         (show_task_pause_cmd, set_task_detach_sc_cmd)
785         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
786         (set_noninvasive_cmd, set_thread_pause_cmd)
787         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
788         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
789         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
790         * windows-nat.c (display_selectors): Constify.
791         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
792         non-const "cfunc".
793         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
794         (cmd_cfunc_eq): Likewise.
795         (struct cmd_list_element): Likewise.
796         (do_cfunc): Remove.
797         (cli_user_command_p): Update.
798         * command.h (add_cmd): Remove non-const overload.
799         (cmd_cfunc_ftype): Remove typedef.
800         (cmd_cfunc_eq): Remove non-const overload.
801         * value.c (show_values): Constify.
802         * thread.c (thread_apply_all_command): Constify.
803         * symfile.c (load_command): Constify.
804         * source.c (directory_command): Constify.
805         * maint.c (maintenance_internal_error)
806         (maintenance_demangler_warning, maintenance_space_display)
807         (maintenance_print_architecture, maintenance_translate_address)
808         (maintenance_info_selftests, maintenance_internal_warning):
809         Constify.
810         * breakpoint.c (disable_trace_command, enable_trace_command):
811         Constify.
812         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
813         Constify.
814         (add_auto_load_safe_path): Constify.
815         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
816         * top.h (show_commands): Constify.
817         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
818         * sparc64-tdep.c (adi_examine_command): Constify.
819         (adi_assign_command): Constify.
820
821 2017-11-07  Tom Tromey  <tom@tromey.com>
822
823         * frame.h (info_locals_command, info_args_command): Constify.
824         * auto-load.h (auto_load_info_scripts): Constify.
825         * inferior.h (registers_info): Constify.
826         * copying.c: Rebuild.
827         * copying.awk: Constify generated commands.
828         * auto-load.c (auto_load_info_scripts)
829         (info_auto_load_gdb_scripts): Constify.
830         * cli/cli-decode.c (struct cmd_list_element): Take a
831         cmd_const_cfunc_ftype.
832         * command.h (add_info): Take a cmd_const_cfunc_ftype.
833         * tui/tui-win.c (tui_all_windows_info): Constify.
834         * python/py-auto-load.c (info_auto_load_python_scripts):
835         Constify.
836         * cli/cli-cmds.c (show_command): Remove non-const overload.
837         * tracepoint.c (info_tvariables_command, info_scope_command):
838         Constify.
839         (info_static_tracepoint_markers_command): Constify.
840         * thread.c (info_threads_command): Constify.
841         (print_thread_info_1): Constify.
842         * target.c (info_target_command): Constify.
843         * symtab.c (info_sources_command, info_functions_command)
844         (info_types_command): Constify.
845         (info_variables_command): Remove non-const overload.
846         * symfile.c (info_ext_lang_command): Constify.
847         * stack.c (info_frame_command, info_locals_command)
848         (info_args_command): Constify.
849         (backtrace_command): Remove non-const overload.
850         * source.c (info_source_command, info_line_command): Constify.
851         * solib.c (info_sharedlibrary_command): Constify.
852         * skip.c (info_skip_command): Constify.
853         * ser-go32.c (info_serial_command): Constify.
854         * reverse.c (info_bookmarks_command): Constify.
855         * printcmd.c (info_symbol_command, info_address_command)
856         (info_display_command): Constify.
857         * osdata.c (info_osdata_command): Constify.
858         * objc-lang.c (info_selectors_command, info_classes_command):
859         Constify.
860         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
861         * memattr.c (info_mem_command): Constify.
862         * macrocmd.c (info_macro_command, info_macros_command): Constify.
863         * linux-fork.c (info_checkpoints_command): Constify.
864         * infrun.c (info_signals_command): Constify.
865         * inflow.c (info_terminal_command): Constify.
866         * inferior.c (info_inferiors_command): Constify.
867         (print_inferior): Constify.
868         * infcmd.c (info_program_command, info_all_registers_command)
869         (info_registers_command, info_vector_command)
870         (info_float_command): Constify.
871         (registers_info): Constify.
872         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
873         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
874         Constify.
875         * f-valprint.c (info_common_command): Constify.
876         * dcache.c (info_dcache_command): Constify.
877         (dcache_info_1): Constify.
878         * darwin-nat-info.c (info_mach_tasks_command)
879         (info_mach_task_command, info_mach_ports_command)
880         (info_mach_port_command, info_mach_threads_command)
881         (info_mach_thread_command, info_mach_regions_command)
882         (info_mach_regions_recurse_command, info_mach_region_command)
883         (info_mach_exceptions_command): Constify.
884         (get_task_from_args): Constify.
885         * cp-support.c (info_vtbl_command): Constify.
886         * breakpoint.c (info_watchpoints_command)
887         (info_tracepoints_command): Constify.
888         (info_breakpoints_command): Remove non-const overload.
889         * avr-tdep.c (avr_io_reg_read_command): Constify.
890         * auxv.c (info_auxv_command): Constify.
891         * ada-tasks.c (info_tasks_command): Constify.
892         (info_task): Constify.
893         * ada-lang.c (info_exceptions_command): Constify.
894
895 2017-11-07  Tom Tromey  <tom@tromey.com>
896
897         * solib.h (no_shared_libraries): Constify.
898         * frame.h (return_command): Constify.
899         * cli/cli-cmds.h (quit_command): Constify.
900         * top.h (quit_command, execute_command): Constify.
901         * target.h (flash_erase_command): Constify.
902         * inferior.h (set_inferior_args, attach_command): Constify.
903         * tracepoint.h (start_tracing, stop_tracing): Constify.
904         * breakpoint.h (break_command, tbreak_command)
905         (hbreak_command_wrapper, thbreak_command_wrapper)
906         (rbreak_command_wrapper, watch_command_wrapper)
907         (awatch_command_wrapper, rwatch_command_wrapper)
908         (get_tracepoint_by_number): Constify.
909         * symtab.c (info_variables_command, rbreak_command)
910         (symtab_symbol_info): Constify.
911         (info_variables_command): Add non-const overload.
912         * top.c (dont_repeat_command): Constify.
913         * breakpoint.c (ignore_command, commands_command)
914         (condition_command, tbreak_command, hbreak_command)
915         (thbreak_command, clear_command, break_command)
916         (info_breakpoints_command, watch_command, rwatch_command)
917         (awatch_command, trace_command, ftrace_command, strace_command)
918         (trace_pass_command, break_range_command, dprintf_command)
919         (agent_printf_command, get_tracepoint_by_number)
920         (watch_maybe_just_location, trace_pass_command): Constify.
921         (info_breakpoints_command): Add non-const overload.
922         * tracefile.c (tsave_command): Constify.
923         * infcmd.c (attach_command, disconnect_command, signal_command)
924         (queue_signal_command, stepi_command, nexti_command)
925         (finish_command, next_command, step_command, until_command)
926         (advance_command, jump_command, continue_command, run_command)
927         (start_command, starti_command, interrupt_command)
928         (run_command_1, set_inferior_args, step_1): Constify.
929         * inferior.c (add_inferior_command, remove_inferior_command)
930         (clone_inferior_command): Constify.
931         * linux-fork.c (checkpoint_command, restart_command): Constify.
932         * windows-nat.c (signal_event_command): Constify.
933         * guile/guile.c (guile_repl_command, guile_command): Constify.
934         * printcmd.c (x_command, display_command, printf_command)
935         (output_command, set_command, call_command, print_command)
936         (eval_command): Constify.
937         (non_const_set_command): Remove.
938         (_initialize_printcmd): Update.
939         * source.c (forward_search_command, reverse_search_command):
940         Constify.
941         * jit.c (jit_reader_load_command, jit_reader_unload_command):
942         Constify.
943         * infrun.c (handle_command): Constify.
944         * memattr.c (mem_command): Constify.
945         * stack.c (return_command, up_command, up_silently_command)
946         (down_command, down_silently_command, frame_command)
947         (backtrace_command, func_command, backtrace_command_1): Constify.
948         (backtrace_command): Add non-const overload.
949         * remote-sim.c (simulator_command): Constify.
950         * exec.c (set_section_command): Constify.
951         * tracepoint.c (tdump_command, trace_variable_command)
952         (tstatus_command, tstop_command, tstart_command)
953         (end_actions_pseudocommand, while_stepping_pseudocommand)
954         (collect_pseudocommand, teval_pseudocommand, actions_command)
955         (start_tracing, stop_tracing): Constify.
956         * value.c (init_if_undefined_command): Constify.
957         * tui/tui-stack.c (tui_update_command): Constify.
958         * tui/tui-win.c (tui_refresh_all_command)
959         (tui_set_tab_width_command, tui_set_win_height_command)
960         (tui_set_focus_command, tui_scroll_forward_command)
961         (tui_scroll_backward_command, tui_scroll_left_command)
962         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
963         (tui_set_win_height): Constify.
964         * tui/tui-layout.c (tui_layout_command): Constify.
965         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
966         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
967         (proc_untrace_sysexit_cmd): Constify.
968         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
969         (threadset_test_cmd, threadlist_update_test_cmd)
970         (threadalive_test): Constify.
971         * objc-lang.c (print_object_command): Constify.
972         * command.h (add_com): Constify.
973         * cli/cli-dump.c (restore_command): Constify.
974         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
975         (help_command, complete_command, shell_command, edit_command)
976         (list_command, disassemble_command, make_command)
977         (apropos_command, alias_command): Constify.
978         * cli/cli-script.c (document_command, define_command)
979         (while_command, if_command, validate_comname): Constify.
980         * cli/cli-decode.c (struct cmd_list_element): Change type of
981         "fun".
982         * target.c (do_monitor_command, flash_erase_command): Constify.
983         * regcache.c (reg_flush_command): Constify.
984         * reverse.c (reverse_step, reverse_next, reverse_stepi)
985         (reverse_nexti, reverse_continue, reverse_finish)
986         (save_bookmark_command, goto_bookmark_command)
987         (exec_reverse_once): Constify.
988         * python/python.c (python_interactive_command, python_command):
989         Constify.
990         * typeprint.c (ptype_command, whatis_command, whatis_exp):
991         Constify.
992         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
993         * gcore.c (gcore_command): Constify.
994
995 2017-11-07  Tom Tromey  <tom@tromey.com>
996
997         * printcmd.c (x_command): Call set_repeat_arguments.
998         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
999         * top.c (repeat_arguments): New global.
1000         (set_repeat_arguments): New function.
1001         (execute_command): Handle repeat_arguments.
1002         (show_commands): Calls set_repeat_arguments.
1003         * command.h (set_repeat_arguments): Declare.
1004
1005 2017-11-07  Tom Tromey  <tom@tromey.com>
1006
1007         * stack.c (backtrace_command): Use std::string.
1008         (backtrace_command_1): Make "count_exp" const.
1009
1010 2017-11-07  Tom Tromey  <tom@tromey.com>
1011
1012         * source.c (directory_switch, mod_path, add_path): Constify.
1013         * defs.h (add_path, mod_path, directory_switch): Constify.
1014         * mi/mi-cmd-env.c (env_mod_path): Constify.
1015
1016 2017-11-07  Tom Tromey  <tom@tromey.com>
1017
1018         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1019         (run_command_1, continue_command, step_1, jump_command)
1020         (signal_command, until_command, advance_command, finish_command)
1021         (attach_command): Update.
1022
1023 2017-11-07  Tom Tromey  <tom@tromey.com>
1024
1025         * command.h (set_cmd_cfunc): Don't declare.
1026         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1027
1028 2017-11-07  Tom Tromey  <tom@tromey.com>
1029
1030         * stack.c (select_frame_command): Constify.
1031         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1032         * command.h (add_com_suppress_notification): Constify.
1033
1034 2017-11-07  Tom Tromey  <tom@tromey.com>
1035
1036         * breakpoint.c (stop_command): Constify.
1037         * cli/cli-decode.c (struct cmd_list_element): Constify.
1038         * command.h (add_abbrev_prefix_cmd): Constify.
1039
1040 2017-11-07  Pedro Alves  <palves@redhat.com>
1041
1042         * breakpoint.c (extract_bp_kind): New enum.
1043         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1044         factored out from ...
1045         (extract_bp_number_and_location): ... here.
1046         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1047
1048 2017-11-07  Pedro Alves  <palves@redhat.com>
1049
1050         * breakpoint.c (extract_bp_number_and_location): Change return
1051         type to void.  Throw error instead of warning.
1052         (enable_disable_command): Adjust.
1053
1054 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1055             Pedro Alves  <palves@redhat.com>
1056
1057         * breakpoint.c (map_breakpoint_number_range): New, factored out
1058         from ...
1059         (map_breakpoint_numbers): ... here.
1060         (find_location_by_number): Change parameters from string to
1061         breakpoint number and location.
1062         (extract_bp_number_and_location): New function.
1063         (enable_disable_bp_num_loc)
1064         (enable_disable_breakpoint_location_range)
1065         (enable_disable_command): New functions, factored out ...
1066         (enable_command, disable_command): ... these functions, and
1067         adjusted to support ranges.
1068         * NEWS: Document enable/disable breakpoint location range feature.
1069
1070 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1071
1072         * MAINTAINERS (Write After Approval): Update my e-mail address.
1073
1074 2017-11-06  Pedro Alves  <palves@redhat.com>
1075
1076         * gnu-nat.c (gnu_terminal_init): Delete.
1077         (gnu_target): Don't install gnu_terminal_init.
1078         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1079         (child_terminal_init): ... this function.
1080
1081 2017-11-06  Pedro Alves  <palves@redhat.com>
1082
1083         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1084         sgtty.h.
1085         * config.in, configure: Regenerate.
1086
1087 2017-11-06  Pedro Alves  <palves@redhat.com>
1088
1089         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1090         (async_init_signals): Adjust.
1091         (handle_stop_sig): Rename to ...
1092         (handle_sigtstp): ... this.
1093         (async_stop_sig): Rename to ...
1094         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1095         SIGTSTP path.
1096         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1097         instead of STOP_SIGNAL thoughout.
1098         (handle_stop_sig): Rename to ...
1099         (handle_sigtstp): ... this.
1100         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1101
1102 2017-11-06  Pedro Alves  <palves@redhat.com>
1103
1104         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1105         longer set flags twice in row.
1106
1107 2017-11-06  Pedro Alves  <palves@redhat.com>
1108
1109         * Makefile.in (SER_HARDWIRE): Update comment.
1110         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1111         * common/gdb_termios.h: Delete file.
1112         * common/job-control.c: Include termios.h and unistd.h instead of
1113         gdb_termios.h.
1114         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1115         check.
1116         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1117         Remove sgtty code.
1118         * configure.ac: No longer check for termio.h and sgtty.h.
1119         * configure: Regenerate.
1120         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1121         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1122         Replace PROCESS_GROUP_TYPE references with pid_t references
1123         throughout.
1124         (gdb_getpgrp): Delete.
1125         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1126         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1127         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1128         gdb_getpgrp.  Use serial_set_tty_state instead aof
1129         serial_noflush_set_tty_state.  Remove sgtty code.
1130         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1131         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1132         (inferior_process_group): Now returns pid_t.
1133         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1134         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1135         * ser-event.c (serial_event_ops): Update.
1136         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1137         (dos_ops): Update.
1138         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1139         * ser-pipe.c (pipe_ops): Update.
1140         * ser-tcp.c (tcp_ops): Update.
1141         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1142         HAVE_TERMIOS checks.
1143         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1144         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1145         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1146         assume termios.
1147         (hardwire_noflush_set_tty_state): Delete.
1148         (hardwire_print_tty_state, hardwire_drain_output)
1149         (hardwire_flush_output, hardwire_flush_input)
1150         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1151         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1152         code, and assume termios.
1153         (hardwire_ops): Update.
1154         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1155         * serial.c (serial_noflush_set_tty_state): Delete.
1156         * serial.h (serial_noflush_set_tty_state): Delete.
1157         (serial_ops::noflush_set_tty_state): Delete.
1158
1159 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1160
1161         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1162         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1163         (COMMON_OBS): Remove doublest.o and dfp.o.
1164         Do not build target-float.c (instead of doublest.c)
1165         with -Wformat-nonliteral.
1166
1167         * doublest.c: Remove file.
1168         * doublest.h: Remove file.
1169         * dfp.c: Remove file.
1170         * dfp.h: Remove file.
1171
1172         * target-float.c: Do not include "doublest.h" and "dfp.h".
1173         (DOUBLEST): Move here from doublest.h.
1174         (enum float_kind): Likewise.
1175         (FLOATFORMAT_CHAR_BIT): Likewise.
1176         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1177         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1178         (floatformat_precision): Likewise.
1179         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1180         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1181         Likewise.
1182         (host_float_format, host_double_format, host_long_double_format):
1183         Likewise.
1184         (floatformat_to_string, floatformat_from_string): Likewise.
1185         (floatformat_to_doublest): Likewise.  Also, inline the original
1186         convert_floatformat_to_doublest.
1187         (floatformat_from_doublest): Likewise.  Also, inline the original
1188         convert_floatformat_from_doublest.
1189
1190         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1191         (MAX_DECIMAL_STRING): Move here from dfp.c.
1192         (match_endianness): Likewise.
1193         (set_decnumber_context, decimal_check_errors): Likewise.
1194         (decimal_from_number, decimal_to_number): Likewise.
1195         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1196         (decimal_from_longest, decimal_from_ulongest): Likewise.
1197         (decimal_to_longest): Likewise.
1198         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1199         (decimal_convert): Likewise.
1200
1201 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1202
1203         * doublest.c: Do not include "gdbtypes.h".
1204         (extract_typed_floating): Remove.
1205         (store_typed_floating): Remove.
1206         (convert_typed_floating): Remove.
1207         * doublest.h (struct type): Remove.
1208         (DOUBLEST_PRINT_FORMAT): Remove.
1209         (DOUBLEST_SCAN_FORMAT): Remove.
1210         (extract_typed_floating): Remove.
1211         (store_typed_floating): Remove.
1212         (convert_typed_floating): Remove.
1213
1214         * dfp.c (decimal_from_doublest): Remove.
1215         (decimal_to_doublest): Remove.
1216         * dfp.h: Do not include "doublest.h".
1217         (decimal_from_doublest): Remove.
1218         (decimal_to_doublest): Remove.
1219
1220         * value.c: Do not include "doublest.h" and "dfp.h".
1221         (value_as_double): Remove.
1222         (unpack_double): Remove.
1223         (value_from_double): Remove.
1224         (value_from_decfloat): Remove.
1225         * value.h: Do not include "doublest.h".
1226         (value_as_double): Remove.
1227         (unpack_double): Remove.
1228         (value_from_double): Remove.
1229         (value_from_decfloat): Remove.
1230
1231 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1232
1233         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1234         (i386_extract_return_value): Use target_float_convert.
1235         (i386_store_return_value): Likewise.
1236         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1237         (i387_value_to_register): Likewise.
1238         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1239         (ia64_register_to_value): Use target_float_convert.
1240         (ia64_value_to_register): Likewise.
1241         (ia64_extract_return_value): Likewise.
1242         (ia64_store_return_value): Likewise.
1243         (ia64_push_dummy_call): Likewise.
1244         * m68k-tdep.c: Include "target-float.h".
1245         (m68k_register_to_value): Use target_float_convert.
1246         (m68k_value_to_register): Likewise.
1247         (m68k_svr4_extract_return_value): Likewise.
1248         (m68k_svr4_store_return_value): Likewise.
1249         * ppc-sysv-tdep.c: Include "target-float.h".
1250         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1251         (do_ppc_sysv_return_value): Likewise.
1252         (ppc64_sysv_abi_push_freg): Likewise.
1253         (ppc64_sysv_abi_return_value_base): Likewise.
1254         * rs6000-aix-tdep.c: Include "target-float.h".
1255         (rs6000_push_dummy_call): Use target_float_convert.
1256         (rs6000_return_value): Likewise.
1257         * rs6000-lynx178-tdep.c: Include "target-float.h".
1258         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1259         (rs6000_lynx178_return_value): Likewise.
1260         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1261         (rs6000_register_to_value): Use target_float_convert.
1262         (rs6000_value_to_register): Likewise.
1263         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1264         (arm_extract_return_value): Use target_float_convert.
1265         (arm_store_return_value): Likewise.
1266         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1267         (sh_register_convert_to_virtual): Use target_float_convert.
1268         (sh_register_convert_to_raw): Likewise.
1269         * sh64-tdep.c: Include "target-float.h".
1270         (sh64_extract_return_value): Use target_float_convert.
1271         (sh64_register_convert_to_virtual): Likewise.
1272         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1273
1274 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1275
1276         * target-float.c (floatformat_to_host_double): New function.
1277         (floatformat_from_host_double): Likewise.
1278         (target_float_to_host_double): Likewise.
1279         (target_float_from_host_double): Likewise.
1280         * target-float.h (target_float_to_host_double): Add prototype.
1281         (target_float_from_host_double): Likewise.
1282
1283         * guile/scm-value.c: Include "target-float.h".
1284         (gdbscm_value_to_real): Use target_float_to_host_double.
1285         Handle integer source values via value_as_long.
1286         * guile/scm-math.c: Include "target-float.h".  Do not include
1287         "doublest.h", "dfp.h", and "expression.h".
1288         (vlscm_convert_typed_number): Use target_float_from_host_double.
1289         (vlscm_convert_number): Likewise.
1290
1291         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1292         (convert_value_from_python): Use target_float_from_host_double.
1293
1294 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1295
1296         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1297         (cast_from_fixed): Likewise.
1298         (ada_scaling_type): New function.
1299         (ada_delta): Return value instead of DOUBLEST.  Perform target
1300         arithmetic instead of host arithmetic.
1301         (scaling_factor): Rename to ...
1302         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1303         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1304         (ada_fixed_to_float): Remove.
1305         (ada_float_to_fixed): Remove.
1306         * ada-lang.h (ada_fixed_to_float): Remove.
1307         (ada_float_to_fixed): Remove.
1308         (ada_delta): Return value instead of DOUBLEST.
1309         (ada_scaling_factor): Add prototype.
1310
1311         * ada-typeprint.c: Include "target-float.h".
1312         (print_fixed_point_type): Perform target arithmetic instead of
1313         host arithmetic.
1314         * ada-valprint.c: Include "target-float.h".
1315         (ada_val_print_num): Perform target arithmetic instead of
1316         host arithmetic for fixed-point types.
1317
1318 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1319
1320         * target-float.c: Include <math.h>.
1321         (floatformat_binop): New function.
1322         (floatformat_compare): Likewise.
1323         (target_float_binop): Likewise.
1324         (target_float_compare): Likewise.
1325         * target-float.h: Include "expression.h".
1326         (target_float_binop): Add prototype.
1327         (target_float_compare): Likewise.
1328
1329         * valarith.c: Do not include "doublest.h" and "dfp.h".
1330         Include "common/byte-vector.h".
1331         (value_args_as_decimal): Remove, replace by ...
1332         (value_args_as_target_float): ... this function.  Handle both
1333         binary and decimal target floating-point formats.
1334         (scalar_binop): Handle both binary and decimal FP using
1335         value_args_as_target_float and target_float_binop.
1336         (value_equal): Handle both binary and decimal FP using
1337         value_args_as_target_float and target_float_compare.
1338         (value_less): Likewise.
1339         (value_pos): Handle all scalar types as simple copy.
1340         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1341         * dfp.c (decimal_binop): Throw error instead of internal_error
1342         when called with an unsupported operation code.
1343
1344 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1345
1346         * target-float.c (target_float_to_string): New function.
1347         (target_float_from_string): New function.
1348         * target-float.h (target_float_to_string): Add prototype.
1349         (target_float_from_string): Add prototype.
1350
1351         * valprint.c: Include "target-float.h".  Do not include
1352         "doublest.h" and "dfp.h".
1353         (print_floating): Use target_float_to_string.
1354         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1355         (printf_floating): Use target_float_to_string.
1356         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1357         (print_i387_value): Use target_float_to_string.
1358         * mips-tdep.c: Include "target-float.h".
1359         (mips_print_fp_register): Use target_float_to_string.
1360         * sh64-tdep.c: Include "target-float.h".
1361         (sh64_do_fp_register): Use target_float_to_string.
1362
1363         * parse.c: Include "target-float.h".  Do not include
1364         "doublest.h" and "dfp.h".
1365         (parse_float): Use target_float_from_string.
1366         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1367         (define_symbol): Use target_float_from_string.
1368         * gdbarch-selftests.c: Include "target-float.h".
1369         (register_to_value_test): Use target_float_from_string.
1370
1371 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1372
1373         * Makefile.c (SFILES): Add target-float.c.
1374         (HFILES_NO_SRCDIR): Add target-float.h.
1375         (COMMON_OBS): Add target-float.o.
1376         * target-float.h: New file.
1377         * target-float.c: New file.
1378
1379         * doublest.c (floatformat_classify): Fix detection of float_zero.
1380
1381         * gdbtypes.c (is_floating_type): New function.
1382         * gdbtypes.h (is_floating_type): Add prototype.
1383
1384         * value.c: Do not include "floatformat.h".
1385         (unpack_double): Use target_float_is_valid.
1386         (is_floating_value): New function.
1387         * value.h (is_floating_value): Add prototype-
1388
1389         * valarith.c: Include "target-float.h".
1390         (value_logical_not): Use target_float_is_zero.
1391
1392         * python/py-value.c: Include "target-float.h".
1393         (valpy_nonzero): Use target_float_is_zero.
1394
1395 2017-11-04  Tom Tromey  <tom@tromey.com>
1396
1397         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1398
1399 2017-11-04  Tom Tromey  <tom@tromey.com>
1400
1401         * breakpoint.c (set_momentary_breakpoint): Return
1402         breakpoint_up.
1403         (until_break_command): Update.
1404         (new_until_break_fsm): Change argument types to
1405         breakpoint_up.
1406         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1407         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1408         Remove.
1409         * infcmd.c (finish_forward): Update.
1410         * breakpoint.h (set_momentary_breakpoint)
1411         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1412         (make_cleanup_delete_breakpoint): Remove.
1413         (struct breakpoint_deleter): New.
1414         (breakpoint_up): New typedef.
1415         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1416         (insert_exception_resume_breakpoint): Update.
1417         (insert_exception_resume_from_probe): Update.
1418         (insert_longjmp_resume_breakpoint): Update.
1419         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1420         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1421         * infcall.c (call_function_by_hand_dummy): Update
1422
1423 2017-11-04  Tom Tromey  <tom@tromey.com>
1424
1425         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1426
1427 2017-11-04  Tom Tromey  <tom@tromey.com>
1428
1429         * linux-tdep.c (linux_core_info_proc_mappings): Use
1430         gdb::def_vector.
1431         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1432         "size" argument.
1433         (linux_corefile_thread): Update.
1434         (linux_make_corefile_notes): Remove unused variable.
1435
1436 2017-11-04  Tom Tromey  <tom@tromey.com>
1437
1438         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1439         gdb::byte_vector.
1440
1441 2017-11-04  Tom Tromey  <tom@tromey.com>
1442
1443         * objfiles.c (do_free_objfile_cleanup): Remove.
1444         * compile/compile-object-load.c (compile_object_load): Update.
1445         * objfiles.h (make_cleanup_free_objfile): Remove.
1446
1447 2017-11-04  Tom Tromey  <tom@tromey.com>
1448
1449         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1450         (adi_read_versions): Change "tags" to "gdb_byte *".
1451         (adi_print_versions): Likewise.
1452
1453 2017-11-04  Tom Tromey  <tom@tromey.com>
1454
1455         * breakpoint.c
1456         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1457         from start_rbreak_breakpoints.
1458         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1459         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1460         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1461         * symtab.c (do_end_rbreak_breakpoints): Remove.
1462         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1463
1464 2017-11-04  Tom Tromey  <tom@tromey.com>
1465
1466         * cp-namespace.c (reset_directive_searched): Remove.
1467         (cp_lookup_symbol_via_imports): Use scoped_restore.
1468         * cp-support.c (reset_directive_searched): Remove.
1469         (make_symbol_overload_list_using): Use scoped_restore.
1470         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1471         (reset_directive_searched): Remove.
1472
1473 2017-11-04  Tom Tromey  <tom@tromey.com>
1474
1475         * symfile.c (find_separate_debug_file_by_debuglink): Use
1476         unique_xmalloc_ptr.
1477
1478 2017-11-04  Tom Tromey  <tom@tromey.com>
1479
1480         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1481         type of "info".
1482         (compute_stack_depth): Likewise.
1483         (do_compile_dwarf_expr_to_c): Use std::vector.
1484
1485 2017-11-04  Tom Tromey  <tom@tromey.com>
1486
1487         * compile/compile-object-load.c (link_callbacks_einfo): Use
1488         std::string.
1489
1490 2017-11-04  Tom Tromey  <tom@tromey.com>
1491
1492         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1493         Use scoped_free_pendings.
1494         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1495         scoped_free_pendings.
1496         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1497         (xcoff_initial_scan): Likewise.
1498         * buildsym.c (reset_symtab_globals): Update comment.
1499         (scoped_free_pendings): Rename from really_free_pendings.
1500         (prepare_for_building): Update comment.
1501         (buildsym_init): Likewise.
1502         * buildsym.h (class scoped_free_pendings): New class.
1503         (really_free_pendings): Don't declare.
1504
1505 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1506
1507         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1508         output when converting a zero value to a special byteorder format.
1509
1510 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1511
1512         * frame.c (do_frame_register_read): Remove aspace.
1513         * jit.c (jit_frame_sniffer): Likwise.
1514         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1515         * regcache.c (regcache::regcache): Pass nullptr.
1516         (regcache_print): Caller updated.
1517         * regcache.h (regcache::regcache): Remove one constructor
1518         parameter aspace.
1519
1520 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1521
1522         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1523
1524 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1525
1526         * breakpoint.c (insert_single_step_breakpoints): Update.
1527         * frame.c (struct frame_info) <aspace>: Add const.
1528         (frame_save_as_regcache): Add const.
1529         (get_frame_address_space): Return const address_space *.
1530         * frame.h (get_frame_address_space): Update declaration.
1531         * infrun.c (struct step_over_info) <aspace>: Add const.
1532         (set_step_over_info): Make aspace const.
1533         (displaced_step_prepare_throw): Change variable const.
1534         (resume): Likewise.
1535         (proceed): Likewise.
1536         (adjust_pc_after_break): Likewise.
1537         (save_waitstatus): Likewise.
1538         (handle_signal_stop): Likewise.
1539         (keep_going_pass_signal): Likewise.
1540         * jit.c (jit_frame_sniffer): Add const.
1541         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1542         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1543         * record-full.c (record_full_wait_1): Likewise.
1544         * regcache.c (regcache::regcache): Change parameter to const.
1545         * regcache.h (regcache::regcache): Likewise.
1546         (regcache::aspace): Return const address_space *.
1547         (regcache) <m_aspace>: Add const.
1548
1549 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1550
1551         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1552         * frame.c (create_sentinel_frame): Likewise.
1553         * infrun.c (displaced_step_prepare_throw): Likewise.
1554         (resume): Likewise.
1555         (thread_still_needs_step_over_bp): Likewise.
1556         (proceed): Likewise.
1557         (do_target_wait): Likewise.
1558         (adjust_pc_after_break): Likewise.
1559         (handle_syscall_event): Likewise.
1560         (save_waitstatus): Likewise.
1561         (handle_inferior_event_1): Likewise.
1562         (handle_signal_stop): Likewise.
1563         (keep_going_pass_signal): Likewise.
1564         * linux-nat.c (status_callback): Likewise.
1565         (save_stop_reason): Likewise.
1566         (resume_stopped_resumed_lwps): Likewise.
1567         * record-full.c (record_full_exec_insn): Likewise.
1568         (record_full_wait_1): Likewise.
1569         * regcache.c (get_regcache_aspace): Remove.
1570         * regcache.h (get_regcache_aspace): Remove.
1571
1572 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1573
1574         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1575         (init_regcache_descr): Use gdbarch_num_regs.
1576         (regcache::regcache): Likewise.
1577         (regcache::get_register_status): Likewise.
1578         (regcache::assert_raw_regnum): Likewise.
1579         (regcache::cooked_read): Likewise.
1580         (regcache::cooked_read_value): Likewise.
1581         (regcache::cooked_write): Likewise.
1582         (regcache::dump): Likewise.
1583         (regcache::num_raw_registers): New method.
1584         * regcache.h (class regcache) <num_raw_registers>: New.
1585
1586 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1587
1588         * regcache.c (regcache::assert_regnum): New method.
1589         (regcache::invalidate): Call assert_regnum.
1590         (regcache::raw_update): Likewise.
1591         (regcache::raw_write): Likewise.
1592         (regcache::raw_read_part): Likewise.
1593         (regcache::raw_write_part): Likewise.
1594         (regcache::raw_supply): Likewise.
1595         (regcache::raw_supply_integer): Likewise.
1596         (regcache::raw_supply_zeroed): Likewise.
1597         (regcache::raw_collect): Likewise.
1598         (regcache::raw_collect_integer): Likewise.
1599         * regcache.h (regcache::assert_regnum): Declare.
1600
1601 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1602
1603         * regcache.c (regcache::dump): Remove code.
1604
1605 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1606
1607         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1608         Remove.
1609         <sizeof_cooked_register_status>: Remove.
1610         (init_regcache_descr): Update.
1611         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1612         (regcache::save): Likewise.
1613         (regcache::dump): Likewise.
1614
1615 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1616
1617         * ft32-tdep.c (ft32_fetch_instruction): New function.
1618         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1619
1620 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1621
1622         * cli/cli-script.c (execute_control_command): Rename to ...
1623         (execute_control_command_1): ... this.
1624         (execute_control_command): New function.
1625
1626 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1627
1628         * tracepoint.c (tfind_command): Remove const_cast.
1629
1630 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1631
1632         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1633
1634 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1635
1636         * common/common-utils.h (in_inclusive_range): New function.
1637         * arm-tdep.c (arm_record_extension_space): Use
1638         in_inclusive_range.
1639         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1640         * cris-tdep.c (cris_spec_reg_applicable): Use
1641         in_inclusive_range.
1642
1643 2017-10-30  Pedro Alves  <palves@redhat.com>
1644             Simon Marchi <simon.marchi@ericsson.com>
1645
1646         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1647         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1648
1649 2017-10-30  Pedro Alves  <palves@redhat.com>
1650
1651         * common/common-utils.c (string_appendf, string_vappendf): New
1652         functions.
1653         * common/common-utils.h (string_appendf, string_vappendf): New
1654         declarations.
1655         * unittests/common-utils-selftests.c (string_appendf_func)
1656         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1657         (string_vappendf_tests): New functions.
1658         (_initialize_common_utils_selftests): Register "string_appendf" and
1659         "string_vappendf tests".
1660
1661 2017-10-30  Pedro Alves  <palves@redhat.com>
1662
1663         * unittests/common-utils-selftests.c (format_func): New typedef.
1664         (string_printf_tests, string_vprintf_tests): Tests factored out
1665         and merged to ...
1666         (test_format_func): ... this new function.
1667         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1668         test_format_func.
1669
1670 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1671
1672         * darwin-nat.c: Remove include of gdb.h.
1673
1674 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1675
1676         * xtensa-xtregs.c: Fix formatting issues.
1677
1678 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1679
1680         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1681
1682 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1683
1684         PR python/21213
1685         * python/py-infthread.c (thpy_get_inferior): Increment reference
1686         of inferior before returning it.
1687
1688 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1689
1690         * unittests/common-utils-selftests.c (format): Add
1691         ATTRIBUTE_PRINTF.
1692
1693 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1694
1695         * xml-syscall.c (struct syscall_desc): Add constructor.
1696         <name>: Change type to std::string.
1697         (syscall_desc_up): New typedef.
1698         (syscall_desc_p): Remove typeder.
1699         (DEF_VEC_P(syscall_desc_p)): Remove.
1700         (struct syscall_group_desc): Add constructor.
1701         <name>: Change type to std::string.
1702         <syscalls>: Change type to std::vector.
1703         (syscall_group_desc_up): New typedef.
1704         (syscall_group_desc_p): Remove typedef.
1705         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1706         (struct syscalls_info) <syscalls>: Change type to std::vector of
1707         unique_ptr.
1708         <groups>: Likewise.
1709         <my_gdb_datadir>: Change type to std::string.
1710         (syscalls_info_up): New typedef.
1711         (allocate_syscalls_info): Remove.
1712         (syscalls_info_free_syscalls_desc): Remove.
1713         (syscalls_info_free_syscall_group_desc): Remove.
1714         (free_syscalls_info): Remove.
1715         (make_cleanup_free_syscalls_info): Remove.
1716         (syscall_group_create_syscall_group_desc): Adjust.
1717         (syscall_group_add_syscall): Adjust.
1718         (syscall_create_syscall_desc): Adjust.
1719         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1720         (init_syscalls_info): Adjust.
1721         (syscall_group_get_group_by_name): Adjust.
1722         (xml_get_syscall_number): Adjust.
1723         (xml_get_syscall_name): Adjust.
1724         (xml_list_of_syscalls): Adjust.
1725         (xml_list_syscalls_by_group): Adjust.
1726         (xml_list_of_groups): Adjust.
1727
1728 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1729
1730         * probe.h: Don't include gdb_vecs.h.
1731         (DEF_VEC_P (probe_p)): Remove.
1732         (find_probes_in_objfile): Return an std::vector.
1733         * probe.c (find_probes_in_objfile): Likewise.
1734         * breakpoint.c (breakpoint_objfile_data)
1735         <longjmp_probes>: Change type to std::vector.
1736         <exception_probes>: Likewise.
1737         (free_breakpoint_probes): Don't manually free vectors.
1738         (create_longjmp_master_breakpoint): Adjust.
1739         (create_exception_master_breakpoint): Adjust.
1740         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1741         parameter type, adjust.
1742         (svr4_create_solib_event_breakpoints): Adjust.
1743
1744 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1745
1746         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1747         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1748         with new.
1749         (free_breakpoint_probes): Rename to ...
1750         (free_breakpoint_objfile_data): ... this, and call delete on
1751         bp_objfile_data..
1752
1753 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1754
1755         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1756         (loaded_script_ptr): Remove typedef.
1757         (DEF_VEC_P (loaded_script_ptr)): Remove.
1758         (struct collect_matching_scripts_data): Add constructor.
1759         <scripts_p>: Change type to (pointer to) std::vector.
1760         (collect_matching_scripts_data): Adjust.
1761         (sort_scripts_by_name): Make suitable for std::sort.
1762         (print_scripts): Don't sort vector, adjust to std::vector.
1763         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1764
1765 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1766
1767         * symfile.c (filename_language): Make struct, not typedef.  Add
1768         constructor.
1769         <ext>: Change type to std::string.
1770         (DEF_VEC_O (filename_language)): Remove.
1771         (filename_language_table): Change type to std::vector.
1772         (add_filename_language): Adjust.
1773         (set_ext_lang_command): Adjust.
1774         (info_ext_lang_command): Adjust.
1775         (deduce_language_from_filename): Adjust.
1776         (class scoped_restore_filename_language_table): Remove.
1777         (test_filename_language): Use scoped_restore.
1778         (test_set_ext_lang_command): Use scoped_restore, adjust to
1779         std::vector change.
1780
1781 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1782
1783         * symfile.c: Include selftest.h.
1784         (class scoped_restore_filename_language_table): New.
1785         (test_filename_language): New test.
1786         (test_set_ext_lang_command): New test.
1787         (_initialize_symfile): Register tests.
1788
1789 2017-10-27  Keith Seitz  <keiths@redhat.com>
1790
1791         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1792         in the bp_location, falling back to find_pc_sect_function when
1793         needed.
1794         (add_location_to_breakpoint): Save sal->symbol.
1795         * breakpoint.h (struct bp_location) <symbol>: New field.
1796         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1797         * symtab.h (struct symtab_and_line) <symbol>: New field.
1798
1799 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1800
1801         PR gdb/13669
1802         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1803         to rewind obstack.
1804
1805 2017-10-26  Pedro Alves  <palves@redhat.com>
1806
1807         * remote.c (remote_async_terminal_ours_p): Delete.
1808         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1809         Remove references to 'remote_async_terminal_ours_p'.
1810
1811 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1812
1813         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1814
1815 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1816
1817         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1818         aspace const.
1819         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1820         Likewise.
1821         * breakpoint.c (bpstat_check_location): Remove cast.
1822         (breakpoint_hit_catch_fork): Make aspce const.
1823         (breakpoint_hit_catch_solib): Likewise.
1824         (breakpoint_hit_catch_exec): Likewise.
1825         (breakpoint_hit_ranged_breakpoint): Likewise.
1826         (breakpoint_hit_watchpoint): Likewise.
1827         (base_breakpoint_breakpoint_hit): Likewise.
1828         (bkpt_breakpoint_hit): Likewise.
1829         (dprintf_breakpoint_hit): Likewise.
1830         (tracepoint_breakpoint_hit): Likewise.
1831         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1832
1833 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1834
1835         * breakpoint.c (breakpoint_location_address_match): Change
1836         "struct address_space *" to "const address_space".
1837         (breakpoint_location_address_range_overlap): Likewise.
1838         (breakpoint_here_p): Likewise.
1839         (breakpoint_in_range_p): Likewise.
1840         (moribund_breakpoint_here_p): Likewise.
1841         (bp_location_inserted_here_p): Likewise.
1842         (software_breakpoint_inserted_here_p): Likewise.
1843         (hardware_breakpoint_inserted_here_p): Likewise.
1844         (hardware_watchpoint_inserted_in_range): Likewise.
1845         (bpstat_check_location): Likewise.
1846         (bpstat_stop_status): Likewise.
1847         (breakpoint_address_match): Likewise.
1848         (breakpoint_address_match_range): Likewise.
1849         (breakpoint_location_address_match): Likewise.
1850         (breakpoint_location_address_range_overlap): Likewise.
1851         (insert_single_step_breakpoint): Likewise.
1852         (breakpoint_has_location_inserted_here): Likewise.
1853         (single_step_breakpoint_inserted_here_p): Likewise.
1854         (pc_at_non_inline_function): Likewise.
1855         * breakpoint.h (bpstat_stop_status): Update declaration.
1856         (breakpoint_here_p): Likewise.
1857         (breakpoint_in_range_p): Likewise.
1858         (moribund_breakpoint_here_p): Likewise.
1859         (breakpoint_inserted_here_p): Likewise.
1860         (software_breakpoint_inserted_here_p): Likewise.
1861         (hardware_breakpoint_inserted_here_p): Likewise.
1862         (breakpoint_has_location_inserted_here): Likewise.
1863         (single_step_breakpoint_inserted_here_p): Likewise.
1864         (hardware_watchpoint_inserted_in_range): Likewise.
1865         (breakpoint_address_match): Likewise.
1866         (insert_single_step_breakpoint): Likewise.
1867         (pc_at_non_inline_function): Likewise.
1868         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1869         * record.c (record_check_stopped_by_breakpoint): Likewise.
1870         * record.h (record_check_stopped_by_breakpoint): Likewise.
1871         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1872
1873 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1874
1875         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1876         regcache->arch () instead get_regcache_arch.
1877         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1878         Likewise.
1879         (aarch64_fbsd_store_inferior_registers): Likewise.
1880         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1881         (store_gregs_to_thread): Likewise.
1882         (fetch_fpregs_from_thread): Likewise.
1883         (store_fpregs_to_thread): Likewise.
1884         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1885         (aarch64_store_return_value): Likewise.
1886         (aarch64_software_single_step): Likewise.
1887         * aix-thread.c (aix_thread_wait): Likewise.
1888         (supply_reg32): Likewise.
1889         (supply_sprs64): Likewise.
1890         (supply_sprs32): Likewise.
1891         (fill_gprs64): Likewise.
1892         (fill_gprs32): Likewise.
1893         (fill_sprs64): Likewise.
1894         (fill_sprs32): Likewise.
1895         (store_regs_user_thread): Likewise.
1896         (store_regs_kernel_thread): Likewise.
1897         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1898         (alphabsd_store_inferior_registers): Likewise.
1899         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1900         (alpha_store_return_value): Likewise.
1901         (alpha_deal_with_atomic_sequence): Likewise.
1902         (alpha_next_pc): Likewise.
1903         (alpha_software_single_step): Likewise.
1904         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1905         (amd64bsd_store_inferior_registers): Likewise.
1906         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1907         Likewise.
1908         (amd64_linux_store_inferior_registers): Likewise.
1909         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1910         (amd64_collect_native_gregset): Likewise.
1911         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1912         (amd64obsd_collect_uthread): Likewise.
1913         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1914         (amd64_collect_fpregset): Likewise.
1915         (amd64_supply_fxsave): Likewise.
1916         (amd64_supply_xsave): Likewise.
1917         (amd64_collect_fxsave): Likewise.
1918         (amd64_collect_xsave): Likewise.
1919         * arc-tdep.c (arc_write_pc): Likewise.
1920         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1921         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1922         (arm_fbsd_store_inferior_registers): Likewise.
1923         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1924         (store_vfp_regs): Likewise.
1925         (arm_linux_fetch_inferior_registers): Likewise.
1926         (arm_linux_store_inferior_registers): Likewise.
1927         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1928         (arm_linux_sigreturn_next_pc): Likewise.
1929         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1930         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1931         (fetch_register): Likewise.
1932         (store_register): Likewise.
1933         * arm-tdep.c (arm_is_thumb): Likewise.
1934         (displaced_in_arm_mode): Likewise.
1935         (bx_write_pc): Likewise.
1936         (arm_get_next_pcs_addr_bits_remove): Likewise.
1937         (arm_software_single_step): Likewise.
1938         (arm_extract_return_value): Likewise.
1939         (arm_store_return_value): Likewise.
1940         (arm_write_pc): Likewise.
1941         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1942         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1943         (bsd_uthread_store_registers): Likewise.
1944         * core-regset.c (fetch_core_registers): Likewise.
1945         * corelow.c (get_core_registers): Likewise.
1946         * cris-tdep.c (cris_store_return_value): Likewise.
1947         (cris_extract_return_value): Likewise.
1948         (find_step_target): Likewise.
1949         (find_step_target): Likewise.
1950         (cris_software_single_step): Likewise.
1951         * ctf.c (ctf_fetch_registers): Likewise.
1952         * darwin-nat.c (cancel_breakpoint): Likewise.
1953         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1954         * frv-tdep.c (frv_extract_return_value): Likewise.
1955         * ft32-tdep.c (ft32_store_return_value): Likewise.
1956         (ft32_extract_return_value): Likewise.
1957         * go32-nat.c (fetch_register): Likewise.
1958         (go32_fetch_registers): Likewise.
1959         (go32_store_registers): Likewise.
1960         (store_register): Likewise.
1961         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1962         (h8300_store_return_value): Likewise.
1963         * hppa-linux-nat.c (fetch_register): Likewise.
1964         (store_register): Likewise.
1965         (hppa_linux_fetch_inferior_registers): Likewise.
1966         (hppa_linux_store_inferior_registers): Likewise.
1967         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1968         (i386_darwin_store_inferior_registers): Likewise.
1969         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1970         (gnu_store_registers): Likewise.
1971         * i386-linux-nat.c (fetch_register): Likewise.
1972         (store_register): Likewise.
1973         (supply_gregset): Likewise.
1974         (fill_gregset): Likewise.
1975         (i386_linux_fetch_inferior_registers): Likewise.
1976         (i386_linux_store_inferior_registers): Likewise.
1977         (i386_linux_resume): Likewise.
1978         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1979         Likewise.
1980         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1981         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1982         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1983         (i386obsd_collect_uthread): Likewise.
1984         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1985         (i386_supply_gregset): Likewise.
1986         (i386_collect_gregset): Likewise.
1987         (i386_supply_fpregset): Likewise.
1988         (i386_collect_fpregset): Likewise.
1989         (i386_mpx_bd_base): Likewise.
1990         * i386-v4-nat.c (supply_fpregset): Likewise.
1991         (fill_fpregset): Likewise.
1992         * i387-tdep.c (i387_supply_fsave): Likewise.
1993         (i387_collect_fsave): Likewise.
1994         (i387_supply_fxsave): Likewise.
1995         (i387_collect_fxsave): Likewise.
1996         (i387_supply_xsave): Likewise.
1997         (i387_collect_xsave): Likewise.
1998         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1999         (ia64_linux_store_registers): Likewise.
2000         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2001         (ia64_extract_return_value): Likewise.
2002         (ia64_store_return_value): Likewise.
2003         (find_func_descr): Likewise.
2004         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2005         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2006         (inf_ptrace_store_registers): Likewise.
2007         * infrun.c (use_displaced_stepping): Likewise.
2008         (displaced_step_prepare_throw): Likewise.
2009         (resume): Likewise.
2010         (proceed): Likewise.
2011         (do_target_wait): Likewise.
2012         (adjust_pc_after_break): Likewise.
2013         (handle_inferior_event_1): Likewise.
2014         (handle_signal_stop): Likewise.
2015         (save_infcall_suspend_state): Likewise.
2016         (restore_infcall_suspend_state): Likewise.
2017         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2018         * jit.c (jit_frame_prev_register): Likewise.
2019         * linux-nat.c (save_stop_reason): Likewise.
2020         (linux_nat_wait_1): Likewise.
2021         (resume_stopped_resumed_lwps): Likewise.
2022         * linux-record.c (record_linux_sockaddr): Likewise.
2023         (record_linux_msghdr): Likewise.
2024         (record_linux_system_call): Likewise.
2025         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2026         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2027         (lm32_store_return_value): Likewise.
2028         * m32c-tdep.c (m32c_read_flg): Likewise.
2029         (m32c_pseudo_register_read): Likewise.
2030         (m32c_pseudo_register_write): Likewise.
2031         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2032         (m32r_linux_collect_gregset): Likewise.
2033         * m32r-tdep.c (m32r_store_return_value): Likewise.
2034         (m32r_extract_return_value): Likewise.
2035         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2036         (m68kbsd_collect_fpregset): Likewise.
2037         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2038         * m68k-linux-nat.c (fetch_register): Likewise.
2039         (old_fetch_inferior_registers): Likewise.
2040         (old_store_inferior_registers): Likewise.
2041         (store_regs): Likewise.
2042         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2043         (m68k_svr4_store_return_value): Likewise.
2044         * m88k-tdep.c (m88k_store_arguments): Likewise.
2045         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2046         (mi_cmd_data_write_register_values): Likewise.
2047         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2048         (mips_fbsd_store_inferior_registers): Likewise.
2049         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2050         (mips_fbsd_supply_gregs): Likewise.
2051         (mips_fbsd_collect_fpregs): Likewise.
2052         (mips_fbsd_collect_gregs): Likewise.
2053         (mips_fbsd_supply_fpregset): Likewise.
2054         (mips_fbsd_collect_fpregset): Likewise.
2055         (mips_fbsd_supply_gregset): Likewise.
2056         (mips_fbsd_collect_gregset): Likewise.
2057         * mips-linux-nat.c (supply_gregset): Likewise.
2058         (fill_gregset): Likewise.
2059         (supply_fpregset): Likewise.
2060         (fill_fpregset): Likewise.
2061         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2062         (mips_fill_gregset): Likewise.
2063         (mips_supply_fpregset): Likewise.
2064         (mips_fill_fpregset): Likewise.
2065         (mips64_supply_gregset): Likewise.
2066         (micromips_linux_sigframe_validate): Likewise.
2067         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2068         (mipsnbsd_fetch_inferior_registers): Likewise.
2069         (mipsnbsd_store_inferior_registers): Likewise.
2070         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2071         (mipsnbsd_supply_gregset): Likewise.
2072         (mipsnbsd_iterate_over_regset_sections): Likewise.
2073         (mipsnbsd_supply_reg): Likewise.
2074         (mipsnbsd_supply_fpreg): Likewise.
2075         * mips-tdep.c (mips_in_frame_stub): Likewise.
2076         (mips_dummy_id): Likewise.
2077         (is_octeon_bbit_op): Likewise.
2078         (micromips_bc1_pc): Likewise.
2079         (extended_mips16_next_pc): Likewise.
2080         (mips16_next_pc): Likewise.
2081         (deal_with_atomic_sequence): Likewise.
2082         * moxie-tdep.c (moxie_process_readu): Likewise.
2083         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2084         * nto-procfs.c (procfs_store_registers): Likewise.
2085         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2086         (ppcfbsd_store_inferior_registers): Likewise.
2087         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2088         (fetch_altivec_register): Likewise.
2089         (get_spe_registers): Likewise.
2090         (fetch_spe_register): Likewise.
2091         (fetch_altivec_registers): Likewise.
2092         (fetch_all_gp_regs): Likewise.
2093         (fetch_all_fp_regs): Likewise.
2094         (store_vsx_register): Likewise.
2095         (store_altivec_register): Likewise.
2096         (set_spe_registers): Likewise.
2097         (store_spe_register): Likewise.
2098         (store_altivec_registers): Likewise.
2099         (store_all_gp_regs): Likewise.
2100         (store_all_fp_regs): Likewise.
2101         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2102         (ppc_linux_collect_gregset): Likewise.
2103         (ppc_canonicalize_syscall): Likewise.
2104         (ppc_linux_record_signal): Likewise.
2105         (ppu2spu_prev_register): Likewise.
2106         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2107         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2108         (ppcobsd_store_registers): Likewise.
2109         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2110         Likewise.
2111         (ppc_ravenscar_generic_store_registers): Likewise.
2112         * procfs.c (procfs_fetch_registers): Likewise.
2113         (procfs_store_registers): Likewise.
2114         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2115         (ravenscar_store_registers): Likewise.
2116         (ravenscar_prepare_to_store): Likewise.
2117         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2118         * record-full.c (record_full_wait_1): Likewise.
2119         (record_full_registers_change): Likewise.
2120         (record_full_store_registers): Likewise.
2121         (record_full_core_fetch_registers): Likewise.
2122         (record_full_save): Likewise.
2123         (record_full_goto_insn): Likewise.
2124         * regcache.c (regcache_register_size): Likewise.
2125         (get_regcache_arch): Remove.
2126         (regcache_read_pc): Likewise.
2127         * regcache.h (get_regcache_arch): Remove.
2128         * remote-sim.c (gdbsim_fetch_register): Likewise.
2129         (gdbsim_store_register): Likewise.
2130         * remote.c (fetch_register_using_p): Likewise.
2131         (send_g_packet): Likewise.
2132         (remote_prepare_to_store): Likewise.
2133         (store_registers_using_G): Likewise.
2134         * reverse.c (save_bookmark_command): Likewise.
2135         (goto_bookmark_command): Likewise.
2136         * rs6000-aix-tdep.c (branch_dest): Likewise.
2137         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2138         (fetch_register): Likewise.
2139         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2140         (ppc_collect_reg): Likewise.
2141         (ppc_collect_gregset): Likewise.
2142         (ppc_collect_fpregset): Likewise.
2143         (ppc_collect_vsxregset): Likewise.
2144         (ppc_collect_vrregset): Likewise.
2145         (ppc_displaced_step_hw_singlestep): Likewise.
2146         (rs6000_pseudo_register_read): Likewise.
2147         (rs6000_pseudo_register_write): Likewise.
2148         * s390-linux-nat.c (supply_gregset): Likewise.
2149         (fill_gregset): Likewise.
2150         (s390_linux_fetch_inferior_registers): Likewise.
2151         * s390-linux-tdep.c (s390_write_pc): Likewise.
2152         (s390_software_single_step): Likewise.
2153         (s390_all_but_pc_registers_record): Likewise.
2154         (s390_linux_syscall_record): Likewise.
2155         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2156         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2157         (shnbsd_store_inferior_registers): Likewise.
2158         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2159         (sh_extract_return_value_fpu): Likewise.
2160         (sh_store_return_value_nofpu): Likewise.
2161         (sh_corefile_supply_regset): Likewise.
2162         (sh_corefile_collect_regset): Likewise.
2163         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2164         (sh64_store_return_value): Likewise.
2165         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2166         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2167         (sparc_store_inferior_registers): Likewise.
2168         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2169         (sparc_ravenscar_prepare_to_store): Likewise.
2170         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2171         (sparc_analyze_control_transfer): Likewise.
2172         (sparc_step_trap): Likewise.
2173         (sparc_software_single_step): Likewise.
2174         (sparc32_gdbarch_init): Likewise.
2175         (sparc_supply_rwindow): Likewise.
2176         (sparc_collect_rwindow): Likewise.
2177         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2178         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2179         (sparc64nbsd_collect_gregset): Likewise.
2180         (sparc64nbsd_supply_fpregset): Likewise.
2181         (sparc64nbsd_collect_fpregset): Likewise.
2182         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2183         (sparc64_supply_gregset): Likewise.
2184         (sparc64_collect_gregset): Likewise.
2185         (sparc64_supply_fpregset): Likewise.
2186         (sparc64_collect_fpregset): Likewise.
2187         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2188         * spu-tdep.c (spu_unwind_sp): Likewise.
2189         (spu2ppu_prev_register): Likewise.
2190         (spu_memory_remove_breakpoint): Likewise.
2191         * stack.c (return_command): Likewise.
2192         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2193         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2194         * tracefile.c (trace_save_ctf): Likewise.
2195         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2196         (do_windows_store_inferior_registers): Likewise.
2197         (windows_resume): Likewise.
2198         * xtensa-linux-nat.c (fill_gregset): Likewise.
2199         (supply_gregset_reg): Likewise.
2200         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2201         (xtensa_register_read_masked): Likewise.
2202         (xtensa_supply_gregset): Likewise.
2203         (xtensa_extract_return_value): Likewise.
2204         (xtensa_store_return_value): Likewise.
2205
2206 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2207
2208         * doublest.c (floatformat_from_string): New function.
2209         * doublest.h (floatformat_from_string): Add prototype.
2210
2211         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2212         (OP_FLOAT): ... this.
2213         * expression.h: Do not include "doublest.h".
2214         (union exp_element): Replace doubleconst and decfloatconst by
2215         new element floatconst.
2216         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2217         (ada_evaluate_subexp): Likewise.
2218         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2219         OP_DOUBLE and OP_DECFLOAT.
2220         * expprint.c (print_subexp_standard): Likewise.
2221         (dump_subexp_body_standard): Likewise.
2222         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2223
2224         * parse.c: Include "dfp.h".
2225         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2226         (write_exp_elt_floatcst): New function.
2227         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2228         and OP_DECFLOAT.
2229         (operator_check_standard): Likewise.
2230         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2231         Return target format buffer instead of host DOUBLEST.
2232         Use floatformat_from_string and decimal_from_string to parse
2233         either binary or decimal floating-point types.
2234         (parse_c_float): Remove.
2235         * parser-defs.h: Do not include "doublest.h".
2236         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2237         (write_exp_elt_floatcst): Add prototype.
2238         (parse_float): Update prototype.
2239         (parse_c_float): Remove.
2240
2241         * c-exp.y: Do not include "dfp.h".
2242         (typed_val_float): Use byte buffer instead of DOUBLEST.
2243         (typed_val_decfloat): Remove.
2244         (DECFLOAT): Remove.
2245         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2246         (parse_number): Update to new parse_float interface.
2247         Parse suffixes and determine type before calling parse_float.
2248         Handle decimal and binary FP types the same way.
2249
2250         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2251         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2252         (parse_number): Update to new parse_float interface.
2253         Parse suffixes and determine type before calling parse_float.
2254
2255         * f-exp.y: Replace dval by typed_val_float.
2256         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2257         (parse_number): Use parse_float instead of atof.
2258
2259         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2260         (parse_go_float): Remove.
2261         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2262         (parse_number): Call parse_float instead of parse_go_float.
2263         Parse suffixes and determine type before calling parse_float.
2264
2265         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2266         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2267         (parse_number): Update to new parse_float interface.
2268         Parse suffixes and determine type before calling parse_float.
2269
2270         * m2-exp.y: Replace dval by byte buffer val.
2271         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2272         (parse_number): Call parse_float instead of atof.
2273
2274         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2275         (lex_number): Call parse_float instead of strtod.
2276         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2277         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2278         Use write_exp_elt_floatcst.
2279         (unit_testing): Remove static variable.
2280         (rust_type): Do not check unit_testing.
2281         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2282
2283         * ada-exp.y (type_float, type_double): Remove.
2284         (typed_val_float): Use byte buffer instead of DOUBLEST.
2285         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2286         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2287
2288 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2289
2290         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2291         * arch/aarch64.h: New file.
2292
2293 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2294
2295         * dfp.h (decimal_from_string): Use const reference for argument.
2296         * dfp.c (decimal_from_string): Likewise.
2297
2298 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2299
2300         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2301         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2302         * mips-tdep.c (mips_print_fp_register): Likewise.
2303
2304 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2305
2306         * common/format.h (enum argclass): Replace decfloat_arg by
2307         dec32float_arg, dec64float_arg, and dec128float_arg.
2308         * common/format.c (parse_format_string): Update to return
2309         new decimal float argument classes.
2310
2311         * printcmd.c (printf_decfloat): Rename to ...
2312         (printf_floating): ... this.  Add argclass argument, and use it
2313         instead of parsing the format string again.  Add support for
2314         binary floating-point values, using floatformat_to_string.
2315         Convert value to the target format if it doesn't already match.
2316         (ui_printf): Call printf_floating instead of printf_decfloat,
2317         also for double_arg / long_double_arg.  Pass argclass.
2318
2319         * dfp.c (decimal_to_string): Add format string argument.
2320         * dfp.h (decimal_to_string): Likewise.
2321
2322         * doublest.c (floatformat_to_string): Add format string argument.
2323         * doublest.h (floatformat_to_string): Likewise.
2324
2325 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2326
2327         * doublest.c (floatformat_precision): New routine.
2328         (floatformat_to_string): Likewise.
2329         * doublest.c (floatformat_to_string): Add prototype.
2330
2331         * printcmd.c (print_scalar_formatted): Only call print_floating
2332         on floating-point types.
2333         * valprint.c: Do not include "floatformat.h".
2334         (generic_val_print_decfloat): Remove.
2335         (generic_val_print): Call generic_val_print_float for both
2336         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2337         (print_floating): Use floatformat_to_string.  Handle decimal float.
2338         (print_decimal_floating): Remove, merge into floatformat_to_string.
2339         * value.h (print_decimal_floating): Remove.
2340
2341         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2342
2343 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2344
2345         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2346
2347 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2348
2349         * memattr.h: Don't include vec.h.
2350         (struct mem_attrib): Initialize fields.
2351         <unknown>: New static method.
2352         (struct mem_region): Add constructors, operator<, initialize
2353         fields.
2354         * memattr.c: Include algorithm.
2355         (default_mem_attrib, unknown_mem_attrib): Remove.
2356         (user_mem_region_list): New global.
2357         (target_mem_region_list, mem_region_list): Change type to
2358         std::vector<mem_region>.
2359         (mem_use_target): Now a function.
2360         (target_mem_regions_valid): Change type to bool.
2361         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2362         (require_user_regions): Adjust.
2363         (require_target_regions): Adjust.
2364         (create_mem_region): Adjust.
2365         (lookup_mem_region): Adjust.
2366         (invalidate_target_mem_regions): Adjust.
2367         (mem_clear): Rename to...
2368         (user_mem_clear): ... this, and adjust.
2369         (mem_command): Adjust.
2370         (info_mem_command): Adjust.
2371         (mem_enable, enable_mem_command, mem_disable,
2372         disable_mem_command): Adjust.
2373         (mem_delete): Adjust.
2374         (delete_mem_command): Adjust.
2375         * memory-map.h (parse_memory_map): Return an std::vector.
2376         * memory-map.c (parse_memory_map): Likewise.
2377         (struct memory_map_parsing_data): Add constructor.
2378         <memory_map>: Point to std::vector.
2379         (memory_map_start_memory): Adjust.
2380         (memory_map_end_memory): Adjust.
2381         (memory_map_end_property): Adjust.
2382         (clear_result): Remove.
2383         * remote.c (remote_memory_map): Return an std::vector.
2384         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2385         Remove.
2386         (target_debug_print_mem_region_vector): New.
2387         * target-delegates.c: Regenerate.
2388         * target.h (mem_region_vector): New typedef.
2389         (to_memory_map): Return mem_region_vector.
2390         (target_memory_map): Return an std::vector.
2391         * target.c (target_memory_map): Return an std::vector.
2392         (flash_erase_command): Adjust.
2393
2394 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2395
2396         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2397         Change type to std::string.
2398         (memory_map_start_property): Adjust.
2399         (memory_map_end_property): Adjust.
2400
2401 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2402
2403         * infrun.h: Include common/byte-vector.h.
2404         (struct displaced_step_closure): New struct.
2405         (struct buf_displaced_step_closure): New struct.
2406         * infrun.c (displaced_step_closure::~displaced_step_closure):
2407         Provide default implementation.
2408         (displaced_step_clear): Deallocate step closure with delete.
2409         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2410         (aarch64_displaced_step_closure): ... this, extend
2411         displaced_step_closure.
2412         (aarch64_displaced_step_data) <dsc>: Change type to
2413         aarch64_displaced_step_closure.
2414         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2415         unique_ptr.
2416         (aarch64_displaced_step_fixup): Add cast for displaced step
2417         closure.
2418         * amd64-tdep.c (displaced_step_closure): Rename to ...
2419         (amd64_displaced_step_closure): ... this, extend
2420         displaced_step_closure.
2421         <insn_buf>: Change type to std::vector<gdb_byte>.
2422         <max_len>: Remove.
2423         (fixup_riprel): Change type of DSC parameter, adjust to type
2424         change of insn_buf.
2425         (fixup_displaced_copy): Change type of DSC parameter.
2426         (amd64_displaced_step_copy_insn): Instantiate
2427         amd64_displaced_step_closure.
2428         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2429         to type change of insn_buf.
2430         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2431         parameter DSC.
2432         (arm_linux_copy_svc): Likewise.
2433         (cleanup_kernel_helper_return): Likewise.
2434         (arm_catch_kernel_helper_return): Likewise.
2435         (arm_linux_displaced_step_copy_insn): Instantiate
2436         arm_displaced_step_closure.
2437         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2438         (displaced_read_reg): Change type of parameter DSC.
2439         (branch_write_pc): Likewise.
2440         (load_write_pc): Likewise.
2441         (alu_write_pc): Likewise.
2442         (displaced_write_reg): Likewise.
2443         (arm_copy_unmodified): Likewise.
2444         (thumb_copy_unmodified_32bit): Likewise.
2445         (thumb_copy_unmodified_16bit): Likewise.
2446         (cleanup_preload): Likewise.
2447         (install_preload): Likewise.
2448         (arm_copy_preload): Likewise.
2449         (thumb2_copy_preload): Likewise.
2450         (install_preload_reg): Likewise.
2451         (arm_copy_preload_reg): Likewise.
2452         (cleanup_copro_load_store): Likewise.
2453         (install_copro_load_store): Likewise.
2454         (arm_copy_copro_load_store) Likewise.
2455         (thumb2_copy_copro_load_store): Likewise.
2456         (cleanup_branch): Likewise.
2457         (install_b_bl_blx): Likewise.
2458         (arm_copy_b_bl_blx): Likewise.
2459         (thumb2_copy_b_bl_blx): Likewise.
2460         (thumb_copy_b): Likewise.
2461         (install_bx_blx_reg): Likewise.
2462         (arm_copy_bx_blx_reg): Likewise.
2463         (thumb_copy_bx_blx_reg): Likewise.
2464         (cleanup_alu_imm): Likewise.
2465         (arm_copy_alu_imm): Likewise.
2466         (thumb2_copy_alu_imm): Likewise.
2467         (cleanup_alu_reg): Likewise.
2468         (install_alu_reg): Likewise.
2469         (arm_copy_alu_reg): Likewise.
2470         (thumb_copy_alu_reg): Likewise.
2471         (cleanup_alu_shifted_reg): Likewise.
2472         (install_alu_shifted_reg): Likewise.
2473         (arm_copy_alu_shifted_reg): Likewise.
2474         (cleanup_load): Likewise.
2475         (cleanup_store): Likewise.
2476         (arm_copy_extra_ld_st): Likewise.
2477         (install_load_store): Likewise.
2478         (thumb2_copy_load_literal): Likewise.
2479         (thumb2_copy_load_reg_imm): Likewise.
2480         (arm_copy_ldr_str_ldrb_strb): Likewise.
2481         (cleanup_block_load_all): Likewise.
2482         (cleanup_block_store_pc): Likewise.
2483         (cleanup_block_load_pc): Likewise.
2484         (arm_copy_block_xfer): Likewise.
2485         (thumb2_copy_block_xfer): Likewise.
2486         (cleanup_svc): Likewise.
2487         (install_svc): Likewise.
2488         (arm_copy_svc): Likewise.
2489         (thumb_copy_svc): Likewise.
2490         (arm_copy_undef): Likewise.
2491         (thumb_32bit_copy_undef): Likewise.
2492         (arm_copy_unpred): Likewise.
2493         (arm_decode_misc_memhint_neon): Likewise.
2494         (arm_decode_unconditional): Likewise.
2495         (arm_decode_miscellaneous): Likewise.
2496         (arm_decode_dp_misc): Likewise.
2497         (arm_decode_ld_st_word_ubyte): Likewise.
2498         (arm_decode_media): Likewise.
2499         (arm_decode_b_bl_ldmstm): Likewise.
2500         (arm_decode_ext_reg_ld_st): Likewise.
2501         (thumb2_decode_dp_shift_reg): Likewise.
2502         (thumb2_decode_ext_reg_ld_st): Likewise.
2503         (arm_decode_svc_copro): Likewise.
2504         (thumb2_decode_svc_copro): Likewise.
2505         (install_pc_relative): Likewise.
2506         (thumb_copy_pc_relative_16bit): Likewise.
2507         (thumb_decode_pc_relative_16bit): Likewise.
2508         (thumb_copy_pc_relative_32bit): Likewise.
2509         (thumb_copy_16bit_ldr_literal): Likewise.
2510         (thumb_copy_cbnz_cbz): Likewise.
2511         (thumb2_copy_table_branch): Likewise.
2512         (cleanup_pop_pc_16bit_all): Likewise.
2513         (thumb_copy_pop_pc_16bit): Likewise.
2514         (thumb_process_displaced_16bit_insn): Likewise.
2515         (decode_thumb_32bit_ld_mem_hints): Likewise.
2516         (thumb_process_displaced_32bit_insn): Likewise.
2517         (thumb_process_displaced_insn): Likewise.
2518         (arm_process_displaced_insn): Likewise.
2519         (arm_displaced_init_closure): Likewise.
2520         (arm_displaced_step_fixup): Add cast for closure.
2521         * arm-tdep.h: Include infrun.h.
2522         (displaced_step_closure): Rename to ...
2523         (arm_displaced_step_closure): ... this, extend
2524         displaced_step_closure.
2525         <u::svc::copy_svc_os>: Change type of parameter DSC.
2526         <cleanup>: Likewise.
2527         (arm_process_displaced_insn): Likewise.
2528         (arm_displaced_init_closure): Likewise.
2529         (displaced_read_reg): Likewise.
2530         (displaced_write_reg): Likewise.
2531         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2532         Adjust.
2533         * i386-tdep.h: Include infrun.h.
2534         (i386_displaced_step_closure): New typedef.
2535         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2536         i386_displaced_step_closure.
2537         (i386_displaced_step_fixup): Adjust.
2538         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2539         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2540         and unique_ptr.
2541         (ppc_displaced_step_fixup): Adjust.
2542         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2543         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2544         and unique_ptr.
2545         (s390_displaced_step_fixup): Adjust.
2546
2547 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2548
2549         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2550         Remove declarations.
2551
2552 2017-10-20  Tom Tromey  <tom@tromey.com>
2553
2554         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2555         std::vector.
2556         (gdb_bfd_record_inclusion): Update.
2557         (bfdp): Remove typedef.
2558
2559 2017-10-20  Tom Tromey  <tom@tromey.com>
2560
2561         * gdb_bfd.c (gdb_bfd_ref): Use new.
2562         (struct gdb_bfd_data): Add constructor, destructor, and member
2563         initializers.
2564         (gdb_bfd_unref): Use delete.
2565
2566 2017-10-20  Tom Tromey  <tom@tromey.com>
2567
2568         * exec.c (exec_file_attach): Use new_bfd_ref.
2569         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2570         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2571         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2572         new_bfd_ref.
2573         * gdb_bfd.h (new_bfd_ref): New function.
2574
2575 2017-10-20  Pedro Alves  <palves@redhat.com>
2576
2577         * main.c (captured_command_loop): Add attribute noinline.
2578
2579 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2580
2581         * interps.c (struct interp_factory): Add constructor.
2582         (interp_factory_p): Remove typedef.
2583         (DEF_VEC_P(interp_factory_p)): Remove.
2584         (interpreter_factories): Change type to std::vector.
2585         (interp_factory_register): Adjust.
2586         (interp_lookup): Adjust.
2587         (interpreter_completer): Adjust.
2588
2589 2017-10-19  Tom Tromey  <tom@tromey.com>
2590
2591         * break-catch-syscall.c (catch_syscall_completer): Use
2592         std::string, gdb::unique_xmalloc_ptr.
2593
2594 2017-10-19  Tom Tromey  <tom@tromey.com>
2595
2596         * infcall.c (call_function_by_hand_dummy): Use std::string.
2597
2598 2017-10-19  Tom Tromey  <tom@tromey.com>
2599
2600         * mi/mi-main.c (mi_cmd_execute): Update.
2601         * top.h (prepare_execute_command): Return scoped_value_mark.
2602         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2603         Add move constructor.
2604         * top.c (prepare_execute_command): Return scoped_value_mark.
2605         (execute_command): Update.
2606
2607 2017-10-19  Pedro Alves  <palves@redhat.com>
2608
2609         * xml-support.c (xml_fetch_content_from_file): Check fread's
2610         return.
2611
2612 2017-10-19  Pedro Alves  <palves@redhat.com>
2613
2614         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2615         async.
2616         (handle_error_fd): New function.
2617         (ser_base_async): Add/delete an event loop file handler for
2618         error_fd.
2619
2620 2017-10-19  Pedro Alves  <palves@redhat.com>
2621
2622         * xml-support.c (xml_fetch_content_from_file): Don't read in
2623         chunks.  Instead use fseek to determine the file's size, and read
2624         it in one go.
2625
2626 2017-11-18  Keith Seitz  <keiths@redhat.com>
2627
2628         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2629         types.
2630         Add whitespace to front of type name.
2631
2632 2017-10-18  Keith Seitz  <keiths@redhat.com>
2633
2634         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2635         DW_AT_accessibility.
2636
2637 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2638
2639         * features/tic6x-c62x-linux.c: Remove.
2640
2641 2017-10-17  Tom Tromey  <tom@tromey.com>
2642
2643         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2644         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2645         (do_mixed_source_and_assembly): Likewise.
2646
2647 2017-10-17  Tom Tromey  <tom@tromey.com>
2648
2649         * regcache.c (regcache::xfer_part): Remove assertion.
2650
2651 2017-10-17  Pedro Alves  <palves@redhat.com>
2652
2653         * xml-support.c (xml_fetch_content_from_file): Call
2654         unique_ptr::release() instead unique_ptr::get() when passing
2655         through xrealloc.
2656
2657 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2658
2659         * regcache.c (regcache::xfer_part): Remove parameters read and
2660         write, add parameter is_raw.  All callers are updated.
2661
2662 2017-10-16  Keith Seitz  <keiths@redhat.com>
2663
2664         * c-typeprint.c (enum access_specifier): Moved here from
2665         c_type_print_base.
2666         (output_access_specifier): New function.
2667         (c_type_print_base): Consider typedefs when assessing
2668         whether access labels are needed.
2669         Use output_access_specifier as needed.
2670         Output access specifier for typedefs, if needed.
2671         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2672         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2673         fields.
2674         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2675         accessor macros.
2676
2677 2017-10-16  Tom Tromey  <tom@tromey.com>
2678
2679         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2680         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2681         * target.c (target_fileio_read_stralloc): Update.
2682         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2683         * target.h (target_fileio_read_stralloc): Return
2684         unique_xmalloc_ptr.
2685
2686 2017-10-16  Tom Tromey  <tom@tromey.com>
2687
2688         * xml-syscall.c (xml_init_syscalls_info): Update.
2689         * xml-support.c (xinclude_start_include): Update.
2690         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2691         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2692         (xml_fetch_content_from_file): Likewise.
2693         * osdata.c (get_osdata): Update.
2694         * target.h (target_read_stralloc, target_get_osdata): Return
2695         unique_xmalloc_ptr.
2696         * solib-aix.c (solib_aix_get_library_list): Update.
2697         * solib-target.c (solib_target_current_sos): Update.
2698         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2699         * xml-tdesc.c (fetch_available_features_from_target): Update.
2700         (target_fetch_description_xml): Update.
2701         (file_read_description_xml): Update.
2702         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2703         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2704         (remote_pid_to_exec_file): Update.
2705         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2706         (target_get_osdata): Likewise.
2707
2708 2017-10-16  Tom Tromey  <tom@tromey.com>
2709
2710         * remote.c (remote_register_number_and_offset): Use std::vector.
2711         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2712         (putpkt_binary): Use gdb::def_vector.
2713         (compare_sections_command): Use gdb::byte_vector.
2714
2715 2017-10-16  Tom Tromey  <tom@tromey.com>
2716
2717         * ppc-linux-nat.c (hwdebug_insert_point): Use
2718         gdb::unique_xmalloc_ptr, XDUP.
2719
2720 2017-10-16  Tom Tromey  <tom@tromey.com>
2721
2722         * probe.c (parse_probes): Use std::string.
2723         (info_probes_for_ops, enable_probes_command)
2724         (disable_probes_command): Remove cleanups.
2725
2726 2017-10-16  Tom Tromey  <tom@tromey.com>
2727
2728         * buildsym.c (block_compar): Remove.
2729         (end_symtab_get_static_block): Use std::vector.
2730
2731 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2732
2733         * memrange.h (struct mem_range): Define operator< and operator==.
2734         (mem_range_s): Remove.
2735         (DEF_VEC_O (mem_range_s)): Remove.
2736         (normalize_mem_ranges): Change parameter type to std::vector.
2737         * memrange.c (compare_mem_ranges): Remove.
2738         (normalize_mem_ranges): Change parameter type to std::vector,
2739         adjust to vector change.
2740         * exec.c (section_table_available_memory): Return vector, remove
2741         parameter.
2742         (section_table_read_available_memory): Adjust to std::vector
2743         change.
2744         * remote.c (remote_read_bytes): Adjust to std::vector
2745         change.
2746         * tracepoint.h (traceframe_available_memory): Change parameter
2747         type to std::vector.
2748         * tracepoint.c (traceframe_available_memory): Change parameter
2749         type to std::vector, adjust.
2750         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2751         std::vector change.
2752         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2753         unittests/memrange-selftests.c.
2754         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2755         * gdb/unittests/memrange-selftests.c: New file.
2756
2757 2017-10-16  Pedro Alves  <palves@redhat.com>
2758
2759         * elfread.c (probe_key_free): Rename range-for variable.
2760         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2761         (find_probe_by_pc, collect_probes): Rename range-for variable.
2762
2763 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2764
2765         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2766         * features/tic6x-c62x.c: Remove.
2767         * features/tic6x-c64x-linux.c: Remove.
2768         * features/tic6x-c64x.c: Remove.
2769         * features/tic6x-c64xp-linux.c: Remove.
2770         * features/tic6x-c64xp.c: Remove.
2771         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2772         initialize_tdesc_tic6x_*_linux functions.
2773         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2774         initialize_tdesc_tic6x_* functions.
2775
2776 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2777
2778         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2779         tic6x-c62x.
2780         * regformats/tic6x-c62x.dat: Remove.
2781         * regformats/tic6x-c64x.dat: Remove.
2782         * regformats/tic6x-c64xp.dat: Remove.
2783
2784 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2785
2786         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2787         (the !HAVE_LIBEXPAT version).
2788
2789 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2790
2791         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2792         const.
2793
2794 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2795
2796         * target.h: Include tracepoint.h.
2797         (enum trace_find_type): Move to tracepoint.h.
2798         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2799         * tracepoint.h: Don't include target.h
2800         (enum trace_find_type): Move from target.h.
2801         (parse_traceframe_info): Return a unique ptr.
2802         * tracepoint.c (current_traceframe_info): Change type to unique
2803         ptr.
2804         (free_traceframe_info): Remove.
2805         (clear_traceframe_info): Don't manually free
2806         current_traceframe_info.
2807         (free_result): Remove.
2808         (parse_traceframe_info): Return a unique ptr.
2809         (get_traceframe_info): Adjust to unique ptr.
2810         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2811         * remote.c (remote_traceframe_info): Return a unique ptr.
2812         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2813         ptr.
2814         * target-debug.h (target_debug_print_traceframe_info_up): New
2815         macro.
2816         * target-delegates.c: Regenerate.
2817
2818 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2819
2820         * memrange.h (struct mem_range): Add constructors.
2821         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2822         std::vector<mem_range>.
2823         * tracepoint.c (free_traceframe_info): Don't manually free
2824         vector.
2825         (traceframe_info_start_memory): Adjust to vector change.
2826         (traceframe_available_memory): Likewise.
2827         * tracefile-tfile.c (build_traceframe_info): Likewise.
2828         * ctf.c (ctf_traceframe_info): Likewise.
2829
2830 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2831
2832         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2833         std::vector<int>.
2834         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2835         (traceframe_info_start_tvar): Adjust to vector change.
2836         (parse_traceframe_info): Allocate with new.
2837         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2838         vector change.
2839         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2840         change.
2841         tfile_traceframe_info): Allocate with new.
2842         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2843         change.
2844
2845 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2846
2847         * tracepoint.c (traceframe_info): Rename to...
2848         (current_traceframe_info): ...this.
2849         (clear_traceframe_info): Adjust.
2850         (get_traceframe_info): Adjust.
2851
2852 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2853
2854         * nat/linux-osdata.c: Include algorithm.
2855         (compare_processes): Remove.
2856         (struct pid_pgid_entry): New struct.
2857         (linux_xfer_osdata_processgroups): Use std::vector instead of
2858         XNEWVEC.
2859
2860 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2861
2862         * objfiles.h: Don't include symfile.h.
2863         (struct partial_symbol): Remove forward-declaration.
2864         (struct objfile) <global_psymbols, static_psymbols>: Change type
2865         to std::vector<partial_symbol *>.
2866         * objfiles.c (objfile::objfile): Don't memset those fields.
2867         (objfile::~objfile): Don't free those fields.
2868         * psympriv.h (struct psymbol_allocation_list): Remove
2869         forward-declaration.
2870         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2871         to std::vector.
2872         (start_psymtab_common): Change parameters to std::vector.
2873         * psymtab.c: Include algorithm.
2874         (require_partial_symbols): Call shrink_to_fit.
2875         (find_pc_sect_psymbol): Adjust to vector change.
2876         (match_partial_symbol): Likewise.
2877         (lookup_partial_symbol): Likewise.
2878         (psym_relocate): Likewise.
2879         (dump_psymtab): Likewise.
2880         (recursively_search_psymtabs): Likewise.
2881         (compare_psymbols): Remove.
2882         (sort_pst_symbols): Adjust to vector change.
2883         (start_psymtab_common): Likewise.
2884         (end_psymtab_common): Likewise.
2885         (psymbol_bcache_full): De-constify return value.
2886         (add_psymbol_to_bcache): Likewise.
2887         (extend_psymbol_list): Remove.
2888         (append_psymbol_to_list): Adjust to vector change.
2889         (add_psymbol_to_list): Likewise.
2890         (init_psymbol_list): Likewise.
2891         (maintenance_info_psymtabs): Likewise.
2892         (maintenance_check_psymtabs): Likewise.
2893         * symfile.h (struct psymbol_allocation_list): Remove.
2894         * symfile.c (reread_symbols): Adjust to vector change.
2895         * dbxread.c (start_psymtab): Change type of parameters.
2896         (dbx_symfile_read): Adjust to vector change.
2897         (read_dbx_symtab): Likewise.
2898         (start_psymtab): Change type of parameters.
2899         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2900         (create_partial_symtab): Likewise.
2901         (add_partial_symbol): Likewise.
2902         (write_one_signatured_type): Likewise.
2903         (recursively_write_psymbols): Likewise.
2904         * mdebugread.c (parse_partial_symbols): Likewise.
2905         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2906         (scan_xcoff_symtab): Adjust to vector change.
2907         (xcoff_initial_scan): Likewise.
2908
2909 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2910
2911         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2912
2913 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2914
2915         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2916         Remove s390x-*-expedite, add s390x-expedite.
2917
2918 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2919
2920         * features/s390-gs-linux64.c: Regenerated.
2921         * features/s390x-gs-linux64.c: Regenerated.
2922
2923 2017-10-13  Tom Tromey  <tom@tromey.com>
2924
2925         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2926         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2927         delete.
2928         * symfile.c (symbol_file_add_with_addrs): Use new.
2929         (symbol_file_add_separate): Update comment.
2930         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2931         * jit.c (jit_object_close_impl): Use new.
2932         (jit_unregister_code): Use delete.
2933         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2934         (~objfile): Rename from free_objfile.
2935         (free_objfile_separate_debug, do_free_objfile_cleanup)
2936         (free_all_objfiles, objfile_purge_solibs): Use delete.
2937         * objfiles.h (struct objfile): Add constructor and destructor.
2938         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2939         (allocate_objfile, free_objfile): Don't declare.
2940         (struct objstats): Add initializers.
2941
2942 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2943
2944         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2945         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2946         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2947         * gdbarch.h: Regenerate.
2948         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2949         Adjust comment.
2950         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2951         (i386_displaced_step_fixup): Adjust comment.
2952         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2953
2954 2017-10-12  Tom Tromey  <tom@tromey.com>
2955
2956         * prologue-value.h (pv_area::store_would_trash): Return bool.
2957         (pv_area::find_reg): Likewise.
2958         * prologue-value.c (pv_area::store_would_trash): Return bool.
2959         (pv_area::find_reg): Likewise.
2960
2961 2017-10-12  Tom Tromey  <tom@tromey.com>
2962
2963         * s390-linux-tdep.c (s390_store, s390_load)
2964         (s390_check_for_saved, s390_analyze_prologue): Update.
2965         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2966         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2967         * prologue-value.h (class pv_area): Move from prologue-value.c.
2968         Change names of members.  Add constructor, destructor, member
2969         functions.
2970         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2971         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2972         (pv_area_fetch, pv_area_scan): Don't declare.
2973         * prologue-value.c (struct pv_area::area_entry): Now member of
2974         pv_area.
2975         (struct pv_area): Move to prologue-value.h.
2976         (pv_area::pv_area): Rename from make_pv_area.
2977         (pv_area::~pv_area): Rename from free_pv_area.
2978         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2979         (clear_entries, find_entry, overlaps, store_would_trash, store)
2980         (fetch, find_reg, scan): Now member of pv_area.
2981         Remove "area" argument.  Update.
2982         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2983         Update.
2984         * mn10300-tdep.c (push_reg, check_for_saved)
2985         (mn10300_analyze_prologue): Update.
2986         * mep-tdep.c (is_arg_spill, check_for_saved)
2987         (mep_analyze_prologue): Update.
2988         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2989         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2990         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2991         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2992         Update.
2993         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2994         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2995
2996 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2997
2998         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2999         * linux-nat.c (linux_nat_delete_thread): New variable.
3000         (lwp_free): Invoke linux_nat_delete_thread if set.
3001         (linux_nat_set_delete_thread): New function.
3002         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3003         thread delete callback.
3004         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3005         (_initialize_arm_linux_nat): Assign thread delete callback.
3006         * s390-linux-nat.c (s390_delete_thread): New function.
3007         (_initialize_s390_nat): Assign thread delete callback.
3008         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3009         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3010         function.
3011         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3012         declaration.
3013         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3014         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3015
3016 2017-10-09  Tom Tromey  <tom@tromey.com>
3017
3018         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3019         std::string.
3020         * tui/tui-layout.c (enum tui_status): Use std::string.
3021
3022 2017-10-11  Tom Tromey  <tom@tromey.com>
3023
3024         * gdbthread.h (thread_command): Constify.
3025         * inferior.h (detach_command): Constify.
3026         * top.h (set_history, show_history): Constify.
3027         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3028         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3029         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3030         * printcmd.c (set_command): Constify.
3031         (non_const_set_command): New function.
3032         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3033         * breakpoint.c (enable_command, disable_command, delete_command)
3034         (catch_command, tcatch_command, set_breakpoint_cmd)
3035         (show_breakpoint_cmd): Constify.
3036         * macrocmd.c (macro_command): Constify.
3037         * infcmd.c (unset_command, kill_command, detach_command)
3038         (info_proc_cmd): Constify.
3039         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3040         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3041         (info_auto_load_cmd): Constify.
3042         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3043         (unset_tdesc_cmd): Constify.
3044         * ada-lang.c (set_ada_command, show_ada_command)
3045         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3046         * guile/guile.c (set_guile_command, show_guile_command)
3047         (info_guile_command): Constify.
3048         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3049         Constify.
3050         * skip.c (skip_command): Constify.
3051         * compile/compile.c (_initialize_compile): Constify.
3052         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3053         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3054         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3055         (maint_btrace_pt_show_cmd): Constify.
3056         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3057         Constify.
3058         * python/python.c (user_show_python, user_set_python): Constify.
3059         * mips-tdep.c (set_mips_command, show_mips_command)
3060         (set_mipsfpu_command): Constify.
3061         * record-btrace.c (cmd_record_btrace_start)
3062         (cmd_set_record_btrace, cmd_show_record_btrace)
3063         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3064         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3065         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3066         Constify.
3067         * symfile.c (overlay_command): Constify.
3068         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3069         * cli/cli-logging.c (set_logging_command, show_logging_command):
3070         Constify.
3071         * cli/cli-dump.c (dump_command, append_command)
3072         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3073         (tekhex_dump_command, binary_dump_command)
3074         (binary_append_command): Constify.
3075         * cli/cli-decode.c (struct cmd_list_element): Change type of
3076         "fun".
3077         * cli/cli-cmds.c (info_command, show_command, set_debug)
3078         (show_debug): Constify.
3079         (show_command): Add non-const overload.
3080         * top.c (set_history, show_history): Constify.
3081         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3082         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3083         * target.c (target_command): Constify.
3084         * sparc64-tdep.c (info_adi_command): Constify.
3085         * record-full.c (cmd_record_full_start): Constify.
3086         (set_record_full_command): Constify.  Fix typo.
3087         (show_record_full_command): Constify.
3088         * thread.c (thread_command, thread_apply_command): Constify.
3089         * memattr.c (dummy_cmd): Constify.
3090         * value.c (function_command): Constify.
3091         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3092         * probe.c (info_probes_command): Constify.
3093         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3094         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3095         (show_thread_cmd, set_thread_default_cmd)
3096         (show_thread_default_cmd): Constify.
3097         (check_empty): Constify.
3098         * tracepoint.c (tfind_command): Constify.
3099         * cp-support.c (maint_cplus_command): Constify.
3100         * windows-tdep.c (info_w32_command): Constify.
3101         * record.c (cmd_record_start, set_record_command)
3102         (show_record_command, info_record_command, cmd_record_goto):
3103         Constify.
3104         * ravenscar-thread.c (set_ravenscar_command)
3105         (show_ravenscar_command): Constify.
3106         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3107         Constify.
3108         (add_internal_problem_command): Remove casts.
3109         * arc-tdep.c (maintenance_print_arc_command): Constify.
3110         * valprint.c (set_print, show_print, set_print_raw)
3111         (show_print_raw): Constify.
3112         * maint.c (maintenance_command, maintenance_info_command)
3113         (maintenance_print_command, maintenance_set_cmd)
3114         (maintenance_show_cmd, set_per_command_cmd)
3115         (show_per_command_cmd, maintenance_check_command): Constify.
3116         * language.c (set_check, show_check): Constify.
3117         * typeprint.c (show_print_type, set_print_type): Constify.
3118         * go32-nat.c (go32_info_dos_command): Constify.
3119
3120 2017-10-11  Tom Tromey  <tom@tromey.com>
3121
3122         * breakpoint.c (prepare_re_set_context): Remove.
3123         (breakpoint_re_set_one): Update.  Don't use cleanups.
3124         (breakpoint_re_set): Use scoped_restore, std::string, and
3125         scoped_restore_current_language.
3126
3127 2017-10-11  Tom Tromey  <tom@tromey.com>
3128
3129         * breakpoint.c (commands_command_1): Use std::string.
3130         (cleanup_executing_breakpoints): Remove.
3131         (bpstat_do_actions_1): Use scoped_restore.
3132         (bpstat_check_watchpoint): Use std::string.
3133         (decode_static_tracepoint_spec): Likewise.
3134         (break_range_command): Likewise.
3135         (watch_command_1): Likewise.
3136         (compare_breakpoints): Change argument types.
3137         (clear_command): Use std::vector.
3138         (cleanup_executing_breakpoints): Remove.
3139         (update_global_location_list): Use unique_xmalloc_ptr.
3140         (strace_command): Remove unused declaration.
3141
3142 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3143
3144         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3145         * NEWS: Mention new FreeBSD/arm native configuration.
3146         * configure.host: Add arm*-*-freebsd*.
3147         * configure.nat: Likewise.
3148         * arm-fbsd-nat.c: New file.
3149
3150 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3151
3152         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3153         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3154         * NEWS: Mention new FreeBSD/arm target.
3155         * configure.tgt: Add arm*-*-freebsd*.
3156         * arm-fbsd-tdep.c: New file.
3157         * arm-fbsd-tdep.h: New file.
3158
3159 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3160
3161         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3162         `gdbarch_elfcore_write_linux_prpsinfo'.
3163         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3164         method.
3165         (elf_internal_linux_prpsinfo): Remove declaration.
3166         * gdbarch.h: Regenerate.
3167         * gdbarch.c: Regenerate.
3168
3169 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3170
3171         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3172         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3173
3174 2017-10-11  Pedro Alves  <palves@redhat.com>
3175
3176         * breakpoint.c (reattach_breakpoints): Delete.
3177         * breakpoint.h (reattach_breakpoints): Delete.
3178
3179 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3180
3181         * symfile.c (registered_sym_fns): Make struct, not typedef.
3182         (DEF_VEC_O (registered_sym_fns)): Remove.
3183         (symtab_fns): Change type to std::vector.
3184         (add_symtab_fns): Adjust.
3185         (find_sym_fns): Adjust.
3186
3187 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3188
3189         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3190         * arc-tdep.h (arc_arch_is_em): New function.
3191         (arc_arch_is_hs): Likewise.
3192
3193 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3194
3195         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3196         parentheses in the declaration.
3197         (macro_lookup_inclusion): Likewise.
3198         (macro_lookup_definition): Likewise.
3199         * p-lang.h (pascal_builtin_types): Likewise.
3200         * tui/tui-data.c (tui_win_list): Likewise.
3201         * tui/tui-data.h (tui_win_list): Likewise.
3202         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3203
3204 2017-10-11  Mark Rages  <markrages@gmail.com>
3205
3206         * target-memory.c (block_boundaries): Fix for block address not
3207         aligned on block size.
3208
3209 2017-10-10  Pedro Alves <palves@redhat.com>
3210             Tom Tromey  <tom@tromey.com>
3211
3212         * breakpoint.c (struct captured_breakpoint_query_args)
3213         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3214         (print_breakpoint): New.
3215         * breakpoint.h (print_breakpoint): Declare.
3216         * common/common-exceptions.h (enum return_reason): Remove
3217         references to catch_exceptions.
3218         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3219         Delete.
3220         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3221         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3222         * gdb.h: Delete.
3223         * gdbthread.h (thread_select): Declare.
3224         * mi/mi-cmd-break.c: Don't include gdb.h.
3225         (breakpoint_notify): Use print_breakpoint.
3226         * mi/mi-cmd-catch.c: Don't include gdb.h.
3227         * mi/mi-interp.c: Don't include gdb.h.
3228         (mi_print_breakpoint_for_event): New.
3229         (mi_breakpoint_created, mi_breakpoint_modified): Use
3230         mi_print_breakpoint_for_event.
3231         * mi/mi-main.c: Don't include gdb.h.
3232         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3233         thread_select instead of gdb_thread_select.
3234         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3235         of using gdb_list_thread_ids.
3236         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3237         FILEIO_ENOSYS here.
3238         (remote_fileio_request): Use TRY/CATCH instead of
3239         catch_exceptions.
3240         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3241         (symbol_file_add_from_memory_wrapper): Delete.
3242         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3243         * thread.c: Don't include gdb.h.
3244         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3245         (thread_alive): Use thread_select.
3246         (do_captured_thread_select): Delete, parts salvaged as ...
3247         (thread_select): ... this new function.
3248         (gdb_thread_select): Delete.
3249
3250 2017-10-10  Pedro Alves  <palves@redhat.com>
3251             Tom Tromey  <tom@tromey.com>
3252
3253         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3254         and reverse logic.
3255         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3256         No longer macros.  Instead ...
3257         (enum wp_check_result): They're now values of this new
3258         enumeration.
3259         (watchpoint_check): Change return type to wp_check_result and
3260         parameter type to bpstat.
3261         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3262         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3263         catch_errors.  Reverse logic of watchpoint_check call.
3264         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3265         pointer as parameter.
3266         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3267         * common/common-exceptions.c (throw_exception_sjlj): Update
3268         comments to avoid mentioning catch_errors.
3269         * exceptions.c (catch_errors): Delete.
3270         * exceptions.h: Update comments to avoid mentioning catch_errors.
3271         (catch_errors_ftype, catch_errors): Delete.
3272         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3273         (hook_stop_stub): Delete.
3274         (restore_selected_frame): Change return type to void, and
3275         parameter type to const frame_id &.
3276         (restore_infcall_control_state): Use TRY/CATCH instead of
3277         catch_errors.
3278         * main.c (captured_command_loop): Return void and remove
3279         parameter.  Remove references to catch_errors.
3280         (captured_main): Use TRY/CATCH instead of catch_errors.
3281         * objc-lang.c (objc_submethod_helper_data)
3282         (find_objc_msgcall_submethod_helper): Delete.
3283         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3284         catch_errors.
3285         * record-full.c (record_full_message): Return void.
3286         (record_full_message_args, record_full_message_wrapper): Delete.
3287         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3288         instead of catch_errors.
3289         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3290         parameter type to int.
3291         * solib-darwin.c (open_symbol_file_object): Ditto.
3292         * solib-dsbt.c (open_symbol_file_object): Ditto.
3293         * solib-frv.c (open_symbol_file_object): Ditto.
3294         * solib-svr4.c (open_symbol_file_object): Ditto.
3295         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3296         * solib.c (update_solib_list): Use TRY/CATCH instead of
3297         catch_errors.
3298         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3299         Change type.
3300         * symmisc.c (struct print_symbol_args): Remove.
3301         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3302         (print_symbol): Change type.
3303         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3304         and remove parameters.
3305         (catch_errors): New.
3306         (get_windows_debug_event): Adjust.
3307
3308 2017-10-09  Tom Tromey  <tom@tromey.com>
3309
3310         * mi/mi-main.c (free_splay_tree): Remove.
3311         (list_available_thread_groups): Use splay_tree_up.
3312         * common/gdb_splay_tree.h: New file.
3313
3314 2017-10-09  Tom Tromey  <tom@tromey.com>
3315
3316         * mi/mi-main.c (do_nothing): Remove.
3317         (list_available_thread_groups): Update.
3318
3319 2017-10-09  Pedro Alves  <palves@redhat.com>
3320
3321         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3322         reading registers when switching context.
3323
3324 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3325
3326         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3327         (fbsd_convert_siginfo): Likewise.
3328         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3329
3330 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3331
3332         * configure.ac (try_guile_versions): Remove guile-2.2.
3333         * configure: Regenerate.
3334
3335 2017-10-09  Tom Tromey  <tom@tromey.com>
3336
3337         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3338         (COMPILE.pre): Use $(CXX).
3339
3340 2017-10-09  Pedro Alves  <palves@redhat.com>
3341
3342         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3343         Use bool.
3344         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3345         * cp-support.h (cp_remove_params): Now returns a
3346         gdb::unique_xmalloc_ptr.
3347         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3348         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3349         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3350         returning a gdb::unique_xmalloc_ptr.
3351         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3352         * stack.c (find_frame_funname): Adjust to cp_remove_params
3353         returning a gdb::unique_xmalloc_ptr.
3354
3355 2017-10-08  Tom Tromey  <tom@tromey.com>
3356
3357         * dwarf2read.c (dwarf2_get_dwz_file): Use
3358         gdb::unique_xmalloc_ptr.
3359         (find_slot_in_mapped_hash): Likewise.
3360         (dwarf2_physname): Likewise.
3361         (create_dwo_unit_in_dwp_v1): Use std::string.
3362         (create_dwo_unit_in_dwp_v2): Likewise.
3363         (lookup_dwo_cutu): Likewise.
3364         (inherit_abstract_dies): Use std::vector.
3365         (read_array_type): Likewise.
3366         (dwarf_decode_macros): Remove unused declaration.
3367         (unsigned_int_compar): Remove.
3368         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3369         (psymtabs_addrmap_cleanup): Remove.
3370
3371 2017-10-08  Tom Tromey  <tom@tromey.com>
3372
3373         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3374         * frame.h (frame_cleanup_after_sniffer): Declare.
3375         (frame_prepare_for_sniffer): Return void.
3376         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3377         type of argument.
3378         (frame_prepare_for_sniffer): Return void.
3379
3380 2017-10-08  Tom Tromey  <tom@tromey.com>
3381
3382         * utils.h (make_cleanup_value_free): Remove.
3383         * utils.c (do_value_free, struct cleanup): Remove.
3384         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3385         Use gdb_value_up.
3386         * value.h (struct value_deleter): New.
3387         (gdb_value_up): New typedef.
3388
3389 2017-10-08  Tom Tromey  <tom@tromey.com>
3390
3391         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3392         (make_cleanup_free_search_symbols): Remove.
3393         (search_symbols): Return std::vector.
3394         (symbol_search::compare_search_syms): Now member of
3395         symbol_search.  Change arguments.
3396         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3397         (symtab_symbol_info, rbreak_command): Update.
3398         * symtab.h (struct symbol_search) <next>: Remove.
3399         Add constructors.
3400         (symbol_search::operator<): New function.
3401         (symbol_search::operator==): New function.
3402         (search_symbols): Remove std::vector.
3403         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3404         (symbol_search::compare_search_syms): Declare.
3405
3406 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3407
3408         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3409         arch/aarch64-insn.o.
3410         Remove one rule.
3411         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3412
3413 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3414
3415         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3416         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3417         arch/arm-linux.o respectively.
3418         * configure.tgt: Likewise.
3419
3420 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3421
3422         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3423         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3424
3425 2017-10-06  Pedro Alves  <palves@redhat.com>
3426
3427         * windows-nat.c: Include <algorithm>.
3428
3429 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3430
3431         * configure.tgt (i386_tobjs): New variable.
3432         (amd64_tobjs): New variable.
3433         Set $cpu_obs and $os_obs.
3434
3435 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3436
3437         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3438         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3439         (clean): Remove object files and dependency files.
3440         (distclean): Remove the directory.
3441         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3442         * configure: Re-generated.
3443         * configure.tgt: Replace amd64.o with arch/amd64.o.
3444
3445 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3446
3447         PR build/22188
3448         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3449         and SETEND.
3450
3451 2017-10-05  Pedro Alves  <palves@redhat.com>
3452
3453         * linux-nat.c (linux_child_follow_fork): When following the parent
3454         and detaching the child, consult the parent thread's architecture
3455         instead of the child's.
3456
3457 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3458
3459         * ax.h: Do not include "doublest.h".
3460         (union agent_val): Remove.
3461
3462 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3463
3464         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3465         (decimal_to_string): Return std::string object.
3466         (decimal_from_string): Accept std::string object.  Return bool.
3467         (decimal_from_integral, decimal_from_doublest): Remove.
3468         (decimal_from_longest): Add prototype.
3469         (decimal_from_ulongest): Likewise.
3470         (decimal_to_longest): Likewise.
3471         (decimal_from_doublest): Likewise.
3472         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3473         (MAX_DECIMAL_STRING): Move here.
3474         (decimal_to_string): Return std::string object.
3475         (decimal_from_string): Accept std::string object.  Return bool.
3476         (decimal_from_integral): Remove, replace by ...
3477         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3478         (decimal_to_longest): New function.
3479         (decimal_from_floating): Remove, replace by ...
3480         (decimal_from_doublest): ... this new function.
3481         (decimal_to_doublest): Update to new decimal_to_string interface.
3482
3483         * value.c (unpack_long): Use decimal_to_longest.
3484         * valops.c (value_cast): Use decimal_from_doublest instead of
3485         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3486         decimal_from_integral.
3487         * valarith.c (value_args_as_decimal): Likewise.
3488         * valprint.c (print_decimal_floating): Update to new
3489         decimal_to_string interface.
3490         * printcmd.c (printf_decfloat): Likewise.
3491         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3492
3493 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3494
3495         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3496         * gdbtypes.c: Include "floatformat.h".
3497         * value.c: Likewise.
3498         * m68k-tdep.c: Likewise.
3499
3500         * findvar.c: Do not include "floatformat.h".
3501         * amd64-darwin-tdep.c: Likewise.
3502         * arm-linux-tdep.c: Likewise.
3503         * i386-darwin-tdep.c: Likewise.
3504         * i387-tdep.c: Likewise.
3505         * m68k-linux-tdep.c: Likewise.
3506         * mep-tdep.c: Likewise.
3507         * mips-tdep.c: Likewise.
3508         * nios2-tdep.c: Likewise.
3509         * s390-linux-tdep.c: Likewise.
3510         * sparc-obsd-tdep.c: Likewise.
3511         * sparc-tdep.c: Likewise.
3512         * sparc64-tdep.c: Likewise.
3513         * spu-tdep.c: Likewise.
3514         * tic6x-tdep.c: Likewise.
3515         * tilegx-tdep.c: Likewise.
3516         * vax-tdep.c: Likewise.
3517         * xstormy16-tdep.c: Likewise.
3518         * xtensa-tdep.c: Likewise.
3519
3520         * top.c: Do not include "doublest.h".
3521         * aarch64-tdep.c: Likewise.
3522         * alpha-tdep.c: Likewise.
3523         * arm-linux-tdep.c: Likewise.
3524         * m68k-linux-tdep.c: Likewise.
3525         * tilegx-tdep.c: Likewise.
3526         * xstormy16-tdep.c: Likewise.
3527
3528 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3529
3530         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3531         (mipsn32_fbsd_sigframe): Define.
3532         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3533         for FreeBSD/mipsn32.
3534
3535 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3536
3537         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3538         AT_HWCAP.
3539
3540 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3541
3542         * MAINTAINERS (Misc): Update my email address.
3543
3544 2017-10-04  Pedro Alves  <palves@redhat.com>
3545
3546         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3547         it instead of target_gdbarch.
3548         (get_remote_state, get_remote_packet_size): Adjust
3549         get_remote_arch_state calls, passing down target_gdbarch
3550         explicitly.
3551         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3552         'gdbarch' and use it instead of target_gdbarch.
3553         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3554         passing down target_gdbarch explicitly.
3555         (struct stop_reply) <arch>: New field.
3556         (remote_parse_stop_reply): Use the stopped thread's architecture,
3557         not the current inferior's.  Save the architecture in the
3558         stop_reply.
3559         (process_stop_reply): Use the stop reply's architecture.
3560         (process_g_packet, remote_fetch_registers)
3561         (remote_prepare_to_store, store_registers_using_G)
3562         (remote_store_registers): Adjust get_remote_arch_state calls,
3563         using the regcache's architecture.
3564         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3565         passing down target_gdbarch explicitly.
3566         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3567         beneath instead of calling target_gdbarch.
3568         * target.c (default_thread_architecture): Use the specified
3569         inferior's architecture, instead of the current inferior's
3570         architecture (via target_gdbarch).
3571
3572 2017-10-04  Pedro Alves  <palves@redhat.com>
3573
3574         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3575         case.
3576         (regcache_print): Handle !target_has_registers here instead.
3577
3578 2017-10-04  Pedro Alves  <palves@redhat.com>
3579
3580         * frame.c (create_test_frame): Delete.
3581         * frame.h (create_test_frame): Delete.
3582         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3583         (class regcache_test): Delete.
3584         (test_target_has_registers, test_target_has_stack)
3585         (test_target_has_memory, test_target_prepare_to_store)
3586         (test_target_store_registers): New functions.
3587         (test_target_ops): New class.
3588         (register_to_value_test): Error out if there's already a
3589         process_stratum (or higher) target pushed.  Create a fuller mock
3590         environment, with mock target_ops, inferior, address space, thread
3591         and inferior_ptid.
3592         * progspace.c (struct address_space): Move to ...
3593         * progspace.h (struct address_space): ... here.
3594         * regcache.h (regcache::~regcache, regcache::raw_write)
3595         [GDB_SELF_TEST]: No longer virtual.
3596
3597 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3598
3599         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3600
3601 2017-10-04  Pedro Alves  <palves@redhat.com>
3602
3603         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3604         out of 'between TRY and CATCH'.
3605
3606 2017-10-04  Pedro Alves  <palves@redhat.com>
3607
3608         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3609         * common/common-exceptions.h (TRY): Open an outermost scope.
3610         Expand intro comment.
3611         (CATCH): Reindent.
3612         (END_CATCH): Close the outermost scope.
3613         * completer.c (complete_line_internal): Add missing END_CATCH.
3614
3615 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3616
3617         * NEWS (Changes since GDB 8.0): Add entry about new
3618         'set-cwd-on-gdbserver' feature.
3619         (New remote packets): Add entry for QSetWorkingDir.
3620         * common/common-inferior.h (set_inferior_cwd): New prototype.
3621         * infcmd.c (set_inferior_cwd): Remove "static".
3622         (show_cwd_command): Expand text to include remote debugging.
3623         * remote.c: Add PACKET_QSetWorkingDir.
3624         (remote_protocol_features) <QSetWorkingDir>: New entry for
3625         PACKET_QSetWorkingDir.
3626         (extended_remote_set_inferior_cwd): New function.
3627         (extended_remote_create_inferior): Call
3628         "extended_remote_set_inferior_cwd".
3629         (_initialize_remote): Call "add_packet_config_cmd" for
3630         QSetWorkingDir.
3631
3632 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3633
3634         * NEWS (New commands): Mention "set/show cwd".
3635         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3636         "cd" command's help text.
3637         * common/common-inferior.h (get_inferior_cwd): New prototype.
3638         * infcmd.c (inferior_cwd_scratch): New global variable.
3639         (set_inferior_cwd): New function.
3640         (get_inferior_cwd): Likewise.
3641         (set_cwd_command): Likewise.
3642         (show_cwd_command): Likewise.
3643         (_initialize_infcmd): Add "set/show cwd" commands.
3644         * inferior.h (class inferior) <cwd>: New field.
3645         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3646         (fork_inferior): Change inferior's cwd before its execution.
3647         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3648         to CreateProcess.
3649
3650 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3651
3652         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3653         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3654         (COMMON_OBS): Add gdb_tilde_expand.o.
3655         * common/gdb_tilde_expand.c: New file.
3656         * common/gdb_tilde_expand.h: Likewise.
3657
3658 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3659
3660         * gdbarch.sh (objfile): Remove duplicate declaration.
3661         * gdbarch.h: Regenerate.
3662
3663 2017-10-03  Tom Tromey  <tom@tromey.com>
3664
3665         * utils.c (internal_vproblem): Use string_vprintf.
3666
3667 2017-10-03  Tom Tromey  <tom@tromey.com>
3668
3669         * printcmd.c (info_symbol_command): Use std::string.
3670
3671 2017-10-03  Tom Tromey  <tom@tromey.com>
3672
3673         * top.c (gdb_safe_append_history): Use std::string.
3674
3675 2017-10-03  Tom Tromey  <tom@tromey.com>
3676
3677         * event-top.c (stdin_event_handler): Update.
3678         * main.c (captured_main_1): Update.
3679         * top.h (make_delete_ui_cleanup): Remove.
3680         (struct ui): Add constructor and destructor.
3681         (new_ui, delete_ui): Remove.
3682         * top.c (make_delete_ui_cleanup): Remove.
3683         (new_ui_command): Use std::unique_ptr.
3684         (delete_ui_cleanup): Remove.
3685         (ui::ui): Rename from new_ui.  Update.
3686         (free_ui): Remove.
3687         (ui::~ui): Rename from delete_ui.  Update.
3688
3689 2017-10-03  Tom Tromey  <tom@tromey.com>
3690
3691         * symfile.c (load_progress): Use gdb::byte_vector.
3692
3693 2017-10-03  Tom Tromey  <tom@tromey.com>
3694
3695         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3696         declaration.
3697         * printcmd.c (x_command): Remove unused declaration.
3698         * symfile.c (symbol_file_command): Remove unused declaration.
3699
3700 2017-10-03  Tom Tromey  <tom@tromey.com>
3701
3702         * utils.c (internal_vproblem): Use std::string.
3703         (defaulted_query): Likewise.
3704
3705 2017-10-03  Tom Tromey  <tom@tromey.com>
3706
3707         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3708         * top.c (execute_command_to_string): Update.
3709         * utils.c (make_cleanup_restore_page_info): Remove.
3710         (do_restore_page_info_cleanup): Remove.
3711         (set_batch_flag_and_restore_page_info):
3712         New.
3713         (make_cleanup_restore_page_info): Remove.
3714         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3715         (~set_batch_flag_and_restore_page_info): New
3716         (make_cleanup_restore_uinteger): Remove.
3717         (make_cleanup_restore_integer): Remove.
3718         (struct restore_integer_closure): Remove.
3719         (restore_integer): Remove.
3720         * utils.h (struct set_batch_flag_and_restore_page_info): New
3721         class.
3722         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3723         (make_cleanup_restore_page_info): Remove.
3724         (make_cleanup_restore_uinteger) Remove.
3725         (make_cleanup_restore_integer) Remove.
3726
3727 2017-10-03  Tom Tromey  <tom@tromey.com>
3728
3729         * record-full.h (record_full_gdb_operation_disable_set): Return
3730         scoped_restore_tmpl<int>.
3731         * infrun.c (adjust_pc_after_break): Update.
3732         (handle_signal_stop): Update.
3733         * record-full.c (record_full_gdb_operation_disable_set): Return
3734         scoped_restore_tmpl<int>.
3735         (record_full_wait_1, record_full_insert_breakpoint)
3736         (record_full_remove_breakpoint, record_full_save)
3737         (record_full_goto_insn): Update.
3738
3739 2017-10-02  Tom Tromey  <tom@tromey.com>
3740
3741         PR rust/22236:
3742         * rust-lang.c (rust_val_print_str): New function.
3743         (val_print_struct): Call it.
3744         (rust_subscript): Preserve name of slice type.
3745
3746 2017-10-02  Tom Tromey  <tom@tromey.com>
3747
3748         * rust-lang.c (rust_subscript): Handle slices in
3749         EVAL_AVOID_SIDE_EFFECTS case.
3750
3751 2017-10-02  Tom Tromey  <tom@tromey.com>
3752
3753         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3754
3755 2017-10-02  Tom Tromey  <tom@tromey.com>
3756
3757         * rust-lang.h (rust_slice_type): Add "extern".
3758
3759 2017-10-02  Tom Tromey  <tom@tromey.com>
3760             Pedro Alves  <palves@redhat.com>
3761
3762         * ada-lang.h (ada_exc_info::operator<): Make const.
3763         (ada_exc_info::operator==): Make const.
3764         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3765         Make const.
3766
3767 2017-09-29  Tom Tromey  <tom@tromey.com>
3768
3769         * target.c (read_whatever_is_readable): Change type of "result".
3770         Update.
3771         (free_memory_read_result_vector): Remove.
3772         (read_memory_robust): Change return type.  Update.
3773         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3774         bin2hex, std::string.
3775         * target.h (memory_read_result_s): Remove typedef.
3776         (free_memory_read_result_vector): Remove.
3777         (read_memory_robust): Return std::vector.
3778
3779 2017-09-29  Tom Tromey  <tom@tromey.com>
3780
3781         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3782
3783 2017-09-29  Tom Tromey  <tom@tromey.com>
3784
3785         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3786         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3787         operator< and operator==.
3788         (ada_exceptions_list): Return a std::vector.
3789         * ada-lang.c (ada_exc_info::operator<): Rename from
3790         compare_ada_exception_info.
3791         (ada_exc_info::operator==): New.
3792         (sort_remove_dups_ada_exceptions_list): Change type of
3793         "exceptions".
3794         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3795         (ada_add_global_exceptions): Likewise.
3796         (ada_exceptions_list_1): Return a std::vector.
3797         (ada_exceptions_list): Likewise.
3798
3799 2017-09-29  Tom Tromey  <tom@tromey.com>
3800
3801         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3802         'std::set *'.
3803         (print_one_inferior): Update.
3804         (free_vector_of_ints): Remove.
3805         (list_available_thread_groups): Change "ids" to std::set.
3806         (mi_cmd_list_thread_groups): Update.
3807         (struct collect_cores_data) <core>: Now a std::set.
3808         (collect_cores): Update.
3809         (unique): Remove.
3810         (print_one_inferior): Update.
3811
3812 2017-09-29  Tom Tromey  <tom@tromey.com>
3813
3814         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3815         (mi_execute_async_cli_command): Likewise.
3816         (mi_cmd_trace_frame_collected): Use field_fmt.
3817
3818 2017-09-29  Tom Tromey  <tom@tromey.com>
3819
3820         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3821         gdb::byte_vector.
3822
3823 2017-09-29  Tom Tromey  <tom@tromey.com>
3824
3825         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3826
3827 2017-09-29  Tom Tromey  <tom@tromey.com>
3828
3829         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3830
3831 2017-09-29  Tom Tromey  <tom@tromey.com>
3832
3833         * varobj.h (varobj_gen_name): Return std::string.
3834         * varobj.c (varobj_gen_name): Return std::string.
3835         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3836         (mi_cmd_var_delete): Don't copy "name".
3837
3838 2017-09-29  Tom Tromey  <tom@tromey.com>
3839
3840         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3841         (mi_cmd_break_insert_1): Update.
3842
3843 2017-09-29  Tom Tromey  <tom@tromey.com>
3844
3845         * target.h (make_scoped_defer_target_commit_resume): Update.
3846         * target.c (make_scoped_defer_target_commit_resume): Rename from
3847         make_cleanup_defer_target_commit_resume.  Return a
3848         scoped_restore.
3849         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3850
3851 2017-09-29  Tom Tromey  <tom@tromey.com>
3852
3853         * main.c (captured_main_1): Remove unused declaration.
3854         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3855
3856 2017-09-29  Tom Tromey  <tom@tromey.com>
3857
3858         * symtab.c (search_symbols): Remove unused outer cleanup.
3859         (make_source_files_completion_list): Remove unused declaration.
3860
3861 2017-09-29  Tom Tromey  <tom@tromey.com>
3862
3863         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3864
3865 2017-09-29  Tom Tromey  <tom@tromey.com>
3866
3867         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3868         gdb::byte_vector.
3869
3870 2017-09-29  Tom Tromey  <tom@tromey.com>
3871
3872         * complaints.c (vcomplaint): Use std::string.
3873
3874 2017-09-29  Tom Tromey  <tom@tromey.com>
3875
3876         * tracepoint.c (trace_variable_command): Use std::string.
3877         (encode_actions_1): Remove unused declarations.
3878         (create_tsv_from_upload): Use std::string.
3879
3880 2017-09-29  Tom Tromey  <tom@tromey.com>
3881
3882         * cp-support.c (gdb_demangle): Use std::string.
3883
3884 2017-09-29  Tom Tromey  <tom@tromey.com>
3885
3886         * stack.c (parse_frame_specification): Use std::string
3887         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3888
3889 2017-09-29  Tom Tromey  <tom@tromey.com>
3890
3891         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3892
3893 2017-09-29  Tom Tromey  <tom@tromey.com>
3894
3895         * utils.c (vfprintf_maybe_filtered): Use std::string.
3896         (vfprintf_unfiltered): Likewise.
3897
3898 2017-09-29  Tom Tromey  <tom@tromey.com>
3899
3900         * event-top.c (top_level_prompt): Return std::string.
3901         (display_gdb_prompt): Update.
3902
3903 2017-09-29  Tom Tromey  <tom@tromey.com>
3904
3905         * unittests/common-utils-selftests.c (format): New function.
3906         (string_vprintf_tests): New function.
3907         (_initialize_common_utils_selftests): Register new tests.
3908         * common/common-utils.c (string_vprintf): New function.
3909         * common/common-utils.h (string_vprintf): Declare.
3910
3911 2017-09-29  Pedro Alves  <palves@redhat.com>
3912
3913         * common/rsp-low.c (unpack_varlen_hex): Constify.
3914         * common/rsp-low.h (unpack_varlen_hex): Constify.
3915         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3916         Constify.
3917         * remote.c (remote_set_permissions, read_ptid)
3918         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3919         (remote_static_tracepoint_marker_at)
3920         (remote_static_tracepoint_markers_by_strid)
3921         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3922         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3923         (parse_tracepoint_definition, parse_tsv_definition)
3924         (parse_static_tracepoint_marker_definition): Constify.
3925         * tracepoint.h (parse_static_tracepoint_marker_definition)
3926         (parse_trace_status, parse_tracepoint_status)
3927         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3928
3929 2017-09-29  Pedro Alves  <palves@redhat.com>
3930
3931         * remote.c (target_buf, target_buf_size): Delete.
3932         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3933         Use the connection's packet buffer instead.
3934         All callers adjusted.
3935         (_initialize_remote): Remove references to target_buf and
3936         target_buf_size.
3937
3938 2017-09-28  Pedro Alves  <palves@redhat.com>
3939
3940         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3941         unittests/common-utils-selftests.c.
3942         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3943         (COMMON_OBS): Remove utils-selftests.o.
3944         * utils-selftests.c: Move to ...
3945         * unittests/common-utils-selftests.c: ... here and rename self
3946         test to "string_printf".
3947
3948 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3949
3950         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3951         having NULL cus or tus.
3952
3953 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3954
3955         * arm-tdep.c: (convert_from_extended): Remove.
3956         (convert_to_extended): Likewise.
3957         (arm_extract_return_value): Use convert_typed_floating.
3958         (arm_store_return_value): Likewise.
3959
3960         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3961         * sh-tdep.c: Do not include "floatformat.h".
3962         (sh_littlebyte_bigword_type): New function.
3963         (sh_register_convert_to_virtual): Use convert_typed_floating.
3964         (sh_register_convert_to_raw): Likewise.
3965         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3966         (sh64_littlebyte_bigword_type): New function.
3967         (sh64_extract_return_value): Use convert_typed_floating.
3968         (sh64_register_convert_to_virtual): Likewise.
3969         (sh64_register_convert_to_raw): Likewise.
3970
3971 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3972
3973         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3974         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3975
3976         * gdbtypes.h (union type_specific): Make field floatformat hold
3977         just a single struct floatformat, not an array.
3978         (floatformat_from_type): Move here.
3979         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3980         changed TYPE_FLOATFORMAT definition.
3981         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3982         (recursive_dump_type): Likewise.
3983         (init_float_type): Install correct floatformat for byte order.
3984         (arch_float_type): Likewise.
3985
3986 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3987
3988         * gdbtypes.c (init_type): Change incoming argument from
3989         length-in-bytes to length-in-bits.  Assert length is a
3990         multiple of TARGET_CHAR_BITS.
3991         (arch_type, arch_flags_type): Likewise.
3992         (init_integer_type): Update call to init_type.
3993         (init_character_type): Likewise.
3994         (init_boolean_type): Likewise.
3995         (init_float_type): Likewise.
3996         (init_decfloat_type): Likewise.
3997         (init_complex_type): Likewise.
3998         (init_pointer_type): Likewise.
3999         (objfile_type): Likewise.
4000         (arch_integer_type): Update call to arch_type.
4001         (arch_character_type): Likewise.
4002         (arch_boolean_type): Likewise.
4003         (arch_float_type): Likewise.
4004         (arch_decfloat_type): Likewise.
4005         (arch_complex_type): Likewise.
4006         (arch_pointer_type): Likewise.
4007         (gdbtypes_post_init): Likewise.
4008
4009         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4010         (read_base_type): Likewise.
4011         * mdebugread.c (basic_type): Likewise.
4012         * stabsread.c (dbx_init_float_type): Likewise.
4013         (rs6000_builtin_type): Likewise.
4014         (read_range_type): Likewise.  Also, fix call to init_integer_type
4015         with erroneous length argument.
4016
4017         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4018         * d-lang.c (build_d_types): Likewise.
4019         * f-lang.c (build_fortran_types): Likewise.
4020         * go-lang.c (build_go_types): Likewise.
4021         * opencl-lang.c (build_opencl_types): Likewise.
4022         * jit.c (finalize_symtab): Likewise.
4023         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4024         (build_std_type_info_type): Likewise.
4025         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4026         update call to arch_flags_type.
4027
4028         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4029         arch_type.
4030         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4031         * windows-tdep.c (windows_get_tlb_type): Likewise.
4032
4033         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4034         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4035         * m32c-tdep.c (make_types): Likewise.
4036         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4037         (rl78_psw_type): Update call to arch_flags_type.
4038         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4039         * rx-tdep.c (rx_psw_type): Likewise.
4040         (rx_fpsw_type): Likewise.
4041         * sparc-tdep.c (sparc_psr_type): Likewise.
4042         (sparc_fsr_type): Likewise.
4043         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4044         (sparc64_ccr_type): Likewise.
4045         (sparc64_fsr_type): Likewise.
4046         (sparc64_fprs_type): Likewise.
4047
4048 2017-09-27  Tom Tromey  <tom@tromey.com>
4049
4050         * findcmd.c (find_command): Constify.
4051
4052 2017-09-27  Tom Tromey  <tom@tromey.com>
4053
4054         * ada-tasks.c (task_command_1, task_command): Constify.
4055
4056 2017-09-27  Tom Tromey  <tom@tromey.com>
4057
4058         * symtab.c (maintenance_print_symbol_cache)
4059         (maintenance_flush_symbol_cache)
4060         (maintenance_print_symbol_cache_statistics): Constify.
4061
4062 2017-09-27  Tom Tromey  <tom@tromey.com>
4063
4064         * inferior.c (detach_inferior_command, kill_inferior_command)
4065         (inferior_command): Constify.
4066
4067 2017-09-27  Tom Tromey  <tom@tromey.com>
4068
4069         * regcache.c (regcache_print, maintenance_print_registers)
4070         (maintenance_print_raw_registers)
4071         (maintenance_print_cooked_registers)
4072         (maintenance_print_register_groups)
4073         (maintenance_print_remote_registers): Constify.
4074
4075 2017-09-27  Tom Tromey  <tom@tromey.com>
4076
4077         * printcmd.c (map_display_numbers, undisplay_command)
4078         (enable_disable_display_command, enable_display_command)
4079         (disable_display_command): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * breakpoint.h (delete_command): Don't declare.
4084         * breakpoint.c (delete_command, enable_once_command)
4085         (enable_count_command, enable_delete_command, breakpoint_1)
4086         (maintenance_info_breakpoints, stopin_command, stopat_command)
4087         (delete_command, delete_trace_command, save_breakpoints)
4088         (save_breakpoints_command, save_tracepoints_command): Constify.
4089
4090 2017-09-27  Tom Tromey  <tom@tromey.com>
4091
4092         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4093         (skip_ws, extract_identifier, macro_define_command)
4094         (macro_undef_command, macro_list_command): Constify.
4095
4096 2017-09-27  Tom Tromey  <tom@tromey.com>
4097
4098         * infcmd.c (environment_info, set_environment_command)
4099         (unset_environment_command, path_info, info_proc_cmd_1)
4100         (info_proc_cmd_mappings, info_proc_cmd_stat)
4101         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4102         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4103
4104 2017-09-27  Tom Tromey  <tom@tromey.com>
4105
4106         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4107         Constify.
4108
4109 2017-09-27  Tom Tromey  <tom@tromey.com>
4110
4111         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * demangle.c (demangle_command): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * progspace.c (maintenance_info_program_spaces_command):
4120         Constify.
4121
4122 2017-09-27  Tom Tromey  <tom@tromey.com>
4123
4124         * compile/compile.c (check_raw_argument, compile_file_command)
4125         (compile_code_command, compile_print_command): Constify.
4126
4127 2017-09-27  Tom Tromey  <tom@tromey.com>
4128
4129         * reggroups.c (maintenance_print_reggroups): Constify.
4130
4131 2017-09-27  Tom Tromey  <tom@tromey.com>
4132
4133         * dwarf2read.c (save_gdb_index_command): Constify.
4134
4135 2017-09-27  Tom Tromey  <tom@tromey.com>
4136
4137         * stap-probe.c (info_probes_stap_command): Constify.
4138
4139 2017-09-27  Tom Tromey  <tom@tromey.com>
4140
4141         * fork-child.c (unset_exec_wrapper_command): Constify.
4142
4143 2017-09-27  Tom Tromey  <tom@tromey.com>
4144
4145         * btrace.c (get_uint, get_context_size, no_chunk)
4146         (maint_btrace_packet_history_cmd)
4147         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4148         (maint_info_btrace_cmd): Constify.
4149
4150 2017-09-27  Tom Tromey  <tom@tromey.com>
4151
4152         * reverse.c (delete_bookmark_command): Constify.
4153
4154 2017-09-27  Tom Tromey  <tom@tromey.com>
4155
4156         * remote.c (set_memory_packet_size)
4157         (set_memory_write_packet_size, show_memory_write_packet_size)
4158         (set_memory_read_packet_size, show_memory_read_packet_size)
4159         (compare_sections_command, packet_command, remote_put_command)
4160         (remote_get_command, remote_delete_command): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4165         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4166         (set_mipsfpu_auto_command): Constify.
4167
4168 2017-09-27  Tom Tromey  <tom@tromey.com>
4169
4170         * cli/cli-cmds.h (cd_command): Constify.
4171         * cli/cli-cmds.c (cd_command): Constify.
4172
4173 2017-09-27  Tom Tromey  <tom@tromey.com>
4174
4175         * thread.c (thread_name_command, thread_find_command): Constify.
4176
4177 2017-09-27  Tom Tromey  <tom@tromey.com>
4178
4179         * probe.c (enable_probes_command, disable_probes_command):
4180         Constify.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * symfile.c (symbol_file_command): Constify.
4185         * gdbcore.h (deprecated_file_changed_hook): Constify.
4186         * exec.c (deprecated_file_changed_hook, exec_file_command)
4187         (file_command): Constify.
4188         * defs.h (symbol_file_command): Constify.
4189
4190 2017-09-27  Tom Tromey  <tom@tromey.com>
4191
4192         * remote-fileio.c (set_system_call_allowed)
4193         (show_system_call_allowed): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * tracepoint.c (delete_trace_variable_command)
4198         (tfind_end_command, tfind_start_command, tfind_pc_command)
4199         (tfind_tracepoint_command, tfind_line_command)
4200         (tfind_range_command, tfind_outside_command): Constify.
4201
4202 2017-09-27  Tom Tromey  <tom@tromey.com>
4203
4204         * ax-gdb.c (maint_agent_printf_command, agent_command)
4205         (agent_eval_command): Constify.
4206
4207 2017-09-27  Tom Tromey  <tom@tromey.com>
4208
4209         * tracepoint.c (info_scope_command): Constify.
4210         * python/python.c (gdbpy_decode_line): Constify.
4211         * python/py-breakpoint.c (bppy_init): Constify.
4212         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4213         * location.h: (new_linespec_location)
4214         (string_to_event_location_basic, string_to_event_location):
4215         Constify.
4216         * location.c (new_linespec_location)
4217         (string_to_event_location_basic, string_to_event_location):
4218         Constify.
4219         * linespec.h (decode_line_with_current_source)
4220         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4221         * linespec.c (linespec_lex_to_end)
4222         (decode_line_with_current_source)
4223         (decode_line_with_last_displayed): Constify.
4224         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4225         Constify.
4226         * cli/cli-cmds.c (edit_command, list_command): Constify.
4227         * breakpoint.h (until_break_command, watch_command_wrapper)
4228         (awatch_command_wrapper, rwatch_command_wrapper)
4229         (init_ada_exception_breakpoint): Constify.
4230         * breakpoint.c (break_command_1, dprintf_command)
4231         (break_range_command, watch_command_wrapper)
4232         (rwatch_command_wrapper, awatch_command_wrapper)
4233         (until_break_command, init_ada_exception_breakpoint)
4234         (strace_marker_create_sals_from_location, trace_command)
4235         (ftrace_command, strace_command, struct tracepoint): Constify.
4236         * ax-gdb.c (agent_command_1): Constify.
4237         * ada-lang.c (ada_exception_sal): Constify.
4238
4239 2017-09-27  Tom Tromey  <tom@tromey.com>
4240
4241         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4242         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4243         (get_context_size, no_chunk, get_insn_history_modifiers)
4244         (cmd_record_insn_history, get_call_history_modifiers)
4245         (cmd_record_call_history): Constify.
4246
4247 2017-09-27  Tom Tromey  <tom@tromey.com>
4248
4249         * source.c (show_substitute_path_command)
4250         (unset_substitute_path_command, set_substitute_path_command):
4251         Constify.
4252
4253 2017-09-27  Tom Tromey  <tom@tromey.com>
4254
4255         * typeprint.c (maintenance_print_type): Constify.
4256         * maint.c (maintenance_dump_me, maintenance_demangle)
4257         (maintenance_time_display, maintenance_info_sections)
4258         (maintenance_print_statistics, maintenance_deprecate)
4259         (maintenance_undeprecate): Constify.
4260         (maintenance_do_deprecate): Constify.  Use std::string.
4261         (maintenance_selftest): Constify.
4262         * gdbtypes.h (maintenance_print_type): Constify.
4263
4264 2017-09-27  Tom Tromey  <tom@tromey.com>
4265
4266         * hppa-tdep.c (unwind_command): Constify.
4267
4268 2017-09-27  Tom Tromey  <tom@tromey.com>
4269
4270         * target-descriptions.c (unset_tdesc_filename_cmd)
4271         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4272         Constify.
4273
4274 2017-09-27  Tom Tromey  <tom@tromey.com>
4275
4276         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4277
4278 2017-09-27  Tom Tromey  <tom@tromey.com>
4279
4280         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4281
4282 2017-09-27  Tom Tromey  <tom@tromey.com>
4283
4284         * tui/tui-regs.c (tui_reg_command): Constify.
4285
4286 2017-09-27  Tom Tromey  <tom@tromey.com>
4287
4288         * skip.c (skip_file_command, skip_function_command)
4289         (skip_enable_command, skip_disable_command, skip_delete_command):
4290         Constify.
4291
4292 2017-09-27  Tom Tromey  <tom@tromey.com>
4293
4294         * record-btrace.c (cmd_record_btrace_bts_start)
4295         (cmd_record_btrace_pt_start): Constify.
4296
4297 2017-09-27  Tom Tromey  <tom@tromey.com>
4298
4299         * symmisc.c (maintenance_print_symbols)
4300         (maintenance_print_msymbols, maintenance_print_objfiles)
4301         (maintenance_info_symtabs, maintenance_check_symtabs)
4302         (maintenance_expand_symtabs, maintenance_info_line_tables):
4303         Constify.
4304
4305 2017-09-27  Tom Tromey  <tom@tromey.com>
4306
4307         * top.c (new_ui_command): Constify.
4308
4309 2017-09-27  Tom Tromey  <tom@tromey.com>
4310
4311         * symfile.c (add_symbol_file_command)
4312         (remove_symbol_file_command, list_overlays_command)
4313         (map_overlay_command, unmap_overlay_command)
4314         (overlay_auto_command, overlay_manual_command)
4315         (overlay_off_command, overlay_load_command): Constify.
4316
4317 2017-09-27  Tom Tromey  <tom@tromey.com>
4318
4319         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4320         (info_spu_mailbox_command, info_spu_dma_command)
4321         (info_spu_proxydma_command): Constify.
4322
4323 2017-09-27  Tom Tromey  <tom@tromey.com>
4324
4325         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4326
4327 2017-09-27  Tom Tromey  <tom@tromey.com>
4328
4329         * cli/cli-script.c (user_defined_command): Constify.
4330
4331 2017-09-27  Tom Tromey  <tom@tromey.com>
4332
4333         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4334         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4335         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4336         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4337         (dump_binary_value, append_binary_memory, append_binary_value):
4338         Constify.
4339         (struct dump_context) <func>: Constify.
4340         (add_dump_command): Update.
4341
4342 2017-09-27  Tom Tromey  <tom@tromey.com>
4343
4344         * cli/cli-cmds.c (show_version, show_configuration)
4345         (source_command, show_user): Constify.
4346
4347 2017-09-27  Tom Tromey  <tom@tromey.com>
4348
4349         * target.c (maintenance_print_target_stack): Constify.
4350
4351 2017-09-27  Tom Tromey  <tom@tromey.com>
4352
4353         * interps.c (interpreter_exec_cmd): Constify.
4354
4355 2017-09-27  Tom Tromey  <tom@tromey.com>
4356
4357         * record-full.c (cmd_record_full_restore): Constify.
4358
4359 2017-09-27  Tom Tromey  <tom@tromey.com>
4360
4361         * memattr.c (enable_mem_command, disable_mem_command)
4362         (delete_mem_command): Constify.
4363
4364 2017-09-27  Tom Tromey  <tom@tromey.com>
4365
4366         * value.c (show_convenience): Constify.
4367
4368 2017-09-27  Tom Tromey  <tom@tromey.com>
4369
4370         * gdbcore.h (core_file_command): Update.
4371         * corefile.c (core_file_command): Constify.
4372
4373 2017-09-27  Tom Tromey  <tom@tromey.com>
4374
4375         * user-regs.c (maintenance_print_user_registers): Constify.
4376
4377 2017-09-27  Tom Tromey  <tom@tromey.com>
4378
4379         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4380
4381 2017-09-27  Tom Tromey  <tom@tromey.com>
4382
4383         * cp-support.c (first_component_command): Constify.
4384
4385 2017-09-27  Tom Tromey  <tom@tromey.com>
4386
4387         * psymtab.c (maintenance_print_psymbols)
4388         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4389         Constify.
4390
4391 2017-09-27  Tom Tromey  <tom@tromey.com>
4392
4393         * windows-tdep.c (display_tib): Constify.
4394
4395 2017-09-27  Tom Tromey  <tom@tromey.com>
4396
4397         * linux-fork.c (delete_checkpoint_command)
4398         (detach_checkpoint_command): Constify.
4399
4400 2017-09-27  Tom Tromey  <tom@tromey.com>
4401
4402         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4403
4404 2017-09-27  Tom Tromey  <tom@tromey.com>
4405
4406         * arc-tdep.c (dump_arc_instruction_command): Constify.
4407
4408 2017-09-27  Tom Tromey  <tom@tromey.com>
4409
4410         * valprint.c (set_radix, show_radix): Constify.
4411
4412 2017-09-27  Tom Tromey  <tom@tromey.com>
4413
4414         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4415
4416 2017-09-27  Tom Tromey  <tom@tromey.com>
4417
4418         * command.h (not_just_help_class_command): Update.
4419         * cli/cli-decode.h (not_just_help_class_command): Update.
4420         * cli/cli-decode.c (not_just_help_class_command): Constify.
4421
4422 2017-09-27  Tom Tromey  <tom@tromey.com>
4423
4424         * gdb_bfd.c (maintenance_info_bfds): Constify.
4425
4426 2017-09-27  Tom Tromey  <tom@tromey.com>
4427
4428         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4429         overloads.
4430         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4431         (do_const_cfunc): New function.
4432         (cmd_cfunc_eq): New overload.
4433         (cli_user_command_p): Check do_const_cfunc.
4434         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4435         const_cfunc.
4436         * command.h (add_cmd): Add const overload and no-function
4437         overload.
4438         (set_cmd_cfunc): Add const overload.
4439         (cmd_const_cfunc_ftype): Declare.
4440         (cmd_cfunc_eq): Add const overload.
4441         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4442         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4443         overload.
4444
4445 2017-09-27  Tom Tromey  <tom@tromey.com>
4446
4447         * macroexp.c (get_next_token_for_substitution): New function.
4448         (substitute_args): Call it.  Check for __VA_OPT__.
4449
4450 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4451             Pedro Alves <palves@redhat.com>
4452
4453         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4454         producer_is_icc_lt_14.
4455         (producer_is_icc_lt_14): New function.
4456         (check_producer): Add code for checking version of ICC.
4457         (producer_is_icc): Move to producer.c.
4458         (read_structure_type): Restrict ICC workaround to ICC<14.
4459         * producer.c: Include selftest.h.
4460         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4461         New functions.
4462         * producer.h (producer_is_icc): New declaration.
4463
4464 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4465
4466         * Makefile.in (SFILES): Add producer.c.
4467         (COMMON_OBS): Add producer.o
4468         * amd64-tdep.c (producer.h): Add new include.
4469         * dwarf2read.c (producer.h): Add new include.
4470         * producer.c: New file.
4471         * producer.h: New file.
4472         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4473         producer.c.
4474         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4475         producer.h.
4476
4477 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4478
4479         * configure.ac: Search ncursesw before ncurses.
4480         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4481         * gdb_curses.h: Include <ncursesw/ncurses.h>
4482         * config.in, configure: Regenerate.
4483
4484 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4485
4486         PR gdb/22185
4487         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4488         obsolete.
4489         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4490         Remove i386sol2 support.
4491         * configure.nat <i386sol2>: Remove.
4492         <sol2-64>: Fold into ...
4493         <sol2>: ... this.
4494         Move common settings to default section.
4495         Add sol-thread.o.
4496         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4497         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4498         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4499         <i[34567]86-*-solaris*>: Remove.
4500         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4501
4502         * configure.ac: Remove wctype in libw check.
4503         (_MSE_INT_H): Don't define on Solaris 7-9.
4504         <solaris*>: Remove libthread_db.so.1 check.
4505         * configure: Regenerate.
4506         * config.in: Regenerate.
4507
4508         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4509         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4510         (gdb_ps_size_t): Remove.
4511         Use base types in users.
4512         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4513
4514         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4515
4516 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4517
4518         PR build/22206
4519         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4520         (adi_is_addr_mapped): Likewise.
4521         (PSR_ICC): Don't redefine.
4522         (PSR_IMPL): Likewise.
4523
4524 2017-09-25  Tom Tromey  <tom@tromey.com>
4525
4526         * regcache.c (regcache::dump): Use string_printf.
4527
4528 2017-09-25  Tom Tromey  <tom@tromey.com>
4529
4530         * regcache.c (class regcache_invalidator): New.
4531         (struct register_to_invalidate): Remove.
4532         (make_cleanup_regcache_invalidate): Remove.
4533         (regcache::raw_write): Use regcache_invalidator.
4534
4535 2017-09-25  Tom Tromey  <tom@tromey.com>
4536
4537         * spu-tdep.c (spu2ppu_sniffer): Update.
4538         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4539         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4540         Remove.
4541         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4542         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4543         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4544         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4545         (frame_pop): Update.
4546
4547 2017-09-25  Tom Tromey  <tom@tromey.com>
4548
4549         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4550         * regcache.h (regcache_xfree): Don't declare.
4551         * regcache.c (regcache_xfree): Remove.
4552         (do_regcache_xfree): Use delete.
4553         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4554         * linux-fork.c (free_fork): Use delete.
4555         (fork_save_infrun_state): Likewise.
4556         * jit.c (jit_dealloc_cache): Use delete.
4557         * infrun.c (discard_infcall_suspend_state): Use delete.
4558
4559 2017-09-25  Tom Tromey  <tom@tromey.com>
4560
4561         * regcache.h (regcache_xmalloc): Don't declare.
4562         (regcache_raw_set_cached_value): Update comment.
4563         * regcache.c (regcache_xmalloc): Remove.
4564         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4565         * jit.c (jit_frame_sniffer): Use new.
4566         * frame.c (frame_save_as_regcache): Use new.
4567
4568 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4569
4570         * NEWS: Advertise support for guarded-storage registers on IBM z.
4571
4572 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4573
4574         * s390-linux-nat.c (have_regset_gs): New static variable.
4575         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4576         control block and guarded-storage broadcast control regsets.
4577         (s390_read_description): Detect whether the target has
4578         guarded-storage support, return appropriate tdesc.
4579         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4580         (features/s390x-gs-linux64.c): Likewise.
4581         (struct gdbarch_tdep) <have_gs>: New field.
4582         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4583         (s390_gsbc_regset): New variables.
4584         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4585         and s390_gsbc_regset, if applicable.
4586         (s390_core_read_description): Check whether core file was from a
4587         target with guarded-storage support; include appropriate regsets.
4588         (s390_gdbarch_init): Add registers for guarded-storage support.
4589         (_initialize_s390_tdep): Initialize new target descriptions that
4590         include registers for guarded-storage support.
4591         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4592         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4593         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4594         (S390_NUM_REGS): Adjust macro definition.
4595         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4596         (tdesc_s390x_gs_linux64): New declarations.
4597
4598 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4599
4600         * features/s390-gs-linux64.xml: New file.
4601         * features/s390-gs.xml: New file.
4602         * features/s390-gsbc.xml: New file.
4603         * features/s390x-gs-linux64.xml: New file.
4604         * features/Makefile (WHICH): Add s390-gs-linux64 and
4605         s390x-gs-linux64.
4606         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4607         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4608         * features/s390-gs-linux64.c: New generated file.
4609         * features/s390x-gs-linux64.c: New file.
4610         * regformats/s390-gs-linux64.dat: New file.
4611         * regformats/s390x-gs-linux64.dat: New file.
4612
4613 2017-09-23  Tom Tromey  <tom@tromey.com>
4614
4615         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4616
4617 2017-09-22  Tom Tromey  <tom@tromey.com>
4618
4619         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4620         type to scoped_restore_tmpl.
4621         <scoped_input_handler>: Initialize m_quit_handler directly.
4622
4623 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4624
4625         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4626         (cd_command): Likewise.  Free "current_directory" before
4627         assigning to it.
4628         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4629         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4630         * top.c (gdb_dirbuf): Remove global declaration.
4631         * top.h (gdb_dirbuf): Likewise.
4632
4633 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4634
4635         * gnulib/aclocal.m4: Regenerate.
4636         * gnulib/config.in: Regenerate.
4637         * gnulib/configure: Regenerate.
4638         * gnulib/import/Makefile.am: Regenerate.
4639         * gnulib/import/Makefile.in: Regenerate.
4640         * gnulib/import/assure.h: New file.
4641         * gnulib/import/at-func.c: Likewise
4642         * gnulib/import/chdir-long.c: New file.
4643         * gnulib/import/chdir-long.h: New file.
4644         * gnulib/import/cloexec.c: New file.
4645         * gnulib/import/cloexec.h: New file.
4646         * gnulib/import/close.c: New file.
4647         * gnulib/import/closedir.c: New file.
4648         * gnulib/import/dirent-private.h: New file.
4649         * gnulib/import/dup-safer.c: New file.
4650         * gnulib/import/dup.c: New file.
4651         * gnulib/import/dup2.c: New file.
4652         * gnulib/import/error.c: New file.
4653         * gnulib/import/error.h: New file.
4654         * gnulib/import/exitfail.c: New file.
4655         * gnulib/import/exitfail.h: New file.
4656         * gnulib/import/fchdir.c: New file.
4657         * gnulib/import/fcntl.c: New file.
4658         * gnulib/import/fcntl.in.h: New file.
4659         * gnulib/import/fd-hook.c: New file.
4660         * gnulib/import/fd-hook.h: New file.
4661         * gnulib/import/fd-safer.c: New file.
4662         * gnulib/import/fdopendir.c: New file.
4663         * gnulib/import/filename.h: New file.
4664         * gnulib/import/filenamecat-lgpl.c: New file.
4665         * gnulib/import/filenamecat.h: New file.
4666         * gnulib/import/fstat.c: New file.
4667         * gnulib/import/fstatat.c: New file.
4668         * gnulib/import/getcwd-lgpl.c: New file.
4669         * gnulib/import/getcwd.c: New file.
4670         * gnulib/import/getdtablesize.c: New file.
4671         * gnulib/import/getlogin_r.c: New file.
4672         * gnulib/import/getprogname.c: New file.
4673         * gnulib/import/getprogname.h: New file.
4674         * gnulib/import/gettext.h: New file.
4675         * gnulib/import/glob-libc.h: New file.
4676         * gnulib/import/glob.c: New file.
4677         * gnulib/import/glob.in.h: New file.
4678         * gnulib/import/intprops.h: New file.
4679         * gnulib/import/m4/chdir-long.m4: New file.
4680         * gnulib/import/m4/close.m4: New file.
4681         * gnulib/import/m4/closedir.m4: New file.
4682         * gnulib/import/m4/d-ino.m4: New file.
4683         * gnulib/import/m4/d-type.m4: New file.
4684         * gnulib/import/m4/dup.m4: New file.
4685         * gnulib/import/m4/dup2.m4: New file.
4686         * gnulib/import/m4/error.m4: New file.
4687         * gnulib/import/m4/fchdir.m4: New file.
4688         * gnulib/import/m4/fcntl.m4: New file.
4689         * gnulib/import/m4/fcntl_h.m4: New file.
4690         * gnulib/import/m4/fdopendir.m4: New file.
4691         * gnulib/import/m4/filenamecat.m4: New file.
4692         * gnulib/import/m4/fstat.m4: New file.
4693         * gnulib/import/m4/fstatat.m4: New file.
4694         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4695         * gnulib/import/m4/getcwd-path-max.m4: New file.
4696         * gnulib/import/m4/getcwd.m4: New file.
4697         * gnulib/import/m4/getdtablesize.m4: New file.
4698         * gnulib/import/m4/getlogin_r.m4: New file.
4699         * gnulib/import/m4/getprogname.m4: New file.
4700         * gnulib/import/m4/glob.m4: New file.
4701         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4702         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4703         * gnulib/import/m4/mempcpy.m4: New file.
4704         * gnulib/import/m4/memrchr.m4: New file.
4705         * gnulib/import/m4/mode_t.m4: New file.
4706         * gnulib/import/m4/msvc-inval.m4: New file.
4707         * gnulib/import/m4/msvc-nothrow.m4: New file.
4708         * gnulib/import/m4/open.m4: New file.
4709         * gnulib/import/m4/openat.m4: New file.
4710         * gnulib/import/m4/opendir.m4: New file.
4711         * gnulib/import/m4/readdir.m4: New file.
4712         * gnulib/import/m4/realloc.m4: New file.
4713         * gnulib/import/m4/rewinddir.m4: New file.
4714         * gnulib/import/m4/save-cwd.m4: New file.
4715         * gnulib/import/m4/strdup.m4: New file.
4716         * gnulib/import/m4/strerror.m4: New file.
4717         * gnulib/import/m4/unistd-safer.m4: New file.
4718         * gnulib/import/mempcpy.c: New file.
4719         * gnulib/import/memrchr.c: New file.
4720         * gnulib/import/msvc-inval.c: New file.
4721         * gnulib/import/msvc-inval.h: New file.
4722         * gnulib/import/msvc-nothrow.c: New file.
4723         * gnulib/import/msvc-nothrow.h: New file.
4724         * gnulib/import/open.c: New file.
4725         * gnulib/import/openat-die.c: New file.
4726         * gnulib/import/openat-priv.h: New file.
4727         * gnulib/import/openat-proc.c: New file.
4728         * gnulib/import/openat.c: New file.
4729         * gnulib/import/openat.h: New file.
4730         * gnulib/import/opendir.c: New file.
4731         * gnulib/import/pipe-safer.c: New file.
4732         * gnulib/import/readdir.c: New file.
4733         * gnulib/import/realloc.c: New file.
4734         * gnulib/import/rewinddir.c: New file.
4735         * gnulib/import/save-cwd.c: New file.
4736         * gnulib/import/save-cwd.h: New file.
4737         * gnulib/import/strdup.c: New file.
4738         * gnulib/import/strerror-override.c: New file.
4739         * gnulib/import/strerror-override.h: New file.
4740         * gnulib/import/strerror.c: New file.
4741         * gnulib/import/unistd--.h: New file.
4742         * gnulib/import/unistd-safer.h: New file.
4743         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4744         "getcwd" and "glob".
4745         * ser-tcp.c: Undefine "close" before redefining it.
4746
4747 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4748
4749         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4750         get rid of res_val.
4751
4752 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4753
4754         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4755         <sol2,sparc>: Likewise.
4756         <sol2-64,i386>: Likewise.
4757
4758         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4759         -Wdeprecated-declarations on *-*-solaris*.
4760         * configure: Regenerate.
4761
4762         * procfs.c: Include "nat/inferior.h".
4763         (procfs_info_proc): Fix typo.
4764
4765 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4766
4767         * remote.c (vector): Include.
4768         (struct private_thread_info): Add field, thread_handle.
4769         (free_private_thread_info): Deallocate storage associated with
4770         thread handle.
4771         (get_private_info_thread): Initialize `thread_handle' field.
4772         (struct thread_item): Add field, thread_handle.
4773         (clear_threads_listing_context): Deallocate storage associated
4774         with thread handle.
4775         (start_thread): Add support for "handle" attribute.
4776         (thread_attributes): Add "handle".
4777         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4778         field.
4779         (remote_update_thread_list): Update thread_handle.
4780         (remote_thread_handle_to_thread_info): New function.
4781         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4782
4783 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4784
4785         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4786         function.
4787         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4788         * python/python-internal.h (thread_object_type): Declare.
4789
4790 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4791
4792         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4793         (target_thread_handle_to_thread_info): Declare.
4794         * target.c (target_thread_handle_to_thread_info): New function.
4795         * target-delegates.c: Regenerate.
4796         * gdbthread.h (find_thread_by_handle): Declare.
4797         * thread.c (find_thread_by_handle): New function.
4798         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4799         function.
4800         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4801
4802 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4803
4804         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4805
4806 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4807
4808         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4809
4810 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4811
4812         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4813         to gdb_target_obs.
4814
4815 2017-09-20  Tom Tromey  <tom@tromey.com>
4816
4817         * breakpoint.c (struct counted_command_line): Remove.
4818         (breakpoint_commands): Update.
4819         (alloc_counted_command_line, incref_counted_command_line)
4820         (decref_counted_command_line, do_cleanup_counted_command_line)
4821         (make_cleanup_decref_counted_command_line): Remove.
4822         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4823         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4824         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4825         (save_breakpoints): Update.
4826         * breakpoint.h (counted_command_line): Now a typedef to
4827         shared_ptr.
4828         (struct breakpoint) <commands>: Now a counted_command_line.
4829         (struct bpstats) <command>: Likewise.
4830
4831 2017-09-20  Tom Tromey  <tom@tromey.com>
4832
4833         * breakpoint.c (struct commands_info, do_map_commands_command):
4834         Remove.
4835         (commands_command_1): Update.
4836         (iterate_over_related_breakpoints): Take a function_view.
4837         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4838         (delete_command): Update.
4839         (map_breakpoint_numbers): Take a function_view.
4840         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4841         (disable_command): Update.
4842         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4843         (enable_command): Update.
4844         (struct disp_data, do_enable_breakpoint_disp)
4845         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4846         (do_map_enable_delete_breakpoint): Remove.
4847         (enable_once_command, enable_count_command, enable_delete_command)
4848         (delete_trace_variable_command): Update.
4849
4850 2017-09-20  Tom Tromey  <tom@tromey.com>
4851
4852         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4853         (bpstat_clear): Use delete.
4854         (bpstats): New constructors.
4855         (bpstat_copy, bpstat_stop_status): Use new.
4856         (dprintf_after_condition_true): Update.
4857         * breakpoint.h (bpstats::bpstats): Add constructors.
4858         (bpstats::~bpstats): Add destructor.
4859
4860 2017-09-20  Pedro Alves  <palves@redhat.com>
4861
4862         * eval.c (make_params): Delete, refactored as ...
4863         (class fake_method): ... this new type's ctor.
4864         (fake_method::~fake_method): New.
4865         (evaluate_subexp_standard): Use 'fake_method'.
4866
4867 2017-09-20  Tom Tromey  <tom@tromey.com>
4868
4869         * windows-nat.c (get_windows_debug_event, windows_wait)
4870         (do_initial_windows_stuff, windows_attach): Update.
4871         * utils.c (vwarning, internal_vproblem): Update.
4872         (ui_unregister_input_event_handler_cleanup)
4873         (prepare_to_handle_input): Remove.
4874         (class scoped_input_handler): New.
4875         (defaulted_query, prompt_for_continue): Update.
4876         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4877         Update.
4878         * top.c (undo_terminal_modifications_before_exit): Update.
4879         * target/target.h (target_terminal_init, target_terminal_inferior)
4880         (target_terminal_ours): Don't declare.
4881         (class target_terminal): New.
4882         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4883         (target_terminal_ours_for_output)
4884         (make_cleanup_restore_target_terminal): Don't declare.
4885         (target_terminal_info): Remove.
4886         * target.c (enum terminal_state, terminal_state): Remove.
4887         (target_terminal::terminal_state): Define.
4888         (target_terminal::init): Rename from target_terminal_init.
4889         (target_terminal::inferior): Rename from
4890         target_terminal_inferior.
4891         (target_terminal::ours): Rename from target_terminal_ours.
4892         (target_terminal::ours_for_output): Rename from
4893         target_terminal_ours_for_output.
4894         (target_terminal::info): New method.
4895         (cleanup_restore_target_terminal)
4896         (make_cleanup_restore_target_terminal): Remove.
4897         * solib.c (handle_solib_event): Update.
4898         * remote.c (remote_serial_quit_handler): Update.
4899         (remote_terminal_inferior, remote_wait_as): Update.
4900         * record-full.c (record_full_wait_1): Update.
4901         * nto-procfs.c (procfs_create_inferior): Update.
4902         * nat/fork-inferior.c (startup_inferior): Update.
4903         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4904         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4905         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4906         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4907         (mi_breakpoint_created, mi_breakpoint_deleted)
4908         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4909         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4910         (mi_user_selected_context_changed, report_initial_inferior):
4911         Update.
4912         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4913         (linux_nat_terminal_inferior): Update.
4914         * infrun.c (follow_fork_inferior)
4915         (handle_vfork_child_exec_or_exit, do_target_resume)
4916         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4917         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4918         Update.
4919         * inflow.c (child_terminal_init, info_terminal_command): Update.
4920         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4921         (attach_command): Update.
4922         * infcall.c (call_thread_fsm_should_stop): Update.
4923         * gnu-nat.c (gnu_attach): Update.
4924         * extension.c (struct active_ext_lang_state)
4925         (restore_active_ext_lang): Update.
4926         * exceptions.c (print_flush): Update.
4927         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4928         (struct quit_handler_cleanup_data, restore_quit_handler)
4929         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4930         Remove.
4931         * cp-support.c (gdb_demangle): Update.
4932         * breakpoint.c (update_inserted_breakpoint_locations)
4933         (insert_breakpoint_locations, handle_jit_event)
4934         (disable_breakpoints_in_unloaded_shlib): Update.
4935         * annotate.c (annotate_breakpoints_invalid)
4936         (annotate_frames_invalid): Update.
4937
4938 2017-09-20  Tom Tromey  <tom@tromey.com>
4939
4940         * main.c (catch_command_errors): Rename from
4941         catch_command_errors_const.
4942         (captured_main_1): Update.
4943
4944 2017-09-20  Pedro Alves  <palves@redhat.com>
4945
4946         * cli/cli-cmds.c (list_command): Use print_sal_location.
4947         (print_sal_location): New function.
4948         (ambiguous_line_spec): Use print_sal_location.
4949         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4950         * symtab.c (find_function_start_sal): Likewise.
4951         * symtab.h (symtab_and_line::symbol): New field.
4952
4953 2017-09-20  Pedro Alves  <palves@redhat.com>
4954
4955         * linespec.c (minsym_found): Handle non-text minsyms.
4956         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4957
4958 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4959
4960         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4961         backslash.
4962
4963 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4964
4965         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4966         vmovups instead vmovaps.
4967         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4968
4969 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4970
4971         * NEWS (Changes since GDB 8.0): Add starti.
4972         * infcmd.c (enum run_break): New.
4973         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4974         case.
4975         (run_command): Use enum run_how.
4976         (start_command): Likewise.
4977         (starti_command): New function.
4978         (RUN_ARGS_HELP): New macro.
4979         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4980         commands.  Add starti command.
4981
4982 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4983
4984         * Makefile.in (monitor.o): Remove the rule.
4985
4986 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4987
4988         * annotate.h (struct annotate_arg_emitter): Use
4989         DISABLE_COPY_AND_ASSIGN.
4990         * common/refcounted-object.h (refcounted_object): Likewise.
4991         * completer.h (struct completion_result): Likewise.
4992         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4993         * filename-seen-cache.h (filename_seen_cache): Likewise.
4994         * gdbcore.h (thread_section_name): Likewise.
4995         * gdb_regex.h (compiled_regex): Likewise.
4996         * gdbthread.h (scoped_restore_current_thread): Likewise.
4997         * inferior.h (scoped_restore_current_inferior): Likewise.
4998         * jit.c (jit_reader): Likewise.
4999         * linespec.h (struct linespec_result): Likewise.
5000         * mi/mi-parse.h (struct mi_parse): Likewise.
5001         * nat/fork-inferior.c (execv_argv): Likewise.
5002         * progspace.h (scoped_restore_current_program_space): Likewise.
5003         * python/python-internal.h (class gdbpy_enter): Likewise.
5004         * regcache.h (regcache): Likewise.
5005         * target-descriptions.c (struct tdesc_reg): Likewise.
5006         (struct tdesc_type): Likewise.
5007         (struct tdesc_feature): Likewise.
5008         * ui-out.h (ui_out_emit_type): Likewise.
5009
5010 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5011
5012         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5013         label abort_expression.
5014
5015 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5016
5017         * common/buffer.c (buffer_xml_printf): Adjust.
5018         * common/xml-utils.c (xml_escape_text): Change return type to
5019         std::string, update code accordingly.
5020         * common/xml-utils.h (xml_escape_text): Change return type to
5021         std::string.
5022         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5023         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5024         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5025         Adjust.
5026
5027 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5028
5029         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5030         (SUBDIR_UNITTESTS_OBS): Add new object file.
5031         * unittests/xml-utils-selftests.c: New file.
5032
5033 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5034
5035         * common/selftest.h (selftest): New struct/interface.
5036         (register_test): Add name parameter, add new overload.
5037         (run_tests): Add filter parameter.
5038         (for_each_selftest_ftype): New typedef.
5039         (for_each_selftest): New declaration.
5040         * common/selftest.c (tests): Change type to
5041         map<string, unique_ptr<selftest>>.
5042         (simple_selftest): New struct.
5043         (register_test): New function.
5044         (register_test): Add name parameter and use it.
5045         (run_tests): Add filter parameter and use it.  Add prints.
5046         Adjust to vector -> map change.
5047         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5048         registering selftests.
5049         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5050         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5051         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5052         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5053         * findvar.c (_initialize_findvar): Likewise.
5054         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5055         * maint.c (maintenance_selftest): Update call to run_tests.
5056         (maintenance_info_selftests): New function.
5057         (_initialize_maint_cmds): Register "maintenance info selftests"
5058         command.  Update "maintenance selftest" doc.
5059         * regcache.c (_initialize_regcache): Add names when registering
5060         selftests.
5061         * rust-exp.y (_initialize_rust_exp): Likewise.
5062         * selftest-arch.c (gdbarch_selftest): New struct.
5063         (gdbarch_tests): Remove.
5064         (register_test_foreach_arch): Add name parameter.  Call
5065         register_test.
5066         (tests_with_arch): Remove, move most content to
5067         gdbarch_selftest::operator().
5068         (_initialize_selftests_foreach_arch): Remove.
5069         * selftest-arch.h (register_test_foreach_arch): Add name
5070         parameter.
5071         (run_tests_with_arch): New declaration.
5072         * utils-selftests.c (_initialize_utils_selftests): Add names
5073         when registering selftests.
5074         * utils.c (_initialize_utils): Likewise.
5075         * unittests/array-view-selftests.c
5076         (_initialize_array_view_selftests): Likewise.
5077         * unittests/environ-selftests.c (_initialize_environ_selftests):
5078         Likewise.
5079         * unittests/function-view-selftests.c
5080         (_initialize_function_view_selftests): Likewise.
5081         * unittests/offset-type-selftests.c
5082         (_initialize_offset_type_selftests): Likewise.
5083         * unittests/optional-selftests.c
5084         (_initialize_optional_selftests): Likewise.
5085         * unittests/scoped_restore-selftests.c
5086         (_initialize_scoped_restore_selftests): Likewise.
5087         * NEWS: Document "maintenance selftest" and "maint info
5088         selftests".
5089
5090 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5091
5092         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5093         scoped_restore.
5094
5095 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5096
5097         * mi/mi-main.c (mi_load_progress): Make uiout variable
5098         a unique_ptr.
5099
5100 2017-09-15  Pedro Alves  <palves@redhat.com>
5101
5102         * compile/compile-c-types.c (convert_enum, convert_int)
5103         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5104
5105 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5106
5107         * dwarf2read.c (copy_string): Remove.
5108         (parse_macro_definition): Replace copy_string with savestring.
5109
5110 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5111
5112         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5113         gdb_target_obs.
5114         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5115         Likewise.
5116         (i[34567]86-*-linux*): Likewise.
5117
5118 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5119
5120         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5121         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5122         <stack>: Change type to std::vector.
5123         <stack_len, stack_allocated>: Remove.
5124         <grow_stack>: Remove.
5125         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5126         (dwarf_expr_context::~dwarf_expr_context): Remove.
5127         (dwarf_expr_context::grow_stack): Remove.
5128         (dwarf_expr_context::push): Adjust.
5129         (dwarf_expr_context::pop): Adjust.
5130         (dwarf_expr_context::fetch): Adjust.
5131         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5132         (dwarf_expr_context::stack_empty_p): Adjust.
5133         (dwarf_expr_context::execute_stack_op): Adjust.
5134
5135 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5136
5137         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5138         return type to bool.
5139         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5140
5141 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5142
5143         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5144         Change type to bool.
5145         (dwarf_stack_value) <in_stack_memory>: Likewise.
5146         (dwarf_expr_context) <push_address>: Change parameter type to
5147         bool.
5148         <fetch_in_stack_memory>: Change return type to bool.
5149         <push>: Change parameter type to bool.
5150         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5151         to bool.
5152         (dwarf_expr_context::push_address): Likewise.
5153         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5154         to bool.
5155         (dwarf_expr_context::execute_stack_op): Adjust.
5156         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5157
5158 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5159
5160         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5161         (struct dwarf_expr_context) <n_pieces>: Remove.
5162         <pieces>: Change type to std::vector.
5163         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5164         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5165         pieces.
5166         (dwarf_expr_context::add_piece): Adjust.
5167         * dwarf2loc.c (struct piece_closure): Initialize fields.
5168         <n_pieces>: Remove.
5169         <pieces>: Change type to std::vector.
5170         (allocate_piece_closure): Adjust, change parameter to
5171         std::vector rvalue and std::move it to piece_closure.
5172         (rw_pieced_value): Adjust.
5173         (check_pieced_synthetic_pointer): Adjust.
5174         (indirect_synthetic_pointer): Adjust.
5175         (coerce_pieced_ref): Adjust.
5176         (free_pieced_value_closure):  Adjust.  Use delete to free
5177         piece_closure.
5178         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5179         to allocate_piece_closure.
5180         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5181
5182 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5183
5184         * probe.h (probe_ops_cp): Remove typedef.
5185         (DEF_VEC_P (probe_ops_cp)): Remove.
5186         (all_probe_ops): Change type to std::vector.
5187         * probe.c (info_probes_for_ops): Adjust to vector change.
5188         (probe_linespec_to_ops): Likewise.
5189         (all_probe_ops): Change type to std::vector.
5190         (_initialize_probe): Adjust to vector change.
5191         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5192         * elfread.c (elf_get_probes): Likewise.
5193         * stap-probe.c (_initialize_stap_probe): Likewise.
5194
5195 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5196
5197         * probe.h (struct bound_probe): Define constructors.
5198         * probe.c (bound_probe_s): Remove typedef.
5199         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5200         (collect_probes): Change return type to std::vector, remove
5201         cleanup.
5202         (compare_probes): Return bool, change parameter type.  Change
5203         semantic to "less than".
5204         (gen_ui_out_table_header_info): Change parameter to std::vector
5205         and update.
5206         (exists_probe_with_pops): Likewise.
5207         (info_probes_for_ops): Update to std::vector change.
5208         (enable_probes_command): Likewise.
5209         (disable_probes_command): Likewise.
5210
5211 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5212
5213         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5214         vec to std::vector.
5215         * probe.c (parse_probes_in_pspace): Update.
5216         (find_probes_in_objfile): Update.
5217         (find_probe_by_pc): Update.
5218         (collect_probes): Update.
5219         (probe_any_get_probes): Update.
5220         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5221         return type to reference to std::vector.
5222         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5223         std::vector and update.
5224         (dtrace_process_dof): Likewise.
5225         (dtrace_get_probes): Likewise.
5226         * elfread.c (elf_get_probes): Change return type to std::vector,
5227         store an std::vector in bfd_data.
5228         (probe_key_free): Update to std::vector.
5229         * stap-probe.c (handle_stap_probe): Change parameter to
5230         std::vector and update.
5231         (stap_get_probes): Likewise.
5232         * symfile-debug.c (debug_sym_get_probes): Change return type to
5233         std::vector and update.
5234
5235 2017-09-11  Tom Tromey  <tom@tromey.com>
5236
5237         * breakpoint.c (program_breakpoint_here_p): Update.
5238         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5239         from make_show_memory_breakpoints_cleanup.  Return a
5240         scoped_restore_tmpl<int>.
5241         (restore_show_memory_breakpoints): Remove.
5242         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5243         * mem-break.c (memory_validate_breakpoint): Update.
5244         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5245         (ia64_memory_remove_breakpoint): Update.
5246         (ia64_breakpoint_from_pc): Update.
5247         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5248         from make_show_memory_breakpoints_cleanup.
5249
5250 2017-09-11  Tom Tromey  <tom@tromey.com>
5251
5252         * d-namespace.c (d_lookup_symbol): Use std::string.
5253         (find_symbol_in_baseclass): Likewise.
5254
5255 2017-09-11  Tom Tromey  <tom@tromey.com>
5256
5257         * ctf.c (ctf_start): Use std::string.
5258
5259 2017-09-11  Tom Tromey  <tom@tromey.com>
5260
5261         * ada-lang.c (is_known_support_routine): Update.
5262         (ada_unhandled_exception_name_addr_from_raise): Update.
5263         * guile/scm-frame.c (gdbscm_frame_name): Update.
5264         * python/py-frame.c (frapy_name): Update.
5265         (frapy_function): Update.
5266         * stack.h (find_frame_funname): Update.
5267         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5268         (print_frame): Update.
5269
5270 2017-09-11  Tom Tromey  <tom@tromey.com>
5271
5272         * findcmd.c (put_bits): Take a gdb::byte_vector.
5273         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5274         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5275         cleanups.
5276         (find_command): Update.
5277
5278 2017-09-11  Tom Tromey  <tom@tromey.com>
5279
5280         * cli/cli-script.c (class scoped_restore_hook_in): New.
5281         (clear_hook_in_cleanup): Remove.
5282         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5283         scoped_restore_hook_in.
5284
5285 2017-09-11  Tom Tromey  <tom@tromey.com>
5286
5287         * cli/cli-script.c (restore_interp): Remove.
5288         (read_command_lines): Use scoped_restore_interp.
5289         * interps.c (scoped_restore_interp::set_temp): Rename from
5290         interp_set_temp.
5291         * interps.h (class scoped_restore_interp): New.
5292         (interp_set_temp): Remove.
5293
5294 2017-09-11  Tom Tromey  <tom@tromey.com>
5295
5296         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5297         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5298         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5299         scoped_restore.
5300         (mi_cmd_break_insert_1): Update.
5301         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5302         scoped_restore.
5303
5304 2017-09-11  Tom Tromey  <tom@tromey.com>
5305
5306         * demangle.c (demangle_command): Update.
5307         * breakpoint.c (disable_command): Update.
5308         (enable_command): Update.
5309         (find_location_by_number): Make "number" const.  Use
5310         get_number_trailer.
5311         * cli/cli-utils.c (extract_arg): Return std::string.
5312         * probe.c (parse_probe_linespec): Update.  Change types.
5313         (collect_probes): Take string arguments.
5314         (parse_probe_linespec): Likewise.
5315         (info_probes_for_ops): Update.
5316         (enable_probes_command): Update.
5317         (disable_probes_command): Update.
5318         * break-catch-sig.c (catch_signal_split_args): Update.
5319         * mi/mi-parse.c (mi_parse): Update.
5320
5321 2017-09-11  Tom Tromey  <tom@tromey.com>
5322
5323         * language.h (language_enum): Make argument const.
5324         * language.c (language_enum): Make argument const.
5325
5326 2017-09-11  Tom Tromey  <tom@tromey.com>
5327
5328         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5329         as function.
5330         (skip_to_space): Rename from skip_to_space_const.
5331         * common/common-utils.c (skip_to_space): New function.
5332         (skip_to_space): Rename from skip_to_space_const.
5333         * cli/cli-utils.h (get_number): Rename from get_number_const.
5334         (extract_arg): Rename from extract_arg_const.
5335         * cli/cli-utils.c (get_number): Rename from get_number_const.
5336         (extract_arg): Rename from extract_arg_const.
5337         (number_or_range_parser::get_number): Use ::get_number.
5338         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5339         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5340         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5341         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5342         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5343         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5344         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5345         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5346
5347 2017-09-11  Tom Tromey  <tom@tromey.com>
5348
5349         * python/python.c (do_start_initialization): Use
5350         py-event-types.def to initialize types.
5351         Define all object type structures.
5352         * python/python-internal.h: Don't declare event initialization
5353         functions.
5354         * python/py-threadevent.c (thread_event_object_type): Don't
5355         define.
5356         * python/py-stopevent.c (stop_event_object_type): Don't define.
5357         * python/py-signalevent.c (signal_event_object_type): Don't
5358         declare or define.
5359         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5360         (clear_objfiles_event_object_type): Don't declare or define.
5361         * python/py-infevents.c (inferior_call_pre_event_object_type)
5362         (inferior_call_post_event_object_type)
5363         (register_changed_event_object_type)
5364         (memory_changed_event_object_type): Don't declare or define.
5365         * python/py-inferior.c (new_thread_event_object_type)
5366         (new_inferior_event_object_type)
5367         (inferior_deleted_event_object_type): Don't declare or define.
5368         * python/py-exitedevent.c (exited_event_object_type): Don't
5369         declare or define.
5370         * python/py-evts.c (gdbpy_initialize_py_events): Use
5371         py-all-events.def.
5372         * python/py-events.h (thread_event_object_type): Don't declare.
5373         (events_object): Use py-all-events.def.
5374         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5375         py-event-types.def.
5376         * python/py-event-types.def: New file.
5377         * python/py-continueevent.c (create_continue_event_object): Don't
5378         declare or define.
5379         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5380         declare or define.
5381         * python/py-all-events.def: New file.
5382
5383 2017-09-11  Tom Tromey  <tom@tromey.com>
5384
5385         * python/py-threadevent.c (create_thread_event_object): Return
5386         gdbpy_ref.
5387         * python/py-stopevent.h (create_stop_event_object)
5388         (create_breakpoint_event_object, create_signal_event_object):
5389         Update.
5390         * python/py-stopevent.c (create_stop_event_object): Return
5391         gdbpy_ref.
5392         (emit_stop_event): Update.
5393         * python/py-signalevent.c (create_signal_event_object): Return
5394         gdbpy_ref.
5395         * python/py-infevents.c (create_inferior_call_event_object):
5396         Update.
5397         * python/py-event.h (create_event_object)
5398         (create_thread_event_object): Update.
5399         * python/py-event.c (create_event_object): Return gdbpy_ref.
5400         * python/py-continueevent.c: Return gdbpy_ref.
5401         * python/py-bpevent.c (create_breakpoint_event_object): Return
5402         gdbpy_ref.
5403
5404 2017-09-11  Tom Tromey  <tom@tromey.com>
5405
5406         PR python/15622:
5407         * NEWS: Add entry.
5408         * python/python.c (do_start_initialization): Initialize new event
5409         types.
5410         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5411         (gdbpy_initialize_inferior_deleted_event)
5412         (gdbpy_initialize_new_thread_event): Declare.
5413         * python/py-threadevent.c (create_thread_event_object): Add option
5414         "thread" parameter.
5415         * python/py-inferior.c (new_thread_event_object_type)
5416         (new_inferior_event_object_type)
5417         (inferior_deleted_event_object_type): Declare.
5418         (python_new_inferior, python_inferior_deleted): New functions.
5419         (add_thread_object): Emit new_thread event.
5420         (gdbpy_initialize_inferior): Attach new functions to corresponding
5421         observers.
5422         (new_thread, new_inferior, inferior_deleted): Define new event
5423         types.
5424         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5425         registries.
5426         * python/py-events.h (events_object) <new_inferior,
5427         inferior_deleted, new_thread>: New fields.
5428         * python/py-event.h (create_thread_event_breakpoint): Add optional
5429         "thread" parameter.
5430
5431 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5432
5433         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5434         check current_ui instead.
5435         (internal_vproblem): Likewise.
5436
5437 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5438
5439         * thread.c (print_thread_info_1): Remove unnecessary calls to
5440         uiout->is_mi_like_p.
5441
5442 2017-09-09  Tom Tromey  <tom@tromey.com>
5443
5444         * namespace.h (add_using_directive): Update.
5445         * namespace.c (add_using_directive): Change type of excludes to
5446         std::vector.
5447         * dwarf2read.c (read_import_statement): Use std::vector.
5448         (read_namespace): Update.
5449         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5450
5451 2017-09-09  Tom Tromey  <tom@tromey.com>
5452
5453         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5454
5455 2017-09-09  Tom Tromey  <tom@tromey.com>
5456
5457         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5458
5459 2017-09-09  Tom Tromey  <tom@tromey.com>
5460
5461         * stack.c (func_command): Use gdb::def_vector.
5462
5463 2017-09-09  Tom Tromey  <tom@tromey.com>
5464
5465         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5466         ui_out_emit_list, ui_out_emit_tuple.
5467         (mi_cmd_var_update): Likewise.
5468
5469 2017-09-09  Tom Tromey  <tom@tromey.com>
5470
5471         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5472         ui_out_redirect_pop.
5473         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5474         ui_out_redirect_pop.
5475         * utils.c (do_ui_out_redirect_pop)
5476         (make_cleanup_ui_out_redirect_pop): Remove.
5477         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5478         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5479         * ui-out.h (ui_out_redirect_pop): New class.
5480
5481 2017-09-09  Tom Tromey  <tom@tromey.com>
5482
5483         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5484         (list_available_thread_groups, mi_cmd_list_thread_groups)
5485         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5486         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5487         Likewise.
5488
5489 2017-09-09  Tom Tromey  <tom@tromey.com>
5490
5491         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5492         ui_out_emit_tuple.
5493
5494 2017-09-09  Tom Tromey  <tom@tromey.com>
5495
5496         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5497         * stack.c (print_frame): Use ui_out_emit_tuple.
5498         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5499         (info_spu_mailbox_command, info_spu_dma_command)
5500         (info_spu_proxydma_command): Likewise.
5501         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5502         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5503         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5504         ui_out_emit_tuple.
5505         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5506
5507 2017-09-09  Tom Tromey  <tom@tromey.com>
5508
5509         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5510         (class ui_out_emit_table): Update comment.
5511         * ui-out.c (do_cleanup_table_end)
5512         (make_cleanup_ui_out_table_begin_end): Remove.
5513         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5514         (info_spu_dma_cmdlist): Likewise.
5515         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5516         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5517         ui_out_emit_table.
5518
5519 2017-09-09  Tom Tromey  <tom@tromey.com>
5520
5521         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5522         ui_out_emit_list, gdb::optional.
5523
5524 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5525
5526         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5527         prototype.
5528         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5529         prototype.
5530         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5531         prototype.
5532         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5533         * ada-exp.y: Remove _initialize_ada_exp prototype.
5534         * ada-lang.c: Remove _initialize_ada_language prototype.
5535         * ada-tasks.c: Remove _initialize_tasks prototype.
5536         * addrmap.c: Remove _initialize_addrmap prototype.
5537         * agent.c: Remove _initialize_agent prototype.
5538         * aix-thread.c: Remove _initialize_aix_thread prototype.
5539         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5540         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5541         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5542         prototype.
5543         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5544         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5545         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5546         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5547         prototype.
5548         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5549         prototype.
5550         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5551         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5552         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5553         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5554         prototype.
5555         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5556         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5557         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5558         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5559         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5560         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5561         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5562         prototype.
5563         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5564         prototype.
5565         * annotate.c: Remove _initialize_annotate prototype.
5566         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5567         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5568         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5569         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5570         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5571         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5572         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5573         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5574         prototype.
5575         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5576         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5577         * auto-load.c: Remove _initialize_auto_load prototype.
5578         * auxv.c: Remove _initialize_auxv prototype.
5579         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5580         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5581         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5582         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5583         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5584         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5585         prototype.
5586         * break-catch-throw.c: Remove _initialize_break_catch_throw
5587         prototype.
5588         * breakpoint.c: Remove _initialize_breakpoint prototype.
5589         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5590         * btrace.c: Remove _initialize_btrace prototype.
5591         * charset.c: Remove _initialize_charset prototype.
5592         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5593         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5594         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5595         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5596         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5597         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5598         * coffread.c: Remove _initialize_coffread prototype.
5599         * compile/compile.c: Remove _initialize_compile prototype.
5600         * complaints.c: Remove _initialize_complaints prototype.
5601         * completer.c: Remove _initialize_completer prototype.
5602         * copying.awk: Remove _initialize_copying prototype.
5603         * copying.c: Regenerate.
5604         * core-regset.c: Remove _initialize_core_regset prototype.
5605         * corefile.c: Remove _initialize_core prototype.
5606         * corelow.c: Remove _initialize_corelow prototype.
5607         * cp-abi.c: Remove _initialize_cp_abi prototype.
5608         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5609         * cp-support.c: Remove _initialize_cp_support prototype.
5610         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5611         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5612         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5613         * ctf.c: Remove _initialize_ctf prototype.
5614         * d-lang.c: Remove _initialize_d_language prototype.
5615         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5616         prototype.
5617         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5618         * dbxread.c: Remove _initialize_dbxread prototype.
5619         * dcache.c: Remove _initialize_dcache prototype.
5620         * demangle.c: Remove _initialize_demangler prototype.
5621         * disasm-selftests.c: Remove _initialize_disasm_selftests
5622         prototype.
5623         * disasm.c: Remove _initialize_disasm prototype.
5624         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5625         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5626         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5627         prototype.
5628         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5629         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5630         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5631         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5632         * elfread.c: Remove _initialize_elfread prototype.
5633         * exec.c: Remove _initialize_exec prototype.
5634         * extension.c: Remove _initialize_extension prototype.
5635         * f-lang.c: Remove _initialize_f_language prototype.
5636         * f-valprint.c: Remove _initialize_f_valprint prototype.
5637         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5638         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5639         * filesystem.c: Remove _initialize_filesystem prototype.
5640         * findcmd.c: Remove _initialize_mem_search prototype.
5641         * fork-child.c: Remove _initialize_fork_child prototype.
5642         * frame-base.c: Remove _initialize_frame_base prototype.
5643         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5644         * frame.c: Remove _initialize_frame prototype.
5645         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5646         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5647         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5648         * gcore.c: Remove _initialize_gcore prototype.
5649         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5650         * gdbarch.c: Regenerate.
5651         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5652         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5653         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5654         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5655         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5656         * go-lang.c: Remove _initialize_go_language prototype.
5657         * go32-nat.c: Remove _initialize_go32_nat prototype.
5658         * guile/guile.c: Remove _initialize_guile prototype.
5659         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5660         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5661         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5662         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5663         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5664         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5665         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5666         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5667         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5668         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5669         prototype.
5670         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5671         prototype.
5672         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5673         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5674         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5675         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5676         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5677         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5678         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5679         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5680         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5681         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5682         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5683         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5684         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5685         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5686         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5687         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5688         prototype.
5689         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5690         prototype.
5691         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5692         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5693         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5694         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5695         * infcall.c: Remove _initialize_infcall prototype.
5696         * infcmd.c: Remove _initialize_infcmd prototype.
5697         * inferior.c: Remove _initialize_inferiors prototype.
5698         * inflow.c: Remove _initialize_inflow prototype.
5699         * infrun.c: Remove _initialize_infrun prototype.
5700         * interps.c: Remove _initialize_interpreter prototype.
5701         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5702         * jit.c: Remove _initialize_jit prototype.
5703         * language.c: Remove _initialize_language prototype.
5704         * linux-fork.c: Remove _initialize_linux_fork prototype.
5705         * linux-nat.c: Remove _initialize_linux_nat prototype.
5706         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5707         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5708         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5709         * m2-lang.c: Remove _initialize_m2_language prototype.
5710         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5711         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5712         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5713         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5714         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5715         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5716         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5717         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5718         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5719         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5720         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5721         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5722         * machoread.c: Remove _initialize_machoread prototype.
5723         * macrocmd.c: Remove _initialize_macrocmd prototype.
5724         * macroscope.c: Remove _initialize_macroscope prototype.
5725         * maint.c: Remove _initialize_maint_cmds prototype.
5726         * mdebugread.c: Remove _initialize_mdebugread prototype.
5727         * memattr.c: Remove _initialize_mem prototype.
5728         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5729         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5730         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5731         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5732         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5733         * microblaze-linux-tdep.c: Remove
5734         _initialize_microblaze_linux_tdep prototype.
5735         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5736         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5737         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5738         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5739         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5740         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5741         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5742         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5743         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5744         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5745         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5746         prototype.
5747         * mipsread.c: Remove _initialize_mipsread prototype.
5748         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5749         prototype.
5750         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5751         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5752         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5753         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5754         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5755         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5756         prototype.
5757         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5758         * nto-procfs.c: Remove _initialize_procfs prototype.
5759         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5760         * objc-lang.c: Remove _initialize_objc_language prototype.
5761         * objfiles.c: Remove _initialize_objfiles prototype.
5762         * observer.c: Remove observer_test_first_notification_function,
5763         observer_test_second_notification_function,
5764         observer_test_third_notification_function, and
5765         _initialize_observer prototypes.
5766         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5767         * osabi.c: Remove _initialize_gdb_osabi prototype.
5768         * osdata.c: Remove _initialize_osdata prototype.
5769         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5770         * parse.c: Remove _initialize_parse prototype.
5771         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5772         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5773         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5774         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5775         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5776         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5777         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5778         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5779         * printcmd.c: Remove _initialize_printcmd prototype.
5780         * probe.c: Remove _initialize_probe prototype.
5781         * proc-api.c: Remove _initialize_proc_api prototype.
5782         * proc-events.c: Remove _initialize_proc_events prototype.
5783         * proc-service.c: Remove _initialize_proc_service prototype.
5784         * procfs.c: Remove _initialize_procfs prototype.
5785         * psymtab.c: Remove _initialize_psymtab prototype.
5786         * python/python.c: Remove _initialize_python prototype.
5787         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5788         * record-btrace.c: Remove _initialize_record_btrace prototype.
5789         * record-full.c: Remove _initialize_record_full prototype.
5790         * record.c: Remove _initialize_record prototype.
5791         * regcache.c: Remove _initialize_regcache prototype.
5792         * reggroups.c: Remove _initialize_reggroup prototype.
5793         * remote-notif.c: Remove _initialize_notif prototype.
5794         * remote-sim.c: Remove _initialize_remote_sim prototype.
5795         * remote.c: Remove _initialize_remote prototype.
5796         * reverse.c: Remove _initialize_reverse prototype.
5797         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5798         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5799         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5800         prototype.
5801         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5802         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5803         * rust-exp.y: Remove _initialize_rust_exp prototype.
5804         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5805         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5806         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5807         * score-tdep.c: Remove _initialize_score_tdep prototype.
5808         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5809         prototype.
5810         * ser-go32.c: Remove _initialize_ser_dos prototype.
5811         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5812         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5813         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5814         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5815         * serial.c: Remove _initialize_serial prototype.
5816         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5817         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5818         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5819         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5820         * skip.c: Remove _initialize_step_skip prototype.
5821         * sol-thread.c: Remove _initialize_sol_thread prototype.
5822         * solib-aix.c: Remove _initialize_solib_aix prototype.
5823         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5824         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5825         * solib-frv.c: Remove _initialize_frv_solib prototype.
5826         * solib-spu.c: Remove _initialize_spu_solib prototype.
5827         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5828         * solib-target.c: Remove _initialize_solib_target prototype.
5829         * solib.c: Remove _initialize_solib prototype.
5830         * source.c: Remove _initialize_source prototype.
5831         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5832         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5833         prototype.
5834         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5835         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5836         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5837         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5838         prototype.
5839         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5840         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5841         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5842         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5843         prototype.
5844         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5845         prototype.
5846         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5847         prototype.
5848         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5849         prototype.
5850         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5851         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5852         prototype.
5853         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5854         prototype.
5855         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5856         prototype.
5857         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5858         prototype.
5859         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5860         prototype.
5861         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5862         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5863         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5864         * stabsread.c: Remove _initialize_stabsread prototype.
5865         * stack.c: Remove _initialize_stack prototype.
5866         * stap-probe.c: Remove _initialize_stap_probe prototype.
5867         * std-regs.c: Remove _initialize_frame_reg prototype.
5868         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5869         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5870         * symfile.c: Remove _initialize_symfile prototype.
5871         * symmisc.c: Remove _initialize_symmisc prototype.
5872         * symtab.c: Remove _initialize_symtab prototype.
5873         * target-dcache.c: Remove _initialize_target_dcache prototype.
5874         * target-descriptions.c: Remove _initialize_target_descriptions
5875         prototype.
5876         * thread.c: Remove _initialize_thread prototype.
5877         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5878         prototype.
5879         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5880         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5881         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5882         prototype.
5883         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5884         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5885         * tracefile.c: Remove _initialize_tracefile prototype.
5886         * tracepoint.c: Remove _initialize_tracepoint prototype.
5887         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5888         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5889         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5890         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5891         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5892         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5893         * tui/tui.c: Remove _initialize_tui prototype.
5894         * typeprint.c: Remove _initialize_typeprint prototype.
5895         * user-regs.c: Remove _initialize_user_regs prototype.
5896         * utils.c: Remove _initialize_utils prototype.
5897         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5898         * valarith.c: Remove _initialize_valarith prototype.
5899         * valops.c: Remove _initialize_valops prototype.
5900         * valprint.c: Remove _initialize_valprint prototype.
5901         * value.c: Remove _initialize_values prototype.
5902         * varobj.c: Remove _initialize_varobj prototype.
5903         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5904         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5905         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5906         * windows-nat.c: Remove _initialize_windows_nat,
5907         _initialize_check_for_gdb_ini, and _initialize_loadable
5908         prototypes.
5909         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5910         * xcoffread.c: Remove _initialize_xcoffread prototype.
5911         * xml-support.c: Remove _initialize_xml_support prototype.
5912         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5913         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5914         prototype.
5915         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5916         prototype.
5917         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5918
5919 2017-09-08  Keith Seitz  <keiths@redhat.com>
5920
5921         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5922         field.
5923
5924 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5925
5926         * f-valprint.c (f_val_print): Remove check for one byte
5927         sized integers. Remove printing of character type.
5928
5929 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5930             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5931             Bernhard Heckel  <bernhard.heckel@intel.com>
5932
5933         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5934         to maintain proper indentation when printing pointers/refs.
5935
5936 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5937
5938         GDB 8.0.1 released.
5939
5940 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5941
5942         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5943
5944 2017-09-05  Tom Tromey  <tom@tromey.com>
5945
5946         * parse.c (funcall_chain): Now a std::vector.
5947         (start_arglist, end_arglist): Simplify.
5948         (free_funcalls): Remove.
5949         (parse_exp_in_context_1): Remove cleanup.
5950
5951 2017-09-05  Tom Tromey  <tom@tromey.com>
5952
5953         * go-exp.y (go_parse): Don't create a cleanup.
5954
5955 2017-09-05  Tom Tromey  <tom@tromey.com>
5956
5957         * d-exp.y (PrimaryExpression): Use std::string.
5958         (d_parse): Don't create a cleanup.
5959
5960 2017-09-05  Tom Tromey  <tom@tromey.com>
5961
5962         * utils.c (do_clear_parser_state): Remove.
5963         (make_cleanup_clear_parser_state): Remove.
5964         * p-exp.y (pascal_parse): Use scoped_restore.
5965         * m2-exp.y (m2_parse): Use scoped_restore.
5966         * f-exp.y (f_parse): Use scoped_restore.
5967         * d-exp.y (d_parse): Use scoped_restore.
5968         * c-exp.y (c_parse): Use scoped_restore.
5969         * ada-exp.y (ada_parse): Use scoped_restore.
5970         * utils.h (make_cleanup_clear_parser_state): Remove.
5971
5972 2017-09-06  Keith Seitz  <keiths@redhat.com>
5973
5974         * dwarf2read.c (dw2_linkage_name_attr): New function.
5975         (dw2_linkage_name): New function.
5976         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5977         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5978         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5979
5980 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5981
5982         * config/djgpp/djconfig.sh: Correct shell portability issue.
5983
5984 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5985
5986         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5987
5988 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5989
5990         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5991         * NEWS: Mention new FreeBSD/mips native configuration.
5992         * configure.host: Add aarch64*-*-freebsd*.
5993         * configure.nat: Likewise.
5994         * aarch64-fbsd-nat.c: New file.
5995
5996 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5997
5998         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5999         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6000         * NEWS: Mention new FreeBSD/aarch64 target.
6001         * configure.tgt: Add aarch64*-*-freebsd*.
6002         * aarch64-fbsd-tdep.c: New file.
6003         * aarch64-fbsd-tdep.h: New file.
6004
6005 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6006
6007         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6008
6009 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6010
6011         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6012         of TLS symbols.
6013
6014 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6015
6016         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6017         call.
6018
6019 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6020
6021         * infrun.c (follow_exec): Call add_thread after
6022         target_find_description.
6023
6024 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6025
6026         * infrun.c (handle_inferior_event_1): When exec'ing, read
6027         stop_pc after follow_exec.
6028
6029 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6030
6031         * remote.c (process_g_packet): Update error message.
6032
6033 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6034
6035         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6036         targets.
6037
6038 2017-09-05  Pedro Alves  <palves@redhat.com>
6039
6040         * eval.c (eval_call, evaluate_funcall): New functions, factored
6041         out from ...
6042         (evaluate_subexp_standard): ... this.
6043
6044 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6045
6046         * amd64-tdep.c (amd64_target_description): Create target
6047         descriptions.
6048         (_initialize_amd64_tdep): Don't call functions
6049         initialize_tdesc_amd64_*.  Add self tests.
6050         * arch/amd64.c (amd64_create_target_description): Add parameter
6051         is_linux.  Call set_tdesc_osabi if is_linux is true.
6052         * arch/amd64.h (amd64_create_target_description): Update the
6053         declaration.
6054         * arch/i386.c (i386_create_target_description): Add parameter
6055         is_linux.  Call set_tdesc_osabi if is_linux is true.
6056         * arch/i386.h (i386_create_target_description): Update
6057         declaration.
6058         * configure.tgt: Add i386.o to gdb_target_obs.
6059         * features/Makefile (XMLTOC): Remove i386/*.xml.
6060         * features/i386/amd64-avx-avx512.c: Remove.
6061         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6062         * features/i386/amd64-avx-mpx.c: Remove.
6063         * features/i386/amd64-avx.c: Remove.
6064         * features/i386/amd64-mpx.c: Remove.
6065         * features/i386/amd64.c: Remove.
6066         * features/i386/i386-avx-avx512.c: Remove.
6067         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6068         * features/i386/i386-avx-mpx.c: Remove.
6069         * features/i386/i386-avx.c: Remove.
6070         * features/i386/i386-mmx.c: Remove.
6071         * features/i386/i386-mpx.c: Remove.
6072         * features/i386/i386.c: Remove.
6073         * i386-tdep.c: Don't include features/i386/i386*.c., include
6074         target-descriptions.h and arch/i386.h.
6075         (i386_target_description): Create target descriptions.
6076         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6077         functions.  Do self tests.
6078
6079 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6080
6081         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6082         * features/i386/amd64-avx-avx512-linux.c: Removed.
6083         * features/i386/amd64-avx-linux.c: Removed.
6084         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6085         * features/i386/amd64-avx-mpx-linux.c: Removed.
6086         * features/i386/amd64-linux.c: Removed.
6087         * features/i386/amd64-mpx-linux.c: Removed.
6088         * features/i386/x32-avx-avx512-linux.c: Removed.
6089         * features/i386/x32-avx-linux.c: Removed.
6090         * features/i386/x32-linux.c: Removed.
6091
6092 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6093
6094         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6095         features/i386/*.c.
6096         (amd64_linux_read_description): Call
6097         amd64_create_target_description.
6098         * arch/amd64.c: New file.
6099         * arch/amd64.h: New file.
6100         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6101         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6102
6103 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6104
6105         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6106         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6107         (amd64_linux_read_description): Create target descriptions.
6108         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6109         functions.  Add unit tests.
6110         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6111         x32-core.xml.
6112         * features/i386/64bit-avx.c: Generated.
6113         * features/i386/64bit-avx512.c: Generated.
6114         * features/i386/64bit-core.c: Generated.
6115         * features/i386/64bit-linux.c: Generated.
6116         * features/i386/64bit-mpx.c: Generated.
6117         * features/i386/64bit-pkeys.c: Generated.
6118         * features/i386/64bit-segments.c: Generated.
6119         * features/i386/64bit-sse.c: Generated.
6120         * features/i386/x32-core.c: Generated.
6121         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6122         c files for amd64-linux and x32-linux.
6123
6124 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6125
6126         * amd64-linux-tdep.c (amd64_linux_read_description): New
6127         function.
6128         (amd64_linux_core_read_description): Call
6129         amd64_linux_read_description.
6130         (amd64_linux_init_abi): Likewise.
6131         (amd64_x32_linux_init_abi): Likewise.
6132         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6133         * x86-linux-nat.c (x86_linux_read_description): Call
6134         amd64_linux_read_description.
6135
6136 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6137
6138         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6139         comments.
6140
6141 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6142
6143         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6144         * features/i386/i386-avx-avx512-linux.c: Remove.
6145         * features/i386/i386-avx-linux.c: Remove.
6146         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6147         * features/i386/i386-avx-mpx-linux.c: Remove.
6148         * features/i386/i386-linux.c: Remove.
6149         * features/i386/i386-mmx-linux.c: Remove.
6150         * features/i386/i386-mpx-linux.c: Remove.
6151
6152 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6153
6154         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6155         (SFILES): Add arch/i386.c.
6156         (HFILES_NO_SRCDIR): Add arch/i386.h.
6157         * arch/i386.c: New file.
6158         * arch/i386.h: New file.
6159         * arch/tdesc.h (allocate_target_description): Declare.
6160         (set_tdesc_architecture): Declare.
6161         (set_tdesc_osabi): Declare.
6162         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6163         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6164         include arch/i386.h.
6165         (i386_linux_read_description): Remove code and call
6166         i386_create_target_description.
6167         (set_tdesc_architecture): New function.
6168         (set_tdesc_osabi): New function.
6169         * target-descriptions.h (allocate_target_description): Remove.
6170
6171 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6172
6173         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6174         * target-descriptions.c (tdesc_create_feature): Likewise, and
6175         adjust code.
6176         * features/i386/32bit-avx.c: Re-generated.
6177         * features/i386/32bit-avx512.c: Re-generated.
6178         * features/i386/32bit-core.c: Re-generated.
6179         * features/i386/32bit-linux.c: Re-generated.
6180         * features/i386/32bit-mpx.c: Re-generated.
6181         * features/i386/32bit-pkeys.c: Re-generated.
6182         * features/i386/32bit-sse.c: Re-generated.
6183
6184 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6185
6186         * regformats/regdef.h (struct reg): Override operator == and !=.
6187
6188 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6189
6190         * arch/tdesc.h: New file.
6191         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6192         * target-descriptions.c: Update comments.
6193         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6194         declarations.
6195         * features/i386/32bit-avx.c: Re-generated.
6196         * features/i386/32bit-avx512.c: Re-generated.
6197         * features/i386/32bit-core.c: Re-generated.
6198         * features/i386/32bit-linux.c: Re-generated.
6199         * features/i386/32bit-mpx.c: Re-generated.
6200         * features/i386/32bit-pkeys.c: Re-generated.
6201         * features/i386/32bit-sse.c: Re-generated.
6202
6203 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6204
6205         * regformats/regdat.sh: Update generated code.
6206
6207 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6208
6209         * regformats/regdat.sh: Adjust code order.
6210
6211 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6212
6213         * expprint.c (dump_subexp_body_standard): Use constant format
6214         string in fprintf_filtered call.
6215
6216 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6217
6218         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6219         NetBSD/i386.
6220         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6221
6222 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6223
6224         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6225
6226 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6227
6228         * bsd-kvm.o: Define _KMEMUSER.
6229         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6230         * configure: Regenerate.
6231
6232 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6233
6234         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6235         * i386-fbsd-nat.c: Likewise.
6236
6237 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6238
6239         * unittests/array-view-selftests.c: Add include of <array>.
6240
6241 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6242
6243         * spu-tdep.c (flush_ea_cache): Add missing argument to
6244         call_function_by_hand.
6245
6246 2017-09-04  Pedro Alves  <palves@redhat.com>
6247
6248         * NEWS (Safer support for debugging with no debug info): New.
6249
6250 2017-09-04  Pedro Alves  <palves@redhat.com>
6251
6252         * c-exp.y (function_method, function_method_void): Add current
6253         instance flags to TYPE_INSTANCE.
6254         * dwarf2read.c (check_modifier): New.
6255         (compute_delayed_physnames): Assert that only C++ adds delayed
6256         physnames.  Mark fn_fields as const/volatile depending on
6257         physname.
6258         * eval.c (make_params): New type_instance_flags parameter.  Use
6259         it as the new type's instance flags.
6260         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6261         flags element and pass it to make_params.
6262         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6263         instance flags element.
6264         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6265         * gdbtypes.h: Include "enum-flags.h".
6266         (type_instance_flags): New enum-flags type.
6267         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6268         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6269         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6270         (follow_type_instance_flags): New function.
6271         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6272         * parser-defs.h (follow_type_instance_flags): Declare.
6273         * valops.c (value_struct_elt_for_reference): const/volatile must
6274         match too.
6275
6276 2017-09-04  Pedro Alves  <palves@redhat.com>
6277
6278         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6279         function/method scopes; lookup the nested name as a function local
6280         static variable.
6281
6282 2017-09-04  Pedro Alves  <palves@redhat.com>
6283
6284         (%type <voidval>): Add function_method.
6285         * c-exp.y (exp): New production for calls with no arguments.
6286         (function_method, function_method_void_or_typelist): New
6287         productions.
6288         (exp): New production for "method()::static_var".
6289         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6290         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6291         Handle OP_FUNC_STATIC_VAR.
6292         * parse.c (operator_length_standard):
6293         Handle OP_FUNC_STATIC_VAR.
6294
6295 2017-09-04  Pedro Alves  <palves@redhat.com>
6296
6297         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6298         handling.
6299         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6300         Ditto.
6301         * parse.c (operator_length_standard, operator_check_standard):
6302         Ditto.
6303         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6304
6305 2017-09-04  Pedro Alves  <palves@redhat.com>
6306
6307         * ax-gdb.c: Include "typeprint.h".
6308         (gen_expr_for_cast): New function.
6309         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6310         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6311         type is unknown.
6312         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6313         nodebug_data_symbol.
6314         * eval.c: Include "typeprint.h".
6315         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6316         Error out if symbol has unknown type.
6317         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6318         evaluate_subexp_for_cast.
6319         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6320         OP_VAR_MSYM_VALUE.
6321         (evaluate_subexp_for_cast): New function.
6322         * gdbtypes.c (init_nodebug_var_type): New function.
6323         (objfile_type): Use it to initialize types of variables with no
6324         debug info.
6325         * typeprint.c (error_unknown_type): New.
6326         * typeprint.h (error_unknown_type): New declaration.
6327         * compile/compile-c-types.c (convert_type_basic): Handle
6328         TYPE_CODE_ERROR; warn and fallback to int for variables with
6329         unknown type.
6330
6331 2017-09-04  Pedro Alves  <palves@redhat.com>
6332
6333         * eval.c (evaluate_var_value): New function, factored out from ...
6334         (evaluate_subexp_standard): ... here.
6335
6336 2017-09-04  Pedro Alves  <palves@redhat.com>
6337
6338         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6339         Remove useless assignments to 'op'.
6340
6341 2017-09-04  Pedro Alves  <palves@redhat.com>
6342
6343         * eval.c (eval_skip_value): New function.
6344         (evaluate_subexp_standard): Use it.
6345
6346 2017-09-04  Pedro Alves  <palves@redhat.com>
6347
6348         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6349         function name from symbol/minsym and pass it to
6350         error_call_unknown_return_type.
6351
6352 2017-09-04  Pedro Alves  <palves@redhat.com>
6353
6354         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6355         * ax-gdb.c (gen_msym_var_ref): New function.
6356         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6357         * eval.c (evaluate_var_msym_value): New function.
6358         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6359         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6360         to call_function_by_hand.
6361         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6362         Handle OP_VAR_MSYM_VALUE.
6363         (union exp_element) <msymbol>: New field.
6364         * minsyms.h (struct type): Forward declare.
6365         (find_minsym_type_and_address): Declare.
6366         * parse.c (write_exp_elt_msym): New function.
6367         (write_exp_msymbol): Delete, refactored as ...
6368         (find_minsym_type_and_address): ... this new function.
6369         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6370         (operator_length_standard, operator_check_standard): Handle
6371         OP_VAR_MSYM_VALUE.
6372         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6373
6374 2017-09-04  Pedro Alves  <palves@redhat.com>
6375
6376         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6377         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6378         unknown.
6379         * ada-typeprint.c (print_func_type): Handle functions with unknown
6380         return type.
6381         * c-typeprint.c (c_type_print_base): Handle functions and methods
6382         with unknown return type.
6383         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6384         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6385         * compile/compile-c-types.c: Include "objfiles.h".
6386         (convert_func): For functions with unknown return type, warn and
6387         default to int.
6388         * compile/compile-object-run.c (compile_object_run): Adjust call
6389         to call_function_by_hand_dummy.
6390         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6391         call_function_by_hand.
6392         * eval.c (evaluate_subexp_standard): Adjust calls to
6393         call_function_by_hand.  Handle functions and methods with unknown
6394         return type.  Pass expect_type to call_function_by_hand.
6395         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6396         return type.
6397         * gcore.c (call_target_sbrk): Adjust call to
6398         call_function_by_hand.
6399         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6400         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6401         an integer address type instead of nodebug.
6402         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6403         call_function_by_hand.
6404         * infcall.c (error_call_unknown_return_type): New function.
6405         (call_function_by_hand): New "default_return_type" parameter.
6406         Pass it down.
6407         (call_function_by_hand_dummy): New "default_return_type"
6408         parameter.  Use it instead of defaulting to int.  If there's no
6409         default and the return type is unknown, throw an error.  If
6410         there's a default return type, and the called function has no
6411         debug info, then assume the function is prototyped.
6412         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6413         New "default_return_type" parameter.
6414         (error_call_unknown_return_type): New declaration.
6415         * linux-fork.c (call_lseek): Cast return type of lseek.
6416         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6417         call_function_by_hand.
6418         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6419         calls to call_function_by_hand.
6420         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6421         return type.
6422         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6423         (value_nsstring, print_object_command): Adjust calls to
6424         call_function_by_hand.
6425         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6426         functions with unknown return type.
6427         (pascal_type_print_func_varspec_suffix): New function.
6428         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6429         TYPE_CODE_METHOD>: Use it.
6430         * python/py-value.c (valpy_call): Adjust call to
6431         call_function_by_hand.
6432         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6433         call_function_by_hand.
6434         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6435         call_function_by_hand.
6436         * valops.c (value_allocate_space_in_inferior): Adjust call to
6437         call_function_by_hand.
6438         * typeprint.c (type_print_unknown_return_type): New function.
6439         * typeprint.h (type_print_unknown_return_type): New declaration.
6440
6441 2017-09-04  Pedro Alves  <palves@redhat.com>
6442
6443         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6444         types with more than one parameter as prototyped.
6445
6446 2017-09-04  Pedro Alves  <palves@redhat.com>
6447
6448         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6449         (disassemble_command): Use gdb_disassembly_flags instead of bare
6450         int.
6451         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6452         (dump_insns, do_mixed_source_and_assembly_deprecated)
6453         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6454         Use gdb_disassembly_flags instead of bare int.
6455         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6456         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6457         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6458         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6459         (enum gdb_disassembly_flag): ... values of this new enumeration.
6460         (gdb_disassembly_flags): Define.
6461         (gdb_disassembly)
6462         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6463         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6464         gdb_disassembly_flags instead of bare int.
6465         * record-btrace.c (btrace_insn_history)
6466         (record_btrace_insn_history, record_btrace_insn_history_range)
6467         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6468         instead of bare int.
6469         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6470         Use gdb_disassembly_flags instead of bare int.
6471         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6472         Define.
6473         * target-delegates.c: Regenerate.
6474         * target.c (target_insn_history, target_insn_history_from)
6475         (target_insn_history_range): Use gdb_disassembly_flags instead of
6476         bare int.
6477         * target.h: Include "disasm.h".
6478         (struct target_ops) <to_insn_history, to_insn_history_from,
6479         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6480         int.
6481         (target_insn_history, target_insn_history_from)
6482         (target_insn_history_range): Use gdb_disassembly_flags instead of
6483         bare int.
6484
6485 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6486
6487         * cli/cli-script.c (build_command_line): For if/while commands,
6488         check whether args is empty.
6489
6490 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6491
6492         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6493         (enum command_control_type): Likewise.
6494         (struct command_line): Likewise.
6495         (free_command_lines): Likewise.
6496         (struct command_lines_deleter): Likewise.
6497         (command_line_up): Likewise.
6498         (read_command_lines): Likewise.
6499         (read_command_lines_1): Likewise.
6500         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6501         (enum command_control_type): Likewise.
6502         (struct command_line): Likewise.
6503         (free_command_lines): Likewise.
6504         (struct command_lines_deleter): Likewise.
6505         (command_line_up): Likewise.
6506         (read_command_lines): Likewise.
6507         (read_command_lines_1): Likewise.
6508         * breakpoint.h: Include cli/cli-script.h.
6509         * extension-priv.h: Likewise.
6510         * gdbcmd.h: Likewise.
6511
6512 2017-09-04  Pedro Alves  <palves@redhat.com>
6513
6514         * ada-lang.c (is_known_support_routine): Move sal declaration to
6515         where it is initialized.
6516         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6517         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6518         (clear_command, update_static_tracepoint): Remove init_sal
6519         references.  Move declarations closer to initializations.
6520         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6521         initializations.
6522         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6523         references.  Move sal declarations closer to initializations.
6524         * frame.c (find_frame_sal): Return a symtab_and_line via function
6525         return instead of output parameter.  Remove init_sal references.
6526         * frame.h (find_frame_sal): Return a symtab_and_line via function
6527         return instead of output parameter.
6528         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6529         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6530         instead of memset.
6531         (gdbscm_find_pc_line): Remove init_sal reference.
6532         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6533         references.  Move declarations closer to initializations.
6534         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6535         initializations.
6536         (finish_backward): Remove init_sal references.  Move declarations
6537         closer to initializations.
6538         * infrun.c (process_event_stop_test, handle_step_into_function)
6539         (insert_hp_step_resume_breakpoint_at_frame)
6540         (insert_step_resume_breakpoint_at_caller): Likewise.
6541         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6542         (symbol_to_sal): Likewise.
6543         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6544         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6545         to its initialization.
6546         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6547         init_sal references.  Move declarations closer to initializations.
6548         * source.c (get_current_source_symtab_and_line): Remove brace
6549         initialization.
6550         (set_current_source_symtab_and_line): Now takes the sal by const
6551         reference.  Remove brace initialization.
6552         (line_info): Remove init_sal reference.
6553         * source.h (set_current_source_symtab_and_line): Now takes a
6554         symtab_and_line via const reference.
6555         * stack.c (set_current_sal_from_frame): Adjust.
6556         (print_frame_info): Adjust.
6557         (get_last_displayed_sal): Return the sal via function return
6558         instead of via output parameter.  Simplify.
6559         (frame_info): Adjust.
6560         * stack.h (get_last_displayed_sal): Return the sal via function
6561         return instead of via output parameter.
6562         * symtab.c (init_sal): Delete.
6563         (find_pc_sect_line): Remove init_sal references.  Move
6564         declarations closer to initializations.
6565         (find_function_start_sal): Remove init_sal references.  Move
6566         declarations closer to initializations.
6567         * symtab.h (struct symtab_and_line): In-class initialize all
6568         fields.
6569         * tracepoint.c (set_traceframe_context)
6570         (print_one_static_tracepoint_marker): Remove init_sal references.
6571         Move declarations closer to initializations.
6572         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6573         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6574         declarations closer to initializations.
6575         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6576         init_sal references.  Adjust.
6577
6578 2017-09-04  Pedro Alves  <palves@redhat.com>
6579
6580         * ax-gdb.c (agent_command_1): Use range-for.
6581         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6582         * breakpoint.c: Include "common/array-view.h".
6583         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6584         parameter from struct symtabs_and_lines to
6585         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6586         (breakpoint_sals_to_pc): Change sals parameter from struct
6587         symtabs_and_lines to std::vector reference.
6588         (check_fast_tracepoint_sals): Change sals parameter from struct
6589         symtabs_and_lines to std::array_view.  Use range-for.
6590         (decode_static_tracepoint_spec): Return a std::vector instead of
6591         symtabs_and_lines.  Update.
6592         (create_breakpoint): Update.
6593         (break_range_command, until_break_command, clear_command): Update.
6594         (base_breakpoint_decode_location, bkpt_decode_location)
6595         (bkpt_probe_create_sals_from_location)
6596         (bkpt_probe_decode_location, tracepoint_decode_location)
6597         (tracepoint_probe_decode_location)
6598         (strace_marker_create_sals_from_location): Return a std::vector
6599         instead of symtabs_and_lines.
6600         (strace_marker_create_breakpoints_sal): Update.
6601         (strace_marker_decode_location): Return a std::vector instead of
6602         symtabs_and_lines.  Update.
6603         (update_breakpoint_locations): Change struct symtabs_and_lines
6604         parameters to gdb::array_view.  Adjust.
6605         (location_to_sals): Return a std::vector instead of
6606         symtabs_and_lines.  Update.
6607         (breakpoint_re_set_default): Use std::vector instead of struct
6608         symtabs_and_lines.
6609         (decode_location_default): Return a std::vector instead of
6610         symtabs_and_lines.  Update.
6611         * breakpoint.h: Include "common/array-view.h".
6612         (struct breakpoint_ops) <decode_location>: Now returns a
6613         std::vector instead of returning a symtabs_and_lines via output
6614         parameter.
6615         (update_breakpoint_locations): Change sals parameters to use
6616         gdb::array_view.
6617         * cli/cli-cmds.c (edit_command, list_command): Update to use
6618         std::vector and gdb::array_view.
6619         (ambiguous_line_spec): Adjust to use gdb::array_view and
6620         range-for.
6621         (compare_symtabs): Rename to ...
6622         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6623         const reference and adjust.
6624         (filter_sals): Rewrite using std::vector and standard algorithms.
6625         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6626         (jump_command): Update to use std::vector.
6627         * linespec.c (struct linespec_state) <canonical_names>: Update
6628         comment.
6629         (add_sal_to_sals_basic): Delete.
6630         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6631         (decode_line_2, create_sals_line_offset)
6632         (convert_address_location_to_sals, convert_linespec_to_sals)
6633         (convert_explicit_location_to_sals, parse_linespec)
6634         (event_location_to_sals, decode_line_full, decode_line_1)
6635         (decode_line_with_current_source)
6636         (decode_line_with_last_displayed, decode_objc)
6637         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6638         (linespec_result::~linespec_result): Adjust to use std::vector
6639         instead of symtabs_and_lines.
6640         * linespec.h (linespec_sals::sals): Now a std::vector.
6641         (struct linespec_result): Use std::vector, bool, and in-class
6642         initialization.
6643         (decode_line_1, decode_line_with_current_source)
6644         (decode_line_with_last_displayed): Return std::vector.
6645         * macrocmd.c (info_macros_command): Use std::vector.
6646         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6647         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6648         std::vector.
6649         * probe.h (parse_probes): Return a std::vector.
6650         * python/python.c (gdbpy_decode_line): Use std::vector and
6651         gdb::array_view.
6652         * source.c (select_source_symtab, line_info): Use std::vector.
6653         * stack.c (func_command): Use std::vector.
6654         * symtab.h (struct symtabs_and_lines): Delete.
6655         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6656
6657 2017-09-04  Pedro Alves  <palves@redhat.com>
6658
6659         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6660         unittests/array-view-selftests.c.
6661         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6662         * common/array-view.h: New file.
6663         * unittests/array-view-selftests.c: New file.
6664
6665 2017-09-04  Pedro Alves  <palves@redhat.com>
6666
6667         * cli/cli-cmds.c (edit_command): Pass message to
6668         ambiguous_line_spec.
6669         (list_command): Pass message to ambiguous_line_spec.  Say
6670         "first"/"last" instead of "start" and "end" to be consistent with
6671         the manual.
6672         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6673         them to print formatted message.
6674
6675 2017-09-04  Pedro Alves  <palves@redhat.com>
6676
6677         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6678         ftrace_update_insns by reference instead of pointer.
6679
6680 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6681
6682         * i386-go32-tdep.c: Include x86-xstate.h.
6683         (i386_go32_init_abi): Call i386_target_description.
6684         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6685         if xcr0 is X86_XSTATE_X87_MASK.
6686         * i386-tdep.h (tdesc_i386): Remove the declaration.
6687         (tdesc_i386_mmx): Likewise.
6688
6689 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6690
6691         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6692         X86_XSTATE_SSE_MASK instead of 0.
6693
6694 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6695
6696         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6697         i386_target_description.
6698         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6699         i386_target_description.
6700         * i386-tdep.c (i386_gdbarch_init): Likewise.
6701
6702 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6703
6704         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6705         (x86_darwin_init_abi_64): Call amd64_target_description.
6706         * amd64-dicos-tdep.c: Likewise.
6707         * amd64-fbsd-nat.c: Likewise.
6708         * amd64-fbsd-tdep.c: Likewise.
6709         * amd64-nbsd-tdep.c: Likewise.
6710         * amd64-obsd-tdep.c: Likewise.
6711         * amd64-sol2-tdep.c: Likewise.
6712         * amd64-windows-tdep.c: Likewise.
6713         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6714
6715 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6716
6717         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6718         (btrace_function) <insn>: Change type to use std::vector.
6719         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6720         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6721         ftrace_update_insns, ftrace_compute_global_level_offset,
6722         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6723         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6724         change to std::vector.
6725         (ftrace_update_insns): Adjust to change to std::vector, change
6726         type of INSN parameter.
6727         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6728         * record-btrace.c (btrace_call_history_insn_range,
6729         btrace_compute_src_line_range,
6730         record_btrace_frame_prev_register): Adjust to change to
6731         std::vector.
6732         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6733         to change to std::vector.
6734
6735 2017-09-03  Tom Tromey  <tom@tromey.com>
6736
6737         * corefile.c (reopen_exec_file): Use std::string.
6738
6739 2017-09-03  Tom Tromey  <tom@tromey.com>
6740
6741         * compile/compile.c (compile_register_name_mangled): Return
6742         std::string.
6743         * compile/compile-loc2c.c (pushf_register_address): Update.
6744         (pushf_register): Update.
6745         * compile/compile-c-types.c (convert_array): Update.
6746         * compile/compile-c-symbols.c (generate_vla_size): Update.
6747         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6748         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6749         (convert_one_symbol): Update.
6750         (generate_c_for_for_one_variable): Update.
6751         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6752         std::string.
6753         (generate_register_struct): Update.
6754         * compile/compile-internal.h (c_get_range_decl_name): Return a
6755         std::string.
6756         (compile_register_name_mangled): Return std::string.
6757
6758 2017-09-03  Tom Tromey  <tom@tromey.com>
6759
6760         * utils.c (perror_string): Return a std::string.
6761         (throw_perror_with_name, perror_warning_with_name): Update.
6762
6763 2017-09-03  Tom Tromey  <tom@tromey.com>
6764
6765         * demangle.c (demangle_command): Use std::string,
6766         unique_xmalloc_ptr.
6767
6768 2017-09-03  Tom Tromey  <tom@tromey.com>
6769
6770         * cli/cli-setshow.c (do_set_command): Use std::string.
6771
6772 2017-09-03  Tom Tromey  <tom@tromey.com>
6773
6774         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6775
6776 2017-09-03  Tom Tromey  <tom@tromey.com>
6777
6778         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6779
6780 2017-09-03  Tom Tromey  <tom@tromey.com>
6781
6782         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6783         gdb::unique_xmalloc_ptr.
6784
6785 2017-09-03  Tom Tromey  <tom@tromey.com>
6786
6787         * thread.c (print_thread_info_1): Use string_printf.
6788         (thread_apply_command, thread_apply_all_command): Use
6789         std::string.
6790
6791 2017-09-03  Tom Tromey  <tom@tromey.com>
6792
6793         * valprint.c (val_print_string): Update.
6794         * gdbcore.h (memory_error_message): Return std::string.
6795         * corefile.c (memory_error_message): Return std::string.
6796         (memory_error): Update.
6797         * breakpoint.c (insert_bp_location): Update.
6798
6799 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6800
6801         * target/waitstatus.h (target_waitstatus_to_string): Change
6802         return type to std::string.
6803         * target/waitstatus.c (target_waitstatus_to_string): Return
6804         std::string.
6805         * target.h (target_waitstatus_to_string): Remove declaration.
6806         * infrun.c (resume, clear_proceed_status_thread,
6807         print_target_wait_results, do_target_wait, save_waitstatus,
6808         stop_all_threads): Adjust.
6809         * record-btrace.c (record_btrace_wait): Adjust.
6810         * target-debug.h
6811         (target_debug_print_struct_target_waitstatus_p): Adjust.
6812
6813 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6814
6815         PR gdb/22046
6816         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6817         detection.
6818
6819 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6820
6821         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6822         for setting/unsetting environment variables on the remote target.
6823         (New remote packets): Add entries for QEnvironmentHexEncoded,
6824         QEnvironmentUnset and QEnvironmentReset.
6825         * common/environ.c (gdb_environ::operator=): Extend method to
6826         handle m_user_set_env_list and m_user_unset_env_list.
6827         (gdb_environ::clear): Likewise.
6828         (match_var_in_string): Change type of first parameter from 'char
6829         *' to 'const char *'.
6830         (gdb_environ::set): Extend method to handle
6831         m_user_set_env_list and m_user_unset_env_list.
6832         (gdb_environ::unset): Likewise.
6833         (gdb_environ::clear_user_set_env): New method.
6834         (gdb_environ::user_set_envp): Likewise.
6835         (gdb_environ::user_unset_envp): Likewise.
6836         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6837         m_user_unset_env_list on move constructor/assignment.
6838         (unset): Add new default parameter 'update_unset_list = true'.
6839         (clear_user_set_env): New method.
6840         (user_set_envp): Likewise.
6841         (user_unset_envp): Likewise.
6842         (m_user_set_env_list): New std::set.
6843         (m_user_unset_env_list): Likewise.
6844         * common/rsp-low.c (hex2str): New function.
6845         (bin2hex): New overload for bin2hex function.
6846         * common/rsp-low.c (hex2str): New prototype.
6847         (str2hex): New overload prototype.
6848         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6849         QEnvironmentUnset and QEnvironmentReset.
6850         (remote_protocol_features): Add QEnvironmentHexEncoded,
6851         QEnvironmentUnset and QEnvironmentReset packets.
6852         (send_environment_packet): New function.
6853         (extended_remote_environment_support): Likewise.
6854         (extended_remote_create_inferior): Call
6855         extended_remote_environment_support.
6856         (_initialize_remote): Add QEnvironmentHexEncoded,
6857         QEnvironmentUnset and QEnvironmentReset packet configs.
6858         * unittests/environ-selftests.c (gdb_selftest_env_var):
6859         New variable.
6860         (test_vector_initialization): New function.
6861         (test_init_from_host_environ): Likewise.
6862         (test_reinit_from_host_environ): Likewise.
6863         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6864         Likewise.
6865         (test_unset_set_empty_vector): Likewise.
6866         (test_vector_clear): Likewise.
6867         (test_std_move): Likewise.
6868         (test_move_constructor):
6869         (test_self_move): Likewise.
6870         (test_set_unset_reset): Likewise.
6871         (run_tests): Rewrite in terms of the functions above.
6872
6873 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6874
6875         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6876         (adi_available): Use a temp variable of type CORE_ADDR as argument
6877         3 when calling target_auxv_search.
6878         (adi_normalize_address): Use masks and xor operators to calculate
6879         normalized address.
6880         (adi_read_versions, adi_write_versions, adi_print_versions)
6881         (do_examine, do_assign): Use paddress.
6882
6883 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6884
6885         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6886         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6887         out of loop and add supply of FIR.
6888         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6889         add collect of FIR.
6890
6891 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6892
6893         PR gdb/21827
6894         * cli/cli-script.c (define_command): Don't convert command name
6895         to lower case.
6896
6897 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6898
6899         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6900         Update all callers accordingly. Remove all code blocks handling
6901         the case where DISPP is not NULL.
6902
6903 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6904
6905         PR symtab/22003
6906         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6907         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6908         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6909
6910 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6911
6912         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6913         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6914         (read_comp_units_from_section): New parameter abbrev_section, use
6915         read_and_check_comp_unit_head, allocate signatured_type if needed.
6916         (create_all_comp_units): Update read_comp_units_from_section caller.
6917
6918 2017-08-23  Pedro Alves  <palves@redhat.com>
6919
6920         PR remote/21852
6921         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6922         to null_ptid and switch to thread without reading the registers
6923         after adding the inferior.
6924
6925 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6926
6927         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6928         compile-gcc.
6929         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6930         (compile_to_object): Implement compile_gcc.
6931         (_initialize_compile): Install "set compile-gcc".  Initialize
6932         compile_gcc.
6933
6934 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6935
6936         * compile/compile.c (compile_to_object): Conditionally call
6937         set_verbose.  Conditionally call compile or compile_v0.
6938
6939 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6940
6941         * sparc64-tdep.h: (adi_normalize_address): New export.
6942         * sparc-nat.h: (open_adi_tag_fd): New export.
6943         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6944         * sparc64-linux-tdep.c:
6945         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6946         (sparc64_linux_handle_segmentation_fault): New function.
6947         (sparc64_linux_init_abi): Register
6948         sparc64_linux_handle_segmentation_fault
6949         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6950         (sparc64_addr_bits_remove): New function.
6951         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6952         (MAX_PROC_NAME_SIZE): New macro.
6953         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6954         (sparc64adilist): New variable.
6955         (adi_proc_list): New variable.
6956         (find_adi_info): New function.
6957         (add_adi_info): New function.
6958         (get_adi_info_proc): New function.
6959         (get_adi_info): New function.
6960         (info_adi_command): New function.
6961         (read_maps_entry): New function.
6962         (adi_available): New function.
6963         (adi_normalize_address): New function.
6964         (adi_align_address): New function.
6965         (adi_convert_byte_count): New function.
6966         (adi_tag_fd): New function.
6967         (adi_is_addr_mapped): New function.
6968         (adi_read_versions): New function.
6969         (adi_write_versions): New function.
6970         (adi_print_versions): New function.
6971         (do_examine): New function.
6972         (do_assign): New function.
6973         (adi_examine_command): New function.
6974         (adi_assign_command): New function.
6975         (_initialize_sparc64_adi_tdep): New function.
6976
6977 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6978
6979         * breakpoint.c (breakpoints_info): Rename to ...
6980         (info_breakpoints_command): ... this.
6981         (watchpoints_info): Rename to ...
6982         (info_watchpoints_command): ... this.
6983         (tracepoints_info): Rename to ...
6984         (info_tracepoints_command): ... this.
6985         (_initialize_breakpoint): Adjust.
6986         * dcache.c (dcache_info): Rename to ...
6987         (info_display_command): ... this.
6988         (_initialize_dcache): Adjust.
6989         * frame.h (args_info): Rename to ...
6990         (info_args_command): ... this.
6991         (locals_info): Rename to ...
6992         (info_locals_command): ... this.
6993         * infcmd.c (nofp_registers_info): Rename to ...
6994         (info_registers_command): ... this.
6995         (float_info): Rename to ...
6996         (info_float_command): ... this.
6997         (program_info): Rename to ...
6998         (info_program_command): ... this.
6999         (all_registers_info): Rename to ...
7000         (info_all_registers_command): ... this.
7001         (vector_info): Rename to ...
7002         (info_vector_command): ... this.
7003         (float_info): Rename to ...
7004         (info_float_command): ... this.
7005         (_initialize_infcmd): Adjust.
7006         * inferior.h (term_info): Rename to ...
7007         (info_terminal_command): ... this.
7008         * inflow.c (term_info): Rename to ...
7009         (info_terminal_command): ... this.
7010         (_initialize_inflow): Adjust.
7011         * infrun.c (signals_info): Rename to ...
7012         (info_signals_command): ... this.
7013         (_initialize_infrun): Adjust.
7014         * objc-lang.c (classes_info): Rename to ...
7015         (info_classes_command): ... this.
7016         (selectors_info): Rename to ...
7017         (info_selectors_command): ... this.
7018         (_initialize_objc_language): Adjust.
7019         * printcmd.c (sym_info): Rename to ...
7020         (info_symbol_command): ... this.
7021         (address_info): Rename to ...
7022         (info_address_command): ... this.
7023         (display_info): Rename to ...
7024         (info_display_command): ... this.
7025         (_initialize_printcmd): Adjust.
7026         * reverse.c (bookmarks_info): Rename to ...
7027         (info_breakpoints_command): ... this.
7028         (_initialize_reverse): Adjust.
7029         * ser-go32.c (dos_info): Rename to ...
7030         (info_serial_command): ... this.
7031         (_initialize_ser_dos): Adjust.
7032         * skip.c (skip_info): Rename to ...
7033         (info_skip_command): ... this.
7034         (_initialize_step_skip): Adjust.
7035         * source.c (line_info): Rename to ...
7036         (info_line_command): ... this.
7037         (source_info): Rename to ...
7038         (info_source_command)
7039         * stack.c (frame_info): Rename to ...
7040         (info_frame_command): ... this.
7041         (locals_info): Rename to ...
7042         (info_locals_command): ... this.
7043         (args_info): Rename to ...
7044         (info_args_command): ... this.
7045         (_initialize_stack): Adjust.
7046         * symtab.c (sources_info): Rename to ...
7047         (info_sources_command): ... this.
7048         (variables_info): Rename to ...
7049         (info_variables_command): ... this.
7050         (functions_info): Rename to ...
7051         (info_functions_command): ... this.
7052         (types_info): Rename to ...
7053         (info_types_command): ... this.
7054         (_initialize_symtab): Adjust.
7055         * target.c (target_info): Rename to ...
7056         (info_target_command): ... this.
7057         (initialize_targets): Adjust.
7058         * tracepoint.c (tvariables_info): Rename to ...
7059         (info_tvariables_command): ... this.
7060         (scope_info): Rename to ...
7061         (info_scope_command): ... this.
7062         (trace_dump_actions): Adjust.
7063         (_initialize_tracepoint): Adjust.
7064
7065 2017-08-22  Tom Tromey  <tom@tromey.com>
7066
7067         * breakpoint.h (install_breakpoint): Update.
7068         * breakpoint.c (add_solib_catchpoint): Update.
7069         (install_breakpoint): Change argument to a std::unique_ptr.
7070         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7071         (create_breakpoint_sal, create_breakpoint): Update.
7072         (watch_command_1, catch_exec_command_1)
7073         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7074         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7075         Return the breakpoint.
7076         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7077         (new_single_step_breakpoint): Update.
7078         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7079         std::unique_ptr.
7080         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7081         std::unique_ptr.
7082         * break-catch-sig.c (create_signal_catchpoint): Use
7083         std::unique_ptr.
7084         * ada-lang.c (create_ada_exception_catchpoint): Use
7085         std::unique_ptr.
7086
7087 2017-08-22  Tom Tromey  <tom@tromey.com>
7088
7089         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7090
7091 2017-08-22  Tom Tromey  <tom@tromey.com>
7092
7093         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7094         (lookup_partial_symbol): Update.
7095
7096 2017-08-22  Tom Tromey  <tom@tromey.com>
7097
7098         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7099         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7100         (find_and_open_source, symtab_to_fullname): Update.
7101         * psymtab.c (psymtab_to_fullname): Update.
7102
7103 2017-08-22  Tom Tromey  <tom@tromey.com>
7104
7105         * exec.c (exec_file_attach): Update.
7106         * linux-thread-db.c (try_thread_db_load): Update.
7107         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7108         * utils.c (gdb_realpath): Change return type.
7109         (gdb_realpath_keepfile): Update.
7110         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7111         (_initialize_utils): Register the new self test.
7112         * source.c (openp): Update.
7113         (find_and_open_source): Update.
7114         * nto-tdep.c (nto_find_and_open_solib): Update.
7115         * main.c (set_gdb_data_directory): Update.
7116         (captured_main_1): Update.
7117         * dwarf2read.c (dwarf2_get_dwz_file): Update
7118         (dw2_map_symbol_filenames): Update.
7119         * auto-load.c (auto_load_safe_path_vec_update): Update.
7120         (filename_is_in_auto_load_safe_path_vec): Change type of
7121         "filename_realp".
7122         (auto_load_objfile_script): Update.
7123         (file_is_auto_load_safe): Update.  Use std::string.
7124         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7125
7126 2017-08-22  Tom Tromey  <tom@tromey.com>
7127
7128         * utils.c (gdb_realpath_keepfile): Return a
7129         gdb::unique_xmalloc_ptr.
7130         * exec.c (exec_file_attach): Update.
7131         * utils.h (gdb_realpath_keepfile): Return a
7132         gdb::unique_xmalloc_ptr.
7133
7134 2017-08-22  Tom Tromey  <tom@tromey.com>
7135
7136         * compile/compile.c (compile_file_command): Use
7137         gdb::unique_xmalloc_ptr, std::string.
7138         * utils.c (gdb_abspath): Change return type.
7139         * source.c (openp): Update.
7140         * objfiles.c (allocate_objfile): Update.
7141         * main.c (set_gdb_data_directory): Update.
7142         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7143
7144 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7145
7146         * cli-cmds.c (list_commands): List actual code around more than
7147         one location.
7148
7149 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7150
7151         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7152
7153 2017-08-21  Pedro Alves  <palves@redhat.com>
7154
7155         PR gdb/19487
7156         * c-exp.y (variable production): Handle function aliases.
7157         * minsyms.c (msymbol_is_text): New function.
7158         * minsyms.h (msymbol_is_text): Declare.
7159         * symtab.c (find_function_alias_target): New function.
7160         * symtab.h (find_function_alias_target): Declare.
7161
7162 2017-08-21  Pedro Alves  <palves@redhat.com>
7163
7164         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7165         typedefs.
7166         * typeprint.c (whatis_exp): If handling "whatis", and expression
7167         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7168         typedefs here.
7169         * valops.c (value_cast): Save "to" type before resolving
7170         stubs/typedefs.  Use that type as resulting value's type.
7171
7172 2017-08-18  Tom Tromey  <tom@tromey.com>
7173             Pedro Alves  <palves@redhat.com>
7174
7175         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7176         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7177         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7178         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7179         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7180         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7181         (linux_get_siginfo_data): Add "thread" argument.  Use
7182         scoped_restore.
7183         * linux-nat.c (linux_child_follow_fork)
7184         (check_stopped_by_watchpoint): Use scoped_restore.
7185         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7186         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7187         (restore_inferior_ptid, save_inferior_ptid): Remove.
7188         * btrace.c (btrace_fetch): Use scoped_restore.
7189         * bsd-uthread.c (bsd_uthread_fetch_registers)
7190         (bsd_uthread_store_registers): Use scoped_restore.
7191         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7192         scoped_restore.
7193         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7194         (aix_thread_xfer_partial): Use scoped_restore.
7195         * inferior.h (save_inferior_ptid): Remove.
7196
7197 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7198
7199         PR tdep/21818
7200         * arm-tdep.c (gdb_print_insn_arm): Mark
7201         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7202
7203 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7204
7205         * NEWS: Mention GDBserver's new option "--selftest".
7206         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7207         * selftest.c: Move it to common/selftest.c.
7208         * selftest.h: Move it to common/selftest.h.
7209         * selftest-arch.c (reset): New function.
7210         (tests_with_arch): Call reset.
7211
7212 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7213
7214         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7215         instead of exception_fprintf and printf_filtered.
7216
7217 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7218
7219         * selftest.c (register_self_test): Rename it to
7220         selftests::register_test.
7221         (run_self_tests): selftest::run_tests.
7222         * selftest.h: Update declarations.
7223         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7224         selftests::register_test_foreach_arch.
7225         * selftest-arch.h: Update declaration.
7226         * aarch64-tdep.c: Update.
7227         * arm-tdep.c: Likewise.
7228         * disasm-selftests.c: Likewise.
7229         * dwarf2loc.c: Likewise.
7230         * dwarf2-frame.c: Likewise.
7231         * findvar.c: Likewise.
7232         * gdbarch-selftests.c: Likewise.
7233         * maint.c (maintenance_selftest): Likewise.
7234         * regcache.c: Likewise.
7235         * rust-exp.y: Likewise.
7236         * selftest-arch.c: Likewise.
7237         * unittests/environ-selftests.c: Likewise.
7238         * unittests/function-view-selftests.c: Likewise.
7239         * unittests/offset-type-selftests.c: Likewise.
7240         * unittests/optional-selftests.c: Likewise.
7241         * unittests/scoped_restore-selftests.c: Likewise.
7242         * utils-selftests.c: Likewise.
7243
7244 2017-08-17  Pedro Alves  <palves@redhat.com>
7245
7246         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7247         local.
7248
7249 2017-08-17  Pedro Alves  <palves@redhat.com>
7250
7251         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7252         field.
7253         (reset_die_in_process): Delete, replaced by ...
7254         (process_die_scope): ... this new class.  Make it responsible for
7255         freeing cu->line_header too.
7256         (process_die): Use process_die_scope.
7257         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7258         cu->line_header_die_owner.  Don't release the line header if it's
7259         owned by the CU.
7260         (setup_type_unit_groups): Make the CU/DIE own the line header.
7261         Don't release the line header here.
7262
7263 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7264
7265         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7266
7267 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7268
7269         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7270         Single-Key mode
7271
7272 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7273
7274         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7275         mode command list.
7276
7277 2017-08-15  Stafford Horne  <shorne@gmail.com>
7278
7279         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7280
7281 2017-08-15  Stafford Horne  <shorne@gmail.com>
7282
7283         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7284
7285 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7286
7287         PR gdb/21954
7288         * infcmd.c (unset_environment_command): Use the 'clear' method on
7289         the environment instead of resetting it.
7290
7291 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7292
7293         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7294         platforms.
7295
7296 2017-08-14  Tom Tromey  <tom@tromey.com>
7297
7298         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7299         (print_binary_chars): Likewise.
7300         (BITS_IN_BYTES): Remove.
7301
7302 2017-08-14  Tom Tromey  <tom@tromey.com>
7303
7304         PR gdb/21675
7305         * valprint.c (LOW_ZERO): Change value to 034.
7306         (print_octal_chars): Add static_asserts for octal constants.
7307         * printcmd.c (print_scalar_formatted): Add 'd' case.
7308
7309 2017-08-11  Tom Tromey  <tom@tromey.com>
7310
7311         * symfile.c (add_symbol_file_command): Use std::vector.
7312
7313 2017-08-14  Tom Tromey  <tom@tromey.com>
7314
7315         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7316         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7317         std::move.
7318         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7319
7320 2017-08-11  Pedro Alves  <palves@redhat.com>
7321
7322         * infrun.c (process_event_stop_test): Adjust
7323         function_name_is_marked_for_skip call.
7324         * skip.c: Include <list>.
7325         (skiplist_entry): Make it a class with private fields, and
7326         getters/setters.
7327         (skiplist_entry_chain): Delete.
7328         (skiplist_entries): New.
7329         (skiplist_entry_count): Delete.
7330         (highest_skiplist_entry_num): New.
7331         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7332         (add_skiplist_entry): Delete.
7333         (skiplist_entry::skiplist_entry): New.
7334         (skiplist_entry::add_entry): New.
7335         (skip_file_command, skip_function): Adjust.
7336         (compile_skip_regexp): Delete.
7337         (skip_command): Don't compile regexp here.  Adjust to use
7338         skiplist_entry::add_entry.
7339         (skip_info): Adjust to use range-for and getters.
7340         (skip_enable_command, skip_disable_command): Adjust to use
7341         range-for and setters.
7342         (skip_delete_command): Adjust to use std::list.
7343         (add_skiplist_entry): Delete.
7344         (skip_file_p): Delete, refactored as ...
7345         (skiplist_entry::do_skip_file_p): ... this new method.
7346         (skip_gfile_p): Delete, refactored as ...
7347         (skiplist_entry::do_gskip_file_p): ... this new method.
7348         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7349         (skiplist_entry::skip_function_p): ... this new method.
7350         (function_name_is_marked_for_skip): Now returns bool, and takes
7351         the function sal by const reference.  Adjust to use range-for and
7352         skiplist_entry methods.
7353         (_initialize_step_skip): Remove references to
7354         skiplist_entry_chain, skiplist_entry_count.
7355         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7356         takes the function sal by const reference.
7357
7358 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7359
7360         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7361         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7362         (dwarf2_frame_cache):
7363         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7364         RETURN_MASK_ALL and set *this_case to NULL.
7365         * frame-unwind.h: Update comments.
7366
7367 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7368
7369         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7370         (dwarf2_frame_state_copy_regs): Remove.
7371         (dwarf2_frame_state_free_regs): Remove.
7372         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7373         (dwarf2_restore_rule): Call method .alloc_regs instead of
7374         dwarf2_frame_state_alloc_regs.
7375         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7376         constructor.  Call std::move.
7377         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7378         (dwarf2_frame_cache): Likewise.
7379
7380         [GDB_SELF_TEST]: Include selftest.h and
7381         selftest-arch.h.
7382         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7383         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7384         execute_cfa_program_test.
7385
7386         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7387         copy ctor, assignment operator, move assignment.
7388         <alloc_regs>: New method.
7389         <swap>: New method.
7390         (struct dwarf2_frame_state): Delete dtor.
7391         (dwarf2_frame_state_alloc_regs): Remove declaration.
7392         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7393         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7394
7395 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7396
7397         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7398         (dwarf2_frame_state::dwarf2_frame_state): New.
7399         (dwarf2_frame_state::~dwarf2_frame_state): New.
7400         (dwarf2_fetch_cfa_info): Update.
7401         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7402         rather than a pointer.  Update code.
7403         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7404         dtor.
7405         <data_align, code_align, retaddr_column>: Change them to const.
7406         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7407         to bool.
7408
7409 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7410
7411         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7412         <loc.exp>: New field.
7413         * dwarf2-frame.c (execute_cfa_program): Update.
7414         (dwarf2_frame_prev_register): Update.
7415
7416 2017-08-10  Pedro Alves  <palves@redhat.com>
7417
7418         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7419
7420 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7421
7422         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7423         (fbsd_pending_children): Use std::list.
7424         (fbsd_remember_child): Likewise.
7425         (fbsd_is_child_pending): Likewise.
7426         (fbsd_pending_vfork_done): Use std::forward_list.
7427         (fbsd_add_vfork_done): Likewise.
7428         (fbsd_is_vfork_done_pending): Likewise.
7429         (fbsd_next_vfork_done): Likewise.
7430
7431 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7432
7433         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7434         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7435         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7436         for `mapfilename'.
7437         (fbsd_xfer_partial): Use gdb::byte_vector.
7438         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7439
7440 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7441
7442         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7443         "filestuff.h".
7444         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7445
7446 2017-08-09  Tom Tromey  <tom@tromey.com>
7447
7448         * skip.c (skiplist_entry): New constructor.
7449         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7450         (skiplist_entry::file_is_glob): Now bool.
7451         (skiplist_entry::file, skiplist_entry::function): Now
7452         std::string.
7453         (make_skip_entry): Return a unique_ptr.  Use new.
7454         (free_skiplist_entry, free_skiplist_entry_cleanup)
7455         (make_free_skiplist_entry_cleanup): Remove.
7456         (skip_command, skip_disable_command, add_skiplist_entry)
7457         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7458         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7459         (function_name_is_marked_for_skip): Update.
7460         (skip_delete_command): Update.  Use delete.
7461
7462 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7463
7464         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7465         (aarch64_linux_core_read_description): New function.
7466         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7467
7468 2017-08-09  Pedro Alves  <palves@redhat.com>
7469
7470         * cp-name-parser.y (cp_comp_to_string): Return a
7471         gdb::unique_xmalloc_ptr<char>.
7472         * cp-support.c (replace_typedefs_qualified_name)
7473         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7474         (cp_canonicalize_string_full): Use op= instead of explicit
7475         convertion.
7476         (cp_class_name_from_physname, method_name_from_physname)
7477         (cp_func_name, cp_remove_params): Adjust to use
7478         gdb::unique_xmalloc_ptr<char>.
7479         * cp-support.h (cp_comp_to_string): Return a
7480         gdb::unique_xmalloc_ptr<char>.
7481         * python/py-type.c (typy_lookup_type): Adjust to use
7482         gdb::unique_xmalloc_ptr<char>.
7483
7484 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7485
7486         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7487
7488 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7489             Yao Qi  <yao.qi@linaro.org>
7490
7491         * cp-support.c (cp_canonicalize_string_full): Use
7492         gdb::unique_xmalloc_ptr<char>.
7493         (cp_canonicalize_string): Likewise.
7494
7495 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7496
7497         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7498         * regformats/i386/amd64-avx-avx512.dat: Remove.
7499         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7500         * regformats/i386/amd64-avx-mpx.dat:Remove.
7501         * regformats/i386/amd64-avx.dat: Remove.
7502         * regformats/i386/amd64-mpx.dat: Remove.
7503         * regformats/i386/i386-avx-avx512.dat: Remove.
7504         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7505         * regformats/i386/i386-avx-mpx.dat: Remove.
7506         * regformats/i386/i386-mmx.dat: Remove.
7507         * regformats/i386/i386-mpx.dat: Remove.
7508
7509 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7510
7511         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7512         * amd64-tdep.c: Don't include features/i386/x32*.c.
7513         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7514         functions.
7515         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7516         and i386/x32-avx-avx512.
7517         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7518         and i386/x32.xml.
7519         * features/i386/x32-avx-avx512.c: Removed.
7520         * features/i386/x32-avx-avx512.xml: Removed.
7521         * features/i386/x32-avx.c: Removed.
7522         * features/i386/x32-avx.xml: Removed.
7523         * features/i386/x32.c: Removed.
7524         * features/i386/x32.xml: Removed.
7525         * regformats/i386/x32-avx-avx512.dat: Removed.
7526         * regformats/i386/x32-avx.dat: Removed.
7527         * regformats/i386/x32.dat: Removed.
7528
7529 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7530
7531         PR breakpoints/21886
7532         * mem-break.c (default_memory_insert_breakpoint): Use
7533         `->placed_address' rather than `->reqstd_address' for the
7534         breakpoint location.
7535
7536 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7537
7538         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7539         assertions.
7540
7541 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7542
7543         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7544         a union of `tdep_info', `tdesc_data' and `id'.
7545         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7546         rather than `info.tdep_info'.
7547         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7548         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7549         * i386-tdep.c (i386_gdbarch_init): Likewise.
7550         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7551         * mips-tdep.c (mips_gdbarch_init): Likewise.
7552         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7553         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7554         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7555         `info.tdep_info'.
7556         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7557         `info.tdep_info'.
7558         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7559         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7560         `info.tdep_info'.
7561         * spu-tdep.c (spu_gdbarch_init): Likewise.
7562         * gdbarch.h: Regenerate.
7563
7564 2017-08-07  Leszek Swirski  <leszeks@google.com>
7565
7566         PR symtab/20899
7567         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7568
7569 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7570
7571         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7572         (gdbsim_open): Rename gdb_argv args object to argv.
7573
7574 2017-08-05  Tom Tromey  <tom@tromey.com>
7575
7576         * compile/compile-object-load.c (compile_object_load): Use
7577         gdb::unique_xmalloc_ptr.
7578         * cli/cli-dump.c (scan_filename): Rename from
7579         scan_filename_with_cleanup.  Change return type.
7580         (scan_expression): Rename from scan_expression_with_cleanup.
7581         Change return type.
7582         (dump_memory_to_file, dump_value_to_file, restore_command):
7583         Use gdb::unique_xmalloc_ptr.  Update.
7584         * cli/cli-cmds.c (find_and_open_script): Use
7585         gdb::unique_xmalloc_ptr.
7586         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7587         * symmisc.c (maintenance_print_symbols)
7588         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7589         * symfile.c (symfile_bfd_open, generic_load)
7590         (add_symbol_file_command, remove_symbol_file_command): Use
7591         gdb::unique_xmalloc_ptr.
7592         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7593         * psymtab.c (maintenance_print_psymbols): Use
7594         gdb::unique_xmalloc_ptr.
7595         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7596         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7597         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7598         (reload_shared_libraries_1): Likewise.
7599
7600 2017-08-05  Tom Tromey  <tom@tromey.com>
7601
7602         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7603         (rust_op_vector, rust_set_vector): New typedefs.
7604         (current_parser): New global.
7605         (work_obstack): Change to pointer type.  Update all users.
7606         (rust_ast, pstate): Remove globals.
7607         (struct rust_parser): New.
7608         (%union) <params, field_inits>: Change type.
7609         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7610         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7611         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7612         (convert_params_to_types, convert_params_to_expression): Change
7613         type of "params".
7614         (ast_string): Change type of "fields".
7615         (rust_parse): Make a rust_parser.  Remove cleanups.
7616         (rust_lex_tests): Make and install an auto_obstack.
7617
7618 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7619
7620         * configure.srv (ipa_x32_linux_regobj): New.
7621         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7622         instead of X86_TDESC_AVX512.
7623         (initialize_low_tracepoint): Call
7624         init_registers_x32_avx_avx512_linux.
7625
7626 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7627
7628         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7629
7630 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7631
7632         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7633
7634 2017-08-03  Tom Tromey  <tom@tromey.com>
7635
7636         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7637         Remove.
7638         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7639
7640 2017-08-03  Tom Tromey  <tom@tromey.com>
7641
7642         * python/py-param.c (compute_enum_values): Use gdb_argv.
7643
7644 2017-08-03  Tom Tromey  <tom@tromey.com>
7645
7646         * utils.h (struct gdb_argv_deleter): New.
7647         (gdb_argv): New class.
7648         * utils.c (gdb_argv::reset): New method.
7649         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7650         * tracefile.c (tsave_command): Use gdb_argv.
7651         * top.c (new_ui_command): Use gdb_argv.
7652         * symmisc.c (maintenance_print_symbols)
7653         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7654         * symfile.c (symbol_file_command, generic_load)
7655         (remove_symbol_file_command): Use gdb_argv.
7656         * stack.c (backtrace_command): Use gdb_argv.
7657         * source.c (add_path, show_substitute_path_command)
7658         (unset_substitute_path_command, set_substitute_path_command):
7659         Use gdb_argv.
7660         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7661         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7662         * remote.c (extended_remote_run, remote_put_command)
7663         (remote_get_command, remote_delete_command): Use gdb_argv.
7664         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7665         (gdbsim_open): Use gdb_argv.
7666         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7667         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7668         * procfs.c (procfs_info_proc): Use gdb_argv.
7669         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7670         * infrun.c (handle_command): Use gdb_argv.
7671         * inferior.c (add_inferior_command, clone_inferior_command):
7672         Use gdb_argv.
7673         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7674         * exec.c (exec_file_command): Use gdb_argv.
7675         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7676         * compile/compile.c (build_argc_argv): Use gdb_argv.
7677
7678 2017-08-03  Tom Tromey  <tom@tromey.com>
7679
7680         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7681
7682 2017-08-03  Tom Tromey  <tom@tromey.com>
7683
7684         * python/python.c (compute_python_string): Return std::string.
7685         (gdbpy_eval_from_control_command): Update.
7686         (do_start_initialization): Use std::string.
7687         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7688         xstrprintf.
7689         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7690         xstrprintf.
7691
7692 2017-08-03  Tom Tromey  <tom@tromey.com>
7693
7694         * top.h (do_restore_instream_cleanup): Remove.
7695         * top.c (do_restore_instream_cleanup): Remove.
7696         (read_command_file): Use scoped_restore.
7697         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7698
7699 2017-08-03  Tom Tromey  <tom@tromey.com>
7700
7701         * cli/cli-script.c (execute_user_command)
7702         (execute_control_command): Use scoped_restore.
7703
7704 2017-08-03  Tom Tromey  <tom@tromey.com>
7705
7706         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7707         (execute_user_command): Remove user_call_depth; use
7708         user_args_stack's size instead.
7709
7710 2017-08-03  Tom Tromey  <tom@tromey.com>
7711
7712         * top.h (in_user_command): Remove.
7713         * top.c (in_user_command): Remove.
7714         * cli/cli-script.c (do_restore_user_call_depth)
7715         (execute_user_command): Update.
7716
7717 2017-08-03  Tom Tromey  <tom@tromey.com>
7718
7719         * valops.c (search_struct_method): Use gdb::byte_vector.
7720         * valarith.c (value_concat): Use std::vector.
7721         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7722         (simple_search_memory): Likewise.
7723         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7724         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7725         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7726         * elfread.c (elf_rel_plt_read): Use std::string.
7727         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7728         * cli/cli-dump.c (restore_section_callback): Use
7729         gdb::byte_vector.
7730
7731 2017-08-03  Tom Tromey  <tom@tromey.com>
7732
7733         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7734
7735 2017-08-03  Tom Tromey  <tom@tromey.com>
7736
7737         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7738         (tui_register_format): Use scoped_restore.
7739
7740 2017-08-03  Tom Tromey  <tom@tromey.com>
7741
7742         * reverse.c (exec_direction_default): Remove.
7743         (exec_reverse_once): Use scoped_restore.
7744         * remote.c (restore_remote_timeout): Remove.
7745         (remote_flash_erase, remote_flash_write, remote_flash_done)
7746         (readchar, remote_serial_write): Use scoped_restore.
7747         * cli/cli-script.c (struct source_cleanup_lines_args)
7748         (source_cleanup_lines): Remove.
7749         (script_from_file): Use scoped_restore.
7750         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7751         (source_command): Use scoped_restore.
7752
7753 2017-08-03  Tom Tromey  <tom@tromey.com>
7754
7755         * utils.h (make_cleanup_free_so): Remove.
7756         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7757         * solist.h (struct so_deleter): New.
7758         (so_list_up): New typedef.
7759         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7760
7761 2017-08-03  Tom Tromey  <tom@tromey.com>
7762
7763         * utils.h (make_cleanup_restore_current_language): Remove.
7764         * utils.c (do_restore_current_language)
7765         (make_cleanup_restore_current_language): Remove.
7766         * parse.c (parse_exp_in_context_1)
7767         (parse_expression_with_language): Use
7768         scoped_restore_current_language.
7769         * mi/mi-main.c (mi_cmd_execute): Use
7770         scoped_restore_current_language.
7771         * language.h (scoped_restore_current_language): New class.
7772
7773 2017-08-03  Tom Tromey  <tom@tromey.com>
7774
7775         * compile/compile.c (cleanup_unlink_file): Remove.
7776         (compile_to_object): Use gdb::unlinker.
7777         (eval_compile_command): Likewise.
7778
7779 2017-08-03  Tom Tromey  <tom@tromey.com>
7780
7781         * utils.h (make_cleanup_fclose): Remove.
7782         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7783
7784 2017-08-03  Tom Tromey  <tom@tromey.com>
7785
7786         * top.c (open_terminal_stream): Return gdb_file_up.
7787         (new_ui_command): Update.
7788
7789 2017-08-03  Tom Tromey  <tom@tromey.com>
7790
7791         * source.c (print_source_lines_base, forward_search_command)
7792         (reverse_search_command): Use gdb_file_up.
7793
7794 2017-08-03  Tom Tromey  <tom@tromey.com>
7795
7796         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7797
7798 2017-08-03  Tom Tromey  <tom@tromey.com>
7799
7800         * cli/cli-cmds.c (find_and_open_script): Change return type.
7801         Remove "streamp" and "full_path" parameters.
7802         (source_script_with_search): Update.
7803         * auto-load.c (source_script_file): Update.
7804         * cli/cli-cmds.h (find_and_open_script): Change type.
7805         (open_script): New struct.
7806
7807 2017-08-03  Tom Tromey  <tom@tromey.com>
7808
7809         * xml-support.c (xml_fetch_content_from_file): Update.
7810         * ui-file.c (stdio_file::open): Update.
7811         * tracefile-tfile.c (tfile_start): Update.
7812         * remote.c (remote_file_put, remote_file_get): Update.
7813         * nat/linux-procfs.c (linux_proc_get_int)
7814         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7815         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7816         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7817         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7818         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7819         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7820         * linux-nat.c (linux_proc_pending_signals): Update.
7821         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7822         (file_closer): Remove.
7823         * compile/compile.c (compile_to_object): Update.
7824         * common/filestuff.h (struct gdb_file_deleter): New.
7825         (gdb_file_up): New typedef.
7826         (gdb_fopen_cloexec): Change return type.
7827         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7828         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7829         (dump_binary_file, restore_binary_file): Update.
7830         * auto-load.c (auto_load_objfile_script_1): Update.
7831
7832 2017-08-03  Tom Tromey  <tom@tromey.com>
7833
7834         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7835         (info_static_tracepoint_markers_command): Likewise.
7836         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7837         * skip.c (skip_info): Use ui_out_emit_table.
7838         * progspace.c (print_program_space): Use ui_out_emit_table.
7839         * osdata.c (info_osdata): Use ui_out_emit_table.
7840         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7841         ui_out_emit_table.
7842         * linux-thread-db.c (info_auto_load_libthread_db): Use
7843         ui_out_emit_table.
7844         * inferior.c (print_inferior): Use ui_out_emit_table.
7845         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7846         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7847         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7848         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7849         * ui-out.h (class ui_out_emit_table): New.
7850
7851 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7852
7853         * mips-tdep.c (mips_fpu_type_str): New function.
7854         (mips_dump_tdep): Call it.
7855
7856 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7857
7858         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7859         `->mips_fpu_type'.
7860
7861 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7862
7863         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7864
7865 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7866
7867         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7868
7869 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7870
7871         * cli/cli-cmds.c (maintenancechecklist): New variable.
7872         * gdbcmd.h (maintenancechecklist): Declare it.
7873         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7874         Call i386_linux_read_description with different masks.
7875         * maint.c (maintenance_check_command): New function.
7876         (_initialize_maint_cmds): Call add_prefix_cmd.
7877         * target-descriptions.c (tdesc_reg): override operator != and ==.
7878         (tdesc_type): Likewise.
7879         (tdesc_feature): Likewise.
7880         (target_desc): Likewise.
7881         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7882         (maintenance_check_xml_descriptions): New function.
7883         (_initialize_target_descriptions) Add command "xml-descriptions".
7884         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7885
7886 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7887
7888         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7889         Include features/i386/32bit-*.c.
7890         (i386_linux_read_description): Generate target description if it
7891         doesn't exist.
7892         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7893         functions.
7894         * features/i386/32bit-linux.c: Re-generated.
7895         * features/i386/32bit-sse.c: Likewise.
7896         * target-descriptions.c (print_c_feature::visit): Print code to
7897         set register number if needed.
7898         (print_c_feature) <m_next_regnum>: New field.
7899
7900 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7901
7902         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7903         (FEATURE_XMLFILES): New.
7904         (FEATURE_CFILES): New.
7905         New rules.
7906         (clean-cfiles): Remove generated c files.
7907         * features/i386/32bit-avx.c: Generated.
7908         * features/i386/32bit-avx512.c: Generated.
7909         * features/i386/32bit-core.c: Generated.
7910         * features/i386/32bit-linux.c: Generated.
7911         * features/i386/32bit-mpx.c: Generated.
7912         * features/i386/32bit-pkeys.c: Generated.
7913         * features/i386/32bit-sse.c: Generated.
7914         * target-descriptions.c: Include algorithm.
7915         (tdesc_element_visitor): Add method visit_end.
7916         (print_c_tdesc): Implement visit_end.
7917         (print_c_tdesc:: m_filename_after_features): Move it to
7918         protected.
7919         (print_c_feature): New class.
7920         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7921         name starts with "i386/32bit-".
7922
7923 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7924
7925         * target-descriptions.c (tdesc_element_visitor): New class.
7926         (tdesc_element): New class.
7927         (tdesc_reg): Inherit from tdesc_element.
7928         (tdesc_reg::accept): New function.
7929         (tdesc_type): Inherit from tdesc_element.
7930         (tdesc_type::accept): New function.
7931         (tdesc_feature): Inherit from tdesc_element.
7932         (tdesc_feature::accept): New function.
7933         (target_desc): Inherit from tdesc_element.
7934         (target_desc::target_desc): New.
7935         (target_desc::~target_desc): New.
7936         (target_desc::accept): New.
7937         (allocate_target_description): Use new.
7938         (free_target_description): Use delete.
7939         (print_c_tdesc): New class.
7940         (maint_print_c_tdesc_cmd): Adjust.
7941
7942         * features/aarch64.c: Re-generated.
7943         * features/arc-arcompact.c: Re-generated.
7944         * features/arc-v2.c: Re-generated.
7945         * features/arm/arm-with-iwmmxt.c: Re-generated.
7946         * features/arm/arm-with-m.c: Re-generated.
7947         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7948         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7949         * features/arm/arm-with-neon.c: Re-generated.
7950         * features/arm/arm-with-vfpv2.c: Re-generated.
7951         * features/arm/arm-with-vfpv3.c: Re-generated.
7952         * features/i386/amd64-avx-avx512.c: Re-generated.
7953         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7954         * features/i386/amd64-avx.c: Re-generated.
7955         * features/i386/amd64-avx-linux.c: Re-generated.
7956         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7957         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7958         * features/i386/amd64-avx-mpx.c: Re-generated.
7959         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7960         * features/i386/amd64.c: Re-generated.
7961         * features/i386/amd64-linux.c: Re-generated.
7962         * features/i386/amd64-mpx.c: Re-generated.
7963         * features/i386/amd64-mpx-linux.c: Re-generated.
7964         * features/i386/i386-avx-avx512.c: Re-generated.
7965         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7966         * features/i386/i386-avx.c: Re-generated.
7967         * features/i386/i386-avx-linux.c: Re-generated.
7968         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7969         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7970         * features/i386/i386-avx-mpx.c: Re-generated.
7971         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7972         * features/i386/i386.c: Re-generated.
7973         * features/i386/i386-linux.c: Re-generated.
7974         * features/i386/i386-mmx.c: Re-generated.
7975         * features/i386/i386-mmx-linux.c: Re-generated.
7976         * features/i386/i386-mpx.c: Re-generated.
7977         * features/i386/i386-mpx-linux.c: Re-generated.
7978         * features/i386/x32-avx-avx512.c: Re-generated.
7979         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7980         * features/i386/x32-avx.c: Re-generated.
7981         * features/i386/x32-avx-linux.c: Re-generated.
7982         * features/i386/x32.c: Re-generated.
7983         * features/i386/x32-linux.c: Re-generated.
7984         * features/microblaze.c: Re-generated.
7985         * features/microblaze-with-stack-protect.c: Re-generated.
7986         * features/mips64-dsp-linux.c: Re-generated.
7987         * features/mips64-linux.c: Re-generated.
7988         * features/mips-dsp-linux.c: Re-generated.
7989         * features/mips-linux.c: Re-generated.
7990         * features/nds32.c: Re-generated.
7991         * features/nios2.c: Re-generated.
7992         * features/nios2-linux.c: Re-generated.
7993         * features/rs6000/powerpc-32.c: Re-generated.
7994         * features/rs6000/powerpc-32l.c: Re-generated.
7995         * features/rs6000/powerpc-403.c: Re-generated.
7996         * features/rs6000/powerpc-403gc.c : Re-generated.
7997         * features/rs6000/powerpc-405.c: Re-generated.
7998         * features/rs6000/powerpc-505.c: Re-generated.
7999         * features/rs6000/powerpc-601.c: Re-generated.
8000         * features/rs6000/powerpc-602.c: Re-generated.
8001         * features/rs6000/powerpc-603.c: Re-generated.
8002         * features/rs6000/powerpc-604.c: Re-generated.
8003         * features/rs6000/powerpc-64.c: Re-generated.
8004         * features/rs6000/powerpc-64l.c: Re-generated.
8005         * features/rs6000/powerpc-7400.c: Re-generated.
8006         * features/rs6000/powerpc-750.c: Re-generated.
8007         * features/rs6000/powerpc-860.c: Re-generated.
8008         * features/rs6000/powerpc-altivec32.c: Re-generated.
8009         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8010         * features/rs6000/powerpc-altivec64.c: Re-generated.
8011         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8012         * features/rs6000/powerpc-cell32l.c: Re-generated.
8013         * features/rs6000/powerpc-cell64l.c: Re-generated.
8014         * features/rs6000/powerpc-e500.c: Re-generated.
8015         * features/rs6000/powerpc-e500l.c: Re-generated.
8016         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8017         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8018         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8019         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8020         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8021         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8022         * features/rs6000/powerpc-vsx32.c: Re-generated.
8023         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8024         * features/rs6000/powerpc-vsx64.c: Re-generated.
8025         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8026         * features/rs6000/rs6000.c: Re-generated.
8027         * features/s390-linux32.c: Re-generated.
8028         * features/s390-linux32v1.c: Re-generated.
8029         * features/s390-linux32v2.c: Re-generated.
8030         * features/s390-linux64.c: Re-generated.
8031         * features/s390-linux64v1.c: Re-generated.
8032         * features/s390-linux64v2.c: Re-generated.
8033         * features/s390-te-linux64.c: Re-generated.
8034         * features/s390-tevx-linux64.c: Re-generated.
8035         * features/s390-vx-linux64.c: Re-generated.
8036         * features/s390x-linux64.c: Re-generated.
8037         * features/s390x-linux64v1.c: Re-generated.
8038         * features/s390x-linux64v2.c: Re-generated.
8039         * features/s390x-te-linux64.c: Re-generated.
8040         * features/s390x-tevx-linux64.c: Re-generated.
8041         * features/s390x-vx-linux64.c: Re-generated.
8042         * features/sparc/sparc32-solaris.c: Re-generated.
8043         * features/sparc/sparc64-solaris.c: Re-generated.
8044         * features/tic6x-c62x.c: Re-generated.
8045         * features/tic6x-c62x-linux.c: Re-generated.
8046         * features/tic6x-c64x.c: Re-generated.
8047         * features/tic6x-c64x-linux.c: Re-generated.
8048         * features/tic6x-c64xp.c: Re-generated.
8049         * features/tic6x-c64xp-linux.c: Re-generated.
8050
8051 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8052
8053         * i386-linux-tdep.c (i386_linux_read_description): New function.
8054         (i386_linux_core_read_description): Call
8055         i386_linux_read_description.
8056         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8057         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8058         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8059         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8060         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8061         * x86-linux-nat.c (x86_linux_read_description): Call
8062         i386_linux_read_description.
8063
8064 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8065
8066         * NEWS: Mention it.
8067         * features/Makefile (%.c: %.xml): Pass the xml file name to
8068         command "maint print c-tdesc".
8069         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8070         name from 'arg'.
8071
8072 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8073
8074         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8075         in-class initialization.
8076         (tdesc_create_feature): Call new instead of XCNEW.
8077         (free_target_description): Ue delete.
8078
8079 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8080
8081         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8082
8083 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8084
8085         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8086         constant.
8087         (amd64_x32_init_abi): Likewise.
8088         * amd64-tdep.h (amd64_init_abi): Update declaration.
8089         (amd64_x32_init_abi): Likewise.
8090
8091 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8092
8093         PR tdep/21717
8094         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8095         condition for FPSCR.
8096         (arm_linux_store_inferior_registers): Likewise.
8097
8098 2017-07-22  Tom Tromey  <tom@tromey.com>
8099
8100         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8101         <syscalls_counts>: Now a std::vector.
8102         (get_catch_syscall_inferior_data): Use "new".
8103         (catch_syscall_inferior_data_cleanup): Use "delete".
8104         (insert_catch_syscall, remove_catch_syscall)
8105         (clear_syscall_counts): Update.
8106
8107 2017-07-22  Tom Tromey  <tom@tromey.com>
8108
8109         * break-catch-syscall.c (syscall_catchpoint)
8110         <syscalls_to_be_caught>: Now a std::vector<int>
8111         (~syscall_catchpoint): Remove.
8112         (insert_catch_syscall, remove_catch_syscall)
8113         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8114         (print_mention_catch_syscall, print_recreate_catch_syscall):
8115         Update.
8116         (create_syscall_event_catchpoint): Change type of "filter"
8117         parameter.
8118         (catch_syscall_split_args): Return a std::vector.
8119         (catch_syscall_command_1, catching_syscall_number_1): Update.
8120
8121 2017-07-22  Tom Tromey  <tom@tromey.com>
8122
8123         * break-catch-throw.c (struct exception_catchpoint)
8124         <exception_rx>: Now a std::string.
8125         (~exception_catchpoint): Remove.
8126         (print_one_detail_exception_catchpoint): Update.
8127         (handle_gnu_v3_exceptions): Change type of except_rx.
8128         (extract_exception_regexp): Return a std::string.
8129         (catch_exception_command_1): Update.
8130
8131 2017-07-22  Tom Tromey  <tom@tromey.com>
8132
8133         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8134         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8135         std::vector.
8136         <catch_all>: Now a bool.
8137         (~signal_catchpoint): Remove.
8138         (signal_catchpoint_insert_location)
8139         (signal_catchpoint_remove_location)
8140         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8141         (signal_catchpoint_print_mention)
8142         (signal_catchpoint_print_recreate)
8143         (signal_catchpoint_explains_signal): Update.
8144         (create_signal_catchpoint): Change type of "filter" and
8145         "catch_all".
8146         (catch_signal_split_args): Return a std::vector.  Change type of
8147         "catch_all".
8148         (catch_signal_command): Update.
8149
8150 2017-07-20  Pedro Alves  <palves@redhat.com>
8151
8152         * ada-lang.c (ada_language_defn): Make extern.
8153         (_initialize_ada_language): Remove add_language call.
8154         * c-lang.c (c_language_defn, cplus_language_defn)
8155         (asm_language_defn, minimal_language_defn): Make extern.
8156         (_initialize_c_language): Delete.
8157         * completer.c (compare_cstrings): Delete, moved to utils.h.
8158         * d-lang.c (d_language_defn): Make extern.
8159         (_initialize_d_language): Remove add_language calls.
8160         * defs.h (enum language): Add comment.
8161         * f-lang.c (f_language_defn): Make extern.
8162         (_initialize_f_language): Remove add_language call.
8163         * go-lang.c (go_language_defn): Make extern.
8164         (_initialize_go_language): Remove add_language call.
8165         * language.c: Include <algorithm>.
8166         (languages): Redefine as const array.
8167         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8168         (set_language_command): Handle "local".  Use for-range loop.
8169         (set_language): Remove loop.
8170         (language_enum): Rewrite.
8171         (language_def, language_str): Remove loops.
8172         (add_language): Delete.
8173         (add_set_language_command): New, based on add_languages.
8174         (skip_language_trampoline): Adjust.
8175         (local_language_defn): Delete.
8176         (language_gdbarch_post_init): Adjust.
8177         (_initialize_language): Remove add_language calls.  Call
8178         add_set_language_command.
8179         * language.h (add_language): Delete.
8180         (auto_language_defn)
8181         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8182         (asm_language_defn, c_language_defn, cplus_language_defn)
8183         (d_language_defn, f_language_defn, go_language_defn)
8184         (m2_language_defn, objc_language_defn, opencl_language_defn)
8185         (pascal_language_defn, rust_language_defn): Declare.
8186         * m2-lang.c (m2_language_defn): Make extern.
8187         (_initialize_m2_language): Remove add_language call.
8188         * objc-lang.c (objc_language_defn): Make extern.
8189         (_initialize_objc_language): Remove add_language call.
8190         * opencl-lang.c (opencl_language_defn): Make extern.
8191         (_initialize_opencl_language): Remove add_language call.
8192         * p-lang.c (pascal_language_defn): Make extern.
8193         (_initialize_pascal_language): Delete.
8194         * rust-lang.c (rust_language_defn): Make extern.
8195         (_initialize_rust_language): Delete.
8196         * utils.h (compare_cstrings): New static inline function.
8197
8198 2017-07-20  Pedro Alves  <palves@redhat.com>
8199
8200         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8201         (get_var_value): Constify parameters.
8202         (get_int_var_value): Change prototype.
8203         (to_fixed_range_type): Adjust.
8204         * ada-lang.h (get_int_var_value): Change prototype.
8205
8206 2017-07-20  Pedro Alves  <palves@redhat.com>
8207
8208         * dwarf2read.c (dw2_lookup_symbol): Use
8209         SYMBOL_MATCHES_SEARCH_NAME.
8210         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8211
8212 2017-07-20  Pedro Alves  <palves@redhat.com>
8213
8214         * block.c (block_iter_name_step, block_iter_name_first)
8215         (block_iter_name_next): Delete.
8216         (block_lookup_symbol_primary): Adjust to use
8217         dict_iter_match_first/dict_iter_match_next.
8218         * block.h (block_iter_name_first, block_iter_name_next): Delete
8219         declarations.
8220         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8221         dict_iter_match_first/dict_iter_match_next.
8222
8223 2017-07-20  Pedro Alves  <palves@redhat.com>
8224
8225         * cp-support.c (cp_find_first_component_aux): Add missing case for
8226         end of string.
8227
8228 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8229
8230         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8231         of dwo_cu's dwo_file.
8232
8233 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8234
8235         * remote.c (store_registers_using_G): Remove one line comment.
8236
8237 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8238
8239         * regcache.c (regcache_cpy): Simplify it.
8240         (regcache::cpy_no_passthrough): Remove it.
8241         * regcache.h (cpy_no_passthrough): Remove it.
8242         (regcache_dup, regcache_cpy): Update comments.
8243
8244 2017-07-18  Pedro Alves  <palves@redhat.com>
8245
8246         * remote-sim.c (sim_command_completer): Adjust to work with a
8247         completion_tracker instead of a VEC.
8248
8249 2017-07-17  Pedro Alves  <palves@redhat.com>
8250
8251         * completer.c (complete_source_filenames): New function.
8252         (complete_address_and_linespec_locations): New function.
8253         (location_completer): Use complete_address_and_linespec_locations.
8254         (completion_tracker::build_completion_result): Honor the tracker's
8255         request to suppress append.
8256         * completer.h (completion_tracker::suppress_append_ws)
8257         (completion_tracker::set_suppress_append_ws): New methods.
8258         (completion_tracker::m_suppress_append_ws): New field.
8259         (complete_source_filenames): New declaration.
8260         * linespec.c (linespec_complete_what): New.
8261         (struct ls_parser) <complete_what, completion_word,
8262         completion_quote_char, completion_quote_end, completion_tracker>:
8263         New fields.
8264         (string_find_incomplete_keyword_at_end): New.
8265         (linespec_lexer_lex_string): Record quote char.  If in completion
8266         mode, don't throw.
8267         (linespec_lexer_consume_token): Advance the completion word point.
8268         (linespec_lexer_peek_token): Save/restore completion info.
8269         (save_stream_and_consume_token): New.
8270         (set_completion_after_number): New.
8271         (linespec_parse_basic): Set what to complete next depending on
8272         token.  Handle function and label completions specially.
8273         (parse_linespec): Disable objc shortcut in completion mode.  Set
8274         what to complete next depending on token type.  Skip keyword if in
8275         completion mode.
8276         (complete_linespec_component, linespec_complete): New.
8277         * linespec.h (linespec_complete): Declare.
8278
8279 2017-07-17  Pedro Alves  <palves@redhat.com>
8280
8281         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8282         Handle 'operator<' / 'operator<<'.
8283
8284 2017-07-17  Pedro Alves  <palves@redhat.com>
8285
8286         * completer.c (collect_explicit_location_matches): Handle
8287         MATCH_LABEL.
8288         (convert_explicit_location_to_linespec): New, factored out from
8289         ...
8290         (convert_explicit_location_to_sals): ... this.
8291         (complete_label): New.
8292         (linespec_complete_label, find_label_symbols_in_block): New.
8293         (find_label_symbols): Add completion_mode parameter and adjust to
8294         call find_label_symbols_in_block.
8295         * linespec.h (linespec_complete_label): Declare.
8296
8297 2017-07-17  Pedro Alves  <palves@redhat.com>
8298
8299         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8300         complete_symbol_mode parameter.
8301         * cli/cli-cmds.c (complete_command): Get the completion result out
8302         of the handle_brkchars tracker if used a custom word point.
8303         * completer.c: Include "linespec.h".
8304         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8305         (advance_to_expression_complete_word_point): New.
8306         (completion_tracker::completes_to_completion_word): New.
8307         (complete_files_symbols): Pass down
8308         complete_symbol_mode::EXPRESSION.
8309         (explicit_options, probe_options): New.
8310         (collect_explicit_location_matches): Complete on the
8311         explictit_loc->foo instead of word.  Use
8312         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8313         keyword and options completions.
8314         (backup_text_ptr): Delete.
8315         (skip_keyword): New.
8316         (complete_explicit_location): Remove 'word' parameter.  Add
8317         language, quoted_arg_start and quoted_arg_end parameters.
8318         Rewrite, parsing left to right.
8319         (location_completer): Rewrite.
8320         (location_completer_handle_brkchars): New function.
8321         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8322         (enum complete_line_internal_reason): Adjust comments.
8323         (completion_tracker::discard_completions): New.
8324         (completer_handle_brkchars_func_for_completer): Handle
8325         location_completer.
8326         (gdb_custom_word_point_brkchars)
8327         (gdb_org_rl_basic_quote_characters): New.
8328         (gdb_completion_word_break_characters_throw)
8329         (completion_find_completion_word): Handle trackers that use a
8330         custom word point.
8331         (completion_tracker::advance_custom_word_point_by): New.
8332         (completion_tracker::build_completion_result): Don't rely on
8333         readline appending the quote char.
8334         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8335         use a custom word point.
8336         (gdb_rl_attempted_completion_function): Restore
8337         rl_basic_quote_characters.
8338         * completer.h (class completion_tracker): Extend intro comment.
8339         (completion_tracker::set_quote_char)
8340         (completion_tracker::quote_char)
8341         (completion_tracker::set_use_custom_word_point)
8342         (completion_tracker::use_custom_word_point)
8343         (completion_tracker::custom_word_point)
8344         (completion_tracker::set_custom_word_point)
8345         (completion_tracker::advance_custom_word_point_by)
8346         (completion_tracker::completes_to_completion_word)
8347         (completion_tracker::discard_completions): New methods.
8348         (completion_tracker::m_quote_char)
8349         (completion_tracker::m_use_custom_word_point)
8350         (completion_tracker::m_custom_word_point): New fields.
8351         (advance_to_expression_complete_word_point): Declare.
8352         * f-lang.c (f_collect_symbol_completion_matches): Add
8353         complete_symbol_mode parameter.
8354         * language.h (struct language_defn)
8355         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8356         parameter.
8357         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8358         (linespec_complete_function): New function.
8359         (linespec_lexer_lex_keyword): Adjust.
8360         * linespec.h (linespec_keywords, linespec_complete_function): New
8361         declarations.
8362         * location.c (find_end_quote): New function.
8363         (explicit_location_lex_one): Add explicit_completion_info
8364         parameter.  Save quoting info.  Don't throw if being called for
8365         completion.  Don't handle Ada operators here.
8366         (is_cp_operator, skip_op_false_positives, first_of)
8367         (explicit_location_lex_one_function): New function.
8368         (string_to_explicit_location): Replace 'dont_throw' parameter with
8369         an explicit_completion_info pointer parameter.  Handle it.  Don't
8370         use explicit_location_lex_one to lex function names.  Use
8371         explicit_location_lex_one_function instead.
8372         * location.h (struct explicit_completion_info): New.
8373         (string_to_explicit_location): Replace 'dont_throw' parameter with
8374         an explicit_completion_info pointer parameter.
8375         * symtab.c (default_collect_symbol_completion_matches_break_on):
8376         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8377         (default_collect_symbol_completion_matches)
8378         (collect_symbol_completion_matches): Add complete_symbol_mode
8379         parameter.
8380         (collect_symbol_completion_matches_type): Pass down
8381         complete_symbol_mode::EXPRESSION.
8382         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8383         parameter.  Handle LINESPEC mode.
8384         * symtab.h (complete_symbol_mode): New.
8385         (default_collect_symbol_completion_matches_break_on)
8386         (default_collect_symbol_completion_matches)
8387         (collect_symbol_completion_matches)
8388         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8389         parameter.
8390
8391 2017-07-17  Pedro Alves  <palves@redhat.com>
8392
8393         * utils.c (enum class strncmp_iw_mode): New.
8394         (strcmp_iw): Rename to ...
8395         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8396         parameters.  Handle them.
8397         (strncmp_iw): New.
8398         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8399         * utils.h (strncmp_iw): Declare.
8400         (strcmp_iw): Move describing comments here.
8401
8402 2017-07-17  Pedro Alves  <palves@redhat.com>
8403
8404         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8405         CP_OPERATOR_STR.
8406         * c-typeprint.c (is_type_conversion_operator): Use
8407         CP_OPERATOR_STR.
8408         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8409         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8410         CP_OPERATOR_LEN.
8411         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8412         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8413         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8414         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8415         CP_OPERATOR_STR.
8416         * location.c: Include "cp-support.h".
8417         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8418         CP_OPERATOR_STR.
8419         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8420         CP_OPERATOR_LEN.
8421
8422 2017-07-17  Pedro Alves  <palves@redhat.com>
8423
8424         * cli/cli-cmds.c (complete_command): Use a completion tracker
8425         along with completion_find_completion_word for handle_brkchars
8426         phase.
8427         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8428         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8429         (struct gdb_rl_completion_word_info): New.
8430         (gdb_rl_find_completion_word): New.
8431         (completion_find_completion_word): New.
8432         * completer.h (completion_find_completion_word): Declare.
8433
8434 2017-07-17  Pedro Alves  <palves@redhat.com>
8435
8436         * ada-lang.c (symbol_completion_match): Adjust comments.
8437         (symbol_completion_add): Replace vector parameter with
8438         completion_tracker parameter.  Use it.
8439         (ada_make_symbol_completion_list): Rename to...
8440         (ada_collect_symbol_completion_matches): ... this.  Add
8441         completion_tracker parameter and use it.
8442         (ada_language_defn): Adjust.
8443         * break-catch-syscall.c (catch_syscall_completer): Adjust
8444         prototype and work with completion_tracker instead of VEC.
8445         * breakpoint.c (condition_completer): Adjust prototype and work
8446         with completion_tracker instead of VEC.
8447         * c-lang.c (c_language_defn, cplus_language_defn)
8448         (asm_language_defn, minimal_language_defn): Adjust to renames.
8449         * cli/cli-cmds.c (complete_command): Rework using
8450         completion_tracker.  Catch exceptions when completing.
8451         * cli/cli-decode.c (integer_unlimited_completer)
8452         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8453         with completion_tracker instead of VEC.
8454         * command.h (struct completion_tracker): Forward declare.
8455         (completer_ftype, completer_handle_brkchars_ftype): Change
8456         types.
8457         (complete_on_cmdlist, complete_on_enum): Adjust.
8458         * completer.c: Include <algorithm>.
8459         (struct gdb_completer_state): New.
8460         (current_completion): New global.
8461         (readline_line_completion_function): Delete.
8462         (noop_completer, filename_completer)
8463         (filename_completer_handle_brkchars, complete_files_symbols)
8464         (linespec_location_completer): Adjust to work with a
8465         completion_tracker instead of a VEC.
8466         (string_or_empty): New.
8467         (collect_explicit_location_matches): Adjust to work with a
8468         completion_tracker instead of a VEC.
8469         (explicit_location_completer): Rename to ...
8470         (complete_explicit_location): ... this and adjust to work with a
8471         completion_tracker instead of a VEC.
8472         (location_completer): Adjust to work with a completion_tracker
8473         instead of a VEC.
8474         (add_struct_fields): Adjust to work with a completion_list instead
8475         of VEC.
8476         (expression_completer): Rename to ...
8477         (complete_expression): ... this and adjust to work with a
8478         completion_tracker instead of a VEC.  Use complete_files_symbols.
8479         (expression_completer): Reimplement on top of complete_expression.
8480         (symbol_completer): Adjust to work with a completion_tracker
8481         instead of a VEC.
8482         (enum complete_line_internal_reason): Add describing comments.
8483         (complete_line_internal_normal_command): Adjust to work with a
8484         completion_tracker instead of a VEC.
8485         (complete_line_internal): Rename to ...
8486         (complete_line_internal_1): ... this and adjust to work with a
8487         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8488         handle_brkchars phase.
8489         (new_completion_tracker): Delete.
8490         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8491         complete_line_internal_1.
8492         (free_completion_tracker): Delete.
8493         (INITIAL_COMPLETION_HTAB_SIZE): New.
8494         (completion_tracker::completion_tracker)
8495         (completion_tracker::~completion_tracker): New.
8496         (maybe_add_completion): Delete.
8497         (completion_tracker::maybe_add_completion)
8498         (completion_tracker::add_completion)
8499         (completion_tracker::add_completions): New.
8500         (throw_max_completions_reached_error): Delete.
8501         (complete_line): Adjust to work with a completion_tracker instead
8502         of a VEC.  Don't create a completion_tracker_t or check for max
8503         completions here.
8504         (command_completer, command_completer_handle_brkchars)
8505         (signal_completer, reg_or_group_completer_1)
8506         (reg_or_group_completer, default_completer_handle_brkchars):
8507         Adjust to work with a completion_tracker.
8508         (gdb_completion_word_break_characters_throw): New.
8509         (gdb_completion_word_break_characters): Reimplement.
8510         (line_completion_function): Delete.
8511         (completion_tracker::recompute_lowest_common_denominator)
8512         (expand_preserving_ws)
8513         (completion_tracker::build_completion_result)
8514         (completion_result::completion_result)
8515         (completion_result::completion_result)
8516         (completion_result::~completion_result)
8517         (completion_result::completion_result)
8518         (completion_result::release_match_list, compare_cstrings)
8519         (completion_result::sort_match_list)
8520         (completion_result::reset_match_list)
8521         (gdb_rl_attempted_completion_function_throw)
8522         (gdb_rl_attempted_completion_function): New.
8523         * completer.h (completion_list, struct completion_result)
8524         (class completion_tracker): New.
8525         (complete_line): Add completion_tracker parameter.
8526         (readline_line_completion_function): Delete.
8527         (gdb_rl_attempted_completion_function): New.
8528         (noop_completer, filename_completer, expression_completer)
8529         (location_completer, symbol_completer, command_completer)
8530         (signal_completer, reg_or_group_completer): Update prototypes.
8531         (completion_tracker_t, new_completion_tracker)
8532         (make_cleanup_free_completion_tracker): Delete.
8533         (enum maybe_add_completion_enum): Delete.
8534         (maybe_add_completion): Delete.
8535         (throw_max_completions_reached_error): Delete.
8536         * corefile.c (complete_set_gnutarget): Adjust to work with a
8537         completion_tracker instead of a VEC.
8538         * cp-abi.c (cp_abi_completer): Adjust to work with a
8539         completion_tracker instead of a VEC.
8540         * d-lang.c (d_language_defn): Adjust.
8541         * disasm.c (disassembler_options_completer): Adjust to work with a
8542         completion_tracker instead of a VEC.
8543         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8544         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8545         with a completion_tracker instead of a VEC.
8546         (f_language_defn): Adjust.
8547         * go-lang.c (go_language_defn): Adjust.
8548         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8549         Adjust to work with a completion_tracker instead of a VEC.
8550         * infrun.c (handle_completer): Likewise.
8551         * interps.c (interpreter_completer): Likewise.
8552         * interps.h (interpreter_completer): Likewise.
8553         * language.c (unknown_language_defn, auto_language_defn)
8554         (local_language_defn): Adjust.
8555         * language.h (language_defn::la_make_symbol_completion_list):
8556         Rename to ...
8557         (language_defn::la_collect_symbol_completion_matches): ... this
8558         and adjust to work with a completion_tracker instead of a VEC.
8559         * m2-lang.c (m2_language_defn): Adjust.
8560         * objc-lang.c (objc_language_defn): Adjust.
8561         * opencl-lang.c (opencl_language_defn): Adjust.
8562         * p-lang.c (pascal_language_defn): Adjust.
8563         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8564         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8565         with a completion_tracker.
8566         * rust-lang.c (rust_language_defn): Adjust.
8567         * symtab.c (free_completion_list, do_free_completion_list)
8568         (return_val, completion_tracker): Delete.
8569         (completion_list_add_name, completion_list_add_symbol)
8570         (completion_list_add_msymbol, completion_list_objc_symbol)
8571         (completion_list_add_fields, add_symtab_completions): Add
8572         completion_tracker parameter and use it.
8573         (default_make_symbol_completion_list_break_on_1): Rename to...
8574         (default_collect_symbol_completion_matches_break_on): ... this.
8575         Add completion_tracker parameter and use it instead of allocating
8576         a completion tracker here.
8577         (default_make_symbol_completion_list_break_on): Delete old
8578         implementation.
8579         (default_make_symbol_completion_list): Delete.
8580         (default_collect_symbol_completion_matches): New.
8581         (make_symbol_completion_list): Delete.
8582         (collect_symbol_completion_matches): New.
8583         (make_symbol_completion_type): Rename to ...
8584         (collect_symbol_completion_matches_type): ... this.  Add
8585         completion_tracker parameter and use it instead of VEC.
8586         (make_file_symbol_completion_list_1): Rename to...
8587         (collect_file_symbol_completion_matches): ... this.  Add
8588         completion_tracker parameter and use it instead of VEC.
8589         (make_file_symbol_completion_list): Delete.
8590         (add_filename_to_list): Use completion_list instead of a VEC.
8591         (add_partial_filename_data::list): Now a completion_list.
8592         (make_source_files_completion_list): Work with a completion_list
8593         instead of a VEC.
8594         * symtab.h: Include "completer.h".
8595         (default_make_symbol_completion_list_break_on)
8596         (default_make_symbol_completion_list, make_symbol_completion_list)
8597         (make_symbol_completion_type, make_file_symbol_completion_list)
8598         (make_source_files_completion_list): Delete.
8599         (default_collect_symbol_completion_matches_break_on)
8600         (default_collect_symbol_completion_matches)
8601         (collect_symbol_completion_matches)
8602         (collect_symbol_completion_matches_type)
8603         (collect_file_symbol_completion_matches)
8604         (make_source_files_completion_list): New.
8605         * top.c (init_main): Don't install a rl_completion_entry_function
8606         hook.  Install a rl_attempted_completion_function hook instead.
8607         * tui/tui-layout.c (layout_completer): Adjust to work with a
8608         completion_tracker.
8609         * tui/tui-regs.c (tui_reggroup_completer):
8610         * tui/tui-win.c (window_name_completer, focus_completer)
8611         (winheight_completer): Adjust to work with a completion_tracker.
8612         * value.c: Include "completer.h".
8613         (complete_internalvar): Adjust to work with a completion_tracker.
8614         * value.h (complete_internalvar): Likewise.
8615
8616 2017-07-17  Pedro Alves  <palves@redhat.com>
8617
8618         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8619         renames.
8620         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8621         comments to completer_ftype's declaration.
8622         <completer_handle_brkchars>: Change type to
8623         completer_handle_brkchars_ftype.
8624         * command.h (completer_ftype): Add describing comment and give
8625         names to parameters.
8626         (completer_ftype_void): Rename to ...
8627         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8628         (set_cmd_completer_handle_brkchars): Adjust.
8629         * completer.c (filename_completer_handle_brkchars): New function.
8630         (complete_line_internal_normal_command): New function, factored
8631         out from ...
8632         (complete_line_internal): ... here.
8633         (command_completer_handle_brkchars)
8634         (default_completer_handle_brkchars)
8635         (completer_handle_brkchars_func_for_completer): New functions.
8636         * completer.h (set_gdb_completion_word_break_characters): Delete
8637         declaration.
8638         (completer_handle_brkchars_func_for_completer): New declaration.
8639         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8640         completer_handle_brkchars_func_for_completer.
8641
8642 2017-07-17  Pedro Alves  <palves@redhat.com>
8643
8644         * completer.c (symbol_completer): New function, based on
8645         make_symbol_completion_list_fn.
8646         * completer.h (symbol_completer): New declaration.
8647         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8648         * python/py-cmd.c (completers): Adjust.
8649         * symtab.c (make_symbol_completion_list_fn): Delete.
8650         * symtab.h (make_symbol_completion_list_fn): Delete.
8651         * cli/cli-decode.c (add_cmd): Adjust.
8652
8653 2017-07-17  Pedro Alves  <palves@redhat.com>
8654
8655         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8656         * dwarf2read.c: Include "filename-seen-cache.h".
8657         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8658         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8659         * filename-seen-cache.c: New file.
8660         * filename-seen-cache.h: New file.
8661         * symtab.c: Include "filename-seen-cache.h".
8662         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8663         (create_filename_seen_cache, clear_filename_seen_cache)
8664         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8665         to filename-seen-cache.h/filename-seen-cache.c.
8666         (output_source_filename, sources_info)
8667         (maybe_add_partial_symtab_filename)
8668         (make_source_files_completion_list): Adjust to use
8669         filename_seen_cache.
8670
8671 2017-07-17  Pedro Alves  <palves@redhat.com>
8672
8673         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8674         fields.
8675         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8676         dwarf2_debug_sections*)): New.
8677         (dwarf2_per_objfile::dwarf2_per_objfile(const
8678         dwarf2_per_objfile&)): Declare as deleted.
8679         (dwarf2_per_objfile::operator=): Declare as deleted.
8680         (dwarf2_per_objfile::dwarf2_per_objfile)
8681         (dwarf2_per_objfile::~dwarf2_per_objfile)
8682         (dwarf2_per_objfile::free_cached_comp_units): New.
8683         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8684         ctor.  Call dwarf2_per_objfile's ctor manually.
8685         (dwarf2_locate_sections): Deleted/refactored as ...
8686         (dwarf2_per_objfile::locate_sections): ... this new method.
8687         (free_cached_comp_units): Defer to
8688         dwarf2_per_objfile::free_cached_comp_units.
8689         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8690
8691 2017-07-14  Tom Tromey  <tom@tromey.com>
8692
8693         PR rust/21764:
8694         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8695         parameter.
8696         <UNOP_SIZEOF>: Split into separate case.
8697         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8698
8699 2017-07-14  Tom Tromey  <tom@tromey.com>
8700
8701         PR rust/21763:
8702         * symtab.c (symbol_matches_domain): Add language_rust to special
8703         case.
8704         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8705         treat LOC_TYPEDEF symbols as variables.
8706
8707 2017-07-14  Pedro Alves  <palves@redhat.com>
8708
8709         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8710         symtabs matching all symtabs with SRCFILE as file name instead of
8711         only considering the first hit, with lookup_symtab.
8712
8713 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8714
8715         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8716         operator_name parameters.
8717         (gen_expr): Update function call.
8718
8719 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8720
8721         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8722         parameter.
8723         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8724         Likewise.
8725         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8726         parameter, use agent_expr::gdbarch instead, update function
8727         calls.
8728         (locexpr_tracepoint_var_ref): Likewise.
8729         (loclist_tracepoint_var_ref): Likewise.
8730         * ax-gdb.c (gen_trace_static_fields): Likewise.
8731         (gen_traced_pop): Likewise.
8732         (gen_frame_args_address): Likewise.
8733         (gen_frame_locals_address): Likewise.
8734         (gen_var_ref): Likewise.
8735         (gen_struct_ref_recursive): Likewise.
8736         (gen_static_field): Likewise.
8737         (gen_maybe_namespace_elt): Likewise.
8738         (gen_expr): Likewise.
8739         (gen_trace_for_var): Likewise.
8740         (gen_trace_for_expr): Likewise.
8741         (gen_trace_for_return_address): Likewise.
8742
8743 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8744
8745         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8746         parameter.
8747         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8748
8749 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8750
8751         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8752         from ax, update calls.
8753         (gen_usual_arithmetic): Likewise.
8754         (gen_integral_promotions): Likewise.
8755         (gen_bitfield_ref): Likewise.
8756         (gen_primitive_field): Likewise.
8757         (gen_struct_ref_recursive): Likewise.
8758         (gen_struct_ref): Likewise.
8759         (gen_maybe_namespace_elt): Likewise.
8760         (gen_struct_elt_for_reference): Likewise.
8761         (gen_namespace_elt): Likewise.
8762         (gen_aggregate_elt_ref): Likewise.
8763         (gen_expr): Get gdbarch from ax, update calls.
8764         (gen_expr_binop_rest): Likewise.
8765
8766 2017-07-13  Pedro Alves  <palves@redhat.com>
8767
8768         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8769         as default tdesc.
8770         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8771         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8772         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8773         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8774         tdep.
8775         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8776         Get final tdesc from the tdep.
8777         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8778         default tdesc.
8779         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8780         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8781         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8782         Use it as default tdesc.
8783         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8784         down to amd_init_abi.  No longer handle fallback tdesc here.
8785         * amd64-tdep.h (tdesc_x32): Declare.
8786         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8787         parameter.
8788         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8789         as default tdesc.
8790
8791 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8792
8793         * s390-linux-tdep.c (s390_process_record): Add support for
8794         instructions new in arch12.
8795
8796 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8797
8798         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8799         PT_GETFSBASE and PT_GETGSBASE.
8800         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8801         PT_SETGSBASE.
8802
8803 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8804
8805         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8806         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8807         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8808         those rules.
8809         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8810         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8811         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8812         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8813         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8814         * features/i386/amd64.xml: Add 64bit-segments.xml.
8815         * features/i386/amd64-avx-avx512.c: Regenerated.
8816         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8817         * features/i386/amd64-avx-mpx.c: Regenerated.
8818         * features/i386/amd64-avx.c: Regenerated.
8819         * features/i386/amd64-mpx.c: Regenerated.
8820         * features/i386/amd64.c: Regenerated.
8821         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8822         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8823         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8824         * regformats/i386/amd64-avx.dat: Regenerated.
8825         * regformats/i386/amd64-mpx.dat: Regenerated.
8826         * regformats/i386/amd64.dat: Regenerated.
8827
8828 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8829
8830         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8831         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8832
8833 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8834
8835         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8836         unsetenv.
8837         * gnulib/aclocal.m4: Regenerate.
8838         * gnulib/config.in: Regenerate.
8839         * gnulib/configure: Regenerate.
8840         * gnulib/import/Makefile.am: Regenerate.
8841         * gnulib/import/Makefile.in: Regenerate.
8842         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8843         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8844         * gnulib/import/m4/environ.m4: New file.
8845         * gnulib/import/m4/setenv.m4: New file.
8846         * gnulib/import/setenv.c: New file.
8847         * gnulib/import/unsetenv.c: New file.
8848
8849 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8850
8851         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8852         address when op is DW_OP_addr.
8853
8854 2017-07-09  Tom Tromey  <tom@tromey.com>
8855
8856         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8857         check and apply to outer type.
8858
8859 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8860
8861         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8862         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8863         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8864         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8865
8866 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8867
8868         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8869
8870 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8871
8872         * corelow.c (get_core_siginfo): Remove.
8873         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8874         instead of get_core_siginfo.
8875         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8876         * gdbarch.h: Re-generate.
8877         * gdbarch.c: Re-generate.
8878         * linux-tdep.c (linux_core_xfer_siginfo): New.
8879         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8880
8881 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8882
8883         * corelow.c (thread_section_name): Move to ...
8884         * gdbcore.h (thread_section_name): ... here.
8885
8886 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8887
8888         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8889         (struct siginfo32): New.
8890         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8891         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8892         via ptrace(PT_LWPINFO).
8893
8894 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8895
8896         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8897         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8898         (fbsd_get_siginfo_type): New.
8899         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8900         (_initialize_fbsd_tdep): New.
8901
8902 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8903
8904         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8905         a singular dwo_unit*) to support multiple CUs in the same way that
8906         multiple TUs are supported.
8907         (create_cus_hash_table): Replace create_dwo_cu with a function for
8908         parsing multiple CUs from a DWO file.
8909         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8910         create_dwo_cu.
8911         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8912         htab_find, rather than comparing the signature to a singleton CU in
8913         the dwo_file.
8914
8915 2017-07-06  Pedro Alves  <palves@redhat.com>
8916
8917         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8918
8919 2017-07-04  Pedro Alves  <palves@redhat.com>
8920
8921         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8922         * gdbtypes.h (TYPE_STATIC): Delete.
8923         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8924         is_synchronized, is_native>: Delete.
8925         <dummy>: Bump.
8926         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8927         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8928         (TYPE_FN_FIELD_ABSTRACT): Delete.
8929
8930 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8931
8932         * buffer.h (buffer_finish): Fix spelling mistakes.
8933
8934 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8935
8936         * .dir-locals.el: Automatically switch to C-style comments in
8937         versions of Emacs that support the feature.
8938
8939 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8940             Pedro Alves  <palves@redhat.com>
8941
8942         PR cli/21688
8943         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8944         (process_next_line): New variable 'inline_cmd'.
8945         Adjust 'if' clauses for "python", "compile" and "guile" to use
8946         'command_name_equals' and check for '!inline_cmd'.
8947
8948 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8949
8950         PR cli/21688
8951         * cli/cli-script.c (command_name_equals_not_inline): New function.
8952         (process_next_line): Adjust 'if' clauses for "python", "compile"
8953         and "guile" to use command_name_equals_not_inline.
8954
8955 2017-06-29  Pedro Alves  <palves@redhat.com>
8956
8957         * completer.c (expression_completer): Call
8958         linespec_location_completer instead of location_completer.
8959
8960 2017-06-29  Pedro Alves  <palves@redhat.com>
8961
8962         * completer.c (expression_completer): Remove code that recomputes
8963         'text' from 'word'.
8964
8965 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8966
8967         * regformats/regdat.sh: Generate code with
8968         "ifndef IN_PROCESS_AGENT".
8969
8970 2017-06-28  Pedro Alves  <palves@redhat.com>
8971
8972         * command.h: Include "common/scoped_restore.h".
8973
8974 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8975
8976         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8977         instead of obstack_grow.
8978
8979 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8980
8981         PR gdb/21337
8982         * symfile.c (reread_symbols): Call objfiles_changed just before
8983         read_symbols.
8984
8985 2017-06-27  Pedro Alves  <palves@redhat.com>
8986
8987         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8988         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8989         (completion_list_add_symbol, completion_list_add_msymbol):
8990         ... these new functions.
8991         (add_symtab_completions)
8992         (default_make_symbol_completion_list_break_on_1): Adjust.
8993
8994 2017-06-27  Pedro Alves  <palves@redhat.com>
8995
8996         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8997         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8998         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8999         dtor.
9000         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9001         'storage_obstack' field an auto_obstack.  In-class initialize all
9002         non-bitfield fields.  Make minsyms_read bool.
9003         * symfile.c (read_symbols): Adjust.
9004
9005 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9006
9007         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9008         (gdbsim_store_register): Likewise.
9009
9010 2017-06-27  Pedro Alves  <palves@redhat.com>
9011
9012         * c-exp.y (name_obstack): Now an auto_obstack.
9013         (yylex): Use auto_obstack::clear.
9014         (c_parse): Use auto_obstack::clear instead of reinitializing and
9015         freeing the obstack.
9016         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9017         * d-exp.y (name_obstack): Now an auto_obstack.
9018         (yylex): Use auto_obstack::clear.
9019         (d_parse): Use auto_obstack::clear instead of reinitializing and
9020         freeing the obstack.
9021         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9022         auto_obstack.
9023         * dwarf2read.c (create_addrmap_from_index)
9024         (dwarf2_build_psymtabs_hard)
9025         (update_enumeration_type_from_children): Likewise.
9026         * gdb_obstack.h (auto_obstack): New type.
9027         * go-exp.y (name_obstack): Now an auto_obstack.
9028         (build_packaged_name): Use auto_obstack::clear.
9029         (go_parse): Use auto_obstack::clear instead of reinitializing and
9030         freeing the obstack.
9031         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9032         auto_obstack.
9033         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9034         * rust-exp.y (work_obstack): Now an auto_obstack.
9035         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9036         reinitializing and freeing the obstack.
9037         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9038         (host_char_to_target): Use auto_obstack.
9039         * utils.h (make_cleanup_obstack_free): Delete declaration.
9040         * valprint.c (generic_emit_char, generic_printstr): Use
9041         auto_obstack.
9042
9043 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9044
9045         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9046         thread.
9047         (darwin_init_thread_list): Don't update dummy thread.
9048         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9049
9050 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9051
9052         * record-full.c (netorder16): Remove.
9053
9054 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9055
9056         * common/diagnostics.h: Define macros for GCC.
9057         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9058         * common/vec.h: Include diagnostics.h.
9059         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9060         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9061         warning.
9062
9063 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9064
9065         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9066         New macro.
9067         * ada-lex.l: Ignore deprecated register warnings.
9068
9069 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9070
9071         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9072         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9073
9074 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9075
9076         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9077         its own line.
9078
9079 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9080
9081         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9082
9083 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9084
9085         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9086         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9087         (xtensa_register_read_masked): Likewise.
9088
9089 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9090
9091         * common/environ.c (gdb_environ::unset): Update comment.
9092
9093 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9094
9095         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9096         registers.
9097
9098 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9099
9100         * record-full.c (record_full_exec_insn): Use byte_vector.
9101
9102 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9103
9104         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9105         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9106
9107 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9108
9109         * remote.c (cached_reg): Move from here...
9110         * regcache.h (cached_reg): ...to here.
9111         * python/py-unwind.c (struct reg_info): Remove.
9112         (cached_frame_info): Use cached_reg_t.
9113         (pyuw_prev_register): Likewise.
9114         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9115         (pyuw_dealloc_cache): Free all registers.
9116
9117 2017-06-22  Pedro Alves  <palves@redhat.com>
9118             Simon Marchi  <simon.marchi@ericsson.com>
9119
9120         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9121         warning.
9122         * common/diagnostics.h: New file.
9123
9124 2017-06-22  Pedro Alves  <palves@redhat.com>
9125
9126         * common/agent.h: Add include guards.
9127
9128 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9129
9130         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9131         talk about addressable units instead of bytes.
9132
9133 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9134
9135         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9136         of '::const_iterator'.
9137
9138 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9139
9140         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9141         'unittests/environ-selftests.c'.
9142         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9143         * charset.c (find_charset_names): Declare object 'iconv_env'.
9144         Update code to use 'iconv_env' object.  Remove call to
9145         'free_environ'.
9146         * common/environ.c: Include <utility>.
9147         (make_environ): Delete function.
9148         (free_environ): Delete function.
9149         (gdb_environ::clear): New function.
9150         (gdb_environ::operator=): New function.
9151         (gdb_environ::get): Likewise.
9152         (environ_vector): Delete function.
9153         (set_in_environ): Delete function.
9154         (gdb_environ::set): New function.
9155         (unset_in_environ): Delete function.
9156         (gdb_environ::unset): New function.
9157         (gdb_environ::envp): Likewise.
9158         * common/environ.h: Include <vector>.
9159         (struct gdb_environ): Delete; transform into...
9160         (class gdb_environ): ... this class.
9161         (free_environ): Delete prototype.
9162         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9163         environ_vector): Likewise.
9164         * infcmd.c (run_command_1): Update code to call
9165         'envp' from 'gdb_environ' class.
9166         (environment_info): Update code to call methods from 'gdb_environ'
9167         class.
9168         (unset_environment_command): Likewise.
9169         (path_info): Likewise.
9170         (path_command): Likewise.
9171         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9172         (inferior::inferior): Initialize 'environment' using the host's
9173         information.
9174         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9175         Include "environ.h".
9176         (class inferior) <environment>: Change type from 'struct
9177         gdb_environ' to 'gdb_environ'.
9178         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9179         methods from 'gdb_environ' class.
9180         * solib.c (solib_find_1): Likewise
9181         * unittests/environ-selftests.c: New file.
9182
9183 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9184
9185         * features/i386/i386-linux.xml: Exchange the order of including
9186         32bit-linux.xml and 32bit-sse.xml.
9187         * features/i386/i386-linux.c: Regenerated.
9188
9189 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9190
9191         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9192         Delete copy ctor and assignment operator.
9193         (tdesc_type): Likewise.
9194         (tdesc_feature): Likewise.
9195         (tdesc_free_reg): Remove.
9196         (tdesc_create_reg): Use new.
9197         (tdesc_free_type): Remove.
9198         (tdesc_create_vector): Use new.
9199         (tdesc_create_union): Likewise.
9200         (tdesc_create_flags): Likewise.
9201         (tdesc_create_enum): Likewise.
9202         (tdesc_free_feature): Delete.
9203         (free_target_description): Use delete.
9204
9205 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9206
9207         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9208         registers.
9209
9210 2017-06-19  Pedro Alves  <palves@redhat.com>
9211
9212         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9213         after gdb::unlinker.
9214
9215 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9216
9217         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9218         gdb_environ to access an environment variable.
9219
9220 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9221
9222         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9223         gdb_byte*.
9224
9225 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9226
9227         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9228
9229 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9230
9231         * configure: Re-generate.
9232         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9233
9234 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9235
9236         * configure: Re-generate.
9237         * warning.m4: Pass -Werror to compiler when checking for
9238         supported warning flags.
9239
9240 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9241
9242         * Makefile.in (COMPILE.pre): Add "-x c++".
9243
9244 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9245             Pedro Alves  <palves@redhat.com>
9246             Yao Qi  <yao.qi@linaro.org>
9247
9248         * defs.h (RequireLongest): New.
9249         (extract_integer): Declare function template.
9250         (extract_signed_integer): Remove the declaration, but define it
9251         static inline.
9252         (extract_unsigned_integer): Likewise.
9253         (store_integer): Declare function template.
9254         (store_signed_integer): Remove the declaration, but define it
9255         static inline.
9256         (store_unsigned_integer): Likewise.
9257         * findvar.c (extract_integer): New function template.
9258         (extract_signed_integer): Remove.
9259         (extract_unsigned_integer): Remove.
9260         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9261         instantiations.
9262         (store_integer): New function template.
9263         (store_signed_integer): Remove.
9264         (store_unsigned_integer): Remove.
9265         (store_integer): Explicit instantiations.
9266         * regcache.c (regcache_raw_read_signed): Update.
9267         (regcache::raw_read): New function.
9268         (regcache::raw_read_signed): Remove.
9269         (regcache::raw_read_unsigned): Remove.
9270         (regcache_raw_read_unsigned): Update.
9271         (regcache_raw_write_unsigned): Update.
9272         (regcache::raw_write_signed): Remove.
9273         (regcache::raw_write): New function.
9274         (regcache_cooked_read_signed): Update.
9275         (regcache::raw_write_unsigned): Remove.
9276         (regcache::cooked_read_signed): Remove.
9277         (regcache_cooked_read_unsigned): Update.
9278         (regcache::cooked_read_unsigned): Remove.
9279         (regcache_cooked_write_signed): Update.
9280         (regcache_cooked_write_unsigned): Update.
9281         * regcache.h (regcache) <raw_read_signed>: Remove.
9282         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9283         <raw_read, raw_write>: New.
9284         <cooked_read_signed, cooked_write_signed>: Remove.
9285         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9286         <cooked_read, cooked_write>: New.
9287         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9288         (sh64_pseudo_register_write): Update.
9289
9290 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9291
9292         * arc-tdep.c (arc_disassembler_options): New variable.
9293         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9294         of default_print_insn.
9295         (arc_delayed_print_insn): Set info->section when needed,
9296         use default_print_insn to retrieve a disassembler.
9297
9298 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9299
9300         PR gdb/21574
9301         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9302         to mention $SHELL and startup-with-shell.
9303
9304 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9305
9306         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9307
9308 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9309
9310         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9311         default_print_insn instead of print_insn_aarch64.
9312         * arm-tdep.c (gdb_print_insn_arm): Call
9313         default_print_insn instead of print_insn_big_arm
9314         and print_insn_little_arm.
9315         * i386-tdep.c (i386_print_insn): Call default_print_insn
9316         instead of print_insn_i386.
9317         * ia64-tdep.c (ia64_print_insn): Call
9318         default_print_insn instead of print_insn_ia64.
9319         * mips-tdep.c (gdb_print_insn_mips): Call
9320         default_print_insn instead of print_insn_big_mips
9321         and print_insn_little_mips.
9322         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9323         instead of print_insn_spu.
9324
9325 2017-06-14  Pedro Alves  <palves@redhat.com>
9326
9327         * ada-lang.c: Include "common/byte-vector.h".
9328         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9329         * charset.c (wchar_iterator::iterate): Resize the vector instead
9330         of reserving it.
9331         * common/byte-vector.h: Include "common/def-vector.h".
9332         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9333         * cli/cli-dump.c: Include "common/byte-vector.h".
9334         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9335         * common/byte-vector.h: New file.
9336         * common/def-vector.h: New file.
9337         * common/default-init-alloc.h: New file.
9338         * dwarf2loc.c: Include "common/byte-vector.h".
9339         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9340         instead of reserving it.
9341         * dwarf2read.c: Include "common/byte-vector.h".
9342         (data_buf::m_vec): Now a gdb::byte_vector.
9343         * gdb_regex.c: Include "common/def-vector.h".
9344         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9345         * mi/mi-main.c: Include "common/byte-vector.h".
9346         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9347         * printcmd.c: Include "common/byte-vector.h".
9348         (print_scalar_formatted): Use gdb::byte_vector.
9349         * valprint.c: Include "common/byte-vector.h".
9350         (maybe_negate_by_bytes, print_decimal_chars): Use
9351         gdb::byte_vector.
9352
9353 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9354
9355         * darwin-nat.c: Include "nat/fork-inferior.h".
9356
9357 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9358
9359         * configure.nat: Factor out Darwin bits that are not
9360         architecture-specific.  Add fork-inferior.o.
9361
9362 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9363
9364         * configure.nat: Factor out AIX bits that are not
9365         architecture-specific.  Add fork-inferior.o.
9366
9367 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9368
9369         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9370         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9371         wrappers that just call rw_pieced_value.
9372
9373 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9374
9375         * dwarf2loc.c (write_pieced_value): When writing the data for a
9376         memory piece, use write_memory_with_notification instead of
9377         write_memory.
9378
9379 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9380
9381         * valops.c (read_value_memory): Change embedded_offset to
9382         represent a bit offset instead of a byte offset.
9383         * value.h (read_value_memory): Adjust comment.
9384
9385 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9386
9387         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9388         dest_offset_bits and source_offset_bits.
9389         (write_pieced_value): Likewise.
9390
9391 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9392
9393         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9394         given by DW_OP_bit_piece.
9395         (write_pieced_value): Likewise.
9396
9397 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9398
9399         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9400         some other preparations to the places where sufficient information
9401         is available.
9402         (write_pieced_value): Likewise.
9403
9404 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9405
9406         * dwarf2loc.c (bits_to_bytes): New function.
9407         (read_pieced_value): Fix offset calculations for register pieces
9408         on big-endian targets.
9409         (write_pieced_value): Likewise.
9410
9411 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9412
9413         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9414         (write_pieced_value): Likewise.
9415
9416 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9417
9418         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9419         transfer the source value's least significant bits, instead of its
9420         lowest-addressed ones.  Rename type_len to max_offset.
9421         (read_pieced_value): Mirror above changes to write_pieced_value as
9422         applicable.
9423
9424 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9425
9426         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9427         truncate full bytes from dest_offset_bits before using it as an
9428         offset into the buffer.
9429
9430 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9431
9432         * dwarf2loc.c (write_pieced_value): Include transfer size in
9433         byte-wise check.
9434
9435 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9436
9437         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9438         calculation of this_size.
9439
9440 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9441
9442         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9443         when targeting a bit-field.
9444         (write_pieced_value): Likewise.
9445
9446 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9447
9448         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9449         (allocate_piece_closure): Drop addr_size parameter.
9450         (dwarf2_evaluate_loc_desc_full): Adjust call to
9451         allocate_piece_closure.
9452
9453 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9454
9455         PR gdb/21226
9456         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9457         the LSB end, independent of endianness.
9458
9459 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9460
9461         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9462         size capping.
9463
9464 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9465
9466         * mips-linux-nat.c: Move include features/mips*-linux.c to
9467         mips-linux-tdep.c.
9468         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9469         to mips-linux-tdep.c.
9470         * mips-linux-tdep.c: Include features/mips*-linux.c
9471         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9472         functions.
9473         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9474         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9475         (tdesc_mips64_dsp_linux): Declare.
9476
9477 2017-06-12  Tom Tromey  <tom@tromey.com>
9478
9479         * valprint.h (val_print_type_code_int): Remove.
9480         * valprint.c (generic_val_print_int): Always call
9481         val_print_scalar_formatted.
9482         (val_print_type_code_int): Remove.
9483         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9484         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9485         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9486         * ada-valprint.c (ada_val_print_num): Use
9487         val_print_scalar_formatted.
9488
9489 2017-06-12  Tom Tromey  <tom@tromey.com>
9490
9491         * printcmd.c (print_scalar_formatted): Unify the two switches.
9492         Don't convert scalars to LONGEST.
9493
9494 2017-06-12  Tom Tromey  <tom@tromey.com>
9495
9496         PR exp/16225:
9497         * valprint.h (print_decimal_chars): Update.
9498         * valprint.c (maybe_negate_by_bytes): New function.
9499         (print_decimal_chars): Add "is_signed" argument.
9500         * printcmd.c (print_scalar_formatted): Update.
9501
9502 2017-06-12  Tom Tromey  <tom@tromey.com>
9503
9504         PR exp/16225:
9505         * valprint.h (print_binary_chars, print_hex_chars): Update.
9506         * valprint.c (val_print_type_code_int): Update.
9507         (print_binary_chars): Add "zero_pad" argument.
9508         (emit_octal_digit): New function.
9509         (print_octal_chars): Don't zero-pad.
9510         (print_decimal_chars): Likewise.
9511         (print_hex_chars): Add "zero_pad" argument.
9512         * sh64-tdep.c (sh64_do_fp_register): Update.
9513         * regcache.c (regcache::dump): Update.
9514         * printcmd.c (print_scalar_formatted): Update.
9515         * infcmd.c (default_print_one_register_info): Update.
9516
9517 2017-06-12  Pedro Alves  <palves@redhat.com>
9518             Alan Hayward  <alan.hayward@arm.com>
9519
9520         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9521         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9522         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9523         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9524         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9525
9526 2017-06-12  Pedro Alves  <palves@redhat.com>
9527
9528         * dwarf2read.c (mapped_symtab::data): Now a vector of
9529         symtab_index_entry instead of vector of
9530         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9531         whether an element's name is NULL instead of checking whether the
9532         element itself is NULL.
9533         (find_slot): Change return type.  Adjust.
9534         (hash_expand, , add_index_entry, uniquify_cu_indices)
9535         (write_hash_table): Adjust.
9536
9537 2017-06-12  Pedro Alves  <palves@redhat.com>
9538
9539         * dwarf2read.c (recursively_count_psymbols): New function.
9540         (write_psymtabs_to_index): Call it to compute number of psyms and
9541         pass estimate size of psyms_seen to unordered_set's ctor.
9542
9543 2017-06-12  Pedro Alves  <palves@redhat.com>
9544
9545         * dwarf2read.c (write_hash_table): Check if key already exists
9546         before emplacing.
9547
9548 2017-06-12  Pedro Alves  <palves@redhat.com>
9549
9550         * dwarf2read.c (data_buf::append_space): Rename to...
9551         (data_buf::grow): ... this, and make private.  Adjust all callers.
9552         (data_buf::append_uint): New method.
9553         (add_address_entry, write_one_signatured_type)
9554         (write_psymtabs_to_index): Use it.
9555
9556 2017-06-12  Pedro Alves  <palves@redhat.com>
9557
9558         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9559         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9560         (data_buf::file_write): Call ::fwrite directly.
9561
9562 2017-06-12  Pedro Alves  <palves@redhat.com>
9563
9564         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9565         std::vector::erase.
9566
9567 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9568
9569         Code cleanup: C++ify .gdb_index producer.
9570         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9571         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9572         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9573         (create_strtab, add_string): Remove.
9574         (file_write, data_buf): New.
9575         (struct symtab_index_entry): Use std::vector for cu_indices.
9576         (struct mapped_symtab): Use std::vector for data.
9577         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9578         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9579         Remove.
9580         (find_slot): Change return type.  Update it to the new data structures.
9581         (hash_expand, add_index_entry): Update it to the new data structures.
9582         (offset_type_compare): Remove.
9583         (uniquify_cu_indices): Update it to the new data structures.
9584         (c_str_view, c_str_view_hasher, vector_hasher): New.
9585         (add_indices_to_cpool): Remove.
9586         (write_hash_table): Update it to the new data structures.
9587         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9588         (eq_psymtab_cu_index): Remove.
9589         (psym_index_map): New typedef.
9590         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9591         reference and std::unordered_map for cu_index_htab.
9592         (add_address_entry, add_address_entry_worker, write_address_map)
9593         (write_psymbols): Update it to the new data structures.
9594         (write_obstack): Remove.
9595         (struct signatured_type_index_data): Change types_list to a data_buf
9596         reference and psyms_seen to a std::unordered_set reference.
9597         (write_one_signatured_type, recursively_write_psymbols)
9598         (write_psymtabs_to_index): Update it to the new data structures.
9599
9600 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9601
9602         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9603         separate-debug-file commands.
9604         * symfile.h (separate_debug_file_debug): New global.
9605         * symfile.c (separate_debug_file_debug): New global.
9606         (separate_debug_file_exists, find_separate_debug_file): Add
9607         debug output.
9608         (_initialize_symfile): Add "set debug separate-debug-file"
9609         command.
9610         * build-id.c (build_id_to_debug_bfd,
9611         find_separate_debug_file_by_buildid): Add debug output.
9612
9613 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9614
9615         * gdbarch.sh (displaced_step_free_closure): Remove.
9616         * gdbarch.h, gdbarch.c: Re-generate.
9617         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9618         displaced_step_free_closure.
9619         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9620         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9621         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9622         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9623         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9624         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9625         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9626         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9627         * infrun.c (displaced_step_clear): Call xfree instead of
9628         gdbarch_displaced_step_free_closure.
9629
9630 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9631
9632         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9633         NULL".
9634
9635 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9636
9637         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9638         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9639         (mn10300_push_dummy_call): Likewise.
9640
9641 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9642
9643         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9644
9645 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9646
9647         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9648
9649 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9650
9651         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9652         able to start inferiors using a shell.
9653         (New remote packets): Announce new packet "QStartupWithShell".
9654         * remote.c: Add PACKET_QStartupWithShell.
9655         (extended_remote_create_inferior): Handle new
9656         PACKET_QStartupWithShell.
9657         (remote_protocol_features) <QStartupWithShell>: New entry for
9658         PACKET_QStartupWithShell.
9659         (_initialize_remote): Call "add_packet_config_cmd" for
9660         QStartupShell.
9661
9662 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9663             Pedro Alves  <palves@redhat.com>
9664
9665         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9666         and "nat/fork-inferior.h".
9667         * common/common-inferior.h: New file, with contents from
9668         "gdb/inferior.h".
9669         * commom/common-utils.c: Include "common-utils.h".
9670         (stringify_argv): New function.
9671         * common/common-utils.h (stringify_argv): New prototype.
9672         * configure.nat: Add "fork-inferior.o" as a dependency for
9673         "*linux*", "fbsd*" and "nbsd*" hosts.
9674         * corefile.c (get_exec_file): Update comment.
9675         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9676         instead of "startup_inferior".
9677         (darwin_create_inferior): Call "add_thread_silent" after
9678         "fork_inferior".
9679         * fork-child.c: Cleanup unnecessary includes.
9680         (SHELL_FILE): Move to "common/common-fork-child.c".
9681         (environ): Likewise.
9682         (exec_wrapper): Initialize.
9683         (get_exec_wrapper): New function.
9684         (breakup_args): Move to "common/common-fork-child.c"; rename to
9685         "breakup_args_for_exec".
9686         (escape_bang_in_quoted_argument): Move to
9687         "common/common-fork-child.c".
9688         (saved_ui): New variable.
9689         (prefork_hook): New function.
9690         (postfork_hook): Likewise.
9691         (postfork_child_hook): Likewise.
9692         (gdb_startup_inferior): Likewise.
9693         (fork_inferior): Move to "common/common-fork-child.c".  Update
9694         function to support gdbserver.
9695         (startup_inferior): Likewise.
9696         * gdbcore.h (get_exec_file): Remove declaration.
9697         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9698         instead of "startup_inferior".  Call "add_thread_silent" after
9699         "fork_inferior".
9700         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9701         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9702         instead of "startup_inferior".  Call "add_thread_silent" after
9703         "fork_inferior".
9704         * inferior.h: Include "common-inferior.h".
9705         (trace_start_error): Move to "common/common-utils.h".
9706         (trace_start_error_with_name): Likewise.
9707         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9708         (startup_inferior): Likewise.
9709         (gdb_startup_inferior): New prototype.
9710         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9711         * nat/fork-inferior.h: New file.
9712         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9713         instead of "startup_inferior".  Call "add_thread_silent" after
9714         "fork_inferior".
9715         * target.h (target_terminal_init): Move prototype to
9716         "target/target.h".
9717         (target_terminal_inferior): Likewise.
9718         (target_terminal_ours): Likewise.
9719         * target/target.h (target_terminal_init): New prototype, moved
9720         from "target.h".
9721         (target_terminal_inferior): Likewise.
9722         (target_terminal_ours): Likewise.
9723         * utils.c (gdb_flush_out_err): New function.
9724
9725 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9726
9727         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9728         * common/common-gdbthread.h: New file, with parts from
9729         "gdb/gdbthread.h".
9730         * gdbthread.h: Include "common-gdbthread.h".
9731         (switch_to_thread): Moved to "common/common-gdbthread.h".
9732
9733 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9734
9735         * Makefile.in (SFILES): Add "common/job-control.c".
9736         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9737         (COMMON_OBS): Add "job-control.o".
9738         * common/job-control.c: New file, with contents from
9739         "gdb/inflow.c".
9740         * common/job-control.h: New file, with contents from "terminal.h".
9741         * fork-child.c: Include "job-control.h".
9742         * inflow.c: Include "job-control.h".
9743         (gdb_setpgid): Move to "common/common-inflow.c".
9744         (_initialize_inflow): Move setting of "job_control" to
9745         "handle_job_control".
9746         * terminal.h (job_control): Moved to "common/common-terminal.h".
9747         (gdb_setpgid): Likewise.
9748         * top.c: Include "job_control.h".
9749         * utils.c: Likewise.
9750         (job_control): Moved to "job-control.c".
9751
9752 2017-06-07  Pedro Alves  <palves@redhat.com>
9753
9754         * Makefile.in (SFILES): Add gdb_regex.c.
9755         (COMMON_OBS): Add gdb_regex.o.
9756         * ada-lang.c (ada_add_standard_exceptions)
9757         (ada_add_exceptions_from_frame, name_matches_regex)
9758         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9759         parameter type to compiled_regex.  Adjust.
9760         (ada_exceptions_list): Use compiled_regex.
9761         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9762         std::unique_ptr<compiled_regex>.
9763         (exception_catchpoint::~exception_catchpoint): Remove regfree
9764         call.
9765         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9766         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9767         * breakpoint.c (solib_catchpoint::compiled): Now a
9768         std::unique_ptr<compiled_regex>.
9769         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9770         (check_status_catch_solib): Adjust to use compiled_regex.
9771         (add_solib_catchpoint): Adjust to use compiled_regex.
9772         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9773         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9774         compiled_regex reference.  Adjust to use it.
9775         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9776         declaration.  Include "gdb_regex.h".
9777         (apropos_cmd): Change regex parameter to compiled_regex reference.
9778         * gdb_regex.c: New file.
9779         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9780         declarations.
9781         (class compiled_regex): New.
9782         * linux-tdep.c: Include "common/gdb_optional.h".
9783         (struct mapping_regexes): New, factored out from
9784         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9785         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9786         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9787         * probe.c: Include "common/gdb_optional.h".
9788         (collect_probes): Use compiled_regex and gdb::optional and remove
9789         cleanups.
9790         * skip.c: Include "common/gdb_optional.h".
9791         (skiplist_entry::compiled_function_regexp): Now a
9792         gdb::optional<compiled_regex>.
9793         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9794         (free_skiplist_entry): Remove regfree call.
9795         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9796         compiled_regex and gdb::optional.
9797         * symtab.c: Include "common/gdb_optional.h".
9798         (search_symbols): Use compiled_regex and gdb::optional.
9799         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9800         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9801         to gdb_regex.c.
9802
9803 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9804
9805         * regcache.c (regcache::save): Avoid buffer use.
9806         (regcache::dump): Likewise.
9807
9808 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9809
9810         * sh-tdep.c (sh_pseudo_register_read): Remove
9811         MAX_REGISTER_SIZE.
9812         (sh_pseudo_register_write): Likewise.
9813         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9814         (sh64_pseudo_register_write): Likewise
9815
9816 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9817
9818         * aarch64-tdep.c (aarch64_store_return_value): Use
9819         V_REGISTER_SIZE.
9820         (aarch64_pseudo_read_value): Likewise.
9821         (aarch64_pseudo_write): Likewise.
9822
9823 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9824
9825         * regformats/regdef.h (set_register_cache): Remove the
9826         declaration.
9827
9828 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9829
9830         * frame.c (frame_unwind_register_signed): Use
9831         frame_unwind_register_value.
9832
9833 2017-06-06  Pedro Alves  <palves@redhat.com>
9834
9835         PR breakpoints/21553
9836         * breakpoint.c (create_breakpoints_sal_default)
9837         (init_breakpoint_sal, create_breakpoint_sal): Use
9838         gdb::unique_xmalloc_ptr for string parameters.
9839         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9840         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9841         (base_breakpoint_create_breakpoints_sal)
9842         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9843         (strace_marker_create_breakpoints_sal)
9844         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9845         string parameters.
9846         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9847         gdb::unique_xmalloc_ptr for string parameters.
9848         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9849         parameters.
9850
9851 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9852
9853         * alpha-tdep.c (alpha_register_to_value): Use
9854         get_frame_register_value.
9855         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9856
9857 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9858
9859         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9860         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9861         (ia64_value_to_register): Likewise.
9862         (ia64_extract_return_value): Likewise.
9863         (ia64_store_return_value): Likewise.
9864         (ia64_push_dummy_call): Likewise.
9865
9866 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9867
9868         GDB 8.0 released.
9869
9870 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9871
9872         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9873
9874 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9875
9876         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9877         parameter.
9878         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9879
9880 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9881
9882         * event-loop.c (poll_timers): Unallocate timer using delete
9883         instead of xfree.
9884
9885 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9886
9887         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9888         (struct breakpoint) <~breakpoint>: New.
9889         (struct watchpoint): Inherit from breakpoint.
9890         <~watchpoint>: New.
9891         <base>: Remove.
9892         (struct tracepoint): Inherit from breakpoint.
9893         <base>: Remove.
9894         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9895         (struct longjmp_breakpoint): Inherit from breakpoint.
9896         <~longjmp_breakpoint>: New.
9897         <base>: Remove.
9898         (new_breakpoint_from_type): Remove casts.
9899         (watchpoint_in_thread_scope): Remove reference to base field.
9900         (watchpoint_del_at_next_stop): Likewise.
9901         (update_watchpoint): Likewise.
9902         (watchpoint_check): Likewise.
9903         (bpstat_check_watchpoint): Likewise.
9904         (set_longjmp_breakpoint): Likewise.
9905         (struct fork_catchpoint): Inherit from breakpoint.
9906         <base>: Remove.
9907         (struct solib_catchpoint): Inherit from breakpoint.
9908         <~solib_catchpoint>: New.
9909         <base>: Remove.
9910         (dtor_catch_solib): Change to ...
9911         (solib_catchpoint::~solib_catchpoint): ... this.
9912         (breakpoint_hit_catch_solib): Remove reference to base field.
9913         (add_solib_catchpoint): Likewise.
9914         (create_fork_vfork_event_catchpoint): Likewise.
9915         (struct exec_catchpoint): Inherit from breakpoint.
9916         <~exec_catchpoint>: New.
9917         <base>: Remove.
9918         (dtor_catch_exec): Change to ...
9919         (exec_catchpoint::~exec_catchpoint): ... this.
9920         (dtor_watchpoint): Change to ...
9921         (watchpoint::~watchpoint): ... this.
9922         (watch_command_1): Remove reference to base field.
9923         (catch_exec_command_1): Likewise.
9924         (base_breakpoint_dtor): Change to ...
9925         (breakpoint::~breakpoint): ... this.
9926         (base_breakpoint_ops): Remove dtor field value.
9927         (longjmp_bkpt_dtor): Change to ...
9928         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9929         (strace_marker_create_breakpoints_sal): Remove reference to base
9930         field.
9931         (delete_breakpoint): Don't manually call breakpoint destructor.
9932         (create_tracepoint_from_upload): Remove reference to base field.
9933         (trace_pass_set_count): Likewise.
9934         (initialize_breakpoint_ops): Don't initialize
9935         momentary_breakpoint_ops, don't set dtors.
9936         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9937         <~ada_catchpoint>: New.
9938         <base>: Remove.
9939         (create_excep_cond_exprs): Remove reference to base field.
9940         (dtor_exception): Change to ...
9941         (ada_catchpoint::~ada_catchpoint): ... this.
9942         (dtor_catch_exception): Remove.
9943         (dtor_catch_exception_unhandled): Remove.
9944         (dtor_catch_assert): Remove.
9945         (create_ada_exception_catchpoint): Remove reference to base
9946         field.
9947         (initialize_ada_catchpoint_ops): Don't set dtors.
9948         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9949         breakpoint.
9950         <~signal_catchpoint>: New.
9951         <base>: Remove.
9952         (signal_catchpoint_dtor): Change to ...
9953         (signal_catchpoint::~signal_catchpoint): ... this.
9954         (create_signal_catchpoint): Remove reference to base field.
9955         (initialize_signal_catchpoint_ops): Don't set dtor.
9956         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9957         from breakpoint.
9958         <~syscall_catchpoint>: New.
9959         <base>: Remove.
9960         (dtor_catch_syscall): Change to ...
9961         (syscall_catchpoint::~syscall_catchpoint): ... this.
9962         (create_syscall_event_catchpoint): Remove reference to base
9963         field.
9964         (initialize_syscall_catchpoint_ops): Don't set dtor.
9965         * break-catch-throw.c (struct exception_catchpoint): Inherit
9966         from breakpoint.
9967         <~exception_catchpoint>: New.
9968         <base>: Remove.
9969         (dtor_exception_catchpoint): Change to ...
9970         (exception_catchpoint::~exception_catchpoint): ... this.
9971         (handle_gnu_v3_exceptions): Remove reference to base field.
9972         (initialize_throw_catchpoint_ops): Don't set dtor.
9973         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9974         field.
9975         * remote.c (remote_get_tracepoint_status): Likewise.
9976         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9977         * tracefile.c (tracefile_fetch_registers): Likewise.
9978         * tracepoint.c (actions_command): Likewise.
9979         (validate_actionline): Likewise.
9980         (tfind_1): Likewise.
9981         (get_traceframe_location): Likewise.
9982         (find_matching_tracepoint_location): Likewise.
9983         (parse_tracepoint_status): Likewise.
9984         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9985
9986 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9987
9988         * breakpoint.c (struct longjmp_breakpoint): New struct.
9989         (is_tracepoint_type): Change return type to bool.
9990         (is_longjmp_type): New function.
9991         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9992         (set_raw_breakpoint_without_location): Use
9993         new_breakpoint_from_type.
9994         (set_raw_breakpoint): Likewise.
9995
9996 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9997
9998         * breakpoint.c (new_breakpoint_from_type): New function.
9999         (create_breakpoint_sal): Use new_breakpoint_from_type and
10000         unique_ptr.
10001         (create_breakpoint): Likewise.
10002
10003 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10004
10005         * memattr.c (mem_info_command): Rename to ...
10006         (info_mem_command): ... this.
10007         (mem_enable_command): Rename to ...
10008         (enable_mem_command): ... this.
10009         (mem_disable_command): Rename to ...
10010         (disable_mem_command): ... this.
10011         (mem_delete_command): Rename to ...
10012         (delete_mem_command): ... this.
10013         (_initialize_mem): Adjust function names.
10014
10015 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10016
10017         * btrace.c (handle_pt_insn_events): New.
10018         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10019         STATUS.  Split into this and ...
10020         (handle_pt_insn_event_flags): ... this.
10021
10022 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10023
10024         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10025         and struct pt_insn.resynced.
10026         * configure: Regenerated.
10027         * config.in: Regenerated.
10028
10029 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10030
10031         * btrace.c (ftrace_find_call_by_number): New function.
10032         (ftrace_new_function): Store objects, not pointers.
10033         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10034         ftrace_new_gap, ftrace_update_function,
10035         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10036         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10037         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10038         btrace_ends_with_single_insn, btrace_call_get): Account for
10039         btrace_thread_info::functions now storing objects.
10040         * btrace.h (struct btrace_thread_info): Add constructor.
10041         (struct btrace_thread_info) <functions>: Make std::vector.
10042         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10043         Initialize with default values.
10044         * record-btrace.c (record_btrace_frame_sniffer): Account for
10045         btrace_thread_info::functions now storing objects.
10046
10047 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10048
10049         * btrace.c: Remove typedef bfun_s.
10050         (ftrace_new_gap): Directly add gaps to the list of gaps.
10051         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10052         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10053         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10054         instead of gdb VEC.
10055
10056 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10057
10058         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10059         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10060         with btrace_thread_info::next_segment and
10061         btrace_thread_info::prev_segment.
10062         * btrace.h: Remove struct btrace_func_link.
10063         (struct btrace_function): Replace pair of function segment pointers
10064         with pair of indices.
10065         * python/py-record-btrace.c (btpy_call_prev_sibling,
10066         btpy_call_next_sibling): Replace references to
10067         btrace_thread_info::segment with btrace_thread_info::next_segment and
10068         btrace_thread_info::prev_segment.
10069         * record-btrace.c (record_btrace_frame_this_id): Use
10070         btrace_find_call_by_number.
10071
10072 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10073
10074         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10075         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10076         btrace_insn_next, btrace_insn_prev): Remove references to
10077         btrace_thread_info::flow.
10078         * btrace.h (struct btrace_function): Remove FLOW.
10079
10080 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10081
10082         * btrace.c (ftrace_find_call_by_number): New function.
10083         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10084         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10085         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10086         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10087         index.
10088         * btrace.h (struct btrace_function): Turn UP into an index.
10089         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10090         as an index.
10091         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10092         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10093         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10094
10095 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10096
10097         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10098         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10099         ftrace_update_function, ftrace_compute_global_level_offset,
10100         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10101         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10102         btrace_insn_end, btrace_is_empty): Remove references to
10103         btrace_thread_info::begin and btrace_thread_info::end.
10104         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10105         (struct btrace_thread_info) <functions>: Adjust comment.
10106         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10107         btrace_thread_info::begin.
10108
10109 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10110
10111         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10112         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10113         ftrace_update_function): Remove arguments that implicitly were always
10114         BTINFO->END.
10115         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10116         Don't pass BTINFO->END.
10117
10118 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10119
10120         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10121         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10122         btrace_find_insn_by_number): Replace function segment pointer with
10123         index.
10124         (btrace_insn_cmp): Simplify.
10125         * btrace.h: (struct btrace_insn_iterator) Rename index to
10126         insn_index.  Replace function segment pointer with index into function
10127         segment vector.
10128         * record-btrace.c (record_btrace_call_history): Replace function
10129         segment pointer use with index.
10130         (record_btrace_frame_sniffer): Retrieve function call segment through
10131         vector.
10132         (record_btrace_set_replay): Remove defunc't safety check.
10133
10134 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10135
10136         * btrace.c (btrace_ends_with_single_insn): New function.
10137         (btrace_call_get, btrace_call_number, btrace_call_begin,
10138         btrace_call_end, btrace_call_next, btrace_call_prev,
10139         btrace_find_call_by_number): Use index into call segment vector
10140         instead of pointer.
10141         (btrace_call_cmp): Simplify.
10142         * btrace.h (struct btrace_call_iterator): Replace function call segment
10143         pointer with index into vector.
10144         * record-btrace.c (record_btrace_call_history): Use index instead of
10145         pointer.
10146
10147 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10148
10149         * btrace.c (btrace_insn_begin, btrace_insn_end,
10150         btrace_find_insn_by_number): Add btinfo to iterator.
10151         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10152
10153 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10154
10155         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10156         and save pointers directly.
10157         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10158         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10159         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10160         changed signature of functions.
10161         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10162         (btrace_fetch): Remove code that adds btrace_function pointers to
10163         vector of btrace_functions.
10164         (btrace_clear): Simplify freeing vector of btrace_functions.
10165
10166 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10167
10168         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10169         Replace VEC_* with std::vector functions.
10170         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10171         (struct btrace_thread_info)<functions>: Change type to std::vector.
10172
10173 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10174
10175         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10176         "Removed targets and native configurations" up.  Merge duplicate
10177         "New commands" sub-sections.  Add "New options" sub-sections.
10178
10179 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10180
10181         * defs.h (copy_integer_to_size): New declaration.
10182         * findvar.c (copy_integer_to_size): New function.
10183         (do_cint_test): New selftest function.
10184         (copy_integer_to_size_test): Likewise.
10185         (_initialize_findvar): Likewise.
10186         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10187         (mips_fbsd_collect_reg): Use raw_collect_integer.
10188         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10189         (mips64_fill_gregset): Use raw_collect_integer
10190         (mips64_fill_fpregset): Use raw_supply_integer.
10191         * regcache.c (regcache::raw_supply_integer): New function.
10192         (regcache::raw_collect_integer): Likewise.
10193         * regcache.h: (regcache::raw_supply_integer): New declaration.
10194         (regcache::raw_collect_integer): Likewise.
10195
10196 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10197
10198         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10199         (COMMON_OBS): Add gdbarch-selftests.o.
10200         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10201         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10202         * gdbarch-selftests.c: New file.
10203         * regcache.h (regcache) <~regcache>: Mark it virtual if
10204         GDB_SELF_TEST.
10205         <raw_write>: Likewise.
10206
10207 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10208
10209         * regcache.c (current_regcache): Change it to
10210         regcache::current_regcache.
10211         (regcache_observer_target_changed): Update.
10212         (regcache_thread_ptid_changed): Make it a regcache static
10213         method.
10214         (regcache_thread_ptid_changed): Update.
10215         (class regcache_access): New.
10216         (current_regcache_test): Update.
10217         (_initialize_regcache): Update.
10218         * regcache.h: Include forward_list.
10219         (regcache): Declare regcache_thread_ptid_changed and declare
10220         registers_changed_ptid as friend.
10221
10222 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10223
10224         * i387-tdep.c (i387_register_to_value): Use register_size
10225         instead of TYPE_LENGTH.
10226         * m68k-tdep.c (m68k_register_to_value): Likewise.
10227
10228 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10229
10230         * i387-tdep.c (i387_convert_register_p): Return false if type
10231         code isn't TYPE_CODE_FLT.
10232
10233 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10234
10235         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10236         length is 4.
10237         (alpha_register_to_value): Remove type length check.
10238         (alpha_value_to_register): Likewise.
10239
10240 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10241
10242         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10243         TYPE_CODE_FLT.
10244
10245 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10246
10247         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10248         TYPE_CODE_FLT or not.
10249
10250 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10251
10252         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10253         * avr-tdep.c (avr_gdbarch_init): Likewise.
10254         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10255         * cris-tdep.c (cris_gdbarch_init): Likewise.
10256         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10257         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10258         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10259         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10260         * mep-tdep.c (mep_gdbarch_init): Likewise.
10261         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10262         * mips-tdep.c (mips_gdbarch_init): Likewise.
10263         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10264         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10265         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10266         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10267         * v850-tdep.c (v850_gdbarch_init): Likewise.
10268
10269 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10270
10271         * selftest-arch.c (tests_with_arch): Call registers_changed
10272         and reinit_frame_cache.
10273         * selftest.c (run_self_tests): Likewise.
10274
10275 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10276
10277         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10278         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10279
10280 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10281
10282         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10283         set_gdbarch_print_insn.
10284
10285 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10286
10287         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10288         set_gdbarch_print_insn.
10289
10290 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10291
10292         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10293         set_gdbarch_print_insn.
10294         * arc-tdep.c (arc_gdbarch_init): Likewise.
10295         * arch-utils.c: include dis-asm.h.
10296         (default_print_insn): New function.
10297         * arch-utils.h (default_print_insn): Declare.
10298         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10299         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10300         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10301         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10302         * frv-tdep.c (frv_gdbarch_init): Likewise.
10303         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10304         * gdbarch.sh (print_insn): Use default_print_insn.
10305         * gdbarch.c: Regenerated.
10306         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10307         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10308         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10309         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10310         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10311         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10312         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10313         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10314         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10315         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10316         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10317         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10318         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10319         * mt-tdep.c (mt_gdbarch_init): Likewise.
10320         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10321         * nios2-tdep.c (nios2_print_insn): Remove.
10322         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10323         * rx-tdep.c (rx_gdbarch_init): Likewise.
10324         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10325         * score-tdep.c (score_print_insn): Remove.
10326         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10327         * sh-tdep.c (sh_gdbarch_init): Likewise.
10328         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10329         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10330         * tic6x-tdep.c (tic6x_print_insn): Remove.
10331         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10332         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10333         * v850-tdep.c (v850_gdbarch_init): Likewise.
10334         * vax-tdep.c (vax_gdbarch_init): Likewise.
10335         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10336         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10337
10338 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10339
10340         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10341         (MIPS_FP0_REGNUM): Remove.
10342         (MIPS_FSR_REGNUM): Remove.
10343         (mips_fbsd_supply_fpregs): Use mips_regnum.
10344         (mips_fbsd_supply_gregs): Likewise.
10345         (mips_fbsd_collect_fpregs): Likewise.
10346         (mips_fbsd_collect_gregs): Likewise.
10347
10348 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10349
10350         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10351         (getpfpregs_supplies): New function.
10352         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10353         getfpregs_supplies.
10354         (mips_fbsd_store_inferior_registers): Likewise.
10355
10356 2017-05-22  Pedro Alves <palves@redhat.com>
10357
10358         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10359         maintainer.
10360
10361 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10362
10363         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10364         (store_register): Likewise.
10365         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10366         (get_decimal_float_return_value): Likewise.
10367         (do_ppc_sysv_return_value): Likewise.
10368         (ppc64_sysv_abi_push_integer): Likewise.
10369         (ppc64_sysv_abi_push_freg): Likewise.
10370         (ppc64_sysv_abi_return_value_base): Likewise.
10371         (ppc64_sysv_abi_return_value): Likewise.
10372         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10373         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10374         * rs6000-nat.c: Likewise.
10375         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10376         (rs6000_value_to_register): Likewise.
10377         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10378
10379 2017-05-21  Tom Tromey  <tom@tromey.com>
10380
10381         PR rust/21466:
10382         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10383         arrays as "[T]", not "[T; ]".
10384
10385 2017-05-19  Tom Tromey  <tom@tromey.com>
10386
10387         PR rust/21484:
10388         * rust-lang.c (exp_descriptor_rust): New function.
10389         (rust_language_defn): Use it.
10390         * p-lang.c (pascal_language_defn): Update.
10391         * opencl-lang.c (opencl_language_defn): Update.
10392         * objc-lang.c (objc_language_defn): Update.
10393         * m2-lang.c (m2_language_defn): Update.
10394         * language.h (struct language_defn)
10395         <la_watch_location_expression>: New member.
10396         * language.c (unknown_language_defn, auto_language_defn)
10397         (local_language_defn): Update.
10398         * go-lang.c (go_language_defn): Update.
10399         * f-lang.c (f_language_defn): Update.
10400         * d-lang.c (d_language_defn): Update.
10401         * c-lang.h (c_watch_location_expression): Declare.
10402         * c-lang.c (c_watch_location_expression): New function.
10403         (c_language_defn, cplus_language_defn, asm_language_defn)
10404         (minimal_language_defn): Use it.
10405         * breakpoint.c (watch_command_1): Call
10406         la_watch_location_expression.
10407         * ada-lang.c (ada_language_defn): Update.
10408
10409 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10410
10411         PR tui/21482
10412         * gdb_curses.h (NOMACROS): Define.
10413         (NCURSES_NOMACROS): Define.
10414
10415 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10416
10417         PR tui/21482
10418         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10419         arg to char *.
10420         * tui/tui-wingeneral.c (box_win): Likewise.
10421         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10422         (tui_show_source_line): Likewise.
10423         (tui_show_exec_info_content): Likewise.
10424
10425 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10426
10427         * sparc-tdep.c (sparc_structure_return_p)
10428         (sparc_arg_on_registers_p): New functions.
10429         (sparc32_store_arguments): Use them.
10430         * sparc64-tdep.c (sparc64_16_byte_align_p)
10431         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10432         Handle TYPE_CODE_ARRAY.
10433
10434 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10435
10436         * cli/cli-decode.c (add_alias_cmd): New function.
10437         * command.h (add_alias_cmd): Declare.
10438         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10439         instead call add_alias_cmd.
10440
10441 2017-05-17  Pedro Alves  <palves@redhat.com>
10442
10443         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10444         (nat_makefile_frag): ... this.  All references updated.
10445         * configure.ac: Likewise.
10446         * configure.nat: Likewise.  Enhance comments.
10447         * configure: Regenerate.
10448
10449 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10450
10451         * procfs.c (procfs_create_inferior): Change prototype to match
10452         definition.
10453
10454 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10455
10456         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10457         C++ compiler warning.
10458
10459 2017-05-12  Tom Tromey  <tom@tromey.com>
10460
10461         PR rust/21483:
10462         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10463         recurse, just call value_struct_elt directly.
10464
10465 2017-05-12  Tom Tromey  <tom@tromey.com>
10466
10467         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10468         OP_RUST_ARRAY>: Fix.
10469
10470 2017-05-12  Tom Tromey  <tom@tromey.com>
10471
10472         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10473
10474 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10475
10476         * regcache.c: Include <forward_list>.
10477         (struct regcache_list): Remove.
10478         (current_regcache): Update.
10479         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10480         (regcache_thread_ptid_changed): Likewise.
10481         (registers_changed_ptid): Likewise.
10482         (current_regcache_size): Likewise.
10483
10484 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10485
10486         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10487         (current_regcache_size): New function.
10488         (current_regcache_test): New function.
10489         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10490
10491 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10492
10493         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10494         (print_gp_register_row): Use get_frame_register_value.
10495
10496 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10497
10498         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10499         (mips_supply_fpregset): Likewise.
10500         (mips64_supply_gregset): Likewise.
10501
10502 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10503
10504         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10505         regcache->raw_supply_zeroed.
10506
10507 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10508
10509         * configure.nat: Rearrange 'case' statements to match
10510         host before cpu.
10511
10512 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10513
10514         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10515         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10516         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10517         "@nat_extra_makefile_frag@".
10518         (Makefile): Remove dependency on "@frags@".
10519         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10520         (data-directory/Makefile): Likewise.
10521         * config/aarch64/linux.mh: Deleted; moved contents to
10522         "gdb/configure.nat".
10523         * config/alpha/alpha-linux.mh: Likewise.
10524         * config/alpha/nbsd.mh: Likewise.
10525         * config/arm/linux.mh: Likewise.
10526         * config/arm/nbsdelf.mh: Likewise.
10527         * config/i386/cygwin.mh: Likewise.
10528         * config/i386/cygwin64.mh: Likewise.
10529         * config/i386/darwin.mh: Likewise.
10530         * config/i386/fbsd.mh: Likewise.
10531         * config/i386/fbsd64.mh: Likewise.
10532         * config/i386/go32.mh: Likewise.
10533         * config/i386/i386gnu.mh: Likewise.
10534         * config/i386/i386sol2.mh: Likewise.
10535         * config/i386/linux.mh: Likewise.
10536         * config/i386/linux64.mh: Likewise.
10537         * config/i386/mingw.mh: Likewise.
10538         * config/i386/mingw64.mh: Likewise.
10539         * config/i386/nbsd64.mh: Likewise.
10540         * config/i386/nbsdelf.mh: Likewise.
10541         * config/i386/nto.mh: Likewise.
10542         * config/i386/obsd.mh: Likewise.
10543         * config/i386/obsd64.mh: Likewise.
10544         * config/i386/sol2-64.mh: Likewise.
10545         * config/ia64/linux.mh: Likewise.
10546         * config/m32r/linux.mh: Likewise.
10547         * config/m68k/linux.mh: Likewise.
10548         * config/m68k/nbsdelf.mh: Likewise.
10549         * config/m68k/obsd.mh: Likewise.
10550         * config/m88k/obsd.mh: Likewise.
10551         * config/mips/fbsd.mh: Likewise.
10552         * config/mips/linux.mh: Likewise.
10553         * config/mips/nbsd.mh: Likewise.
10554         * config/mips/obsd64.mh: Likewise.
10555         * config/pa/linux.mh: Likewise.
10556         * config/pa/nbsd.mh: Likewise.
10557         * config/pa/obsd.mh: Likewise.
10558         * config/powerpc/aix.mh: Likewise.
10559         * config/powerpc/fbsd.mh: Likewise.
10560         * config/powerpc/linux.mh: Likewise.
10561         * config/powerpc/nbsd.mh: Likewise.
10562         * config/powerpc/obsd.mh: Likewise.
10563         * config/powerpc/ppc64-linux.mh: Likewise.
10564         * config/powerpc/spu-linux.mh: Likewise.
10565         * config/s390/linux.mh: Likewise.
10566         * config/sh/nbsd.mh: Likewise.
10567         * config/sparc/fbsd.mh: Likewise.
10568         * config/sparc/linux.mh: Likewise.
10569         * config/sparc/linux64.mh: Likewise.
10570         * config/sparc/nbsd64.mh: Likewise.
10571         * config/sparc/nbsdelf.mh: Likewise.
10572         * config/sparc/obsd64.mh: Likewise.
10573         * config/sparc/sol2.mh: Likewise.
10574         * config/tilegx/linux.mh: Likewise.
10575         * config/vax/nbsdelf.mh: Likewise.
10576         * config/vax/obsd.mh: Likewise.
10577         * config/xtensa/linux.mh: Likewise.
10578         * config/i386/i386gnu.mn: New file, with excerpts from
10579         "config/i386/i386gnu.mh".
10580         * configure: Regenerate.
10581         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10582         *.mh files under "gdb/config".
10583         * configure.nat: New file, with contents from the
10584         "gdb/config/*/*.mh" files.
10585
10586 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10587
10588         * btrace.c (btrace_clear): Free insn vector.
10589
10590 2017-05-05  Pedro Alves  <palves@redhat.com>
10591
10592         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10593         * configure: Regenerate.
10594
10595 2017-05-04  Pedro Alves  <palves@redhat.com>
10596
10597         * Makefile.in (SFILES): Add progspace-and-thread.c.
10598         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10599         (COMMON_OBS): Add progspace-and-thread.o.
10600         * breakpoint.c: Include "progspace-and-thread.h".
10601         (update_inserted_breakpoint_locations)
10602         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10603         Use scoped_restore_current_pspace_and_thread.
10604         (create_std_terminate_master_breakpoint): Use
10605         scoped_restore_current_program_space.
10606         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10607         (print_breakpoint_location): Use
10608         scoped_restore_current_program_space.
10609         (bp_loc_is_permanent): Use
10610         scoped_restore_current_pspace_and_thread.
10611         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10612         (download_tracepoint_locations): Use
10613         scoped_restore_current_pspace_and_thread.
10614         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10615         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10616         (enum step_over_calls_kind): Moved from inferior.h.
10617         (class scoped_restore_current_thread): New class.
10618         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10619         declaration.
10620         (scoped_restore_current_thread): New class.
10621         * infcmd.c: Include "common/gdb_optional.h".
10622         (continue_1, proceed_after_attach): Use
10623         scoped_restore_current_thread.
10624         (notice_new_inferior): Use scoped_restore_current_thread.
10625         * inferior.c: Include "progspace-and-thread.h".
10626         (restore_inferior, save_current_inferior): Delete.
10627         (add_inferior_command, clone_inferior_command): Use
10628         scoped_restore_current_pspace_and_thread.
10629         * inferior.h (scoped_restore_current_inferior): New class.
10630         * infrun.c: Include "progspace-and-thread.h" and
10631         "common/gdb_optional.h".
10632         (follow_fork_inferior): Use
10633         scoped_restore_current_pspace_and_thread.
10634         (scoped_restore_exited_inferior): New class.
10635         (handle_vfork_child_exec_or_exit): Use
10636         scoped_restore_exited_inferior,
10637         scoped_restore_current_pspace_and_thread,
10638         scoped_restore_current_thread and scoped_restore.
10639         (fetch_inferior_event): Use scoped_restore_current_thread.
10640         * linespec.c (decode_line_full, decode_line_1): Use
10641         scoped_restore_current_program_space.
10642         * mi/mi-main.c: Include "progspace-and-thread.h".
10643         (exec_continue): Use scoped_restore_current_thread.
10644         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10645         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10646         * proc-service.c (ps_pglobal_lookup): Use
10647         scoped_restore_current_program_space.
10648         * progspace-and-thread.c: New file.
10649         * progspace-and-thread.h: New file.
10650         * progspace.c (release_program_space, clone_program_space): Use
10651         scoped_restore_current_program_space.
10652         (restore_program_space, save_current_program_space)
10653         (save_current_space_and_thread): Delete.
10654         (switch_to_program_space_and_thread): Moved to
10655         progspace-and-thread.c.
10656         * progspace.h (save_current_program_space)
10657         (save_current_space_and_thread): Delete declarations.
10658         (scoped_restore_current_program_space): New class.
10659         * remote.c (remote_btrace_maybe_reopen): Use
10660         scoped_restore_current_thread.
10661         * symtab.c: Include "progspace-and-thread.h".
10662         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10663         * thread.c (print_thread_info_1): Use
10664         scoped_restore_current_thread.
10665         (struct current_thread_cleanup): Delete.
10666         (do_restore_current_thread_cleanup)
10667         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10668         (scoped_restore_current_thread::~scoped_restore_current_thread):
10669         ... this new dtor.
10670         (make_cleanup_restore_current_thread): Rename/convert to ...
10671         (scoped_restore_current_thread::scoped_restore_current_thread):
10672         ... this new ctor.
10673         (thread_apply_all_command): Use scoped_restore_current_thread.
10674         (thread_apply_command): Use scoped_restore_current_thread.
10675         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10676         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10677
10678 2017-05-04  Pedro Alves  <palves@redhat.com>
10679
10680         * thread.c (make_cleanup_restore_current_thread): Move
10681         find_thread_ptid call before the is_stopped call.  Assert that the
10682         thread is found.  Replace is_stopped call by checking the thread's
10683         state directly.  Remove unnecessary NULL-thread check.
10684
10685 2017-05-04  Pedro Alves  <palves@redhat.com>
10686
10687         * corelow.c (thread_section_name): New class.
10688         (get_core_register_section, get_core_siginfo): Use it.
10689
10690 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10691
10692         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10693         (get_core_register_section): Remove xfree of NULL pointer.
10694
10695 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10696
10697         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10698         * regcache.c (regcache::raw_supply_zeroed): New function.
10699         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10700
10701 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10702
10703         * gdbarch.sh: Remove commented out definition of
10704         TARGET_CHAR_BIT.
10705         * gdbarch.h: Re-generate.
10706
10707 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10708
10709         * configure: Regenerate.
10710
10711 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10712
10713         * solib-target.c (solib_target_relocate_section_addresses):
10714         Remove num_section_bases, num_bases, segment_bases variables.
10715
10716 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10717
10718         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10719
10720 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10721
10722         * solib-target.c: Include <vector>
10723         (struct lm_info_target) <~lm_info_target>: Remove.
10724         <segment_bases, section_bases>: Change type to
10725         std::vector<CORE_ADDR>.
10726         (library_list_start_segment, library_list_start_section,
10727         library_list_end_library,
10728         solib_target_relocate_section_addresses): Adjust.
10729
10730 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10731
10732         * gdbarch.sh (software_single_step): Change return type to
10733         std::vector<CORE_ADDR>.
10734         * gdbarch.c, gdbarch.h: Re-generate.
10735         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10736         Adjust.
10737         (arm_deal_with_atomic_sequence_raw): Adjust.
10738         (thumb_get_next_pcs_raw): Adjust.
10739         (arm_get_next_pcs_raw): Adjust.
10740         (arm_get_next_pcs): Adjust.
10741         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10742         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10743         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10744         (alpha_software_single_step): Adjust.
10745         * alpha-tdep.h (alpha_software_single_step): Adjust.
10746         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10747         * arm-tdep.c (arm_software_single_step): Adjust.
10748         (arm_breakpoint_kind_from_current_state): Adjust.
10749         * arm-tdep.h (arm_software_single_step): Adjust.
10750         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10751         * cris-tdep.c (cris_software_single_step): Adjust.
10752         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10753         (micromips_deal_with_atomic_sequence): Adjust.
10754         (deal_with_atomic_sequence): Adjust.
10755         (mips_software_single_step): Adjust.
10756         * mips-tdep.h (mips_software_single_step): Adjust.
10757         * moxie-tdep.c (moxie_software_single_step): Adjust.
10758         * nios2-tdep.c (nios2_software_single_step): Adjust.
10759         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10760         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10761         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10762         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10763         * sparc-tdep.c (sparc_software_single_step): Adjust.
10764         * spu-tdep.c (spu_software_single_step): Adjust.
10765         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10766
10767 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10768
10769         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10770         * gdbarch.h: Re-generate.
10771
10772 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10773
10774         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10775         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10776         * python/py-instruction.c, python/py-instruction.h: New file.
10777         * python/py-record.c: Add py-instruction.h include.
10778         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10779         gdb.RecordInstruction.
10780         * python/python-internal.h: Add gdbpy_initialize_instruction
10781         declaration.
10782         * python/python.c (do_start_initialization): Add
10783         gdbpy_initialize_instruction.
10784
10785 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10786
10787         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10788         Remove.
10789         (btrace_func_from_recpy_func): New function.
10790         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10791         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10792         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10793         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10794         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10795         Also, use new helper functions.
10796         (btpy_list_item): Use new helper functions.
10797         (recpy_bt_function_call_history): Use new type name.
10798         (btpy_call_getset): Remove.
10799         (gdbpy_initialize_btrace): Remove code to initialize
10800         gdb.BtraceFunctionCall.
10801         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10802         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10803         recpy_bt_func_prev, recpy_bt_func_next): New export.
10804         * python/py-record.c (recpy_func_type): New static object.
10805         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10806         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10807         recpy_func_next): New function.
10808         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10809         (recpy_func_getset): New static object.
10810         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10811         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10812
10813 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10814
10815         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10816         (btpy_object, btpy_insn_type, btpy_new): Remove.
10817         (btpy_list_object): Use gdb.RecordInstruction type instead of
10818         gdb.BtraceInstruction type.
10819         (btrace_insn_from_recpy_insn): New function.
10820         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10821         btpy_new.
10822         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10823         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10824         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10825         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10826         instead of btpy_object.
10827         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10828         btpy_insn_data, btpy_insn_decode): Rename to ...
10829         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10830         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10831         recpy_bt_insn_decode): This.  Also, use new helper functions.
10832         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10833         recpy_insn_type.
10834         (btpy_insn_getset): Remove.
10835         (gdbpy_initialize_btrace): Remove code to initialize
10836         gdb.BtraceInstruction.  Use recpy_element_object.
10837         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10838         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10839         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10840         * python/py-record.c (recpy_insn_type): New static object.
10841         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10842         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10843         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10844         New function.
10845         (recpy_insn_getset): New static object.
10846         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10847         * python/py-record.h (recpy_element_object): New typedef.
10848         (recpy_insn_type, recpy_insn_new): New export.
10849
10850 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10851
10852         * py-record-btrace.c (btpy_insn_new): Removed.
10853         (btpy_insn_or_gap_new): New function.
10854         (btpy_insn_error): Removed.
10855         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10856         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10857         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10858         btpy_insn_or_gap_new instead of btpy_insn_new.
10859         (btpy_insn_getset): Remove btpy_insn_error.
10860         * py-record.c (recpy_gap_type): New static object.
10861         (recpy_gap_object): New typedef.
10862         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10863         recpy_gap_reason_string): New function.
10864         (recpy_gap_getset): New static object.
10865         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10866         * py-record.h (recpy_gap_new): New export.
10867
10868 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10869
10870         * python/py-record.c (recpy_ptid): Remove.
10871         (recpy_record_getset): Remove recpy_ptid.
10872
10873 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10874
10875         * btrace.c (btrace_fetch): Set inferior_ptid.
10876         * python/py-record-btrace.c: Add "py-record.h" include.
10877         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10878         recpy_bt_end, recpy_bt_instruction_history,
10879         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10880         in gdb.Record object instead of current ptid.
10881         * python/py-record.c: Include new "py-record.h" file.
10882         (recpy_record_object): Moved to py-record.h.
10883         * python/py-record.h: New file.
10884
10885 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10886
10887         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10888         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10889         indentation.
10890
10891 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10892
10893         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10894         the past maintainers section.
10895
10896 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10897
10898         * infcmd.c (get_return_value): Use regcache ctor, and remove
10899         cleanup.
10900
10901 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10902             Pedro Alves  <palves@redhat.com>
10903
10904         * regcache.c (regcache::regcache): New tag dispatch ctor.
10905         (do_cooked_read): Moved above.
10906         (regcache_dup): Use the tag dispatch ctor..
10907         * regcache.h (regcache): Declare ctor, delete copy ctor and
10908         assignment operator, remove friend regcache_dup.
10909
10910 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10911
10912         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10913         call method save instead of regcache_cpy.
10914         * regcache.h (struct regcache): Make regcache_dup a friend.
10915
10916 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10917
10918         * regcache.c (struct regcache): Move to regcache.h
10919         (regcache::arch): New method.
10920         (regcache_get_ptid): Update.
10921         (get_regcache_arch): Call arch method.
10922         (get_regcache_aspace): Call method aspace.
10923         (register_buffer): Change it to method.
10924         (regcache_save): Change it to regcache::save.
10925         (regcache_restore): Likewise.
10926         (regcache_cpy_no_passthrough): Remove the declaration.
10927         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10928         (regcache_cpy_no_passthrough): Change it to method
10929         cpy_no_passthrough.
10930         (regcache_register_status): Change it to method
10931         get_register_status.
10932         (regcache_invalidate): Change it to method invalidate.
10933         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10934         (regcache_raw_update): Change it to method raw_update.
10935         (regcache_raw_read): Likewise.
10936         (regcache_raw_read_signed): Likewise.
10937         (regcache_raw_read_unsigned): Likewise.
10938         (regcache_raw_write_signed): Likewise.
10939         (regcache_raw_write_unsigned): Likewise.
10940         (regcache_cooked_read): Likewise.
10941         (regcache_cooked_read_value): Likewise.
10942         (regcache_cooked_read_signed): Likewise.
10943         (regcache_cooked_read_unsigned): Likewise.
10944         (regcache_cooked_write_signed): Likewise.
10945         (regcache_cooked_write_unsigned): Likewise.
10946         (regcache_raw_set_cached_value): Likewise.
10947         (regcache_raw_write): Likewise.
10948         (regcache_cooked_write): Likewise.
10949         (regcache_xfer_part): Likewise.
10950         (regcache_raw_read_part): Likewise.
10951         (regcache_raw_write_part): Likewise.
10952         (regcache_cooked_read_part): Likewise.
10953         (regcache_cooked_write_part): Likewise.
10954         (regcache_raw_supply): Likewise.
10955         (regcache_raw_collect): Likewise.
10956         (regcache_transfer_regset): Likewise.
10957         (regcache_supply_regset): Likewise.
10958         (regcache_collect_regset): Likewise.
10959         (regcache_debug_print_register): Likewise.
10960         (enum regcache_dump_what): Move it to regcache.h.
10961         (regcache_dump): Change it to method dump.
10962         * regcache.h (enum regcache_dump_what): New.
10963         (class regcache): New.
10964         * target.c (target_fetch_registers): Call method
10965         debug_print_register.
10966         (target_store_registers): Likewise.
10967
10968 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10969
10970         * windows-nat.c (struct lm_info_windows): Initialize field.
10971         (windows_make_so): Allocate lm_info_windows with new.
10972         (windows_free_so): Free lm_info_windows with delete.
10973
10974 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10975
10976         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10977         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10978         cleanup.
10979         (darwin_free_so): Free lm_info_darwin with delete.
10980
10981 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10982
10983         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10984         <l_addr_p>: Change type to bool.
10985         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10986         (svr4_free_so): Free lm_info_svr4 with delete.
10987         (svr4_copy_library_list): Replace memcpy with call to copy
10988         constructor.
10989         (library_list_start_library, svr4_default_sos): Allocate
10990         lm_info_svr4 with new.
10991
10992 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10993
10994         * solib-target.c (struct lm_info_target): Add destructor,
10995         initialize fields.
10996         <name>: Change type to std::string.
10997         (library_list_start_library): Allocate lm_info_target with new.
10998         (solib_target_free_library_list): Free lm_info_target with
10999         delete.
11000         (solib_target_current_sos): Adapt to std::string.
11001         (solib_target_free_so): Free lm_info_target with delete.
11002
11003 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11004
11005         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11006         fields.
11007         (frv_current_sos): Allocate lm_info_frv with new.
11008         (frv_relocate_main_executable): Free lm_info_frv with delete,
11009         allocate with new.
11010         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11011
11012 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11013
11014         * solib-frv.c (struct lm_info_frv): Fix indentation.
11015
11016 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11017
11018         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11019         map field.
11020         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11021         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11022         and allocate with new.
11023         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11024
11025 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11026
11027         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11028         <filename, member_name>: Change type to std::string.
11029         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11030         (library_list_start_library): Allocate lm_info_aix with new.
11031         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11032         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11033         with copy constructor.
11034
11035 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11036
11037         * solist.h (struct lm_info): Remove.
11038         (struct lm_info_base): New class.
11039         (struct so_list) <lm_info>: Change type to lm_info_base *.
11040         * nto-tdep.c (struct lm_info): Remove.
11041         (lm_addr): Adjust.
11042         * solib-aix.c (struct lm_info): Rename to ...
11043         (struct lm_info_aix): ... this.  Extend lm_info_base.
11044         (lm_info_p): Rename to ...
11045         (lm_info_aix_p): ... this, and adjust.
11046         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11047         solib_aix_parse_libraries, library_list_start_library,
11048         solib_aix_free_library_list, solib_aix_parse_libraries,
11049         solib_aix_get_library_list,
11050         solib_aix_relocate_section_addresses, solib_aix_free_so,
11051         solib_aix_get_section_offsets,
11052         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11053         Adjust.
11054         (struct solib_aix_inferior_data) <library_list>: Adjust.
11055         * solib-darwin.c (struct lm_info): Rename to ...
11056         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11057         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11058         * solib-dsbt.c (struct lm_info): Rename to ...
11059         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11060         (struct dsbt_info) <main_executable_lm_info): Adjust.
11061         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11062         dsbt_relocate_section_addresses): Adjust.
11063         * solib-frv.c (struct lm_info): Rename to ...
11064         (struct lm_info_frv): ... this.  Extend lm_info_base.
11065         (main_executable_lm_info): Adjust.
11066         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11067         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11068         find_canonical_descriptor_in_load_object,
11069         frv_fdpic_find_canonical_descriptor): Adjust.
11070         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11071         to lm_info_svr4.
11072         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11073         svr4_clear_so, svr4_copy_library_list,
11074         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11075         svr4_current_sos, svr4_fetch_objfile_link_map,
11076         solist_update_incremental): Adjust.
11077         * solib-svr4.h (struct lm_info_svr4): Move here from
11078         solib-svr4.c.
11079         * solib-target.c (struct lm_info): Rename to ...
11080         (struct lm_info_target): ... this.  Extend lm_info_base.
11081         (lm_info_p): Rename to ...
11082         (lm_info_target_p): ... this.
11083         (solib_target_parse_libraries, library_list_start_segment,
11084         library_list_start_section, library_list_start_library,
11085         library_list_end_library, solib_target_free_library_list,
11086         solib_target_current_sos, solib_target_free_so,
11087         solib_target_relocate_section_addresses): Adjust.
11088         * windows-nat.c (struct lm_info): Rename to ...
11089         (struct lm_info_windows): ... this.  Extend lm_info_base.
11090         (windows_make_so, handle_load_dll, handle_unload_dll,
11091         windows_xfer_shared_libraries): Adjust.
11092
11093 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11094
11095         * solib-darwin.c (struct darwin_so_list): Remove.
11096         (darwin_current_sos): Allocate an so_list object instead of a
11097         darwin_so_list, separately allocate an lm_info object.
11098         (darwin_free_so): Free lm_info.
11099
11100 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11101
11102         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11103         with fprintf_filtered.
11104
11105 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11106
11107         * regcache.c (regcache::regcache): New function.
11108         (regcache::~regcache): New function.
11109         (regcache_xmalloc_1): Remove.
11110         (regcache_xmalloc): Call new regcache.
11111         (regcache_xfree): Call delete regcache.
11112         (get_thread_arch_aspace_regcache): Call new regcache.
11113
11114 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11115
11116         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11117         lwp instead of ptid_get_lwp.
11118
11119 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11120
11121         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11122         lwp_info instead of getting from inferior_ptid.
11123
11124 2017-04-27  Keith Seitz  <keiths@redhat.com>
11125
11126         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11127         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11128         (CV_CONVERSION_BADNESS): Define.
11129         (rank_one_type): Remove overly restrictive rvalue reference
11130         rank checks.
11131         Add cv-qualifier checks and subranks for type equality.
11132         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11133         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11134         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11135
11136 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11137
11138         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11139         count when creating the object.
11140
11141 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11142             Ulrich Weigand  <uweigand@de.ibm.com>
11143
11144         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11145         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11146         is used in AIX.
11147         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11148         (process_xcoff_symbol): Likewise.
11149         (scan_xcoff_symtab): Likewise.
11150
11151 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11152
11153         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11154         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11155         (ia64_access_reg): Use get_frame_register_unsigned.
11156         (ia64_access_rse_reg): Likewise.
11157         (ia64_libunwind_frame_prev_register): Likewise.
11158
11159 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11160
11161         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11162         * gdbarch.c: Regenerated.
11163         * gdbarch.h: Regenerated.
11164         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11165         visibility external.
11166         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11167         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11168         (enum cfa_how_kind): Move to ...
11169         (struct dwarf2_frame_state_reg_info): Likewise.
11170         (struct dwarf2_frame_state): Likewise.
11171         * dwarf2-frame.h: ... here.
11172         (dwarf2_frame_state_alloc_regs): New declaration.
11173         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11174         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11175
11176 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11177
11178         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11179         regcache_raw_read_unsigned.
11180         (xtensa_pseudo_register_write): Likewise.
11181
11182 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11183
11184         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11185         (nds32_pseudo_register_write): Likewise.
11186
11187 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11188
11189         * regcache.c (struct regcache) <readonly_p>: Change its type
11190         to bool.
11191         (regcache_xmalloc_1): Update parameter type and callers update.
11192
11193 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11194
11195         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11196         set_gdbarch_wchar_bit.
11197         * arm-tdep.c (arm_gdbarch_init): Likewise.
11198
11199 2017-04-25  Pedro Alves  <palves@redhat.com>
11200
11201         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11202         (BothAreRelocatable, memcopy, memmove): Don't define.
11203         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11204         macros.
11205
11206 2017-04-25  Pedro Alves  <palves@redhat.com>
11207
11208         * common/common-defs.h: Include "common/poison.h".
11209         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11210         and adjust.
11211         * common/poison.h: New file.
11212         * common/traits.h: Include <type_traits>.
11213         (Not, Or, Requires): New, moved from common/function-view.h.
11214
11215 2017-04-25  Pedro Alves  <palves@redhat.com>
11216
11217         * breakpoint.h (struct breakpoint): In-class initialize all
11218         fields.  Make boolean fields "bool".
11219         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11220         memset call and initializations no longer necessary.
11221
11222 2017-04-25  Pedro Alves  <palves@redhat.com>
11223
11224         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11225         reference.
11226         (pt_btrace_insn): New function.
11227         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11228
11229 2017-04-25  Pedro Alves  <palves@redhat.com>
11230
11231         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11232         "base" field and inherit from "bp_location" instead.  Add
11233         non-default ctor.
11234         (allocate_location_exception): Use new non-default ctor.
11235         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11236         (init_bp_location): Convert to ...
11237         (bp_location::bp_location): ... this new ctor, and remove memset
11238         call.
11239         (base_breakpoint_allocate_location): Use the new non-default ctor.
11240         * breakpoint.h (bp_location): Now a class.  Declare default and
11241         non-default ctors.  In-class initialize all members.
11242         (init_bp_location): Remove declaration.
11243
11244 2017-04-25  Pedro Alves  <palves@redhat.com>
11245
11246         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11247         assignment operator.
11248
11249 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11250
11251         * doublest.c (convert_doublest_to_floatformat): Call
11252         floatformat_totalsize_bytes.
11253
11254 2017-04-22  Tom Tromey  <tom@tromey.com>
11255
11256         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11257         ui_out_emit_list.
11258         * stack.c (print_frame): Use ui_out_emit_list.
11259         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11260         ui_out_emit_list.
11261         * mi/mi-main.c (print_one_inferior)
11262         (mi_cmd_data_list_register_names)
11263         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11264         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11265         ui_out_emit_list.
11266         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11267         (mi_output_solib_attribs): Use ui_out_emit_list,
11268         ui_out_emit_tuple.
11269         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11270         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11271         (mi_cmd_stack_list_args, list_args_or_locals): Use
11272         ui_out_emit_list.
11273         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11274         * breakpoint.c (print_solib_event, output_thread_groups): Use
11275         ui_out_emit_list.
11276
11277 2017-04-22  Tom Tromey  <tom@tromey.com>
11278
11279         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11280         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11281         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11282
11283 2017-04-22  Tom Tromey  <tom@tromey.com>
11284
11285         * tracepoint.c (tvariables_info_1)
11286         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11287
11288 2017-04-22  Tom Tromey  <tom@tromey.com>
11289
11290         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11291         annotate_arg_emitter.
11292         * breakpoint.c (print_mention_watchpoint)
11293         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11294         * annotate.h (struct annotate_arg_emitter): New.
11295
11296 2017-04-22  Tom Tromey  <tom@tromey.com>
11297
11298         * record-btrace.c (record_btrace_insn_history)
11299         (record_btrace_insn_history_range, record_btrace_call_history)
11300         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11301         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11302         ui_out_emit_tuple.
11303         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11304         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11305         * skip.c (skip_info): Use ui_out_emit_tuple.
11306         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11307         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11308         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11309         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11310         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11311         ui_out_emit_tuple.
11312         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11313         (output_register, mi_cmd_data_read_memory)
11314         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11315         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11316         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11317         Use ui_out_emit_tuple.
11318         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11319         ui_out_emit_tuple.
11320         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11321         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11322         * linux-thread-db.c (info_auto_load_libthread_db): Use
11323         ui_out_emit_tuple.
11324         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11325         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11326         * disasm.c (do_mixed_source_and_assembly_deprecated)
11327         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11328         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11329         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11330         * breakpoint.c (print_one_breakpoint_location)
11331         (print_one_breakpoint): Use ui_out_emit_tuple.
11332         * auto-load.c (print_script, info_auto_load_cmd): Use
11333         ui_out_emit_tuple.
11334         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11335
11336 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11337
11338         * thread.c (print_thread_info_1): Remove dead code.
11339
11340 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11341
11342         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11343         GDB_SELF_TEST.
11344         * arm-tdep.c (selftests::arm_record_test): Likewise.
11345
11346 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11347
11348         * regcache.c (regcache_restore): Remove argument 2.  Replace
11349         argument 3 with regcache.  Get register status from
11350         src->register_status and get register contents from
11351         register_buffer (src, regnum).
11352         (regcache_cpy): Update.
11353
11354 2017-04-19  Pedro Alves  <palves@redhat.com>
11355
11356         * gdbthread.h (thread): Add missing closing parenthesis in
11357         comment.
11358
11359 2017-04-19  Pedro Alves  <palves@redhat.com>
11360
11361         * common/refcounted-object.h: New file.
11362         * gdbthread.h: Include "common/refcounted-object.h".
11363         (thread_info): Inherit from refcounted_object and add comments.
11364         (thread_info::incref, thread_info::decref)
11365         (thread_info::m_refcount): Delete.
11366         (thread_info::deletable): Use the refcounted_object::refcount()
11367         method.
11368         * inferior.c (current_inferior_): Add comment.
11369         (set_current_inferior): Increment/decrement refcounts.
11370         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11371         not-deletable instead of comparing with the current inferior.
11372         (initialize_inferiors): Increment the initial inferior's refcount.
11373         * inferior.h (struct inferior): Forward declare.
11374         Include "common/refcounted-object.h".
11375         (current_inferior, set_current_inferior): Move declaration to
11376         before struct inferior's definition, and fix comment.
11377         (inferior): Inherit from refcounted_object.  Add comments.
11378         * thread.c (switch_to_thread_no_regs): Reference the thread's
11379         inferior pointer directly instead of doing a ptid lookup.
11380         (switch_to_no_thread): New function.
11381         (switch_to_thread(thread_info *)): New function, factored out
11382         from ...
11383         (switch_to_thread(ptid_t)): ... this.
11384         (restore_current_thread): Delete.
11385         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11386         fields, and add 'inf' field.
11387         (do_restore_current_thread_cleanup): Check whether old->inf is
11388         alive instead of looking up an inferior by ptid.  Use
11389         switch_to_thread and switch_to_no_thread.
11390         (restore_current_thread_cleanup_dtor): Use old->inf directly
11391         instead of lookup up an inferior by id.  Decref the inferior.
11392         Don't restore 'removable'.
11393         (make_cleanup_restore_current_thread): Same the inferior pointer
11394         in old, instead of the inferior number.  Incref the inferior.
11395         Don't save/clear 'removable'.
11396
11397 2017-04-19  Pedro Alves  <palves@redhat.com>
11398
11399         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11400         unittests/scoped_restore-selftests.c.
11401         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11402         * common/scoped_restore.h (scoped_restore_base): Make "class".
11403         (scoped_restore_base::release): New public method.
11404         (scoped_restore_base::scoped_restore_base): New protected ctor.
11405         (scoped_restore_base::m_saved_var): New protected field.
11406         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11407         scoped_restore_base base class instead of m_saved_var directly.
11408         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11409         (scoped_restore_tmpl::scoped_restore_tmpl(const
11410         scoped_restore_tmpl<T>&)): Likewise.
11411         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11412         method.
11413         (scoped_restore_tmpl::saved_var): New method.
11414         (scoped_restore_tmpl::m_saved_var): Delete.
11415         * inferior.h (inferior::detaching): Now a bool.
11416         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11417         cleanup.
11418         * unittests/scoped_restore-selftests.c: New file.
11419
11420 2017-04-19  Pedro Alves  <palves@redhat.com>
11421
11422         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11423         Re-sort in alphabetic order.
11424
11425 2017-04-18  Pedro Alves  <palves@redhat.com>
11426
11427         * xml-support.c (obstack_xml_printf): Delete.
11428         * xml-support.h (obstack_xml_printf): Delete.
11429
11430 2017-04-18  Pedro Alves  <palves@redhat.com>
11431
11432         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11433         vdebug, verror, body_text, start_element, end_element, name,
11434         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11435         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11436         is_xinclude>: Make private and add m_ prefix.
11437         (gdb_xml_parser::body_text): New method, based on ...
11438         (gdb_xml_body_text): ... this.  Adjust.
11439         (gdb_xml_parser::vdebug): New method, based on ...
11440         (gdb_xml_debug): ... this.  Adjust.
11441         (gdb_xml_parser::verror): New method, based on ...
11442         (gdb_xml_error): ... this.  Adjust.
11443         (gdb_xml_parser::start_element): New method, based on ...
11444         (gdb_xml_start_element): ... this.  Adjust.
11445         (gdb_xml_start_element_wrapper): Defer to
11446         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11447         (gdb_xml_parser::end_element): New method, based on ...
11448         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11449         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11450         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11451         (gdb_xml_parser::use_dtd): New method, based on ...
11452         (gdb_xml_use_dtd): ... this.  Adjust.
11453         (gdb_xml_parser::parse): New method, based on ...
11454         (gdb_xml_parse): ... this.  Adjust.
11455         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11456         (xinclude_start_include): Adjust to call the parser's name method.
11457         (xml_xinclude_default, xml_xinclude_start_doctype)
11458         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11459         method.
11460         (xml_process_xincludes): Adjust to call parser methods.
11461         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11462         declarations.
11463
11464 2017-04-18  Pedro Alves  <palves@redhat.com>
11465
11466         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11467         gdb::optional<std::string>.
11468         * xml-support.c: Include <string>.
11469         (scope_level::scope_level(scope_level &&))
11470         (scope_level::~scope_level): Delete.
11471         (scope_level::body): Now a std::string.
11472         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11473         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11474         parameter.
11475         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11476         (xinclude_parsing_data::output): Now a std::string reference.
11477         (xinclude_start_include): Adjust.
11478         (xml_xinclude_default): Adjust.
11479         (xml_process_xincludes): Add 'output' parameter, and return bool.
11480         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11481         and return bool.
11482         * xml-tdesc.c: Include <unordered_map> and <string>.
11483         (tdesc_xml_cache): Delete.
11484         (tdesc_xml_cache_s): Delete.
11485         (xml_cache): Now an std::unordered_map.
11486         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11487         (target_fetch_description_xml): Change return type to
11488         gdb::optional<std::string>, and adjust.
11489         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11490         (target_fetch_description_xml): Change return type to
11491         gdb::optional<std::string>.
11492
11493 2017-04-18  Pedro Alves  <palves@redhat.com>
11494
11495         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11496         unittests/optional-selftests.c.
11497         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11498         * unittests/optional-selftests.c: New file.
11499         * unittests/optional/assignment/1.cc: New file.
11500         * unittests/optional/assignment/2.cc: New file.
11501         * unittests/optional/assignment/3.cc: New file.
11502         * unittests/optional/assignment/4.cc: New file.
11503         * unittests/optional/assignment/5.cc: New file.
11504         * unittests/optional/assignment/6.cc: New file.
11505         * unittests/optional/assignment/7.cc: New file.
11506         * unittests/optional/cons/copy.cc: New file.
11507         * unittests/optional/cons/default.cc: New file.
11508         * unittests/optional/cons/move.cc: New file.
11509         * unittests/optional/cons/value.cc: New file.
11510         * unittests/optional/in_place.cc: New file.
11511         * unittests/optional/observers/1.cc: New file.
11512         * unittests/optional/observers/2.cc: New file.
11513
11514 2017-04-18  Pedro Alves  <palves@redhat.com>
11515
11516         * common/gdb_optional.h: Include common/traits.h.
11517         (in_place_t): New type.
11518         (in_place): New constexpr variable.
11519         (optional::optional): Remove member initialization of
11520         m_instantiated.
11521         (optional::optional(in_place_t...)): New constructor.
11522         (optional::~optional): Use reset.
11523         (optional::optional(const optional&)): New.
11524         (optional::optional(const optional&&)): New.
11525         (optional::optional(T &)): New.
11526         (optional::optional(T &&)): New.
11527         (operator::operator=(const optional &)): New.
11528         (operator::operator=(optional &&)): New.
11529         (operator::operator= (const T &))
11530         (operator::operator= (T &&))
11531         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11532         (operator::reset): New.
11533         (operator::m_instantiated):: Add in-class initializer.
11534         * common/traits.h: Include <type_traits>.
11535         (struct And): New types.
11536
11537 2017-04-18  Pedro Alves  <palves@redhat.com>
11538
11539         * xml-support.c: Include <vector>.
11540         (scope_level::scope_level(const gdb_xml_element *))
11541         (scope_level::scope_level(scope_level&&)): New.
11542         (scope_level::~scope_level): New.
11543         (scope_level_s): Delete.
11544         (gdb_xml_parser::scopes): Now a std::vector.
11545         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11546         Use std::vector.
11547         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11548         scope cleanup code.
11549         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11550         of the scopes member.  Use std::vector::emplace_back.
11551
11552 2017-04-18  Pedro Alves  <palves@redhat.com>
11553
11554         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11555         a bool.
11556         (gdb_xml_end_element): Change type of first parameter.
11557         (gdb_xml_cleanup): Rename to ...
11558         (gdb_xml_parser::~gdb_xml_parser): ... this.
11559         (gdb_xml_create_parser_and_cleanup): Delete with ...
11560         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11561         to this new ctor.
11562         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11563         using gdb_xml_create_parser_and_cleanup.
11564         (xinclude_parsing_data): Add ctor/dtor.
11565         (xml_xinclude_cleanup): Delete.
11566         (xml_process_xincludes): Create a local xinclude_parsing_data
11567         instead of heap-allocating one.  Create a local gdb_xml_parser
11568         instead of heap-allocating one with
11569         gdb_xml_create_parser_and_cleanup.
11570
11571 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11572
11573         PR threads/20743
11574         * fbsd-nat.c (resume_one_thread_cb): Remove.
11575         (resume_all_threads_cb): Remove.
11576         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11577         iterate_over_threads.
11578
11579 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11580
11581         * NEWS: Create a new section for the next release branch.
11582         Rename the section of the current branch, now that it has
11583         been cut.
11584
11585 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11586
11587         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11588         * version.in: Bump version to 8.0.50.DATE-git.
11589
11590 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11591
11592         PR gdb/21385
11593         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11594         independently of the host, and fix build breakage on Cygwin.
11595
11596 2017-04-13  Pedro Alves  <palves@redhat.com>
11597
11598         * inferior.c (free_inferior): Convert to ...
11599         (inferior::~inferior): ... this dtor.
11600         (inferior::inferior): New ctor, factored out from ...
11601         (add_inferior_silent): ... here.  Allocate the inferior with a new
11602         expression.
11603         (delete_inferior): Call delete instead of free_inferior.
11604         * inferior.h (gdb_environ, continuation): Forward declare.
11605         (inferior): Now a class.  Add in-class initialization to all
11606         members.  Make boolean fields bool, except 'detaching'.
11607         (inferior::inferior): New explicit ctor.
11608         (inferior::~inferior): New.
11609
11610 2017-04-13  Pedro Alves  <palves@redhat.com>
11611
11612         * inferior.c (init_inferior_list): Delete.
11613         * inferior.h (init_inferior_list): Delete.
11614
11615 2017-04-13  Pedro Alves  <palves@redhat.com>
11616
11617         PR threads/13217
11618         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11619         (top level): Call it twice, with different thread sets.
11620
11621 2017-04-13  Pedro Alves  <palves@redhat.com>
11622
11623         * thread.c: Include <algorithm>.
11624         (thread_array_cleanup): Delete.
11625         (scoped_inc_dec_ref): New class.
11626         (live_threads_count): New function.
11627         (set_thread_refcount): Delete.
11628         (tp_array_compar_ascending): Now a bool.
11629         (tp_array_compar): Convert to a std::sort comparison function.
11630         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11631         and live_threads_count.
11632
11633 2017-04-13  Pedro Alves  <palves@redhat.com>
11634
11635         * infrun.c (follow_fork_inferior): Also switch the current
11636         inferior.
11637
11638 2017-04-13  Pedro Alves  <palves@redhat.com>
11639
11640         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11641         before calling create_internal_breakpoint.
11642
11643 2017-04-13  Pedro Alves  <palves@redhat.com>
11644
11645         * fork-child.c (execv_argv): New class.
11646         (breakup_args): Refactored as ...
11647         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11648         Copy arguments to storage and replace separators with NULL
11649         terminators in place.
11650         (escape_bang_in_quoted_argument): Adjust to return bool.
11651         (execv_argv::execv_argv): New ctor.
11652         (execv_argv::init_for_shell): New method, factored out from
11653         fork_inferior.  Don't strdup strings into the vector.
11654         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11655         Remove free_vector_argv call.
11656
11657 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11658
11659         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11660         tdep->rx_psw_type.
11661
11662 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11663
11664         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11665         * rx-tdep.c (rx_gdbarch_init): Likewise.
11666
11667 2017-04-13  Pedro Alves  <palves@redhat.com>
11668
11669         * breakpoint.h (struct breakpoint): Reindent.
11670
11671 2017-04-13  Pedro Alves  <palves@redhat.com>
11672
11673         * breakpoint.c (bp_location): Rename to ...
11674         (bp_locations): ... this.  All references updated.
11675         (bp_location_count): Rename to ...
11676         (bp_locations_count): ... this.  All references updated.
11677         (bp_location_placed_address_before_address_max): Rename to ...
11678         (bp_locations_placed_address_before_address_max): ... this.  All
11679         references updated.
11680         (bp_location_shadow_len_after_address_max): Rename to ...
11681         (bp_locations_shadow_len_after_address_max): ... this.  All
11682         references updated.
11683         (bp_location_compare_addrs): Rename to ...
11684         (bp_locations_compare_addrs): ... this.  All references updated.
11685         (bp_location_compare):Rename to ...
11686         (bp_locations_compare): ... this.  All references updated.
11687         (bp_location_target_extensions_update): Rename to ...
11688         (bp_locations_target_extensions_update): ... this.  All references
11689         updated.
11690
11691 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11692
11693         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11694         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11695         'sgtty.h'.
11696         * common/gdb_termios.h: New file, with parts of "terminal.h".
11697         * inflow.c: Include "gdb_termios.h".
11698         * ser-unix.c: Include "gdb_termios.h".
11699         * terminal.h: Move terminal-related defines to
11700         "common/gdb_termios.h".
11701
11702 2017-04-12  Tom Tromey  <tom@tromey.com>
11703
11704         * probe.c (parse_probes): Update.
11705         * location.h (delete_event_location): Don't declare.
11706         (event_location_deleter::operator()): Update.
11707         * location.c (event_location_deleter::operator()): Rename from
11708         delete_event_location.
11709         * linespec.h (linespec_result) <location>: Change type to
11710         event_location_up.
11711         * linespec.c (canonicalize_linespec, event_location_to_sals)
11712         (decode_objc): Update.
11713         (linespec_result): Don't call delete_event_location.
11714         * breakpoint.c (create_breakpoints_sal)
11715         (bkpt_probe_create_sals_from_location)
11716         (strace_marker_create_sals_from_location): Update.
11717
11718 2017-04-12  Tom Tromey  <tom@tromey.com>
11719
11720         * linespec.h (struct linespec_result): Add constructor and
11721         destructor.
11722         (init_linespec_result, destroy_linespec_result)
11723         (make_cleanup_destroy_linespec_result): Don't declare.
11724         * linespec.c (init_linespec_result): Remove.
11725         (linespec_result::~linespec_result): Rename from
11726         destroy_linespec_result.  Update.
11727         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11728         Remove.
11729         * breakpoint.c (create_breakpoint, break_range_command)
11730         (decode_location_default): Update.
11731         * ax-gdb.c (agent_command_1): Update.
11732
11733 2017-04-12  Tom Tromey  <tom@tromey.com>
11734
11735         * remote.c (remote_download_tracepoint): Update.
11736         * python/py-breakpoint.c (bppy_get_location): Update.
11737         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11738         (gdbscm_breakpoint_location): Update.
11739         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11740         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11741         Change type to event_location_up.
11742         * breakpoint.c (create_overlay_event_breakpoint)
11743         (create_longjmp_master_breakpoint)
11744         (create_std_terminate_master_breakpoint)
11745         (create_exception_master_breakpoint)
11746         (breakpoint_event_location_empty_p, print_breakpoint_location)
11747         (print_one_breakpoint_location, create_thread_event_breakpoint)
11748         (init_breakpoint_sal, create_breakpoint)
11749         (print_recreate_ranged_breakpoint, break_range_command)
11750         (init_ada_exception_breakpoint, say_where): Update.
11751         (base_breakpoint_dtor): Don't call delete_event_location.
11752         (bkpt_print_recreate, tracepoint_print_recreate)
11753         (dprintf_print_recreate, update_static_tracepoint)
11754         (breakpoint_re_set_default): Update.
11755
11756 2017-04-12  Tom Tromey  <tom@tromey.com>
11757
11758         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11759         type of "to_do".  Update.
11760         (compute_stack_depth): Use std::vector.
11761
11762 2017-04-12  Tom Tromey  <tom@tromey.com>
11763
11764         * printcmd.c (find_instruction_backward): Use std::vector.
11765
11766 2017-04-12  Tom Tromey  <tom@tromey.com>
11767
11768         * symfile.c (objfilep): Remove typedef.
11769         (reread_symbols): Use a std::vector.
11770
11771 2017-04-12  Tom Tromey  <tom@tromey.com>
11772
11773         * mi/mi-main.c (exec_direction_forward): Remove.
11774         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11775         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11776         scoped_restore.
11777         * guile/guile.c (guile_repl_command, guile_command)
11778         (gdbscm_execute_gdb_command): Use scoped_restore.
11779         * go-exp.y (go_parse): Use scoped_restore.
11780         * d-exp.y (d_parse): Use scoped_restore.
11781         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11782         * c-exp.y (c_parse): Use scoped_restore.
11783
11784 2017-04-12  Tom Tromey  <tom@tromey.com>
11785
11786         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11787         (mi_parse): Update return type.
11788         (mi_parse_free): Remove.
11789         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11790         (mi_parse::~mi_parse): Rename from mi_parse_free.
11791         (mi_parse_cleanup): Remove.
11792         (mi_parse): Return a unique_ptr.  Use new.
11793         * mi/mi-main.c (mi_execute_command): Update.
11794
11795 2017-04-12  Tom Tromey  <tom@tromey.com>
11796
11797         * location.c (explicit_location_lex_one): Return a
11798         unique_xmalloc_ptr.
11799         (string_to_explicit_location): Update.  Remove cleanups.
11800
11801 2017-04-12  Tom Tromey  <tom@tromey.com>
11802
11803         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11804         (compare_value_and_voffset): Change type.  Update.
11805         (compute_vtable_size): Change type of "offset_vec".
11806         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11807         (gnuv3_get_typeid): Remove extraneous declaration.
11808
11809 2017-04-12  Tom Tromey  <tom@tromey.com>
11810
11811         * charset.h (wchar_iterator): Fix comment.
11812
11813 2017-04-12  Tom Tromey  <tom@tromey.com>
11814
11815         * charset.c (iconv_wrapper): New class.
11816         (cleanup_iconv): Remove.
11817         (convert_between_encodings): Use it.
11818
11819 2017-04-12  Tom Tromey  <tom@tromey.com>
11820
11821         * symfile.h (increment_reading_symtab): Update type.
11822         * symfile.c (decrement_reading_symtab): Remove.
11823         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11824         * psymtab.c (psymtab_to_symtab): Update.
11825         * dwarf2read.c (dw2_instantiate_symtab): Update.
11826
11827 2017-04-12  Tom Tromey  <tom@tromey.com>
11828
11829         * jit.c (struct jit_reader): Declare separately.  Add constructor
11830         and destructor.  Change type of "handle".
11831         (loaded_jit_reader): Define separately.
11832         (jit_reader_load): Update.  New "new".
11833         (jit_reader_unload_command): Use "delete".
11834         * gdb-dlfcn.h (struct dlclose_deleter): New.
11835         (gdb_dlhandle_up): New typedef.
11836         (gdb_dlopen, gdb_dlsym): Update types.
11837         (gdb_dlclose): Remove.
11838         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11839         (gdb_dlsym): Change type of "handle".
11840         (make_cleanup_dlclose): Remove.
11841         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11842         * compile/compile-c-support.c (load_libcc): Update.
11843
11844 2017-04-12  Tom Tromey  <tom@tromey.com>
11845
11846         * symtab.h (find_pcs_for_symtab_line): Change return type.
11847         * symtab.c (find_pcs_for_symtab_line): Change return type.
11848         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11849         type of "vec".  Update.
11850         (ltpy_get_pcs_for_line): Update.
11851         * linespec.c (decode_digits_ordinary): Update.
11852
11853 2017-04-12  Tom Tromey  <tom@tromey.com>
11854
11855         * tracepoint.c (actions_command): Update.
11856         * python/python.c (python_command, python_interactive_command):
11857         Update.
11858         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11859         * guile/guile.c (guile_command): Update.
11860         * defs.h (read_command_lines, read_command_lines_1): Return
11861         command_line_up.
11862         (command_lines_deleter): New struct.
11863         (command_line_up): New typedef.
11864         * compile/compile.c (compile_code_command)
11865         (compile_print_command): Update.
11866         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11867         command_line_up.
11868         (make_cleanup_free_command_lines): Remove.
11869         * cli/cli-script.c (get_command_line, read_command_lines_1)
11870         (copy_command_lines): Return command_line_up.
11871         (while_command, if_command, read_command_lines, define_command)
11872         (document_command): Update.
11873         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11874         Remove.
11875         * breakpoint.h (breakpoint_set_commands): Change type of
11876         "commands".
11877         * breakpoint.c (breakpoint_set_commands): Change type of
11878         "commands".  Update.
11879         (do_map_commands_command, update_dprintf_command_list)
11880         (create_tracepoint_from_upload): Update.
11881
11882 2017-04-12  Tom Tromey  <tom@tromey.com>
11883
11884         * tracepoint.c (scope_info): Update.
11885         * spu-tdep.c (spu_catch_start): Update.
11886         * python/python.c (gdbpy_decode_line): Update.
11887         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11888         * python/py-breakpoint.c (bppy_init): Update.
11889         * probe.c (parse_probes): Update.
11890         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11891         * location.h (event_location_deleter): New struct.
11892         (event_location_up): New typedef.
11893         (new_linespec_location, new_address_location, new_probe_location)
11894         (new_explicit_location, copy_event_location)
11895         (string_to_event_location, string_to_event_location_basic)
11896         (string_to_explicit_location): Update return type.
11897         (make_cleanup_delete_event_location): Remove.
11898         * location.c (new_linespec_location, new_address_location)
11899         (new_probe_location, new_explicit_location, copy_event_location):
11900         Return event_location_up.
11901         (delete_event_location_cleanup)
11902         (make_cleanup_delete_event_location): Remove.
11903         (string_to_explicit_location, string_to_event_location_basic)
11904         (string_to_event_location): Return event_location_up.
11905         * linespec.c (canonicalize_linespec, event_location_to_sals)
11906         (decode_line_with_current_source)
11907         (decode_line_with_last_displayed, decode_objc): Update.
11908         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11909         * completer.c (location_completer): Update.
11910         * cli/cli-cmds.c (edit_command, list_command): Update.
11911         * breakpoint.c (create_overlay_event_breakpoint)
11912         (create_longjmp_master_breakpoint)
11913         (create_std_terminate_master_breakpoint)
11914         (create_exception_master_breakpoint)
11915         (create_thread_event_breakpoint): Update.
11916         (init_breakpoint_sal): Update.  Remove some dead code.
11917         (create_breakpoint_sal): Change type of "location".  Update.
11918         (create_breakpoints_sal, create_breakpoint, break_command_1)
11919         (dprintf_command, break_range_command, until_break_command)
11920         (init_ada_exception_breakpoint)
11921         (strace_marker_create_sals_from_location)
11922         (update_static_tracepoint, trace_command, ftrace_command)
11923         (strace_command, create_tracepoint_from_upload): Update.
11924         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11925         * ax-gdb.c (agent_command_1): Update.
11926
11927 2017-04-12  Pedro Alves  <palves@redhat.com>
11928
11929         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11930         * configure.tgt: Handle i[34567]86-*-go32* and
11931         i[34567]86-*-msdosdjgpp*.
11932         * i386-tdep.c (i386_svr4_reg_to_regnum):
11933         Make extern.
11934         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11935         i386-go32-tdep.c.
11936         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11937         * i386-go32-tdep.c: New file.
11938         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11939         declarations.
11940
11941 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11942
11943         * aix-thread.c (pd_status2str): Change return type to const char *.
11944
11945 2017-04-12  Pedro Alves  <palves@redhat.com>
11946
11947         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11948         calls to set_gdbarch_gnu_triplet_regexp.
11949
11950 2017-04-12  Pedro Alves  <palves@redhat.com>
11951
11952         PR gdb/21323
11953         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11954         New enum value.
11955         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11956         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11957         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11958         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11959         * gdbarch.h, gdbarch.c: Regenerate.
11960         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11961         gdbarch_wchar_bit and gdbarch_wchar_signed.
11962         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11963         * arm-tdep.c (arm_gdbarch_init): Likewise.
11964         * avr-tdep.c (avr_gdbarch_init): Likewise.
11965         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11966         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11967         * i386-tdep.c (i386_go32_init_abi): Likewise.
11968         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11969         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11970         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11971         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11972         * sh-tdep.c (sh_gdbarch_init): Likewise.
11973         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11974         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11975         * windows-tdep.c (windows_init_abi): Likewise.
11976         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11977
11978 2017-04-12  Pedro Alves  <palves@redhat.com>
11979
11980         PR c++/21323
11981         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11982         cplus_primitive_type_char32_t>: New enum values.
11983         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11984         and cplus_primitive_type_char32_t.
11985         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11986         32, use the archtecture's built-in type for char16_t and char32_t,
11987         respectively.  Otherwise, fallback to init_integer_type as before,
11988         but make the type unsigned, and issue a complaint.
11989         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11990
11991 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11992
11993         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11994         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11995
11996 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11997
11998         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11999         'const char *'.
12000
12001 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12002
12003         * common/common-utils.c (free_vector_argv): New function.
12004         * common/common-utils.h: Include <vector>.
12005         (free_vector_argv): New prototype.
12006         * darwin-nat.c (darwin_create_inferior): Rewrite function
12007         prototype in order to constify "exec_file" and accept a
12008         "std::string" for "allargs".
12009         * fork-child.c: Include <vector>.
12010         (breakup_args): Rewrite function, using C++.
12011         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12012         and accept "std::string" for "allargs".  Update the code to
12013         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12014         and "execvp".
12015         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12016         order to constify "exec_file" and accept a "std::string" for
12017         "allargs".
12018         * go32-nat.c (go32_create_inferior): Likewise.
12019         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12020         * infcmd.c (run_command_1): Constify "exec_file".  Use
12021         "std::string" for inferior arguments.
12022         * inferior.h (fork_inferior): Update prototype.
12023         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12024         prototype in order to constify "exec_file" and accept a
12025         "std::string" for "allargs".
12026         * nto-procfs.c (procfs_create_inferior): Likewise.
12027         * procfs.c (procfs_create_inferior): Likewise.
12028         * remote-sim.c (gdbsim_create_inferior): Likewise.
12029         * remote.c (extended_remote_run): Update code to accept
12030         "std::string" as argument.
12031         (extended_remote_create_inferior): Rewrite function prototype in
12032         order to constify "exec_file" and accept a "std::string" for
12033         "allargs".
12034         * rs6000-nat.c (super_create_inferior): Likewise.
12035         (rs6000_create_inferior): Likewise.
12036         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12037         * windows-nat.c (windows_create_inferior): Likewise.
12038
12039 2017-04-11  Pedro Alves  <palves@redhat.com>
12040
12041         * thread.c: Fix whitespace throughout.
12042
12043 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12044
12045         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12046
12047 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12048
12049         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12050
12051 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12052
12053         PR gdb/21364
12054         * osdata.c (info_osdata): Check if 'type' is an empty string
12055         instead of NULL.
12056
12057 2017-04-10  Pedro Alves  <palves@redhat.com>
12058
12059         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12060         (ptid_to_global_thread_id, in_thread_list)
12061         (do_captured_list_thread_ids, set_resumed, set_running)
12062         (set_executing, set_stop_requested, finish_thread_state)
12063         (validate_registers_access, can_access_registers_ptid)
12064         (print_thread_info_1, switch_to_thread)
12065         (do_restore_current_thread_cleanup)
12066         (make_cleanup_restore_current_thread, thread_command)
12067         (thread_name_command): Use operator== instead of ptid_equal.
12068
12069 2017-04-10  Pedro Alves  <palves@redhat.com>
12070
12071         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12072         (current_thread_cleanup_chain): Delete.
12073         (restore_current_thread_cleanup_dtor)
12074         (make_cleanup_restore_current_thread): Remove references to
12075         current_thread_cleanup_chain.
12076
12077 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12078
12079         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12080         REG_UNKNOWN.
12081
12082 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12083
12084         PR gdb/19942
12085         * gdbthread.h (thread_info::deletable): New method.
12086         (thread_info::incref): New method.
12087         (thread_info::decref): New method.
12088         (thread_info::refcount): Move it to private.
12089         * infrun.c (save_stop_context): Call inc_refcount.
12090         (release_stop_context_cleanup): Likewise.
12091         * thread.c (set_thread_exited): New function.
12092         (init_thread_list): Delete "tp" only it is deletable, otherwise
12093         call set_thread_exited.
12094         (delete_thread_1): Call set_thread_exited.
12095         (current_thread_cleanup) <inferior_pid>: Remove.
12096         <thread>: New field.
12097         (restore_current_thread_ptid_changed): Removed.
12098         (do_restore_current_thread_cleanup): Adjust.
12099         (restore_current_thread_cleanup_dtor): Don't call
12100         find_thread_ptid.
12101         (set_thread_refcount): Use dec_refcount.
12102         (make_cleanup_restore_current_thread): Adjust.
12103         (thread_apply_all_command): Call inc_refcount.
12104         (_initialize_thread): Don't call
12105         observer_attach_thread_ptid_changed.
12106
12107 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12108
12109         * thread.c (delete_thread_1): Hoist code on marking thread as
12110         exited.
12111
12112 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12113
12114         * windows-nat.c (windows_detach): Initialize ptid with
12115         minus_one_ptid.
12116
12117 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12118
12119         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12120
12121 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12122
12123         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12124         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12125         (bfin_pseudo_register_write): Likewise
12126
12127 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12128
12129         * common/ptid.h (struct ptid): Change to...
12130         (class ptid_t): ... this.
12131         <ptid_t>: New constructors.
12132         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12133         matches>: New methods.
12134         <make_null, make_minus_one>: New static methods.
12135         <pid>: Rename to...
12136         <m_pid>: ...this.
12137         <lwp>: Rename to...
12138         <m_lwp>: ...this.
12139         <tid>: Rename to...
12140         <m_tid>: ...this.
12141         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12142         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12143         as references, move comment to class ptid_t.
12144         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12145         ptid_t static methods.
12146         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12147         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12148         Take ptid arguments as references, implement using ptid_t methods.
12149         * unittests/ptid-selftests.c: New file.
12150         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12151         unittests/ptid-selftests.c.
12152         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12153
12154 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12155
12156         * python/python.c (python_run_simple_file): Cast mode literal to
12157         non-const char pointer as expected by PyFile_FromString.
12158
12159 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12160
12161         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12162         minus_one_ptid and null_ptid.
12163
12164 2017-04-05  Pedro Alves  <palves@redhat.com>
12165
12166         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12167         * configure: Regenerate.
12168
12169 2017-04-05  Pedro Alves  <palves@redhat.com>
12170
12171         * ada-exp.y (yyerror): Constify.
12172         * ada-lang.c (bound_name, get_selections)
12173         (ada_variant_discrim_type)
12174         (ada_variant_discrim_name, ada_value_struct_elt)
12175         (ada_lookup_struct_elt_type, is_unchecked_variant)
12176         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12177         (catch_ada_exception_command_split)
12178         (catch_ada_assert_command_split, catch_assert_command)
12179         (ada_op_name): Constify.
12180         * ada-lang.h (ada_yyerror, get_selections)
12181         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12182         * arc-tdep.c (arc_print_frame_cache): Constify.
12183         * arm-tdep.c (arm_skip_stub): Constify.
12184         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12185         (gen_aggregate_elt_ref): Constify.
12186         * bcache.c (print_bcache_statistics): Constify.
12187         * bcache.h (print_bcache_statistics): Constify.
12188         * break-catch-throw.c (catch_exception_command_1):
12189         * breakpoint.c (struct ep_type_description::description):
12190         Constify.
12191         (add_solib_catchpoint): Constify.
12192         (catch_fork_command_1): Add cast.
12193         (add_catch_command): Constify.
12194         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12195         Constify.
12196         * bsd-uthread.c (bsd_uthread_state): Constify.
12197         * buildsym.c (patch_subfile_names): Constify.
12198         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12199         Constify.
12200         * c-exp.y (yyerror): Constify.
12201         (token::oper): Constify.
12202         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12203         * c-varobj.c (cplus_describe_child): Constify.
12204         * charset.c (find_charset_names): Add cast.
12205         (find_charset_names): Constify array and add const_cast.
12206         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12207         (edit_command): Constify.
12208         * cli/cli-decode.c (lookup_cmd): Constify.
12209         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12210         Constify.
12211         (struct dump_context): Constify.
12212         (add_dump_command, restore_command): Constify.
12213         * cli/cli-script.c (get_command_line): Constify.
12214         * cli/cli-script.h (get_command_line): Constify.
12215         * cli/cli-utils.c (check_for_argument): Constify.
12216         * cli/cli-utils.h (check_for_argument): Constify.
12217         * coff-pe-read.c (struct read_pe_section_data): Constify.
12218         * command.h (lookup_cmd): Constify.
12219         * common/print-utils.c (decimal2str): Constify.
12220         * completer.c (gdb_print_filename): Constify.
12221         * corefile.c (set_gnutarget): Constify.
12222         * cp-name-parser.y (yyerror): Constify.
12223         * cp-valprint.c (cp_print_class_member): Constify.
12224         * cris-tdep.c (cris_register_name, crisv32_register_name):
12225         Constify.
12226         * d-exp.y (yyerror): Constify.
12227         (struct token::oper): Constify.
12228         * d-lang.h (d_yyerror): Constify.
12229         * dbxread.c (struct header_file_location::name): Constify.
12230         (add_old_header_file, add_new_header_file, last_function_name)
12231         (dbx_next_symbol_text, add_bincl_to_list)
12232         (find_corresponding_bincl_psymtab, set_namestring)
12233         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12234         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12235         * defs.h (command_line_input, print_address_symbolic)
12236         (deprecated_readline_begin_hook): Constify.
12237         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12238         Constify.
12239         * event-top.c (handle_line_of_input): Constify and add cast.
12240         * exceptions.c (catch_errors): Constify.
12241         * exceptions.h (catch_errors): Constify.
12242         * expprint.c (print_subexp_standard, op_string, op_name)
12243         (op_name_standard, dump_raw_expression, dump_raw_expression):
12244         * expression.h (op_name, op_string, dump_raw_expression):
12245         Constify.
12246         * f-exp.y (yyerror): Constify.
12247         (struct token::oper): Constify.
12248         (struct f77_boolean_val::name): Constify.
12249         * f-lang.c (f_word_break_characters): Constify.
12250         * f-lang.h (f_yyerror): Constify.
12251         * fork-child.c (fork_inferior): Add cast.
12252         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12253         (new_variant): Constify.
12254         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12255         * gdbarch.c: Regenerate.
12256         * gdbcore.h (set_gnutarget): Constify.
12257         * go-exp.y (yyerror): Constify.
12258         (token::oper): Constify.
12259         * go-lang.h (go_yyerror): Constify.
12260         * go32-nat.c (go32_sysinfo): Constify.
12261         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12262         * guile/scm-cmd.c (cmdscm_function): Constify.
12263         * guile/scm-param.c (pascm_param_value): Constify.
12264         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12265         (h8300sx_register_name): Constify.
12266         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12267         Constify.
12268         * ia64-tdep.c (ia64_register_names): Constify.
12269         * infcmd.c (construct_inferior_arguments): Constify.
12270         (path_command, attach_post_wait): Constify.
12271         * language.c (show_range_command, show_case_command)
12272         (unk_lang_error): Constify.
12273         * language.h (language_defn::la_error)
12274         (language_defn::la_name_of_this): Constify.
12275         * linespec.c (decode_line_2): Constify.
12276         * linux-thread-db.c (thread_db_err_str): Constify.
12277         * lm32-tdep.c (lm32_register_name): Constify.
12278         * m2-exp.y (yyerror): Constify.
12279         * m2-lang.h (m2_yyerror): Constify.
12280         * m32r-tdep.c (m32r_register_names): Constify and make static.
12281         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12282         * m88k-tdep.c (m88k_register_name): Constify.
12283         * macroexp.c (appendmem): Constify.
12284         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12285         (upgrade_type, parse_external, parse_partial_symbols)
12286         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12287         (new_symbol): Constify.
12288         * memattr.c (mem_info_command): Constify.
12289         * mep-tdep.c (register_name_from_keyword): Constify.
12290         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12291         Constify.
12292         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12293         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12294         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12295         cast.
12296         (mi_execute_async_cli_command): Constify.
12297         * mips-tdep.c (mips_register_name): Constify.
12298         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12299         (am33_register_name, am33_2_register_name)
12300         * moxie-tdep.c (moxie_register_names): Constify.
12301         * nat/linux-osdata.c (osdata_type): Constify fields.
12302         * nto-tdep.c (nto_parse_redirection): Constify.
12303         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12304         (lookup_child_selector): Constify.
12305         (objc_methcall::name): Constify.
12306         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12307         (lookup_struct_typedef): Constify.
12308         * objfiles.c (pc_in_section): Constify.
12309         * objfiles.h (pc_in_section): Constify.
12310         * p-exp.y (struct token::oper): Constify.
12311         (yyerror): Constify.
12312         * p-lang.h (pascal_yyerror): Constify.
12313         * parser-defs.h (op_name_standard): Constify.
12314         (op_print::string): Constify.
12315         (exp_descriptor::op_name): Constify.
12316         * printcmd.c (print_address_symbolic): Constify.
12317         * psymtab.c (print_partial_symbols): Constify.
12318         * python/py-breakpoint.c (stop_func): Constify.
12319         (bppy_get_expression): Constify.
12320         * python/py-cmd.c (cmdpy_completer::name): Constify.
12321         (cmdpy_function): Constify.
12322         * python/py-event.c (evpy_add_attribute)
12323         (gdbpy_initialize_event_generic): Constify.
12324         * python/py-event.h (evpy_add_attribute)
12325         (gdbpy_initialize_event_generic): Constify.
12326         * python/py-evts.c (add_new_registry): Constify.
12327         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12328         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12329         * python/py-inferior.c (get_buffer): Add cast.
12330         * python/py-param.c (parm_constant::name): Constify.
12331         * python/py-unwind.c (fprint_frame_id): Constify.
12332         * python/python.c (gdbpy_parameter_value): Constify.
12333         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12334         * remote.c (memory_packet_config::name): Constify.
12335         (show_packet_config_cmd, remote_write_bytes)
12336         (remote_buffer_add_string):
12337         * reverse.c (exec_reverse_once): Constify.
12338         * rs6000-tdep.c (variant::name, variant::description): Constify.
12339         * rust-exp.y (rustyyerror): Constify.
12340         * rust-lang.c (rust_op_name): Constify.
12341         * rust-lang.h (rustyyerror): Constify.
12342         * serial.h (serial_ops::name): Constify.
12343         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12344         (sh_sh3e_register_name, sh_sh2e_register_name)
12345         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12346         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12347         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12348         (sh_sh4al_dsp_register_name): Constify.
12349         * sh64-tdep.c (sh64_register_name): Constify.
12350         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12351         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12352         * stabsread.c (patch_block_stabs, read_type_number)
12353         (ref_map::stabs, ref_add, process_reference)
12354         (symbol_reference_defined, define_symbol, define_symbol)
12355         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12356         (read_one_struct_field, read_struct_fields, read_baseclasses)
12357         (read_tilde_fields, read_struct_type, read_array_type)
12358         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12359         (read_huge_number, read_range_type, read_args, common_block_start)
12360         (find_name_end): Constify.
12361         * stabsread.h (common_block_start, define_symbol)
12362         (process_one_symbol, symbol_reference_defined, ref_add):
12363         * symfile.c (get_section_index, add_symbol_file_command):
12364         * symfile.h (get_section_index): Constify.
12365         * target-descriptions.c (tdesc_type::name): Constify.
12366         (tdesc_free_type): Add cast.
12367         * target.c (find_default_run_target):
12368         (add_deprecated_target_alias, find_default_run_target)
12369         (target_announce_detach): Constify.
12370         (do_option): Constify.
12371         * target.h (add_deprecated_target_alias): Constify.
12372         * thread.c (print_thread_info_1): Constify.
12373         * top.c (deprecated_readline_begin_hook, command_line_input):
12374         Constify.
12375         (init_main): Add casts.
12376         * top.h (handle_line_of_input): Constify.
12377         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12378         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12379         (tfind_command): Rename to ...
12380         (tfind_command_1): ... this and constify.
12381         (tfind_command): New function.
12382         (tfind_end_command, tfind_start_command): Adjust.
12383         (encode_source_string): Constify.
12384         * tracepoint.h (encode_source_string): Constify.
12385         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12386         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12387         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12388         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12389         * tui/tui-win.c (parse_scrolling_args): Constify.
12390         * tui/tui-windata.c (tui_erase_data_content): Constify.
12391         * tui/tui-windata.h (tui_erase_data_content): Constify.
12392         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12393         * tui/tui.c (tui_enable): Add cast.
12394         * utils.c (defaulted_query): Constify.
12395         (init_page_info): Add cast.
12396         (puts_debug, subset_compare): Constify.
12397         * utils.h (subset_compare): Constify.
12398         * varobj.c (varobj_format_string): Constify.
12399         * varobj.h (varobj_format_string): Constify.
12400         * vax-tdep.c (vax_register_name): Constify.
12401         * windows-nat.c (windows_detach): Constify.
12402         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12403         * xml-support.c (gdb_xml_end_element): Constify.
12404         * xml-tdesc.c (tdesc_start_reg): Constify.
12405         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12406         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12407         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12408
12409 2017-04-05  Pedro Alves  <palves@redhat.com>
12410
12411         * proc-api.c (struct trans): Constify.
12412         (procfs_note): Constify.
12413         * proc-events.c (struct trans, syscall_table):
12414         * proc-flags.c (struct trans): Constify.
12415         * proc-utils.h (procfs_note): Constify.
12416         * proc-why.c (struct trans): Constify.
12417         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12418         (procfs_detach): Constify.
12419         * sol-thread.c (struct string_map): Constify.
12420         (td_err_string, td_state_string): Constify.
12421
12422 2017-04-05  Pedro Alves  <palves@redhat.com>
12423
12424         * proc-api.c (procfs_filename): Don't initialize
12425         procfs_filename.
12426         (prepare_to_trace): Assume procfs_filename is non-NULL.
12427         (_initialize_proc_api): Give procfs_filename a default value here.
12428
12429 2017-04-05  Pedro Alves  <palves@redhat.com>
12430
12431         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12432         'cond_string' parameter.
12433         (extract_exception_regexp): Constify 'string' parameter.
12434         (catch_exception_command_1): Constify.
12435         * breakpoint.c (init_catchpoint)
12436         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12437         parameter.
12438         (ep_parse_optional_if_clause, catch_fork_command_1)
12439         (catch_exec_command_1): Constify.
12440         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12441         parameter.
12442         (ep_parse_optional_if_clause): Constify.
12443         * cli/cli-utils.c (remove_trailing_whitespace)
12444         (check_for_argument): Constify.
12445         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12446         non-const overload.
12447         (check_for_argument): Likewise.
12448
12449 2017-04-05  Pedro Alves  <palves@redhat.com>
12450
12451         * event-top.c (command_line_handler): Add cast to execute_command
12452         call.
12453         * record-btrace.c (cmd_record_btrace_bts_start)
12454         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12455         (cmd_record_btrace_start): Add cast to execute_command call.
12456         * record-full.c (record_full_goto_insn):
12457         * record.c (record_start, record_stop): Add cast to
12458         execute_command_to_string calls.
12459         (cmd_record_start): Add cast to execute_command calls.
12460
12461 2017-04-05  Pedro Alves  <palves@redhat.com>
12462
12463         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12464         static inline function.
12465         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12466         array and use gdb_PyArg_ParseTupleAndKeywords.
12467         * python/py-cmd.c (cmdpy_init): Likewise.
12468         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12469         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12470         (infpy_search_memory): Likewise.
12471         * python/py-objfile.c (objfpy_add_separate_debug_file)
12472         (gdbpy_lookup_objfile): Likewise.
12473         * python/py-symbol.c (gdbpy_lookup_symbol)
12474         (gdbpy_lookup_global_symbol): Likewise.
12475         * python/py-type.c (gdbpy_lookup_type): Likewise.
12476         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12477         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12478         Likewise.
12479
12480 2017-04-05  Pedro Alves  <palves@redhat.com>
12481
12482         * python/python-internal.h (gdb_PyGetSetDef): New type.
12483         * python/py-block.c (block_object_getset)
12484         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12485         * python/py-event.c (event_object_getset)
12486         (finish_breakpoint_object_getset): Likewise.
12487         * python/py-inferior.c (inferior_object_getset): Likewise.
12488         * python/py-infthread.c (thread_object_getset): Likewise.
12489         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12490         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12491         * python/py-objfile.c (objfile_getset): Likewise.
12492         * python/py-progspace.c (pspace_getset): Likewise.
12493         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12494         Likewise.
12495         * python/py-record.c (recpy_record_getset): Likewise.
12496         * python/py-symbol.c (symbol_object_getset): Likewise.
12497         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12498         Likewise.
12499         * python/py-type.c (type_object_getset, field_object_getset):
12500         Likewise.
12501         * python/py-value.c (value_object_getset): Likewise.
12502
12503 2017-04-05  Pedro Alves  <palves@redhat.com>
12504
12505         * python/python-internal.h (gdb_PyObject_CallMethod)
12506         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12507         New functions.
12508         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12509         (PySys_GetObject, PySys_SetPath): New macros.
12510
12511 2017-04-05  Pedro Alves  <palves@redhat.com>
12512
12513         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12514         info_osdata_command.
12515         * osdata.c (info_osdata_command): Rename to ...
12516         (info_osdata): ... this.  Constify 'type' parameter, and remove
12517         the 'from_tty' parameter.  Accept NULL TYPE.
12518         (info_osdata_command): New function.
12519         * osdata.h (info_osdata_command): Remove declaration.
12520         (info_osdata): New declaration.
12521
12522 2017-04-05  Pedro Alves  <palves@redhat.com>
12523
12524         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12525         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12526         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12527         parameter.
12528         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12529         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12530         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12531         parameter.
12532         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12533         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12534         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12535         (mi_cmd_file_list_exec_source_files)
12536         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12537         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12538         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12539         parameter.
12540         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12541         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12542         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12543         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12544         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12545         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12546         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12547         'command' parameter.
12548         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12549         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12550         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12551         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12552         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12553         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12554         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12555         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12556         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12557         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12558         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12559         parameter.
12560         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12561         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12562         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12563         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12564         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12565         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12566         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12567         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12568         (mi_cmd_data_list_changed_registers)
12569         (mi_cmd_data_write_register_values)
12570         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12571         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12572         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12573         (mi_cmd_list_features, mi_cmd_list_target_features)
12574         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12575         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12576         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12577         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12578         (mi_cmd_trace_frame_collected): Constify 'command'
12579         parameter.
12580         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12581         'command' parameter.
12582
12583 2017-04-05  Pedro Alves  <palves@redhat.com>
12584
12585         * ada-lang.c (ada_completer_word_break_characters): Now a const
12586         array.
12587         (ada_get_gdb_completer_word_break_characters): Constify.
12588         * completer.c (gdb_completer_command_word_break_characters)
12589         (gdb_completer_file_name_break_characters)
12590         (gdb_completer_quote_characters): Now const arrays.
12591         (get_gdb_completer_quote_characters): Constify.
12592         (set_rl_completer_word_break_characters): New function.
12593         (set_gdb_completion_word_break_characters)
12594         (complete_line_internal): Use it.
12595         * completer.h (get_gdb_completer_quote_characters): Constify.
12596         (set_rl_completer_word_break_characters): Declare.
12597         * f-lang.c (f_word_break_characters): Constify.
12598         * language.c (default_word_break_characters): Constify.
12599         * language.h (language_defn::la_word_break_characters): Constify.
12600         (default_word_break_characters): Constify.
12601         * top.c (init_main): Use set_rl_completer_word_break_characters.
12602
12603 2017-04-05  Pedro Alves  <palves@redhat.com>
12604
12605         * aix-thread.c (aix_thread_pid_to_str)
12606         (aix_thread_extra_thread_info): Constify.
12607         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12608         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12609         (bsd_uthread_pid_to_str): Constify.
12610         * corelow.c (core_pid_to_str): Constify.
12611         * darwin-nat.c (darwin_pid_to_str): Constify.
12612         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12613         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12614         Constify.
12615         * gnu-nat.c (gnu_pid_to_str): Constify.
12616         * go32-nat.c (go32_pid_to_str): Constify.
12617         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12618         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12619         * inferior.c (inferior_pid_to_str): Constify.
12620         * linux-nat.c (linux_nat_pid_to_str): Constify.
12621         * linux-tdep.c (linux_core_pid_to_str): Constify.
12622         * linux-thread-db.c (thread_db_pid_to_str)
12623         (thread_db_extra_thread_info): Constify.
12624         * nto-tdep.c (nto_extra_thread_info): Constify.
12625         * nto-tdep.h (nto_extra_thread_info): Constify.
12626         * obsd-nat.c (obsd_pid_to_str): Constify.
12627         * procfs.c (procfs_pid_to_str): Constify.
12628         * ravenscar-thread.c (ravenscar_extra_thread_info)
12629         (ravenscar_pid_to_str): Constify.
12630         * remote-sim.c (gdbsim_pid_to_str): Constify.
12631         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12632         Constify.
12633         * sol-thread.c (solaris_pid_to_str): Constify.
12634         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12635         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12636         * target.c (default_pid_to_str, target_pid_to_str)
12637         (normal_pid_to_str, default_pid_to_str): Constify.
12638         * target.h (target_ops::to_pid_to_str)
12639         (target_ops::to_extra_thread_info): Constify.
12640         (target_pid_to_str, normal_pid_to_str): Constify.
12641         * windows-nat.c (windows_pid_to_str): Constify.
12642         * gdbarch.sh (core_pid_to_str): Constify.
12643         * target-delegates.c: Regenerate.
12644         * gdbarch.h, gdbarch.c: Regenerate.
12645
12646 2017-04-05  Pedro Alves  <palves@redhat.com>
12647
12648         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12649         the memory of the temporary warning_pre_print override.
12650         * utils.c (warning_pre_print): Constify.
12651         * utils.h (warning_pre_print): Constify.
12652
12653 2017-04-05  Pedro Alves  <palves@redhat.com>
12654
12655         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12656         (shell_command): New function.
12657         (make_command): Use std::string.
12658         (init_cli_cmds): Register shell_command instead of shell_escape.
12659
12660 2017-04-05  Pedro Alves  <palves@redhat.com>
12661
12662         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12663         * tracepoint.c (default_collect): Don't initialize.
12664
12665 2017-04-05  Pedro Alves  <palves@redhat.com>
12666
12667         * macroexp.c (macro_buffer::shared): Now a bool.
12668         (init_buffer): Update.
12669         (init_shared_buffer): Constify 'addr' parameter.
12670         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12671         casts.
12672
12673 2017-04-05  Pedro Alves  <palves@redhat.com>
12674
12675         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12676         * disasm.c (set_disassembler_options): Constify local.
12677         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12678
12679 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12680
12681         PR gdb/21352
12682         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12683         option.
12684
12685 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12686
12687         * frame.c (frame_unwind_register_unsigned): Call
12688         frame_unwind_register_value.
12689
12690 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12691
12692         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12693         Use gdb_test_multiple, and don't match anchor.
12694
12695 2017-04-05  Pedro Alves  <palves@redhat.com>
12696
12697         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12698         (Write After Approval): Remove Simon Marchi.
12699
12700 2017-04-05  Pedro Alves  <palves@redhat.com>
12701
12702         * common/gdb_optional.h (optional::optional): Make constexpr and
12703         initialize m_dummy.
12704
12705 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12706
12707         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12708         (amd64fbsd_jmp_buf_reg_offset): Remove.
12709         (amd64fbsd_supply_uthread): Remove function.
12710         (amd64fbsd_collect_uthread): Remove function.
12711         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12712         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12713         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12714         (fbsd-nat.c): Update comment.
12715         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12716         (i386fbsd_jmp_buf_reg_offset): Remove.
12717         (i386fbsd_supply_uthread): Remove function.
12718         (i386fbsd_collect_uthread): Remove function.
12719         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12720
12721 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12722
12723         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12724         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12725         * NEWS: Mention that support for FreeBSD/alpha was removed.
12726         * alpha-fbsd-tdep.c: Delete file.
12727         * config/alpha/fbsd.mh: Delete file.
12728         * configure.host: Delete alpha*-*-freebsd* and
12729         alpha*-*-kfreebsd*-gnu.
12730         * configure.tgt: Delete alpha*-*-freebsd* and
12731         alpha*-*-kfreebsd*-gnu.
12732
12733 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12734
12735         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12736         amd64bsd_store_inferior_registers): Use ptid from regcache.
12737
12738 2017-04-04  Pedro Alves  <palves@redhat.com>
12739
12740         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12741         data fields, make them private and add "m_" prefixes.
12742         (lnp_state_machine::lnp_state_machine): New ctor.
12743         (record_line, check_line_address, handle_set_discriminator)
12744         (handle_set_address, handle_advance_pc, handle_special_opcode)
12745         (handle_advance_line, handle_set_file, handle_negate_stmt)
12746         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12747         (end_sequence, advance_line): New methods.
12748         (m_gdbarch, m_record_lines_p): New fields.
12749         (lnp_reader_state): Delete.
12750         (dwarf_record_line): Rename to ...
12751         (lnp_state_machine::record_line): ... adjust.
12752         (init_lnp_state_machine): Delete.
12753         (lnp_state_machine::lnp_state_machine): New.
12754         (check_line_address): Rename to ...
12755         (lnp_state_machine::check_line_address): This.
12756         (dwarf_decode_lines_1): Remove reference to "reader_state".
12757         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12758         State machine internal state manipulation moved to
12759         lnp_state_machine methods.
12760
12761 2017-04-04  Pedro Alves  <palves@redhat.com>
12762
12763         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12764         unittests/offset-type-selftests.c.
12765         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12766         * common/offset-type.h: New file.
12767         * common/preprocessor.h: New file.
12768         * common/traits.h: New file.
12769         * common/valid-expr.h: New file.
12770         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12771         sect_offset and cu_offset strong typedefs throughout.
12772         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12773         typedefs throughout.
12774         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12775         sect_offset and cu_offset strong typedefs throughout.
12776         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12777         typedefs throughout.
12778         * gdbtypes.h: Include "common/offset-type.h".
12779         (cu_offset): Now an offset type (strong typedef) instead of a
12780         struct.
12781         (sect_offset): Likewise.
12782         (union call_site_parameter_u): Rename "param_offset" field to
12783         "param_cu_off".
12784         * unittests/offset-type-selftests.c: New file.
12785
12786 2017-04-04  Pedro Alves  <palves@redhat.com>
12787
12788         * common/underlying.h: New file.
12789         * dwarf2read.c: Include "common/gdb_optional.h" and
12790         "common/underlying.h".
12791         (dir_index, file_name_index): New types.
12792         (file_entry): Use them.
12793         (file_entry::include): Use to_underlying.
12794         (line_header::add_file_name): Use dir_index.
12795         (read_formatted_entries): Use gdb::optional.  Read form before
12796         writting to file_entry.
12797         (dwarf_decode_line_header): Use dir_index.
12798         (lnp_state_machine::current_file): Use to_underlying.
12799         (lnp_state_machine::file): Change type to file_name_index.
12800         (dwarf_record_line): Use to_underlying.
12801         (init_lnp_state_machine): Use file_name_index.
12802         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12803
12804 2017-04-04  Pedro Alves  <palves@redhat.com>
12805
12806         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12807         operator bool, has_value and get methods.
12808
12809 2017-04-04  Pedro Alves  <palves@redhat.com>
12810
12811         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12812         fields.
12813         (line_header): Initialize all data fields.  Change type of
12814         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12815         Change type of include_dirs to std::vector<const char *>.  Remove
12816         num_include_dirs, include_dirs_size.  Change type of file_names to
12817         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12818         (line_header::line_header): New.
12819         (line_header::add_include_dir, line_header::add_file_name): New
12820         methods.
12821         (line_header::include_dir_at): Remove NULL check.
12822         (line_header::file_name_at): Add const overload.
12823         (line_header_up): New unique_ptr typedef.
12824         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12825         std::vector.  Remove free_line_header call.
12826         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12827         free_line_header call.
12828         (free_cu_line_header): Delete.
12829         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12830         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12831         Adjust to use std::vector.
12832         (free_line_header): Delete.
12833         (free_line_header_voidp): Use delete.
12834         (add_include_dir): Replace with ...
12835         (line_header::add_include_dir): ... this method.  Use std::vector.
12836         (add_file_name): Replace with ...
12837         (line_header::add_file_name): ... this method.  Use std::vector.
12838         (add_include_dir_stub): Delete.
12839         (read_formatted_entries): Remove memset.
12840         (dwarf_decode_line_header): Return a line_header_up instead of a
12841         raw pointer.  Remove cleanup handling.  Pass lambdas to
12842         read_formatted_entries.  Adjust to use line_header methods.
12843         (dwarf_decode_lines_1): Adjust to use line_header methods.
12844         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12845         use std::vector.
12846
12847 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12848
12849         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12850         instead of struct ptid.
12851
12852 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12853
12854         * frame.c (get_frame_register_bytes): Unwind using value.
12855         (put_frame_register_bytes): Likewise.
12856
12857 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12858
12859         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12860         aggregate-like.
12861
12862 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12863
12864         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12865
12866 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12867
12868         * gdbthread.h (struct thread_info): Declare constructor and
12869         destructor.  Add some in-class member initializers.
12870         * thread.c (free_thread): Remove.
12871         (init_thread_list): Call delete instead of free_thread.
12872         (new_thread): Call thread_info constructor.
12873         (thread_info::thread_info): New function.
12874         (thread_info::~thread_info): New function.
12875         (delete_thread_1): Call delete instead of free_thread.
12876         (make_cleanup_restore_current_thread): Move tp and frame to
12877         inner block.
12878
12879 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12880
12881         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12882         (arc_skip_prologue): Likewise.
12883         (arc_make_frame_cache): Likewise.
12884         (arc_pv_get_operand): New function.
12885         (arc_is_in_prologue): Likewise.
12886         (arc_analyze_prologue): Likewise.
12887         (arc_print_frame_cache): Likewise.
12888         (MAX_PROLOGUE_LENGTH): New constant.
12889
12890 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12891
12892         * configure.tgt: Add arc-insn.o.
12893         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12894         (dump_arc_instruction_command): New function.
12895         (arc_fprintf_disasm): Likewise.
12896         (arc_disassemble_info): Likewise.
12897         (arc_insn_get_operand_value): Likewise.
12898         (arc_insn_get_operand_value_signed): Likewise.
12899         (arc_insn_get_memory_base_reg): Likewise.
12900         (arc_insn_get_memory_offset): Likewise.
12901         (arc_insn_get_branch_target): Likewise.
12902         (arc_insn_dump): Likewise.
12903         (arc_insn_get_linear_next_pc): Likewise.
12904         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12905         (arc_disassemble_info): Likewise.
12906         (arc_insn_get_branch_target): Likewise.
12907         (arc_insn_get_linear_next_pc): Likewise.
12908         * NEWS: Mention new "maint print arc arc-instruction".
12909
12910 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12911
12912         * arc-tdep (maintenance_print_arc_list): New variable.
12913         (maintenance_print_arc_command): New function.
12914
12915 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12916
12917         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12918         Add "limm" and "reserved".
12919         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12920         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12921         * arc-tdep.h (arc_regnum): Likewise.
12922
12923 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12924
12925         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12926         for THREADPTR register.
12927         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12928         register.
12929         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12930         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12931         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12932
12933 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12934
12935         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12936         registers above gdbarch_num_regs (gdbarch) as privileged in
12937         call0 ABI.
12938
12939 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12940
12941         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12942         for a single specified register or for all registers in
12943         a0_base..a0_base + C0_NREGS range.
12944         (supply_gregset_reg): Call regcache_raw_supply for a single
12945         specified register or for all registers in a0_base..a0_base +
12946         C0_NREGS range.
12947
12948 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12949
12950         * arch/xtensa.h (C0_NREGS): Add definition.
12951         * xtensa-tdep.c (C0_NREGS): Remove definition.
12952
12953 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12954
12955         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12956         Drop xtensa_default_isa initialization.
12957         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12958
12959 2017-03-27  Pedro Alves  <palves@redhat.com>
12960
12961         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12962         (file_entry::include_dir): New method.
12963         (line_header::include_dir_at, line_header::file_name_at): New
12964         methods.
12965         (setup_type_unit_groups, setup_type_unit_groups)
12966         (psymtab_include_file_name): Simplify using the new methods.
12967         (lnp_state_machine) <the_line_header>: New field.
12968         <file>: Add comment.
12969         (lnp_state_machine::current_file): New method.
12970         (dwarf_record_line): Simplify using the new methods.
12971         (init_lnp_state_machine): Initialize the "the_line_header" field.
12972         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12973         Simplify using the new methods.
12974
12975 2017-03-27  Pedro Alves  <palves@redhat.com>
12976
12977         * cp-name-parser.y (make_empty): Delete.
12978         (demangler_special, nested_name, ptr_operator, array_indicator)
12979         (direct_declarator, declarator_1): Use fill_comp instead of
12980         make_empty.
12981
12982 2017-03-27  Pedro Alves  <palves@redhat.com>
12983
12984         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12985         to ATTRIBUTE_PRINTF.
12986         * solib-target.c (library_list_start_list): Print "string" not
12987         "version".
12988         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12989         gdb_xml_error call.
12990
12991 2017-03-27  Pedro Alves  <palves@redhat.com>
12992
12993         * dwarf2read.c (struct file_and_directory): New.
12994         (dwarf2_get_dwz_file): Adjust to use std::string.
12995         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12996         (find_file_and_directory): Adjust to return a file_and_directory
12997         object.
12998         (read_file_scope): Adjust to use file_and_directory.  Remove
12999         make_cleanup/do_cleanups calls.
13000         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13001         make_cleanup/do_cleanups calls.
13002         * python/python.c (do_start_initialization): Adjust to ldirname
13003         returning a std::string.
13004         * utils.c (ldirname): Now returns a std::string.
13005         * utils.h (ldirname): Change return type to std::string.
13006         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13007         returning a std::string.
13008         * xml-tdesc.c (file_read_description_xml): Likewise.
13009
13010 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13011
13012         * regcache.c (regcache_debug_print_register): New function.
13013         * regcache.h (regcache_debug_print_register): New declaration.
13014         * target.c (debug_print_register): Remove.
13015         (target_fetch_registers): Call regcache_debug_print_register.
13016         (target_store_registers): Likewise.
13017
13018 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13019
13020         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13021         reference beyond the 'lh->include_dirs' array before accessing to
13022         it.
13023         (psymtab_include_file_name): Likewise.
13024         (dwarf_decode_lines_1): Likewise.
13025         (dwarf_decode_lines): Likewise.
13026         (file_file_name): Likewise.
13027
13028 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13029
13030         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13031         inferior_ptid.
13032         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13033         ps_lsetfpregs): Likewise.
13034         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13035         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13036         ps_lsetfpregs): Likewise.
13037         * target.c (target_fetch_registers, target_store_registers):
13038         Remove asserts.
13039
13040 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13041
13042         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13043
13044 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13045
13046         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13047         (_initialize_aarch64_tdep): Register it.
13048         (aarch64_record_load_store): Handle PRFM instruction.
13049         (aarch64_process_record_test): New function.
13050
13051 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13052
13053         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13054         indentation.
13055
13056 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13057
13058         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13059
13060 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13061
13062         python/python.c (do_start_initialization): Fix memory leak.
13063
13064 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13065
13066         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13067         using get_ptrace_pid.
13068         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13069         inferior_ptid.
13070         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13071         inferior_ptid instead of pid.
13072
13073 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13074
13075         * aarch64-tdep.c: Wrap locally used classes in anonymous
13076         namespace.
13077         * arm-tdep.c: Likewise.
13078         * linespec.c: Likewise.
13079         * ui-out.c: Likewise.
13080
13081 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13082
13083         PR gdb/19637
13084         * python/lib/gdb/printer/bound_registers.py: Import sys.
13085
13086 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13087
13088         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13089         windows_thread_info parameter and use it instead of
13090         current_thread.
13091         (windows_fetch_inferior_registers): Don't set current_thread,
13092         pass the thread to do_windows_fetch_inferior_registers.  Use
13093         ptid from regcache instead of inferior_ptid.
13094         (do_windows_store_inferior_registers): Add windows_thread_info
13095         parameter and use it instead of current_thread.
13096         (windows_store_inferior_registers): Don't set current_thread,
13097         pass the thread to do_windows_store_inferior_registers.  Use
13098         ptid from regcache instead of inferior_ptid.
13099
13100 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13101
13102         * ser-mingw.c (ser_windows_raw): Remove reference to
13103         struct serial::current_timeout.
13104
13105 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13106
13107         PR tdep/20928
13108         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13109         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13110         (sparc64_fsr_type): Fix %fsr decoding.
13111
13112 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13113
13114         * python/py-record-btrace.c (btpy_insn_data): Change return type
13115         for Python 2.
13116
13117 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13118
13119         * spu-linux-nat.c (spu_fetch_inferior_registers,
13120         spu_store_inferior_registers): Use ptid from regcache, set and
13121         restore inferior_ptid.
13122         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13123         Likewise.
13124
13125 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13126
13127         * i386-linux-nat.c (fetch_register, store_register,
13128         i386_linux_fetch_inferior_registers,
13129         i386_linux_store_inferior_registers): Use ptid from regcache.
13130         * ia64-linux-nat.c (ia64_linux_fetch_register,
13131         ia64_linux_store_register): Likewise.
13132         * inf-ptrace.c (inf_ptrace_fetch_register,
13133         inf_ptrace_store_register): Likewise.
13134         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13135         m32r_linux_store_inferior_registers): Likewise.
13136         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13137         m68kbsd_store_inferior_registers): Likewise.
13138         * m68k-linux-nat.c (fetch_register, store_register,
13139         m68k_linux_fetch_inferior_registers,
13140         m68k_linux_store_inferior_registers): Likewise.
13141         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13142         m88kbsd_store_inferior_registers): Likewise.
13143         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13144         mips_fbsd_store_inferior_registers): Likewise.
13145         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13146         mips64_linux_regsets_store_registers): Likewise.
13147         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13148         mipsnbsd_store_inferior_registers): Likewise.
13149         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13150         mips64obsd_store_inferior_registers): Likewise.
13151         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13152         Likewise.
13153         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13154         ppcfbsd_store_inferior_registers): Likewise.
13155         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13156         ppc_linux_store_inferior_registers): Likewise.
13157         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13158         ppcnbsd_store_inferior_registers): Likewise.
13159         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13160         ppcobsd_store_registers): Likewise.
13161         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13162         Likewise.
13163         * ravenscar-thread.c (ravenscar_fetch_registers,
13164         ravenscar_store_registers, ravenscar_prepare_to_store):
13165         Likewise.
13166         * record-btrace.c (record_btrace_fetch_registers,
13167         record_btrace_store_registers, record_btrace_prepare_to_store):
13168         Likewise.
13169         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13170         Lookup inferior using ptid from regcache, instead of
13171         current_inferior.
13172         * remote.c (remote_fetch_registers, remote_store_registers): Use
13173         ptid from regcache.
13174         * rs6000-nat.c (fetch_register, store_register): Likewise.
13175         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13176         s390_linux_store_inferior_registers): Likewise.
13177         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13178         shnbsd_store_inferior_registers): Likewise.
13179         * sol-thread.c (sol_thread_fetch_registers,
13180         sol_thread_store_registers): Likewise.
13181         * sparc-nat.c (sparc_fetch_inferior_registers,
13182         sparc_store_inferior_registers): Likewise.
13183         * tilegx-linux-nat.c (fetch_inferior_registers,
13184         store_inferior_registers): Likewise.
13185         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13186         vaxbsd_store_inferior_registers): Likewise.
13187         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13188         store_xtregs): Likewise.
13189
13190 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13191
13192         PR gdb/14441
13193         * NEWS: Mention support for rvalue references in GDB and python.
13194         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13195         supports both lvalue and rvalue references.
13196
13197 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13198
13199         PR gdb/14441
13200         * gdbtypes.c (rank_one_type): Implement overloading
13201         resolution rules regarding rvalue references.
13202
13203 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13204
13205         PR gdb/14441
13206         * aarch64-tdep.c (aarch64_type_align)
13207         (aarch64_extract_return_value, aarch64_store_return_value): Change
13208         lvalue reference type checks to general reference type checks.
13209         * amd64-tdep.c (amd64_classify): Likewise.
13210         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13211         Likewise.
13212         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13213         (arm_store_return_value): Likewise.
13214         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13215         * c-typeprint.c (c_print_type): Likewise.
13216         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13217         (cplus_number_of_children, cplus_describe_child): Likewise.
13218         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13219         * completer.c (expression_completer): Likewise.
13220         * cp-support.c (make_symbol_overload_list_adl_namespace):
13221         Likewise.
13222         * darwin-nat-info.c (info_mach_region_command): Likewise.
13223         * dwarf2loc.c (entry_data_value_coerce_ref)
13224         (value_of_dwarf_reg_entry): Likewise.
13225         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13226         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13227         Likewise.
13228         * findvar.c (extract_typed_address, store_typed_address):
13229         Likewise.
13230         * gdbtypes.c (rank_one_type): Likewise.
13231         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13232         * infcall.c (value_arg_coerce): Likewise.
13233         * language.c (pointer_type): Likewise.
13234         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13235         Likewise.
13236         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13237         * mn10300-tdep.c (mn10300_type_align): Likewise.
13238         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13239         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13240         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13241         Likewise.
13242         * printcmd.c (print_formatted, x_command): Likewise.
13243         * python/py-type.c (typy_get_composite, typy_template_argument):
13244         Likewise.
13245         * python/py-value.c (valpy_referenced_value)
13246         (valpy_get_dynamic_type, value_has_field): Likewise.
13247         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13248         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13249         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13250         * spu-tdep.c (spu_scalar_value_p): Likewise.
13251         * symtab.c (lookup_symbol_aux): Likewise.
13252         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13253         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13254         Likewise.
13255         * valops.c (value_cast_pointers, value_cast)
13256         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13257         (value_struct_elt, value_struct_elt_bitpos)
13258         (value_find_oload_method_list, find_overload_match)
13259         (value_rtti_indirect_type): Likewise.
13260         * valprint.c (val_print_scalar_type_p, generic_val_print):
13261         Likewise.
13262         * value.c (value_actual_type, value_as_address, unpack_long)
13263         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13264         (coerce_ref): Likewise.
13265         * varobj.c (varobj_get_value_type): Likewise.
13266
13267 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13268
13269         PR gdb/14441
13270         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13271         table of constants.
13272         * python/lib/gdb/command/explore.py: Support exploring values
13273         of rvalue reference types.
13274         * python/lib/gdb/types.py: Implement get_basic_type() for
13275         rvalue reference types.
13276         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13277         constant.
13278         * python/py-value.c (valpy_getitem): Add an rvalue reference
13279         check.
13280         (valpy_reference_value): Add new parameter "refcode".
13281         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13282         New wrappers for valpy_reference_value().
13283         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13284         (gdbpy_invoke_xmethod): Likewise.
13285
13286 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13287
13288         PR gdb/14441
13289         * dwarf2read.c (process_die, read_type_die_1): Handle the
13290         DW_TAG_rvalue_reference_type DIE.
13291         (read_tag_reference_type): Add new parameter "refcode".
13292
13293 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13294
13295         PR gdb/14441
13296         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13297         (c_type_print_modifier, c_type_print_varspec_suffix)
13298         (c_type_print_base): Support printing rvalue reference types.
13299         * c-valprint.c (c_val_print, c_value_print): Support printing
13300         rvalue reference values.
13301
13302 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13303
13304         PR gdb/14441
13305         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13306         typename.
13307         * cp-support.c (replace_typedefs): Handle
13308         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13309         * python/py-type.c (typy_lookup_type): Likewise.
13310
13311 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13312
13313         PR gdb/14441
13314         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13315         * parse.c (insert_type): Change assert statement.
13316         (follow_types): Handle rvalue reference types.
13317         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13318         constant.
13319
13320 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13321
13322         PR gdb/14441
13323         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13324         value_ref() interface.
13325         * c-valprint.c (c_value_print): Likewise.
13326         * infcall.c (value_arg_coerce): Likewise.
13327         * python/py-value.c (valpy_reference_value): Likewise.
13328         * valops.c (value_cast, value_reinterpret_cast)
13329         (value_dynamic_cast, typecmp): Likewise.
13330         (value_ref): Parameterize by kind of return value reference type.
13331         * value.h (value_ref): Add new parameter "refcode".
13332
13333 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13334
13335         PR gdb/14441
13336         * dwarf2read.c (read_tag_reference_type): Use
13337         lookup_lvalue_reference_type() instead of lookup_reference_type().
13338         * eval.c (evaluate_subexp_standard): Likewise.
13339         * f-exp.y: Likewise.
13340         * gdbtypes.c (make_reference_type, lookup_reference_type):
13341         Generalize with rvalue reference types.
13342         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13343         convenience wrappers for lookup_reference_type().
13344         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13345         reference kind parameter.
13346         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13347         wrappers for lookup_reference_type().
13348         * guile/scm-type.c (gdbscm_type_reference): Use
13349         lookup_lvalue_reference_type() instead of lookup_reference_type().
13350         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13351         * parse.c (follow_types): Likewise.
13352         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13353         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13354         Likewise.
13355         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13356         (gdbpy_invoke_xmethod): Likewise.
13357         * stabsread.c: Provide extra argument to make_reference_type()
13358         call.
13359         * valops.c (value_ref, value_rtti_indirect_type): Use
13360         lookup_lvalue_reference_type() instead of lookup_reference_type().
13361
13362 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13363
13364         PR gdb/14441
13365         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13366         (TYPE_IS_REFERENCE): New macro.
13367         (struct type): Add rvalue_reference_type field.
13368         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13369
13370 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13371
13372         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13373         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13374         New function definition.
13375         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13376         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13377         New function declaration.
13378         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13379         * mi/mi-interp.h: New file.
13380         * solib.c (info_sharedlibrary_command): Replace for loop with
13381         ALL_SO_LIBS macro
13382         * solib.h (update_solib_list): New function declaration.
13383         (so_list_head): Move macro.
13384         * solist.h (ALL_SO_LIBS): New macro.
13385
13386 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13387
13388         * infcmd.c (post_create_inferior): Remove unused argument in
13389         call to solib_add.
13390         * remote.c (remote_start_remote): Likewise.
13391         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13392         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13393         (enable_break): Likewise.
13394         * solib.c (update_solib_list): Remove unused target argument
13395         and its documentation.
13396         (solib_add): Remove unused target argument.  Remove unused
13397         argument in call to update_solib_list.
13398         (info_sharedlibrary_command): Remove unused argument in call
13399         to update_solib_list.
13400         (sharedlibrary_command): Remove unused argument in call to
13401         solib_add.
13402         (handle_solib_event): Likewise.
13403         (reload_shared_libraries): Likewise.
13404         * solib.h (solib_add): Remove unused target argument.
13405
13406 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13407
13408         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13409         (s390_displaced_step_fixup): Cover relative branches with the
13410         default fixup handling.  This fixes lack of support for some
13411         relative branch instructions.
13412
13413 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13414
13415         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13416         ptid from regcache.
13417
13418 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13419
13420         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13421         i386_darwin_store_inferior_registers): Use ptid from regcache.
13422
13423 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13424
13425         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13426         i386bsd_store_inferior_registers): Use ptid from regcache.
13427
13428 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13429
13430         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13431         hppaobsd_store_registers): Use ptid from regcache.
13432
13433 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13434
13435         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13436         hppanbsd_store_registers): Use ptid from regcache.
13437
13438 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13439
13440         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13441         from regcache.  Use get_ptrace_pid.
13442
13443 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13444
13445         * corelow.c (get_core_register_section): Use ptid from regcache,
13446         update doc.
13447
13448 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13449
13450         * bsd-uthread.c (bsd_uthread_fetch_registers,
13451         bsd_uthread_store_registers): Use ptid from regcache, set and
13452         restore inferior_ptid.
13453
13454 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13455
13456         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13457         fetch_fp_regs, store_register, store_regs, store_fp_register,
13458         store_fp_regs): Use ptid from regcache.
13459
13460 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13461
13462         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13463         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13464         store_vfp_regs): Use ptid from regcache.
13465
13466 2017-03-17  Pedro Alves  <palves@redhat.com>
13467
13468         PR remote/21188
13469         * ser-base.c (ser_base_wait_for): Add comment.
13470         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13471         version.
13472         * ser-unix.c (hardwire_raw): Remove reference to
13473         scb->current_timeout.
13474         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13475         (hardwire_ops): Install ser_base_readchar instead of
13476         hardwire_readchar.
13477         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13478         Remove fields.
13479
13480 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13481
13482         PR gdb/19637
13483         * python/lib/gdb/printer/bound_registers.py: Add support for
13484         Python 3.
13485
13486 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13487
13488         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13489         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13490         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13491         byte_offset to subobj_byte_offset.  Fix the handling of
13492         DWARF_VALUE_STACK on big-endian targets when coming via an
13493         implicit pointer.
13494         (dwarf2_evaluate_loc_desc): Adjust call to
13495         dwarf2_evaluate_loc_desc_full.
13496         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13497         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13498
13499 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13500
13501         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13502         and REVSH instructions.
13503
13504 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13505
13506         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13507         (arm_record_test): Declare.
13508         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13509         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13510         align with the manual.
13511         (thumb_record_misc): Adjust the code order to align with the
13512         manual.
13513         (thumb2_record_decode_insn_handler): Fix instruction matching.
13514         (instruction_reader_thumb): New class.
13515         (arm_record_test): New function.
13516
13517 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13518
13519         * arm-tdep.c (abstract_memory_reader): New class.
13520         (instruction_reader): New class.
13521         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13522         (decode_insn): Likewise.
13523
13524 2017-03-16  Doug Evans  <dje@google.com>
13525
13526         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13527         member.  Change type of TYPE member to SCM.  All uses updated.
13528         (lsscm_make_lazy_string_smob): Add assert.
13529         (lsscm_make_lazy_string): Flag bad length values.
13530         (lsscm_elt_type): New function.
13531         (gdbscm_lazy_string_to_value): Rewrite to use
13532         lsscm_safe_lazy_string_to_value.
13533         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13534         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13535         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13536         in incoming type.
13537         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13538         * guile/scm-type.c (tyscm_scm_to_type): New function.
13539
13540 2017-03-15  Doug Evans  <dje@google.com>
13541
13542         PR python/17728, python/18439, python/18779
13543         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13544         member.  Change type of TYPE member to PyObject *.  All uses updated.
13545         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13546         (gdbpy_create_lazy_string_object): Flag bad length values.
13547         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13548         Handle typedefs in incoming type.
13549         (stpy_lazy_string_elt_type): New function.
13550         (gdbpy_extract_lazy_string): Call it.
13551         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13552         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13553         typedefs in incoming type.
13554
13555 2017-03-16  Doug Evans  <dje@google.com>
13556
13557         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13558         * guile/scm-type.c (tyscm_scm_to_type): New function.
13559
13560 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13561
13562         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13563         "ULONGEST" for "skip".
13564
13565 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13566
13567         PR gdb/21220
13568         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13569         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13570         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13571         over ptrace peek/poke until end of buffer or error.
13572
13573 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13574
13575         * parse.c (length_of_subexp): Make static.
13576         * parser-defs.h (length_of_subexp): Remove.
13577
13578 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13579
13580         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13581         as well.
13582
13583 2017-03-14  Pedro Alves  <palves@redhat.com>
13584
13585         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13586         (main): Use std::unique_ptr.  Remove calls to
13587         cp_demangled_name_parse_free.
13588
13589 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13590
13591         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13592         alphabsd_store_inferior_registers): Use regcache->ptid instead
13593         of inferior_ptid.
13594
13595 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13596
13597         * aix-thread.c (aix_thread_fetch_registers,
13598         aix_thread_store_registers): Use regcache->ptid instead of
13599         inferior_ptid.
13600
13601 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13602
13603         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13604         store_gregs_to_thread, fetch_fpregs_from_thread,
13605         store_fpregs_to_thread): Use regcache->ptid instead of
13606         inferior_ptid.
13607
13608 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13609
13610         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13611         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13612         instead of inferior_ptid.
13613
13614 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13615
13616         * target.c (target_fetch_registers, target_store_registers): Add
13617         assert.
13618
13619 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13620
13621         * regcache.h (regcache_get_ptid): New function.
13622         * regcache.c (regcache_get_ptid): New function.
13623
13624 2017-03-13  Mark Wielaard  <mark@klomp.org>
13625
13626         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13627
13628 2017-03-10  Keith Seitz  <keiths@redhat.com>
13629
13630         PR c++/8218
13631         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13632
13633 2017-03-08  Pedro Alves  <palves@redhat.com>
13634
13635         PR gdb/18360
13636         * infrun.c (start_step_over, do_target_resume, resume)
13637         (restart_threads): Assert we're not resuming a thread that is
13638         meant to be stopped.
13639         (infrun_thread_stop_requested_callback): Delete.
13640         (infrun_thread_stop_requested): If the thread is internally
13641         stopped, queue a pending stop event and clear the thread's
13642         inline-frame state.
13643         (handle_stop_requested): New function.
13644         (handle_syscall_event, handle_inferior_event_1): Use
13645         handle_stop_requested.
13646         (handle_stop_requested): New function.
13647         (handle_signal_stop): Set the thread's stop_signal here instead of
13648         at caller.
13649         (finish_step_over): Clear step over info unconditionally.
13650         (handle_signal_stop): If the user had interrupted the event
13651         thread, consider the stop a random signal.
13652         (handle_signal_stop) <signal arrived while stepping over
13653         breakpoint>: Don't restart threads here.
13654         (stop_waiting): Don't clear step-over info here.
13655
13656 2017-03-08  Pedro Alves  <palves@redhat.com>
13657
13658         PR 21206
13659         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13660         goes to argument 2, not 1.
13661
13662 2017-03-08  Pedro Alves  <palves@redhat.com>
13663
13664         PR cli/21218
13665         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13666         display_gdb_prompt.
13667         (command_line_input): Add comment.
13668
13669 2017-03-08  Pedro Alves  <palves@redhat.com>
13670
13671         PR tui/21216
13672         * tui/tui-file.c (tui_file::write): New.
13673         * tui/tui-file.h (tui_file): Override "write".
13674         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13675         factored out from ...
13676         (tui_puts): ... here.
13677         (tui_putc): Use them.
13678         (tui_write): New function.
13679         * tui/tui-io.h (tui_write): Declare.
13680
13681 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13682
13683         * Makefile.in (SFILES): Replace "environ.c" with
13684         "common/environ.c".
13685         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13686         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13687         to...
13688         * common/environ.c: ... here.
13689         * environ.h: Moved to...
13690         * common/environ.h: ... here.
13691
13692 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13693
13694         * gdbarch.sh (pstring_ptr): New static function.
13695         (gdbarch_disassembler_options): Use it.
13696         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13697         not valid_disassembler_option->name.
13698         * gdbarch.c: Regenerate.
13699
13700 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13701
13702         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13703
13704 2017-03-07  Pedro Alves  <palves@redhat.com>
13705
13706         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13707
13708 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13709
13710         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13711         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13712         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13713         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13714
13715 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13716
13717         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13718
13719 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13720
13721         * remote.c (remote_add_target_side_commands): Use range-based
13722         for loop.
13723
13724 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13725
13726         PR gdb/21165
13727         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13728         value is lazy.
13729         * valprint.c (common_val_print): Likewise.
13730
13731 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13732
13733         * NEWS: Mention new set/show disassembler-options commands.
13734         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13735         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13736         (prospective_options): New static variable.
13737         (gdb_disassembler::gdb_disassembler): Initialize
13738         m_di.disassembler_options.
13739         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13740         (get_disassembler_options): New function.
13741         (set_disassembler_options): Likewise.
13742         (set_disassembler_options_sfunc): Likewise.
13743         (show_disassembler_options_sfunc): Likewise.
13744         (disassembler_options_completer): Likewise.
13745         (_initialize_disasm): Likewise.
13746         * disasm.h (get_disassembler_options): New prototype.
13747         (set_disassembler_options): Likewise.
13748         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13749         (gdbarch_verify_disassembler_options): Likewise.
13750         * gdbarch.c: Regenerate.
13751         * gdbarch.h: Likewise.
13752         * arm-tdep.c (num_disassembly_options): Delete.
13753         (set_disassembly_style): Likewise.
13754         (arm_disassembler_options): New static variable.
13755         (set_disassembly_style_sfunc): Convert short style name into long
13756         option name.  Call set_disassembler_options.
13757         (show_disassembly_style_sfunc): New function.
13758         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13759         set_gdbarch_verify_disassembler_options.
13760         (_initialize_arm_tdep): Delete regnames variable and update callers.
13761         (arm_disassembler_options): Initialize.
13762         (disasm_options): New variable.
13763         (num_disassembly_options): Rename from this...
13764         (num_disassembly_styles): ...to this.  Compute by scanning through
13765         disasm_options.
13766         (valid_disassembly_styles): Initialize using disasm_options.
13767         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13768         set_arm_regname_option.
13769         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13770         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13771         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13772         set_gdbarch_verify_disassembler_options.
13773         * s390-tdep.c (s390_disassembler_options): New static variable.
13774         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13775         set_gdbarch_verify_disassembler_options.
13776
13777 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13778
13779         * remote.c (remote_add_target_side_condition): Remove "struct"
13780         keyword from range-based for loop.
13781
13782 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13783
13784         * remote.c (remote_add_target_side_condition): Use range-based
13785         for loop.  Update comment.
13786
13787 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13788
13789         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13790
13791 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13792
13793         * regcache.c (regcache_raw_update): New function.
13794         (regcache_raw_read): Move code to regcache_raw_update.
13795         * regcache.h (regcache_raw_update): New declaration.
13796         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13797
13798 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13799
13800         * dwarf2read.c (create_debug_type_hash_table): Initialize
13801         header.signature and header.type_offset_in_tu.
13802
13803 2017-02-24  Pedro Alves  <palves@redhat.com>
13804
13805         * symtab.c (make_file_symbol_completion_list_1): Use
13806         add_symtab_completions.
13807
13808 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13809
13810         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13811
13812 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13813
13814         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13815         I386_MAX_REGISTER_SIZE.
13816         (i386_pseudo_register_write): Likewise.
13817         (i386_process_record): Likewise.
13818         * i387-tdep.c (i387_supply_xsave): Likewise.
13819         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13820         (store_register): Likewise.
13821
13822 2017-02-23  Pedro Alves  <palves@redhat.com>
13823
13824         * ada-lang.c: Include "common/function-view.h".
13825         (ada_iterate_over_symbols): Adjust to use function_view as
13826         callback type.
13827         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13828         (ada_make_symbol_completion_list): Use a lambda.
13829         (ada_exc_search_name_matches): Delete.
13830         (name_matches_regex): New.
13831         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13832         * compile/compile-c-support.c: Include "common/function-view.h".
13833         (print_one_macro): Change prototype to accept a ui_file pointer.
13834         (write_macro_definitions): Use a lambda.
13835         * dwarf2read.c: Include "common/function-view.h".
13836         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13837         (dw2_expand_symtabs_matching): Adjust to use function_view as
13838         callback type.
13839         * language.h: Include "common/function-view.h".
13840         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13841         function_view as callback type.
13842         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13843         * linespec.c: Include "common/function-view.h".
13844         (collect_info::add_symbol): New method.
13845         (struct symbol_and_data_callback, iterate_inline_only, struct
13846         symbol_matcher_data, iterate_name_matcher): Delete.
13847         (iterate_over_all_matching_symtabs): Adjust to use function_view
13848         as callback type and lambdas.
13849         (iterate_over_file_blocks): Adjust to use function_view as
13850         callback type.
13851         (decode_compound_collector): Now a class with private fields.
13852         (decode_compound_collector::release_symbols): New method.
13853         (collect_one_symbol): Rename to...
13854         (decode_compound_collector::operator()): ... this and adjust.
13855         (lookup_prefix_sym): decode_compound_collector construction bits
13856         move to decode_compound_collector ctor.  Pass the
13857         decode_compound_collector object directly as callback.  Remove
13858         cleanups and use decode_compound_collector::release_symbols
13859         instead.
13860         (symtab_collector): Now a class with private fields.
13861         (symtab_collector::release_symtabs): New method.
13862         (add_symtabs_to_list): Rename to...
13863         (symtab_collector::operator()): ... this and adjust.
13864         (collect_symtabs_from_filename): symtab_collector construction
13865         bits move to symtab_collector ctor.  Pass the symtab_collector
13866         object directly as callback.  Remove cleanups and use
13867         symtab_collector::release_symtabs instead.
13868         (collect_symbols): Delete.
13869         (add_matching_symbols_to_info): Use lambdas.
13870         * macrocmd.c (print_macro_callback): Delete.
13871         (info_macro_command): Use a lambda.
13872         (info_macros_command): Pass print_macro_definition as callable
13873         directly.
13874         (print_one_macro): Remove 'ignore' parameter.
13875         (macro_list_command): Adjust.
13876         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13877         (macro_for_each_data::user_data): Delete field.
13878         (foreach_macro): Adjust to call the function_view.
13879         (macro_for_each): Adjust to use function_view as callback type.
13880         (foreach_macro_in_scope): Adjust to call the function_view.
13881         (macro_for_each_in_scope): Adjust to use function_view as callback
13882         type.
13883         * macrotab.h: Include "common/function-view.h".
13884         (macro_callback_fn): Declare a prototype instead of a pointer.
13885         Remove "user_data" parameter.
13886         (macro_for_each, macro_for_each_in_scope): Adjust to use
13887         function_view as callback type.
13888         * psymtab.c (partial_map_expand_apply)
13889         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13890         Adjust to use function_view as callback type and to return bool.
13891         (psym_expand_symtabs_matching): Adjust to use function_view as
13892         callback types.
13893         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13894         to use function_view as callback type and to return bool.
13895         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13896         callback types.
13897         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13898         as callback types.
13899         * symfile.h: Include "common/function-view.h".
13900         (expand_symtabs_file_matcher_ftype)
13901         (expand_symtabs_symbol_matcher_ftype)
13902         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13903         return bool.
13904         (quick_symbol_functions::map_symtabs_matching_filename)
13905         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13906         function_view as callback type and return bool.
13907         (expand_symtabs_matching): Adjust to use function_view as callback
13908         type.
13909         (maintenance_expand_name_matcher)
13910         (maintenance_expand_file_matcher): Delete.
13911         (maintenance_expand_symtabs): Use lambdas.
13912         * symtab.c (iterate_over_some_symtabs): Adjust to use
13913         function_view as callback types and return bool.
13914         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13915         of a cleanup.
13916         (lookup_symtab_callback): Delete.
13917         (lookup_symtab): Use a lambda.
13918         (iterate_over_symbols): Adjust to use function_view as callback
13919         type.
13920         (struct search_symbols_data, search_symbols_file_matches)
13921         (search_symbols_name_matches): Delete.
13922         (search_symbols): Use a pair of lambdas.
13923         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13924         (symtab_expansion_callback): Delete.
13925         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13926         * symtab.h: Include "common/function-view.h".
13927         (iterate_over_some_symtabs): Adjust to use function_view as
13928         callback type and return bool.
13929         (iterate_over_symtabs): Adjust to use function_view as callback
13930         type.
13931         (symbol_found_callback_ftype): Remove 'data' parameter and return
13932         bool.
13933         (iterate_over_symbols): Adjust to use function_view as callback
13934         type.
13935
13936 2017-02-23  Pedro Alves  <palves@redhat.com>
13937
13938         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13939         (%.o) <unittests/%.c>: New pattern.
13940         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13941         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13942         * common/function-view.h: New file.
13943         * unittests/function-view-selftests.c: New file.
13944         * configure: Regenerate.
13945
13946 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13947
13948         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13949         inferior_ptid.
13950         * go32-nat.c (go32_thread_alive): Likewise.
13951
13952 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13953
13954         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13955         delete.
13956
13957 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13958
13959         * varobj.c (varobj_clear_saved_item): Use delete instead of
13960         xfree.
13961         (update_dynamic_varobj_children): Likewise.
13962
13963 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13964
13965         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13966
13967 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13968
13969         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13970         m_enum_value to 0 in default constructor.
13971
13972 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13973
13974         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13975         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13976         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13977         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13978         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13979         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13980         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13981         IS_STORE_CONDITIONAL_INSN.
13982
13983 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13984
13985         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13986
13987 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13988
13989         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13990
13991 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13992
13993         * dwarf2read.c (skip_one_die, read_attribute_value)
13994         (dwarf2_const_value_attr, dump_die_shallow)
13995         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13996         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13997
13998 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13999
14000         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14001         (dwarf_parse_macro_header): Accept DWARF version 5.
14002         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14003
14004 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14005
14006         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14007         DW_AT_GNU_*.
14008         * common/common-exceptions.h (enum errors): Likewise.
14009         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14010         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14011         (dwarf_expr_context::execute_stack_op): Likewise.
14012         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14013         Likewise.
14014         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14015         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14016         (show_entry_values_debug, call_site_to_target_addr)
14017         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14018         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14019         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14020         (value_of_dwarf_block_entry, indirect_pieced_value)
14021         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14022         (disassemble_dwarf_expression): Likewise.
14023         * dwarf2read.c (process_die, inherit_abstract_dies)
14024         (read_call_site_scope): Likewise.
14025         * gdbtypes.h (struct func_type, struct call_site_parameter)
14026         (struct call_site): Likewise.
14027         * stack.c (read_frame_arg): Likewise.
14028         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14029
14030 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14031
14032         * defs.h (read_unsigned_leb128): New declaration.
14033         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14034         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14035         (dwarf2_find_location_expression): Call also
14036         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14037         * dwarf2loc.h (dwarf2_version): New declaration.
14038         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14039         rnglists.
14040         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14041         .debug_rnglists.
14042         (struct dwop_section_names): Add loclists_dwo.
14043         (dwop_section_names): Add .debug_loclists.dwo.
14044         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14045         (struct dwarf2_per_cu_data): Add dwarf_version.
14046         (struct dwo_sections): Add loclists.
14047         (struct attr_abbrev): Add implicit_const.
14048         (read_indirect_line_string): New declaration.
14049         (read_unsigned_leb128): Delete declaration.
14050         (rcuh_kind): New definition.
14051         (read_and_check_comp_unit_head): Change parameter
14052         is_debug_types_section to section_kind.
14053         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14054         (read_comp_unit_head): Change parameter abfd to section, add parameter
14055         section_kind.  Handle DWARF-5.
14056         (error_check_comp_unit_head): Accept also DWARF version 5.
14057         (read_and_check_comp_unit_head): Change parameter
14058         is_debug_types_section to section_kind.
14059         (read_and_check_type_unit_head): Delete function.
14060         (read_abbrev_offset): Handle DWARF-5.
14061         (create_debug_type_hash_table): Add parameter section_kind.  Process
14062         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14063         comp_unit_head.
14064         (create_debug_types_hash_table): Update create_debug_type_hash_table
14065         caller.
14066         (create_all_type_units): Call create_debug_type_hash_table.
14067         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14068         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14069         caller.
14070         (skip_one_die): Handle DW_FORM_implicit_const.
14071         (dwarf2_rnglists_process): New function.
14072         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14073         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14074         (read_attribute_value): Handle DW_FORM_implicit_const,
14075         DW_FORM_line_strp.
14076         (read_attribute): Handle DW_FORM_implicit_const.
14077         (read_indirect_string_at_offset_from): New function from
14078         read_indirect_string_at_offset.
14079         (read_indirect_string_at_offset): Call
14080         read_indirect_string_at_offset_from.
14081         (read_indirect_line_string_at_offset): New function.
14082         (read_indirect_string): New function comment.
14083         (read_indirect_line_string): New function.
14084         (read_unsigned_leb128): Make it global.
14085         (dwarf2_string_attr): Handle DWARF-5.
14086         (add_include_dir_stub, read_formatted_entries): New functions.
14087         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14088         Handle DWARF-5.
14089         (per_cu_header_read_in): Update read_comp_unit_head caller.
14090         (dwarf2_version): New function.
14091         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14092         rnglists.
14093         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14094         fields.
14095
14096 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14097
14098         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14099
14100 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14101
14102         * dwarf2read.c (dwarf2_ranges_process): New function from
14103         dwarf2_ranges_read.
14104         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14105         dwarf2_ranges_process.
14106
14107 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14108
14109         * dwarf2read.c (create_debug_type_hash_table): New function from
14110         create_debug_types_hash_table.
14111         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14112         (create_all_type_units, open_and_init_dwo_file): Update
14113         create_debug_types_hash_table callers.
14114
14115 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14116
14117         PR gdb/16188
14118         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14119         refer to 'ap', not 'args'.
14120
14121 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14122             Pedro Alves  <palves@redhat.com>
14123
14124         PR gdb/16188
14125         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14126         calls succeeded.
14127         * fork-child.c (trace_start_error): New function.
14128         (trace_start_error_with_name): Likewise.
14129         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14130         * inf-ptrace.c (inf_ptrace_me): Likewise.
14131         * inferior.h (trace_start_error): New prototype.
14132         (trace_start_error_with_name): Likewise.
14133
14134 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14135
14136         PR gdb/21164
14137         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14138         NULL before using it.
14139         * symmisc.c (maintenance_print_symbols): Likewise.
14140         (maintenance_print_msymbols): Likewise.
14141
14142 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14143
14144         * NEWS: Add record Python bindings entry.
14145
14146 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14147
14148         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14149         py-record-full.o.
14150         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14151         * python/py-record-btrace.c, python/py-record-btrace.h,
14152         python/py-record-full.c, python/py-record-full.h: New file.
14153         * python/py-record.c: Add include for py-record-btrace.h and
14154         py-record-full.h.
14155         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14156         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14157         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14158         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14159         New definition.
14160         (gdbpy_initialize_btrace): New export.
14161         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14162
14163 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14164
14165         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14166         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14167         * python/py-record.c: New file.
14168         * python/python-internal.h (gdbpy_start_recording,
14169         gdbpy_current_recording, gdpy_stop_recording,
14170         gdbpy_initialize_record): New export.
14171         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14172         (python_GdbMethods): Add gdbpy_start_recording,
14173         gdbpy_current_recording and gdbpy_stop_recording.
14174
14175 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14176
14177         * record-btrace.c (record_btrace_record_method): New function.
14178         (init_record_btrace_ops): Initialize to_record_method.
14179         * record-full.c (record_full_record_method): New function.
14180         (init_record_full_ops, init_record_full_core_ops): Add
14181         record_full_record_method.
14182         * record.h (enum record_method): New enum.
14183         * target-debug.h (target_debug_print_enum_record_method: New define.
14184         * target-delegates.c: Regenerate.
14185         * target.c (target_record_method): New function.
14186         * target.h: Include record.h.
14187         (struct target_ops) <to_record_method>: New field.
14188         (target_record_method): New export.
14189
14190 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14191
14192         * record.h (record_start, record_stop): New export.
14193         * record.c (record_start, record_stop): New function.
14194
14195 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14196
14197         * btrace.c (btrace_fetch): Copy function call segments pointer
14198         into a vector.
14199         (btrace_clear): Clear the vector.
14200         (btrace_find_insn_by_number): Use binary search to find the correct
14201         function call segment.
14202         * btrace.h (brace_fun_p): New typedef.
14203         (struct btrace_thread_info) <functions>: New field.
14204
14205 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14206
14207         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14208         * btrace.c (btrace_decode_error): ... here.  New function.
14209         * btrace.h (btrace_decode_error): New export.
14210
14211 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14212
14213         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14214         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14215         btrace_find_insn_by_number): Remove special case for gaps.
14216         * btrace.h (btrace_insn_get_error): New export.
14217         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14218         * record-btrace.c (btrace_insn_history): Print number for gaps.
14219         (record_btrace_info, record_btrace_goto): Handle gaps.
14220
14221 2017-02-14  Tom Tromey  <tom@tromey.com>
14222
14223         PR python/13598:
14224         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14225         event.
14226         * python/py-evts.c (gdbpy_initialize_py_events): Add
14227         before_prompt registry.
14228         * python/py-events.h (events_object) <before_prompt>: New field.
14229
14230 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14231
14232         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14233
14234 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14235
14236         * symfile (_initialize_symfile): Add usage text to the load command's
14237         help text.
14238
14239 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14240
14241         * utils.c (defaulted_query): Don't query on secondary UIs.
14242
14243 2017-02-10  Tom Tromey  <tom@tromey.com>
14244
14245         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14246
14247 2017-02-10  Tom Tromey  <tom@tromey.com>
14248
14249         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14250         "cleanup" local.
14251         * python/py-type.c (typy_legacy_template_argument): Remove
14252         unnecessary "cleanup" local.
14253
14254 2017-02-10  Tom Tromey  <tom@tromey.com>
14255
14256         * python/python.c (do_start_initialization): New function, from
14257         _initialize_python.
14258         (_initialize_python): Call do_start_initialization.
14259         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14260         goto.
14261
14262 2017-02-10  Tom Tromey  <tom@tromey.com>
14263
14264         * python/py-prettyprint.c (pretty_print_one_value): Use
14265         gdbpy_ref.
14266
14267 2017-02-10  Tom Tromey  <tom@tromey.com>
14268
14269         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14270         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14271         gdbpy_ref.
14272         * python/py-type.c (field_new): Use gdbpy_ref.
14273         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14274         gdbpy_ref.
14275         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14276         (py_free_pspace): Likewise.
14277         (pspace_to_pspace_object): Likewise.
14278         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14279         (py_free_objfile): Likewise.
14280         (objfile_to_objfile_object): Likewise.
14281         * python/py-inferior.c (delete_thread_object): Use
14282         gdbpy_ref.
14283         (infpy_read_memory): Likewise.
14284         (py_free_inferior): Likewise.
14285         * python/py-evtregistry.c (create_eventregistry_object): Use
14286         gdbpy_ref.
14287         * python/py-event.c (create_event_object): Use gdbpy_ref.
14288
14289 2017-02-10  Tom Tromey  <tom@tromey.com>
14290
14291         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14292         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14293         used.
14294         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14295         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14296         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14297         python/py-framefilter.c, python/py-function.c,
14298         python/py-inferior.c, python/py-infevents.c,
14299         python/py-linetable.c, python/py-newobjfileevent.c,
14300         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14301         python/py-signalevent.c, python/py-stopevent.c,
14302         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14303         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14304         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14305         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14306
14307 2017-02-10  Tom Tromey  <tom@tromey.com>
14308
14309         * ui-out.h (ui_out_emit_type): New class.
14310         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14311         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14312         and ui_out_emit_tuple.
14313         (enumerate_locals): Likewise.
14314         (py_mi_print_variables, py_print_locals, py_print_args): Use
14315         ui_out_emit_list.
14316         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14317         ui_out_emit_list.
14318         * common/gdb_optional.h: New file.
14319
14320 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14321
14322         * MAINTAINERS (Write After Approval): Update my e-mail address.
14323
14324 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14325
14326         PR gdb/21122
14327         * breakpoint.c (_initialize_breakpoint): Update the help description
14328         of the 'commands' command to indicate that it takes a list argument.
14329
14330 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14331
14332         * interps.c (current_interp_set_logging): Remove "return".
14333
14334 2017-02-09  Gary Benson  <gbenson@redhat.com>
14335
14336         * symtab.c (add_symtab_completions): Prevent NULL pointer
14337         dereference.
14338
14339 2017-02-08  Pedro Alves  <palves@redhat.com>
14340
14341         * interps.c (interp::interp): Remove reference to quiet_p.
14342         (interp_set): Make static.  Remove dead "Switching to" output
14343         code.
14344         (interp_quiet_p, interp_set_quiet): Delete.
14345         (interpreter_exec_cmd): Don't set the interpreter quiet.
14346         * interps.h (interp_quiet_p): Make static.
14347         (class interp) <quiet_p>: Remove field
14348
14349 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14350
14351         * cli/cli-decode.c (find_command_name_length): Make it extern.
14352         * cli/cli-decode.h (find_command_name_length): Declare.
14353         * cli/cli-script.c (command_name_equals, line_first_arg):
14354         New functions.
14355         (process_next_line): Use cli-decode to parse command names.
14356         (build_command_line): Make args a constant pointer.
14357
14358 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14359
14360         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14361         Remove case-insensitive search.
14362
14363 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14364
14365         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14366         at the end of the line.  Avoids an ARI warning.
14367
14368 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14369
14370         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14371         rdseed instructions.
14372         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14373
14374 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14375
14376         PR tdep/20936
14377         Provide and use sparc32 and sparc64 target description XML files.
14378         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14379         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14380         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14381         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14382         * features/sparc/sparc32-solaris.xml: New file.
14383         * features/sparc/sparc64-solaris.xml: New file.
14384         * features/sparc/sparc32-solaris.c: Generated.
14385         * features/sparc/sparc64-solaris.c: Generated.
14386         * sparc-tdep.h: Account for differences in target descriptions.
14387         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14388         (sparc32_register_type): Use target provided registers.
14389         (validate_tdesc_registers): New function.
14390         (sparc32_gdbarch_init): Use tdesc_has_registers.
14391         Set pseudoregister functions.
14392         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14393         (sparc64_register_type): Use target provided registers.
14394         (sparc64_init_abi): Set pseudoregister functions.
14395
14396 2017-02-03  Tom Tromey  <tom@tromey.com>
14397
14398         PR rust/21097:
14399         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14400         with a single member.
14401
14402 2017-02-03  Pedro Alves  <palves@redhat.com>
14403
14404         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14405         (cli_interp_base::~cli_interp_base): New.
14406         (cli_interp): New struct.
14407         (as_cli_interp): Cast the interp itself to cli_interp.
14408         (cli_interpreter_pre_command_loop): Rename to ...
14409         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14410         parameter.
14411         (cli_interpreter_init): Rename to ...
14412         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14413         boolean.  Make extern.
14414         (cli_interpreter_resume): Rename to ...
14415         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14416         extern.
14417         (cli_interpreter_suspend): Rename to ...
14418         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14419         extern.
14420         (cli_interpreter_exec): Rename to ...
14421         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14422         extern.
14423         (cli_interpreter_supports_command_editing): Rename to ...
14424         (cli_interp_base::supports_command_editing): ... this.  Remove
14425         'interp' parameter.  Make extern.
14426         (cli_ui_out): Rename to ...
14427         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14428         Make extern.
14429         (cli_set_logging): Rename to ...
14430         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14431         parameter.  Make extern.
14432         (cli_interp_procs): Delete.
14433         (cli_interp_factory): Adjust to use "new".
14434         * cli/cli-interp.h: Include "interps.h".
14435         (struct cli_interp_base): New struct.
14436         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14437         (interp_new): Delete.
14438         (interp::interp, interp::~interp): New.
14439         (interp_set): Use bool, and return void.  Assume the interpreter
14440         has suspend, init and resume methods, and that the all return
14441         void.
14442         (set_top_level_interpreter): interp_set returns void.
14443         (interp_ui_out): Adapt.
14444         (current_interp_set_logging): Adapt.
14445         (interp_data): Delete.
14446         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14447         (interp_exec): Adapt.
14448         (top_level_interpreter_data): Delete.
14449         * interps.h (interp_init_ftype, interp_resume_ftype)
14450         (interp_suspend_ftype, interp_exec_ftype)
14451         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14452         (class interp): New.
14453         (interp_new): Delete.
14454         (interp_set): Now returns void.  Use bool.
14455         (interp_data, top_level_interpreter_data): Delete.
14456         * mi/mi-common.h: Include interps.h.
14457         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14458         init, resume, suspect, exec, interp_ui_out, set_logging and
14459         pre_command_loop methods.
14460         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14461         (mi_interpreter_init): Rename to ...
14462         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14463         bool, return void and make extern.  Adjust.
14464         (mi_interpreter_resume): ... Rename to ...
14465         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14466         return void and make extern.  Adjust.
14467         (mi_interpreter_suspend): ... Rename to ...
14468         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14469         return void and make extern.  Adjust.
14470         (mi_interpreter_exec): ... Rename to ...
14471         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14472         extern.  Adjust.
14473         (mi_interpreter_pre_command_loop): ... Rename to ...
14474         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14475         parameter and make extern.
14476         (mi_on_normal_stop_1): Adjust.
14477         (mi_ui_out): Rename to ...
14478         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14479         parameter and make extern.  Adjust.
14480         (mi_set_logging): Rename to ...
14481         (mi_interp::set_logging): ... this.  Remove the 'interp'
14482         parameter and make extern.  Adjust.
14483         (mi_interp_procs): Delete.
14484         (mi_interp_factory): Adjust to use 'new'.
14485         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14486         (mi_print_exception, mi_execute_command, mi_load_progress):
14487         Adjust.
14488         * tui/tui-interp.c (tui_interp): New class.
14489         (as_tui_interp): Return a tui_interp pointer.
14490         (tui_on_normal_stop, tui_on_signal_received)
14491         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14492         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14493         to use interp::interp_ui_out.
14494         (tui_init): Rename to ...
14495         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14496         bool, return void and make extern.  Adjust.
14497         (tui_resume): Rename to ...
14498         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14499         return void and make extern.  Adjust.
14500         (tui_suspend): Rename to ...
14501         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14502         return void and make extern.  Adjust.
14503         (tui_ui_out): Rename to ...
14504         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14505         parameter, and make extern.  Adjust.
14506         (tui_exec): Rename to ...
14507         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14508         make extern.
14509         (tui_interp_procs): Delete.
14510         (tui_interp_factory): Use "new".
14511
14512 2017-02-02  Tom Tromey  <tom@tromey.com>
14513
14514         * rust-exp.y (ends_raw_string, space_then_number)
14515         (rust_identifier_start_p): Return bool.
14516         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14517         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14518         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14519         (rust_chartype_p): Return bool.
14520         (val_print_struct, rust_print_struct_def, rust_print_type):
14521         Update.
14522         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14523         Return bool.
14524
14525 2017-02-02  Tom Tromey  <tom@tromey.com>
14526
14527         * rust-lang.c: Reindent.
14528
14529 2017-02-02  Tom Tromey  <tom@tromey.com>
14530
14531         * rust-lang.h (rust_crate_for_block): Update.
14532         * rust-lang.c (rust_crate_for_block): Return std::string.
14533         (rust_get_disr_info): Use std:;string, not
14534         gdb::unique_xmalloc_ptr.
14535         * rust-exp.y (crate_name): Update.
14536
14537 2017-02-02  Pedro Alves  <palves@redhat.com>
14538
14539         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14540         field out of gdb_disassembler_test and make it static.
14541
14542 2017-02-02  Pedro Alves  <palves@redhat.com>
14543
14544         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14545         mi1_interp and mi_interp fields.
14546
14547 2017-02-02  Pedro Alves  <palves@redhat.com>
14548
14549         * cli/cli-interp.c (struct saved_output_files, saved_output):
14550         Moved from cli/cli-logging.c.
14551         (cli_set_logging): New function.
14552         (cli_interp_procs): Install cli_set_logging.
14553         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14554         Declare.
14555         * cli/cli-logging.c (struct saved_output_files, saved_output):
14556         Moved to cli/cli-interp.c.
14557         (pop_output_files): Don't save outputs here.
14558         (make_logging_output): New function.
14559         (handle_redirections): Don't build tee nor save previous outputs
14560         here.
14561         * interps.c (current_interp_set_logging): Change prototype.
14562         Assume there's always a set_logging_proc method installed.
14563         * interps.h (interp_set_logging_ftype): Change prototype.
14564         (current_interp_set_logging): Change prototype and adjust comment.
14565         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14566         use make_logging_output.
14567         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14568 2017-02-02  Pedro Alves  <palves@redhat.com>
14569
14570         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14571         from ...
14572         (set_logging_overwrite): ... here.
14573         (logging_no_redirect_file): Delete.
14574         (set_logging_redirect): Don't handle redirection on the fly.
14575         Instead warn that "logging off" / "logging on" is necessary.
14576         (pop_output_files): Delete references to logging_no_redirect_file.
14577         (show_logging_command): Always speak in terms of what will happen
14578         once logging is reenabled.
14579
14580 2017-02-02  Pedro Alves  <palves@redhat.com>
14581
14582         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14583
14584 2017-02-02  Pedro Alves  <palves@redhat.com>
14585
14586         * disasm.c (gdb_pretty_print_insn): Rename to ...
14587         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14588         Remove gdbarch parameter.  Adapt to clear the object's buffers
14589         instead of allocating new buffers, and to print using the object's
14590         gdb_disassembler instead of calling gdb_print_insn.
14591         (dump_insns): Use gdb_pretty_print_disassembler.
14592         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14593         (gdb_pretty_print_disassembler): New class.
14594         * record-btrace.c (btrace_insn_history): Use
14595         gdb_pretty_print_disassembler.
14596
14597 2017-02-02  Pedro Alves  <palves@redhat.com>
14598
14599         * ada-lang.c (type_as_string): Use string_file.
14600         * ada-valprint.c (ada_print_floating): Use string_file.
14601         * ada-varobj.c (ada_varobj_scalar_image)
14602         (ada_varobj_get_value_image): Use string_file.
14603         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14604         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14605         * breakpoint.c (update_inserted_breakpoint_locations)
14606         (insert_breakpoint_locations, reattach_breakpoints)
14607         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14608         (print_it_watchpoint): Use string_file.
14609         (save_breakpoints): Use stdio_file.
14610         * c-exp.y (oper): Use string_file.
14611         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14612         tee_file.
14613         (pop_output_files): Use delete.
14614         (handle_redirections): Use stdio_file and tee_file.
14615         * cli/cli-setshow.c (do_show_command): Use string_file.
14616         * compile/compile-c-support.c (c_compute_program): Use
14617         string_file.
14618         * compile/compile-c-symbols.c (generate_vla_size): Take a
14619         'string_file &' instead of a 'ui_file *'.
14620         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14621         of a 'ui_file *'.  Use string_file.
14622         (generate_c_for_variable_locations): Take a 'string_file &'
14623         instead of a 'ui_file *'.
14624         * compile/compile-internal.h (generate_c_for_for_one_variable):
14625         Take a 'string_file &' instead of a 'ui_file *'.
14626         * compile/compile-loc2c.c (push, pushf, unary, binary)
14627         (print_label, pushf_register_address, pushf_register)
14628         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14629         'ui_file *'.  Adjust.
14630         * compile/compile.c (compile_to_object): Use string_file.
14631         * compile/compile.h (compile_dwarf_expr_to_c)
14632         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14633         'ui_file *'.
14634         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14635         (replace_typedefs_qualified_name): Use string_file and
14636         obstack_copy0.
14637         * disasm.c (gdb_pretty_print_insn): Use string_file.
14638         (gdb_disassembly): Adjust reference the null_stream global.
14639         (do_ui_file_delete): Delete.
14640         (gdb_insn_length): Use null_stream.
14641         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14642         * dwarf2loc.c (dwarf2_compile_property_to_c)
14643         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14644         'string_file &' instead of a 'ui_file *'.
14645         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14646         * dwarf2read.c (do_ui_file_peek_last): Delete.
14647         (dwarf2_compute_name): Use string_file.
14648         * event-top.c (gdb_setup_readline): Use stdio_file.
14649         * gdbarch.sh (verify_gdbarch): Use string_file.
14650         * gdbtypes.c (safe_parse_type): Use null_stream.
14651         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14652         string_file.
14653         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14654         'string_file *' instead of a 'ui_file *'.
14655         (gdbscm_arch_disassemble): Use string_file.
14656         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14657         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14658         inherits from ui_file.
14659         (ioscm_file_port_delete, ioscm_file_port_rewind)
14660         (ioscm_file_port_put): Delete.
14661         (ioscm_file_port_write): Rename to ...
14662         (ioscm_file_port::write): ... this.  Remove file_port_magic
14663         checks.
14664         (ioscm_file_port_new): Delete.
14665         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14666         ui_file_up.
14667         * guile/scm-type.c (tyscm_type_name): Use string_file.
14668         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14669         Use string_file.
14670         * infcmd.c (print_return_value_1): Use string_file.
14671         * infrun.c (print_target_wait_results): Use string_file.
14672         * language.c (add_language): Use string_file.
14673         * location.c (explicit_to_string_internal): Use string_file.
14674         * main.c (captured_main_1): Use null_file.
14675         * maint.c (maintenance_print_architecture): Use stdio_file.
14676         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14677         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14678         event_channel>: Change type to mi_console_file pointer.
14679         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14680         (mi_console_file_delete): Delete.
14681         (struct mi_console_file): Delete.
14682         (mi_console_file_magic): Delete.
14683         (mi_console_file_new): Delete.
14684         (mi_console_file::mi_console_file): New.
14685         (mi_console_file_delete): Delete.
14686         (mi_console_file_fputs): Delete.
14687         (mi_console_file::write): New.
14688         (mi_console_raw_packet): Delete.
14689         (mi_console_file::flush): New.
14690         (mi_console_file_flush): Delete.
14691         (mi_console_set_raw): Rename to ...
14692         (mi_console_file::set_raw): ... this.
14693         * mi/mi-console.h (class mi_console_file): New class.
14694         (mi_console_file_new, mi_console_set_raw): Delete.
14695         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14696         (mi_set_logging): Use delete and tee_file.  Adjust.
14697         * mi/mi-main.c (output_register): Use string_file.
14698         (mi_cmd_data_evaluate_expression): Use string_file.
14699         (mi_cmd_data_read_memory): Use string_file.
14700         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14701         * mi/mi-out.c (mi_ui_out::main_stream): New.
14702         (mi_ui_out::rewind): Use main_stream and
14703         string_file.
14704         (mi_ui_out::put): Use main_stream and string_file.
14705         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14706         Allocate a 'string_file' instead.
14707         (mi_out_new): Don't allocate a mem_fileopen stream here.
14708         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14709         (mi_ui_out::main_stream): Declare method.
14710         * printcmd.c (eval_command): Use string_file.
14711         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14712         * python/py-arch.c (archpy_disassemble): Use string_file.
14713         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14714         * python/py-frame.c (frapy_str): Use string_file.
14715         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14716         Use string_file.
14717         * python/py-type.c (typy_str): Use string_file.
14718         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14719         * python/py-value.c (valpy_str): Use string_file.
14720         * record-btrace.c (btrace_insn_history): Use string_file.
14721         * regcache.c (regcache_print): Use stdio_file.
14722         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14723         * remote.c (escape_buffer): Use string_file.
14724         * rust-lang.c (rust_get_disr_info): Use string_file.
14725         * serial.c (serial_open_ops_1): Use stdio_file.
14726         (do_serial_close): Use delete.
14727         * stack.c (print_frame_arg): Use string_file.
14728         (print_frame_args): Remove local mem_fileopen stream, not used.
14729         (print_frame): Use string_file.
14730         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14731         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14732         Take a 'string_file *' instead of a 'ui_file *'.
14733         * top.c (new_ui): Use stdio_file and stderr_file.
14734         (free_ui): Use delete.
14735         (execute_command_to_string): Use string_file.
14736         (quit_confirm): Use string_file.
14737         * tracepoint.c (collection_list::append_exp): Use string_file.
14738         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14739         * tui/tui-file.c: Don't include "ui-file.h".
14740         (enum streamtype, struct tui_stream): Delete.
14741         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14742         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14743         (tui_file::tui_file): New method.
14744         (tui_file_fputs): Delete.
14745         (tui_file_get_strbuf): Delete.
14746         (tui_file::puts): New method.
14747         (tui_file_adjust_strbuf): Delete.
14748         (tui_file_flush): Delete.
14749         (tui_file::flush): New method.
14750         * tui/tui-file.h: Tweak intro comment.
14751         Include ui-file.h.
14752         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14753         (tui_file_adjust_strbuf): Delete declarations.
14754         (class tui_file): New class.
14755         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14756         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14757         (tui_register_format): Use string_stream.
14758         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14759         (tui_get_function_from_frame): Use string_file.
14760         * typeprint.c (type_to_string): Use string_file.
14761         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14762         (null_stream): New global.
14763         (ui_file_delete): Delete.
14764         (ui_file::ui_file): New.
14765         (null_file_isatty): Delete.
14766         (ui_file::~ui_file): New.
14767         (null_file_rewind): Delete.
14768         (ui_file::printf): New.
14769         (null_file_put): Delete.
14770         (null_file_flush): Delete.
14771         (ui_file::putstr): New.
14772         (null_file_write): Delete.
14773         (ui_file::putstrn): New.
14774         (null_file_read): Delete.
14775         (ui_file::putc): New.
14776         (null_file_fputs): Delete.
14777         (null_file_write_async_safe): Delete.
14778         (ui_file::vprintf): New.
14779         (null_file_delete): Delete.
14780         (null_file::write): New.
14781         (null_file_fseek): Delete.
14782         (null_file::puts): New.
14783         (ui_file_data): Delete.
14784         (null_file::write_async_safe): New.
14785         (gdb_flush, ui_file_isatty): Adjust.
14786         (ui_file_put, ui_file_rewind): Delete.
14787         (ui_file_write): Adjust.
14788         (ui_file_write_for_put): Delete.
14789         (ui_file_write_async_safe, ui_file_read): Adjust.
14790         (ui_file_fseek): Delete.
14791         (fputs_unfiltered): Adjust.
14792         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14793         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14794         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14795         (set_ui_file_data): Delete.
14796         (string_file::~string_file, string_file::write)
14797         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14798         (do_ui_file_as_string, ui_file_as_string): Delete.
14799         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14800         (struct mem_file): Delete.
14801         (mem_file_new): Delete.
14802         (stdio_file::stdio_file): New.
14803         (mem_file_delete): Delete.
14804         (stdio_file::stdio_file): New.
14805         (mem_fileopen): Delete.
14806         (stdio_file::~stdio_file): New.
14807         (mem_file_rewind): Delete.
14808         (stdio_file::set_stream): New.
14809         (mem_file_put): Delete.
14810         (stdio_file::open): New.
14811         (mem_file_write): Delete.
14812         (stdio_file_magic, struct stdio_file): Delete.
14813         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14814         (stdio_file::flush): New.
14815         (stdio_file_read): Rename to ...
14816         (stdio_file::read): ... this.  Adjust.
14817         (stdio_file_write): Rename to ...
14818         (stdio_file::write): ... this.  Adjust.
14819         (stdio_file_write_async_safe): Rename to ...
14820         (stdio_file::write_async_safe) ... this.  Adjust.
14821         (stdio_file_fputs): Rename to ...
14822         (stdio_file::puts) ... this.  Adjust.
14823         (stdio_file_isatty): Delete.
14824         (stdio_file_fseek): Delete.
14825         (stdio_file::isatty): New.
14826         (stderr_file_write): Rename to ...
14827         (stderr_file::write) ... this.  Adjust.
14828         (stderr_file_fputs): Rename to ...
14829         (stderr_file::puts) ... this.  Adjust.
14830         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14831         (stderr_file::stderr_file): New.
14832         (tee_file_magic): Delete.
14833         (struct tee_file): Delete.
14834         (tee_file::tee_file): New.
14835         (tee_file_new): Delete.
14836         (tee_file::~tee_file): New.
14837         (tee_file_delete): Delete.
14838         (tee_file_flush): Rename to ...
14839         (tee_file::flush): ... this.  Adjust.
14840         (tee_file_write): Rename to ...
14841         (tee_file::write): ... this.  Adjust.
14842         (tee_file::write_async_safe): New.
14843         (tee_file_fputs): Rename to ...
14844         (tee_file::puts): ... this.  Adjust.
14845         (tee_file_isatty): Rename to ...
14846         (tee_file::isatty): ... this.  Adjust.
14847         * ui-file.h (struct obstack, struct ui_file): Don't
14848         forward-declare.
14849         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14850         (ui_file_write_ftype)
14851         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14852         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14853         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14854         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14855         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14856         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14857         (set_ui_file_fseek): Delete.
14858         (ui_file_data, ui_file_delete, ui_file_rewind)
14859         (struct ui_file): New.
14860         (ui_file_up): New.
14861         (class null_file): New.
14862         (null_stream): Declare.
14863         (ui_file_write_for_put, ui_file_put): Delete.
14864         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14865         Delete.
14866         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14867         (gdb_fopen, tee_file_new): Delete.
14868         (struct string_file): New.
14869         (struct stdio_file): New.
14870         (stdio_file_up): New.
14871         (struct stderr_file): New.
14872         (class tee_file): New.
14873         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14874         of a 'ui_file *'.  Adjust.
14875         * ui-out.h (class ui_out) <field_stream>: Likewise.
14876         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14877         (null_stream): Delete.
14878         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14879         Adjust.
14880         * utils.h (struct ui_file): Delete forward declaration..
14881         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14882         (error_stream): Take a 'string_file &' instead of a
14883         'ui_file *'.
14884         * varobj.c (varobj_value_get_print_value): Use string_file.
14885         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14886         * gdbarch.c: Regenerate.
14887
14888 2017-02-02  Pedro Alves  <palves@redhat.com>
14889
14890         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14891         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14892         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14893         Adjust to call gdb_print_insn instead of
14894         gdb_disassembler::print_insn.
14895         (dump_insns, do_mixed_source_and_assembly_deprecated)
14896         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14897         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14898         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14899         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14900         declaration.
14901         (gdb_pretty_print_insn): Re-add declaration.
14902         * record-btrace.c (btrace_insn_history): Don't allocate a
14903         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14904
14905 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14906
14907         * disasm.h (gdb_disassembly): Remove file_string parameter.
14908         * disasm.c (gdb_disassembly): Likewise.
14909         * cli/cli-cmds.c (print_disassembly): Adapt.
14910         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14911         * stack.c (do_gdb_disassembly): Likewise.
14912
14913 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14914
14915         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14916         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14917         targets.  And if the implicit value is longer than needed, extract
14918         the first bytes instead of the "least significant" ones.
14919
14920 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14921
14922         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14923         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14924         (btrace_fetch): Assert can_access_registers_ptid.
14925         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14926         validate_registers_access.
14927
14928 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14929
14930         * gdbthread.h (can_access_registers_ptid): New.
14931         * thread.c (can_access_registers_ptid): New.
14932
14933 2017-02-01  Pedro Alves  <palves@redhat.com>
14934
14935         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14936
14937 2017-01-31  Pedro Alves  <palves@redhat.com>
14938
14939         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14940         Fix typos.
14941
14942 2017-01-31  Pedro Alves  <palves@redhat.com>
14943
14944         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14945         not used.
14946
14947 2017-01-31  Pedro Alves  <palves@redhat.com>
14948
14949         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14950
14951 2017-01-31  Pedro Alves  <palves@redhat.com>
14952
14953         * common/scoped_restore.h
14954         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14955         change the value's parameter type to T2.
14956         (make_scoped_restore): Likewise.
14957
14958 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14959             Richard Henderson  <rth@redhat.com>
14960
14961         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14962         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14963         GS_BASE for older kernels.
14964         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14965         GS_BASE for older kernels.
14966         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14967         and GS_BASE to the offset table.
14968         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14969         system register group.
14970         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14971         for older kernels.
14972         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14973         amd64 ABI.
14974         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14975         AMD64_GSBASE_REGNUM.
14976         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14977         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14978         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14979         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14980         i386/64bit-segments.xml in those rules.
14981         * features/i386/64bit-segments.xml: New file.
14982         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14983         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14984         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14985         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14986         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14987         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14988         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14989         * features/i386/amd64-avx-linux.c: Regenerated.
14990         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14991         * features/i386/amd64-avx-mpx.c: Regenerated.
14992         * features/i386/amd64-avx512-linux.c: Regenerated.
14993         * features/i386/amd64-linux.c: Regenerated.
14994         * features/i386/amd64-mpx-linux.c: Regenerated.
14995         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14996         * features/i386/i386-avx-mpx.c: Regenerated.
14997         * features/i386/x32-avx-linux.c: Regenerated.
14998         * features/i386/x32-avx512-linux.c: Regenerated.
14999         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15000         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15001         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15002         * regformats/i386/amd64-linux.dat: Regenerated.
15003         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15004         * regformats/i386/x32-avx-linux.dat: Regenerated.
15005         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15006         * regformats/i386/x32-linux.dat: Regenerated.
15007
15008 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15009
15010         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15011         Set to AMD64_NUM_REGS.
15012
15013 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15014
15015         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15016         that checks validity of a register number.
15017
15018 2017-01-27  Kees Cook  <keescook@google.com>
15019
15020         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15021         fetch_fpregs if target has fpa registers.
15022         (arm_linux_store_inferior_registers): Call store_fpregs if target
15023         has fpa registers.
15024
15025 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15026
15027         * cris-tdep.c (cris_gdbarch_init): Remove check for
15028         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15029
15030 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15031
15032         * corelow.c (get_core_register_section): Check for regset
15033         existence before checking for REGSET_VARIABLE_SIZE.
15034
15035 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15036             Pedro Alves  <palves@redhat.com>
15037
15038         PR gdb/20939
15039         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15040         call memory_error, save memaddr instead.
15041         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15042         negative, cal memory_error.
15043         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15044
15045 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15046
15047         * disasm-selftests.c (memory_error_test): New function.
15048         (_initialize_disasm_selftests): Register memory_error_test.
15049
15050 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15051
15052         * Makefile.in (SFILES): Add disasm-selftests.c and
15053         selftest-arch.c.
15054         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15055         * disasm-selftests.c: New file.
15056         * selftest-arch.c: New file.
15057         * selftest-arch.h: New file.
15058
15059 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15060
15061         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15062         to bfd_arch_mep.  Don't return 0 if section is not
15063         found.  Call print_insn_mep.
15064
15065 2017-01-26  Pedro Alves  <palves@redhat.com>
15066             Yao Qi  <yao.qi@linaro.org>
15067
15068         * arm-tdep.c: Include "disasm.h".
15069         (gdb_print_insn_arm): Update code to get gdbarch.
15070         * disasm.c (dis_asm_read_memory): Change it to
15071         gdb_disassembler::dis_asm_read_memory.
15072         (dis_asm_memory_error): Likewise.
15073         (dis_asm_print_address): Likewise.
15074         (gdb_pretty_print_insn): Change it to
15075         gdb_disassembler::pretty_print_insn.
15076         (dump_insns): Add one argument gdb_disassemlber.  All
15077         callers updated.
15078         (do_mixed_source_and_assembly_deprecated): Likewise.
15079         (do_mixed_source_and_assembly): Likewise.
15080         (do_assembly_only): Likewise.
15081         (gdb_disassembler::gdb_disassembler): New.
15082         (gdb_disassembler::print_insn): New.
15083         * disasm.h (class gdb_disassembler): New.
15084         (gdb_pretty_print_insn): Remove declaration.
15085         (gdb_disassemble_info): Likewise.
15086         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15087         (gdbscm_disasm_read_memory_worker): Update.
15088         (gdbscm_disasm_read_memory): Update.
15089         (gdbscm_disasm_memory_error): Remove.
15090         (gdbscm_disasm_print_address): Remove.
15091         (gdbscm_disassembler::gdbscm_disassembler): New.
15092         (gdbscm_print_insn_from_port): Update.
15093         * mips-tdep.c: Include disasm.h.
15094         (gdb_print_insn_mips): Update code to get gdbarch.
15095         * record-btrace.c (btrace_insn_history): Update.
15096         * spu-tdep.c: Include disasm.h.
15097         (struct spu_dis_asm_data): Remove.
15098         (struct spu_dis_asm_info): New.
15099         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15100         SPU id.
15101         (gdb_print_insn_spu): Cast disassemble_info to
15102         spu_dis_asm_info.
15103
15104 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15105
15106         * disasm.c (do_ui_file_delete): Delete.
15107         (gdb_insn_length): Move code creating stream to ...
15108         * utils.c (null_stream): ... here.  New function.
15109         * utils.h (null_stream): Declare.
15110
15111 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15112
15113         * python/py-inferior.c (find_thread_object): Return directly
15114         from the loop.  Remove "found" variable.
15115
15116 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15117
15118         GDB 7.12.1 released.
15119
15120 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15121
15122         * python/py-function.c (fnpy_call): Reorder declarations to have
15123         the gdbpy_enter object declared first.
15124         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15125
15126 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15127
15128         PR python/21068
15129         * python/python-internal.h (PyMem_RawMalloc): Define for
15130         Python < 3.4.
15131         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15132         PyMem_RawMalloc instead of PyMem_Malloc.
15133
15134 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15135             Luis Machado  <lgustavo@codesourcery.com>
15136
15137         * NEWS (New commands): Mention flash-erase.
15138         (New MI commands): Mention target-flash-erase.
15139         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15140         command.
15141         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15142         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15143         * target.c (flash_erase_command): New function.
15144         (initialize_targets): Add new flash-erase command.
15145         * target.h (flash_erase_command): New declaration.
15146
15147 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15148
15149         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15150         HAVE_SYS_PROCFS_H is defined.
15151
15152 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15153
15154         * remote.c (struct cached_reg): Change data into a pointer.
15155         * (stop_reply_dtr): Free data pointers before deleting vector.
15156         (process_stop_reply): Likewise.
15157         (remote_parse_stop_reply): Allocate space for data
15158
15159 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15160
15161         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15162         MAX_REGISTER_SIZE.
15163         (amd64_pseudo_register_read_value): Likewise.
15164         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15165         (store_register_using_P): Likewise.
15166         * regcache.c (regcache_xfer_part): Likewise.
15167
15168 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15169
15170         Split real and pseudo registers.
15171         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15172         (sparc32_pseudo_regnum): New enum.
15173         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15174         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15175         (SPARC32_CP0_REGISTERS): New macro.
15176         (sparc32_pseudo_register_name): New function.
15177         (sparc32_register_name): Use sparc32_pseudo_register_name.
15178         (sparc32_pseudo_register_type): New function.
15179         (sparc32_register_type): Use sparc32_pseudo_register_type.
15180         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15181         pseudo register numbers.
15182         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15183         (SPARC64_CP0_REGISTERS): New macro.
15184         (sparc64_pseudo_register_name): New function.
15185         (sparc64_register_name): Use sparc64_pseudo_register_name.
15186         (sparc64_pseudo_register_type): New function.
15187         (sparc64_register_type): Use sparc64_pseudo_register_type.
15188         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15189         pseudo register numbers.
15190         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15191         sparc64_store_arguments): Handle pseudo register numbers.
15192
15193 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15194
15195         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15196         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15197         output.
15198         (getpkt_or_notif_sane_1): Likewise.
15199
15200 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15201
15202         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15203         of CC.  Pass "-x c++-header" instead of "-x c".
15204
15205 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15206
15207         * remote.c (remote_can_async_p): Update comment.
15208
15209 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15210
15211         * linux-nat.c (linux_nat_can_async_p): Update comment.
15212
15213 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15214
15215         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15216
15217 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15218
15219         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15220
15221 2017-01-10  Tom Tromey  <tom@tromey.com>
15222
15223         * python/py-type.c (typy_legacy_template_argument): Update.
15224         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15225         ~demangle_parse_info): Declare new members.
15226         (cp_demangled_name_to_comp): Return unique_ptr.
15227         (cp_demangled_name_parse_free)
15228         (make_cleanup_cp_demangled_name_parse_free)
15229         (cp_new_demangle_parse_info): Remove.
15230         * cp-support.c (do_demangled_name_parse_free_cleanup)
15231         (make_cleanup_cp_demangled_name_parse_free): Remove.
15232         (inspect_type, cp_canonicalize_string_full)
15233         (cp_canonicalize_string): Update.
15234         (mangled_name_to_comp): Change return type.
15235         (cp_class_name_from_physname, method_name_from_physname)
15236         (cp_func_name, cp_remove_params): Update.
15237         * cp-name-parser.y (demangle_parse_info): New constructor, from
15238         cp_new_demangle_parse_info.
15239         (~demangle_parse_info): New destructor, from
15240         cp_demangled_name_parse_free.
15241         (cp_merge_demangle_parse_infos): Update.
15242         (cp_demangled_name_to_comp): Change return type.
15243
15244 2017-01-10  Tom Tromey  <tom@tromey.com>
15245
15246         * top.c (prevent_dont_repeat): Change return type.
15247         * python/python.c (execute_gdb_command): Use std::string.
15248         Update.
15249         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15250         * command.h (prevent_dont_repeat): Change return type.
15251         * breakpoint.c (bpstat_do_actions_1): Update.
15252
15253 2017-01-10  Tom Tromey  <tom@tromey.com>
15254
15255         * value.h (scoped_value_mark::~scoped_value_mark): Call
15256         free_to_mark.
15257         (scoped_value_mark::free_to_mark): New method.
15258         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15259         scoped_value_mark.
15260
15261 2017-01-10  Tom Tromey  <tom@tromey.com>
15262
15263         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15264         (valpy_reference_value, valpy_const_value, valpy_get_address)
15265         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15266         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15267         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15268         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15269         scoped_value_mark.
15270         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15271         * value.h (scoped_value_mark): New class.
15272
15273 2017-01-10  Tom Tromey  <tom@tromey.com>
15274
15275         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15276         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15277         * psymtab.c (discard_psymtabs_upto): Remove.
15278         (make_cleanup_discard_psymtabs): Remove.
15279         (struct psymtab_state): Remove.
15280
15281 2017-01-10  Tom Tromey  <tom@tromey.com>
15282
15283         * record-full.c (record_full_save_cleanups): Remove.
15284         (record_full_save): Use gdb::unlinker.
15285         * gcore.c (do_bfd_delete_cleanup): Remove.
15286         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15287         cleanups.
15288         * dwarf2read.c (unlink_if_set): Remove.
15289         (write_psymtabs_to_index): Use gdb::unlinker.
15290         * common/gdb_unlinker.h: New file.
15291
15292 2017-01-10  Tom Tromey  <tom@tromey.com>
15293
15294         * windows-tdep.c (windows_xfer_shared_library): Update.
15295         * windows-nat.c (windows_make_so): Update.
15296         * utils.h (make_cleanup_bfd_unref): Remove.
15297         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15298         * symfile.h (symfile_bfd_open)
15299         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15300         * symfile.c (read_symbols, symbol_file_add)
15301         (separate_debug_file_exists): Update.
15302         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15303         (generic_load, reread_symbols): Update.
15304         * symfile-mem.c (symbol_file_add_from_memory): Update.
15305         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15306         (spu_symbol_file_add_from_memory): Update.
15307         * solist.h (struct target_so_ops) <bfd_open>: Return
15308         gdb_bfd_ref_ptr.
15309         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15310         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15311         gdb_bfd_ref_ptr.
15312         (solib_map_sections, reload_shared_libraries_1): Update.
15313         * solib-svr4.c (enable_break): Update.
15314         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15315         * solib-frv.c (enable_break2): Update.
15316         * solib-dsbt.c (enable_break): Update.
15317         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15318         gdb_bfd_ref_ptr.
15319         (darwin_solib_get_all_image_info_addr_at_init): Update.
15320         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15321         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15322         * record-full.c (record_full_save): Update.
15323         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15324         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15325         * minidebug.c (find_separate_debug_file_in_section): Return
15326         gdb_bfd_ref_ptr.
15327         * machoread.c (macho_add_oso_symfile): Change abfd to
15328         gdb_bfd_ref_ptr.
15329         (macho_symfile_read_all_oso): Update.
15330         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15331         (macho_symfile_read): Update.
15332         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15333         (jit_bfd_try_read_symtab): Update.
15334         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15335         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15336         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15337         gdb_bfd_ref_ptr.
15338         (gdb_bfd_ref_policy): New struct.
15339         (gdb_bfd_ref_ptr): New typedef.
15340         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15341         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15342         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15343         gdb_bfd_ref_ptr.
15344         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15345         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15346         (gcore_command): Update.
15347         * exec.c (exec_file_attach): Update.
15348         * elfread.c (elf_symfile_read): Update.
15349         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15350         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15351         (open_and_init_dwo_file): Update.
15352         (open_dwp_file): Return gdb_bfd_ref_ptr.
15353         (open_and_init_dwp_file): Update.
15354         * corelow.c (core_open): Update.
15355         * compile/compile-object-load.c (compile_object_load): Update.
15356         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15357         * coffread.c (coff_symfile_read): Update.
15358         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15359         gdb_bfd_ref_ptr.  Rename.
15360         (dump_bfd_file, restore_command): Update.
15361         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15362         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15363         (find_separate_debug_file_by_buildid): Update.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * common/gdb_ref_ptr.h: New file.
15368         * python/py-ref.h (struct gdbpy_ref_policy): New.
15369         (gdbpy_ref): Now a typedef.
15370
15371 2017-01-10  Tom Tromey  <tom@tromey.com>
15372
15373         * utils.h (make_cleanup_htab_delete): Don't declare.
15374         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15375         Remove.
15376         * linespec.c (decode_compound_collector): Add constructor,
15377         destructor.
15378         (lookup_prefix_sym): Remove cleanup.
15379         (symtab_collector): Add constructor, destructor.
15380         (collect_symtabs_from_filename): Remove cleanup.
15381         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15382         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15383         Use htab_up.
15384         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15385         * dwarf2read.c (dw2_expand_symtabs_matching)
15386         (dw2_map_symbol_filenames, dwarf_decode_macros)
15387         (write_psymtabs_to_index): Use htab_up.
15388         * dwarf2loc.c (func_verify_no_selftailcall)
15389         (call_site_find_chain_1, func_verify_no_selftailcall)
15390         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15391         std::vector, gdb::unique_xmalloc_ptr.
15392         (call_sitep): Remove typedef.
15393         (dwarf2_locexpr_baton_eval): Remove unused variable.
15394
15395 2017-01-10  Tom Tromey  <tom@tromey.com>
15396
15397         * python/python-internal.h (make_cleanup_py_decref)
15398         (make_cleanup_py_xdecref): Don't declare.
15399         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15400         (py_xdecref, make_cleanup_py_xdecref): Remove.
15401
15402 2017-01-10  Tom Tromey  <tom@tromey.com>
15403
15404         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15405         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15410
15411 2017-01-10  Tom Tromey  <tom@tromey.com>
15412
15413         * python/py-utils.c (unicode_to_encoded_string)
15414         (python_string_to_target_string)
15415         (python_string_to_target_python_string)
15416         (python_string_to_host_string, gdbpy_obj_to_string)
15417         (get_addr_from_python): Use gdbpy_ref.
15418
15419 2017-01-10  Tom Tromey  <tom@tromey.com>
15420
15421         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15422         gdbpy_ref.
15423
15424 2017-01-10  Tom Tromey  <tom@tromey.com>
15425
15426         * python/python.c (eval_python_command, gdbpy_decode_line)
15427         (gdbpy_run_events, gdbpy_start_type_printers)
15428         (gdbpy_apply_type_printers): Use gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-param.c (get_doc_string, compute_enum_values): Use
15433         gdbpy_ref.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-inferior.c (find_thread_object, build_inferior_list):
15438         Use gdbpy_ref.
15439
15440 2017-01-10  Tom Tromey  <tom@tromey.com>
15441
15442         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15447         gdbpy_ref.
15448
15449 2017-01-10  Tom Tromey  <tom@tromey.com>
15450
15451         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15452         extra incref.
15453         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15454         Use gdbpy_ref.
15455
15456 2017-01-10  Tom Tromey  <tom@tromey.com>
15457
15458         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15459         gdbpy_ref.
15460
15461 2017-01-10  Tom Tromey  <tom@tromey.com>
15462
15463         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15464         decref results of PyArg_ParseTupleAndKeywords.
15465
15466 2017-01-10  Tom Tromey  <tom@tromey.com>
15467
15468         * python/python.c (python_run_simple_file): Use
15469         unique_xmalloc_ptr, gdbpy_ref.
15470
15471 2017-01-10  Tom Tromey  <tom@tromey.com>
15472
15473         * python/py-prettyprint.c (print_stack_unless_memory_error)
15474         (print_string_repr, print_children): Use gdbpy_ref.
15475         (dummy_python_frame): New class.
15476         (dummy_python_frame::dummy_python_frame): Rename from
15477         push_dummy_python_frame.
15478         (py_restore_tstate): Remove.
15479
15480 2017-01-10  Tom Tromey  <tom@tromey.com>
15481
15482         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15483
15484 2017-01-10  Tom Tromey  <tom@tromey.com>
15485
15486         * python/python.c (ensure_python_env, restore_python_env):
15487         Remove.
15488         * python/python-internal.h (ensure_python_env): Don't declare.
15489         * varobj.h (varobj_ensure_python_env): Don't declare.
15490         * varobj.c (varobj_ensure_python_env): Remove.
15491
15492 2017-01-10  Tom Tromey  <tom@tromey.com>
15493
15494         * varobj.c (varobj_value_get_print_value): Use
15495         gdbpy_enter_varobj.
15496
15497 2017-01-10  Tom Tromey  <tom@tromey.com>
15498
15499         * python/py-prettyprint.c (print_string_repr, print_children):
15500         Update.
15501         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15502         of "encoding".
15503         * varobj.c (varobj_value_get_print_value): Update.
15504         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15505
15506 2017-01-10  Tom Tromey  <tom@tromey.com>
15507
15508         * varobj.c (varobj_get_display_hint)
15509         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15510         (varobj_set_visualizer, free_variable): Use
15511         gdbpy_enter_varobj.
15512
15513 2017-01-10  Tom Tromey  <tom@tromey.com>
15514
15515         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15516         (do_finish_initialization): New function.  Use gdbpy_ref.
15517         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15518         do_finish_initialization.
15519
15520 2017-01-10  Tom Tromey  <tom@tromey.com>
15521
15522         * python/py-param.c (get_set_value, get_show_value): Use
15523         gdbpy_enter, gdbpy_ref.
15524
15525 2017-01-10  Tom Tromey  <tom@tromey.com>
15526
15527         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15528
15529 2017-01-10  Tom Tromey  <tom@tromey.com>
15530
15531         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15532
15533 2017-01-10  Tom Tromey  <tom@tromey.com>
15534
15535         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15536         Use gdbpy_enter_varobj.
15537
15538 2017-01-10  Tom Tromey  <tom@tromey.com>
15539
15540         * varobj.c (gdbpy_enter_varobj): New constructor.
15541         * python/python-internal.h (gdbpy_enter_varobj): New class.
15542         * python/py-varobj.c (py_varobj_get_iterator): Use
15543         gdbpy_enter_varobj.
15544
15545 2017-01-10  Tom Tromey  <tom@tromey.com>
15546
15547         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15548         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15549         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15550         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15551         unique_xmalloc_ptr.
15552         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15553
15554 2017-01-10  Tom Tromey  <tom@tromey.com>
15555
15556         * python/py-xmethods.c (invoke_match_method): Use
15557         gdbpy_ref.
15558
15559 2017-01-10  Tom Tromey  <tom@tromey.com>
15560
15561         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15562         gdbpy_enter, gdbpy_ref.
15563
15564 2017-01-10  Tom Tromey  <tom@tromey.com>
15565
15566         * python/python.c (python_interactive_command): Use gdbpy_enter.
15567
15568 2017-01-10  Tom Tromey  <tom@tromey.com>
15569
15570         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15571         gdbpy_ref.
15572
15573 2017-01-10  Tom Tromey  <tom@tromey.com>
15574
15575         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15576         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15577
15578 2017-01-10  Tom Tromey  <tom@tromey.com>
15579
15580         * utils.h (htab_deleter): New struct.
15581         (htab_up): New typedef.
15582         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15583         gdbpy_enter, gdbpy_ref, htab_up.
15584
15585 2017-01-10  Tom Tromey  <tom@tromey.com>
15586
15587         * python/py-unwind.c (pending_frame_invalidate): Remove.
15588         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15589
15590 2017-01-10  Tom Tromey  <tom@tromey.com>
15591
15592         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15593         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15594
15595 2017-01-10  Tom Tromey  <tom@tromey.com>
15596
15597         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15598
15599 2017-01-10  Tom Tromey  <tom@tromey.com>
15600
15601         * python/python.c (gdbpy_eval_from_control_command)
15602         (gdbpy_source_script, gdbpy_run_events)
15603         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15604         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15605         gdbpy_enter.
15606
15607 2017-01-10  Tom Tromey  <tom@tromey.com>
15608
15609         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15610
15611 2017-01-10  Tom Tromey  <tom@tromey.com>
15612
15613         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15614
15615 2017-01-10  Tom Tromey  <tom@tromey.com>
15616
15617         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15618         (python_on_inferior_call_pre, python_on_inferior_call_post)
15619         (python_on_memory_change, python_on_register_change)
15620         (python_inferior_exit, python_new_objfile, add_thread_object)
15621         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15622
15623 2017-01-10  Tom Tromey  <tom@tromey.com>
15624
15625         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15626         (bpfinishpy_handle_exit): Use gdbpy_enter.
15627
15628 2017-01-10  Tom Tromey  <tom@tromey.com>
15629
15630         * python/py-cmd.c (cmdpy_destroyer)
15631         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15632         gdbpy_enter.
15633
15634 2017-01-10  Tom Tromey  <tom@tromey.com>
15635
15636         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15637         gdbpy_enter.
15638         (gdbpy_breakpoint_has_cond): Likewise.
15639
15640 2017-01-10  Tom Tromey  <tom@tromey.com>
15641
15642         * python/python.c (gdbpy_enter): New constructor.
15643         (~gdbpy_enter): New destructor.
15644         (restore_python_env, ensure_python_env): Rewrite.
15645         * python/python-internal.h (gdbpy_enter): New class.
15646
15647 2017-01-10  Tom Tromey  <tom@tromey.com>
15648
15649         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15650
15651 2017-01-10  Tom Tromey  <tom@tromey.com>
15652
15653         * python/py-value.c (value_has_field, get_field_flag)
15654         (get_field_type, valpy_getitem, convert_value_from_python): Use
15655         gdbpy_ref.
15656
15657 2017-01-10  Tom Tromey  <tom@tromey.com>
15658
15659         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15660         gdbpy_ref.
15661
15662 2017-01-10  Tom Tromey  <tom@tromey.com>
15663
15664         * python/py-prettyprint.c (search_pp_list)
15665         (find_pretty_printer_from_objfiles)
15666         (find_pretty_printer_from_progspace)
15667         (find_pretty_printer_from_gdb, find_pretty_printer)
15668         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15669         gdbpy_ref.
15670
15671 2017-01-10  Tom Tromey  <tom@tromey.com>
15672
15673         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15674
15675 2017-01-10  Tom Tromey  <tom@tromey.com>
15676
15677         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15678         (ltpy_get_all_source_lines): Use gdbpy_ref.
15679
15680 2017-01-10  Tom Tromey  <tom@tromey.com>
15681
15682         * python/py-framefilter.c (extract_sym, extract_value)
15683         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15684         gdbpy_ref.
15685
15686 2017-01-10  Tom Tromey  <tom@tromey.com>
15687
15688         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15689
15690 2017-01-10  Tom Tromey  <tom@tromey.com>
15691
15692         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15693
15694 2017-01-10  Tom Tromey  <tom@tromey.com>
15695
15696         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15697         gdbpy_ref.
15698
15699 2017-01-10  Tom Tromey  <tom@tromey.com>
15700
15701         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15702
15703 2017-01-10  Tom Tromey  <tom@tromey.com>
15704
15705         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15706         (typy_range): Use gdbpy_ref.
15707
15708 2017-01-10  Tom Tromey  <tom@tromey.com>
15709
15710         * python/py-threadevent.c (create_thread_event_object): Use
15711         gdbpy_ref.
15712         * python/py-stopevent.c (create_stop_event_object): Simplify.
15713         (emit_stop_event): Use gdbpy_ref.
15714         * python/py-signalevent.c (create_signal_event_object): Use
15715         gdbpy_ref.
15716         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15717         (emit_new_objfile_event, create_clear_objfiles_event_object)
15718         (emit_clear_objfiles_event): Use gdbpy_ref.
15719         * python/py-infevents.c (create_inferior_call_event_object)
15720         (create_register_changed_event_object)
15721         (create_memory_changed_event_object, emit_inferior_call_event)
15722         (emit_memory_changed_event, emit_register_changed_event): Use
15723         gdbpy_ref.
15724         * python/py-exitedevent.c (create_exited_event_object)
15725         (emit_exited_event): Use gdbpy_ref.
15726         * python/py-event.h (evpy_emit_event): Remove
15727         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15728         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15729         * python/py-continueevent.c (emit_continue_event): Use
15730         gdbpy_ref.
15731         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15732         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15733         gdbpy_ref.
15734         * python/py-bpevent.c (create_breakpoint_event_object): Use
15735         gdbpy_ref.
15736
15737 2017-01-10  Tom Tromey  <tom@tromey.com>
15738
15739         * python/py-ref.h: New file.
15740
15741 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15742
15743         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15744         void.
15745         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15746         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15747         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15748         * ui-out.c (ui_out::redirect): Likewise.
15749         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15750         * cli/cli-logging.c (set_logging_redirect): Update call site of
15751         ui_out::redirect.
15752         (handle_redirections): Likewise.
15753         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15754         * top.c (execute_command_to_string): Likewise.
15755         * utils.c (do_ui_out_redirect_pop): Likewise.
15756
15757 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15758
15759         * stack.c (_initialize_stack): Update "frame" command help message.
15760
15761 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15762
15763         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15764
15765 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15766
15767         * x86-linux-nat.h: Include gdb_proc_service.h.
15768
15769 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15770
15771         * ser-base.h: Include serial.h.
15772
15773 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15774
15775         * ppc-linux-tdep.h: Include ppc-tdep.h.
15776
15777 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15778
15779         * nat/amd64-linux-siginfo.h: Include signal.h.
15780
15781 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15782
15783         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15784
15785 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15786
15787         * mi/mi-parse.h: Include mi-cmds.h.
15788
15789 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15790
15791         * inf-loop.c: Don't include "target.h".
15792         * inf-loop.h: Include it here.
15793
15794 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15795
15796         * dfp.h: Include "dboulest.h" and "expression.h".
15797
15798 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15799
15800         * ax-gdb.h: Include "ax.h".
15801
15802 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15803
15804         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15805         with nat/gdb_ptrace.h.
15806
15807 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15808
15809         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15810         new line.
15811         (mips64_fbsd_sigframe_init): Likewise.
15812
15813 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15814
15815         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15816         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15817
15818 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15819
15820         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15821         * NEWS: Mention new FreeBSD/mips native configuration.
15822         * config/mips/fbsd.mh: New file.
15823         * configure.host: Add mips*-*-freebsd*.
15824         * mips-fbsd-nat.c: New file.
15825
15826 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15827
15828         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15829         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15830         * NEWS: Mention new FreeBSD/mips target.
15831         * configure.tgt: Add mips*-*-freebsd*.
15832         * mips-fbsd-tdep.c: New file.
15833         * mips-fbsd-tdep.h: New file.
15834
15835 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15836
15837         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15838         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15839
15840 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15841
15842         Update copyright year range in all GDB files.
15843
15844 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15845
15846         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15847
15848 For older changes see ChangeLog-2016.
15849 \f
15850 Local Variables:
15851 mode: change-log
15852 left-margin: 8
15853 fill-column: 74
15854 version-control: never
15855 coding: utf-8
15856 End: