Add multiple-CPU support in ravenscar-thread.c
[external/binutils.git] / gdb / ChangeLog
1 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
4         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
5         * ravenscar-thread.c: Add into comment.
6         (base_magic_null_ptid): Delete.
7         (base_ptid): Change documentation.
8         (ravenscar_active_task): Renames ravenscar_running_thread.
9         All callers updated throughout.
10         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
11         (ravenscar_task_is_currently_active): Likewise.
12         (get_base_thread_from_ravenscar_task): Ditto.
13         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
14         (ravenscar_runtime_initialized): Likewise.
15         (get_running_thread_id): Add new parameter "cpu".  Adjust
16         implementation to handle this new parameter.
17         (ravenscar_fetch_registers): Small adjustment to use
18         is_ravenscar_task and ravenscar_task_is_currently_active in
19         order to decide whether to use the target beneath or this
20         module's arch_ops.
21         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
22         (ravenscar_stopped_by_sw_breakpoint): Use
23         get_base_thread_from_ravenscar_task to get the underlying
24         thread, rather than using base_ptid.
25         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
26         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
27         Likewise.
28         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
29
30 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
31
32         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
33         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
34         (get_tcb_types_info): Set fieldnos.base_cpu.
35         (read_atcb): Set task_info->base_cpu.
36         (info_task): Print "Base CPU" info if set by runtime.
37
38 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
39
40         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
41         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
42         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
43         New functions.
44         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
45         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
46         to_stopped_data_address and to_core_of_thread fields of
47         ravenscar_ops.
48
49 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
50
51         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
52         (struct gdbarch_tdep): New member long_double_abi.
53         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
54         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
55         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
56         format depending on long_double_abi tdep member.
57         (ppc_floatformat_for_type): Handle __ibm128 type.
58
59 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
60
61         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
62
63 2017-11-21  Pedro Alves  <palves@redhat.com>
64
65         * dwarf2read.c (mapped_index::find_name_components_bounds)
66         <completion mode, upper bound>: Use std::lower_bound instead of
67         std::upper_bound.
68         (test_mapped_index_find_name_component_bounds): Remove incorrect
69         "t1_fund" from expected symbols.
70
71 2017-11-21  Pedro Alves  <palves@redhat.com>
72
73         * dwarf2read.c (mapped_index::name_components_casing): New field.
74         (mapped_index) <build_name_components,
75         find_name_components_bounds): Declare new methods.
76         (mapped_index::find_name_components_bounds)
77         (mapped_index::build_name_components): New methods, factored out
78         from dw2_expand_symtabs_matching_symbol.
79         (check_find_bounds_finds)
80         (test_mapped_index_find_name_component_bounds): New.
81         (run_test): Rename to ...
82         (test_dw2_expand_symtabs_matching_symbol): ... this.
83         (run_test): Reimplement.
84
85 2017-11-21  Pedro Alves  <palves@redhat.com>
86
87         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
88         (symbol_end): Use cp_ident_is_alnum.
89         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
90         * dwarf2read.c (make_sort_after_prefix_name): New function.
91         (dw2_expand_symtabs_matching_symbol): Use it.
92         (test_symbols): Add more symbols.
93         (run_test): Add tests.
94
95 2017-11-17  Tom Tromey  <tom@tromey.com>
96
97         * symtab.h (enum symbol_subclass_kind): New.
98         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
99         Remove.
100         <subclass>: New member.
101         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
102         * rust-lang.c (rust_get_trait_object_pointer): Update.
103         * dwarf2read.c (read_func_scope): Update.
104         (read_variable): Update.
105
106 2017-11-17  Tom Tromey  <tom@tromey.com>
107
108         * dwarf2read.c (read_func_scope): Update.
109         * symtab.h (struct template_symbol): Derive from symbol.
110         <base>: Remove.
111
112 2017-11-17  Tom Tromey  <tom@tromey.com>
113
114         * symtab.h (struct symbol) <is_rust_vtable>: New member.
115         (struct rust_vtable_symbol): New.
116         (find_symbol_at_address): Declare.
117         * symtab.c (find_symbol_at_address): New function.
118         * symfile.h (struct quick_symbol_functions)
119         <find_compunit_symtab_by_address>: New member.
120         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
121         function.
122         (debug_sym_quick_functions): Link to
123         debug_qf_find_compunit_symtab_by_address.
124         * rust-lang.c (rust_get_trait_object_pointer): New function.
125         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
126         rust_get_trait_object_pointer.
127         * psymtab.c (psym_relocate): Clear psymbol_map.
128         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
129         functions.
130         (psym_functions): Link to psym_find_compunit_symtab_by_address.
131         * objfiles.h (struct objfile) <psymbol_map>: New member.
132         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
133         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
134         (rust_containing_type, read_variable): New functions.
135
136 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
137
138         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
139
140 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
141
142         * common/filestuff.c: Include <algorithm>.
143         (open_fds): Change type to std::vector<int>.
144         (do_mark_open_fd): Adjust.
145         (unmark_fd_no_cloexec): Adjust.
146         (do_close): Adjust.
147
148 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
149
150         * breakpoint.c (output_thread_groups): Take an std::vector.
151         (print_one_breakpoint_location): Adjust.
152
153 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
154
155         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
156         (ada_evaluate_subexp_for_cast): New function.
157         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
158         ada_evaluate_subexp_for_cast.
159         (ada_evaluate_subexp) <nosideret>: Replace code by call to
160         eval_skip_value.
161         * eval.c (evaluate_var_value): Make non-static.
162         (evaluate_var_msym_value, eval_skip_value): Likewise.
163         * value.h (evaluate_var_value, evaluate_var_msym_value)
164         (eval_skip_value): Declare.
165
166 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
167
168         * ada-lang.c (ada_value_cast): Remove parameter "noside".
169         Update all callers.
170
171 2017-11-16  Pedro Alves  <palves@redhat.com>
172
173         * python/py-unwind.c (pyuw_sniffer): Translate
174         PyExc_KeyboardInterrupt to a GDB Quit exception.
175
176 2017-11-16  Pedro Alves  <palves@redhat.com>
177
178         * infrun.c (resume_cleanups): Delete.
179         (resume): No longer install a resume_cleanups cleanup nor call
180         QUIT.
181         (proceed): Pass the terminal to the inferior.
182         (keep_going_pass_signal): No longer install a resume_cleanups
183         cleanup.
184
185 2017-11-16  Pedro Alves  <palves@redhat.com>
186
187         * inf-loop.c (inferior_event_handler): Don't swallow the exception
188         if the prompt is blocked.
189
190 2017-11-16  Pedro Alves  <palves@redhat.com>
191
192         * breakpoint.c (insert_bp_location): Replace bp_err and
193         bp_err_message locals by a gdb_exception local.
194
195 2017-11-16  Pedro Alves  <palves@redhat.com>
196
197         * inflow.c (scoped_ignore_sigttou): New class.
198         (child_terminal_ours_1, new_tty): Use it.
199
200 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
201
202         * target-float.c (decimal_from_number): Add byte_order argument and
203         call match_endianness.  Error if unknown floating-point type.
204         (decimal_to_number): Add byte_order argument and call match_endianness.
205         (decimal_from_longest): Update call.  Do not call match_endianness.
206         (decimal_from_ulongest): Likewise.
207         (decimal_binop): Likewise.
208         (decimal_is_zero): Likewise.
209         (decimal_compare): Likewise.
210         (decimal_convert): Likewise.
211
212 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
213
214         * python/python.c (gdbpy_rbreak): New function.
215         * NEWS: Document Python rbreak feature.
216
217 2017-11-16  Yao Qi  <yao.qi@linaro.org>
218
219         * features/tic6x-c62x.xml: Remove.
220         * features/tic6x-c64x.xml: Remove.
221         * features/tic6x-c64xp.xml: Remove.
222
223 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
224
225         * symtab.h: Include <array>.
226
227 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
228
229         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
230         (bsd_kvm_proc_cmd): Likewise.
231
232 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
233
234         * tui/tui-win.c (window_name_completer): Replace VEC with
235         std::vector.
236
237 2017-11-15  Andrew Cagney  <cagney@gnu.org>
238
239         * MAINTAINERS: Remove no-longer applicable entries.
240
241 2017-11-15  Andrew Cagney  <cagney@gnu.org>
242
243         * MAINTAINERS: Move self to Past Maintainers.
244
245 2017-11-15  Yao Qi  <yao.qi@linaro.org>
246
247         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
248         * features/nios2-linux.c: Remove.
249         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
250         initialize_tdesc_nios2_linux.
251
252 2017-11-15  Yao Qi  <yao.qi@linaro.org>
253
254         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
255         M68HC11_LAST_HARD_REG + 1.
256
257 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
258
259         PR gdb/22388
260         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
261         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
262         Return TARGET_XFER_EOF if size of returned data is 0.
263
264 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
265
266         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
267         memory-map-selftests.c.
268         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
269         * memory-map.c (memory_map_start_memory): Fix computation of hi
270         address.
271         * unittests/memory-map-selftests.c: New file.
272
273 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
274
275         * ada-lang.c: Fix some typos in the general command documenting
276         how Ada expressions are being evaluated and how their result
277         is printed.
278
279 2017-11-09  Tom Tromey  <tom@tromey.com>
280
281         * psymtab.c (psymbol_hash): Do not hash string contents.
282         (psymbol_compare): Add comment.
283
284 2017-11-09  Tom Tromey  <tom@tromey.com>
285
286         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
287
288 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
289
290         * ada-exp.y (write_var_from_sym): Remove parameter
291         "orig_left_context".  Update all callers.
292
293 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
294
295         * tracepoint.h (class collection_list) <stringify>: Return
296         std::vector<std::string>.
297         (encode_actions_rsp): Change parameters to
298         std::vector<std::string> *.
299         * tracepoint.c (collection_list::stringify): Return
300         std::vector<std::string> and adjust accordingly.
301         (encode_actions_rsp): Changee parameters to
302         std::vector<std::string> and adjust accordingly.
303         * remote.c (free_actions_list),
304         free_actions_list_cleanup_wrapper): Remove.
305         (remote_download_tracepoint): Adjust to std::vector.
306
307 2017-11-08  Tom Tromey  <tom@tromey.com>
308
309         * dwarf2read.c (symbolp): Remove typedef.
310         (read_func_scope): Use std::vector.
311         (process_structure_scope): Use std::vector.
312
313 2017-11-08  Pedro Alves  <palves@redhat.com>
314
315         * ada-lang.c (ada_make_symbol_completion_list): Use
316         completion_skip_symbol.
317         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
318         (symbol_is_function_or_method(symbol*)): New.
319         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
320         completion_skip_symbol.
321         (default_collect_symbol_completion_matches_break_on): Use
322         completion_skip_symbol.  Pass down mode.
323         (collect_file_symbol_completion_matches): Pass down mode.
324         * symtab.h (symbol_is_function_or_method): New declarations.
325         (completion_skip_symbol): New template function.
326
327 2017-11-08  Pedro Alves  <palves@redhat.com>
328
329         * linespec.c (iterate_over_all_matching_symtabs): Add
330         search_domain parameter.  Pass it down to expand_symtabs_matching.
331         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
332         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
333         search_domain.
334         (add_all_symbol_names_from_pspace): Add search_domain parameter.
335         Pass it down.
336         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
337         symbols.
338         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
339         it down.
340
341 2017-11-08  Pedro Alves  <palves@redhat.com>
342
343         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
344         text_len locals and don't pass them down.
345         * symtab.c (completion_list_add_name): Remove
346         sym_text/sym_text_len parameters and adjust.
347         (completion_list_add_symbol, completion_list_add_msymbol)
348         (completion_list_objc_symbol, completion_list_add_fields)
349         (add_symtab_completions): Likewise.
350         (default_collect_symbol_completion_matches_break_on)
351         (collect_file_symbol_completion_matches): Remove sym_text_len
352         local and don't pass it down.
353         * symtab.h (completion_list_add_name): Remove
354         sym_text/sym_text_len parameters.
355
356 2017-11-08  Pedro Alves  <palves@redhat.com>
357
358         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
359         unittests/lookup_name_info-selftests.c.
360         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
361         * cp-support.c: Include "selftest.h".
362         (cp_remove_params_1): Rename from cp_remove_params.  Add
363         'require_param' parameter, and handle it.
364         (cp_remove_params): Reimplement.
365         (cp_remove_params_if_any): New.
366         (selftests::quote): New.
367         (selftests::check_remove_params): New.
368         (selftests::test_cp_remove_params): New.
369         (_initialize_cp_support): Install
370         selftests::test_cp_remove_params.
371         * cp-support.h (cp_remove_params_if_any): Declare.
372         * dwarf2read.c :Include "selftest.h".
373         (dw2_expand_symtabs_matching_symbol): Use
374         lookup_name_info::make_ignore_params.
375         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
376         (selftests::dw2_expand_symtabs_matching::string_or_null)
377         (selftests::dw2_expand_symtabs_matching::check_match)
378         (selftests::dw2_expand_symtabs_matching::test_symbols)
379         (selftests::dw2_expand_symtabs_matching::run_test): New.
380         (_initialize_dwarf2_read): Register
381         selftests::dw2_expand_symtabs_matching::run_test.
382         * psymtab.c (psym_expand_symtabs_matching): Use
383         lookup_name_info::make_ignore_params.
384         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
385         If the lookup name wants to ignore parameters, strip them.
386         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
387         code handling '('.
388         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
389         (default_collect_symbol_completion_matches_break_on): Don't try to
390         strip parameters.
391         * symtab.h (lookup_name_info::lookup_name_info): Add
392         'ignore_parameters' parameter.
393         (lookup_name_info::ignore_parameters)
394         (lookup_name_info::make_ignore_params): New methods.
395         (lookup_name_info::m_ignore_parameters): New field.
396         * unittests/lookup_name_info-selftests.c: New file.
397
398 2017-11-08  Pedro Alves  <palves@redhat.com>
399
400         * dwarf2read.c (dw2_expand_marked_cus)
401         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
402         (dw2_expand_symtabs_matching): Move further below.
403         (dw2_expand_marked_cus): Reindent.
404
405 2017-11-08  Pedro Alves  <palves@redhat.com>
406
407         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
408         (struct name_component): New.
409         (mapped_index::name_components): New field.
410         (mapped_index::symbol_name_at): New method.
411         (dwarf2_read_index): Call mapped_index ctor.
412         (dw2_map_matching_symbols): Add comment about name_components
413         table.
414         (dw2_expand_symtabs_matching): Factor part to...
415         (dw2_expand_symtabs_matching_symbol): ... this new function.
416         Build name components table, and lookup symbols in it before
417         calling the name matcher.
418         (dw2_expand_marked_cus): New, factored out from
419         dw2_expand_symtabs_matching.
420         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
421
422 2017-11-08   Pedro Alves  <palves@redhat.com>
423
424         * ada-lang.c (ada_encode): Rename to ..
425         (ada_encode_1): ... this.  Add throw_errors parameter and handle
426         it.
427         (ada_encode): Reimplement.
428         (match_name): Delete, folded into full_name.
429         (resolve_subexp): No longer pass the encoded name to
430         ada_lookup_symbol_list.
431         (should_use_wild_match): Delete.
432         (name_match_type_from_name): New.
433         (ada_lookup_simple_minsym): Use lookup_name_info and the
434         language's symbol_name_matcher_ftype.
435         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
436         (ada_add_block_renamings): Adjust to use lookup_name_info.
437         (ada_lookup_name): New.
438         (add_nonlocal_symbols, ada_add_all_symbols)
439         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
440         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
441         (ada_name_for_lookup): Delete.
442         (ada_lookup_encoded_symbol): Construct a verbatim name.
443         (wild_match): Reverse sense of return type.  Use bool.
444         (full_match): Reverse sense of return type.  Inline bits of old
445         match_name here.
446         (ada_add_block_symbols): Adjust to use lookup_name_info.
447         (symbol_completion_match): Delete, folded into...
448         (ada_lookup_name_info::matches): ... .this new method.
449         (symbol_completion_add): Delete.
450         (ada_collect_symbol_completion_matches): Add name_match_type
451         parameter.  Adjust to use lookup_name_info and
452         completion_list_add_name.
453         (get_var_value, ada_add_global_exceptions): Adjust to use
454         lookup_name_info.
455         (ada_get_symbol_name_cmp): Delete.
456         (do_wild_match, do_full_match): New functions.
457         (ada_lookup_name_info::ada_lookup_name_info): New method.
458         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
459         functions.
460         (ada_language_defn): Install ada_get_symbol_name_matcher.
461         * ada-lex.l (processId): If name starts with '<', copy it
462         verbatim.
463         * block.c (block_iter_match_step, block_iter_match_first)
464         (block_iter_match_next, block_lookup_symbol)
465         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
466         lookup_name_info.
467         * block.h (block_iter_match_first, block_iter_match_next)
468         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
469         * c-lang.c (c_language_defn, cplus_language_defn)
470         (asm_language_defn, minimal_language_defn): Adjust comments to
471         refer to la_get_symbol_name_matcher.
472         * completer.c (complete_files_symbols)
473         (collect_explicit_location_matches, symbol_completer): Pass a
474         symbol_name_match_type down.
475         * completer.h (class completion_match, completion_match_result):
476         New classes.
477         (completion_tracker::reset_completion_match_result): New method.
478         (completion_tracker::m_completion_match_result): New field.
479         * cp-support.c (make_symbol_overload_list_block): Adjust to use
480         lookup_name_info.
481         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
482         functions.
483         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
484         * d-lang.c: Adjust comments to refer to
485         la_get_symbol_name_matcher.
486         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
487         Adjust to use lookup_name_info.
488         (dict_iter_match_first, dict_iter_match_next)
489         (iter_match_first_hashed, iter_match_next_hashed)
490         (iter_match_first_linear, iter_match_next_linear): Adjust to work
491         with a lookup_name_info.
492         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
493         Likewise.
494         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
495         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
496         (gdb_index_symbol_name_matcher): New class.
497         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
498         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
499         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
500         with a symbol_name_match_type.
501         (f_language_defn): Adjust comments to refer to
502         la_get_symbol_name_matcher.
503         * go-lang.c (go_language_defn): Adjust comments to refer to
504         la_get_symbol_name_matcher.
505         * language.c (default_symbol_name_matcher)
506         (language_get_symbol_name_matcher): New functions.
507         (unknown_language_defn, auto_language_defn): Adjust comments to
508         refer to la_get_symbol_name_matcher.
509         * language.h (symbol_name_cmp_ftype): Delete.
510         (language_defn) <la_collect_symbol_completion_matches>: Add match
511         type parameter.
512         <la_get_symbol_name_cmp>: Delete field.
513         <la_get_symbol_name_matcher>: New field.
514         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
515         (default_symbol_name_matcher, language_get_symbol_name_matcher):
516         Declare.
517         * linespec.c (iterate_over_all_matching_symtabs)
518         (iterate_over_file_blocks): Adjust to use lookup_name_info.
519         (find_methods): Add language parameter, and use lookup_name_info
520         and the language's symbol_name_matcher_ftype.
521         (linespec_complete_function): Adjust.
522         (lookup_prefix_sym): Use lookup_name_info.
523         (add_all_symbol_names_from_pspace): Adjust.
524         (find_superclass_methods): Add language parameter and pass it
525         down.
526         (find_method): Pass symbol language down.
527         (find_linespec_symbols): Don't demangle or Ada encode here.
528         (search_minsyms_for_name): Add lookup_name_info parameter.
529         (add_matching_symbols_to_info): Add name_match_type parameter.
530         Use lookup_name_info.
531         * m2-lang.c (m2_language_defn): Adjust comments to refer to
532         la_get_symbol_name_matcher.
533         * minsyms.c: Include <algorithm>.
534         (add_minsym_to_demangled_hash_table): Remove table parameter and
535         add objfile parameter.  Use search_name_hash, and add language to
536         demangled languages vector.
537         (struct found_minimal_symbols): New struct.
538         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
539         New functions.
540         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
541         input names here.  Use lookup_name_info instead.  Lookup up
542         demangled names once for each language in the demangled names
543         vector.
544         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
545         demangled names once for each language in the demangled names
546         vector.
547         (build_minimal_symbol_hash_tables): Adjust.
548         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
549         lookup_name_info.
550         * objc-lang.c (objc_language_defn): Adjust comment to refer to
551         la_get_symbol_name_matcher.
552         * objfiles.h: Include <vector>.
553         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
554         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
555         la_get_symbol_name_matcher.
556         * p-lang.c (pascal_language_defn): Adjust comment to refer to
557         la_get_symbol_name_matcher.
558         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
559         (match_partial_symbol): Use symbol_name_match_type,
560         lookup_name_info and psymbol_name_matches.
561         (lookup_partial_symbol): Use lookup_name_info.
562         (map_block): Use symbol_name_match_type and lookup_name_info.
563         (psym_map_matching_symbols): Use symbol_name_match_type.
564         (psymbol_name_matches): New.
565         (recursively_search_psymtabs): Use lookup_name_info and
566         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
567         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
568         'kind' parameter to 'domain'.
569         * rust-lang.c (rust_language_defn): Adjust comment to refer to
570         la_get_symbol_name_matcher.
571         * symfile-debug.c (debug_qf_map_matching_symbols)
572         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
573         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
574         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
575         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
576         Adjust to use symbol_name_match_type.
577         <expand_symtabs_matching>: Adjust to use lookup_name_info.
578         (expand_symtabs_matching): Adjust to use lookup_name_info.
579         * symmisc.c (maintenance_expand_symtabs): Use
580         lookup_name_info::match_any ().
581         * symtab.c (symbol_matches_search_name): New.
582         (eq_symbol_entry): Adjust to use lookup_name_info and the
583         language's matcher.
584         (demangle_for_lookup_info::demangle_for_lookup_info): New.
585         (lookup_name_info::match_any): New.
586         (iterate_over_symbols, search_symbols): Use lookup_name_info.
587         (compare_symbol_name): Add language, lookup_name_info and
588         completion_match_result parameters, and use them.
589         (completion_list_add_name): Make extern.  Add language and
590         lookup_name_info parameters.  Use them.
591         (completion_list_add_symbol, completion_list_add_msymbol)
592         (completion_list_objc_symbol): Add lookup_name_info parameters and
593         adjust.  Pass down language.
594         (completion_list_add_fields): Add lookup_name_info parameters and
595         adjust.  Pass down language.
596         (add_symtab_completions): Add lookup_name_info parameters and
597         adjust.
598         (default_collect_symbol_completion_matches_break_on): Add
599         name_match_type parameter, and use it.  Use lookup_name_info.
600         (default_collect_symbol_completion_matches)
601         (collect_symbol_completion_matches): Add name_match_type
602         parameter, and pass it down.
603         (collect_symbol_completion_matches_type): Adjust.
604         (collect_file_symbol_completion_matches): Add name_match_type
605         parameter, and use lookup_name_info.
606         * symtab.h: Include <string> and "common/gdb_optional.h".
607         (enum class symbol_name_match_type): New.
608         (class ada_lookup_name_info): New.
609         (struct demangle_for_lookup_info): New.
610         (class lookup_name_info): New.
611         (symbol_name_matcher_ftype): New.
612         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
613         (symbol_matches_search_name): Declare.
614         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
615         (default_collect_symbol_completion_matches)
616         (collect_symbol_completion_matches)
617         (collect_file_symbol_completion_matches): Add name_match_type
618         parameter.
619         (iterate_over_symbols): Use lookup_name_info.
620         (completion_list_add_name): Declare.
621         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
622         (strncmp_iw_with_mode): Now extern.
623         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
624         (strncmp_iw_with_mode): Declare.
625
626 2017-11-08  Keith Seitz  <keiths@redhat.com>
627             Pedro Alves  <palves@redhat.com>
628
629         * ada-lang.c (ada_language_defn): Install
630         default_search_name_hash.
631         * buildsym.c (struct buildsym_compunit): <language>: New field.
632         (finish_block_internal): Pass language when creating dictionaries.
633         (start_buildsym_compunit, start_symtab): New language parameters.
634         Use them.
635         (restart_symtab): Pass down compilation unit's language.
636         * buildsym.h (enum language): Forward declare.
637         (start_symtab): New 'language' parameter.
638         * c-lang.c (c_language_defn, cplus_language_defn)
639         (asm_language_defn, minimal_language_defn): Install
640         default_search_name_hash.
641         * coffread.c (coff_start_symtab): Adjust.
642         * d-lang.c (d_language_defn): Install default_search_name_hash.
643         * dbxread.c (struct symloc): Add 'pst_language' field.
644         (PST_LANGUAGE): Define.
645         (start_psymtab, read_ofile_symtab): Use it.
646         (process_one_symbol): New 'language' parameter.  Pass it down.
647         * dictionary.c (struct dictionary) <language>: New field.
648         (DICT_LANGUAGE): Define.
649         (dict_create_hashed, dict_create_hashed_expandable)
650         (dict_create_linear, dict_create_linear_expandable): New parameter
651         'language'.  Set the dictionary's language.
652         (iter_match_first_hashed): Adjust to rename.
653         (insert_symbol_hashed): Assert we don't see mismatching
654         languages.  Adjust to rename.
655         (dict_hash): Rename to ...
656         (default_search_name_hash): ... this and make extern.
657         * dictionary.h (struct language_defn): Forward declare.
658         (dict_create_hashed): New parameter 'language'.
659         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
660         * f-lang.c (f_language_defn): Install default_search_name_hash.
661         * go-lang.c (go_language_defn): Install default_search_name_hash.
662         * jit.c (finalize_symtab): Pass compunit's language to dictionary
663         creation.
664         * language.c (unknown_language_defn, auto_language_defn):
665         * language.h (language_defn::la_search_name_hash): New field.
666         (default_search_name_hash): Declare.
667         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
668         * mdebugread.c (new_block): New parameter 'language'.
669         * mdebugread.c (parse_symbol): Pass symbol language to block
670         allocation.
671         (psymtab_to_symtab_1): Pass down language.
672         (new_symtab): Pass compunit's language to block allocation.
673         * objc-lang.c (objc_language_defn): Install
674         default_search_name_hash.
675         * opencl-lang.c (opencl_language_defn):
676         * p-lang.c (pascal_language_defn): Install
677         default_search_name_hash.
678         * rust-lang.c (rust_language_defn): Install
679         default_search_name_hash.
680         * stabsread.h (enum language): Forward declare.
681         (process_one_symbol): Add 'language' parameter.
682         * symtab.c (search_name_hash): New function.
683         * symtab.h (search_name_hash): Declare.
684         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
685
686 2017-11-08  Pedro Alves  <palves@redhat.com>
687
688         * cp-name-parser.y (main): Don't initialize extra_chars.
689
690 2017-11-07  Tom Tromey  <tom@tromey.com>
691
692         * event-top.h (command_handler): Constify.
693         * record-full.c (cmd_record_full_start): Update.
694         * thread.c (thread_apply_all_command): Update.
695         * printcmd.c (eval_command): Update.
696         * mi/mi-main.c (mi_execute_cli_command): Update.
697         (mi_execute_async_cli_command): Update.
698         * tui/tui-stack.c (tui_update_command): Update.
699         * cli/cli-interp.c (safe_execute_command): Constify.
700         * record.c (record_start): Update.
701         (record_start, record_stop, cmd_record_start): Update.
702         * record-btrace.c (cmd_record_btrace_bts_start): Update.
703         (cmd_record_btrace_pt_start): Update.
704         (cmd_record_btrace_start): Update.
705         (cmd_record_btrace_start): Update.
706         * reverse.c (exec_reverse_once): Update.
707         * python/python.c (execute_gdb_command): Don't copy the command.
708         * event-top.c (command_line_handler): Update.
709         (command_handler): Constify.
710         * defs.h (deprecated_call_command_hook): Constify.
711         * cli/cli-script.h (execute_user_command): Constify.
712         * cli/cli-script.c (execute_user_command): Constify.
713         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
714         (enum command_control_type): Update.
715         * main.c (catch_command_errors): Remove non-const overload.
716         (catch_command_errors_ftype): Remove.
717         * python/py-cmd.c (cmdpy_function): Constify.
718         * guile/scm-cmd.c (cmdscm_function): Constify.
719         * cli/cli-dump.c (call_dump_func): Constify.
720         * cli/cli-decode.c (do_const_cfunc): Constify.
721         (do_sfunc): Constify.
722         (cmd_func): Constify.
723         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
724         * top.h (execute_command): Constify.
725         * top.c (execute_command): Constify.
726         (execute_command_to_string): Constify.
727         (deprecated_call_command_hook): Constify.
728         * command.h (cmd_func): Constify.
729         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
730
731 2017-11-07  Tom Tromey  <tom@tromey.com>
732
733         * ada-lang.c (catch_ada_exception_command): Constify.
734         (catch_assert_command): Constify.
735         * break-catch-throw.c (catch_catch_command, catch_throw_command)
736         (catch_rethrow_command): Constify.
737         (catch_exception_command_1): Constify.
738         * breakpoint.h (add_catch_command): Constify.
739         * break-catch-syscall.c (catch_syscall_command_1): Constify.
740         (catch_syscall_split_args): Constify.
741         * break-catch-sig.c (catch_signal_command): Constify.
742         (catch_signal_split_args): Constify.
743         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
744         cmd_const_sfunc_ftype.
745         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
746         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
747         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
748         (add_setshow_string_cmd, struct cmd_list_element)
749         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
750         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
751         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
752         Constify.
753         (set_cmd_sfunc): Constify.
754         (empty_sfunc): Constify.
755         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
756         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
757         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
758         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
759         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
760         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
761         Constify.
762         (set_cmd_sfunc): Constify.
763         (cmd_sfunc_ftype): Remove.
764         * compile/compile.c (set_compile_args): Constify.
765         * infrun.c (set_disable_randomization): Constify.
766         * infcmd.c (set_args_command, set_cwd_command): Constify.
767         * breakpoint.c (set_condition_evaluation_mode): Constify.
768         (add_catch_command): Constify.
769         (catch_fork_command_1, catch_exec_command_1)
770         (catch_load_command_1, catch_unload_command_1): Constify.
771         (catch_load_or_unload): Constify.
772         * guile/scm-param.c (pascm_set_func): Constify.
773         (add_setshow_generic): Constify.
774         * python/py-param.c (get_set_value): Constify.
775         * top.h (set_verbose): Constify.
776         * tui/tui-win.c (tui_set_var_cmd): Constify.
777         * mi/mi-main.c (set_mi_async_command): Constify.
778         * cli/cli-logging.c (set_logging_overwrite)
779         (set_logging_redirect): Constify.
780         * value.c (set_max_value_size): Constify.
781         * valprint.c (set_input_radix, set_output_radix): Constify.
782         * utils.c (set_width_command, set_height_command): Constify.
783         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
784         * tracepoint.c (set_disconnected_tracing)
785         (set_circular_trace_buffer, set_trace_buffer_size)
786         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
787         * top.c (set_history_size_command, set_verbose, set_editing)
788         (set_gdb_datadir, set_history_filename): Constify.
789         * target.c (set_targetdebug, maint_set_target_async_command)
790         (maint_set_target_non_stop_command, set_target_permissions)
791         (set_write_memory_permission): Constify.
792         (open_target): Constify.
793         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
794         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
795         * symtab.c (set_symbol_cache_size_handler): Constify.
796         * symfile.c (set_ext_lang_command): Constify.
797         * symfile-debug.c (set_debug_symfile): Constify.
798         * source.c (set_directories_command): Constify.
799         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
800         * serial.c (set_parity): Constify.
801         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
802         * remote.c (set_remote_exec_file, set_remotebreak)
803         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
804         * record.c (set_record_insn_history_size)
805         (set_record_call_history_size): Constify.
806         * record-full.c (set_record_full_insn_max_num): Constify.
807         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
808         * osabi.c (set_osabi): Constify.
809         * mips-tdep.c (set_mips64_transfers_32bit_regs)
810         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
811         * maint.c (maintenance_set_profile_cmd): Constify.
812         * linux-thread-db.c (set_libthread_db_search_path): Constify.
813         * language.c (set_language_command, set_range_command)
814         (set_case_command): Constify.
815         * infrun.c (set_non_stop, set_observer_mode)
816         (set_stop_on_solib_events, set_schedlock_func)
817         (set_exec_direction_func): Constify.
818         * infcmd.c (set_inferior_tty_command): Constify.
819         * disasm.c (set_disassembler_options_sfunc): Constify.
820         * demangle.c (set_demangling_command): Constify.
821         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
822         * cris-tdep.c (set_cris_version, set_cris_mode)
823         (set_cris_dwarf2_cfi): Constify.
824         * corefile.c (set_gnutarget_command): Constify.
825         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
826         (set_target_wide_charset_sfunc): Constify.
827         * breakpoint.c (update_dprintf_commands): Constify.
828         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
829         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
830         (set_disassembly_style_sfunc): Constify.
831         * arch-utils.c (set_endian, set_architecture): Constify.
832         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
833         * agent.c (set_can_use_agent): Constify.
834
835 2017-11-07  Tom Tromey  <tom@tromey.com>
836
837         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
838         (go32_pde, go32_pte, go32_pte_for_address): Constify.
839         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
840         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
841         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
842         (parse_int_arg, show_thread_default_detach_sc_cmd)
843         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
844         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
845         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
846         (show_task_pause_cmd, set_task_detach_sc_cmd)
847         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
848         (set_noninvasive_cmd, set_thread_pause_cmd)
849         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
850         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
851         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
852         * windows-nat.c (display_selectors): Constify.
853         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
854         non-const "cfunc".
855         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
856         (cmd_cfunc_eq): Likewise.
857         (struct cmd_list_element): Likewise.
858         (do_cfunc): Remove.
859         (cli_user_command_p): Update.
860         * command.h (add_cmd): Remove non-const overload.
861         (cmd_cfunc_ftype): Remove typedef.
862         (cmd_cfunc_eq): Remove non-const overload.
863         * value.c (show_values): Constify.
864         * thread.c (thread_apply_all_command): Constify.
865         * symfile.c (load_command): Constify.
866         * source.c (directory_command): Constify.
867         * maint.c (maintenance_internal_error)
868         (maintenance_demangler_warning, maintenance_space_display)
869         (maintenance_print_architecture, maintenance_translate_address)
870         (maintenance_info_selftests, maintenance_internal_warning):
871         Constify.
872         * breakpoint.c (disable_trace_command, enable_trace_command):
873         Constify.
874         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
875         Constify.
876         (add_auto_load_safe_path): Constify.
877         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
878         * top.h (show_commands): Constify.
879         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
880         * sparc64-tdep.c (adi_examine_command): Constify.
881         (adi_assign_command): Constify.
882
883 2017-11-07  Tom Tromey  <tom@tromey.com>
884
885         * frame.h (info_locals_command, info_args_command): Constify.
886         * auto-load.h (auto_load_info_scripts): Constify.
887         * inferior.h (registers_info): Constify.
888         * copying.c: Rebuild.
889         * copying.awk: Constify generated commands.
890         * auto-load.c (auto_load_info_scripts)
891         (info_auto_load_gdb_scripts): Constify.
892         * cli/cli-decode.c (struct cmd_list_element): Take a
893         cmd_const_cfunc_ftype.
894         * command.h (add_info): Take a cmd_const_cfunc_ftype.
895         * tui/tui-win.c (tui_all_windows_info): Constify.
896         * python/py-auto-load.c (info_auto_load_python_scripts):
897         Constify.
898         * cli/cli-cmds.c (show_command): Remove non-const overload.
899         * tracepoint.c (info_tvariables_command, info_scope_command):
900         Constify.
901         (info_static_tracepoint_markers_command): Constify.
902         * thread.c (info_threads_command): Constify.
903         (print_thread_info_1): Constify.
904         * target.c (info_target_command): Constify.
905         * symtab.c (info_sources_command, info_functions_command)
906         (info_types_command): Constify.
907         (info_variables_command): Remove non-const overload.
908         * symfile.c (info_ext_lang_command): Constify.
909         * stack.c (info_frame_command, info_locals_command)
910         (info_args_command): Constify.
911         (backtrace_command): Remove non-const overload.
912         * source.c (info_source_command, info_line_command): Constify.
913         * solib.c (info_sharedlibrary_command): Constify.
914         * skip.c (info_skip_command): Constify.
915         * ser-go32.c (info_serial_command): Constify.
916         * reverse.c (info_bookmarks_command): Constify.
917         * printcmd.c (info_symbol_command, info_address_command)
918         (info_display_command): Constify.
919         * osdata.c (info_osdata_command): Constify.
920         * objc-lang.c (info_selectors_command, info_classes_command):
921         Constify.
922         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
923         * memattr.c (info_mem_command): Constify.
924         * macrocmd.c (info_macro_command, info_macros_command): Constify.
925         * linux-fork.c (info_checkpoints_command): Constify.
926         * infrun.c (info_signals_command): Constify.
927         * inflow.c (info_terminal_command): Constify.
928         * inferior.c (info_inferiors_command): Constify.
929         (print_inferior): Constify.
930         * infcmd.c (info_program_command, info_all_registers_command)
931         (info_registers_command, info_vector_command)
932         (info_float_command): Constify.
933         (registers_info): Constify.
934         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
935         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
936         Constify.
937         * f-valprint.c (info_common_command): Constify.
938         * dcache.c (info_dcache_command): Constify.
939         (dcache_info_1): Constify.
940         * darwin-nat-info.c (info_mach_tasks_command)
941         (info_mach_task_command, info_mach_ports_command)
942         (info_mach_port_command, info_mach_threads_command)
943         (info_mach_thread_command, info_mach_regions_command)
944         (info_mach_regions_recurse_command, info_mach_region_command)
945         (info_mach_exceptions_command): Constify.
946         (get_task_from_args): Constify.
947         * cp-support.c (info_vtbl_command): Constify.
948         * breakpoint.c (info_watchpoints_command)
949         (info_tracepoints_command): Constify.
950         (info_breakpoints_command): Remove non-const overload.
951         * avr-tdep.c (avr_io_reg_read_command): Constify.
952         * auxv.c (info_auxv_command): Constify.
953         * ada-tasks.c (info_tasks_command): Constify.
954         (info_task): Constify.
955         * ada-lang.c (info_exceptions_command): Constify.
956
957 2017-11-07  Tom Tromey  <tom@tromey.com>
958
959         * solib.h (no_shared_libraries): Constify.
960         * frame.h (return_command): Constify.
961         * cli/cli-cmds.h (quit_command): Constify.
962         * top.h (quit_command, execute_command): Constify.
963         * target.h (flash_erase_command): Constify.
964         * inferior.h (set_inferior_args, attach_command): Constify.
965         * tracepoint.h (start_tracing, stop_tracing): Constify.
966         * breakpoint.h (break_command, tbreak_command)
967         (hbreak_command_wrapper, thbreak_command_wrapper)
968         (rbreak_command_wrapper, watch_command_wrapper)
969         (awatch_command_wrapper, rwatch_command_wrapper)
970         (get_tracepoint_by_number): Constify.
971         * symtab.c (info_variables_command, rbreak_command)
972         (symtab_symbol_info): Constify.
973         (info_variables_command): Add non-const overload.
974         * top.c (dont_repeat_command): Constify.
975         * breakpoint.c (ignore_command, commands_command)
976         (condition_command, tbreak_command, hbreak_command)
977         (thbreak_command, clear_command, break_command)
978         (info_breakpoints_command, watch_command, rwatch_command)
979         (awatch_command, trace_command, ftrace_command, strace_command)
980         (trace_pass_command, break_range_command, dprintf_command)
981         (agent_printf_command, get_tracepoint_by_number)
982         (watch_maybe_just_location, trace_pass_command): Constify.
983         (info_breakpoints_command): Add non-const overload.
984         * tracefile.c (tsave_command): Constify.
985         * infcmd.c (attach_command, disconnect_command, signal_command)
986         (queue_signal_command, stepi_command, nexti_command)
987         (finish_command, next_command, step_command, until_command)
988         (advance_command, jump_command, continue_command, run_command)
989         (start_command, starti_command, interrupt_command)
990         (run_command_1, set_inferior_args, step_1): Constify.
991         * inferior.c (add_inferior_command, remove_inferior_command)
992         (clone_inferior_command): Constify.
993         * linux-fork.c (checkpoint_command, restart_command): Constify.
994         * windows-nat.c (signal_event_command): Constify.
995         * guile/guile.c (guile_repl_command, guile_command): Constify.
996         * printcmd.c (x_command, display_command, printf_command)
997         (output_command, set_command, call_command, print_command)
998         (eval_command): Constify.
999         (non_const_set_command): Remove.
1000         (_initialize_printcmd): Update.
1001         * source.c (forward_search_command, reverse_search_command):
1002         Constify.
1003         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1004         Constify.
1005         * infrun.c (handle_command): Constify.
1006         * memattr.c (mem_command): Constify.
1007         * stack.c (return_command, up_command, up_silently_command)
1008         (down_command, down_silently_command, frame_command)
1009         (backtrace_command, func_command, backtrace_command_1): Constify.
1010         (backtrace_command): Add non-const overload.
1011         * remote-sim.c (simulator_command): Constify.
1012         * exec.c (set_section_command): Constify.
1013         * tracepoint.c (tdump_command, trace_variable_command)
1014         (tstatus_command, tstop_command, tstart_command)
1015         (end_actions_pseudocommand, while_stepping_pseudocommand)
1016         (collect_pseudocommand, teval_pseudocommand, actions_command)
1017         (start_tracing, stop_tracing): Constify.
1018         * value.c (init_if_undefined_command): Constify.
1019         * tui/tui-stack.c (tui_update_command): Constify.
1020         * tui/tui-win.c (tui_refresh_all_command)
1021         (tui_set_tab_width_command, tui_set_win_height_command)
1022         (tui_set_focus_command, tui_scroll_forward_command)
1023         (tui_scroll_backward_command, tui_scroll_left_command)
1024         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1025         (tui_set_win_height): Constify.
1026         * tui/tui-layout.c (tui_layout_command): Constify.
1027         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1028         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1029         (proc_untrace_sysexit_cmd): Constify.
1030         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1031         (threadset_test_cmd, threadlist_update_test_cmd)
1032         (threadalive_test): Constify.
1033         * objc-lang.c (print_object_command): Constify.
1034         * command.h (add_com): Constify.
1035         * cli/cli-dump.c (restore_command): Constify.
1036         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1037         (help_command, complete_command, shell_command, edit_command)
1038         (list_command, disassemble_command, make_command)
1039         (apropos_command, alias_command): Constify.
1040         * cli/cli-script.c (document_command, define_command)
1041         (while_command, if_command, validate_comname): Constify.
1042         * cli/cli-decode.c (struct cmd_list_element): Change type of
1043         "fun".
1044         * target.c (do_monitor_command, flash_erase_command): Constify.
1045         * regcache.c (reg_flush_command): Constify.
1046         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1047         (reverse_nexti, reverse_continue, reverse_finish)
1048         (save_bookmark_command, goto_bookmark_command)
1049         (exec_reverse_once): Constify.
1050         * python/python.c (python_interactive_command, python_command):
1051         Constify.
1052         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1053         Constify.
1054         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1055         * gcore.c (gcore_command): Constify.
1056
1057 2017-11-07  Tom Tromey  <tom@tromey.com>
1058
1059         * printcmd.c (x_command): Call set_repeat_arguments.
1060         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1061         * top.c (repeat_arguments): New global.
1062         (set_repeat_arguments): New function.
1063         (execute_command): Handle repeat_arguments.
1064         (show_commands): Calls set_repeat_arguments.
1065         * command.h (set_repeat_arguments): Declare.
1066
1067 2017-11-07  Tom Tromey  <tom@tromey.com>
1068
1069         * stack.c (backtrace_command): Use std::string.
1070         (backtrace_command_1): Make "count_exp" const.
1071
1072 2017-11-07  Tom Tromey  <tom@tromey.com>
1073
1074         * source.c (directory_switch, mod_path, add_path): Constify.
1075         * defs.h (add_path, mod_path, directory_switch): Constify.
1076         * mi/mi-cmd-env.c (env_mod_path): Constify.
1077
1078 2017-11-07  Tom Tromey  <tom@tromey.com>
1079
1080         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1081         (run_command_1, continue_command, step_1, jump_command)
1082         (signal_command, until_command, advance_command, finish_command)
1083         (attach_command): Update.
1084
1085 2017-11-07  Tom Tromey  <tom@tromey.com>
1086
1087         * command.h (set_cmd_cfunc): Don't declare.
1088         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1089
1090 2017-11-07  Tom Tromey  <tom@tromey.com>
1091
1092         * stack.c (select_frame_command): Constify.
1093         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1094         * command.h (add_com_suppress_notification): Constify.
1095
1096 2017-11-07  Tom Tromey  <tom@tromey.com>
1097
1098         * breakpoint.c (stop_command): Constify.
1099         * cli/cli-decode.c (struct cmd_list_element): Constify.
1100         * command.h (add_abbrev_prefix_cmd): Constify.
1101
1102 2017-11-07  Pedro Alves  <palves@redhat.com>
1103
1104         * breakpoint.c (extract_bp_kind): New enum.
1105         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1106         factored out from ...
1107         (extract_bp_number_and_location): ... here.
1108         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1109
1110 2017-11-07  Pedro Alves  <palves@redhat.com>
1111
1112         * breakpoint.c (extract_bp_number_and_location): Change return
1113         type to void.  Throw error instead of warning.
1114         (enable_disable_command): Adjust.
1115
1116 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1117             Pedro Alves  <palves@redhat.com>
1118
1119         * breakpoint.c (map_breakpoint_number_range): New, factored out
1120         from ...
1121         (map_breakpoint_numbers): ... here.
1122         (find_location_by_number): Change parameters from string to
1123         breakpoint number and location.
1124         (extract_bp_number_and_location): New function.
1125         (enable_disable_bp_num_loc)
1126         (enable_disable_breakpoint_location_range)
1127         (enable_disable_command): New functions, factored out ...
1128         (enable_command, disable_command): ... these functions, and
1129         adjusted to support ranges.
1130         * NEWS: Document enable/disable breakpoint location range feature.
1131
1132 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1133
1134         * MAINTAINERS (Write After Approval): Update my e-mail address.
1135
1136 2017-11-06  Pedro Alves  <palves@redhat.com>
1137
1138         * gnu-nat.c (gnu_terminal_init): Delete.
1139         (gnu_target): Don't install gnu_terminal_init.
1140         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1141         (child_terminal_init): ... this function.
1142
1143 2017-11-06  Pedro Alves  <palves@redhat.com>
1144
1145         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1146         sgtty.h.
1147         * config.in, configure: Regenerate.
1148
1149 2017-11-06  Pedro Alves  <palves@redhat.com>
1150
1151         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1152         (async_init_signals): Adjust.
1153         (handle_stop_sig): Rename to ...
1154         (handle_sigtstp): ... this.
1155         (async_stop_sig): Rename to ...
1156         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1157         SIGTSTP path.
1158         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1159         instead of STOP_SIGNAL thoughout.
1160         (handle_stop_sig): Rename to ...
1161         (handle_sigtstp): ... this.
1162         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1163
1164 2017-11-06  Pedro Alves  <palves@redhat.com>
1165
1166         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1167         longer set flags twice in row.
1168
1169 2017-11-06  Pedro Alves  <palves@redhat.com>
1170
1171         * Makefile.in (SER_HARDWIRE): Update comment.
1172         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1173         * common/gdb_termios.h: Delete file.
1174         * common/job-control.c: Include termios.h and unistd.h instead of
1175         gdb_termios.h.
1176         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1177         check.
1178         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1179         Remove sgtty code.
1180         * configure.ac: No longer check for termio.h and sgtty.h.
1181         * configure: Regenerate.
1182         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1183         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1184         Replace PROCESS_GROUP_TYPE references with pid_t references
1185         throughout.
1186         (gdb_getpgrp): Delete.
1187         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1188         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1189         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1190         gdb_getpgrp.  Use serial_set_tty_state instead aof
1191         serial_noflush_set_tty_state.  Remove sgtty code.
1192         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1193         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1194         (inferior_process_group): Now returns pid_t.
1195         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1196         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1197         * ser-event.c (serial_event_ops): Update.
1198         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1199         (dos_ops): Update.
1200         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1201         * ser-pipe.c (pipe_ops): Update.
1202         * ser-tcp.c (tcp_ops): Update.
1203         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1204         HAVE_TERMIOS checks.
1205         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1206         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1207         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1208         assume termios.
1209         (hardwire_noflush_set_tty_state): Delete.
1210         (hardwire_print_tty_state, hardwire_drain_output)
1211         (hardwire_flush_output, hardwire_flush_input)
1212         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1213         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1214         code, and assume termios.
1215         (hardwire_ops): Update.
1216         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1217         * serial.c (serial_noflush_set_tty_state): Delete.
1218         * serial.h (serial_noflush_set_tty_state): Delete.
1219         (serial_ops::noflush_set_tty_state): Delete.
1220
1221 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1222
1223         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1224         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1225         (COMMON_OBS): Remove doublest.o and dfp.o.
1226         Do not build target-float.c (instead of doublest.c)
1227         with -Wformat-nonliteral.
1228
1229         * doublest.c: Remove file.
1230         * doublest.h: Remove file.
1231         * dfp.c: Remove file.
1232         * dfp.h: Remove file.
1233
1234         * target-float.c: Do not include "doublest.h" and "dfp.h".
1235         (DOUBLEST): Move here from doublest.h.
1236         (enum float_kind): Likewise.
1237         (FLOATFORMAT_CHAR_BIT): Likewise.
1238         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1239         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1240         (floatformat_precision): Likewise.
1241         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1242         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1243         Likewise.
1244         (host_float_format, host_double_format, host_long_double_format):
1245         Likewise.
1246         (floatformat_to_string, floatformat_from_string): Likewise.
1247         (floatformat_to_doublest): Likewise.  Also, inline the original
1248         convert_floatformat_to_doublest.
1249         (floatformat_from_doublest): Likewise.  Also, inline the original
1250         convert_floatformat_from_doublest.
1251
1252         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1253         (MAX_DECIMAL_STRING): Move here from dfp.c.
1254         (match_endianness): Likewise.
1255         (set_decnumber_context, decimal_check_errors): Likewise.
1256         (decimal_from_number, decimal_to_number): Likewise.
1257         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1258         (decimal_from_longest, decimal_from_ulongest): Likewise.
1259         (decimal_to_longest): Likewise.
1260         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1261         (decimal_convert): Likewise.
1262
1263 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1264
1265         * doublest.c: Do not include "gdbtypes.h".
1266         (extract_typed_floating): Remove.
1267         (store_typed_floating): Remove.
1268         (convert_typed_floating): Remove.
1269         * doublest.h (struct type): Remove.
1270         (DOUBLEST_PRINT_FORMAT): Remove.
1271         (DOUBLEST_SCAN_FORMAT): Remove.
1272         (extract_typed_floating): Remove.
1273         (store_typed_floating): Remove.
1274         (convert_typed_floating): Remove.
1275
1276         * dfp.c (decimal_from_doublest): Remove.
1277         (decimal_to_doublest): Remove.
1278         * dfp.h: Do not include "doublest.h".
1279         (decimal_from_doublest): Remove.
1280         (decimal_to_doublest): Remove.
1281
1282         * value.c: Do not include "doublest.h" and "dfp.h".
1283         (value_as_double): Remove.
1284         (unpack_double): Remove.
1285         (value_from_double): Remove.
1286         (value_from_decfloat): Remove.
1287         * value.h: Do not include "doublest.h".
1288         (value_as_double): Remove.
1289         (unpack_double): Remove.
1290         (value_from_double): Remove.
1291         (value_from_decfloat): Remove.
1292
1293 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1294
1295         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1296         (i386_extract_return_value): Use target_float_convert.
1297         (i386_store_return_value): Likewise.
1298         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1299         (i387_value_to_register): Likewise.
1300         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1301         (ia64_register_to_value): Use target_float_convert.
1302         (ia64_value_to_register): Likewise.
1303         (ia64_extract_return_value): Likewise.
1304         (ia64_store_return_value): Likewise.
1305         (ia64_push_dummy_call): Likewise.
1306         * m68k-tdep.c: Include "target-float.h".
1307         (m68k_register_to_value): Use target_float_convert.
1308         (m68k_value_to_register): Likewise.
1309         (m68k_svr4_extract_return_value): Likewise.
1310         (m68k_svr4_store_return_value): Likewise.
1311         * ppc-sysv-tdep.c: Include "target-float.h".
1312         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1313         (do_ppc_sysv_return_value): Likewise.
1314         (ppc64_sysv_abi_push_freg): Likewise.
1315         (ppc64_sysv_abi_return_value_base): Likewise.
1316         * rs6000-aix-tdep.c: Include "target-float.h".
1317         (rs6000_push_dummy_call): Use target_float_convert.
1318         (rs6000_return_value): Likewise.
1319         * rs6000-lynx178-tdep.c: Include "target-float.h".
1320         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1321         (rs6000_lynx178_return_value): Likewise.
1322         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1323         (rs6000_register_to_value): Use target_float_convert.
1324         (rs6000_value_to_register): Likewise.
1325         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1326         (arm_extract_return_value): Use target_float_convert.
1327         (arm_store_return_value): Likewise.
1328         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1329         (sh_register_convert_to_virtual): Use target_float_convert.
1330         (sh_register_convert_to_raw): Likewise.
1331         * sh64-tdep.c: Include "target-float.h".
1332         (sh64_extract_return_value): Use target_float_convert.
1333         (sh64_register_convert_to_virtual): Likewise.
1334         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1335
1336 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1337
1338         * target-float.c (floatformat_to_host_double): New function.
1339         (floatformat_from_host_double): Likewise.
1340         (target_float_to_host_double): Likewise.
1341         (target_float_from_host_double): Likewise.
1342         * target-float.h (target_float_to_host_double): Add prototype.
1343         (target_float_from_host_double): Likewise.
1344
1345         * guile/scm-value.c: Include "target-float.h".
1346         (gdbscm_value_to_real): Use target_float_to_host_double.
1347         Handle integer source values via value_as_long.
1348         * guile/scm-math.c: Include "target-float.h".  Do not include
1349         "doublest.h", "dfp.h", and "expression.h".
1350         (vlscm_convert_typed_number): Use target_float_from_host_double.
1351         (vlscm_convert_number): Likewise.
1352
1353         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1354         (convert_value_from_python): Use target_float_from_host_double.
1355
1356 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1357
1358         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1359         (cast_from_fixed): Likewise.
1360         (ada_scaling_type): New function.
1361         (ada_delta): Return value instead of DOUBLEST.  Perform target
1362         arithmetic instead of host arithmetic.
1363         (scaling_factor): Rename to ...
1364         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1365         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1366         (ada_fixed_to_float): Remove.
1367         (ada_float_to_fixed): Remove.
1368         * ada-lang.h (ada_fixed_to_float): Remove.
1369         (ada_float_to_fixed): Remove.
1370         (ada_delta): Return value instead of DOUBLEST.
1371         (ada_scaling_factor): Add prototype.
1372
1373         * ada-typeprint.c: Include "target-float.h".
1374         (print_fixed_point_type): Perform target arithmetic instead of
1375         host arithmetic.
1376         * ada-valprint.c: Include "target-float.h".
1377         (ada_val_print_num): Perform target arithmetic instead of
1378         host arithmetic for fixed-point types.
1379
1380 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1381
1382         * target-float.c: Include <math.h>.
1383         (floatformat_binop): New function.
1384         (floatformat_compare): Likewise.
1385         (target_float_binop): Likewise.
1386         (target_float_compare): Likewise.
1387         * target-float.h: Include "expression.h".
1388         (target_float_binop): Add prototype.
1389         (target_float_compare): Likewise.
1390
1391         * valarith.c: Do not include "doublest.h" and "dfp.h".
1392         Include "common/byte-vector.h".
1393         (value_args_as_decimal): Remove, replace by ...
1394         (value_args_as_target_float): ... this function.  Handle both
1395         binary and decimal target floating-point formats.
1396         (scalar_binop): Handle both binary and decimal FP using
1397         value_args_as_target_float and target_float_binop.
1398         (value_equal): Handle both binary and decimal FP using
1399         value_args_as_target_float and target_float_compare.
1400         (value_less): Likewise.
1401         (value_pos): Handle all scalar types as simple copy.
1402         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1403         * dfp.c (decimal_binop): Throw error instead of internal_error
1404         when called with an unsupported operation code.
1405
1406 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1407
1408         * target-float.c (target_float_to_string): New function.
1409         (target_float_from_string): New function.
1410         * target-float.h (target_float_to_string): Add prototype.
1411         (target_float_from_string): Add prototype.
1412
1413         * valprint.c: Include "target-float.h".  Do not include
1414         "doublest.h" and "dfp.h".
1415         (print_floating): Use target_float_to_string.
1416         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1417         (printf_floating): Use target_float_to_string.
1418         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1419         (print_i387_value): Use target_float_to_string.
1420         * mips-tdep.c: Include "target-float.h".
1421         (mips_print_fp_register): Use target_float_to_string.
1422         * sh64-tdep.c: Include "target-float.h".
1423         (sh64_do_fp_register): Use target_float_to_string.
1424
1425         * parse.c: Include "target-float.h".  Do not include
1426         "doublest.h" and "dfp.h".
1427         (parse_float): Use target_float_from_string.
1428         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1429         (define_symbol): Use target_float_from_string.
1430         * gdbarch-selftests.c: Include "target-float.h".
1431         (register_to_value_test): Use target_float_from_string.
1432
1433 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1434
1435         * Makefile.c (SFILES): Add target-float.c.
1436         (HFILES_NO_SRCDIR): Add target-float.h.
1437         (COMMON_OBS): Add target-float.o.
1438         * target-float.h: New file.
1439         * target-float.c: New file.
1440
1441         * doublest.c (floatformat_classify): Fix detection of float_zero.
1442
1443         * gdbtypes.c (is_floating_type): New function.
1444         * gdbtypes.h (is_floating_type): Add prototype.
1445
1446         * value.c: Do not include "floatformat.h".
1447         (unpack_double): Use target_float_is_valid.
1448         (is_floating_value): New function.
1449         * value.h (is_floating_value): Add prototype-
1450
1451         * valarith.c: Include "target-float.h".
1452         (value_logical_not): Use target_float_is_zero.
1453
1454         * python/py-value.c: Include "target-float.h".
1455         (valpy_nonzero): Use target_float_is_zero.
1456
1457 2017-11-04  Tom Tromey  <tom@tromey.com>
1458
1459         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1460
1461 2017-11-04  Tom Tromey  <tom@tromey.com>
1462
1463         * breakpoint.c (set_momentary_breakpoint): Return
1464         breakpoint_up.
1465         (until_break_command): Update.
1466         (new_until_break_fsm): Change argument types to
1467         breakpoint_up.
1468         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1469         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1470         Remove.
1471         * infcmd.c (finish_forward): Update.
1472         * breakpoint.h (set_momentary_breakpoint)
1473         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1474         (make_cleanup_delete_breakpoint): Remove.
1475         (struct breakpoint_deleter): New.
1476         (breakpoint_up): New typedef.
1477         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1478         (insert_exception_resume_breakpoint): Update.
1479         (insert_exception_resume_from_probe): Update.
1480         (insert_longjmp_resume_breakpoint): Update.
1481         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1482         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1483         * infcall.c (call_function_by_hand_dummy): Update
1484
1485 2017-11-04  Tom Tromey  <tom@tromey.com>
1486
1487         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1488
1489 2017-11-04  Tom Tromey  <tom@tromey.com>
1490
1491         * linux-tdep.c (linux_core_info_proc_mappings): Use
1492         gdb::def_vector.
1493         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1494         "size" argument.
1495         (linux_corefile_thread): Update.
1496         (linux_make_corefile_notes): Remove unused variable.
1497
1498 2017-11-04  Tom Tromey  <tom@tromey.com>
1499
1500         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1501         gdb::byte_vector.
1502
1503 2017-11-04  Tom Tromey  <tom@tromey.com>
1504
1505         * objfiles.c (do_free_objfile_cleanup): Remove.
1506         * compile/compile-object-load.c (compile_object_load): Update.
1507         * objfiles.h (make_cleanup_free_objfile): Remove.
1508
1509 2017-11-04  Tom Tromey  <tom@tromey.com>
1510
1511         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1512         (adi_read_versions): Change "tags" to "gdb_byte *".
1513         (adi_print_versions): Likewise.
1514
1515 2017-11-04  Tom Tromey  <tom@tromey.com>
1516
1517         * breakpoint.c
1518         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1519         from start_rbreak_breakpoints.
1520         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1521         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1522         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1523         * symtab.c (do_end_rbreak_breakpoints): Remove.
1524         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1525
1526 2017-11-04  Tom Tromey  <tom@tromey.com>
1527
1528         * cp-namespace.c (reset_directive_searched): Remove.
1529         (cp_lookup_symbol_via_imports): Use scoped_restore.
1530         * cp-support.c (reset_directive_searched): Remove.
1531         (make_symbol_overload_list_using): Use scoped_restore.
1532         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1533         (reset_directive_searched): Remove.
1534
1535 2017-11-04  Tom Tromey  <tom@tromey.com>
1536
1537         * symfile.c (find_separate_debug_file_by_debuglink): Use
1538         unique_xmalloc_ptr.
1539
1540 2017-11-04  Tom Tromey  <tom@tromey.com>
1541
1542         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1543         type of "info".
1544         (compute_stack_depth): Likewise.
1545         (do_compile_dwarf_expr_to_c): Use std::vector.
1546
1547 2017-11-04  Tom Tromey  <tom@tromey.com>
1548
1549         * compile/compile-object-load.c (link_callbacks_einfo): Use
1550         std::string.
1551
1552 2017-11-04  Tom Tromey  <tom@tromey.com>
1553
1554         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1555         Use scoped_free_pendings.
1556         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1557         scoped_free_pendings.
1558         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1559         (xcoff_initial_scan): Likewise.
1560         * buildsym.c (reset_symtab_globals): Update comment.
1561         (scoped_free_pendings): Rename from really_free_pendings.
1562         (prepare_for_building): Update comment.
1563         (buildsym_init): Likewise.
1564         * buildsym.h (class scoped_free_pendings): New class.
1565         (really_free_pendings): Don't declare.
1566
1567 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1568
1569         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1570         output when converting a zero value to a special byteorder format.
1571
1572 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1573
1574         * frame.c (do_frame_register_read): Remove aspace.
1575         * jit.c (jit_frame_sniffer): Likwise.
1576         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1577         * regcache.c (regcache::regcache): Pass nullptr.
1578         (regcache_print): Caller updated.
1579         * regcache.h (regcache::regcache): Remove one constructor
1580         parameter aspace.
1581
1582 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1583
1584         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1585
1586 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1587
1588         * breakpoint.c (insert_single_step_breakpoints): Update.
1589         * frame.c (struct frame_info) <aspace>: Add const.
1590         (frame_save_as_regcache): Add const.
1591         (get_frame_address_space): Return const address_space *.
1592         * frame.h (get_frame_address_space): Update declaration.
1593         * infrun.c (struct step_over_info) <aspace>: Add const.
1594         (set_step_over_info): Make aspace const.
1595         (displaced_step_prepare_throw): Change variable const.
1596         (resume): Likewise.
1597         (proceed): Likewise.
1598         (adjust_pc_after_break): Likewise.
1599         (save_waitstatus): Likewise.
1600         (handle_signal_stop): Likewise.
1601         (keep_going_pass_signal): Likewise.
1602         * jit.c (jit_frame_sniffer): Add const.
1603         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1604         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1605         * record-full.c (record_full_wait_1): Likewise.
1606         * regcache.c (regcache::regcache): Change parameter to const.
1607         * regcache.h (regcache::regcache): Likewise.
1608         (regcache::aspace): Return const address_space *.
1609         (regcache) <m_aspace>: Add const.
1610
1611 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1612
1613         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1614         * frame.c (create_sentinel_frame): Likewise.
1615         * infrun.c (displaced_step_prepare_throw): Likewise.
1616         (resume): Likewise.
1617         (thread_still_needs_step_over_bp): Likewise.
1618         (proceed): Likewise.
1619         (do_target_wait): Likewise.
1620         (adjust_pc_after_break): Likewise.
1621         (handle_syscall_event): Likewise.
1622         (save_waitstatus): Likewise.
1623         (handle_inferior_event_1): Likewise.
1624         (handle_signal_stop): Likewise.
1625         (keep_going_pass_signal): Likewise.
1626         * linux-nat.c (status_callback): Likewise.
1627         (save_stop_reason): Likewise.
1628         (resume_stopped_resumed_lwps): Likewise.
1629         * record-full.c (record_full_exec_insn): Likewise.
1630         (record_full_wait_1): Likewise.
1631         * regcache.c (get_regcache_aspace): Remove.
1632         * regcache.h (get_regcache_aspace): Remove.
1633
1634 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1635
1636         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1637         (init_regcache_descr): Use gdbarch_num_regs.
1638         (regcache::regcache): Likewise.
1639         (regcache::get_register_status): Likewise.
1640         (regcache::assert_raw_regnum): Likewise.
1641         (regcache::cooked_read): Likewise.
1642         (regcache::cooked_read_value): Likewise.
1643         (regcache::cooked_write): Likewise.
1644         (regcache::dump): Likewise.
1645         (regcache::num_raw_registers): New method.
1646         * regcache.h (class regcache) <num_raw_registers>: New.
1647
1648 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1649
1650         * regcache.c (regcache::assert_regnum): New method.
1651         (regcache::invalidate): Call assert_regnum.
1652         (regcache::raw_update): Likewise.
1653         (regcache::raw_write): Likewise.
1654         (regcache::raw_read_part): Likewise.
1655         (regcache::raw_write_part): Likewise.
1656         (regcache::raw_supply): Likewise.
1657         (regcache::raw_supply_integer): Likewise.
1658         (regcache::raw_supply_zeroed): Likewise.
1659         (regcache::raw_collect): Likewise.
1660         (regcache::raw_collect_integer): Likewise.
1661         * regcache.h (regcache::assert_regnum): Declare.
1662
1663 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1664
1665         * regcache.c (regcache::dump): Remove code.
1666
1667 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1668
1669         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1670         Remove.
1671         <sizeof_cooked_register_status>: Remove.
1672         (init_regcache_descr): Update.
1673         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1674         (regcache::save): Likewise.
1675         (regcache::dump): Likewise.
1676
1677 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1678
1679         * ft32-tdep.c (ft32_fetch_instruction): New function.
1680         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1681
1682 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1683
1684         * cli/cli-script.c (execute_control_command): Rename to ...
1685         (execute_control_command_1): ... this.
1686         (execute_control_command): New function.
1687
1688 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1689
1690         * tracepoint.c (tfind_command): Remove const_cast.
1691
1692 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1693
1694         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1695
1696 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1697
1698         * common/common-utils.h (in_inclusive_range): New function.
1699         * arm-tdep.c (arm_record_extension_space): Use
1700         in_inclusive_range.
1701         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1702         * cris-tdep.c (cris_spec_reg_applicable): Use
1703         in_inclusive_range.
1704
1705 2017-10-30  Pedro Alves  <palves@redhat.com>
1706             Simon Marchi <simon.marchi@ericsson.com>
1707
1708         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1709         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1710
1711 2017-10-30  Pedro Alves  <palves@redhat.com>
1712
1713         * common/common-utils.c (string_appendf, string_vappendf): New
1714         functions.
1715         * common/common-utils.h (string_appendf, string_vappendf): New
1716         declarations.
1717         * unittests/common-utils-selftests.c (string_appendf_func)
1718         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1719         (string_vappendf_tests): New functions.
1720         (_initialize_common_utils_selftests): Register "string_appendf" and
1721         "string_vappendf tests".
1722
1723 2017-10-30  Pedro Alves  <palves@redhat.com>
1724
1725         * unittests/common-utils-selftests.c (format_func): New typedef.
1726         (string_printf_tests, string_vprintf_tests): Tests factored out
1727         and merged to ...
1728         (test_format_func): ... this new function.
1729         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1730         test_format_func.
1731
1732 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1733
1734         * darwin-nat.c: Remove include of gdb.h.
1735
1736 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1737
1738         * xtensa-xtregs.c: Fix formatting issues.
1739
1740 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1741
1742         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1743
1744 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1745
1746         PR python/21213
1747         * python/py-infthread.c (thpy_get_inferior): Increment reference
1748         of inferior before returning it.
1749
1750 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1751
1752         * unittests/common-utils-selftests.c (format): Add
1753         ATTRIBUTE_PRINTF.
1754
1755 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1756
1757         * xml-syscall.c (struct syscall_desc): Add constructor.
1758         <name>: Change type to std::string.
1759         (syscall_desc_up): New typedef.
1760         (syscall_desc_p): Remove typeder.
1761         (DEF_VEC_P(syscall_desc_p)): Remove.
1762         (struct syscall_group_desc): Add constructor.
1763         <name>: Change type to std::string.
1764         <syscalls>: Change type to std::vector.
1765         (syscall_group_desc_up): New typedef.
1766         (syscall_group_desc_p): Remove typedef.
1767         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1768         (struct syscalls_info) <syscalls>: Change type to std::vector of
1769         unique_ptr.
1770         <groups>: Likewise.
1771         <my_gdb_datadir>: Change type to std::string.
1772         (syscalls_info_up): New typedef.
1773         (allocate_syscalls_info): Remove.
1774         (syscalls_info_free_syscalls_desc): Remove.
1775         (syscalls_info_free_syscall_group_desc): Remove.
1776         (free_syscalls_info): Remove.
1777         (make_cleanup_free_syscalls_info): Remove.
1778         (syscall_group_create_syscall_group_desc): Adjust.
1779         (syscall_group_add_syscall): Adjust.
1780         (syscall_create_syscall_desc): Adjust.
1781         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1782         (init_syscalls_info): Adjust.
1783         (syscall_group_get_group_by_name): Adjust.
1784         (xml_get_syscall_number): Adjust.
1785         (xml_get_syscall_name): Adjust.
1786         (xml_list_of_syscalls): Adjust.
1787         (xml_list_syscalls_by_group): Adjust.
1788         (xml_list_of_groups): Adjust.
1789
1790 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1791
1792         * probe.h: Don't include gdb_vecs.h.
1793         (DEF_VEC_P (probe_p)): Remove.
1794         (find_probes_in_objfile): Return an std::vector.
1795         * probe.c (find_probes_in_objfile): Likewise.
1796         * breakpoint.c (breakpoint_objfile_data)
1797         <longjmp_probes>: Change type to std::vector.
1798         <exception_probes>: Likewise.
1799         (free_breakpoint_probes): Don't manually free vectors.
1800         (create_longjmp_master_breakpoint): Adjust.
1801         (create_exception_master_breakpoint): Adjust.
1802         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1803         parameter type, adjust.
1804         (svr4_create_solib_event_breakpoints): Adjust.
1805
1806 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1807
1808         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1809         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1810         with new.
1811         (free_breakpoint_probes): Rename to ...
1812         (free_breakpoint_objfile_data): ... this, and call delete on
1813         bp_objfile_data..
1814
1815 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1816
1817         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1818         (loaded_script_ptr): Remove typedef.
1819         (DEF_VEC_P (loaded_script_ptr)): Remove.
1820         (struct collect_matching_scripts_data): Add constructor.
1821         <scripts_p>: Change type to (pointer to) std::vector.
1822         (collect_matching_scripts_data): Adjust.
1823         (sort_scripts_by_name): Make suitable for std::sort.
1824         (print_scripts): Don't sort vector, adjust to std::vector.
1825         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1826
1827 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1828
1829         * symfile.c (filename_language): Make struct, not typedef.  Add
1830         constructor.
1831         <ext>: Change type to std::string.
1832         (DEF_VEC_O (filename_language)): Remove.
1833         (filename_language_table): Change type to std::vector.
1834         (add_filename_language): Adjust.
1835         (set_ext_lang_command): Adjust.
1836         (info_ext_lang_command): Adjust.
1837         (deduce_language_from_filename): Adjust.
1838         (class scoped_restore_filename_language_table): Remove.
1839         (test_filename_language): Use scoped_restore.
1840         (test_set_ext_lang_command): Use scoped_restore, adjust to
1841         std::vector change.
1842
1843 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1844
1845         * symfile.c: Include selftest.h.
1846         (class scoped_restore_filename_language_table): New.
1847         (test_filename_language): New test.
1848         (test_set_ext_lang_command): New test.
1849         (_initialize_symfile): Register tests.
1850
1851 2017-10-27  Keith Seitz  <keiths@redhat.com>
1852
1853         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1854         in the bp_location, falling back to find_pc_sect_function when
1855         needed.
1856         (add_location_to_breakpoint): Save sal->symbol.
1857         * breakpoint.h (struct bp_location) <symbol>: New field.
1858         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1859         * symtab.h (struct symtab_and_line) <symbol>: New field.
1860
1861 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1862
1863         PR gdb/13669
1864         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1865         to rewind obstack.
1866
1867 2017-10-26  Pedro Alves  <palves@redhat.com>
1868
1869         * remote.c (remote_async_terminal_ours_p): Delete.
1870         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1871         Remove references to 'remote_async_terminal_ours_p'.
1872
1873 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1874
1875         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1876
1877 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1878
1879         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1880         aspace const.
1881         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1882         Likewise.
1883         * breakpoint.c (bpstat_check_location): Remove cast.
1884         (breakpoint_hit_catch_fork): Make aspce const.
1885         (breakpoint_hit_catch_solib): Likewise.
1886         (breakpoint_hit_catch_exec): Likewise.
1887         (breakpoint_hit_ranged_breakpoint): Likewise.
1888         (breakpoint_hit_watchpoint): Likewise.
1889         (base_breakpoint_breakpoint_hit): Likewise.
1890         (bkpt_breakpoint_hit): Likewise.
1891         (dprintf_breakpoint_hit): Likewise.
1892         (tracepoint_breakpoint_hit): Likewise.
1893         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1894
1895 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1896
1897         * breakpoint.c (breakpoint_location_address_match): Change
1898         "struct address_space *" to "const address_space".
1899         (breakpoint_location_address_range_overlap): Likewise.
1900         (breakpoint_here_p): Likewise.
1901         (breakpoint_in_range_p): Likewise.
1902         (moribund_breakpoint_here_p): Likewise.
1903         (bp_location_inserted_here_p): Likewise.
1904         (software_breakpoint_inserted_here_p): Likewise.
1905         (hardware_breakpoint_inserted_here_p): Likewise.
1906         (hardware_watchpoint_inserted_in_range): Likewise.
1907         (bpstat_check_location): Likewise.
1908         (bpstat_stop_status): Likewise.
1909         (breakpoint_address_match): Likewise.
1910         (breakpoint_address_match_range): Likewise.
1911         (breakpoint_location_address_match): Likewise.
1912         (breakpoint_location_address_range_overlap): Likewise.
1913         (insert_single_step_breakpoint): Likewise.
1914         (breakpoint_has_location_inserted_here): Likewise.
1915         (single_step_breakpoint_inserted_here_p): Likewise.
1916         (pc_at_non_inline_function): Likewise.
1917         * breakpoint.h (bpstat_stop_status): Update declaration.
1918         (breakpoint_here_p): Likewise.
1919         (breakpoint_in_range_p): Likewise.
1920         (moribund_breakpoint_here_p): Likewise.
1921         (breakpoint_inserted_here_p): Likewise.
1922         (software_breakpoint_inserted_here_p): Likewise.
1923         (hardware_breakpoint_inserted_here_p): Likewise.
1924         (breakpoint_has_location_inserted_here): Likewise.
1925         (single_step_breakpoint_inserted_here_p): Likewise.
1926         (hardware_watchpoint_inserted_in_range): Likewise.
1927         (breakpoint_address_match): Likewise.
1928         (insert_single_step_breakpoint): Likewise.
1929         (pc_at_non_inline_function): Likewise.
1930         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1931         * record.c (record_check_stopped_by_breakpoint): Likewise.
1932         * record.h (record_check_stopped_by_breakpoint): Likewise.
1933         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1934
1935 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1936
1937         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1938         regcache->arch () instead get_regcache_arch.
1939         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1940         Likewise.
1941         (aarch64_fbsd_store_inferior_registers): Likewise.
1942         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1943         (store_gregs_to_thread): Likewise.
1944         (fetch_fpregs_from_thread): Likewise.
1945         (store_fpregs_to_thread): Likewise.
1946         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1947         (aarch64_store_return_value): Likewise.
1948         (aarch64_software_single_step): Likewise.
1949         * aix-thread.c (aix_thread_wait): Likewise.
1950         (supply_reg32): Likewise.
1951         (supply_sprs64): Likewise.
1952         (supply_sprs32): Likewise.
1953         (fill_gprs64): Likewise.
1954         (fill_gprs32): Likewise.
1955         (fill_sprs64): Likewise.
1956         (fill_sprs32): Likewise.
1957         (store_regs_user_thread): Likewise.
1958         (store_regs_kernel_thread): Likewise.
1959         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1960         (alphabsd_store_inferior_registers): Likewise.
1961         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1962         (alpha_store_return_value): Likewise.
1963         (alpha_deal_with_atomic_sequence): Likewise.
1964         (alpha_next_pc): Likewise.
1965         (alpha_software_single_step): Likewise.
1966         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1967         (amd64bsd_store_inferior_registers): Likewise.
1968         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1969         Likewise.
1970         (amd64_linux_store_inferior_registers): Likewise.
1971         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1972         (amd64_collect_native_gregset): Likewise.
1973         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1974         (amd64obsd_collect_uthread): Likewise.
1975         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1976         (amd64_collect_fpregset): Likewise.
1977         (amd64_supply_fxsave): Likewise.
1978         (amd64_supply_xsave): Likewise.
1979         (amd64_collect_fxsave): Likewise.
1980         (amd64_collect_xsave): Likewise.
1981         * arc-tdep.c (arc_write_pc): Likewise.
1982         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1983         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1984         (arm_fbsd_store_inferior_registers): Likewise.
1985         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1986         (store_vfp_regs): Likewise.
1987         (arm_linux_fetch_inferior_registers): Likewise.
1988         (arm_linux_store_inferior_registers): Likewise.
1989         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1990         (arm_linux_sigreturn_next_pc): Likewise.
1991         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1992         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1993         (fetch_register): Likewise.
1994         (store_register): Likewise.
1995         * arm-tdep.c (arm_is_thumb): Likewise.
1996         (displaced_in_arm_mode): Likewise.
1997         (bx_write_pc): Likewise.
1998         (arm_get_next_pcs_addr_bits_remove): Likewise.
1999         (arm_software_single_step): Likewise.
2000         (arm_extract_return_value): Likewise.
2001         (arm_store_return_value): Likewise.
2002         (arm_write_pc): Likewise.
2003         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2004         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2005         (bsd_uthread_store_registers): Likewise.
2006         * core-regset.c (fetch_core_registers): Likewise.
2007         * corelow.c (get_core_registers): Likewise.
2008         * cris-tdep.c (cris_store_return_value): Likewise.
2009         (cris_extract_return_value): Likewise.
2010         (find_step_target): Likewise.
2011         (find_step_target): Likewise.
2012         (cris_software_single_step): Likewise.
2013         * ctf.c (ctf_fetch_registers): Likewise.
2014         * darwin-nat.c (cancel_breakpoint): Likewise.
2015         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2016         * frv-tdep.c (frv_extract_return_value): Likewise.
2017         * ft32-tdep.c (ft32_store_return_value): Likewise.
2018         (ft32_extract_return_value): Likewise.
2019         * go32-nat.c (fetch_register): Likewise.
2020         (go32_fetch_registers): Likewise.
2021         (go32_store_registers): Likewise.
2022         (store_register): Likewise.
2023         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2024         (h8300_store_return_value): Likewise.
2025         * hppa-linux-nat.c (fetch_register): Likewise.
2026         (store_register): Likewise.
2027         (hppa_linux_fetch_inferior_registers): Likewise.
2028         (hppa_linux_store_inferior_registers): Likewise.
2029         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2030         (i386_darwin_store_inferior_registers): Likewise.
2031         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2032         (gnu_store_registers): Likewise.
2033         * i386-linux-nat.c (fetch_register): Likewise.
2034         (store_register): Likewise.
2035         (supply_gregset): Likewise.
2036         (fill_gregset): Likewise.
2037         (i386_linux_fetch_inferior_registers): Likewise.
2038         (i386_linux_store_inferior_registers): Likewise.
2039         (i386_linux_resume): Likewise.
2040         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2041         Likewise.
2042         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2043         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2044         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2045         (i386obsd_collect_uthread): Likewise.
2046         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2047         (i386_supply_gregset): Likewise.
2048         (i386_collect_gregset): Likewise.
2049         (i386_supply_fpregset): Likewise.
2050         (i386_collect_fpregset): Likewise.
2051         (i386_mpx_bd_base): Likewise.
2052         * i386-v4-nat.c (supply_fpregset): Likewise.
2053         (fill_fpregset): Likewise.
2054         * i387-tdep.c (i387_supply_fsave): Likewise.
2055         (i387_collect_fsave): Likewise.
2056         (i387_supply_fxsave): Likewise.
2057         (i387_collect_fxsave): Likewise.
2058         (i387_supply_xsave): Likewise.
2059         (i387_collect_xsave): Likewise.
2060         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2061         (ia64_linux_store_registers): Likewise.
2062         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2063         (ia64_extract_return_value): Likewise.
2064         (ia64_store_return_value): Likewise.
2065         (find_func_descr): Likewise.
2066         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2067         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2068         (inf_ptrace_store_registers): Likewise.
2069         * infrun.c (use_displaced_stepping): Likewise.
2070         (displaced_step_prepare_throw): Likewise.
2071         (resume): Likewise.
2072         (proceed): Likewise.
2073         (do_target_wait): Likewise.
2074         (adjust_pc_after_break): Likewise.
2075         (handle_inferior_event_1): Likewise.
2076         (handle_signal_stop): Likewise.
2077         (save_infcall_suspend_state): Likewise.
2078         (restore_infcall_suspend_state): Likewise.
2079         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2080         * jit.c (jit_frame_prev_register): Likewise.
2081         * linux-nat.c (save_stop_reason): Likewise.
2082         (linux_nat_wait_1): Likewise.
2083         (resume_stopped_resumed_lwps): Likewise.
2084         * linux-record.c (record_linux_sockaddr): Likewise.
2085         (record_linux_msghdr): Likewise.
2086         (record_linux_system_call): Likewise.
2087         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2088         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2089         (lm32_store_return_value): Likewise.
2090         * m32c-tdep.c (m32c_read_flg): Likewise.
2091         (m32c_pseudo_register_read): Likewise.
2092         (m32c_pseudo_register_write): Likewise.
2093         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2094         (m32r_linux_collect_gregset): Likewise.
2095         * m32r-tdep.c (m32r_store_return_value): Likewise.
2096         (m32r_extract_return_value): Likewise.
2097         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2098         (m68kbsd_collect_fpregset): Likewise.
2099         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2100         * m68k-linux-nat.c (fetch_register): Likewise.
2101         (old_fetch_inferior_registers): Likewise.
2102         (old_store_inferior_registers): Likewise.
2103         (store_regs): Likewise.
2104         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2105         (m68k_svr4_store_return_value): Likewise.
2106         * m88k-tdep.c (m88k_store_arguments): Likewise.
2107         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2108         (mi_cmd_data_write_register_values): Likewise.
2109         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2110         (mips_fbsd_store_inferior_registers): Likewise.
2111         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2112         (mips_fbsd_supply_gregs): Likewise.
2113         (mips_fbsd_collect_fpregs): Likewise.
2114         (mips_fbsd_collect_gregs): Likewise.
2115         (mips_fbsd_supply_fpregset): Likewise.
2116         (mips_fbsd_collect_fpregset): Likewise.
2117         (mips_fbsd_supply_gregset): Likewise.
2118         (mips_fbsd_collect_gregset): Likewise.
2119         * mips-linux-nat.c (supply_gregset): Likewise.
2120         (fill_gregset): Likewise.
2121         (supply_fpregset): Likewise.
2122         (fill_fpregset): Likewise.
2123         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2124         (mips_fill_gregset): Likewise.
2125         (mips_supply_fpregset): Likewise.
2126         (mips_fill_fpregset): Likewise.
2127         (mips64_supply_gregset): Likewise.
2128         (micromips_linux_sigframe_validate): Likewise.
2129         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2130         (mipsnbsd_fetch_inferior_registers): Likewise.
2131         (mipsnbsd_store_inferior_registers): Likewise.
2132         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2133         (mipsnbsd_supply_gregset): Likewise.
2134         (mipsnbsd_iterate_over_regset_sections): Likewise.
2135         (mipsnbsd_supply_reg): Likewise.
2136         (mipsnbsd_supply_fpreg): Likewise.
2137         * mips-tdep.c (mips_in_frame_stub): Likewise.
2138         (mips_dummy_id): Likewise.
2139         (is_octeon_bbit_op): Likewise.
2140         (micromips_bc1_pc): Likewise.
2141         (extended_mips16_next_pc): Likewise.
2142         (mips16_next_pc): Likewise.
2143         (deal_with_atomic_sequence): Likewise.
2144         * moxie-tdep.c (moxie_process_readu): Likewise.
2145         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2146         * nto-procfs.c (procfs_store_registers): Likewise.
2147         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2148         (ppcfbsd_store_inferior_registers): Likewise.
2149         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2150         (fetch_altivec_register): Likewise.
2151         (get_spe_registers): Likewise.
2152         (fetch_spe_register): Likewise.
2153         (fetch_altivec_registers): Likewise.
2154         (fetch_all_gp_regs): Likewise.
2155         (fetch_all_fp_regs): Likewise.
2156         (store_vsx_register): Likewise.
2157         (store_altivec_register): Likewise.
2158         (set_spe_registers): Likewise.
2159         (store_spe_register): Likewise.
2160         (store_altivec_registers): Likewise.
2161         (store_all_gp_regs): Likewise.
2162         (store_all_fp_regs): Likewise.
2163         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2164         (ppc_linux_collect_gregset): Likewise.
2165         (ppc_canonicalize_syscall): Likewise.
2166         (ppc_linux_record_signal): Likewise.
2167         (ppu2spu_prev_register): Likewise.
2168         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2169         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2170         (ppcobsd_store_registers): Likewise.
2171         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2172         Likewise.
2173         (ppc_ravenscar_generic_store_registers): Likewise.
2174         * procfs.c (procfs_fetch_registers): Likewise.
2175         (procfs_store_registers): Likewise.
2176         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2177         (ravenscar_store_registers): Likewise.
2178         (ravenscar_prepare_to_store): Likewise.
2179         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2180         * record-full.c (record_full_wait_1): Likewise.
2181         (record_full_registers_change): Likewise.
2182         (record_full_store_registers): Likewise.
2183         (record_full_core_fetch_registers): Likewise.
2184         (record_full_save): Likewise.
2185         (record_full_goto_insn): Likewise.
2186         * regcache.c (regcache_register_size): Likewise.
2187         (get_regcache_arch): Remove.
2188         (regcache_read_pc): Likewise.
2189         * regcache.h (get_regcache_arch): Remove.
2190         * remote-sim.c (gdbsim_fetch_register): Likewise.
2191         (gdbsim_store_register): Likewise.
2192         * remote.c (fetch_register_using_p): Likewise.
2193         (send_g_packet): Likewise.
2194         (remote_prepare_to_store): Likewise.
2195         (store_registers_using_G): Likewise.
2196         * reverse.c (save_bookmark_command): Likewise.
2197         (goto_bookmark_command): Likewise.
2198         * rs6000-aix-tdep.c (branch_dest): Likewise.
2199         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2200         (fetch_register): Likewise.
2201         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2202         (ppc_collect_reg): Likewise.
2203         (ppc_collect_gregset): Likewise.
2204         (ppc_collect_fpregset): Likewise.
2205         (ppc_collect_vsxregset): Likewise.
2206         (ppc_collect_vrregset): Likewise.
2207         (ppc_displaced_step_hw_singlestep): Likewise.
2208         (rs6000_pseudo_register_read): Likewise.
2209         (rs6000_pseudo_register_write): Likewise.
2210         * s390-linux-nat.c (supply_gregset): Likewise.
2211         (fill_gregset): Likewise.
2212         (s390_linux_fetch_inferior_registers): Likewise.
2213         * s390-linux-tdep.c (s390_write_pc): Likewise.
2214         (s390_software_single_step): Likewise.
2215         (s390_all_but_pc_registers_record): Likewise.
2216         (s390_linux_syscall_record): Likewise.
2217         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2218         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2219         (shnbsd_store_inferior_registers): Likewise.
2220         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2221         (sh_extract_return_value_fpu): Likewise.
2222         (sh_store_return_value_nofpu): Likewise.
2223         (sh_corefile_supply_regset): Likewise.
2224         (sh_corefile_collect_regset): Likewise.
2225         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2226         (sh64_store_return_value): Likewise.
2227         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2228         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2229         (sparc_store_inferior_registers): Likewise.
2230         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2231         (sparc_ravenscar_prepare_to_store): Likewise.
2232         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2233         (sparc_analyze_control_transfer): Likewise.
2234         (sparc_step_trap): Likewise.
2235         (sparc_software_single_step): Likewise.
2236         (sparc32_gdbarch_init): Likewise.
2237         (sparc_supply_rwindow): Likewise.
2238         (sparc_collect_rwindow): Likewise.
2239         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2240         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2241         (sparc64nbsd_collect_gregset): Likewise.
2242         (sparc64nbsd_supply_fpregset): Likewise.
2243         (sparc64nbsd_collect_fpregset): Likewise.
2244         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2245         (sparc64_supply_gregset): Likewise.
2246         (sparc64_collect_gregset): Likewise.
2247         (sparc64_supply_fpregset): Likewise.
2248         (sparc64_collect_fpregset): Likewise.
2249         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2250         * spu-tdep.c (spu_unwind_sp): Likewise.
2251         (spu2ppu_prev_register): Likewise.
2252         (spu_memory_remove_breakpoint): Likewise.
2253         * stack.c (return_command): Likewise.
2254         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2255         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2256         * tracefile.c (trace_save_ctf): Likewise.
2257         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2258         (do_windows_store_inferior_registers): Likewise.
2259         (windows_resume): Likewise.
2260         * xtensa-linux-nat.c (fill_gregset): Likewise.
2261         (supply_gregset_reg): Likewise.
2262         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2263         (xtensa_register_read_masked): Likewise.
2264         (xtensa_supply_gregset): Likewise.
2265         (xtensa_extract_return_value): Likewise.
2266         (xtensa_store_return_value): Likewise.
2267
2268 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2269
2270         * doublest.c (floatformat_from_string): New function.
2271         * doublest.h (floatformat_from_string): Add prototype.
2272
2273         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2274         (OP_FLOAT): ... this.
2275         * expression.h: Do not include "doublest.h".
2276         (union exp_element): Replace doubleconst and decfloatconst by
2277         new element floatconst.
2278         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2279         (ada_evaluate_subexp): Likewise.
2280         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2281         OP_DOUBLE and OP_DECFLOAT.
2282         * expprint.c (print_subexp_standard): Likewise.
2283         (dump_subexp_body_standard): Likewise.
2284         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2285
2286         * parse.c: Include "dfp.h".
2287         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2288         (write_exp_elt_floatcst): New function.
2289         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2290         and OP_DECFLOAT.
2291         (operator_check_standard): Likewise.
2292         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2293         Return target format buffer instead of host DOUBLEST.
2294         Use floatformat_from_string and decimal_from_string to parse
2295         either binary or decimal floating-point types.
2296         (parse_c_float): Remove.
2297         * parser-defs.h: Do not include "doublest.h".
2298         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2299         (write_exp_elt_floatcst): Add prototype.
2300         (parse_float): Update prototype.
2301         (parse_c_float): Remove.
2302
2303         * c-exp.y: Do not include "dfp.h".
2304         (typed_val_float): Use byte buffer instead of DOUBLEST.
2305         (typed_val_decfloat): Remove.
2306         (DECFLOAT): Remove.
2307         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2308         (parse_number): Update to new parse_float interface.
2309         Parse suffixes and determine type before calling parse_float.
2310         Handle decimal and binary FP types the same way.
2311
2312         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2313         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2314         (parse_number): Update to new parse_float interface.
2315         Parse suffixes and determine type before calling parse_float.
2316
2317         * f-exp.y: Replace dval by typed_val_float.
2318         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2319         (parse_number): Use parse_float instead of atof.
2320
2321         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2322         (parse_go_float): Remove.
2323         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2324         (parse_number): Call parse_float instead of parse_go_float.
2325         Parse suffixes and determine type before calling parse_float.
2326
2327         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2328         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2329         (parse_number): Update to new parse_float interface.
2330         Parse suffixes and determine type before calling parse_float.
2331
2332         * m2-exp.y: Replace dval by byte buffer val.
2333         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2334         (parse_number): Call parse_float instead of atof.
2335
2336         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2337         (lex_number): Call parse_float instead of strtod.
2338         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2339         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2340         Use write_exp_elt_floatcst.
2341         (unit_testing): Remove static variable.
2342         (rust_type): Do not check unit_testing.
2343         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2344
2345         * ada-exp.y (type_float, type_double): Remove.
2346         (typed_val_float): Use byte buffer instead of DOUBLEST.
2347         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2348         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2349
2350 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2351
2352         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2353         * arch/aarch64.h: New file.
2354
2355 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2356
2357         * dfp.h (decimal_from_string): Use const reference for argument.
2358         * dfp.c (decimal_from_string): Likewise.
2359
2360 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2361
2362         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2363         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2364         * mips-tdep.c (mips_print_fp_register): Likewise.
2365
2366 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2367
2368         * common/format.h (enum argclass): Replace decfloat_arg by
2369         dec32float_arg, dec64float_arg, and dec128float_arg.
2370         * common/format.c (parse_format_string): Update to return
2371         new decimal float argument classes.
2372
2373         * printcmd.c (printf_decfloat): Rename to ...
2374         (printf_floating): ... this.  Add argclass argument, and use it
2375         instead of parsing the format string again.  Add support for
2376         binary floating-point values, using floatformat_to_string.
2377         Convert value to the target format if it doesn't already match.
2378         (ui_printf): Call printf_floating instead of printf_decfloat,
2379         also for double_arg / long_double_arg.  Pass argclass.
2380
2381         * dfp.c (decimal_to_string): Add format string argument.
2382         * dfp.h (decimal_to_string): Likewise.
2383
2384         * doublest.c (floatformat_to_string): Add format string argument.
2385         * doublest.h (floatformat_to_string): Likewise.
2386
2387 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2388
2389         * doublest.c (floatformat_precision): New routine.
2390         (floatformat_to_string): Likewise.
2391         * doublest.c (floatformat_to_string): Add prototype.
2392
2393         * printcmd.c (print_scalar_formatted): Only call print_floating
2394         on floating-point types.
2395         * valprint.c: Do not include "floatformat.h".
2396         (generic_val_print_decfloat): Remove.
2397         (generic_val_print): Call generic_val_print_float for both
2398         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2399         (print_floating): Use floatformat_to_string.  Handle decimal float.
2400         (print_decimal_floating): Remove, merge into floatformat_to_string.
2401         * value.h (print_decimal_floating): Remove.
2402
2403         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2404
2405 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2406
2407         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2408
2409 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2410
2411         * memattr.h: Don't include vec.h.
2412         (struct mem_attrib): Initialize fields.
2413         <unknown>: New static method.
2414         (struct mem_region): Add constructors, operator<, initialize
2415         fields.
2416         * memattr.c: Include algorithm.
2417         (default_mem_attrib, unknown_mem_attrib): Remove.
2418         (user_mem_region_list): New global.
2419         (target_mem_region_list, mem_region_list): Change type to
2420         std::vector<mem_region>.
2421         (mem_use_target): Now a function.
2422         (target_mem_regions_valid): Change type to bool.
2423         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2424         (require_user_regions): Adjust.
2425         (require_target_regions): Adjust.
2426         (create_mem_region): Adjust.
2427         (lookup_mem_region): Adjust.
2428         (invalidate_target_mem_regions): Adjust.
2429         (mem_clear): Rename to...
2430         (user_mem_clear): ... this, and adjust.
2431         (mem_command): Adjust.
2432         (info_mem_command): Adjust.
2433         (mem_enable, enable_mem_command, mem_disable,
2434         disable_mem_command): Adjust.
2435         (mem_delete): Adjust.
2436         (delete_mem_command): Adjust.
2437         * memory-map.h (parse_memory_map): Return an std::vector.
2438         * memory-map.c (parse_memory_map): Likewise.
2439         (struct memory_map_parsing_data): Add constructor.
2440         <memory_map>: Point to std::vector.
2441         (memory_map_start_memory): Adjust.
2442         (memory_map_end_memory): Adjust.
2443         (memory_map_end_property): Adjust.
2444         (clear_result): Remove.
2445         * remote.c (remote_memory_map): Return an std::vector.
2446         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2447         Remove.
2448         (target_debug_print_mem_region_vector): New.
2449         * target-delegates.c: Regenerate.
2450         * target.h (mem_region_vector): New typedef.
2451         (to_memory_map): Return mem_region_vector.
2452         (target_memory_map): Return an std::vector.
2453         * target.c (target_memory_map): Return an std::vector.
2454         (flash_erase_command): Adjust.
2455
2456 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2457
2458         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2459         Change type to std::string.
2460         (memory_map_start_property): Adjust.
2461         (memory_map_end_property): Adjust.
2462
2463 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2464
2465         * infrun.h: Include common/byte-vector.h.
2466         (struct displaced_step_closure): New struct.
2467         (struct buf_displaced_step_closure): New struct.
2468         * infrun.c (displaced_step_closure::~displaced_step_closure):
2469         Provide default implementation.
2470         (displaced_step_clear): Deallocate step closure with delete.
2471         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2472         (aarch64_displaced_step_closure): ... this, extend
2473         displaced_step_closure.
2474         (aarch64_displaced_step_data) <dsc>: Change type to
2475         aarch64_displaced_step_closure.
2476         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2477         unique_ptr.
2478         (aarch64_displaced_step_fixup): Add cast for displaced step
2479         closure.
2480         * amd64-tdep.c (displaced_step_closure): Rename to ...
2481         (amd64_displaced_step_closure): ... this, extend
2482         displaced_step_closure.
2483         <insn_buf>: Change type to std::vector<gdb_byte>.
2484         <max_len>: Remove.
2485         (fixup_riprel): Change type of DSC parameter, adjust to type
2486         change of insn_buf.
2487         (fixup_displaced_copy): Change type of DSC parameter.
2488         (amd64_displaced_step_copy_insn): Instantiate
2489         amd64_displaced_step_closure.
2490         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2491         to type change of insn_buf.
2492         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2493         parameter DSC.
2494         (arm_linux_copy_svc): Likewise.
2495         (cleanup_kernel_helper_return): Likewise.
2496         (arm_catch_kernel_helper_return): Likewise.
2497         (arm_linux_displaced_step_copy_insn): Instantiate
2498         arm_displaced_step_closure.
2499         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2500         (displaced_read_reg): Change type of parameter DSC.
2501         (branch_write_pc): Likewise.
2502         (load_write_pc): Likewise.
2503         (alu_write_pc): Likewise.
2504         (displaced_write_reg): Likewise.
2505         (arm_copy_unmodified): Likewise.
2506         (thumb_copy_unmodified_32bit): Likewise.
2507         (thumb_copy_unmodified_16bit): Likewise.
2508         (cleanup_preload): Likewise.
2509         (install_preload): Likewise.
2510         (arm_copy_preload): Likewise.
2511         (thumb2_copy_preload): Likewise.
2512         (install_preload_reg): Likewise.
2513         (arm_copy_preload_reg): Likewise.
2514         (cleanup_copro_load_store): Likewise.
2515         (install_copro_load_store): Likewise.
2516         (arm_copy_copro_load_store) Likewise.
2517         (thumb2_copy_copro_load_store): Likewise.
2518         (cleanup_branch): Likewise.
2519         (install_b_bl_blx): Likewise.
2520         (arm_copy_b_bl_blx): Likewise.
2521         (thumb2_copy_b_bl_blx): Likewise.
2522         (thumb_copy_b): Likewise.
2523         (install_bx_blx_reg): Likewise.
2524         (arm_copy_bx_blx_reg): Likewise.
2525         (thumb_copy_bx_blx_reg): Likewise.
2526         (cleanup_alu_imm): Likewise.
2527         (arm_copy_alu_imm): Likewise.
2528         (thumb2_copy_alu_imm): Likewise.
2529         (cleanup_alu_reg): Likewise.
2530         (install_alu_reg): Likewise.
2531         (arm_copy_alu_reg): Likewise.
2532         (thumb_copy_alu_reg): Likewise.
2533         (cleanup_alu_shifted_reg): Likewise.
2534         (install_alu_shifted_reg): Likewise.
2535         (arm_copy_alu_shifted_reg): Likewise.
2536         (cleanup_load): Likewise.
2537         (cleanup_store): Likewise.
2538         (arm_copy_extra_ld_st): Likewise.
2539         (install_load_store): Likewise.
2540         (thumb2_copy_load_literal): Likewise.
2541         (thumb2_copy_load_reg_imm): Likewise.
2542         (arm_copy_ldr_str_ldrb_strb): Likewise.
2543         (cleanup_block_load_all): Likewise.
2544         (cleanup_block_store_pc): Likewise.
2545         (cleanup_block_load_pc): Likewise.
2546         (arm_copy_block_xfer): Likewise.
2547         (thumb2_copy_block_xfer): Likewise.
2548         (cleanup_svc): Likewise.
2549         (install_svc): Likewise.
2550         (arm_copy_svc): Likewise.
2551         (thumb_copy_svc): Likewise.
2552         (arm_copy_undef): Likewise.
2553         (thumb_32bit_copy_undef): Likewise.
2554         (arm_copy_unpred): Likewise.
2555         (arm_decode_misc_memhint_neon): Likewise.
2556         (arm_decode_unconditional): Likewise.
2557         (arm_decode_miscellaneous): Likewise.
2558         (arm_decode_dp_misc): Likewise.
2559         (arm_decode_ld_st_word_ubyte): Likewise.
2560         (arm_decode_media): Likewise.
2561         (arm_decode_b_bl_ldmstm): Likewise.
2562         (arm_decode_ext_reg_ld_st): Likewise.
2563         (thumb2_decode_dp_shift_reg): Likewise.
2564         (thumb2_decode_ext_reg_ld_st): Likewise.
2565         (arm_decode_svc_copro): Likewise.
2566         (thumb2_decode_svc_copro): Likewise.
2567         (install_pc_relative): Likewise.
2568         (thumb_copy_pc_relative_16bit): Likewise.
2569         (thumb_decode_pc_relative_16bit): Likewise.
2570         (thumb_copy_pc_relative_32bit): Likewise.
2571         (thumb_copy_16bit_ldr_literal): Likewise.
2572         (thumb_copy_cbnz_cbz): Likewise.
2573         (thumb2_copy_table_branch): Likewise.
2574         (cleanup_pop_pc_16bit_all): Likewise.
2575         (thumb_copy_pop_pc_16bit): Likewise.
2576         (thumb_process_displaced_16bit_insn): Likewise.
2577         (decode_thumb_32bit_ld_mem_hints): Likewise.
2578         (thumb_process_displaced_32bit_insn): Likewise.
2579         (thumb_process_displaced_insn): Likewise.
2580         (arm_process_displaced_insn): Likewise.
2581         (arm_displaced_init_closure): Likewise.
2582         (arm_displaced_step_fixup): Add cast for closure.
2583         * arm-tdep.h: Include infrun.h.
2584         (displaced_step_closure): Rename to ...
2585         (arm_displaced_step_closure): ... this, extend
2586         displaced_step_closure.
2587         <u::svc::copy_svc_os>: Change type of parameter DSC.
2588         <cleanup>: Likewise.
2589         (arm_process_displaced_insn): Likewise.
2590         (arm_displaced_init_closure): Likewise.
2591         (displaced_read_reg): Likewise.
2592         (displaced_write_reg): Likewise.
2593         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2594         Adjust.
2595         * i386-tdep.h: Include infrun.h.
2596         (i386_displaced_step_closure): New typedef.
2597         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2598         i386_displaced_step_closure.
2599         (i386_displaced_step_fixup): Adjust.
2600         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2601         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2602         and unique_ptr.
2603         (ppc_displaced_step_fixup): Adjust.
2604         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2605         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2606         and unique_ptr.
2607         (s390_displaced_step_fixup): Adjust.
2608
2609 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2610
2611         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2612         Remove declarations.
2613
2614 2017-10-20  Tom Tromey  <tom@tromey.com>
2615
2616         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2617         std::vector.
2618         (gdb_bfd_record_inclusion): Update.
2619         (bfdp): Remove typedef.
2620
2621 2017-10-20  Tom Tromey  <tom@tromey.com>
2622
2623         * gdb_bfd.c (gdb_bfd_ref): Use new.
2624         (struct gdb_bfd_data): Add constructor, destructor, and member
2625         initializers.
2626         (gdb_bfd_unref): Use delete.
2627
2628 2017-10-20  Tom Tromey  <tom@tromey.com>
2629
2630         * exec.c (exec_file_attach): Use new_bfd_ref.
2631         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2632         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2633         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2634         new_bfd_ref.
2635         * gdb_bfd.h (new_bfd_ref): New function.
2636
2637 2017-10-20  Pedro Alves  <palves@redhat.com>
2638
2639         * main.c (captured_command_loop): Add attribute noinline.
2640
2641 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2642
2643         * interps.c (struct interp_factory): Add constructor.
2644         (interp_factory_p): Remove typedef.
2645         (DEF_VEC_P(interp_factory_p)): Remove.
2646         (interpreter_factories): Change type to std::vector.
2647         (interp_factory_register): Adjust.
2648         (interp_lookup): Adjust.
2649         (interpreter_completer): Adjust.
2650
2651 2017-10-19  Tom Tromey  <tom@tromey.com>
2652
2653         * break-catch-syscall.c (catch_syscall_completer): Use
2654         std::string, gdb::unique_xmalloc_ptr.
2655
2656 2017-10-19  Tom Tromey  <tom@tromey.com>
2657
2658         * infcall.c (call_function_by_hand_dummy): Use std::string.
2659
2660 2017-10-19  Tom Tromey  <tom@tromey.com>
2661
2662         * mi/mi-main.c (mi_cmd_execute): Update.
2663         * top.h (prepare_execute_command): Return scoped_value_mark.
2664         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2665         Add move constructor.
2666         * top.c (prepare_execute_command): Return scoped_value_mark.
2667         (execute_command): Update.
2668
2669 2017-10-19  Pedro Alves  <palves@redhat.com>
2670
2671         * xml-support.c (xml_fetch_content_from_file): Check fread's
2672         return.
2673
2674 2017-10-19  Pedro Alves  <palves@redhat.com>
2675
2676         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2677         async.
2678         (handle_error_fd): New function.
2679         (ser_base_async): Add/delete an event loop file handler for
2680         error_fd.
2681
2682 2017-10-19  Pedro Alves  <palves@redhat.com>
2683
2684         * xml-support.c (xml_fetch_content_from_file): Don't read in
2685         chunks.  Instead use fseek to determine the file's size, and read
2686         it in one go.
2687
2688 2017-11-18  Keith Seitz  <keiths@redhat.com>
2689
2690         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2691         types.
2692         Add whitespace to front of type name.
2693
2694 2017-10-18  Keith Seitz  <keiths@redhat.com>
2695
2696         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2697         DW_AT_accessibility.
2698
2699 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2700
2701         * features/tic6x-c62x-linux.c: Remove.
2702
2703 2017-10-17  Tom Tromey  <tom@tromey.com>
2704
2705         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2706         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2707         (do_mixed_source_and_assembly): Likewise.
2708
2709 2017-10-17  Tom Tromey  <tom@tromey.com>
2710
2711         * regcache.c (regcache::xfer_part): Remove assertion.
2712
2713 2017-10-17  Pedro Alves  <palves@redhat.com>
2714
2715         * xml-support.c (xml_fetch_content_from_file): Call
2716         unique_ptr::release() instead unique_ptr::get() when passing
2717         through xrealloc.
2718
2719 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2720
2721         * regcache.c (regcache::xfer_part): Remove parameters read and
2722         write, add parameter is_raw.  All callers are updated.
2723
2724 2017-10-16  Keith Seitz  <keiths@redhat.com>
2725
2726         * c-typeprint.c (enum access_specifier): Moved here from
2727         c_type_print_base.
2728         (output_access_specifier): New function.
2729         (c_type_print_base): Consider typedefs when assessing
2730         whether access labels are needed.
2731         Use output_access_specifier as needed.
2732         Output access specifier for typedefs, if needed.
2733         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2734         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2735         fields.
2736         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2737         accessor macros.
2738
2739 2017-10-16  Tom Tromey  <tom@tromey.com>
2740
2741         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2742         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2743         * target.c (target_fileio_read_stralloc): Update.
2744         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2745         * target.h (target_fileio_read_stralloc): Return
2746         unique_xmalloc_ptr.
2747
2748 2017-10-16  Tom Tromey  <tom@tromey.com>
2749
2750         * xml-syscall.c (xml_init_syscalls_info): Update.
2751         * xml-support.c (xinclude_start_include): Update.
2752         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2753         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2754         (xml_fetch_content_from_file): Likewise.
2755         * osdata.c (get_osdata): Update.
2756         * target.h (target_read_stralloc, target_get_osdata): Return
2757         unique_xmalloc_ptr.
2758         * solib-aix.c (solib_aix_get_library_list): Update.
2759         * solib-target.c (solib_target_current_sos): Update.
2760         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2761         * xml-tdesc.c (fetch_available_features_from_target): Update.
2762         (target_fetch_description_xml): Update.
2763         (file_read_description_xml): Update.
2764         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2765         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2766         (remote_pid_to_exec_file): Update.
2767         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2768         (target_get_osdata): Likewise.
2769
2770 2017-10-16  Tom Tromey  <tom@tromey.com>
2771
2772         * remote.c (remote_register_number_and_offset): Use std::vector.
2773         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2774         (putpkt_binary): Use gdb::def_vector.
2775         (compare_sections_command): Use gdb::byte_vector.
2776
2777 2017-10-16  Tom Tromey  <tom@tromey.com>
2778
2779         * ppc-linux-nat.c (hwdebug_insert_point): Use
2780         gdb::unique_xmalloc_ptr, XDUP.
2781
2782 2017-10-16  Tom Tromey  <tom@tromey.com>
2783
2784         * probe.c (parse_probes): Use std::string.
2785         (info_probes_for_ops, enable_probes_command)
2786         (disable_probes_command): Remove cleanups.
2787
2788 2017-10-16  Tom Tromey  <tom@tromey.com>
2789
2790         * buildsym.c (block_compar): Remove.
2791         (end_symtab_get_static_block): Use std::vector.
2792
2793 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2794
2795         * memrange.h (struct mem_range): Define operator< and operator==.
2796         (mem_range_s): Remove.
2797         (DEF_VEC_O (mem_range_s)): Remove.
2798         (normalize_mem_ranges): Change parameter type to std::vector.
2799         * memrange.c (compare_mem_ranges): Remove.
2800         (normalize_mem_ranges): Change parameter type to std::vector,
2801         adjust to vector change.
2802         * exec.c (section_table_available_memory): Return vector, remove
2803         parameter.
2804         (section_table_read_available_memory): Adjust to std::vector
2805         change.
2806         * remote.c (remote_read_bytes): Adjust to std::vector
2807         change.
2808         * tracepoint.h (traceframe_available_memory): Change parameter
2809         type to std::vector.
2810         * tracepoint.c (traceframe_available_memory): Change parameter
2811         type to std::vector, adjust.
2812         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2813         std::vector change.
2814         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2815         unittests/memrange-selftests.c.
2816         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2817         * gdb/unittests/memrange-selftests.c: New file.
2818
2819 2017-10-16  Pedro Alves  <palves@redhat.com>
2820
2821         * elfread.c (probe_key_free): Rename range-for variable.
2822         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2823         (find_probe_by_pc, collect_probes): Rename range-for variable.
2824
2825 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2826
2827         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2828         * features/tic6x-c62x.c: Remove.
2829         * features/tic6x-c64x-linux.c: Remove.
2830         * features/tic6x-c64x.c: Remove.
2831         * features/tic6x-c64xp-linux.c: Remove.
2832         * features/tic6x-c64xp.c: Remove.
2833         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2834         initialize_tdesc_tic6x_*_linux functions.
2835         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2836         initialize_tdesc_tic6x_* functions.
2837
2838 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2839
2840         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2841         tic6x-c62x.
2842         * regformats/tic6x-c62x.dat: Remove.
2843         * regformats/tic6x-c64x.dat: Remove.
2844         * regformats/tic6x-c64xp.dat: Remove.
2845
2846 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2847
2848         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2849         (the !HAVE_LIBEXPAT version).
2850
2851 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2854         const.
2855
2856 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2857
2858         * target.h: Include tracepoint.h.
2859         (enum trace_find_type): Move to tracepoint.h.
2860         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2861         * tracepoint.h: Don't include target.h
2862         (enum trace_find_type): Move from target.h.
2863         (parse_traceframe_info): Return a unique ptr.
2864         * tracepoint.c (current_traceframe_info): Change type to unique
2865         ptr.
2866         (free_traceframe_info): Remove.
2867         (clear_traceframe_info): Don't manually free
2868         current_traceframe_info.
2869         (free_result): Remove.
2870         (parse_traceframe_info): Return a unique ptr.
2871         (get_traceframe_info): Adjust to unique ptr.
2872         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2873         * remote.c (remote_traceframe_info): Return a unique ptr.
2874         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2875         ptr.
2876         * target-debug.h (target_debug_print_traceframe_info_up): New
2877         macro.
2878         * target-delegates.c: Regenerate.
2879
2880 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2881
2882         * memrange.h (struct mem_range): Add constructors.
2883         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2884         std::vector<mem_range>.
2885         * tracepoint.c (free_traceframe_info): Don't manually free
2886         vector.
2887         (traceframe_info_start_memory): Adjust to vector change.
2888         (traceframe_available_memory): Likewise.
2889         * tracefile-tfile.c (build_traceframe_info): Likewise.
2890         * ctf.c (ctf_traceframe_info): Likewise.
2891
2892 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2893
2894         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2895         std::vector<int>.
2896         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2897         (traceframe_info_start_tvar): Adjust to vector change.
2898         (parse_traceframe_info): Allocate with new.
2899         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2900         vector change.
2901         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2902         change.
2903         tfile_traceframe_info): Allocate with new.
2904         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2905         change.
2906
2907 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2908
2909         * tracepoint.c (traceframe_info): Rename to...
2910         (current_traceframe_info): ...this.
2911         (clear_traceframe_info): Adjust.
2912         (get_traceframe_info): Adjust.
2913
2914 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2915
2916         * nat/linux-osdata.c: Include algorithm.
2917         (compare_processes): Remove.
2918         (struct pid_pgid_entry): New struct.
2919         (linux_xfer_osdata_processgroups): Use std::vector instead of
2920         XNEWVEC.
2921
2922 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2923
2924         * objfiles.h: Don't include symfile.h.
2925         (struct partial_symbol): Remove forward-declaration.
2926         (struct objfile) <global_psymbols, static_psymbols>: Change type
2927         to std::vector<partial_symbol *>.
2928         * objfiles.c (objfile::objfile): Don't memset those fields.
2929         (objfile::~objfile): Don't free those fields.
2930         * psympriv.h (struct psymbol_allocation_list): Remove
2931         forward-declaration.
2932         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2933         to std::vector.
2934         (start_psymtab_common): Change parameters to std::vector.
2935         * psymtab.c: Include algorithm.
2936         (require_partial_symbols): Call shrink_to_fit.
2937         (find_pc_sect_psymbol): Adjust to vector change.
2938         (match_partial_symbol): Likewise.
2939         (lookup_partial_symbol): Likewise.
2940         (psym_relocate): Likewise.
2941         (dump_psymtab): Likewise.
2942         (recursively_search_psymtabs): Likewise.
2943         (compare_psymbols): Remove.
2944         (sort_pst_symbols): Adjust to vector change.
2945         (start_psymtab_common): Likewise.
2946         (end_psymtab_common): Likewise.
2947         (psymbol_bcache_full): De-constify return value.
2948         (add_psymbol_to_bcache): Likewise.
2949         (extend_psymbol_list): Remove.
2950         (append_psymbol_to_list): Adjust to vector change.
2951         (add_psymbol_to_list): Likewise.
2952         (init_psymbol_list): Likewise.
2953         (maintenance_info_psymtabs): Likewise.
2954         (maintenance_check_psymtabs): Likewise.
2955         * symfile.h (struct psymbol_allocation_list): Remove.
2956         * symfile.c (reread_symbols): Adjust to vector change.
2957         * dbxread.c (start_psymtab): Change type of parameters.
2958         (dbx_symfile_read): Adjust to vector change.
2959         (read_dbx_symtab): Likewise.
2960         (start_psymtab): Change type of parameters.
2961         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2962         (create_partial_symtab): Likewise.
2963         (add_partial_symbol): Likewise.
2964         (write_one_signatured_type): Likewise.
2965         (recursively_write_psymbols): Likewise.
2966         * mdebugread.c (parse_partial_symbols): Likewise.
2967         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2968         (scan_xcoff_symtab): Adjust to vector change.
2969         (xcoff_initial_scan): Likewise.
2970
2971 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2972
2973         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2974
2975 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2976
2977         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2978         Remove s390x-*-expedite, add s390x-expedite.
2979
2980 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2981
2982         * features/s390-gs-linux64.c: Regenerated.
2983         * features/s390x-gs-linux64.c: Regenerated.
2984
2985 2017-10-13  Tom Tromey  <tom@tromey.com>
2986
2987         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2988         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2989         delete.
2990         * symfile.c (symbol_file_add_with_addrs): Use new.
2991         (symbol_file_add_separate): Update comment.
2992         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2993         * jit.c (jit_object_close_impl): Use new.
2994         (jit_unregister_code): Use delete.
2995         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2996         (~objfile): Rename from free_objfile.
2997         (free_objfile_separate_debug, do_free_objfile_cleanup)
2998         (free_all_objfiles, objfile_purge_solibs): Use delete.
2999         * objfiles.h (struct objfile): Add constructor and destructor.
3000         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3001         (allocate_objfile, free_objfile): Don't declare.
3002         (struct objstats): Add initializers.
3003
3004 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3005
3006         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3007         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3008         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3009         * gdbarch.h: Regenerate.
3010         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3011         Adjust comment.
3012         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3013         (i386_displaced_step_fixup): Adjust comment.
3014         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3015
3016 2017-10-12  Tom Tromey  <tom@tromey.com>
3017
3018         * prologue-value.h (pv_area::store_would_trash): Return bool.
3019         (pv_area::find_reg): Likewise.
3020         * prologue-value.c (pv_area::store_would_trash): Return bool.
3021         (pv_area::find_reg): Likewise.
3022
3023 2017-10-12  Tom Tromey  <tom@tromey.com>
3024
3025         * s390-linux-tdep.c (s390_store, s390_load)
3026         (s390_check_for_saved, s390_analyze_prologue): Update.
3027         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3028         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3029         * prologue-value.h (class pv_area): Move from prologue-value.c.
3030         Change names of members.  Add constructor, destructor, member
3031         functions.
3032         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3033         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3034         (pv_area_fetch, pv_area_scan): Don't declare.
3035         * prologue-value.c (struct pv_area::area_entry): Now member of
3036         pv_area.
3037         (struct pv_area): Move to prologue-value.h.
3038         (pv_area::pv_area): Rename from make_pv_area.
3039         (pv_area::~pv_area): Rename from free_pv_area.
3040         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3041         (clear_entries, find_entry, overlaps, store_would_trash, store)
3042         (fetch, find_reg, scan): Now member of pv_area.
3043         Remove "area" argument.  Update.
3044         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3045         Update.
3046         * mn10300-tdep.c (push_reg, check_for_saved)
3047         (mn10300_analyze_prologue): Update.
3048         * mep-tdep.c (is_arg_spill, check_for_saved)
3049         (mep_analyze_prologue): Update.
3050         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3051         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3052         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3053         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3054         Update.
3055         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3056         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3057
3058 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3059
3060         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3061         * linux-nat.c (linux_nat_delete_thread): New variable.
3062         (lwp_free): Invoke linux_nat_delete_thread if set.
3063         (linux_nat_set_delete_thread): New function.
3064         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3065         thread delete callback.
3066         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3067         (_initialize_arm_linux_nat): Assign thread delete callback.
3068         * s390-linux-nat.c (s390_delete_thread): New function.
3069         (_initialize_s390_nat): Assign thread delete callback.
3070         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3071         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3072         function.
3073         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3074         declaration.
3075         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3076         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3077
3078 2017-10-09  Tom Tromey  <tom@tromey.com>
3079
3080         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3081         std::string.
3082         * tui/tui-layout.c (enum tui_status): Use std::string.
3083
3084 2017-10-11  Tom Tromey  <tom@tromey.com>
3085
3086         * gdbthread.h (thread_command): Constify.
3087         * inferior.h (detach_command): Constify.
3088         * top.h (set_history, show_history): Constify.
3089         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3090         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3091         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3092         * printcmd.c (set_command): Constify.
3093         (non_const_set_command): New function.
3094         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3095         * breakpoint.c (enable_command, disable_command, delete_command)
3096         (catch_command, tcatch_command, set_breakpoint_cmd)
3097         (show_breakpoint_cmd): Constify.
3098         * macrocmd.c (macro_command): Constify.
3099         * infcmd.c (unset_command, kill_command, detach_command)
3100         (info_proc_cmd): Constify.
3101         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3102         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3103         (info_auto_load_cmd): Constify.
3104         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3105         (unset_tdesc_cmd): Constify.
3106         * ada-lang.c (set_ada_command, show_ada_command)
3107         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3108         * guile/guile.c (set_guile_command, show_guile_command)
3109         (info_guile_command): Constify.
3110         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3111         Constify.
3112         * skip.c (skip_command): Constify.
3113         * compile/compile.c (_initialize_compile): Constify.
3114         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3115         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3116         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3117         (maint_btrace_pt_show_cmd): Constify.
3118         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3119         Constify.
3120         * python/python.c (user_show_python, user_set_python): Constify.
3121         * mips-tdep.c (set_mips_command, show_mips_command)
3122         (set_mipsfpu_command): Constify.
3123         * record-btrace.c (cmd_record_btrace_start)
3124         (cmd_set_record_btrace, cmd_show_record_btrace)
3125         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3126         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3127         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3128         Constify.
3129         * symfile.c (overlay_command): Constify.
3130         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3131         * cli/cli-logging.c (set_logging_command, show_logging_command):
3132         Constify.
3133         * cli/cli-dump.c (dump_command, append_command)
3134         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3135         (tekhex_dump_command, binary_dump_command)
3136         (binary_append_command): Constify.
3137         * cli/cli-decode.c (struct cmd_list_element): Change type of
3138         "fun".
3139         * cli/cli-cmds.c (info_command, show_command, set_debug)
3140         (show_debug): Constify.
3141         (show_command): Add non-const overload.
3142         * top.c (set_history, show_history): Constify.
3143         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3144         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3145         * target.c (target_command): Constify.
3146         * sparc64-tdep.c (info_adi_command): Constify.
3147         * record-full.c (cmd_record_full_start): Constify.
3148         (set_record_full_command): Constify.  Fix typo.
3149         (show_record_full_command): Constify.
3150         * thread.c (thread_command, thread_apply_command): Constify.
3151         * memattr.c (dummy_cmd): Constify.
3152         * value.c (function_command): Constify.
3153         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3154         * probe.c (info_probes_command): Constify.
3155         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3156         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3157         (show_thread_cmd, set_thread_default_cmd)
3158         (show_thread_default_cmd): Constify.
3159         (check_empty): Constify.
3160         * tracepoint.c (tfind_command): Constify.
3161         * cp-support.c (maint_cplus_command): Constify.
3162         * windows-tdep.c (info_w32_command): Constify.
3163         * record.c (cmd_record_start, set_record_command)
3164         (show_record_command, info_record_command, cmd_record_goto):
3165         Constify.
3166         * ravenscar-thread.c (set_ravenscar_command)
3167         (show_ravenscar_command): Constify.
3168         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3169         Constify.
3170         (add_internal_problem_command): Remove casts.
3171         * arc-tdep.c (maintenance_print_arc_command): Constify.
3172         * valprint.c (set_print, show_print, set_print_raw)
3173         (show_print_raw): Constify.
3174         * maint.c (maintenance_command, maintenance_info_command)
3175         (maintenance_print_command, maintenance_set_cmd)
3176         (maintenance_show_cmd, set_per_command_cmd)
3177         (show_per_command_cmd, maintenance_check_command): Constify.
3178         * language.c (set_check, show_check): Constify.
3179         * typeprint.c (show_print_type, set_print_type): Constify.
3180         * go32-nat.c (go32_info_dos_command): Constify.
3181
3182 2017-10-11  Tom Tromey  <tom@tromey.com>
3183
3184         * breakpoint.c (prepare_re_set_context): Remove.
3185         (breakpoint_re_set_one): Update.  Don't use cleanups.
3186         (breakpoint_re_set): Use scoped_restore, std::string, and
3187         scoped_restore_current_language.
3188
3189 2017-10-11  Tom Tromey  <tom@tromey.com>
3190
3191         * breakpoint.c (commands_command_1): Use std::string.
3192         (cleanup_executing_breakpoints): Remove.
3193         (bpstat_do_actions_1): Use scoped_restore.
3194         (bpstat_check_watchpoint): Use std::string.
3195         (decode_static_tracepoint_spec): Likewise.
3196         (break_range_command): Likewise.
3197         (watch_command_1): Likewise.
3198         (compare_breakpoints): Change argument types.
3199         (clear_command): Use std::vector.
3200         (cleanup_executing_breakpoints): Remove.
3201         (update_global_location_list): Use unique_xmalloc_ptr.
3202         (strace_command): Remove unused declaration.
3203
3204 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3205
3206         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3207         * NEWS: Mention new FreeBSD/arm native configuration.
3208         * configure.host: Add arm*-*-freebsd*.
3209         * configure.nat: Likewise.
3210         * arm-fbsd-nat.c: New file.
3211
3212 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3213
3214         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3215         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3216         * NEWS: Mention new FreeBSD/arm target.
3217         * configure.tgt: Add arm*-*-freebsd*.
3218         * arm-fbsd-tdep.c: New file.
3219         * arm-fbsd-tdep.h: New file.
3220
3221 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3222
3223         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3224         `gdbarch_elfcore_write_linux_prpsinfo'.
3225         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3226         method.
3227         (elf_internal_linux_prpsinfo): Remove declaration.
3228         * gdbarch.h: Regenerate.
3229         * gdbarch.c: Regenerate.
3230
3231 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3232
3233         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3234         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3235
3236 2017-10-11  Pedro Alves  <palves@redhat.com>
3237
3238         * breakpoint.c (reattach_breakpoints): Delete.
3239         * breakpoint.h (reattach_breakpoints): Delete.
3240
3241 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * symfile.c (registered_sym_fns): Make struct, not typedef.
3244         (DEF_VEC_O (registered_sym_fns)): Remove.
3245         (symtab_fns): Change type to std::vector.
3246         (add_symtab_fns): Adjust.
3247         (find_sym_fns): Adjust.
3248
3249 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3250
3251         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3252         * arc-tdep.h (arc_arch_is_em): New function.
3253         (arc_arch_is_hs): Likewise.
3254
3255 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3256
3257         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3258         parentheses in the declaration.
3259         (macro_lookup_inclusion): Likewise.
3260         (macro_lookup_definition): Likewise.
3261         * p-lang.h (pascal_builtin_types): Likewise.
3262         * tui/tui-data.c (tui_win_list): Likewise.
3263         * tui/tui-data.h (tui_win_list): Likewise.
3264         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3265
3266 2017-10-11  Mark Rages  <markrages@gmail.com>
3267
3268         * target-memory.c (block_boundaries): Fix for block address not
3269         aligned on block size.
3270
3271 2017-10-10  Pedro Alves <palves@redhat.com>
3272             Tom Tromey  <tom@tromey.com>
3273
3274         * breakpoint.c (struct captured_breakpoint_query_args)
3275         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3276         (print_breakpoint): New.
3277         * breakpoint.h (print_breakpoint): Declare.
3278         * common/common-exceptions.h (enum return_reason): Remove
3279         references to catch_exceptions.
3280         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3281         Delete.
3282         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3283         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3284         * gdb.h: Delete.
3285         * gdbthread.h (thread_select): Declare.
3286         * mi/mi-cmd-break.c: Don't include gdb.h.
3287         (breakpoint_notify): Use print_breakpoint.
3288         * mi/mi-cmd-catch.c: Don't include gdb.h.
3289         * mi/mi-interp.c: Don't include gdb.h.
3290         (mi_print_breakpoint_for_event): New.
3291         (mi_breakpoint_created, mi_breakpoint_modified): Use
3292         mi_print_breakpoint_for_event.
3293         * mi/mi-main.c: Don't include gdb.h.
3294         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3295         thread_select instead of gdb_thread_select.
3296         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3297         of using gdb_list_thread_ids.
3298         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3299         FILEIO_ENOSYS here.
3300         (remote_fileio_request): Use TRY/CATCH instead of
3301         catch_exceptions.
3302         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3303         (symbol_file_add_from_memory_wrapper): Delete.
3304         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3305         * thread.c: Don't include gdb.h.
3306         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3307         (thread_alive): Use thread_select.
3308         (do_captured_thread_select): Delete, parts salvaged as ...
3309         (thread_select): ... this new function.
3310         (gdb_thread_select): Delete.
3311
3312 2017-10-10  Pedro Alves  <palves@redhat.com>
3313             Tom Tromey  <tom@tromey.com>
3314
3315         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3316         and reverse logic.
3317         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3318         No longer macros.  Instead ...
3319         (enum wp_check_result): They're now values of this new
3320         enumeration.
3321         (watchpoint_check): Change return type to wp_check_result and
3322         parameter type to bpstat.
3323         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3324         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3325         catch_errors.  Reverse logic of watchpoint_check call.
3326         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3327         pointer as parameter.
3328         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3329         * common/common-exceptions.c (throw_exception_sjlj): Update
3330         comments to avoid mentioning catch_errors.
3331         * exceptions.c (catch_errors): Delete.
3332         * exceptions.h: Update comments to avoid mentioning catch_errors.
3333         (catch_errors_ftype, catch_errors): Delete.
3334         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3335         (hook_stop_stub): Delete.
3336         (restore_selected_frame): Change return type to void, and
3337         parameter type to const frame_id &.
3338         (restore_infcall_control_state): Use TRY/CATCH instead of
3339         catch_errors.
3340         * main.c (captured_command_loop): Return void and remove
3341         parameter.  Remove references to catch_errors.
3342         (captured_main): Use TRY/CATCH instead of catch_errors.
3343         * objc-lang.c (objc_submethod_helper_data)
3344         (find_objc_msgcall_submethod_helper): Delete.
3345         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3346         catch_errors.
3347         * record-full.c (record_full_message): Return void.
3348         (record_full_message_args, record_full_message_wrapper): Delete.
3349         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3350         instead of catch_errors.
3351         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3352         parameter type to int.
3353         * solib-darwin.c (open_symbol_file_object): Ditto.
3354         * solib-dsbt.c (open_symbol_file_object): Ditto.
3355         * solib-frv.c (open_symbol_file_object): Ditto.
3356         * solib-svr4.c (open_symbol_file_object): Ditto.
3357         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3358         * solib.c (update_solib_list): Use TRY/CATCH instead of
3359         catch_errors.
3360         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3361         Change type.
3362         * symmisc.c (struct print_symbol_args): Remove.
3363         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3364         (print_symbol): Change type.
3365         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3366         and remove parameters.
3367         (catch_errors): New.
3368         (get_windows_debug_event): Adjust.
3369
3370 2017-10-09  Tom Tromey  <tom@tromey.com>
3371
3372         * mi/mi-main.c (free_splay_tree): Remove.
3373         (list_available_thread_groups): Use splay_tree_up.
3374         * common/gdb_splay_tree.h: New file.
3375
3376 2017-10-09  Tom Tromey  <tom@tromey.com>
3377
3378         * mi/mi-main.c (do_nothing): Remove.
3379         (list_available_thread_groups): Update.
3380
3381 2017-10-09  Pedro Alves  <palves@redhat.com>
3382
3383         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3384         reading registers when switching context.
3385
3386 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3387
3388         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3389         (fbsd_convert_siginfo): Likewise.
3390         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3391
3392 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3393
3394         * configure.ac (try_guile_versions): Remove guile-2.2.
3395         * configure: Regenerate.
3396
3397 2017-10-09  Tom Tromey  <tom@tromey.com>
3398
3399         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3400         (COMPILE.pre): Use $(CXX).
3401
3402 2017-10-09  Pedro Alves  <palves@redhat.com>
3403
3404         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3405         Use bool.
3406         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3407         * cp-support.h (cp_remove_params): Now returns a
3408         gdb::unique_xmalloc_ptr.
3409         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3410         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3411         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3412         returning a gdb::unique_xmalloc_ptr.
3413         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3414         * stack.c (find_frame_funname): Adjust to cp_remove_params
3415         returning a gdb::unique_xmalloc_ptr.
3416
3417 2017-10-08  Tom Tromey  <tom@tromey.com>
3418
3419         * dwarf2read.c (dwarf2_get_dwz_file): Use
3420         gdb::unique_xmalloc_ptr.
3421         (find_slot_in_mapped_hash): Likewise.
3422         (dwarf2_physname): Likewise.
3423         (create_dwo_unit_in_dwp_v1): Use std::string.
3424         (create_dwo_unit_in_dwp_v2): Likewise.
3425         (lookup_dwo_cutu): Likewise.
3426         (inherit_abstract_dies): Use std::vector.
3427         (read_array_type): Likewise.
3428         (dwarf_decode_macros): Remove unused declaration.
3429         (unsigned_int_compar): Remove.
3430         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3431         (psymtabs_addrmap_cleanup): Remove.
3432
3433 2017-10-08  Tom Tromey  <tom@tromey.com>
3434
3435         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3436         * frame.h (frame_cleanup_after_sniffer): Declare.
3437         (frame_prepare_for_sniffer): Return void.
3438         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3439         type of argument.
3440         (frame_prepare_for_sniffer): Return void.
3441
3442 2017-10-08  Tom Tromey  <tom@tromey.com>
3443
3444         * utils.h (make_cleanup_value_free): Remove.
3445         * utils.c (do_value_free, struct cleanup): Remove.
3446         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3447         Use gdb_value_up.
3448         * value.h (struct value_deleter): New.
3449         (gdb_value_up): New typedef.
3450
3451 2017-10-08  Tom Tromey  <tom@tromey.com>
3452
3453         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3454         (make_cleanup_free_search_symbols): Remove.
3455         (search_symbols): Return std::vector.
3456         (symbol_search::compare_search_syms): Now member of
3457         symbol_search.  Change arguments.
3458         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3459         (symtab_symbol_info, rbreak_command): Update.
3460         * symtab.h (struct symbol_search) <next>: Remove.
3461         Add constructors.
3462         (symbol_search::operator<): New function.
3463         (symbol_search::operator==): New function.
3464         (search_symbols): Remove std::vector.
3465         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3466         (symbol_search::compare_search_syms): Declare.
3467
3468 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3469
3470         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3471         arch/aarch64-insn.o.
3472         Remove one rule.
3473         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3474
3475 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3476
3477         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3478         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3479         arch/arm-linux.o respectively.
3480         * configure.tgt: Likewise.
3481
3482 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3483
3484         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3485         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3486
3487 2017-10-06  Pedro Alves  <palves@redhat.com>
3488
3489         * windows-nat.c: Include <algorithm>.
3490
3491 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3492
3493         * configure.tgt (i386_tobjs): New variable.
3494         (amd64_tobjs): New variable.
3495         Set $cpu_obs and $os_obs.
3496
3497 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3498
3499         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3500         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3501         (clean): Remove object files and dependency files.
3502         (distclean): Remove the directory.
3503         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3504         * configure: Re-generated.
3505         * configure.tgt: Replace amd64.o with arch/amd64.o.
3506
3507 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3508
3509         PR build/22188
3510         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3511         and SETEND.
3512
3513 2017-10-05  Pedro Alves  <palves@redhat.com>
3514
3515         * linux-nat.c (linux_child_follow_fork): When following the parent
3516         and detaching the child, consult the parent thread's architecture
3517         instead of the child's.
3518
3519 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3520
3521         * ax.h: Do not include "doublest.h".
3522         (union agent_val): Remove.
3523
3524 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3525
3526         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3527         (decimal_to_string): Return std::string object.
3528         (decimal_from_string): Accept std::string object.  Return bool.
3529         (decimal_from_integral, decimal_from_doublest): Remove.
3530         (decimal_from_longest): Add prototype.
3531         (decimal_from_ulongest): Likewise.
3532         (decimal_to_longest): Likewise.
3533         (decimal_from_doublest): Likewise.
3534         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3535         (MAX_DECIMAL_STRING): Move here.
3536         (decimal_to_string): Return std::string object.
3537         (decimal_from_string): Accept std::string object.  Return bool.
3538         (decimal_from_integral): Remove, replace by ...
3539         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3540         (decimal_to_longest): New function.
3541         (decimal_from_floating): Remove, replace by ...
3542         (decimal_from_doublest): ... this new function.
3543         (decimal_to_doublest): Update to new decimal_to_string interface.
3544
3545         * value.c (unpack_long): Use decimal_to_longest.
3546         * valops.c (value_cast): Use decimal_from_doublest instead of
3547         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3548         decimal_from_integral.
3549         * valarith.c (value_args_as_decimal): Likewise.
3550         * valprint.c (print_decimal_floating): Update to new
3551         decimal_to_string interface.
3552         * printcmd.c (printf_decfloat): Likewise.
3553         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3554
3555 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3556
3557         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3558         * gdbtypes.c: Include "floatformat.h".
3559         * value.c: Likewise.
3560         * m68k-tdep.c: Likewise.
3561
3562         * findvar.c: Do not include "floatformat.h".
3563         * amd64-darwin-tdep.c: Likewise.
3564         * arm-linux-tdep.c: Likewise.
3565         * i386-darwin-tdep.c: Likewise.
3566         * i387-tdep.c: Likewise.
3567         * m68k-linux-tdep.c: Likewise.
3568         * mep-tdep.c: Likewise.
3569         * mips-tdep.c: Likewise.
3570         * nios2-tdep.c: Likewise.
3571         * s390-linux-tdep.c: Likewise.
3572         * sparc-obsd-tdep.c: Likewise.
3573         * sparc-tdep.c: Likewise.
3574         * sparc64-tdep.c: Likewise.
3575         * spu-tdep.c: Likewise.
3576         * tic6x-tdep.c: Likewise.
3577         * tilegx-tdep.c: Likewise.
3578         * vax-tdep.c: Likewise.
3579         * xstormy16-tdep.c: Likewise.
3580         * xtensa-tdep.c: Likewise.
3581
3582         * top.c: Do not include "doublest.h".
3583         * aarch64-tdep.c: Likewise.
3584         * alpha-tdep.c: Likewise.
3585         * arm-linux-tdep.c: Likewise.
3586         * m68k-linux-tdep.c: Likewise.
3587         * tilegx-tdep.c: Likewise.
3588         * xstormy16-tdep.c: Likewise.
3589
3590 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3591
3592         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3593         (mipsn32_fbsd_sigframe): Define.
3594         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3595         for FreeBSD/mipsn32.
3596
3597 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3598
3599         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3600         AT_HWCAP.
3601
3602 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3603
3604         * MAINTAINERS (Misc): Update my email address.
3605
3606 2017-10-04  Pedro Alves  <palves@redhat.com>
3607
3608         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3609         it instead of target_gdbarch.
3610         (get_remote_state, get_remote_packet_size): Adjust
3611         get_remote_arch_state calls, passing down target_gdbarch
3612         explicitly.
3613         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3614         'gdbarch' and use it instead of target_gdbarch.
3615         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3616         passing down target_gdbarch explicitly.
3617         (struct stop_reply) <arch>: New field.
3618         (remote_parse_stop_reply): Use the stopped thread's architecture,
3619         not the current inferior's.  Save the architecture in the
3620         stop_reply.
3621         (process_stop_reply): Use the stop reply's architecture.
3622         (process_g_packet, remote_fetch_registers)
3623         (remote_prepare_to_store, store_registers_using_G)
3624         (remote_store_registers): Adjust get_remote_arch_state calls,
3625         using the regcache's architecture.
3626         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3627         passing down target_gdbarch explicitly.
3628         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3629         beneath instead of calling target_gdbarch.
3630         * target.c (default_thread_architecture): Use the specified
3631         inferior's architecture, instead of the current inferior's
3632         architecture (via target_gdbarch).
3633
3634 2017-10-04  Pedro Alves  <palves@redhat.com>
3635
3636         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3637         case.
3638         (regcache_print): Handle !target_has_registers here instead.
3639
3640 2017-10-04  Pedro Alves  <palves@redhat.com>
3641
3642         * frame.c (create_test_frame): Delete.
3643         * frame.h (create_test_frame): Delete.
3644         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3645         (class regcache_test): Delete.
3646         (test_target_has_registers, test_target_has_stack)
3647         (test_target_has_memory, test_target_prepare_to_store)
3648         (test_target_store_registers): New functions.
3649         (test_target_ops): New class.
3650         (register_to_value_test): Error out if there's already a
3651         process_stratum (or higher) target pushed.  Create a fuller mock
3652         environment, with mock target_ops, inferior, address space, thread
3653         and inferior_ptid.
3654         * progspace.c (struct address_space): Move to ...
3655         * progspace.h (struct address_space): ... here.
3656         * regcache.h (regcache::~regcache, regcache::raw_write)
3657         [GDB_SELF_TEST]: No longer virtual.
3658
3659 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3660
3661         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3662
3663 2017-10-04  Pedro Alves  <palves@redhat.com>
3664
3665         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3666         out of 'between TRY and CATCH'.
3667
3668 2017-10-04  Pedro Alves  <palves@redhat.com>
3669
3670         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3671         * common/common-exceptions.h (TRY): Open an outermost scope.
3672         Expand intro comment.
3673         (CATCH): Reindent.
3674         (END_CATCH): Close the outermost scope.
3675         * completer.c (complete_line_internal): Add missing END_CATCH.
3676
3677 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3678
3679         * NEWS (Changes since GDB 8.0): Add entry about new
3680         'set-cwd-on-gdbserver' feature.
3681         (New remote packets): Add entry for QSetWorkingDir.
3682         * common/common-inferior.h (set_inferior_cwd): New prototype.
3683         * infcmd.c (set_inferior_cwd): Remove "static".
3684         (show_cwd_command): Expand text to include remote debugging.
3685         * remote.c: Add PACKET_QSetWorkingDir.
3686         (remote_protocol_features) <QSetWorkingDir>: New entry for
3687         PACKET_QSetWorkingDir.
3688         (extended_remote_set_inferior_cwd): New function.
3689         (extended_remote_create_inferior): Call
3690         "extended_remote_set_inferior_cwd".
3691         (_initialize_remote): Call "add_packet_config_cmd" for
3692         QSetWorkingDir.
3693
3694 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3695
3696         * NEWS (New commands): Mention "set/show cwd".
3697         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3698         "cd" command's help text.
3699         * common/common-inferior.h (get_inferior_cwd): New prototype.
3700         * infcmd.c (inferior_cwd_scratch): New global variable.
3701         (set_inferior_cwd): New function.
3702         (get_inferior_cwd): Likewise.
3703         (set_cwd_command): Likewise.
3704         (show_cwd_command): Likewise.
3705         (_initialize_infcmd): Add "set/show cwd" commands.
3706         * inferior.h (class inferior) <cwd>: New field.
3707         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3708         (fork_inferior): Change inferior's cwd before its execution.
3709         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3710         to CreateProcess.
3711
3712 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3713
3714         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3715         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3716         (COMMON_OBS): Add gdb_tilde_expand.o.
3717         * common/gdb_tilde_expand.c: New file.
3718         * common/gdb_tilde_expand.h: Likewise.
3719
3720 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3721
3722         * gdbarch.sh (objfile): Remove duplicate declaration.
3723         * gdbarch.h: Regenerate.
3724
3725 2017-10-03  Tom Tromey  <tom@tromey.com>
3726
3727         * utils.c (internal_vproblem): Use string_vprintf.
3728
3729 2017-10-03  Tom Tromey  <tom@tromey.com>
3730
3731         * printcmd.c (info_symbol_command): Use std::string.
3732
3733 2017-10-03  Tom Tromey  <tom@tromey.com>
3734
3735         * top.c (gdb_safe_append_history): Use std::string.
3736
3737 2017-10-03  Tom Tromey  <tom@tromey.com>
3738
3739         * event-top.c (stdin_event_handler): Update.
3740         * main.c (captured_main_1): Update.
3741         * top.h (make_delete_ui_cleanup): Remove.
3742         (struct ui): Add constructor and destructor.
3743         (new_ui, delete_ui): Remove.
3744         * top.c (make_delete_ui_cleanup): Remove.
3745         (new_ui_command): Use std::unique_ptr.
3746         (delete_ui_cleanup): Remove.
3747         (ui::ui): Rename from new_ui.  Update.
3748         (free_ui): Remove.
3749         (ui::~ui): Rename from delete_ui.  Update.
3750
3751 2017-10-03  Tom Tromey  <tom@tromey.com>
3752
3753         * symfile.c (load_progress): Use gdb::byte_vector.
3754
3755 2017-10-03  Tom Tromey  <tom@tromey.com>
3756
3757         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3758         declaration.
3759         * printcmd.c (x_command): Remove unused declaration.
3760         * symfile.c (symbol_file_command): Remove unused declaration.
3761
3762 2017-10-03  Tom Tromey  <tom@tromey.com>
3763
3764         * utils.c (internal_vproblem): Use std::string.
3765         (defaulted_query): Likewise.
3766
3767 2017-10-03  Tom Tromey  <tom@tromey.com>
3768
3769         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3770         * top.c (execute_command_to_string): Update.
3771         * utils.c (make_cleanup_restore_page_info): Remove.
3772         (do_restore_page_info_cleanup): Remove.
3773         (set_batch_flag_and_restore_page_info):
3774         New.
3775         (make_cleanup_restore_page_info): Remove.
3776         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3777         (~set_batch_flag_and_restore_page_info): New
3778         (make_cleanup_restore_uinteger): Remove.
3779         (make_cleanup_restore_integer): Remove.
3780         (struct restore_integer_closure): Remove.
3781         (restore_integer): Remove.
3782         * utils.h (struct set_batch_flag_and_restore_page_info): New
3783         class.
3784         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3785         (make_cleanup_restore_page_info): Remove.
3786         (make_cleanup_restore_uinteger) Remove.
3787         (make_cleanup_restore_integer) Remove.
3788
3789 2017-10-03  Tom Tromey  <tom@tromey.com>
3790
3791         * record-full.h (record_full_gdb_operation_disable_set): Return
3792         scoped_restore_tmpl<int>.
3793         * infrun.c (adjust_pc_after_break): Update.
3794         (handle_signal_stop): Update.
3795         * record-full.c (record_full_gdb_operation_disable_set): Return
3796         scoped_restore_tmpl<int>.
3797         (record_full_wait_1, record_full_insert_breakpoint)
3798         (record_full_remove_breakpoint, record_full_save)
3799         (record_full_goto_insn): Update.
3800
3801 2017-10-02  Tom Tromey  <tom@tromey.com>
3802
3803         PR rust/22236:
3804         * rust-lang.c (rust_val_print_str): New function.
3805         (val_print_struct): Call it.
3806         (rust_subscript): Preserve name of slice type.
3807
3808 2017-10-02  Tom Tromey  <tom@tromey.com>
3809
3810         * rust-lang.c (rust_subscript): Handle slices in
3811         EVAL_AVOID_SIDE_EFFECTS case.
3812
3813 2017-10-02  Tom Tromey  <tom@tromey.com>
3814
3815         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3816
3817 2017-10-02  Tom Tromey  <tom@tromey.com>
3818
3819         * rust-lang.h (rust_slice_type): Add "extern".
3820
3821 2017-10-02  Tom Tromey  <tom@tromey.com>
3822             Pedro Alves  <palves@redhat.com>
3823
3824         * ada-lang.h (ada_exc_info::operator<): Make const.
3825         (ada_exc_info::operator==): Make const.
3826         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3827         Make const.
3828
3829 2017-09-29  Tom Tromey  <tom@tromey.com>
3830
3831         * target.c (read_whatever_is_readable): Change type of "result".
3832         Update.
3833         (free_memory_read_result_vector): Remove.
3834         (read_memory_robust): Change return type.  Update.
3835         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3836         bin2hex, std::string.
3837         * target.h (memory_read_result_s): Remove typedef.
3838         (free_memory_read_result_vector): Remove.
3839         (read_memory_robust): Return std::vector.
3840
3841 2017-09-29  Tom Tromey  <tom@tromey.com>
3842
3843         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3844
3845 2017-09-29  Tom Tromey  <tom@tromey.com>
3846
3847         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3848         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3849         operator< and operator==.
3850         (ada_exceptions_list): Return a std::vector.
3851         * ada-lang.c (ada_exc_info::operator<): Rename from
3852         compare_ada_exception_info.
3853         (ada_exc_info::operator==): New.
3854         (sort_remove_dups_ada_exceptions_list): Change type of
3855         "exceptions".
3856         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3857         (ada_add_global_exceptions): Likewise.
3858         (ada_exceptions_list_1): Return a std::vector.
3859         (ada_exceptions_list): Likewise.
3860
3861 2017-09-29  Tom Tromey  <tom@tromey.com>
3862
3863         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3864         'std::set *'.
3865         (print_one_inferior): Update.
3866         (free_vector_of_ints): Remove.
3867         (list_available_thread_groups): Change "ids" to std::set.
3868         (mi_cmd_list_thread_groups): Update.
3869         (struct collect_cores_data) <core>: Now a std::set.
3870         (collect_cores): Update.
3871         (unique): Remove.
3872         (print_one_inferior): Update.
3873
3874 2017-09-29  Tom Tromey  <tom@tromey.com>
3875
3876         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3877         (mi_execute_async_cli_command): Likewise.
3878         (mi_cmd_trace_frame_collected): Use field_fmt.
3879
3880 2017-09-29  Tom Tromey  <tom@tromey.com>
3881
3882         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3883         gdb::byte_vector.
3884
3885 2017-09-29  Tom Tromey  <tom@tromey.com>
3886
3887         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3888
3889 2017-09-29  Tom Tromey  <tom@tromey.com>
3890
3891         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3892
3893 2017-09-29  Tom Tromey  <tom@tromey.com>
3894
3895         * varobj.h (varobj_gen_name): Return std::string.
3896         * varobj.c (varobj_gen_name): Return std::string.
3897         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3898         (mi_cmd_var_delete): Don't copy "name".
3899
3900 2017-09-29  Tom Tromey  <tom@tromey.com>
3901
3902         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3903         (mi_cmd_break_insert_1): Update.
3904
3905 2017-09-29  Tom Tromey  <tom@tromey.com>
3906
3907         * target.h (make_scoped_defer_target_commit_resume): Update.
3908         * target.c (make_scoped_defer_target_commit_resume): Rename from
3909         make_cleanup_defer_target_commit_resume.  Return a
3910         scoped_restore.
3911         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3912
3913 2017-09-29  Tom Tromey  <tom@tromey.com>
3914
3915         * main.c (captured_main_1): Remove unused declaration.
3916         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3917
3918 2017-09-29  Tom Tromey  <tom@tromey.com>
3919
3920         * symtab.c (search_symbols): Remove unused outer cleanup.
3921         (make_source_files_completion_list): Remove unused declaration.
3922
3923 2017-09-29  Tom Tromey  <tom@tromey.com>
3924
3925         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3926
3927 2017-09-29  Tom Tromey  <tom@tromey.com>
3928
3929         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3930         gdb::byte_vector.
3931
3932 2017-09-29  Tom Tromey  <tom@tromey.com>
3933
3934         * complaints.c (vcomplaint): Use std::string.
3935
3936 2017-09-29  Tom Tromey  <tom@tromey.com>
3937
3938         * tracepoint.c (trace_variable_command): Use std::string.
3939         (encode_actions_1): Remove unused declarations.
3940         (create_tsv_from_upload): Use std::string.
3941
3942 2017-09-29  Tom Tromey  <tom@tromey.com>
3943
3944         * cp-support.c (gdb_demangle): Use std::string.
3945
3946 2017-09-29  Tom Tromey  <tom@tromey.com>
3947
3948         * stack.c (parse_frame_specification): Use std::string
3949         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3950
3951 2017-09-29  Tom Tromey  <tom@tromey.com>
3952
3953         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3954
3955 2017-09-29  Tom Tromey  <tom@tromey.com>
3956
3957         * utils.c (vfprintf_maybe_filtered): Use std::string.
3958         (vfprintf_unfiltered): Likewise.
3959
3960 2017-09-29  Tom Tromey  <tom@tromey.com>
3961
3962         * event-top.c (top_level_prompt): Return std::string.
3963         (display_gdb_prompt): Update.
3964
3965 2017-09-29  Tom Tromey  <tom@tromey.com>
3966
3967         * unittests/common-utils-selftests.c (format): New function.
3968         (string_vprintf_tests): New function.
3969         (_initialize_common_utils_selftests): Register new tests.
3970         * common/common-utils.c (string_vprintf): New function.
3971         * common/common-utils.h (string_vprintf): Declare.
3972
3973 2017-09-29  Pedro Alves  <palves@redhat.com>
3974
3975         * common/rsp-low.c (unpack_varlen_hex): Constify.
3976         * common/rsp-low.h (unpack_varlen_hex): Constify.
3977         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3978         Constify.
3979         * remote.c (remote_set_permissions, read_ptid)
3980         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3981         (remote_static_tracepoint_marker_at)
3982         (remote_static_tracepoint_markers_by_strid)
3983         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3984         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3985         (parse_tracepoint_definition, parse_tsv_definition)
3986         (parse_static_tracepoint_marker_definition): Constify.
3987         * tracepoint.h (parse_static_tracepoint_marker_definition)
3988         (parse_trace_status, parse_tracepoint_status)
3989         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3990
3991 2017-09-29  Pedro Alves  <palves@redhat.com>
3992
3993         * remote.c (target_buf, target_buf_size): Delete.
3994         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3995         Use the connection's packet buffer instead.
3996         All callers adjusted.
3997         (_initialize_remote): Remove references to target_buf and
3998         target_buf_size.
3999
4000 2017-09-28  Pedro Alves  <palves@redhat.com>
4001
4002         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4003         unittests/common-utils-selftests.c.
4004         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4005         (COMMON_OBS): Remove utils-selftests.o.
4006         * utils-selftests.c: Move to ...
4007         * unittests/common-utils-selftests.c: ... here and rename self
4008         test to "string_printf".
4009
4010 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4011
4012         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4013         having NULL cus or tus.
4014
4015 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4016
4017         * arm-tdep.c: (convert_from_extended): Remove.
4018         (convert_to_extended): Likewise.
4019         (arm_extract_return_value): Use convert_typed_floating.
4020         (arm_store_return_value): Likewise.
4021
4022         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4023         * sh-tdep.c: Do not include "floatformat.h".
4024         (sh_littlebyte_bigword_type): New function.
4025         (sh_register_convert_to_virtual): Use convert_typed_floating.
4026         (sh_register_convert_to_raw): Likewise.
4027         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4028         (sh64_littlebyte_bigword_type): New function.
4029         (sh64_extract_return_value): Use convert_typed_floating.
4030         (sh64_register_convert_to_virtual): Likewise.
4031         (sh64_register_convert_to_raw): Likewise.
4032
4033 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4034
4035         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4036         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4037
4038         * gdbtypes.h (union type_specific): Make field floatformat hold
4039         just a single struct floatformat, not an array.
4040         (floatformat_from_type): Move here.
4041         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4042         changed TYPE_FLOATFORMAT definition.
4043         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4044         (recursive_dump_type): Likewise.
4045         (init_float_type): Install correct floatformat for byte order.
4046         (arch_float_type): Likewise.
4047
4048 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4049
4050         * gdbtypes.c (init_type): Change incoming argument from
4051         length-in-bytes to length-in-bits.  Assert length is a
4052         multiple of TARGET_CHAR_BITS.
4053         (arch_type, arch_flags_type): Likewise.
4054         (init_integer_type): Update call to init_type.
4055         (init_character_type): Likewise.
4056         (init_boolean_type): Likewise.
4057         (init_float_type): Likewise.
4058         (init_decfloat_type): Likewise.
4059         (init_complex_type): Likewise.
4060         (init_pointer_type): Likewise.
4061         (objfile_type): Likewise.
4062         (arch_integer_type): Update call to arch_type.
4063         (arch_character_type): Likewise.
4064         (arch_boolean_type): Likewise.
4065         (arch_float_type): Likewise.
4066         (arch_decfloat_type): Likewise.
4067         (arch_complex_type): Likewise.
4068         (arch_pointer_type): Likewise.
4069         (gdbtypes_post_init): Likewise.
4070
4071         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4072         (read_base_type): Likewise.
4073         * mdebugread.c (basic_type): Likewise.
4074         * stabsread.c (dbx_init_float_type): Likewise.
4075         (rs6000_builtin_type): Likewise.
4076         (read_range_type): Likewise.  Also, fix call to init_integer_type
4077         with erroneous length argument.
4078
4079         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4080         * d-lang.c (build_d_types): Likewise.
4081         * f-lang.c (build_fortran_types): Likewise.
4082         * go-lang.c (build_go_types): Likewise.
4083         * opencl-lang.c (build_opencl_types): Likewise.
4084         * jit.c (finalize_symtab): Likewise.
4085         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4086         (build_std_type_info_type): Likewise.
4087         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4088         update call to arch_flags_type.
4089
4090         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4091         arch_type.
4092         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4093         * windows-tdep.c (windows_get_tlb_type): Likewise.
4094
4095         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4096         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4097         * m32c-tdep.c (make_types): Likewise.
4098         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4099         (rl78_psw_type): Update call to arch_flags_type.
4100         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4101         * rx-tdep.c (rx_psw_type): Likewise.
4102         (rx_fpsw_type): Likewise.
4103         * sparc-tdep.c (sparc_psr_type): Likewise.
4104         (sparc_fsr_type): Likewise.
4105         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4106         (sparc64_ccr_type): Likewise.
4107         (sparc64_fsr_type): Likewise.
4108         (sparc64_fprs_type): Likewise.
4109
4110 2017-09-27  Tom Tromey  <tom@tromey.com>
4111
4112         * findcmd.c (find_command): Constify.
4113
4114 2017-09-27  Tom Tromey  <tom@tromey.com>
4115
4116         * ada-tasks.c (task_command_1, task_command): Constify.
4117
4118 2017-09-27  Tom Tromey  <tom@tromey.com>
4119
4120         * symtab.c (maintenance_print_symbol_cache)
4121         (maintenance_flush_symbol_cache)
4122         (maintenance_print_symbol_cache_statistics): Constify.
4123
4124 2017-09-27  Tom Tromey  <tom@tromey.com>
4125
4126         * inferior.c (detach_inferior_command, kill_inferior_command)
4127         (inferior_command): Constify.
4128
4129 2017-09-27  Tom Tromey  <tom@tromey.com>
4130
4131         * regcache.c (regcache_print, maintenance_print_registers)
4132         (maintenance_print_raw_registers)
4133         (maintenance_print_cooked_registers)
4134         (maintenance_print_register_groups)
4135         (maintenance_print_remote_registers): Constify.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * printcmd.c (map_display_numbers, undisplay_command)
4140         (enable_disable_display_command, enable_display_command)
4141         (disable_display_command): Constify.
4142
4143 2017-09-27  Tom Tromey  <tom@tromey.com>
4144
4145         * breakpoint.h (delete_command): Don't declare.
4146         * breakpoint.c (delete_command, enable_once_command)
4147         (enable_count_command, enable_delete_command, breakpoint_1)
4148         (maintenance_info_breakpoints, stopin_command, stopat_command)
4149         (delete_command, delete_trace_command, save_breakpoints)
4150         (save_breakpoints_command, save_tracepoints_command): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4155         (skip_ws, extract_identifier, macro_define_command)
4156         (macro_undef_command, macro_list_command): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * infcmd.c (environment_info, set_environment_command)
4161         (unset_environment_command, path_info, info_proc_cmd_1)
4162         (info_proc_cmd_mappings, info_proc_cmd_stat)
4163         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4164         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4165
4166 2017-09-27  Tom Tromey  <tom@tromey.com>
4167
4168         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4169         Constify.
4170
4171 2017-09-27  Tom Tromey  <tom@tromey.com>
4172
4173         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4174
4175 2017-09-27  Tom Tromey  <tom@tromey.com>
4176
4177         * demangle.c (demangle_command): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * progspace.c (maintenance_info_program_spaces_command):
4182         Constify.
4183
4184 2017-09-27  Tom Tromey  <tom@tromey.com>
4185
4186         * compile/compile.c (check_raw_argument, compile_file_command)
4187         (compile_code_command, compile_print_command): Constify.
4188
4189 2017-09-27  Tom Tromey  <tom@tromey.com>
4190
4191         * reggroups.c (maintenance_print_reggroups): Constify.
4192
4193 2017-09-27  Tom Tromey  <tom@tromey.com>
4194
4195         * dwarf2read.c (save_gdb_index_command): Constify.
4196
4197 2017-09-27  Tom Tromey  <tom@tromey.com>
4198
4199         * stap-probe.c (info_probes_stap_command): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * fork-child.c (unset_exec_wrapper_command): Constify.
4204
4205 2017-09-27  Tom Tromey  <tom@tromey.com>
4206
4207         * btrace.c (get_uint, get_context_size, no_chunk)
4208         (maint_btrace_packet_history_cmd)
4209         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4210         (maint_info_btrace_cmd): Constify.
4211
4212 2017-09-27  Tom Tromey  <tom@tromey.com>
4213
4214         * reverse.c (delete_bookmark_command): Constify.
4215
4216 2017-09-27  Tom Tromey  <tom@tromey.com>
4217
4218         * remote.c (set_memory_packet_size)
4219         (set_memory_write_packet_size, show_memory_write_packet_size)
4220         (set_memory_read_packet_size, show_memory_read_packet_size)
4221         (compare_sections_command, packet_command, remote_put_command)
4222         (remote_get_command, remote_delete_command): Constify.
4223
4224 2017-09-27  Tom Tromey  <tom@tromey.com>
4225
4226         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4227         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4228         (set_mipsfpu_auto_command): Constify.
4229
4230 2017-09-27  Tom Tromey  <tom@tromey.com>
4231
4232         * cli/cli-cmds.h (cd_command): Constify.
4233         * cli/cli-cmds.c (cd_command): Constify.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * thread.c (thread_name_command, thread_find_command): Constify.
4238
4239 2017-09-27  Tom Tromey  <tom@tromey.com>
4240
4241         * probe.c (enable_probes_command, disable_probes_command):
4242         Constify.
4243
4244 2017-09-27  Tom Tromey  <tom@tromey.com>
4245
4246         * symfile.c (symbol_file_command): Constify.
4247         * gdbcore.h (deprecated_file_changed_hook): Constify.
4248         * exec.c (deprecated_file_changed_hook, exec_file_command)
4249         (file_command): Constify.
4250         * defs.h (symbol_file_command): Constify.
4251
4252 2017-09-27  Tom Tromey  <tom@tromey.com>
4253
4254         * remote-fileio.c (set_system_call_allowed)
4255         (show_system_call_allowed): Constify.
4256
4257 2017-09-27  Tom Tromey  <tom@tromey.com>
4258
4259         * tracepoint.c (delete_trace_variable_command)
4260         (tfind_end_command, tfind_start_command, tfind_pc_command)
4261         (tfind_tracepoint_command, tfind_line_command)
4262         (tfind_range_command, tfind_outside_command): Constify.
4263
4264 2017-09-27  Tom Tromey  <tom@tromey.com>
4265
4266         * ax-gdb.c (maint_agent_printf_command, agent_command)
4267         (agent_eval_command): Constify.
4268
4269 2017-09-27  Tom Tromey  <tom@tromey.com>
4270
4271         * tracepoint.c (info_scope_command): Constify.
4272         * python/python.c (gdbpy_decode_line): Constify.
4273         * python/py-breakpoint.c (bppy_init): Constify.
4274         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4275         * location.h: (new_linespec_location)
4276         (string_to_event_location_basic, string_to_event_location):
4277         Constify.
4278         * location.c (new_linespec_location)
4279         (string_to_event_location_basic, string_to_event_location):
4280         Constify.
4281         * linespec.h (decode_line_with_current_source)
4282         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4283         * linespec.c (linespec_lex_to_end)
4284         (decode_line_with_current_source)
4285         (decode_line_with_last_displayed): Constify.
4286         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4287         Constify.
4288         * cli/cli-cmds.c (edit_command, list_command): Constify.
4289         * breakpoint.h (until_break_command, watch_command_wrapper)
4290         (awatch_command_wrapper, rwatch_command_wrapper)
4291         (init_ada_exception_breakpoint): Constify.
4292         * breakpoint.c (break_command_1, dprintf_command)
4293         (break_range_command, watch_command_wrapper)
4294         (rwatch_command_wrapper, awatch_command_wrapper)
4295         (until_break_command, init_ada_exception_breakpoint)
4296         (strace_marker_create_sals_from_location, trace_command)
4297         (ftrace_command, strace_command, struct tracepoint): Constify.
4298         * ax-gdb.c (agent_command_1): Constify.
4299         * ada-lang.c (ada_exception_sal): Constify.
4300
4301 2017-09-27  Tom Tromey  <tom@tromey.com>
4302
4303         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4304         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4305         (get_context_size, no_chunk, get_insn_history_modifiers)
4306         (cmd_record_insn_history, get_call_history_modifiers)
4307         (cmd_record_call_history): Constify.
4308
4309 2017-09-27  Tom Tromey  <tom@tromey.com>
4310
4311         * source.c (show_substitute_path_command)
4312         (unset_substitute_path_command, set_substitute_path_command):
4313         Constify.
4314
4315 2017-09-27  Tom Tromey  <tom@tromey.com>
4316
4317         * typeprint.c (maintenance_print_type): Constify.
4318         * maint.c (maintenance_dump_me, maintenance_demangle)
4319         (maintenance_time_display, maintenance_info_sections)
4320         (maintenance_print_statistics, maintenance_deprecate)
4321         (maintenance_undeprecate): Constify.
4322         (maintenance_do_deprecate): Constify.  Use std::string.
4323         (maintenance_selftest): Constify.
4324         * gdbtypes.h (maintenance_print_type): Constify.
4325
4326 2017-09-27  Tom Tromey  <tom@tromey.com>
4327
4328         * hppa-tdep.c (unwind_command): Constify.
4329
4330 2017-09-27  Tom Tromey  <tom@tromey.com>
4331
4332         * target-descriptions.c (unset_tdesc_filename_cmd)
4333         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4334         Constify.
4335
4336 2017-09-27  Tom Tromey  <tom@tromey.com>
4337
4338         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4339
4340 2017-09-27  Tom Tromey  <tom@tromey.com>
4341
4342         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4343
4344 2017-09-27  Tom Tromey  <tom@tromey.com>
4345
4346         * tui/tui-regs.c (tui_reg_command): Constify.
4347
4348 2017-09-27  Tom Tromey  <tom@tromey.com>
4349
4350         * skip.c (skip_file_command, skip_function_command)
4351         (skip_enable_command, skip_disable_command, skip_delete_command):
4352         Constify.
4353
4354 2017-09-27  Tom Tromey  <tom@tromey.com>
4355
4356         * record-btrace.c (cmd_record_btrace_bts_start)
4357         (cmd_record_btrace_pt_start): Constify.
4358
4359 2017-09-27  Tom Tromey  <tom@tromey.com>
4360
4361         * symmisc.c (maintenance_print_symbols)
4362         (maintenance_print_msymbols, maintenance_print_objfiles)
4363         (maintenance_info_symtabs, maintenance_check_symtabs)
4364         (maintenance_expand_symtabs, maintenance_info_line_tables):
4365         Constify.
4366
4367 2017-09-27  Tom Tromey  <tom@tromey.com>
4368
4369         * top.c (new_ui_command): Constify.
4370
4371 2017-09-27  Tom Tromey  <tom@tromey.com>
4372
4373         * symfile.c (add_symbol_file_command)
4374         (remove_symbol_file_command, list_overlays_command)
4375         (map_overlay_command, unmap_overlay_command)
4376         (overlay_auto_command, overlay_manual_command)
4377         (overlay_off_command, overlay_load_command): Constify.
4378
4379 2017-09-27  Tom Tromey  <tom@tromey.com>
4380
4381         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4382         (info_spu_mailbox_command, info_spu_dma_command)
4383         (info_spu_proxydma_command): Constify.
4384
4385 2017-09-27  Tom Tromey  <tom@tromey.com>
4386
4387         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4388
4389 2017-09-27  Tom Tromey  <tom@tromey.com>
4390
4391         * cli/cli-script.c (user_defined_command): Constify.
4392
4393 2017-09-27  Tom Tromey  <tom@tromey.com>
4394
4395         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4396         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4397         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4398         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4399         (dump_binary_value, append_binary_memory, append_binary_value):
4400         Constify.
4401         (struct dump_context) <func>: Constify.
4402         (add_dump_command): Update.
4403
4404 2017-09-27  Tom Tromey  <tom@tromey.com>
4405
4406         * cli/cli-cmds.c (show_version, show_configuration)
4407         (source_command, show_user): Constify.
4408
4409 2017-09-27  Tom Tromey  <tom@tromey.com>
4410
4411         * target.c (maintenance_print_target_stack): Constify.
4412
4413 2017-09-27  Tom Tromey  <tom@tromey.com>
4414
4415         * interps.c (interpreter_exec_cmd): Constify.
4416
4417 2017-09-27  Tom Tromey  <tom@tromey.com>
4418
4419         * record-full.c (cmd_record_full_restore): Constify.
4420
4421 2017-09-27  Tom Tromey  <tom@tromey.com>
4422
4423         * memattr.c (enable_mem_command, disable_mem_command)
4424         (delete_mem_command): Constify.
4425
4426 2017-09-27  Tom Tromey  <tom@tromey.com>
4427
4428         * value.c (show_convenience): Constify.
4429
4430 2017-09-27  Tom Tromey  <tom@tromey.com>
4431
4432         * gdbcore.h (core_file_command): Update.
4433         * corefile.c (core_file_command): Constify.
4434
4435 2017-09-27  Tom Tromey  <tom@tromey.com>
4436
4437         * user-regs.c (maintenance_print_user_registers): Constify.
4438
4439 2017-09-27  Tom Tromey  <tom@tromey.com>
4440
4441         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4442
4443 2017-09-27  Tom Tromey  <tom@tromey.com>
4444
4445         * cp-support.c (first_component_command): Constify.
4446
4447 2017-09-27  Tom Tromey  <tom@tromey.com>
4448
4449         * psymtab.c (maintenance_print_psymbols)
4450         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4451         Constify.
4452
4453 2017-09-27  Tom Tromey  <tom@tromey.com>
4454
4455         * windows-tdep.c (display_tib): Constify.
4456
4457 2017-09-27  Tom Tromey  <tom@tromey.com>
4458
4459         * linux-fork.c (delete_checkpoint_command)
4460         (detach_checkpoint_command): Constify.
4461
4462 2017-09-27  Tom Tromey  <tom@tromey.com>
4463
4464         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4465
4466 2017-09-27  Tom Tromey  <tom@tromey.com>
4467
4468         * arc-tdep.c (dump_arc_instruction_command): Constify.
4469
4470 2017-09-27  Tom Tromey  <tom@tromey.com>
4471
4472         * valprint.c (set_radix, show_radix): Constify.
4473
4474 2017-09-27  Tom Tromey  <tom@tromey.com>
4475
4476         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4477
4478 2017-09-27  Tom Tromey  <tom@tromey.com>
4479
4480         * command.h (not_just_help_class_command): Update.
4481         * cli/cli-decode.h (not_just_help_class_command): Update.
4482         * cli/cli-decode.c (not_just_help_class_command): Constify.
4483
4484 2017-09-27  Tom Tromey  <tom@tromey.com>
4485
4486         * gdb_bfd.c (maintenance_info_bfds): Constify.
4487
4488 2017-09-27  Tom Tromey  <tom@tromey.com>
4489
4490         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4491         overloads.
4492         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4493         (do_const_cfunc): New function.
4494         (cmd_cfunc_eq): New overload.
4495         (cli_user_command_p): Check do_const_cfunc.
4496         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4497         const_cfunc.
4498         * command.h (add_cmd): Add const overload and no-function
4499         overload.
4500         (set_cmd_cfunc): Add const overload.
4501         (cmd_const_cfunc_ftype): Declare.
4502         (cmd_cfunc_eq): Add const overload.
4503         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4504         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4505         overload.
4506
4507 2017-09-27  Tom Tromey  <tom@tromey.com>
4508
4509         * macroexp.c (get_next_token_for_substitution): New function.
4510         (substitute_args): Call it.  Check for __VA_OPT__.
4511
4512 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4513             Pedro Alves <palves@redhat.com>
4514
4515         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4516         producer_is_icc_lt_14.
4517         (producer_is_icc_lt_14): New function.
4518         (check_producer): Add code for checking version of ICC.
4519         (producer_is_icc): Move to producer.c.
4520         (read_structure_type): Restrict ICC workaround to ICC<14.
4521         * producer.c: Include selftest.h.
4522         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4523         New functions.
4524         * producer.h (producer_is_icc): New declaration.
4525
4526 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4527
4528         * Makefile.in (SFILES): Add producer.c.
4529         (COMMON_OBS): Add producer.o
4530         * amd64-tdep.c (producer.h): Add new include.
4531         * dwarf2read.c (producer.h): Add new include.
4532         * producer.c: New file.
4533         * producer.h: New file.
4534         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4535         producer.c.
4536         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4537         producer.h.
4538
4539 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4540
4541         * configure.ac: Search ncursesw before ncurses.
4542         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4543         * gdb_curses.h: Include <ncursesw/ncurses.h>
4544         * config.in, configure: Regenerate.
4545
4546 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4547
4548         PR gdb/22185
4549         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4550         obsolete.
4551         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4552         Remove i386sol2 support.
4553         * configure.nat <i386sol2>: Remove.
4554         <sol2-64>: Fold into ...
4555         <sol2>: ... this.
4556         Move common settings to default section.
4557         Add sol-thread.o.
4558         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4559         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4560         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4561         <i[34567]86-*-solaris*>: Remove.
4562         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4563
4564         * configure.ac: Remove wctype in libw check.
4565         (_MSE_INT_H): Don't define on Solaris 7-9.
4566         <solaris*>: Remove libthread_db.so.1 check.
4567         * configure: Regenerate.
4568         * config.in: Regenerate.
4569
4570         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4571         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4572         (gdb_ps_size_t): Remove.
4573         Use base types in users.
4574         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4575
4576         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4577
4578 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4579
4580         PR build/22206
4581         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4582         (adi_is_addr_mapped): Likewise.
4583         (PSR_ICC): Don't redefine.
4584         (PSR_IMPL): Likewise.
4585
4586 2017-09-25  Tom Tromey  <tom@tromey.com>
4587
4588         * regcache.c (regcache::dump): Use string_printf.
4589
4590 2017-09-25  Tom Tromey  <tom@tromey.com>
4591
4592         * regcache.c (class regcache_invalidator): New.
4593         (struct register_to_invalidate): Remove.
4594         (make_cleanup_regcache_invalidate): Remove.
4595         (regcache::raw_write): Use regcache_invalidator.
4596
4597 2017-09-25  Tom Tromey  <tom@tromey.com>
4598
4599         * spu-tdep.c (spu2ppu_sniffer): Update.
4600         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4601         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4602         Remove.
4603         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4604         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4605         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4606         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4607         (frame_pop): Update.
4608
4609 2017-09-25  Tom Tromey  <tom@tromey.com>
4610
4611         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4612         * regcache.h (regcache_xfree): Don't declare.
4613         * regcache.c (regcache_xfree): Remove.
4614         (do_regcache_xfree): Use delete.
4615         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4616         * linux-fork.c (free_fork): Use delete.
4617         (fork_save_infrun_state): Likewise.
4618         * jit.c (jit_dealloc_cache): Use delete.
4619         * infrun.c (discard_infcall_suspend_state): Use delete.
4620
4621 2017-09-25  Tom Tromey  <tom@tromey.com>
4622
4623         * regcache.h (regcache_xmalloc): Don't declare.
4624         (regcache_raw_set_cached_value): Update comment.
4625         * regcache.c (regcache_xmalloc): Remove.
4626         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4627         * jit.c (jit_frame_sniffer): Use new.
4628         * frame.c (frame_save_as_regcache): Use new.
4629
4630 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4631
4632         * NEWS: Advertise support for guarded-storage registers on IBM z.
4633
4634 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4635
4636         * s390-linux-nat.c (have_regset_gs): New static variable.
4637         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4638         control block and guarded-storage broadcast control regsets.
4639         (s390_read_description): Detect whether the target has
4640         guarded-storage support, return appropriate tdesc.
4641         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4642         (features/s390x-gs-linux64.c): Likewise.
4643         (struct gdbarch_tdep) <have_gs>: New field.
4644         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4645         (s390_gsbc_regset): New variables.
4646         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4647         and s390_gsbc_regset, if applicable.
4648         (s390_core_read_description): Check whether core file was from a
4649         target with guarded-storage support; include appropriate regsets.
4650         (s390_gdbarch_init): Add registers for guarded-storage support.
4651         (_initialize_s390_tdep): Initialize new target descriptions that
4652         include registers for guarded-storage support.
4653         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4654         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4655         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4656         (S390_NUM_REGS): Adjust macro definition.
4657         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4658         (tdesc_s390x_gs_linux64): New declarations.
4659
4660 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4661
4662         * features/s390-gs-linux64.xml: New file.
4663         * features/s390-gs.xml: New file.
4664         * features/s390-gsbc.xml: New file.
4665         * features/s390x-gs-linux64.xml: New file.
4666         * features/Makefile (WHICH): Add s390-gs-linux64 and
4667         s390x-gs-linux64.
4668         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4669         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4670         * features/s390-gs-linux64.c: New generated file.
4671         * features/s390x-gs-linux64.c: New file.
4672         * regformats/s390-gs-linux64.dat: New file.
4673         * regformats/s390x-gs-linux64.dat: New file.
4674
4675 2017-09-23  Tom Tromey  <tom@tromey.com>
4676
4677         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4678
4679 2017-09-22  Tom Tromey  <tom@tromey.com>
4680
4681         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4682         type to scoped_restore_tmpl.
4683         <scoped_input_handler>: Initialize m_quit_handler directly.
4684
4685 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4686
4687         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4688         (cd_command): Likewise.  Free "current_directory" before
4689         assigning to it.
4690         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4691         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4692         * top.c (gdb_dirbuf): Remove global declaration.
4693         * top.h (gdb_dirbuf): Likewise.
4694
4695 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4696
4697         * gnulib/aclocal.m4: Regenerate.
4698         * gnulib/config.in: Regenerate.
4699         * gnulib/configure: Regenerate.
4700         * gnulib/import/Makefile.am: Regenerate.
4701         * gnulib/import/Makefile.in: Regenerate.
4702         * gnulib/import/assure.h: New file.
4703         * gnulib/import/at-func.c: Likewise
4704         * gnulib/import/chdir-long.c: New file.
4705         * gnulib/import/chdir-long.h: New file.
4706         * gnulib/import/cloexec.c: New file.
4707         * gnulib/import/cloexec.h: New file.
4708         * gnulib/import/close.c: New file.
4709         * gnulib/import/closedir.c: New file.
4710         * gnulib/import/dirent-private.h: New file.
4711         * gnulib/import/dup-safer.c: New file.
4712         * gnulib/import/dup.c: New file.
4713         * gnulib/import/dup2.c: New file.
4714         * gnulib/import/error.c: New file.
4715         * gnulib/import/error.h: New file.
4716         * gnulib/import/exitfail.c: New file.
4717         * gnulib/import/exitfail.h: New file.
4718         * gnulib/import/fchdir.c: New file.
4719         * gnulib/import/fcntl.c: New file.
4720         * gnulib/import/fcntl.in.h: New file.
4721         * gnulib/import/fd-hook.c: New file.
4722         * gnulib/import/fd-hook.h: New file.
4723         * gnulib/import/fd-safer.c: New file.
4724         * gnulib/import/fdopendir.c: New file.
4725         * gnulib/import/filename.h: New file.
4726         * gnulib/import/filenamecat-lgpl.c: New file.
4727         * gnulib/import/filenamecat.h: New file.
4728         * gnulib/import/fstat.c: New file.
4729         * gnulib/import/fstatat.c: New file.
4730         * gnulib/import/getcwd-lgpl.c: New file.
4731         * gnulib/import/getcwd.c: New file.
4732         * gnulib/import/getdtablesize.c: New file.
4733         * gnulib/import/getlogin_r.c: New file.
4734         * gnulib/import/getprogname.c: New file.
4735         * gnulib/import/getprogname.h: New file.
4736         * gnulib/import/gettext.h: New file.
4737         * gnulib/import/glob-libc.h: New file.
4738         * gnulib/import/glob.c: New file.
4739         * gnulib/import/glob.in.h: New file.
4740         * gnulib/import/intprops.h: New file.
4741         * gnulib/import/m4/chdir-long.m4: New file.
4742         * gnulib/import/m4/close.m4: New file.
4743         * gnulib/import/m4/closedir.m4: New file.
4744         * gnulib/import/m4/d-ino.m4: New file.
4745         * gnulib/import/m4/d-type.m4: New file.
4746         * gnulib/import/m4/dup.m4: New file.
4747         * gnulib/import/m4/dup2.m4: New file.
4748         * gnulib/import/m4/error.m4: New file.
4749         * gnulib/import/m4/fchdir.m4: New file.
4750         * gnulib/import/m4/fcntl.m4: New file.
4751         * gnulib/import/m4/fcntl_h.m4: New file.
4752         * gnulib/import/m4/fdopendir.m4: New file.
4753         * gnulib/import/m4/filenamecat.m4: New file.
4754         * gnulib/import/m4/fstat.m4: New file.
4755         * gnulib/import/m4/fstatat.m4: New file.
4756         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4757         * gnulib/import/m4/getcwd-path-max.m4: New file.
4758         * gnulib/import/m4/getcwd.m4: New file.
4759         * gnulib/import/m4/getdtablesize.m4: New file.
4760         * gnulib/import/m4/getlogin_r.m4: New file.
4761         * gnulib/import/m4/getprogname.m4: New file.
4762         * gnulib/import/m4/glob.m4: New file.
4763         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4764         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4765         * gnulib/import/m4/mempcpy.m4: New file.
4766         * gnulib/import/m4/memrchr.m4: New file.
4767         * gnulib/import/m4/mode_t.m4: New file.
4768         * gnulib/import/m4/msvc-inval.m4: New file.
4769         * gnulib/import/m4/msvc-nothrow.m4: New file.
4770         * gnulib/import/m4/open.m4: New file.
4771         * gnulib/import/m4/openat.m4: New file.
4772         * gnulib/import/m4/opendir.m4: New file.
4773         * gnulib/import/m4/readdir.m4: New file.
4774         * gnulib/import/m4/realloc.m4: New file.
4775         * gnulib/import/m4/rewinddir.m4: New file.
4776         * gnulib/import/m4/save-cwd.m4: New file.
4777         * gnulib/import/m4/strdup.m4: New file.
4778         * gnulib/import/m4/strerror.m4: New file.
4779         * gnulib/import/m4/unistd-safer.m4: New file.
4780         * gnulib/import/mempcpy.c: New file.
4781         * gnulib/import/memrchr.c: New file.
4782         * gnulib/import/msvc-inval.c: New file.
4783         * gnulib/import/msvc-inval.h: New file.
4784         * gnulib/import/msvc-nothrow.c: New file.
4785         * gnulib/import/msvc-nothrow.h: New file.
4786         * gnulib/import/open.c: New file.
4787         * gnulib/import/openat-die.c: New file.
4788         * gnulib/import/openat-priv.h: New file.
4789         * gnulib/import/openat-proc.c: New file.
4790         * gnulib/import/openat.c: New file.
4791         * gnulib/import/openat.h: New file.
4792         * gnulib/import/opendir.c: New file.
4793         * gnulib/import/pipe-safer.c: New file.
4794         * gnulib/import/readdir.c: New file.
4795         * gnulib/import/realloc.c: New file.
4796         * gnulib/import/rewinddir.c: New file.
4797         * gnulib/import/save-cwd.c: New file.
4798         * gnulib/import/save-cwd.h: New file.
4799         * gnulib/import/strdup.c: New file.
4800         * gnulib/import/strerror-override.c: New file.
4801         * gnulib/import/strerror-override.h: New file.
4802         * gnulib/import/strerror.c: New file.
4803         * gnulib/import/unistd--.h: New file.
4804         * gnulib/import/unistd-safer.h: New file.
4805         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4806         "getcwd" and "glob".
4807         * ser-tcp.c: Undefine "close" before redefining it.
4808
4809 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4810
4811         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4812         get rid of res_val.
4813
4814 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4815
4816         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4817         <sol2,sparc>: Likewise.
4818         <sol2-64,i386>: Likewise.
4819
4820         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4821         -Wdeprecated-declarations on *-*-solaris*.
4822         * configure: Regenerate.
4823
4824         * procfs.c: Include "nat/inferior.h".
4825         (procfs_info_proc): Fix typo.
4826
4827 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4828
4829         * remote.c (vector): Include.
4830         (struct private_thread_info): Add field, thread_handle.
4831         (free_private_thread_info): Deallocate storage associated with
4832         thread handle.
4833         (get_private_info_thread): Initialize `thread_handle' field.
4834         (struct thread_item): Add field, thread_handle.
4835         (clear_threads_listing_context): Deallocate storage associated
4836         with thread handle.
4837         (start_thread): Add support for "handle" attribute.
4838         (thread_attributes): Add "handle".
4839         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4840         field.
4841         (remote_update_thread_list): Update thread_handle.
4842         (remote_thread_handle_to_thread_info): New function.
4843         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4844
4845 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4846
4847         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4848         function.
4849         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4850         * python/python-internal.h (thread_object_type): Declare.
4851
4852 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4853
4854         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4855         (target_thread_handle_to_thread_info): Declare.
4856         * target.c (target_thread_handle_to_thread_info): New function.
4857         * target-delegates.c: Regenerate.
4858         * gdbthread.h (find_thread_by_handle): Declare.
4859         * thread.c (find_thread_by_handle): New function.
4860         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4861         function.
4862         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4863
4864 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4865
4866         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4867
4868 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4869
4870         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4871
4872 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4873
4874         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4875         to gdb_target_obs.
4876
4877 2017-09-20  Tom Tromey  <tom@tromey.com>
4878
4879         * breakpoint.c (struct counted_command_line): Remove.
4880         (breakpoint_commands): Update.
4881         (alloc_counted_command_line, incref_counted_command_line)
4882         (decref_counted_command_line, do_cleanup_counted_command_line)
4883         (make_cleanup_decref_counted_command_line): Remove.
4884         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4885         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4886         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4887         (save_breakpoints): Update.
4888         * breakpoint.h (counted_command_line): Now a typedef to
4889         shared_ptr.
4890         (struct breakpoint) <commands>: Now a counted_command_line.
4891         (struct bpstats) <command>: Likewise.
4892
4893 2017-09-20  Tom Tromey  <tom@tromey.com>
4894
4895         * breakpoint.c (struct commands_info, do_map_commands_command):
4896         Remove.
4897         (commands_command_1): Update.
4898         (iterate_over_related_breakpoints): Take a function_view.
4899         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4900         (delete_command): Update.
4901         (map_breakpoint_numbers): Take a function_view.
4902         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4903         (disable_command): Update.
4904         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4905         (enable_command): Update.
4906         (struct disp_data, do_enable_breakpoint_disp)
4907         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4908         (do_map_enable_delete_breakpoint): Remove.
4909         (enable_once_command, enable_count_command, enable_delete_command)
4910         (delete_trace_variable_command): Update.
4911
4912 2017-09-20  Tom Tromey  <tom@tromey.com>
4913
4914         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4915         (bpstat_clear): Use delete.
4916         (bpstats): New constructors.
4917         (bpstat_copy, bpstat_stop_status): Use new.
4918         (dprintf_after_condition_true): Update.
4919         * breakpoint.h (bpstats::bpstats): Add constructors.
4920         (bpstats::~bpstats): Add destructor.
4921
4922 2017-09-20  Pedro Alves  <palves@redhat.com>
4923
4924         * eval.c (make_params): Delete, refactored as ...
4925         (class fake_method): ... this new type's ctor.
4926         (fake_method::~fake_method): New.
4927         (evaluate_subexp_standard): Use 'fake_method'.
4928
4929 2017-09-20  Tom Tromey  <tom@tromey.com>
4930
4931         * windows-nat.c (get_windows_debug_event, windows_wait)
4932         (do_initial_windows_stuff, windows_attach): Update.
4933         * utils.c (vwarning, internal_vproblem): Update.
4934         (ui_unregister_input_event_handler_cleanup)
4935         (prepare_to_handle_input): Remove.
4936         (class scoped_input_handler): New.
4937         (defaulted_query, prompt_for_continue): Update.
4938         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4939         Update.
4940         * top.c (undo_terminal_modifications_before_exit): Update.
4941         * target/target.h (target_terminal_init, target_terminal_inferior)
4942         (target_terminal_ours): Don't declare.
4943         (class target_terminal): New.
4944         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4945         (target_terminal_ours_for_output)
4946         (make_cleanup_restore_target_terminal): Don't declare.
4947         (target_terminal_info): Remove.
4948         * target.c (enum terminal_state, terminal_state): Remove.
4949         (target_terminal::terminal_state): Define.
4950         (target_terminal::init): Rename from target_terminal_init.
4951         (target_terminal::inferior): Rename from
4952         target_terminal_inferior.
4953         (target_terminal::ours): Rename from target_terminal_ours.
4954         (target_terminal::ours_for_output): Rename from
4955         target_terminal_ours_for_output.
4956         (target_terminal::info): New method.
4957         (cleanup_restore_target_terminal)
4958         (make_cleanup_restore_target_terminal): Remove.
4959         * solib.c (handle_solib_event): Update.
4960         * remote.c (remote_serial_quit_handler): Update.
4961         (remote_terminal_inferior, remote_wait_as): Update.
4962         * record-full.c (record_full_wait_1): Update.
4963         * nto-procfs.c (procfs_create_inferior): Update.
4964         * nat/fork-inferior.c (startup_inferior): Update.
4965         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4966         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4967         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4968         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4969         (mi_breakpoint_created, mi_breakpoint_deleted)
4970         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4971         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4972         (mi_user_selected_context_changed, report_initial_inferior):
4973         Update.
4974         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4975         (linux_nat_terminal_inferior): Update.
4976         * infrun.c (follow_fork_inferior)
4977         (handle_vfork_child_exec_or_exit, do_target_resume)
4978         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4979         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4980         Update.
4981         * inflow.c (child_terminal_init, info_terminal_command): Update.
4982         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4983         (attach_command): Update.
4984         * infcall.c (call_thread_fsm_should_stop): Update.
4985         * gnu-nat.c (gnu_attach): Update.
4986         * extension.c (struct active_ext_lang_state)
4987         (restore_active_ext_lang): Update.
4988         * exceptions.c (print_flush): Update.
4989         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4990         (struct quit_handler_cleanup_data, restore_quit_handler)
4991         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4992         Remove.
4993         * cp-support.c (gdb_demangle): Update.
4994         * breakpoint.c (update_inserted_breakpoint_locations)
4995         (insert_breakpoint_locations, handle_jit_event)
4996         (disable_breakpoints_in_unloaded_shlib): Update.
4997         * annotate.c (annotate_breakpoints_invalid)
4998         (annotate_frames_invalid): Update.
4999
5000 2017-09-20  Tom Tromey  <tom@tromey.com>
5001
5002         * main.c (catch_command_errors): Rename from
5003         catch_command_errors_const.
5004         (captured_main_1): Update.
5005
5006 2017-09-20  Pedro Alves  <palves@redhat.com>
5007
5008         * cli/cli-cmds.c (list_command): Use print_sal_location.
5009         (print_sal_location): New function.
5010         (ambiguous_line_spec): Use print_sal_location.
5011         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5012         * symtab.c (find_function_start_sal): Likewise.
5013         * symtab.h (symtab_and_line::symbol): New field.
5014
5015 2017-09-20  Pedro Alves  <palves@redhat.com>
5016
5017         * linespec.c (minsym_found): Handle non-text minsyms.
5018         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5019
5020 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5021
5022         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5023         backslash.
5024
5025 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5026
5027         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5028         vmovups instead vmovaps.
5029         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5030
5031 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5032
5033         * NEWS (Changes since GDB 8.0): Add starti.
5034         * infcmd.c (enum run_break): New.
5035         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5036         case.
5037         (run_command): Use enum run_how.
5038         (start_command): Likewise.
5039         (starti_command): New function.
5040         (RUN_ARGS_HELP): New macro.
5041         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5042         commands.  Add starti command.
5043
5044 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5045
5046         * Makefile.in (monitor.o): Remove the rule.
5047
5048 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5049
5050         * annotate.h (struct annotate_arg_emitter): Use
5051         DISABLE_COPY_AND_ASSIGN.
5052         * common/refcounted-object.h (refcounted_object): Likewise.
5053         * completer.h (struct completion_result): Likewise.
5054         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5055         * filename-seen-cache.h (filename_seen_cache): Likewise.
5056         * gdbcore.h (thread_section_name): Likewise.
5057         * gdb_regex.h (compiled_regex): Likewise.
5058         * gdbthread.h (scoped_restore_current_thread): Likewise.
5059         * inferior.h (scoped_restore_current_inferior): Likewise.
5060         * jit.c (jit_reader): Likewise.
5061         * linespec.h (struct linespec_result): Likewise.
5062         * mi/mi-parse.h (struct mi_parse): Likewise.
5063         * nat/fork-inferior.c (execv_argv): Likewise.
5064         * progspace.h (scoped_restore_current_program_space): Likewise.
5065         * python/python-internal.h (class gdbpy_enter): Likewise.
5066         * regcache.h (regcache): Likewise.
5067         * target-descriptions.c (struct tdesc_reg): Likewise.
5068         (struct tdesc_type): Likewise.
5069         (struct tdesc_feature): Likewise.
5070         * ui-out.h (ui_out_emit_type): Likewise.
5071
5072 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5073
5074         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5075         label abort_expression.
5076
5077 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         * common/buffer.c (buffer_xml_printf): Adjust.
5080         * common/xml-utils.c (xml_escape_text): Change return type to
5081         std::string, update code accordingly.
5082         * common/xml-utils.h (xml_escape_text): Change return type to
5083         std::string.
5084         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5085         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5086         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5087         Adjust.
5088
5089 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5090
5091         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5092         (SUBDIR_UNITTESTS_OBS): Add new object file.
5093         * unittests/xml-utils-selftests.c: New file.
5094
5095 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5096
5097         * common/selftest.h (selftest): New struct/interface.
5098         (register_test): Add name parameter, add new overload.
5099         (run_tests): Add filter parameter.
5100         (for_each_selftest_ftype): New typedef.
5101         (for_each_selftest): New declaration.
5102         * common/selftest.c (tests): Change type to
5103         map<string, unique_ptr<selftest>>.
5104         (simple_selftest): New struct.
5105         (register_test): New function.
5106         (register_test): Add name parameter and use it.
5107         (run_tests): Add filter parameter and use it.  Add prints.
5108         Adjust to vector -> map change.
5109         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5110         registering selftests.
5111         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5112         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5113         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5114         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5115         * findvar.c (_initialize_findvar): Likewise.
5116         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5117         * maint.c (maintenance_selftest): Update call to run_tests.
5118         (maintenance_info_selftests): New function.
5119         (_initialize_maint_cmds): Register "maintenance info selftests"
5120         command.  Update "maintenance selftest" doc.
5121         * regcache.c (_initialize_regcache): Add names when registering
5122         selftests.
5123         * rust-exp.y (_initialize_rust_exp): Likewise.
5124         * selftest-arch.c (gdbarch_selftest): New struct.
5125         (gdbarch_tests): Remove.
5126         (register_test_foreach_arch): Add name parameter.  Call
5127         register_test.
5128         (tests_with_arch): Remove, move most content to
5129         gdbarch_selftest::operator().
5130         (_initialize_selftests_foreach_arch): Remove.
5131         * selftest-arch.h (register_test_foreach_arch): Add name
5132         parameter.
5133         (run_tests_with_arch): New declaration.
5134         * utils-selftests.c (_initialize_utils_selftests): Add names
5135         when registering selftests.
5136         * utils.c (_initialize_utils): Likewise.
5137         * unittests/array-view-selftests.c
5138         (_initialize_array_view_selftests): Likewise.
5139         * unittests/environ-selftests.c (_initialize_environ_selftests):
5140         Likewise.
5141         * unittests/function-view-selftests.c
5142         (_initialize_function_view_selftests): Likewise.
5143         * unittests/offset-type-selftests.c
5144         (_initialize_offset_type_selftests): Likewise.
5145         * unittests/optional-selftests.c
5146         (_initialize_optional_selftests): Likewise.
5147         * unittests/scoped_restore-selftests.c
5148         (_initialize_scoped_restore_selftests): Likewise.
5149         * NEWS: Document "maintenance selftest" and "maint info
5150         selftests".
5151
5152 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5153
5154         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5155         scoped_restore.
5156
5157 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5158
5159         * mi/mi-main.c (mi_load_progress): Make uiout variable
5160         a unique_ptr.
5161
5162 2017-09-15  Pedro Alves  <palves@redhat.com>
5163
5164         * compile/compile-c-types.c (convert_enum, convert_int)
5165         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5166
5167 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5168
5169         * dwarf2read.c (copy_string): Remove.
5170         (parse_macro_definition): Replace copy_string with savestring.
5171
5172 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5173
5174         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5175         gdb_target_obs.
5176         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5177         Likewise.
5178         (i[34567]86-*-linux*): Likewise.
5179
5180 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5181
5182         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5183         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5184         <stack>: Change type to std::vector.
5185         <stack_len, stack_allocated>: Remove.
5186         <grow_stack>: Remove.
5187         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5188         (dwarf_expr_context::~dwarf_expr_context): Remove.
5189         (dwarf_expr_context::grow_stack): Remove.
5190         (dwarf_expr_context::push): Adjust.
5191         (dwarf_expr_context::pop): Adjust.
5192         (dwarf_expr_context::fetch): Adjust.
5193         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5194         (dwarf_expr_context::stack_empty_p): Adjust.
5195         (dwarf_expr_context::execute_stack_op): Adjust.
5196
5197 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5198
5199         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5200         return type to bool.
5201         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5202
5203 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5204
5205         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5206         Change type to bool.
5207         (dwarf_stack_value) <in_stack_memory>: Likewise.
5208         (dwarf_expr_context) <push_address>: Change parameter type to
5209         bool.
5210         <fetch_in_stack_memory>: Change return type to bool.
5211         <push>: Change parameter type to bool.
5212         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5213         to bool.
5214         (dwarf_expr_context::push_address): Likewise.
5215         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5216         to bool.
5217         (dwarf_expr_context::execute_stack_op): Adjust.
5218         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5219
5220 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5221
5222         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5223         (struct dwarf_expr_context) <n_pieces>: Remove.
5224         <pieces>: Change type to std::vector.
5225         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5226         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5227         pieces.
5228         (dwarf_expr_context::add_piece): Adjust.
5229         * dwarf2loc.c (struct piece_closure): Initialize fields.
5230         <n_pieces>: Remove.
5231         <pieces>: Change type to std::vector.
5232         (allocate_piece_closure): Adjust, change parameter to
5233         std::vector rvalue and std::move it to piece_closure.
5234         (rw_pieced_value): Adjust.
5235         (check_pieced_synthetic_pointer): Adjust.
5236         (indirect_synthetic_pointer): Adjust.
5237         (coerce_pieced_ref): Adjust.
5238         (free_pieced_value_closure):  Adjust.  Use delete to free
5239         piece_closure.
5240         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5241         to allocate_piece_closure.
5242         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5243
5244 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5245
5246         * probe.h (probe_ops_cp): Remove typedef.
5247         (DEF_VEC_P (probe_ops_cp)): Remove.
5248         (all_probe_ops): Change type to std::vector.
5249         * probe.c (info_probes_for_ops): Adjust to vector change.
5250         (probe_linespec_to_ops): Likewise.
5251         (all_probe_ops): Change type to std::vector.
5252         (_initialize_probe): Adjust to vector change.
5253         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5254         * elfread.c (elf_get_probes): Likewise.
5255         * stap-probe.c (_initialize_stap_probe): Likewise.
5256
5257 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5258
5259         * probe.h (struct bound_probe): Define constructors.
5260         * probe.c (bound_probe_s): Remove typedef.
5261         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5262         (collect_probes): Change return type to std::vector, remove
5263         cleanup.
5264         (compare_probes): Return bool, change parameter type.  Change
5265         semantic to "less than".
5266         (gen_ui_out_table_header_info): Change parameter to std::vector
5267         and update.
5268         (exists_probe_with_pops): Likewise.
5269         (info_probes_for_ops): Update to std::vector change.
5270         (enable_probes_command): Likewise.
5271         (disable_probes_command): Likewise.
5272
5273 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5274
5275         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5276         vec to std::vector.
5277         * probe.c (parse_probes_in_pspace): Update.
5278         (find_probes_in_objfile): Update.
5279         (find_probe_by_pc): Update.
5280         (collect_probes): Update.
5281         (probe_any_get_probes): Update.
5282         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5283         return type to reference to std::vector.
5284         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5285         std::vector and update.
5286         (dtrace_process_dof): Likewise.
5287         (dtrace_get_probes): Likewise.
5288         * elfread.c (elf_get_probes): Change return type to std::vector,
5289         store an std::vector in bfd_data.
5290         (probe_key_free): Update to std::vector.
5291         * stap-probe.c (handle_stap_probe): Change parameter to
5292         std::vector and update.
5293         (stap_get_probes): Likewise.
5294         * symfile-debug.c (debug_sym_get_probes): Change return type to
5295         std::vector and update.
5296
5297 2017-09-11  Tom Tromey  <tom@tromey.com>
5298
5299         * breakpoint.c (program_breakpoint_here_p): Update.
5300         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5301         from make_show_memory_breakpoints_cleanup.  Return a
5302         scoped_restore_tmpl<int>.
5303         (restore_show_memory_breakpoints): Remove.
5304         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5305         * mem-break.c (memory_validate_breakpoint): Update.
5306         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5307         (ia64_memory_remove_breakpoint): Update.
5308         (ia64_breakpoint_from_pc): Update.
5309         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5310         from make_show_memory_breakpoints_cleanup.
5311
5312 2017-09-11  Tom Tromey  <tom@tromey.com>
5313
5314         * d-namespace.c (d_lookup_symbol): Use std::string.
5315         (find_symbol_in_baseclass): Likewise.
5316
5317 2017-09-11  Tom Tromey  <tom@tromey.com>
5318
5319         * ctf.c (ctf_start): Use std::string.
5320
5321 2017-09-11  Tom Tromey  <tom@tromey.com>
5322
5323         * ada-lang.c (is_known_support_routine): Update.
5324         (ada_unhandled_exception_name_addr_from_raise): Update.
5325         * guile/scm-frame.c (gdbscm_frame_name): Update.
5326         * python/py-frame.c (frapy_name): Update.
5327         (frapy_function): Update.
5328         * stack.h (find_frame_funname): Update.
5329         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5330         (print_frame): Update.
5331
5332 2017-09-11  Tom Tromey  <tom@tromey.com>
5333
5334         * findcmd.c (put_bits): Take a gdb::byte_vector.
5335         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5336         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5337         cleanups.
5338         (find_command): Update.
5339
5340 2017-09-11  Tom Tromey  <tom@tromey.com>
5341
5342         * cli/cli-script.c (class scoped_restore_hook_in): New.
5343         (clear_hook_in_cleanup): Remove.
5344         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5345         scoped_restore_hook_in.
5346
5347 2017-09-11  Tom Tromey  <tom@tromey.com>
5348
5349         * cli/cli-script.c (restore_interp): Remove.
5350         (read_command_lines): Use scoped_restore_interp.
5351         * interps.c (scoped_restore_interp::set_temp): Rename from
5352         interp_set_temp.
5353         * interps.h (class scoped_restore_interp): New.
5354         (interp_set_temp): Remove.
5355
5356 2017-09-11  Tom Tromey  <tom@tromey.com>
5357
5358         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5359         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5360         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5361         scoped_restore.
5362         (mi_cmd_break_insert_1): Update.
5363         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5364         scoped_restore.
5365
5366 2017-09-11  Tom Tromey  <tom@tromey.com>
5367
5368         * demangle.c (demangle_command): Update.
5369         * breakpoint.c (disable_command): Update.
5370         (enable_command): Update.
5371         (find_location_by_number): Make "number" const.  Use
5372         get_number_trailer.
5373         * cli/cli-utils.c (extract_arg): Return std::string.
5374         * probe.c (parse_probe_linespec): Update.  Change types.
5375         (collect_probes): Take string arguments.
5376         (parse_probe_linespec): Likewise.
5377         (info_probes_for_ops): Update.
5378         (enable_probes_command): Update.
5379         (disable_probes_command): Update.
5380         * break-catch-sig.c (catch_signal_split_args): Update.
5381         * mi/mi-parse.c (mi_parse): Update.
5382
5383 2017-09-11  Tom Tromey  <tom@tromey.com>
5384
5385         * language.h (language_enum): Make argument const.
5386         * language.c (language_enum): Make argument const.
5387
5388 2017-09-11  Tom Tromey  <tom@tromey.com>
5389
5390         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5391         as function.
5392         (skip_to_space): Rename from skip_to_space_const.
5393         * common/common-utils.c (skip_to_space): New function.
5394         (skip_to_space): Rename from skip_to_space_const.
5395         * cli/cli-utils.h (get_number): Rename from get_number_const.
5396         (extract_arg): Rename from extract_arg_const.
5397         * cli/cli-utils.c (get_number): Rename from get_number_const.
5398         (extract_arg): Rename from extract_arg_const.
5399         (number_or_range_parser::get_number): Use ::get_number.
5400         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5401         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5402         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5403         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5404         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5405         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5406         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5407         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5408
5409 2017-09-11  Tom Tromey  <tom@tromey.com>
5410
5411         * python/python.c (do_start_initialization): Use
5412         py-event-types.def to initialize types.
5413         Define all object type structures.
5414         * python/python-internal.h: Don't declare event initialization
5415         functions.
5416         * python/py-threadevent.c (thread_event_object_type): Don't
5417         define.
5418         * python/py-stopevent.c (stop_event_object_type): Don't define.
5419         * python/py-signalevent.c (signal_event_object_type): Don't
5420         declare or define.
5421         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5422         (clear_objfiles_event_object_type): Don't declare or define.
5423         * python/py-infevents.c (inferior_call_pre_event_object_type)
5424         (inferior_call_post_event_object_type)
5425         (register_changed_event_object_type)
5426         (memory_changed_event_object_type): Don't declare or define.
5427         * python/py-inferior.c (new_thread_event_object_type)
5428         (new_inferior_event_object_type)
5429         (inferior_deleted_event_object_type): Don't declare or define.
5430         * python/py-exitedevent.c (exited_event_object_type): Don't
5431         declare or define.
5432         * python/py-evts.c (gdbpy_initialize_py_events): Use
5433         py-all-events.def.
5434         * python/py-events.h (thread_event_object_type): Don't declare.
5435         (events_object): Use py-all-events.def.
5436         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5437         py-event-types.def.
5438         * python/py-event-types.def: New file.
5439         * python/py-continueevent.c (create_continue_event_object): Don't
5440         declare or define.
5441         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5442         declare or define.
5443         * python/py-all-events.def: New file.
5444
5445 2017-09-11  Tom Tromey  <tom@tromey.com>
5446
5447         * python/py-threadevent.c (create_thread_event_object): Return
5448         gdbpy_ref.
5449         * python/py-stopevent.h (create_stop_event_object)
5450         (create_breakpoint_event_object, create_signal_event_object):
5451         Update.
5452         * python/py-stopevent.c (create_stop_event_object): Return
5453         gdbpy_ref.
5454         (emit_stop_event): Update.
5455         * python/py-signalevent.c (create_signal_event_object): Return
5456         gdbpy_ref.
5457         * python/py-infevents.c (create_inferior_call_event_object):
5458         Update.
5459         * python/py-event.h (create_event_object)
5460         (create_thread_event_object): Update.
5461         * python/py-event.c (create_event_object): Return gdbpy_ref.
5462         * python/py-continueevent.c: Return gdbpy_ref.
5463         * python/py-bpevent.c (create_breakpoint_event_object): Return
5464         gdbpy_ref.
5465
5466 2017-09-11  Tom Tromey  <tom@tromey.com>
5467
5468         PR python/15622:
5469         * NEWS: Add entry.
5470         * python/python.c (do_start_initialization): Initialize new event
5471         types.
5472         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5473         (gdbpy_initialize_inferior_deleted_event)
5474         (gdbpy_initialize_new_thread_event): Declare.
5475         * python/py-threadevent.c (create_thread_event_object): Add option
5476         "thread" parameter.
5477         * python/py-inferior.c (new_thread_event_object_type)
5478         (new_inferior_event_object_type)
5479         (inferior_deleted_event_object_type): Declare.
5480         (python_new_inferior, python_inferior_deleted): New functions.
5481         (add_thread_object): Emit new_thread event.
5482         (gdbpy_initialize_inferior): Attach new functions to corresponding
5483         observers.
5484         (new_thread, new_inferior, inferior_deleted): Define new event
5485         types.
5486         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5487         registries.
5488         * python/py-events.h (events_object) <new_inferior,
5489         inferior_deleted, new_thread>: New fields.
5490         * python/py-event.h (create_thread_event_breakpoint): Add optional
5491         "thread" parameter.
5492
5493 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5494
5495         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5496         check current_ui instead.
5497         (internal_vproblem): Likewise.
5498
5499 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5500
5501         * thread.c (print_thread_info_1): Remove unnecessary calls to
5502         uiout->is_mi_like_p.
5503
5504 2017-09-09  Tom Tromey  <tom@tromey.com>
5505
5506         * namespace.h (add_using_directive): Update.
5507         * namespace.c (add_using_directive): Change type of excludes to
5508         std::vector.
5509         * dwarf2read.c (read_import_statement): Use std::vector.
5510         (read_namespace): Update.
5511         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5512
5513 2017-09-09  Tom Tromey  <tom@tromey.com>
5514
5515         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5516
5517 2017-09-09  Tom Tromey  <tom@tromey.com>
5518
5519         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5520
5521 2017-09-09  Tom Tromey  <tom@tromey.com>
5522
5523         * stack.c (func_command): Use gdb::def_vector.
5524
5525 2017-09-09  Tom Tromey  <tom@tromey.com>
5526
5527         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5528         ui_out_emit_list, ui_out_emit_tuple.
5529         (mi_cmd_var_update): Likewise.
5530
5531 2017-09-09  Tom Tromey  <tom@tromey.com>
5532
5533         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5534         ui_out_redirect_pop.
5535         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5536         ui_out_redirect_pop.
5537         * utils.c (do_ui_out_redirect_pop)
5538         (make_cleanup_ui_out_redirect_pop): Remove.
5539         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5540         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5541         * ui-out.h (ui_out_redirect_pop): New class.
5542
5543 2017-09-09  Tom Tromey  <tom@tromey.com>
5544
5545         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5546         (list_available_thread_groups, mi_cmd_list_thread_groups)
5547         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5548         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5549         Likewise.
5550
5551 2017-09-09  Tom Tromey  <tom@tromey.com>
5552
5553         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5554         ui_out_emit_tuple.
5555
5556 2017-09-09  Tom Tromey  <tom@tromey.com>
5557
5558         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5559         * stack.c (print_frame): Use ui_out_emit_tuple.
5560         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5561         (info_spu_mailbox_command, info_spu_dma_command)
5562         (info_spu_proxydma_command): Likewise.
5563         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5564         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5565         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5566         ui_out_emit_tuple.
5567         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5568
5569 2017-09-09  Tom Tromey  <tom@tromey.com>
5570
5571         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5572         (class ui_out_emit_table): Update comment.
5573         * ui-out.c (do_cleanup_table_end)
5574         (make_cleanup_ui_out_table_begin_end): Remove.
5575         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5576         (info_spu_dma_cmdlist): Likewise.
5577         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5578         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5579         ui_out_emit_table.
5580
5581 2017-09-09  Tom Tromey  <tom@tromey.com>
5582
5583         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5584         ui_out_emit_list, gdb::optional.
5585
5586 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5587
5588         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5589         prototype.
5590         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5591         prototype.
5592         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5593         prototype.
5594         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5595         * ada-exp.y: Remove _initialize_ada_exp prototype.
5596         * ada-lang.c: Remove _initialize_ada_language prototype.
5597         * ada-tasks.c: Remove _initialize_tasks prototype.
5598         * addrmap.c: Remove _initialize_addrmap prototype.
5599         * agent.c: Remove _initialize_agent prototype.
5600         * aix-thread.c: Remove _initialize_aix_thread prototype.
5601         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5602         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5603         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5604         prototype.
5605         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5606         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5607         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5608         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5609         prototype.
5610         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5611         prototype.
5612         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5613         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5614         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5615         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5616         prototype.
5617         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5618         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5619         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5620         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5621         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5622         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5623         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5624         prototype.
5625         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5626         prototype.
5627         * annotate.c: Remove _initialize_annotate prototype.
5628         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5629         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5630         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5631         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5632         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5633         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5634         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5635         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5636         prototype.
5637         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5638         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5639         * auto-load.c: Remove _initialize_auto_load prototype.
5640         * auxv.c: Remove _initialize_auxv prototype.
5641         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5642         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5643         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5644         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5645         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5646         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5647         prototype.
5648         * break-catch-throw.c: Remove _initialize_break_catch_throw
5649         prototype.
5650         * breakpoint.c: Remove _initialize_breakpoint prototype.
5651         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5652         * btrace.c: Remove _initialize_btrace prototype.
5653         * charset.c: Remove _initialize_charset prototype.
5654         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5655         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5656         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5657         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5658         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5659         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5660         * coffread.c: Remove _initialize_coffread prototype.
5661         * compile/compile.c: Remove _initialize_compile prototype.
5662         * complaints.c: Remove _initialize_complaints prototype.
5663         * completer.c: Remove _initialize_completer prototype.
5664         * copying.awk: Remove _initialize_copying prototype.
5665         * copying.c: Regenerate.
5666         * core-regset.c: Remove _initialize_core_regset prototype.
5667         * corefile.c: Remove _initialize_core prototype.
5668         * corelow.c: Remove _initialize_corelow prototype.
5669         * cp-abi.c: Remove _initialize_cp_abi prototype.
5670         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5671         * cp-support.c: Remove _initialize_cp_support prototype.
5672         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5673         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5674         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5675         * ctf.c: Remove _initialize_ctf prototype.
5676         * d-lang.c: Remove _initialize_d_language prototype.
5677         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5678         prototype.
5679         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5680         * dbxread.c: Remove _initialize_dbxread prototype.
5681         * dcache.c: Remove _initialize_dcache prototype.
5682         * demangle.c: Remove _initialize_demangler prototype.
5683         * disasm-selftests.c: Remove _initialize_disasm_selftests
5684         prototype.
5685         * disasm.c: Remove _initialize_disasm prototype.
5686         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5687         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5688         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5689         prototype.
5690         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5691         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5692         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5693         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5694         * elfread.c: Remove _initialize_elfread prototype.
5695         * exec.c: Remove _initialize_exec prototype.
5696         * extension.c: Remove _initialize_extension prototype.
5697         * f-lang.c: Remove _initialize_f_language prototype.
5698         * f-valprint.c: Remove _initialize_f_valprint prototype.
5699         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5700         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5701         * filesystem.c: Remove _initialize_filesystem prototype.
5702         * findcmd.c: Remove _initialize_mem_search prototype.
5703         * fork-child.c: Remove _initialize_fork_child prototype.
5704         * frame-base.c: Remove _initialize_frame_base prototype.
5705         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5706         * frame.c: Remove _initialize_frame prototype.
5707         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5708         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5709         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5710         * gcore.c: Remove _initialize_gcore prototype.
5711         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5712         * gdbarch.c: Regenerate.
5713         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5714         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5715         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5716         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5717         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5718         * go-lang.c: Remove _initialize_go_language prototype.
5719         * go32-nat.c: Remove _initialize_go32_nat prototype.
5720         * guile/guile.c: Remove _initialize_guile prototype.
5721         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5722         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5723         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5724         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5725         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5726         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5727         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5728         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5729         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5730         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5731         prototype.
5732         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5733         prototype.
5734         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5735         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5736         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5737         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5738         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5739         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5740         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5741         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5742         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5743         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5744         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5745         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5746         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5747         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5748         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5749         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5750         prototype.
5751         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5752         prototype.
5753         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5754         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5755         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5756         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5757         * infcall.c: Remove _initialize_infcall prototype.
5758         * infcmd.c: Remove _initialize_infcmd prototype.
5759         * inferior.c: Remove _initialize_inferiors prototype.
5760         * inflow.c: Remove _initialize_inflow prototype.
5761         * infrun.c: Remove _initialize_infrun prototype.
5762         * interps.c: Remove _initialize_interpreter prototype.
5763         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5764         * jit.c: Remove _initialize_jit prototype.
5765         * language.c: Remove _initialize_language prototype.
5766         * linux-fork.c: Remove _initialize_linux_fork prototype.
5767         * linux-nat.c: Remove _initialize_linux_nat prototype.
5768         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5769         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5770         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5771         * m2-lang.c: Remove _initialize_m2_language prototype.
5772         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5773         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5774         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5775         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5776         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5777         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5778         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5779         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5780         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5781         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5782         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5783         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5784         * machoread.c: Remove _initialize_machoread prototype.
5785         * macrocmd.c: Remove _initialize_macrocmd prototype.
5786         * macroscope.c: Remove _initialize_macroscope prototype.
5787         * maint.c: Remove _initialize_maint_cmds prototype.
5788         * mdebugread.c: Remove _initialize_mdebugread prototype.
5789         * memattr.c: Remove _initialize_mem prototype.
5790         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5791         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5792         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5793         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5794         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5795         * microblaze-linux-tdep.c: Remove
5796         _initialize_microblaze_linux_tdep prototype.
5797         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5798         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5799         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5800         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5801         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5802         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5803         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5804         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5805         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5806         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5807         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5808         prototype.
5809         * mipsread.c: Remove _initialize_mipsread prototype.
5810         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5811         prototype.
5812         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5813         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5814         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5815         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5816         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5817         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5818         prototype.
5819         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5820         * nto-procfs.c: Remove _initialize_procfs prototype.
5821         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5822         * objc-lang.c: Remove _initialize_objc_language prototype.
5823         * objfiles.c: Remove _initialize_objfiles prototype.
5824         * observer.c: Remove observer_test_first_notification_function,
5825         observer_test_second_notification_function,
5826         observer_test_third_notification_function, and
5827         _initialize_observer prototypes.
5828         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5829         * osabi.c: Remove _initialize_gdb_osabi prototype.
5830         * osdata.c: Remove _initialize_osdata prototype.
5831         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5832         * parse.c: Remove _initialize_parse prototype.
5833         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5834         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5835         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5836         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5837         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5838         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5839         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5840         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5841         * printcmd.c: Remove _initialize_printcmd prototype.
5842         * probe.c: Remove _initialize_probe prototype.
5843         * proc-api.c: Remove _initialize_proc_api prototype.
5844         * proc-events.c: Remove _initialize_proc_events prototype.
5845         * proc-service.c: Remove _initialize_proc_service prototype.
5846         * procfs.c: Remove _initialize_procfs prototype.
5847         * psymtab.c: Remove _initialize_psymtab prototype.
5848         * python/python.c: Remove _initialize_python prototype.
5849         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5850         * record-btrace.c: Remove _initialize_record_btrace prototype.
5851         * record-full.c: Remove _initialize_record_full prototype.
5852         * record.c: Remove _initialize_record prototype.
5853         * regcache.c: Remove _initialize_regcache prototype.
5854         * reggroups.c: Remove _initialize_reggroup prototype.
5855         * remote-notif.c: Remove _initialize_notif prototype.
5856         * remote-sim.c: Remove _initialize_remote_sim prototype.
5857         * remote.c: Remove _initialize_remote prototype.
5858         * reverse.c: Remove _initialize_reverse prototype.
5859         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5860         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5861         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5862         prototype.
5863         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5864         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5865         * rust-exp.y: Remove _initialize_rust_exp prototype.
5866         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5867         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5868         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5869         * score-tdep.c: Remove _initialize_score_tdep prototype.
5870         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5871         prototype.
5872         * ser-go32.c: Remove _initialize_ser_dos prototype.
5873         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5874         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5875         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5876         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5877         * serial.c: Remove _initialize_serial prototype.
5878         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5879         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5880         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5881         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5882         * skip.c: Remove _initialize_step_skip prototype.
5883         * sol-thread.c: Remove _initialize_sol_thread prototype.
5884         * solib-aix.c: Remove _initialize_solib_aix prototype.
5885         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5886         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5887         * solib-frv.c: Remove _initialize_frv_solib prototype.
5888         * solib-spu.c: Remove _initialize_spu_solib prototype.
5889         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5890         * solib-target.c: Remove _initialize_solib_target prototype.
5891         * solib.c: Remove _initialize_solib prototype.
5892         * source.c: Remove _initialize_source prototype.
5893         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5894         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5895         prototype.
5896         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5897         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5898         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5899         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5900         prototype.
5901         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5902         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5903         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5904         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5905         prototype.
5906         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5907         prototype.
5908         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5909         prototype.
5910         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5911         prototype.
5912         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5913         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5914         prototype.
5915         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5916         prototype.
5917         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5918         prototype.
5919         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5920         prototype.
5921         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5922         prototype.
5923         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5924         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5925         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5926         * stabsread.c: Remove _initialize_stabsread prototype.
5927         * stack.c: Remove _initialize_stack prototype.
5928         * stap-probe.c: Remove _initialize_stap_probe prototype.
5929         * std-regs.c: Remove _initialize_frame_reg prototype.
5930         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5931         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5932         * symfile.c: Remove _initialize_symfile prototype.
5933         * symmisc.c: Remove _initialize_symmisc prototype.
5934         * symtab.c: Remove _initialize_symtab prototype.
5935         * target-dcache.c: Remove _initialize_target_dcache prototype.
5936         * target-descriptions.c: Remove _initialize_target_descriptions
5937         prototype.
5938         * thread.c: Remove _initialize_thread prototype.
5939         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5940         prototype.
5941         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5942         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5943         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5944         prototype.
5945         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5946         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5947         * tracefile.c: Remove _initialize_tracefile prototype.
5948         * tracepoint.c: Remove _initialize_tracepoint prototype.
5949         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5950         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5951         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5952         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5953         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5954         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5955         * tui/tui.c: Remove _initialize_tui prototype.
5956         * typeprint.c: Remove _initialize_typeprint prototype.
5957         * user-regs.c: Remove _initialize_user_regs prototype.
5958         * utils.c: Remove _initialize_utils prototype.
5959         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5960         * valarith.c: Remove _initialize_valarith prototype.
5961         * valops.c: Remove _initialize_valops prototype.
5962         * valprint.c: Remove _initialize_valprint prototype.
5963         * value.c: Remove _initialize_values prototype.
5964         * varobj.c: Remove _initialize_varobj prototype.
5965         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5966         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5967         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5968         * windows-nat.c: Remove _initialize_windows_nat,
5969         _initialize_check_for_gdb_ini, and _initialize_loadable
5970         prototypes.
5971         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5972         * xcoffread.c: Remove _initialize_xcoffread prototype.
5973         * xml-support.c: Remove _initialize_xml_support prototype.
5974         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5975         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5976         prototype.
5977         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5978         prototype.
5979         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5980
5981 2017-09-08  Keith Seitz  <keiths@redhat.com>
5982
5983         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5984         field.
5985
5986 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5987
5988         * f-valprint.c (f_val_print): Remove check for one byte
5989         sized integers. Remove printing of character type.
5990
5991 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5992             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5993             Bernhard Heckel  <bernhard.heckel@intel.com>
5994
5995         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5996         to maintain proper indentation when printing pointers/refs.
5997
5998 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5999
6000         GDB 8.0.1 released.
6001
6002 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6003
6004         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6005
6006 2017-09-05  Tom Tromey  <tom@tromey.com>
6007
6008         * parse.c (funcall_chain): Now a std::vector.
6009         (start_arglist, end_arglist): Simplify.
6010         (free_funcalls): Remove.
6011         (parse_exp_in_context_1): Remove cleanup.
6012
6013 2017-09-05  Tom Tromey  <tom@tromey.com>
6014
6015         * go-exp.y (go_parse): Don't create a cleanup.
6016
6017 2017-09-05  Tom Tromey  <tom@tromey.com>
6018
6019         * d-exp.y (PrimaryExpression): Use std::string.
6020         (d_parse): Don't create a cleanup.
6021
6022 2017-09-05  Tom Tromey  <tom@tromey.com>
6023
6024         * utils.c (do_clear_parser_state): Remove.
6025         (make_cleanup_clear_parser_state): Remove.
6026         * p-exp.y (pascal_parse): Use scoped_restore.
6027         * m2-exp.y (m2_parse): Use scoped_restore.
6028         * f-exp.y (f_parse): Use scoped_restore.
6029         * d-exp.y (d_parse): Use scoped_restore.
6030         * c-exp.y (c_parse): Use scoped_restore.
6031         * ada-exp.y (ada_parse): Use scoped_restore.
6032         * utils.h (make_cleanup_clear_parser_state): Remove.
6033
6034 2017-09-06  Keith Seitz  <keiths@redhat.com>
6035
6036         * dwarf2read.c (dw2_linkage_name_attr): New function.
6037         (dw2_linkage_name): New function.
6038         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6039         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6040         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6041
6042 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6043
6044         * config/djgpp/djconfig.sh: Correct shell portability issue.
6045
6046 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6047
6048         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6049
6050 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6051
6052         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6053         * NEWS: Mention new FreeBSD/mips native configuration.
6054         * configure.host: Add aarch64*-*-freebsd*.
6055         * configure.nat: Likewise.
6056         * aarch64-fbsd-nat.c: New file.
6057
6058 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6059
6060         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6061         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6062         * NEWS: Mention new FreeBSD/aarch64 target.
6063         * configure.tgt: Add aarch64*-*-freebsd*.
6064         * aarch64-fbsd-tdep.c: New file.
6065         * aarch64-fbsd-tdep.h: New file.
6066
6067 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6068
6069         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6070
6071 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6072
6073         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6074         of TLS symbols.
6075
6076 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6077
6078         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6079         call.
6080
6081 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6082
6083         * infrun.c (follow_exec): Call add_thread after
6084         target_find_description.
6085
6086 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6087
6088         * infrun.c (handle_inferior_event_1): When exec'ing, read
6089         stop_pc after follow_exec.
6090
6091 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6092
6093         * remote.c (process_g_packet): Update error message.
6094
6095 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6096
6097         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6098         targets.
6099
6100 2017-09-05  Pedro Alves  <palves@redhat.com>
6101
6102         * eval.c (eval_call, evaluate_funcall): New functions, factored
6103         out from ...
6104         (evaluate_subexp_standard): ... this.
6105
6106 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6107
6108         * amd64-tdep.c (amd64_target_description): Create target
6109         descriptions.
6110         (_initialize_amd64_tdep): Don't call functions
6111         initialize_tdesc_amd64_*.  Add self tests.
6112         * arch/amd64.c (amd64_create_target_description): Add parameter
6113         is_linux.  Call set_tdesc_osabi if is_linux is true.
6114         * arch/amd64.h (amd64_create_target_description): Update the
6115         declaration.
6116         * arch/i386.c (i386_create_target_description): Add parameter
6117         is_linux.  Call set_tdesc_osabi if is_linux is true.
6118         * arch/i386.h (i386_create_target_description): Update
6119         declaration.
6120         * configure.tgt: Add i386.o to gdb_target_obs.
6121         * features/Makefile (XMLTOC): Remove i386/*.xml.
6122         * features/i386/amd64-avx-avx512.c: Remove.
6123         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6124         * features/i386/amd64-avx-mpx.c: Remove.
6125         * features/i386/amd64-avx.c: Remove.
6126         * features/i386/amd64-mpx.c: Remove.
6127         * features/i386/amd64.c: Remove.
6128         * features/i386/i386-avx-avx512.c: Remove.
6129         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6130         * features/i386/i386-avx-mpx.c: Remove.
6131         * features/i386/i386-avx.c: Remove.
6132         * features/i386/i386-mmx.c: Remove.
6133         * features/i386/i386-mpx.c: Remove.
6134         * features/i386/i386.c: Remove.
6135         * i386-tdep.c: Don't include features/i386/i386*.c., include
6136         target-descriptions.h and arch/i386.h.
6137         (i386_target_description): Create target descriptions.
6138         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6139         functions.  Do self tests.
6140
6141 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6142
6143         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6144         * features/i386/amd64-avx-avx512-linux.c: Removed.
6145         * features/i386/amd64-avx-linux.c: Removed.
6146         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6147         * features/i386/amd64-avx-mpx-linux.c: Removed.
6148         * features/i386/amd64-linux.c: Removed.
6149         * features/i386/amd64-mpx-linux.c: Removed.
6150         * features/i386/x32-avx-avx512-linux.c: Removed.
6151         * features/i386/x32-avx-linux.c: Removed.
6152         * features/i386/x32-linux.c: Removed.
6153
6154 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6155
6156         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6157         features/i386/*.c.
6158         (amd64_linux_read_description): Call
6159         amd64_create_target_description.
6160         * arch/amd64.c: New file.
6161         * arch/amd64.h: New file.
6162         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6163         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6164
6165 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6166
6167         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6168         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6169         (amd64_linux_read_description): Create target descriptions.
6170         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6171         functions.  Add unit tests.
6172         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6173         x32-core.xml.
6174         * features/i386/64bit-avx.c: Generated.
6175         * features/i386/64bit-avx512.c: Generated.
6176         * features/i386/64bit-core.c: Generated.
6177         * features/i386/64bit-linux.c: Generated.
6178         * features/i386/64bit-mpx.c: Generated.
6179         * features/i386/64bit-pkeys.c: Generated.
6180         * features/i386/64bit-segments.c: Generated.
6181         * features/i386/64bit-sse.c: Generated.
6182         * features/i386/x32-core.c: Generated.
6183         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6184         c files for amd64-linux and x32-linux.
6185
6186 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6187
6188         * amd64-linux-tdep.c (amd64_linux_read_description): New
6189         function.
6190         (amd64_linux_core_read_description): Call
6191         amd64_linux_read_description.
6192         (amd64_linux_init_abi): Likewise.
6193         (amd64_x32_linux_init_abi): Likewise.
6194         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6195         * x86-linux-nat.c (x86_linux_read_description): Call
6196         amd64_linux_read_description.
6197
6198 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6199
6200         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6201         comments.
6202
6203 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6204
6205         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6206         * features/i386/i386-avx-avx512-linux.c: Remove.
6207         * features/i386/i386-avx-linux.c: Remove.
6208         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6209         * features/i386/i386-avx-mpx-linux.c: Remove.
6210         * features/i386/i386-linux.c: Remove.
6211         * features/i386/i386-mmx-linux.c: Remove.
6212         * features/i386/i386-mpx-linux.c: Remove.
6213
6214 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6215
6216         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6217         (SFILES): Add arch/i386.c.
6218         (HFILES_NO_SRCDIR): Add arch/i386.h.
6219         * arch/i386.c: New file.
6220         * arch/i386.h: New file.
6221         * arch/tdesc.h (allocate_target_description): Declare.
6222         (set_tdesc_architecture): Declare.
6223         (set_tdesc_osabi): Declare.
6224         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6225         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6226         include arch/i386.h.
6227         (i386_linux_read_description): Remove code and call
6228         i386_create_target_description.
6229         (set_tdesc_architecture): New function.
6230         (set_tdesc_osabi): New function.
6231         * target-descriptions.h (allocate_target_description): Remove.
6232
6233 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6234
6235         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6236         * target-descriptions.c (tdesc_create_feature): Likewise, and
6237         adjust code.
6238         * features/i386/32bit-avx.c: Re-generated.
6239         * features/i386/32bit-avx512.c: Re-generated.
6240         * features/i386/32bit-core.c: Re-generated.
6241         * features/i386/32bit-linux.c: Re-generated.
6242         * features/i386/32bit-mpx.c: Re-generated.
6243         * features/i386/32bit-pkeys.c: Re-generated.
6244         * features/i386/32bit-sse.c: Re-generated.
6245
6246 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6247
6248         * regformats/regdef.h (struct reg): Override operator == and !=.
6249
6250 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6251
6252         * arch/tdesc.h: New file.
6253         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6254         * target-descriptions.c: Update comments.
6255         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6256         declarations.
6257         * features/i386/32bit-avx.c: Re-generated.
6258         * features/i386/32bit-avx512.c: Re-generated.
6259         * features/i386/32bit-core.c: Re-generated.
6260         * features/i386/32bit-linux.c: Re-generated.
6261         * features/i386/32bit-mpx.c: Re-generated.
6262         * features/i386/32bit-pkeys.c: Re-generated.
6263         * features/i386/32bit-sse.c: Re-generated.
6264
6265 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6266
6267         * regformats/regdat.sh: Update generated code.
6268
6269 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6270
6271         * regformats/regdat.sh: Adjust code order.
6272
6273 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6274
6275         * expprint.c (dump_subexp_body_standard): Use constant format
6276         string in fprintf_filtered call.
6277
6278 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6279
6280         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6281         NetBSD/i386.
6282         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6283
6284 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6285
6286         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6287
6288 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6289
6290         * bsd-kvm.o: Define _KMEMUSER.
6291         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6292         * configure: Regenerate.
6293
6294 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6295
6296         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6297         * i386-fbsd-nat.c: Likewise.
6298
6299 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6300
6301         * unittests/array-view-selftests.c: Add include of <array>.
6302
6303 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6304
6305         * spu-tdep.c (flush_ea_cache): Add missing argument to
6306         call_function_by_hand.
6307
6308 2017-09-04  Pedro Alves  <palves@redhat.com>
6309
6310         * NEWS (Safer support for debugging with no debug info): New.
6311
6312 2017-09-04  Pedro Alves  <palves@redhat.com>
6313
6314         * c-exp.y (function_method, function_method_void): Add current
6315         instance flags to TYPE_INSTANCE.
6316         * dwarf2read.c (check_modifier): New.
6317         (compute_delayed_physnames): Assert that only C++ adds delayed
6318         physnames.  Mark fn_fields as const/volatile depending on
6319         physname.
6320         * eval.c (make_params): New type_instance_flags parameter.  Use
6321         it as the new type's instance flags.
6322         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6323         flags element and pass it to make_params.
6324         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6325         instance flags element.
6326         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6327         * gdbtypes.h: Include "enum-flags.h".
6328         (type_instance_flags): New enum-flags type.
6329         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6330         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6331         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6332         (follow_type_instance_flags): New function.
6333         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6334         * parser-defs.h (follow_type_instance_flags): Declare.
6335         * valops.c (value_struct_elt_for_reference): const/volatile must
6336         match too.
6337
6338 2017-09-04  Pedro Alves  <palves@redhat.com>
6339
6340         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6341         function/method scopes; lookup the nested name as a function local
6342         static variable.
6343
6344 2017-09-04  Pedro Alves  <palves@redhat.com>
6345
6346         (%type <voidval>): Add function_method.
6347         * c-exp.y (exp): New production for calls with no arguments.
6348         (function_method, function_method_void_or_typelist): New
6349         productions.
6350         (exp): New production for "method()::static_var".
6351         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6352         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6353         Handle OP_FUNC_STATIC_VAR.
6354         * parse.c (operator_length_standard):
6355         Handle OP_FUNC_STATIC_VAR.
6356
6357 2017-09-04  Pedro Alves  <palves@redhat.com>
6358
6359         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6360         handling.
6361         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6362         Ditto.
6363         * parse.c (operator_length_standard, operator_check_standard):
6364         Ditto.
6365         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6366
6367 2017-09-04  Pedro Alves  <palves@redhat.com>
6368
6369         * ax-gdb.c: Include "typeprint.h".
6370         (gen_expr_for_cast): New function.
6371         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6372         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6373         type is unknown.
6374         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6375         nodebug_data_symbol.
6376         * eval.c: Include "typeprint.h".
6377         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6378         Error out if symbol has unknown type.
6379         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6380         evaluate_subexp_for_cast.
6381         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6382         OP_VAR_MSYM_VALUE.
6383         (evaluate_subexp_for_cast): New function.
6384         * gdbtypes.c (init_nodebug_var_type): New function.
6385         (objfile_type): Use it to initialize types of variables with no
6386         debug info.
6387         * typeprint.c (error_unknown_type): New.
6388         * typeprint.h (error_unknown_type): New declaration.
6389         * compile/compile-c-types.c (convert_type_basic): Handle
6390         TYPE_CODE_ERROR; warn and fallback to int for variables with
6391         unknown type.
6392
6393 2017-09-04  Pedro Alves  <palves@redhat.com>
6394
6395         * eval.c (evaluate_var_value): New function, factored out from ...
6396         (evaluate_subexp_standard): ... here.
6397
6398 2017-09-04  Pedro Alves  <palves@redhat.com>
6399
6400         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6401         Remove useless assignments to 'op'.
6402
6403 2017-09-04  Pedro Alves  <palves@redhat.com>
6404
6405         * eval.c (eval_skip_value): New function.
6406         (evaluate_subexp_standard): Use it.
6407
6408 2017-09-04  Pedro Alves  <palves@redhat.com>
6409
6410         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6411         function name from symbol/minsym and pass it to
6412         error_call_unknown_return_type.
6413
6414 2017-09-04  Pedro Alves  <palves@redhat.com>
6415
6416         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6417         * ax-gdb.c (gen_msym_var_ref): New function.
6418         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6419         * eval.c (evaluate_var_msym_value): New function.
6420         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6421         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6422         to call_function_by_hand.
6423         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6424         Handle OP_VAR_MSYM_VALUE.
6425         (union exp_element) <msymbol>: New field.
6426         * minsyms.h (struct type): Forward declare.
6427         (find_minsym_type_and_address): Declare.
6428         * parse.c (write_exp_elt_msym): New function.
6429         (write_exp_msymbol): Delete, refactored as ...
6430         (find_minsym_type_and_address): ... this new function.
6431         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6432         (operator_length_standard, operator_check_standard): Handle
6433         OP_VAR_MSYM_VALUE.
6434         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6435
6436 2017-09-04  Pedro Alves  <palves@redhat.com>
6437
6438         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6439         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6440         unknown.
6441         * ada-typeprint.c (print_func_type): Handle functions with unknown
6442         return type.
6443         * c-typeprint.c (c_type_print_base): Handle functions and methods
6444         with unknown return type.
6445         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6446         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6447         * compile/compile-c-types.c: Include "objfiles.h".
6448         (convert_func): For functions with unknown return type, warn and
6449         default to int.
6450         * compile/compile-object-run.c (compile_object_run): Adjust call
6451         to call_function_by_hand_dummy.
6452         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6453         call_function_by_hand.
6454         * eval.c (evaluate_subexp_standard): Adjust calls to
6455         call_function_by_hand.  Handle functions and methods with unknown
6456         return type.  Pass expect_type to call_function_by_hand.
6457         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6458         return type.
6459         * gcore.c (call_target_sbrk): Adjust call to
6460         call_function_by_hand.
6461         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6462         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6463         an integer address type instead of nodebug.
6464         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6465         call_function_by_hand.
6466         * infcall.c (error_call_unknown_return_type): New function.
6467         (call_function_by_hand): New "default_return_type" parameter.
6468         Pass it down.
6469         (call_function_by_hand_dummy): New "default_return_type"
6470         parameter.  Use it instead of defaulting to int.  If there's no
6471         default and the return type is unknown, throw an error.  If
6472         there's a default return type, and the called function has no
6473         debug info, then assume the function is prototyped.
6474         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6475         New "default_return_type" parameter.
6476         (error_call_unknown_return_type): New declaration.
6477         * linux-fork.c (call_lseek): Cast return type of lseek.
6478         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6479         call_function_by_hand.
6480         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6481         calls to call_function_by_hand.
6482         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6483         return type.
6484         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6485         (value_nsstring, print_object_command): Adjust calls to
6486         call_function_by_hand.
6487         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6488         functions with unknown return type.
6489         (pascal_type_print_func_varspec_suffix): New function.
6490         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6491         TYPE_CODE_METHOD>: Use it.
6492         * python/py-value.c (valpy_call): Adjust call to
6493         call_function_by_hand.
6494         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6495         call_function_by_hand.
6496         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6497         call_function_by_hand.
6498         * valops.c (value_allocate_space_in_inferior): Adjust call to
6499         call_function_by_hand.
6500         * typeprint.c (type_print_unknown_return_type): New function.
6501         * typeprint.h (type_print_unknown_return_type): New declaration.
6502
6503 2017-09-04  Pedro Alves  <palves@redhat.com>
6504
6505         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6506         types with more than one parameter as prototyped.
6507
6508 2017-09-04  Pedro Alves  <palves@redhat.com>
6509
6510         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6511         (disassemble_command): Use gdb_disassembly_flags instead of bare
6512         int.
6513         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6514         (dump_insns, do_mixed_source_and_assembly_deprecated)
6515         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6516         Use gdb_disassembly_flags instead of bare int.
6517         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6518         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6519         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6520         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6521         (enum gdb_disassembly_flag): ... values of this new enumeration.
6522         (gdb_disassembly_flags): Define.
6523         (gdb_disassembly)
6524         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6525         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6526         gdb_disassembly_flags instead of bare int.
6527         * record-btrace.c (btrace_insn_history)
6528         (record_btrace_insn_history, record_btrace_insn_history_range)
6529         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6530         instead of bare int.
6531         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6532         Use gdb_disassembly_flags instead of bare int.
6533         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6534         Define.
6535         * target-delegates.c: Regenerate.
6536         * target.c (target_insn_history, target_insn_history_from)
6537         (target_insn_history_range): Use gdb_disassembly_flags instead of
6538         bare int.
6539         * target.h: Include "disasm.h".
6540         (struct target_ops) <to_insn_history, to_insn_history_from,
6541         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6542         int.
6543         (target_insn_history, target_insn_history_from)
6544         (target_insn_history_range): Use gdb_disassembly_flags instead of
6545         bare int.
6546
6547 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6548
6549         * cli/cli-script.c (build_command_line): For if/while commands,
6550         check whether args is empty.
6551
6552 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6553
6554         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6555         (enum command_control_type): Likewise.
6556         (struct command_line): Likewise.
6557         (free_command_lines): Likewise.
6558         (struct command_lines_deleter): Likewise.
6559         (command_line_up): Likewise.
6560         (read_command_lines): Likewise.
6561         (read_command_lines_1): Likewise.
6562         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6563         (enum command_control_type): Likewise.
6564         (struct command_line): Likewise.
6565         (free_command_lines): Likewise.
6566         (struct command_lines_deleter): Likewise.
6567         (command_line_up): Likewise.
6568         (read_command_lines): Likewise.
6569         (read_command_lines_1): Likewise.
6570         * breakpoint.h: Include cli/cli-script.h.
6571         * extension-priv.h: Likewise.
6572         * gdbcmd.h: Likewise.
6573
6574 2017-09-04  Pedro Alves  <palves@redhat.com>
6575
6576         * ada-lang.c (is_known_support_routine): Move sal declaration to
6577         where it is initialized.
6578         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6579         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6580         (clear_command, update_static_tracepoint): Remove init_sal
6581         references.  Move declarations closer to initializations.
6582         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6583         initializations.
6584         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6585         references.  Move sal declarations closer to initializations.
6586         * frame.c (find_frame_sal): Return a symtab_and_line via function
6587         return instead of output parameter.  Remove init_sal references.
6588         * frame.h (find_frame_sal): Return a symtab_and_line via function
6589         return instead of output parameter.
6590         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6591         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6592         instead of memset.
6593         (gdbscm_find_pc_line): Remove init_sal reference.
6594         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6595         references.  Move declarations closer to initializations.
6596         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6597         initializations.
6598         (finish_backward): Remove init_sal references.  Move declarations
6599         closer to initializations.
6600         * infrun.c (process_event_stop_test, handle_step_into_function)
6601         (insert_hp_step_resume_breakpoint_at_frame)
6602         (insert_step_resume_breakpoint_at_caller): Likewise.
6603         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6604         (symbol_to_sal): Likewise.
6605         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6606         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6607         to its initialization.
6608         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6609         init_sal references.  Move declarations closer to initializations.
6610         * source.c (get_current_source_symtab_and_line): Remove brace
6611         initialization.
6612         (set_current_source_symtab_and_line): Now takes the sal by const
6613         reference.  Remove brace initialization.
6614         (line_info): Remove init_sal reference.
6615         * source.h (set_current_source_symtab_and_line): Now takes a
6616         symtab_and_line via const reference.
6617         * stack.c (set_current_sal_from_frame): Adjust.
6618         (print_frame_info): Adjust.
6619         (get_last_displayed_sal): Return the sal via function return
6620         instead of via output parameter.  Simplify.
6621         (frame_info): Adjust.
6622         * stack.h (get_last_displayed_sal): Return the sal via function
6623         return instead of via output parameter.
6624         * symtab.c (init_sal): Delete.
6625         (find_pc_sect_line): Remove init_sal references.  Move
6626         declarations closer to initializations.
6627         (find_function_start_sal): Remove init_sal references.  Move
6628         declarations closer to initializations.
6629         * symtab.h (struct symtab_and_line): In-class initialize all
6630         fields.
6631         * tracepoint.c (set_traceframe_context)
6632         (print_one_static_tracepoint_marker): Remove init_sal references.
6633         Move declarations closer to initializations.
6634         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6635         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6636         declarations closer to initializations.
6637         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6638         init_sal references.  Adjust.
6639
6640 2017-09-04  Pedro Alves  <palves@redhat.com>
6641
6642         * ax-gdb.c (agent_command_1): Use range-for.
6643         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6644         * breakpoint.c: Include "common/array-view.h".
6645         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6646         parameter from struct symtabs_and_lines to
6647         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6648         (breakpoint_sals_to_pc): Change sals parameter from struct
6649         symtabs_and_lines to std::vector reference.
6650         (check_fast_tracepoint_sals): Change sals parameter from struct
6651         symtabs_and_lines to std::array_view.  Use range-for.
6652         (decode_static_tracepoint_spec): Return a std::vector instead of
6653         symtabs_and_lines.  Update.
6654         (create_breakpoint): Update.
6655         (break_range_command, until_break_command, clear_command): Update.
6656         (base_breakpoint_decode_location, bkpt_decode_location)
6657         (bkpt_probe_create_sals_from_location)
6658         (bkpt_probe_decode_location, tracepoint_decode_location)
6659         (tracepoint_probe_decode_location)
6660         (strace_marker_create_sals_from_location): Return a std::vector
6661         instead of symtabs_and_lines.
6662         (strace_marker_create_breakpoints_sal): Update.
6663         (strace_marker_decode_location): Return a std::vector instead of
6664         symtabs_and_lines.  Update.
6665         (update_breakpoint_locations): Change struct symtabs_and_lines
6666         parameters to gdb::array_view.  Adjust.
6667         (location_to_sals): Return a std::vector instead of
6668         symtabs_and_lines.  Update.
6669         (breakpoint_re_set_default): Use std::vector instead of struct
6670         symtabs_and_lines.
6671         (decode_location_default): Return a std::vector instead of
6672         symtabs_and_lines.  Update.
6673         * breakpoint.h: Include "common/array-view.h".
6674         (struct breakpoint_ops) <decode_location>: Now returns a
6675         std::vector instead of returning a symtabs_and_lines via output
6676         parameter.
6677         (update_breakpoint_locations): Change sals parameters to use
6678         gdb::array_view.
6679         * cli/cli-cmds.c (edit_command, list_command): Update to use
6680         std::vector and gdb::array_view.
6681         (ambiguous_line_spec): Adjust to use gdb::array_view and
6682         range-for.
6683         (compare_symtabs): Rename to ...
6684         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6685         const reference and adjust.
6686         (filter_sals): Rewrite using std::vector and standard algorithms.
6687         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6688         (jump_command): Update to use std::vector.
6689         * linespec.c (struct linespec_state) <canonical_names>: Update
6690         comment.
6691         (add_sal_to_sals_basic): Delete.
6692         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6693         (decode_line_2, create_sals_line_offset)
6694         (convert_address_location_to_sals, convert_linespec_to_sals)
6695         (convert_explicit_location_to_sals, parse_linespec)
6696         (event_location_to_sals, decode_line_full, decode_line_1)
6697         (decode_line_with_current_source)
6698         (decode_line_with_last_displayed, decode_objc)
6699         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6700         (linespec_result::~linespec_result): Adjust to use std::vector
6701         instead of symtabs_and_lines.
6702         * linespec.h (linespec_sals::sals): Now a std::vector.
6703         (struct linespec_result): Use std::vector, bool, and in-class
6704         initialization.
6705         (decode_line_1, decode_line_with_current_source)
6706         (decode_line_with_last_displayed): Return std::vector.
6707         * macrocmd.c (info_macros_command): Use std::vector.
6708         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6709         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6710         std::vector.
6711         * probe.h (parse_probes): Return a std::vector.
6712         * python/python.c (gdbpy_decode_line): Use std::vector and
6713         gdb::array_view.
6714         * source.c (select_source_symtab, line_info): Use std::vector.
6715         * stack.c (func_command): Use std::vector.
6716         * symtab.h (struct symtabs_and_lines): Delete.
6717         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6718
6719 2017-09-04  Pedro Alves  <palves@redhat.com>
6720
6721         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6722         unittests/array-view-selftests.c.
6723         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6724         * common/array-view.h: New file.
6725         * unittests/array-view-selftests.c: New file.
6726
6727 2017-09-04  Pedro Alves  <palves@redhat.com>
6728
6729         * cli/cli-cmds.c (edit_command): Pass message to
6730         ambiguous_line_spec.
6731         (list_command): Pass message to ambiguous_line_spec.  Say
6732         "first"/"last" instead of "start" and "end" to be consistent with
6733         the manual.
6734         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6735         them to print formatted message.
6736
6737 2017-09-04  Pedro Alves  <palves@redhat.com>
6738
6739         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6740         ftrace_update_insns by reference instead of pointer.
6741
6742 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6743
6744         * i386-go32-tdep.c: Include x86-xstate.h.
6745         (i386_go32_init_abi): Call i386_target_description.
6746         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6747         if xcr0 is X86_XSTATE_X87_MASK.
6748         * i386-tdep.h (tdesc_i386): Remove the declaration.
6749         (tdesc_i386_mmx): Likewise.
6750
6751 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6752
6753         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6754         X86_XSTATE_SSE_MASK instead of 0.
6755
6756 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6757
6758         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6759         i386_target_description.
6760         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6761         i386_target_description.
6762         * i386-tdep.c (i386_gdbarch_init): Likewise.
6763
6764 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6765
6766         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6767         (x86_darwin_init_abi_64): Call amd64_target_description.
6768         * amd64-dicos-tdep.c: Likewise.
6769         * amd64-fbsd-nat.c: Likewise.
6770         * amd64-fbsd-tdep.c: Likewise.
6771         * amd64-nbsd-tdep.c: Likewise.
6772         * amd64-obsd-tdep.c: Likewise.
6773         * amd64-sol2-tdep.c: Likewise.
6774         * amd64-windows-tdep.c: Likewise.
6775         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6776
6777 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6778
6779         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6780         (btrace_function) <insn>: Change type to use std::vector.
6781         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6782         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6783         ftrace_update_insns, ftrace_compute_global_level_offset,
6784         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6785         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6786         change to std::vector.
6787         (ftrace_update_insns): Adjust to change to std::vector, change
6788         type of INSN parameter.
6789         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6790         * record-btrace.c (btrace_call_history_insn_range,
6791         btrace_compute_src_line_range,
6792         record_btrace_frame_prev_register): Adjust to change to
6793         std::vector.
6794         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6795         to change to std::vector.
6796
6797 2017-09-03  Tom Tromey  <tom@tromey.com>
6798
6799         * corefile.c (reopen_exec_file): Use std::string.
6800
6801 2017-09-03  Tom Tromey  <tom@tromey.com>
6802
6803         * compile/compile.c (compile_register_name_mangled): Return
6804         std::string.
6805         * compile/compile-loc2c.c (pushf_register_address): Update.
6806         (pushf_register): Update.
6807         * compile/compile-c-types.c (convert_array): Update.
6808         * compile/compile-c-symbols.c (generate_vla_size): Update.
6809         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6810         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6811         (convert_one_symbol): Update.
6812         (generate_c_for_for_one_variable): Update.
6813         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6814         std::string.
6815         (generate_register_struct): Update.
6816         * compile/compile-internal.h (c_get_range_decl_name): Return a
6817         std::string.
6818         (compile_register_name_mangled): Return std::string.
6819
6820 2017-09-03  Tom Tromey  <tom@tromey.com>
6821
6822         * utils.c (perror_string): Return a std::string.
6823         (throw_perror_with_name, perror_warning_with_name): Update.
6824
6825 2017-09-03  Tom Tromey  <tom@tromey.com>
6826
6827         * demangle.c (demangle_command): Use std::string,
6828         unique_xmalloc_ptr.
6829
6830 2017-09-03  Tom Tromey  <tom@tromey.com>
6831
6832         * cli/cli-setshow.c (do_set_command): Use std::string.
6833
6834 2017-09-03  Tom Tromey  <tom@tromey.com>
6835
6836         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6837
6838 2017-09-03  Tom Tromey  <tom@tromey.com>
6839
6840         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6841
6842 2017-09-03  Tom Tromey  <tom@tromey.com>
6843
6844         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6845         gdb::unique_xmalloc_ptr.
6846
6847 2017-09-03  Tom Tromey  <tom@tromey.com>
6848
6849         * thread.c (print_thread_info_1): Use string_printf.
6850         (thread_apply_command, thread_apply_all_command): Use
6851         std::string.
6852
6853 2017-09-03  Tom Tromey  <tom@tromey.com>
6854
6855         * valprint.c (val_print_string): Update.
6856         * gdbcore.h (memory_error_message): Return std::string.
6857         * corefile.c (memory_error_message): Return std::string.
6858         (memory_error): Update.
6859         * breakpoint.c (insert_bp_location): Update.
6860
6861 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6862
6863         * target/waitstatus.h (target_waitstatus_to_string): Change
6864         return type to std::string.
6865         * target/waitstatus.c (target_waitstatus_to_string): Return
6866         std::string.
6867         * target.h (target_waitstatus_to_string): Remove declaration.
6868         * infrun.c (resume, clear_proceed_status_thread,
6869         print_target_wait_results, do_target_wait, save_waitstatus,
6870         stop_all_threads): Adjust.
6871         * record-btrace.c (record_btrace_wait): Adjust.
6872         * target-debug.h
6873         (target_debug_print_struct_target_waitstatus_p): Adjust.
6874
6875 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6876
6877         PR gdb/22046
6878         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6879         detection.
6880
6881 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6882
6883         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6884         for setting/unsetting environment variables on the remote target.
6885         (New remote packets): Add entries for QEnvironmentHexEncoded,
6886         QEnvironmentUnset and QEnvironmentReset.
6887         * common/environ.c (gdb_environ::operator=): Extend method to
6888         handle m_user_set_env_list and m_user_unset_env_list.
6889         (gdb_environ::clear): Likewise.
6890         (match_var_in_string): Change type of first parameter from 'char
6891         *' to 'const char *'.
6892         (gdb_environ::set): Extend method to handle
6893         m_user_set_env_list and m_user_unset_env_list.
6894         (gdb_environ::unset): Likewise.
6895         (gdb_environ::clear_user_set_env): New method.
6896         (gdb_environ::user_set_envp): Likewise.
6897         (gdb_environ::user_unset_envp): Likewise.
6898         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6899         m_user_unset_env_list on move constructor/assignment.
6900         (unset): Add new default parameter 'update_unset_list = true'.
6901         (clear_user_set_env): New method.
6902         (user_set_envp): Likewise.
6903         (user_unset_envp): Likewise.
6904         (m_user_set_env_list): New std::set.
6905         (m_user_unset_env_list): Likewise.
6906         * common/rsp-low.c (hex2str): New function.
6907         (bin2hex): New overload for bin2hex function.
6908         * common/rsp-low.c (hex2str): New prototype.
6909         (str2hex): New overload prototype.
6910         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6911         QEnvironmentUnset and QEnvironmentReset.
6912         (remote_protocol_features): Add QEnvironmentHexEncoded,
6913         QEnvironmentUnset and QEnvironmentReset packets.
6914         (send_environment_packet): New function.
6915         (extended_remote_environment_support): Likewise.
6916         (extended_remote_create_inferior): Call
6917         extended_remote_environment_support.
6918         (_initialize_remote): Add QEnvironmentHexEncoded,
6919         QEnvironmentUnset and QEnvironmentReset packet configs.
6920         * unittests/environ-selftests.c (gdb_selftest_env_var):
6921         New variable.
6922         (test_vector_initialization): New function.
6923         (test_init_from_host_environ): Likewise.
6924         (test_reinit_from_host_environ): Likewise.
6925         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6926         Likewise.
6927         (test_unset_set_empty_vector): Likewise.
6928         (test_vector_clear): Likewise.
6929         (test_std_move): Likewise.
6930         (test_move_constructor):
6931         (test_self_move): Likewise.
6932         (test_set_unset_reset): Likewise.
6933         (run_tests): Rewrite in terms of the functions above.
6934
6935 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6936
6937         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6938         (adi_available): Use a temp variable of type CORE_ADDR as argument
6939         3 when calling target_auxv_search.
6940         (adi_normalize_address): Use masks and xor operators to calculate
6941         normalized address.
6942         (adi_read_versions, adi_write_versions, adi_print_versions)
6943         (do_examine, do_assign): Use paddress.
6944
6945 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6946
6947         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6948         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6949         out of loop and add supply of FIR.
6950         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6951         add collect of FIR.
6952
6953 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6954
6955         PR gdb/21827
6956         * cli/cli-script.c (define_command): Don't convert command name
6957         to lower case.
6958
6959 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6960
6961         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6962         Update all callers accordingly. Remove all code blocks handling
6963         the case where DISPP is not NULL.
6964
6965 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6966
6967         PR symtab/22003
6968         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6969         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6970         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6971
6972 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6973
6974         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6975         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6976         (read_comp_units_from_section): New parameter abbrev_section, use
6977         read_and_check_comp_unit_head, allocate signatured_type if needed.
6978         (create_all_comp_units): Update read_comp_units_from_section caller.
6979
6980 2017-08-23  Pedro Alves  <palves@redhat.com>
6981
6982         PR remote/21852
6983         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6984         to null_ptid and switch to thread without reading the registers
6985         after adding the inferior.
6986
6987 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6988
6989         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6990         compile-gcc.
6991         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6992         (compile_to_object): Implement compile_gcc.
6993         (_initialize_compile): Install "set compile-gcc".  Initialize
6994         compile_gcc.
6995
6996 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6997
6998         * compile/compile.c (compile_to_object): Conditionally call
6999         set_verbose.  Conditionally call compile or compile_v0.
7000
7001 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7002
7003         * sparc64-tdep.h: (adi_normalize_address): New export.
7004         * sparc-nat.h: (open_adi_tag_fd): New export.
7005         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7006         * sparc64-linux-tdep.c:
7007         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7008         (sparc64_linux_handle_segmentation_fault): New function.
7009         (sparc64_linux_init_abi): Register
7010         sparc64_linux_handle_segmentation_fault
7011         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7012         (sparc64_addr_bits_remove): New function.
7013         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7014         (MAX_PROC_NAME_SIZE): New macro.
7015         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7016         (sparc64adilist): New variable.
7017         (adi_proc_list): New variable.
7018         (find_adi_info): New function.
7019         (add_adi_info): New function.
7020         (get_adi_info_proc): New function.
7021         (get_adi_info): New function.
7022         (info_adi_command): New function.
7023         (read_maps_entry): New function.
7024         (adi_available): New function.
7025         (adi_normalize_address): New function.
7026         (adi_align_address): New function.
7027         (adi_convert_byte_count): New function.
7028         (adi_tag_fd): New function.
7029         (adi_is_addr_mapped): New function.
7030         (adi_read_versions): New function.
7031         (adi_write_versions): New function.
7032         (adi_print_versions): New function.
7033         (do_examine): New function.
7034         (do_assign): New function.
7035         (adi_examine_command): New function.
7036         (adi_assign_command): New function.
7037         (_initialize_sparc64_adi_tdep): New function.
7038
7039 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7040
7041         * breakpoint.c (breakpoints_info): Rename to ...
7042         (info_breakpoints_command): ... this.
7043         (watchpoints_info): Rename to ...
7044         (info_watchpoints_command): ... this.
7045         (tracepoints_info): Rename to ...
7046         (info_tracepoints_command): ... this.
7047         (_initialize_breakpoint): Adjust.
7048         * dcache.c (dcache_info): Rename to ...
7049         (info_display_command): ... this.
7050         (_initialize_dcache): Adjust.
7051         * frame.h (args_info): Rename to ...
7052         (info_args_command): ... this.
7053         (locals_info): Rename to ...
7054         (info_locals_command): ... this.
7055         * infcmd.c (nofp_registers_info): Rename to ...
7056         (info_registers_command): ... this.
7057         (float_info): Rename to ...
7058         (info_float_command): ... this.
7059         (program_info): Rename to ...
7060         (info_program_command): ... this.
7061         (all_registers_info): Rename to ...
7062         (info_all_registers_command): ... this.
7063         (vector_info): Rename to ...
7064         (info_vector_command): ... this.
7065         (float_info): Rename to ...
7066         (info_float_command): ... this.
7067         (_initialize_infcmd): Adjust.
7068         * inferior.h (term_info): Rename to ...
7069         (info_terminal_command): ... this.
7070         * inflow.c (term_info): Rename to ...
7071         (info_terminal_command): ... this.
7072         (_initialize_inflow): Adjust.
7073         * infrun.c (signals_info): Rename to ...
7074         (info_signals_command): ... this.
7075         (_initialize_infrun): Adjust.
7076         * objc-lang.c (classes_info): Rename to ...
7077         (info_classes_command): ... this.
7078         (selectors_info): Rename to ...
7079         (info_selectors_command): ... this.
7080         (_initialize_objc_language): Adjust.
7081         * printcmd.c (sym_info): Rename to ...
7082         (info_symbol_command): ... this.
7083         (address_info): Rename to ...
7084         (info_address_command): ... this.
7085         (display_info): Rename to ...
7086         (info_display_command): ... this.
7087         (_initialize_printcmd): Adjust.
7088         * reverse.c (bookmarks_info): Rename to ...
7089         (info_breakpoints_command): ... this.
7090         (_initialize_reverse): Adjust.
7091         * ser-go32.c (dos_info): Rename to ...
7092         (info_serial_command): ... this.
7093         (_initialize_ser_dos): Adjust.
7094         * skip.c (skip_info): Rename to ...
7095         (info_skip_command): ... this.
7096         (_initialize_step_skip): Adjust.
7097         * source.c (line_info): Rename to ...
7098         (info_line_command): ... this.
7099         (source_info): Rename to ...
7100         (info_source_command)
7101         * stack.c (frame_info): Rename to ...
7102         (info_frame_command): ... this.
7103         (locals_info): Rename to ...
7104         (info_locals_command): ... this.
7105         (args_info): Rename to ...
7106         (info_args_command): ... this.
7107         (_initialize_stack): Adjust.
7108         * symtab.c (sources_info): Rename to ...
7109         (info_sources_command): ... this.
7110         (variables_info): Rename to ...
7111         (info_variables_command): ... this.
7112         (functions_info): Rename to ...
7113         (info_functions_command): ... this.
7114         (types_info): Rename to ...
7115         (info_types_command): ... this.
7116         (_initialize_symtab): Adjust.
7117         * target.c (target_info): Rename to ...
7118         (info_target_command): ... this.
7119         (initialize_targets): Adjust.
7120         * tracepoint.c (tvariables_info): Rename to ...
7121         (info_tvariables_command): ... this.
7122         (scope_info): Rename to ...
7123         (info_scope_command): ... this.
7124         (trace_dump_actions): Adjust.
7125         (_initialize_tracepoint): Adjust.
7126
7127 2017-08-22  Tom Tromey  <tom@tromey.com>
7128
7129         * breakpoint.h (install_breakpoint): Update.
7130         * breakpoint.c (add_solib_catchpoint): Update.
7131         (install_breakpoint): Change argument to a std::unique_ptr.
7132         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7133         (create_breakpoint_sal, create_breakpoint): Update.
7134         (watch_command_1, catch_exec_command_1)
7135         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7136         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7137         Return the breakpoint.
7138         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7139         (new_single_step_breakpoint): Update.
7140         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7141         std::unique_ptr.
7142         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7143         std::unique_ptr.
7144         * break-catch-sig.c (create_signal_catchpoint): Use
7145         std::unique_ptr.
7146         * ada-lang.c (create_ada_exception_catchpoint): Use
7147         std::unique_ptr.
7148
7149 2017-08-22  Tom Tromey  <tom@tromey.com>
7150
7151         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7152
7153 2017-08-22  Tom Tromey  <tom@tromey.com>
7154
7155         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7156         (lookup_partial_symbol): Update.
7157
7158 2017-08-22  Tom Tromey  <tom@tromey.com>
7159
7160         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7161         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7162         (find_and_open_source, symtab_to_fullname): Update.
7163         * psymtab.c (psymtab_to_fullname): Update.
7164
7165 2017-08-22  Tom Tromey  <tom@tromey.com>
7166
7167         * exec.c (exec_file_attach): Update.
7168         * linux-thread-db.c (try_thread_db_load): Update.
7169         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7170         * utils.c (gdb_realpath): Change return type.
7171         (gdb_realpath_keepfile): Update.
7172         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7173         (_initialize_utils): Register the new self test.
7174         * source.c (openp): Update.
7175         (find_and_open_source): Update.
7176         * nto-tdep.c (nto_find_and_open_solib): Update.
7177         * main.c (set_gdb_data_directory): Update.
7178         (captured_main_1): Update.
7179         * dwarf2read.c (dwarf2_get_dwz_file): Update
7180         (dw2_map_symbol_filenames): Update.
7181         * auto-load.c (auto_load_safe_path_vec_update): Update.
7182         (filename_is_in_auto_load_safe_path_vec): Change type of
7183         "filename_realp".
7184         (auto_load_objfile_script): Update.
7185         (file_is_auto_load_safe): Update.  Use std::string.
7186         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7187
7188 2017-08-22  Tom Tromey  <tom@tromey.com>
7189
7190         * utils.c (gdb_realpath_keepfile): Return a
7191         gdb::unique_xmalloc_ptr.
7192         * exec.c (exec_file_attach): Update.
7193         * utils.h (gdb_realpath_keepfile): Return a
7194         gdb::unique_xmalloc_ptr.
7195
7196 2017-08-22  Tom Tromey  <tom@tromey.com>
7197
7198         * compile/compile.c (compile_file_command): Use
7199         gdb::unique_xmalloc_ptr, std::string.
7200         * utils.c (gdb_abspath): Change return type.
7201         * source.c (openp): Update.
7202         * objfiles.c (allocate_objfile): Update.
7203         * main.c (set_gdb_data_directory): Update.
7204         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7205
7206 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7207
7208         * cli-cmds.c (list_commands): List actual code around more than
7209         one location.
7210
7211 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7212
7213         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7214
7215 2017-08-21  Pedro Alves  <palves@redhat.com>
7216
7217         PR gdb/19487
7218         * c-exp.y (variable production): Handle function aliases.
7219         * minsyms.c (msymbol_is_text): New function.
7220         * minsyms.h (msymbol_is_text): Declare.
7221         * symtab.c (find_function_alias_target): New function.
7222         * symtab.h (find_function_alias_target): Declare.
7223
7224 2017-08-21  Pedro Alves  <palves@redhat.com>
7225
7226         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7227         typedefs.
7228         * typeprint.c (whatis_exp): If handling "whatis", and expression
7229         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7230         typedefs here.
7231         * valops.c (value_cast): Save "to" type before resolving
7232         stubs/typedefs.  Use that type as resulting value's type.
7233
7234 2017-08-18  Tom Tromey  <tom@tromey.com>
7235             Pedro Alves  <palves@redhat.com>
7236
7237         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7238         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7239         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7240         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7241         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7242         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7243         (linux_get_siginfo_data): Add "thread" argument.  Use
7244         scoped_restore.
7245         * linux-nat.c (linux_child_follow_fork)
7246         (check_stopped_by_watchpoint): Use scoped_restore.
7247         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7248         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7249         (restore_inferior_ptid, save_inferior_ptid): Remove.
7250         * btrace.c (btrace_fetch): Use scoped_restore.
7251         * bsd-uthread.c (bsd_uthread_fetch_registers)
7252         (bsd_uthread_store_registers): Use scoped_restore.
7253         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7254         scoped_restore.
7255         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7256         (aix_thread_xfer_partial): Use scoped_restore.
7257         * inferior.h (save_inferior_ptid): Remove.
7258
7259 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7260
7261         PR tdep/21818
7262         * arm-tdep.c (gdb_print_insn_arm): Mark
7263         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7264
7265 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7266
7267         * NEWS: Mention GDBserver's new option "--selftest".
7268         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7269         * selftest.c: Move it to common/selftest.c.
7270         * selftest.h: Move it to common/selftest.h.
7271         * selftest-arch.c (reset): New function.
7272         (tests_with_arch): Call reset.
7273
7274 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7275
7276         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7277         instead of exception_fprintf and printf_filtered.
7278
7279 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7280
7281         * selftest.c (register_self_test): Rename it to
7282         selftests::register_test.
7283         (run_self_tests): selftest::run_tests.
7284         * selftest.h: Update declarations.
7285         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7286         selftests::register_test_foreach_arch.
7287         * selftest-arch.h: Update declaration.
7288         * aarch64-tdep.c: Update.
7289         * arm-tdep.c: Likewise.
7290         * disasm-selftests.c: Likewise.
7291         * dwarf2loc.c: Likewise.
7292         * dwarf2-frame.c: Likewise.
7293         * findvar.c: Likewise.
7294         * gdbarch-selftests.c: Likewise.
7295         * maint.c (maintenance_selftest): Likewise.
7296         * regcache.c: Likewise.
7297         * rust-exp.y: Likewise.
7298         * selftest-arch.c: Likewise.
7299         * unittests/environ-selftests.c: Likewise.
7300         * unittests/function-view-selftests.c: Likewise.
7301         * unittests/offset-type-selftests.c: Likewise.
7302         * unittests/optional-selftests.c: Likewise.
7303         * unittests/scoped_restore-selftests.c: Likewise.
7304         * utils-selftests.c: Likewise.
7305
7306 2017-08-17  Pedro Alves  <palves@redhat.com>
7307
7308         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7309         local.
7310
7311 2017-08-17  Pedro Alves  <palves@redhat.com>
7312
7313         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7314         field.
7315         (reset_die_in_process): Delete, replaced by ...
7316         (process_die_scope): ... this new class.  Make it responsible for
7317         freeing cu->line_header too.
7318         (process_die): Use process_die_scope.
7319         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7320         cu->line_header_die_owner.  Don't release the line header if it's
7321         owned by the CU.
7322         (setup_type_unit_groups): Make the CU/DIE own the line header.
7323         Don't release the line header here.
7324
7325 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7326
7327         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7328
7329 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7330
7331         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7332         Single-Key mode
7333
7334 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7335
7336         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7337         mode command list.
7338
7339 2017-08-15  Stafford Horne  <shorne@gmail.com>
7340
7341         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7342
7343 2017-08-15  Stafford Horne  <shorne@gmail.com>
7344
7345         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7346
7347 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7348
7349         PR gdb/21954
7350         * infcmd.c (unset_environment_command): Use the 'clear' method on
7351         the environment instead of resetting it.
7352
7353 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7354
7355         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7356         platforms.
7357
7358 2017-08-14  Tom Tromey  <tom@tromey.com>
7359
7360         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7361         (print_binary_chars): Likewise.
7362         (BITS_IN_BYTES): Remove.
7363
7364 2017-08-14  Tom Tromey  <tom@tromey.com>
7365
7366         PR gdb/21675
7367         * valprint.c (LOW_ZERO): Change value to 034.
7368         (print_octal_chars): Add static_asserts for octal constants.
7369         * printcmd.c (print_scalar_formatted): Add 'd' case.
7370
7371 2017-08-11  Tom Tromey  <tom@tromey.com>
7372
7373         * symfile.c (add_symbol_file_command): Use std::vector.
7374
7375 2017-08-14  Tom Tromey  <tom@tromey.com>
7376
7377         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7378         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7379         std::move.
7380         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7381
7382 2017-08-11  Pedro Alves  <palves@redhat.com>
7383
7384         * infrun.c (process_event_stop_test): Adjust
7385         function_name_is_marked_for_skip call.
7386         * skip.c: Include <list>.
7387         (skiplist_entry): Make it a class with private fields, and
7388         getters/setters.
7389         (skiplist_entry_chain): Delete.
7390         (skiplist_entries): New.
7391         (skiplist_entry_count): Delete.
7392         (highest_skiplist_entry_num): New.
7393         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7394         (add_skiplist_entry): Delete.
7395         (skiplist_entry::skiplist_entry): New.
7396         (skiplist_entry::add_entry): New.
7397         (skip_file_command, skip_function): Adjust.
7398         (compile_skip_regexp): Delete.
7399         (skip_command): Don't compile regexp here.  Adjust to use
7400         skiplist_entry::add_entry.
7401         (skip_info): Adjust to use range-for and getters.
7402         (skip_enable_command, skip_disable_command): Adjust to use
7403         range-for and setters.
7404         (skip_delete_command): Adjust to use std::list.
7405         (add_skiplist_entry): Delete.
7406         (skip_file_p): Delete, refactored as ...
7407         (skiplist_entry::do_skip_file_p): ... this new method.
7408         (skip_gfile_p): Delete, refactored as ...
7409         (skiplist_entry::do_gskip_file_p): ... this new method.
7410         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7411         (skiplist_entry::skip_function_p): ... this new method.
7412         (function_name_is_marked_for_skip): Now returns bool, and takes
7413         the function sal by const reference.  Adjust to use range-for and
7414         skiplist_entry methods.
7415         (_initialize_step_skip): Remove references to
7416         skiplist_entry_chain, skiplist_entry_count.
7417         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7418         takes the function sal by const reference.
7419
7420 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7421
7422         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7423         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7424         (dwarf2_frame_cache):
7425         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7426         RETURN_MASK_ALL and set *this_case to NULL.
7427         * frame-unwind.h: Update comments.
7428
7429 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7430
7431         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7432         (dwarf2_frame_state_copy_regs): Remove.
7433         (dwarf2_frame_state_free_regs): Remove.
7434         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7435         (dwarf2_restore_rule): Call method .alloc_regs instead of
7436         dwarf2_frame_state_alloc_regs.
7437         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7438         constructor.  Call std::move.
7439         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7440         (dwarf2_frame_cache): Likewise.
7441
7442         [GDB_SELF_TEST]: Include selftest.h and
7443         selftest-arch.h.
7444         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7445         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7446         execute_cfa_program_test.
7447
7448         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7449         copy ctor, assignment operator, move assignment.
7450         <alloc_regs>: New method.
7451         <swap>: New method.
7452         (struct dwarf2_frame_state): Delete dtor.
7453         (dwarf2_frame_state_alloc_regs): Remove declaration.
7454         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7455         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7456
7457 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7458
7459         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7460         (dwarf2_frame_state::dwarf2_frame_state): New.
7461         (dwarf2_frame_state::~dwarf2_frame_state): New.
7462         (dwarf2_fetch_cfa_info): Update.
7463         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7464         rather than a pointer.  Update code.
7465         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7466         dtor.
7467         <data_align, code_align, retaddr_column>: Change them to const.
7468         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7469         to bool.
7470
7471 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7472
7473         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7474         <loc.exp>: New field.
7475         * dwarf2-frame.c (execute_cfa_program): Update.
7476         (dwarf2_frame_prev_register): Update.
7477
7478 2017-08-10  Pedro Alves  <palves@redhat.com>
7479
7480         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7481
7482 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7483
7484         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7485         (fbsd_pending_children): Use std::list.
7486         (fbsd_remember_child): Likewise.
7487         (fbsd_is_child_pending): Likewise.
7488         (fbsd_pending_vfork_done): Use std::forward_list.
7489         (fbsd_add_vfork_done): Likewise.
7490         (fbsd_is_vfork_done_pending): Likewise.
7491         (fbsd_next_vfork_done): Likewise.
7492
7493 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7494
7495         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7496         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7497         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7498         for `mapfilename'.
7499         (fbsd_xfer_partial): Use gdb::byte_vector.
7500         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7501
7502 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7503
7504         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7505         "filestuff.h".
7506         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7507
7508 2017-08-09  Tom Tromey  <tom@tromey.com>
7509
7510         * skip.c (skiplist_entry): New constructor.
7511         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7512         (skiplist_entry::file_is_glob): Now bool.
7513         (skiplist_entry::file, skiplist_entry::function): Now
7514         std::string.
7515         (make_skip_entry): Return a unique_ptr.  Use new.
7516         (free_skiplist_entry, free_skiplist_entry_cleanup)
7517         (make_free_skiplist_entry_cleanup): Remove.
7518         (skip_command, skip_disable_command, add_skiplist_entry)
7519         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7520         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7521         (function_name_is_marked_for_skip): Update.
7522         (skip_delete_command): Update.  Use delete.
7523
7524 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7525
7526         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7527         (aarch64_linux_core_read_description): New function.
7528         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7529
7530 2017-08-09  Pedro Alves  <palves@redhat.com>
7531
7532         * cp-name-parser.y (cp_comp_to_string): Return a
7533         gdb::unique_xmalloc_ptr<char>.
7534         * cp-support.c (replace_typedefs_qualified_name)
7535         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7536         (cp_canonicalize_string_full): Use op= instead of explicit
7537         convertion.
7538         (cp_class_name_from_physname, method_name_from_physname)
7539         (cp_func_name, cp_remove_params): Adjust to use
7540         gdb::unique_xmalloc_ptr<char>.
7541         * cp-support.h (cp_comp_to_string): Return a
7542         gdb::unique_xmalloc_ptr<char>.
7543         * python/py-type.c (typy_lookup_type): Adjust to use
7544         gdb::unique_xmalloc_ptr<char>.
7545
7546 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7547
7548         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7549
7550 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7551             Yao Qi  <yao.qi@linaro.org>
7552
7553         * cp-support.c (cp_canonicalize_string_full): Use
7554         gdb::unique_xmalloc_ptr<char>.
7555         (cp_canonicalize_string): Likewise.
7556
7557 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7558
7559         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7560         * regformats/i386/amd64-avx-avx512.dat: Remove.
7561         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7562         * regformats/i386/amd64-avx-mpx.dat:Remove.
7563         * regformats/i386/amd64-avx.dat: Remove.
7564         * regformats/i386/amd64-mpx.dat: Remove.
7565         * regformats/i386/i386-avx-avx512.dat: Remove.
7566         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7567         * regformats/i386/i386-avx-mpx.dat: Remove.
7568         * regformats/i386/i386-mmx.dat: Remove.
7569         * regformats/i386/i386-mpx.dat: Remove.
7570
7571 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7572
7573         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7574         * amd64-tdep.c: Don't include features/i386/x32*.c.
7575         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7576         functions.
7577         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7578         and i386/x32-avx-avx512.
7579         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7580         and i386/x32.xml.
7581         * features/i386/x32-avx-avx512.c: Removed.
7582         * features/i386/x32-avx-avx512.xml: Removed.
7583         * features/i386/x32-avx.c: Removed.
7584         * features/i386/x32-avx.xml: Removed.
7585         * features/i386/x32.c: Removed.
7586         * features/i386/x32.xml: Removed.
7587         * regformats/i386/x32-avx-avx512.dat: Removed.
7588         * regformats/i386/x32-avx.dat: Removed.
7589         * regformats/i386/x32.dat: Removed.
7590
7591 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7592
7593         PR breakpoints/21886
7594         * mem-break.c (default_memory_insert_breakpoint): Use
7595         `->placed_address' rather than `->reqstd_address' for the
7596         breakpoint location.
7597
7598 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7599
7600         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7601         assertions.
7602
7603 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7604
7605         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7606         a union of `tdep_info', `tdesc_data' and `id'.
7607         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7608         rather than `info.tdep_info'.
7609         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7610         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7611         * i386-tdep.c (i386_gdbarch_init): Likewise.
7612         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7613         * mips-tdep.c (mips_gdbarch_init): Likewise.
7614         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7615         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7616         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7617         `info.tdep_info'.
7618         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7619         `info.tdep_info'.
7620         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7621         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7622         `info.tdep_info'.
7623         * spu-tdep.c (spu_gdbarch_init): Likewise.
7624         * gdbarch.h: Regenerate.
7625
7626 2017-08-07  Leszek Swirski  <leszeks@google.com>
7627
7628         PR symtab/20899
7629         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7630
7631 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7632
7633         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7634         (gdbsim_open): Rename gdb_argv args object to argv.
7635
7636 2017-08-05  Tom Tromey  <tom@tromey.com>
7637
7638         * compile/compile-object-load.c (compile_object_load): Use
7639         gdb::unique_xmalloc_ptr.
7640         * cli/cli-dump.c (scan_filename): Rename from
7641         scan_filename_with_cleanup.  Change return type.
7642         (scan_expression): Rename from scan_expression_with_cleanup.
7643         Change return type.
7644         (dump_memory_to_file, dump_value_to_file, restore_command):
7645         Use gdb::unique_xmalloc_ptr.  Update.
7646         * cli/cli-cmds.c (find_and_open_script): Use
7647         gdb::unique_xmalloc_ptr.
7648         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7649         * symmisc.c (maintenance_print_symbols)
7650         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7651         * symfile.c (symfile_bfd_open, generic_load)
7652         (add_symbol_file_command, remove_symbol_file_command): Use
7653         gdb::unique_xmalloc_ptr.
7654         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7655         * psymtab.c (maintenance_print_psymbols): Use
7656         gdb::unique_xmalloc_ptr.
7657         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7658         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7659         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7660         (reload_shared_libraries_1): Likewise.
7661
7662 2017-08-05  Tom Tromey  <tom@tromey.com>
7663
7664         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7665         (rust_op_vector, rust_set_vector): New typedefs.
7666         (current_parser): New global.
7667         (work_obstack): Change to pointer type.  Update all users.
7668         (rust_ast, pstate): Remove globals.
7669         (struct rust_parser): New.
7670         (%union) <params, field_inits>: Change type.
7671         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7672         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7673         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7674         (convert_params_to_types, convert_params_to_expression): Change
7675         type of "params".
7676         (ast_string): Change type of "fields".
7677         (rust_parse): Make a rust_parser.  Remove cleanups.
7678         (rust_lex_tests): Make and install an auto_obstack.
7679
7680 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7681
7682         * configure.srv (ipa_x32_linux_regobj): New.
7683         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7684         instead of X86_TDESC_AVX512.
7685         (initialize_low_tracepoint): Call
7686         init_registers_x32_avx_avx512_linux.
7687
7688 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7689
7690         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7691
7692 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7693
7694         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7695
7696 2017-08-03  Tom Tromey  <tom@tromey.com>
7697
7698         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7699         Remove.
7700         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7701
7702 2017-08-03  Tom Tromey  <tom@tromey.com>
7703
7704         * python/py-param.c (compute_enum_values): Use gdb_argv.
7705
7706 2017-08-03  Tom Tromey  <tom@tromey.com>
7707
7708         * utils.h (struct gdb_argv_deleter): New.
7709         (gdb_argv): New class.
7710         * utils.c (gdb_argv::reset): New method.
7711         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7712         * tracefile.c (tsave_command): Use gdb_argv.
7713         * top.c (new_ui_command): Use gdb_argv.
7714         * symmisc.c (maintenance_print_symbols)
7715         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7716         * symfile.c (symbol_file_command, generic_load)
7717         (remove_symbol_file_command): Use gdb_argv.
7718         * stack.c (backtrace_command): Use gdb_argv.
7719         * source.c (add_path, show_substitute_path_command)
7720         (unset_substitute_path_command, set_substitute_path_command):
7721         Use gdb_argv.
7722         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7723         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7724         * remote.c (extended_remote_run, remote_put_command)
7725         (remote_get_command, remote_delete_command): Use gdb_argv.
7726         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7727         (gdbsim_open): Use gdb_argv.
7728         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7729         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7730         * procfs.c (procfs_info_proc): Use gdb_argv.
7731         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7732         * infrun.c (handle_command): Use gdb_argv.
7733         * inferior.c (add_inferior_command, clone_inferior_command):
7734         Use gdb_argv.
7735         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7736         * exec.c (exec_file_command): Use gdb_argv.
7737         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7738         * compile/compile.c (build_argc_argv): Use gdb_argv.
7739
7740 2017-08-03  Tom Tromey  <tom@tromey.com>
7741
7742         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7743
7744 2017-08-03  Tom Tromey  <tom@tromey.com>
7745
7746         * python/python.c (compute_python_string): Return std::string.
7747         (gdbpy_eval_from_control_command): Update.
7748         (do_start_initialization): Use std::string.
7749         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7750         xstrprintf.
7751         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7752         xstrprintf.
7753
7754 2017-08-03  Tom Tromey  <tom@tromey.com>
7755
7756         * top.h (do_restore_instream_cleanup): Remove.
7757         * top.c (do_restore_instream_cleanup): Remove.
7758         (read_command_file): Use scoped_restore.
7759         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7760
7761 2017-08-03  Tom Tromey  <tom@tromey.com>
7762
7763         * cli/cli-script.c (execute_user_command)
7764         (execute_control_command): Use scoped_restore.
7765
7766 2017-08-03  Tom Tromey  <tom@tromey.com>
7767
7768         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7769         (execute_user_command): Remove user_call_depth; use
7770         user_args_stack's size instead.
7771
7772 2017-08-03  Tom Tromey  <tom@tromey.com>
7773
7774         * top.h (in_user_command): Remove.
7775         * top.c (in_user_command): Remove.
7776         * cli/cli-script.c (do_restore_user_call_depth)
7777         (execute_user_command): Update.
7778
7779 2017-08-03  Tom Tromey  <tom@tromey.com>
7780
7781         * valops.c (search_struct_method): Use gdb::byte_vector.
7782         * valarith.c (value_concat): Use std::vector.
7783         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7784         (simple_search_memory): Likewise.
7785         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7786         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7787         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7788         * elfread.c (elf_rel_plt_read): Use std::string.
7789         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7790         * cli/cli-dump.c (restore_section_callback): Use
7791         gdb::byte_vector.
7792
7793 2017-08-03  Tom Tromey  <tom@tromey.com>
7794
7795         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7796
7797 2017-08-03  Tom Tromey  <tom@tromey.com>
7798
7799         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7800         (tui_register_format): Use scoped_restore.
7801
7802 2017-08-03  Tom Tromey  <tom@tromey.com>
7803
7804         * reverse.c (exec_direction_default): Remove.
7805         (exec_reverse_once): Use scoped_restore.
7806         * remote.c (restore_remote_timeout): Remove.
7807         (remote_flash_erase, remote_flash_write, remote_flash_done)
7808         (readchar, remote_serial_write): Use scoped_restore.
7809         * cli/cli-script.c (struct source_cleanup_lines_args)
7810         (source_cleanup_lines): Remove.
7811         (script_from_file): Use scoped_restore.
7812         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7813         (source_command): Use scoped_restore.
7814
7815 2017-08-03  Tom Tromey  <tom@tromey.com>
7816
7817         * utils.h (make_cleanup_free_so): Remove.
7818         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7819         * solist.h (struct so_deleter): New.
7820         (so_list_up): New typedef.
7821         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7822
7823 2017-08-03  Tom Tromey  <tom@tromey.com>
7824
7825         * utils.h (make_cleanup_restore_current_language): Remove.
7826         * utils.c (do_restore_current_language)
7827         (make_cleanup_restore_current_language): Remove.
7828         * parse.c (parse_exp_in_context_1)
7829         (parse_expression_with_language): Use
7830         scoped_restore_current_language.
7831         * mi/mi-main.c (mi_cmd_execute): Use
7832         scoped_restore_current_language.
7833         * language.h (scoped_restore_current_language): New class.
7834
7835 2017-08-03  Tom Tromey  <tom@tromey.com>
7836
7837         * compile/compile.c (cleanup_unlink_file): Remove.
7838         (compile_to_object): Use gdb::unlinker.
7839         (eval_compile_command): Likewise.
7840
7841 2017-08-03  Tom Tromey  <tom@tromey.com>
7842
7843         * utils.h (make_cleanup_fclose): Remove.
7844         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7845
7846 2017-08-03  Tom Tromey  <tom@tromey.com>
7847
7848         * top.c (open_terminal_stream): Return gdb_file_up.
7849         (new_ui_command): Update.
7850
7851 2017-08-03  Tom Tromey  <tom@tromey.com>
7852
7853         * source.c (print_source_lines_base, forward_search_command)
7854         (reverse_search_command): Use gdb_file_up.
7855
7856 2017-08-03  Tom Tromey  <tom@tromey.com>
7857
7858         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7859
7860 2017-08-03  Tom Tromey  <tom@tromey.com>
7861
7862         * cli/cli-cmds.c (find_and_open_script): Change return type.
7863         Remove "streamp" and "full_path" parameters.
7864         (source_script_with_search): Update.
7865         * auto-load.c (source_script_file): Update.
7866         * cli/cli-cmds.h (find_and_open_script): Change type.
7867         (open_script): New struct.
7868
7869 2017-08-03  Tom Tromey  <tom@tromey.com>
7870
7871         * xml-support.c (xml_fetch_content_from_file): Update.
7872         * ui-file.c (stdio_file::open): Update.
7873         * tracefile-tfile.c (tfile_start): Update.
7874         * remote.c (remote_file_put, remote_file_get): Update.
7875         * nat/linux-procfs.c (linux_proc_get_int)
7876         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7877         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7878         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7879         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7880         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7881         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7882         * linux-nat.c (linux_proc_pending_signals): Update.
7883         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7884         (file_closer): Remove.
7885         * compile/compile.c (compile_to_object): Update.
7886         * common/filestuff.h (struct gdb_file_deleter): New.
7887         (gdb_file_up): New typedef.
7888         (gdb_fopen_cloexec): Change return type.
7889         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7890         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7891         (dump_binary_file, restore_binary_file): Update.
7892         * auto-load.c (auto_load_objfile_script_1): Update.
7893
7894 2017-08-03  Tom Tromey  <tom@tromey.com>
7895
7896         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7897         (info_static_tracepoint_markers_command): Likewise.
7898         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7899         * skip.c (skip_info): Use ui_out_emit_table.
7900         * progspace.c (print_program_space): Use ui_out_emit_table.
7901         * osdata.c (info_osdata): Use ui_out_emit_table.
7902         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7903         ui_out_emit_table.
7904         * linux-thread-db.c (info_auto_load_libthread_db): Use
7905         ui_out_emit_table.
7906         * inferior.c (print_inferior): Use ui_out_emit_table.
7907         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7908         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7909         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7910         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7911         * ui-out.h (class ui_out_emit_table): New.
7912
7913 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7914
7915         * mips-tdep.c (mips_fpu_type_str): New function.
7916         (mips_dump_tdep): Call it.
7917
7918 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7919
7920         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7921         `->mips_fpu_type'.
7922
7923 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7924
7925         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7926
7927 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7928
7929         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7930
7931 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7932
7933         * cli/cli-cmds.c (maintenancechecklist): New variable.
7934         * gdbcmd.h (maintenancechecklist): Declare it.
7935         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7936         Call i386_linux_read_description with different masks.
7937         * maint.c (maintenance_check_command): New function.
7938         (_initialize_maint_cmds): Call add_prefix_cmd.
7939         * target-descriptions.c (tdesc_reg): override operator != and ==.
7940         (tdesc_type): Likewise.
7941         (tdesc_feature): Likewise.
7942         (target_desc): Likewise.
7943         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7944         (maintenance_check_xml_descriptions): New function.
7945         (_initialize_target_descriptions) Add command "xml-descriptions".
7946         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7947
7948 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7949
7950         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7951         Include features/i386/32bit-*.c.
7952         (i386_linux_read_description): Generate target description if it
7953         doesn't exist.
7954         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7955         functions.
7956         * features/i386/32bit-linux.c: Re-generated.
7957         * features/i386/32bit-sse.c: Likewise.
7958         * target-descriptions.c (print_c_feature::visit): Print code to
7959         set register number if needed.
7960         (print_c_feature) <m_next_regnum>: New field.
7961
7962 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7963
7964         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7965         (FEATURE_XMLFILES): New.
7966         (FEATURE_CFILES): New.
7967         New rules.
7968         (clean-cfiles): Remove generated c files.
7969         * features/i386/32bit-avx.c: Generated.
7970         * features/i386/32bit-avx512.c: Generated.
7971         * features/i386/32bit-core.c: Generated.
7972         * features/i386/32bit-linux.c: Generated.
7973         * features/i386/32bit-mpx.c: Generated.
7974         * features/i386/32bit-pkeys.c: Generated.
7975         * features/i386/32bit-sse.c: Generated.
7976         * target-descriptions.c: Include algorithm.
7977         (tdesc_element_visitor): Add method visit_end.
7978         (print_c_tdesc): Implement visit_end.
7979         (print_c_tdesc:: m_filename_after_features): Move it to
7980         protected.
7981         (print_c_feature): New class.
7982         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7983         name starts with "i386/32bit-".
7984
7985 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7986
7987         * target-descriptions.c (tdesc_element_visitor): New class.
7988         (tdesc_element): New class.
7989         (tdesc_reg): Inherit from tdesc_element.
7990         (tdesc_reg::accept): New function.
7991         (tdesc_type): Inherit from tdesc_element.
7992         (tdesc_type::accept): New function.
7993         (tdesc_feature): Inherit from tdesc_element.
7994         (tdesc_feature::accept): New function.
7995         (target_desc): Inherit from tdesc_element.
7996         (target_desc::target_desc): New.
7997         (target_desc::~target_desc): New.
7998         (target_desc::accept): New.
7999         (allocate_target_description): Use new.
8000         (free_target_description): Use delete.
8001         (print_c_tdesc): New class.
8002         (maint_print_c_tdesc_cmd): Adjust.
8003
8004         * features/aarch64.c: Re-generated.
8005         * features/arc-arcompact.c: Re-generated.
8006         * features/arc-v2.c: Re-generated.
8007         * features/arm/arm-with-iwmmxt.c: Re-generated.
8008         * features/arm/arm-with-m.c: Re-generated.
8009         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8010         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8011         * features/arm/arm-with-neon.c: Re-generated.
8012         * features/arm/arm-with-vfpv2.c: Re-generated.
8013         * features/arm/arm-with-vfpv3.c: Re-generated.
8014         * features/i386/amd64-avx-avx512.c: Re-generated.
8015         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8016         * features/i386/amd64-avx.c: Re-generated.
8017         * features/i386/amd64-avx-linux.c: Re-generated.
8018         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8019         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8020         * features/i386/amd64-avx-mpx.c: Re-generated.
8021         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8022         * features/i386/amd64.c: Re-generated.
8023         * features/i386/amd64-linux.c: Re-generated.
8024         * features/i386/amd64-mpx.c: Re-generated.
8025         * features/i386/amd64-mpx-linux.c: Re-generated.
8026         * features/i386/i386-avx-avx512.c: Re-generated.
8027         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8028         * features/i386/i386-avx.c: Re-generated.
8029         * features/i386/i386-avx-linux.c: Re-generated.
8030         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8031         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8032         * features/i386/i386-avx-mpx.c: Re-generated.
8033         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8034         * features/i386/i386.c: Re-generated.
8035         * features/i386/i386-linux.c: Re-generated.
8036         * features/i386/i386-mmx.c: Re-generated.
8037         * features/i386/i386-mmx-linux.c: Re-generated.
8038         * features/i386/i386-mpx.c: Re-generated.
8039         * features/i386/i386-mpx-linux.c: Re-generated.
8040         * features/i386/x32-avx-avx512.c: Re-generated.
8041         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8042         * features/i386/x32-avx.c: Re-generated.
8043         * features/i386/x32-avx-linux.c: Re-generated.
8044         * features/i386/x32.c: Re-generated.
8045         * features/i386/x32-linux.c: Re-generated.
8046         * features/microblaze.c: Re-generated.
8047         * features/microblaze-with-stack-protect.c: Re-generated.
8048         * features/mips64-dsp-linux.c: Re-generated.
8049         * features/mips64-linux.c: Re-generated.
8050         * features/mips-dsp-linux.c: Re-generated.
8051         * features/mips-linux.c: Re-generated.
8052         * features/nds32.c: Re-generated.
8053         * features/nios2.c: Re-generated.
8054         * features/nios2-linux.c: Re-generated.
8055         * features/rs6000/powerpc-32.c: Re-generated.
8056         * features/rs6000/powerpc-32l.c: Re-generated.
8057         * features/rs6000/powerpc-403.c: Re-generated.
8058         * features/rs6000/powerpc-403gc.c : Re-generated.
8059         * features/rs6000/powerpc-405.c: Re-generated.
8060         * features/rs6000/powerpc-505.c: Re-generated.
8061         * features/rs6000/powerpc-601.c: Re-generated.
8062         * features/rs6000/powerpc-602.c: Re-generated.
8063         * features/rs6000/powerpc-603.c: Re-generated.
8064         * features/rs6000/powerpc-604.c: Re-generated.
8065         * features/rs6000/powerpc-64.c: Re-generated.
8066         * features/rs6000/powerpc-64l.c: Re-generated.
8067         * features/rs6000/powerpc-7400.c: Re-generated.
8068         * features/rs6000/powerpc-750.c: Re-generated.
8069         * features/rs6000/powerpc-860.c: Re-generated.
8070         * features/rs6000/powerpc-altivec32.c: Re-generated.
8071         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8072         * features/rs6000/powerpc-altivec64.c: Re-generated.
8073         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8074         * features/rs6000/powerpc-cell32l.c: Re-generated.
8075         * features/rs6000/powerpc-cell64l.c: Re-generated.
8076         * features/rs6000/powerpc-e500.c: Re-generated.
8077         * features/rs6000/powerpc-e500l.c: Re-generated.
8078         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8079         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8080         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8081         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8082         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8083         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8084         * features/rs6000/powerpc-vsx32.c: Re-generated.
8085         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8086         * features/rs6000/powerpc-vsx64.c: Re-generated.
8087         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8088         * features/rs6000/rs6000.c: Re-generated.
8089         * features/s390-linux32.c: Re-generated.
8090         * features/s390-linux32v1.c: Re-generated.
8091         * features/s390-linux32v2.c: Re-generated.
8092         * features/s390-linux64.c: Re-generated.
8093         * features/s390-linux64v1.c: Re-generated.
8094         * features/s390-linux64v2.c: Re-generated.
8095         * features/s390-te-linux64.c: Re-generated.
8096         * features/s390-tevx-linux64.c: Re-generated.
8097         * features/s390-vx-linux64.c: Re-generated.
8098         * features/s390x-linux64.c: Re-generated.
8099         * features/s390x-linux64v1.c: Re-generated.
8100         * features/s390x-linux64v2.c: Re-generated.
8101         * features/s390x-te-linux64.c: Re-generated.
8102         * features/s390x-tevx-linux64.c: Re-generated.
8103         * features/s390x-vx-linux64.c: Re-generated.
8104         * features/sparc/sparc32-solaris.c: Re-generated.
8105         * features/sparc/sparc64-solaris.c: Re-generated.
8106         * features/tic6x-c62x.c: Re-generated.
8107         * features/tic6x-c62x-linux.c: Re-generated.
8108         * features/tic6x-c64x.c: Re-generated.
8109         * features/tic6x-c64x-linux.c: Re-generated.
8110         * features/tic6x-c64xp.c: Re-generated.
8111         * features/tic6x-c64xp-linux.c: Re-generated.
8112
8113 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8114
8115         * i386-linux-tdep.c (i386_linux_read_description): New function.
8116         (i386_linux_core_read_description): Call
8117         i386_linux_read_description.
8118         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8119         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8120         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8121         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8122         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8123         * x86-linux-nat.c (x86_linux_read_description): Call
8124         i386_linux_read_description.
8125
8126 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8127
8128         * NEWS: Mention it.
8129         * features/Makefile (%.c: %.xml): Pass the xml file name to
8130         command "maint print c-tdesc".
8131         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8132         name from 'arg'.
8133
8134 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8135
8136         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8137         in-class initialization.
8138         (tdesc_create_feature): Call new instead of XCNEW.
8139         (free_target_description): Ue delete.
8140
8141 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8142
8143         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8144
8145 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8146
8147         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8148         constant.
8149         (amd64_x32_init_abi): Likewise.
8150         * amd64-tdep.h (amd64_init_abi): Update declaration.
8151         (amd64_x32_init_abi): Likewise.
8152
8153 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8154
8155         PR tdep/21717
8156         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8157         condition for FPSCR.
8158         (arm_linux_store_inferior_registers): Likewise.
8159
8160 2017-07-22  Tom Tromey  <tom@tromey.com>
8161
8162         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8163         <syscalls_counts>: Now a std::vector.
8164         (get_catch_syscall_inferior_data): Use "new".
8165         (catch_syscall_inferior_data_cleanup): Use "delete".
8166         (insert_catch_syscall, remove_catch_syscall)
8167         (clear_syscall_counts): Update.
8168
8169 2017-07-22  Tom Tromey  <tom@tromey.com>
8170
8171         * break-catch-syscall.c (syscall_catchpoint)
8172         <syscalls_to_be_caught>: Now a std::vector<int>
8173         (~syscall_catchpoint): Remove.
8174         (insert_catch_syscall, remove_catch_syscall)
8175         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8176         (print_mention_catch_syscall, print_recreate_catch_syscall):
8177         Update.
8178         (create_syscall_event_catchpoint): Change type of "filter"
8179         parameter.
8180         (catch_syscall_split_args): Return a std::vector.
8181         (catch_syscall_command_1, catching_syscall_number_1): Update.
8182
8183 2017-07-22  Tom Tromey  <tom@tromey.com>
8184
8185         * break-catch-throw.c (struct exception_catchpoint)
8186         <exception_rx>: Now a std::string.
8187         (~exception_catchpoint): Remove.
8188         (print_one_detail_exception_catchpoint): Update.
8189         (handle_gnu_v3_exceptions): Change type of except_rx.
8190         (extract_exception_regexp): Return a std::string.
8191         (catch_exception_command_1): Update.
8192
8193 2017-07-22  Tom Tromey  <tom@tromey.com>
8194
8195         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8196         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8197         std::vector.
8198         <catch_all>: Now a bool.
8199         (~signal_catchpoint): Remove.
8200         (signal_catchpoint_insert_location)
8201         (signal_catchpoint_remove_location)
8202         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8203         (signal_catchpoint_print_mention)
8204         (signal_catchpoint_print_recreate)
8205         (signal_catchpoint_explains_signal): Update.
8206         (create_signal_catchpoint): Change type of "filter" and
8207         "catch_all".
8208         (catch_signal_split_args): Return a std::vector.  Change type of
8209         "catch_all".
8210         (catch_signal_command): Update.
8211
8212 2017-07-20  Pedro Alves  <palves@redhat.com>
8213
8214         * ada-lang.c (ada_language_defn): Make extern.
8215         (_initialize_ada_language): Remove add_language call.
8216         * c-lang.c (c_language_defn, cplus_language_defn)
8217         (asm_language_defn, minimal_language_defn): Make extern.
8218         (_initialize_c_language): Delete.
8219         * completer.c (compare_cstrings): Delete, moved to utils.h.
8220         * d-lang.c (d_language_defn): Make extern.
8221         (_initialize_d_language): Remove add_language calls.
8222         * defs.h (enum language): Add comment.
8223         * f-lang.c (f_language_defn): Make extern.
8224         (_initialize_f_language): Remove add_language call.
8225         * go-lang.c (go_language_defn): Make extern.
8226         (_initialize_go_language): Remove add_language call.
8227         * language.c: Include <algorithm>.
8228         (languages): Redefine as const array.
8229         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8230         (set_language_command): Handle "local".  Use for-range loop.
8231         (set_language): Remove loop.
8232         (language_enum): Rewrite.
8233         (language_def, language_str): Remove loops.
8234         (add_language): Delete.
8235         (add_set_language_command): New, based on add_languages.
8236         (skip_language_trampoline): Adjust.
8237         (local_language_defn): Delete.
8238         (language_gdbarch_post_init): Adjust.
8239         (_initialize_language): Remove add_language calls.  Call
8240         add_set_language_command.
8241         * language.h (add_language): Delete.
8242         (auto_language_defn)
8243         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8244         (asm_language_defn, c_language_defn, cplus_language_defn)
8245         (d_language_defn, f_language_defn, go_language_defn)
8246         (m2_language_defn, objc_language_defn, opencl_language_defn)
8247         (pascal_language_defn, rust_language_defn): Declare.
8248         * m2-lang.c (m2_language_defn): Make extern.
8249         (_initialize_m2_language): Remove add_language call.
8250         * objc-lang.c (objc_language_defn): Make extern.
8251         (_initialize_objc_language): Remove add_language call.
8252         * opencl-lang.c (opencl_language_defn): Make extern.
8253         (_initialize_opencl_language): Remove add_language call.
8254         * p-lang.c (pascal_language_defn): Make extern.
8255         (_initialize_pascal_language): Delete.
8256         * rust-lang.c (rust_language_defn): Make extern.
8257         (_initialize_rust_language): Delete.
8258         * utils.h (compare_cstrings): New static inline function.
8259
8260 2017-07-20  Pedro Alves  <palves@redhat.com>
8261
8262         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8263         (get_var_value): Constify parameters.
8264         (get_int_var_value): Change prototype.
8265         (to_fixed_range_type): Adjust.
8266         * ada-lang.h (get_int_var_value): Change prototype.
8267
8268 2017-07-20  Pedro Alves  <palves@redhat.com>
8269
8270         * dwarf2read.c (dw2_lookup_symbol): Use
8271         SYMBOL_MATCHES_SEARCH_NAME.
8272         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8273
8274 2017-07-20  Pedro Alves  <palves@redhat.com>
8275
8276         * block.c (block_iter_name_step, block_iter_name_first)
8277         (block_iter_name_next): Delete.
8278         (block_lookup_symbol_primary): Adjust to use
8279         dict_iter_match_first/dict_iter_match_next.
8280         * block.h (block_iter_name_first, block_iter_name_next): Delete
8281         declarations.
8282         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8283         dict_iter_match_first/dict_iter_match_next.
8284
8285 2017-07-20  Pedro Alves  <palves@redhat.com>
8286
8287         * cp-support.c (cp_find_first_component_aux): Add missing case for
8288         end of string.
8289
8290 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8291
8292         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8293         of dwo_cu's dwo_file.
8294
8295 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8296
8297         * remote.c (store_registers_using_G): Remove one line comment.
8298
8299 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8300
8301         * regcache.c (regcache_cpy): Simplify it.
8302         (regcache::cpy_no_passthrough): Remove it.
8303         * regcache.h (cpy_no_passthrough): Remove it.
8304         (regcache_dup, regcache_cpy): Update comments.
8305
8306 2017-07-18  Pedro Alves  <palves@redhat.com>
8307
8308         * remote-sim.c (sim_command_completer): Adjust to work with a
8309         completion_tracker instead of a VEC.
8310
8311 2017-07-17  Pedro Alves  <palves@redhat.com>
8312
8313         * completer.c (complete_source_filenames): New function.
8314         (complete_address_and_linespec_locations): New function.
8315         (location_completer): Use complete_address_and_linespec_locations.
8316         (completion_tracker::build_completion_result): Honor the tracker's
8317         request to suppress append.
8318         * completer.h (completion_tracker::suppress_append_ws)
8319         (completion_tracker::set_suppress_append_ws): New methods.
8320         (completion_tracker::m_suppress_append_ws): New field.
8321         (complete_source_filenames): New declaration.
8322         * linespec.c (linespec_complete_what): New.
8323         (struct ls_parser) <complete_what, completion_word,
8324         completion_quote_char, completion_quote_end, completion_tracker>:
8325         New fields.
8326         (string_find_incomplete_keyword_at_end): New.
8327         (linespec_lexer_lex_string): Record quote char.  If in completion
8328         mode, don't throw.
8329         (linespec_lexer_consume_token): Advance the completion word point.
8330         (linespec_lexer_peek_token): Save/restore completion info.
8331         (save_stream_and_consume_token): New.
8332         (set_completion_after_number): New.
8333         (linespec_parse_basic): Set what to complete next depending on
8334         token.  Handle function and label completions specially.
8335         (parse_linespec): Disable objc shortcut in completion mode.  Set
8336         what to complete next depending on token type.  Skip keyword if in
8337         completion mode.
8338         (complete_linespec_component, linespec_complete): New.
8339         * linespec.h (linespec_complete): Declare.
8340
8341 2017-07-17  Pedro Alves  <palves@redhat.com>
8342
8343         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8344         Handle 'operator<' / 'operator<<'.
8345
8346 2017-07-17  Pedro Alves  <palves@redhat.com>
8347
8348         * completer.c (collect_explicit_location_matches): Handle
8349         MATCH_LABEL.
8350         (convert_explicit_location_to_linespec): New, factored out from
8351         ...
8352         (convert_explicit_location_to_sals): ... this.
8353         (complete_label): New.
8354         (linespec_complete_label, find_label_symbols_in_block): New.
8355         (find_label_symbols): Add completion_mode parameter and adjust to
8356         call find_label_symbols_in_block.
8357         * linespec.h (linespec_complete_label): Declare.
8358
8359 2017-07-17  Pedro Alves  <palves@redhat.com>
8360
8361         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8362         complete_symbol_mode parameter.
8363         * cli/cli-cmds.c (complete_command): Get the completion result out
8364         of the handle_brkchars tracker if used a custom word point.
8365         * completer.c: Include "linespec.h".
8366         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8367         (advance_to_expression_complete_word_point): New.
8368         (completion_tracker::completes_to_completion_word): New.
8369         (complete_files_symbols): Pass down
8370         complete_symbol_mode::EXPRESSION.
8371         (explicit_options, probe_options): New.
8372         (collect_explicit_location_matches): Complete on the
8373         explictit_loc->foo instead of word.  Use
8374         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8375         keyword and options completions.
8376         (backup_text_ptr): Delete.
8377         (skip_keyword): New.
8378         (complete_explicit_location): Remove 'word' parameter.  Add
8379         language, quoted_arg_start and quoted_arg_end parameters.
8380         Rewrite, parsing left to right.
8381         (location_completer): Rewrite.
8382         (location_completer_handle_brkchars): New function.
8383         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8384         (enum complete_line_internal_reason): Adjust comments.
8385         (completion_tracker::discard_completions): New.
8386         (completer_handle_brkchars_func_for_completer): Handle
8387         location_completer.
8388         (gdb_custom_word_point_brkchars)
8389         (gdb_org_rl_basic_quote_characters): New.
8390         (gdb_completion_word_break_characters_throw)
8391         (completion_find_completion_word): Handle trackers that use a
8392         custom word point.
8393         (completion_tracker::advance_custom_word_point_by): New.
8394         (completion_tracker::build_completion_result): Don't rely on
8395         readline appending the quote char.
8396         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8397         use a custom word point.
8398         (gdb_rl_attempted_completion_function): Restore
8399         rl_basic_quote_characters.
8400         * completer.h (class completion_tracker): Extend intro comment.
8401         (completion_tracker::set_quote_char)
8402         (completion_tracker::quote_char)
8403         (completion_tracker::set_use_custom_word_point)
8404         (completion_tracker::use_custom_word_point)
8405         (completion_tracker::custom_word_point)
8406         (completion_tracker::set_custom_word_point)
8407         (completion_tracker::advance_custom_word_point_by)
8408         (completion_tracker::completes_to_completion_word)
8409         (completion_tracker::discard_completions): New methods.
8410         (completion_tracker::m_quote_char)
8411         (completion_tracker::m_use_custom_word_point)
8412         (completion_tracker::m_custom_word_point): New fields.
8413         (advance_to_expression_complete_word_point): Declare.
8414         * f-lang.c (f_collect_symbol_completion_matches): Add
8415         complete_symbol_mode parameter.
8416         * language.h (struct language_defn)
8417         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8418         parameter.
8419         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8420         (linespec_complete_function): New function.
8421         (linespec_lexer_lex_keyword): Adjust.
8422         * linespec.h (linespec_keywords, linespec_complete_function): New
8423         declarations.
8424         * location.c (find_end_quote): New function.
8425         (explicit_location_lex_one): Add explicit_completion_info
8426         parameter.  Save quoting info.  Don't throw if being called for
8427         completion.  Don't handle Ada operators here.
8428         (is_cp_operator, skip_op_false_positives, first_of)
8429         (explicit_location_lex_one_function): New function.
8430         (string_to_explicit_location): Replace 'dont_throw' parameter with
8431         an explicit_completion_info pointer parameter.  Handle it.  Don't
8432         use explicit_location_lex_one to lex function names.  Use
8433         explicit_location_lex_one_function instead.
8434         * location.h (struct explicit_completion_info): New.
8435         (string_to_explicit_location): Replace 'dont_throw' parameter with
8436         an explicit_completion_info pointer parameter.
8437         * symtab.c (default_collect_symbol_completion_matches_break_on):
8438         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8439         (default_collect_symbol_completion_matches)
8440         (collect_symbol_completion_matches): Add complete_symbol_mode
8441         parameter.
8442         (collect_symbol_completion_matches_type): Pass down
8443         complete_symbol_mode::EXPRESSION.
8444         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8445         parameter.  Handle LINESPEC mode.
8446         * symtab.h (complete_symbol_mode): New.
8447         (default_collect_symbol_completion_matches_break_on)
8448         (default_collect_symbol_completion_matches)
8449         (collect_symbol_completion_matches)
8450         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8451         parameter.
8452
8453 2017-07-17  Pedro Alves  <palves@redhat.com>
8454
8455         * utils.c (enum class strncmp_iw_mode): New.
8456         (strcmp_iw): Rename to ...
8457         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8458         parameters.  Handle them.
8459         (strncmp_iw): New.
8460         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8461         * utils.h (strncmp_iw): Declare.
8462         (strcmp_iw): Move describing comments here.
8463
8464 2017-07-17  Pedro Alves  <palves@redhat.com>
8465
8466         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8467         CP_OPERATOR_STR.
8468         * c-typeprint.c (is_type_conversion_operator): Use
8469         CP_OPERATOR_STR.
8470         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8471         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8472         CP_OPERATOR_LEN.
8473         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8474         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8475         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8476         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8477         CP_OPERATOR_STR.
8478         * location.c: Include "cp-support.h".
8479         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8480         CP_OPERATOR_STR.
8481         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8482         CP_OPERATOR_LEN.
8483
8484 2017-07-17  Pedro Alves  <palves@redhat.com>
8485
8486         * cli/cli-cmds.c (complete_command): Use a completion tracker
8487         along with completion_find_completion_word for handle_brkchars
8488         phase.
8489         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8490         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8491         (struct gdb_rl_completion_word_info): New.
8492         (gdb_rl_find_completion_word): New.
8493         (completion_find_completion_word): New.
8494         * completer.h (completion_find_completion_word): Declare.
8495
8496 2017-07-17  Pedro Alves  <palves@redhat.com>
8497
8498         * ada-lang.c (symbol_completion_match): Adjust comments.
8499         (symbol_completion_add): Replace vector parameter with
8500         completion_tracker parameter.  Use it.
8501         (ada_make_symbol_completion_list): Rename to...
8502         (ada_collect_symbol_completion_matches): ... this.  Add
8503         completion_tracker parameter and use it.
8504         (ada_language_defn): Adjust.
8505         * break-catch-syscall.c (catch_syscall_completer): Adjust
8506         prototype and work with completion_tracker instead of VEC.
8507         * breakpoint.c (condition_completer): Adjust prototype and work
8508         with completion_tracker instead of VEC.
8509         * c-lang.c (c_language_defn, cplus_language_defn)
8510         (asm_language_defn, minimal_language_defn): Adjust to renames.
8511         * cli/cli-cmds.c (complete_command): Rework using
8512         completion_tracker.  Catch exceptions when completing.
8513         * cli/cli-decode.c (integer_unlimited_completer)
8514         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8515         with completion_tracker instead of VEC.
8516         * command.h (struct completion_tracker): Forward declare.
8517         (completer_ftype, completer_handle_brkchars_ftype): Change
8518         types.
8519         (complete_on_cmdlist, complete_on_enum): Adjust.
8520         * completer.c: Include <algorithm>.
8521         (struct gdb_completer_state): New.
8522         (current_completion): New global.
8523         (readline_line_completion_function): Delete.
8524         (noop_completer, filename_completer)
8525         (filename_completer_handle_brkchars, complete_files_symbols)
8526         (linespec_location_completer): Adjust to work with a
8527         completion_tracker instead of a VEC.
8528         (string_or_empty): New.
8529         (collect_explicit_location_matches): Adjust to work with a
8530         completion_tracker instead of a VEC.
8531         (explicit_location_completer): Rename to ...
8532         (complete_explicit_location): ... this and adjust to work with a
8533         completion_tracker instead of a VEC.
8534         (location_completer): Adjust to work with a completion_tracker
8535         instead of a VEC.
8536         (add_struct_fields): Adjust to work with a completion_list instead
8537         of VEC.
8538         (expression_completer): Rename to ...
8539         (complete_expression): ... this and adjust to work with a
8540         completion_tracker instead of a VEC.  Use complete_files_symbols.
8541         (expression_completer): Reimplement on top of complete_expression.
8542         (symbol_completer): Adjust to work with a completion_tracker
8543         instead of a VEC.
8544         (enum complete_line_internal_reason): Add describing comments.
8545         (complete_line_internal_normal_command): Adjust to work with a
8546         completion_tracker instead of a VEC.
8547         (complete_line_internal): Rename to ...
8548         (complete_line_internal_1): ... this and adjust to work with a
8549         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8550         handle_brkchars phase.
8551         (new_completion_tracker): Delete.
8552         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8553         complete_line_internal_1.
8554         (free_completion_tracker): Delete.
8555         (INITIAL_COMPLETION_HTAB_SIZE): New.
8556         (completion_tracker::completion_tracker)
8557         (completion_tracker::~completion_tracker): New.
8558         (maybe_add_completion): Delete.
8559         (completion_tracker::maybe_add_completion)
8560         (completion_tracker::add_completion)
8561         (completion_tracker::add_completions): New.
8562         (throw_max_completions_reached_error): Delete.
8563         (complete_line): Adjust to work with a completion_tracker instead
8564         of a VEC.  Don't create a completion_tracker_t or check for max
8565         completions here.
8566         (command_completer, command_completer_handle_brkchars)
8567         (signal_completer, reg_or_group_completer_1)
8568         (reg_or_group_completer, default_completer_handle_brkchars):
8569         Adjust to work with a completion_tracker.
8570         (gdb_completion_word_break_characters_throw): New.
8571         (gdb_completion_word_break_characters): Reimplement.
8572         (line_completion_function): Delete.
8573         (completion_tracker::recompute_lowest_common_denominator)
8574         (expand_preserving_ws)
8575         (completion_tracker::build_completion_result)
8576         (completion_result::completion_result)
8577         (completion_result::completion_result)
8578         (completion_result::~completion_result)
8579         (completion_result::completion_result)
8580         (completion_result::release_match_list, compare_cstrings)
8581         (completion_result::sort_match_list)
8582         (completion_result::reset_match_list)
8583         (gdb_rl_attempted_completion_function_throw)
8584         (gdb_rl_attempted_completion_function): New.
8585         * completer.h (completion_list, struct completion_result)
8586         (class completion_tracker): New.
8587         (complete_line): Add completion_tracker parameter.
8588         (readline_line_completion_function): Delete.
8589         (gdb_rl_attempted_completion_function): New.
8590         (noop_completer, filename_completer, expression_completer)
8591         (location_completer, symbol_completer, command_completer)
8592         (signal_completer, reg_or_group_completer): Update prototypes.
8593         (completion_tracker_t, new_completion_tracker)
8594         (make_cleanup_free_completion_tracker): Delete.
8595         (enum maybe_add_completion_enum): Delete.
8596         (maybe_add_completion): Delete.
8597         (throw_max_completions_reached_error): Delete.
8598         * corefile.c (complete_set_gnutarget): Adjust to work with a
8599         completion_tracker instead of a VEC.
8600         * cp-abi.c (cp_abi_completer): Adjust to work with a
8601         completion_tracker instead of a VEC.
8602         * d-lang.c (d_language_defn): Adjust.
8603         * disasm.c (disassembler_options_completer): Adjust to work with a
8604         completion_tracker instead of a VEC.
8605         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8606         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8607         with a completion_tracker instead of a VEC.
8608         (f_language_defn): Adjust.
8609         * go-lang.c (go_language_defn): Adjust.
8610         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8611         Adjust to work with a completion_tracker instead of a VEC.
8612         * infrun.c (handle_completer): Likewise.
8613         * interps.c (interpreter_completer): Likewise.
8614         * interps.h (interpreter_completer): Likewise.
8615         * language.c (unknown_language_defn, auto_language_defn)
8616         (local_language_defn): Adjust.
8617         * language.h (language_defn::la_make_symbol_completion_list):
8618         Rename to ...
8619         (language_defn::la_collect_symbol_completion_matches): ... this
8620         and adjust to work with a completion_tracker instead of a VEC.
8621         * m2-lang.c (m2_language_defn): Adjust.
8622         * objc-lang.c (objc_language_defn): Adjust.
8623         * opencl-lang.c (opencl_language_defn): Adjust.
8624         * p-lang.c (pascal_language_defn): Adjust.
8625         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8626         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8627         with a completion_tracker.
8628         * rust-lang.c (rust_language_defn): Adjust.
8629         * symtab.c (free_completion_list, do_free_completion_list)
8630         (return_val, completion_tracker): Delete.
8631         (completion_list_add_name, completion_list_add_symbol)
8632         (completion_list_add_msymbol, completion_list_objc_symbol)
8633         (completion_list_add_fields, add_symtab_completions): Add
8634         completion_tracker parameter and use it.
8635         (default_make_symbol_completion_list_break_on_1): Rename to...
8636         (default_collect_symbol_completion_matches_break_on): ... this.
8637         Add completion_tracker parameter and use it instead of allocating
8638         a completion tracker here.
8639         (default_make_symbol_completion_list_break_on): Delete old
8640         implementation.
8641         (default_make_symbol_completion_list): Delete.
8642         (default_collect_symbol_completion_matches): New.
8643         (make_symbol_completion_list): Delete.
8644         (collect_symbol_completion_matches): New.
8645         (make_symbol_completion_type): Rename to ...
8646         (collect_symbol_completion_matches_type): ... this.  Add
8647         completion_tracker parameter and use it instead of VEC.
8648         (make_file_symbol_completion_list_1): Rename to...
8649         (collect_file_symbol_completion_matches): ... this.  Add
8650         completion_tracker parameter and use it instead of VEC.
8651         (make_file_symbol_completion_list): Delete.
8652         (add_filename_to_list): Use completion_list instead of a VEC.
8653         (add_partial_filename_data::list): Now a completion_list.
8654         (make_source_files_completion_list): Work with a completion_list
8655         instead of a VEC.
8656         * symtab.h: Include "completer.h".
8657         (default_make_symbol_completion_list_break_on)
8658         (default_make_symbol_completion_list, make_symbol_completion_list)
8659         (make_symbol_completion_type, make_file_symbol_completion_list)
8660         (make_source_files_completion_list): Delete.
8661         (default_collect_symbol_completion_matches_break_on)
8662         (default_collect_symbol_completion_matches)
8663         (collect_symbol_completion_matches)
8664         (collect_symbol_completion_matches_type)
8665         (collect_file_symbol_completion_matches)
8666         (make_source_files_completion_list): New.
8667         * top.c (init_main): Don't install a rl_completion_entry_function
8668         hook.  Install a rl_attempted_completion_function hook instead.
8669         * tui/tui-layout.c (layout_completer): Adjust to work with a
8670         completion_tracker.
8671         * tui/tui-regs.c (tui_reggroup_completer):
8672         * tui/tui-win.c (window_name_completer, focus_completer)
8673         (winheight_completer): Adjust to work with a completion_tracker.
8674         * value.c: Include "completer.h".
8675         (complete_internalvar): Adjust to work with a completion_tracker.
8676         * value.h (complete_internalvar): Likewise.
8677
8678 2017-07-17  Pedro Alves  <palves@redhat.com>
8679
8680         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8681         renames.
8682         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8683         comments to completer_ftype's declaration.
8684         <completer_handle_brkchars>: Change type to
8685         completer_handle_brkchars_ftype.
8686         * command.h (completer_ftype): Add describing comment and give
8687         names to parameters.
8688         (completer_ftype_void): Rename to ...
8689         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8690         (set_cmd_completer_handle_brkchars): Adjust.
8691         * completer.c (filename_completer_handle_brkchars): New function.
8692         (complete_line_internal_normal_command): New function, factored
8693         out from ...
8694         (complete_line_internal): ... here.
8695         (command_completer_handle_brkchars)
8696         (default_completer_handle_brkchars)
8697         (completer_handle_brkchars_func_for_completer): New functions.
8698         * completer.h (set_gdb_completion_word_break_characters): Delete
8699         declaration.
8700         (completer_handle_brkchars_func_for_completer): New declaration.
8701         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8702         completer_handle_brkchars_func_for_completer.
8703
8704 2017-07-17  Pedro Alves  <palves@redhat.com>
8705
8706         * completer.c (symbol_completer): New function, based on
8707         make_symbol_completion_list_fn.
8708         * completer.h (symbol_completer): New declaration.
8709         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8710         * python/py-cmd.c (completers): Adjust.
8711         * symtab.c (make_symbol_completion_list_fn): Delete.
8712         * symtab.h (make_symbol_completion_list_fn): Delete.
8713         * cli/cli-decode.c (add_cmd): Adjust.
8714
8715 2017-07-17  Pedro Alves  <palves@redhat.com>
8716
8717         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8718         * dwarf2read.c: Include "filename-seen-cache.h".
8719         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8720         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8721         * filename-seen-cache.c: New file.
8722         * filename-seen-cache.h: New file.
8723         * symtab.c: Include "filename-seen-cache.h".
8724         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8725         (create_filename_seen_cache, clear_filename_seen_cache)
8726         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8727         to filename-seen-cache.h/filename-seen-cache.c.
8728         (output_source_filename, sources_info)
8729         (maybe_add_partial_symtab_filename)
8730         (make_source_files_completion_list): Adjust to use
8731         filename_seen_cache.
8732
8733 2017-07-17  Pedro Alves  <palves@redhat.com>
8734
8735         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8736         fields.
8737         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8738         dwarf2_debug_sections*)): New.
8739         (dwarf2_per_objfile::dwarf2_per_objfile(const
8740         dwarf2_per_objfile&)): Declare as deleted.
8741         (dwarf2_per_objfile::operator=): Declare as deleted.
8742         (dwarf2_per_objfile::dwarf2_per_objfile)
8743         (dwarf2_per_objfile::~dwarf2_per_objfile)
8744         (dwarf2_per_objfile::free_cached_comp_units): New.
8745         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8746         ctor.  Call dwarf2_per_objfile's ctor manually.
8747         (dwarf2_locate_sections): Deleted/refactored as ...
8748         (dwarf2_per_objfile::locate_sections): ... this new method.
8749         (free_cached_comp_units): Defer to
8750         dwarf2_per_objfile::free_cached_comp_units.
8751         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8752
8753 2017-07-14  Tom Tromey  <tom@tromey.com>
8754
8755         PR rust/21764:
8756         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8757         parameter.
8758         <UNOP_SIZEOF>: Split into separate case.
8759         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8760
8761 2017-07-14  Tom Tromey  <tom@tromey.com>
8762
8763         PR rust/21763:
8764         * symtab.c (symbol_matches_domain): Add language_rust to special
8765         case.
8766         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8767         treat LOC_TYPEDEF symbols as variables.
8768
8769 2017-07-14  Pedro Alves  <palves@redhat.com>
8770
8771         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8772         symtabs matching all symtabs with SRCFILE as file name instead of
8773         only considering the first hit, with lookup_symtab.
8774
8775 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8776
8777         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8778         operator_name parameters.
8779         (gen_expr): Update function call.
8780
8781 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8782
8783         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8784         parameter.
8785         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8786         Likewise.
8787         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8788         parameter, use agent_expr::gdbarch instead, update function
8789         calls.
8790         (locexpr_tracepoint_var_ref): Likewise.
8791         (loclist_tracepoint_var_ref): Likewise.
8792         * ax-gdb.c (gen_trace_static_fields): Likewise.
8793         (gen_traced_pop): Likewise.
8794         (gen_frame_args_address): Likewise.
8795         (gen_frame_locals_address): Likewise.
8796         (gen_var_ref): Likewise.
8797         (gen_struct_ref_recursive): Likewise.
8798         (gen_static_field): Likewise.
8799         (gen_maybe_namespace_elt): Likewise.
8800         (gen_expr): Likewise.
8801         (gen_trace_for_var): Likewise.
8802         (gen_trace_for_expr): Likewise.
8803         (gen_trace_for_return_address): Likewise.
8804
8805 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8806
8807         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8808         parameter.
8809         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8810
8811 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8812
8813         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8814         from ax, update calls.
8815         (gen_usual_arithmetic): Likewise.
8816         (gen_integral_promotions): Likewise.
8817         (gen_bitfield_ref): Likewise.
8818         (gen_primitive_field): Likewise.
8819         (gen_struct_ref_recursive): Likewise.
8820         (gen_struct_ref): Likewise.
8821         (gen_maybe_namespace_elt): Likewise.
8822         (gen_struct_elt_for_reference): Likewise.
8823         (gen_namespace_elt): Likewise.
8824         (gen_aggregate_elt_ref): Likewise.
8825         (gen_expr): Get gdbarch from ax, update calls.
8826         (gen_expr_binop_rest): Likewise.
8827
8828 2017-07-13  Pedro Alves  <palves@redhat.com>
8829
8830         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8831         as default tdesc.
8832         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8833         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8834         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8835         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8836         tdep.
8837         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8838         Get final tdesc from the tdep.
8839         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8840         default tdesc.
8841         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8842         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8843         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8844         Use it as default tdesc.
8845         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8846         down to amd_init_abi.  No longer handle fallback tdesc here.
8847         * amd64-tdep.h (tdesc_x32): Declare.
8848         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8849         parameter.
8850         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8851         as default tdesc.
8852
8853 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8854
8855         * s390-linux-tdep.c (s390_process_record): Add support for
8856         instructions new in arch12.
8857
8858 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8859
8860         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8861         PT_GETFSBASE and PT_GETGSBASE.
8862         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8863         PT_SETGSBASE.
8864
8865 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8866
8867         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8868         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8869         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8870         those rules.
8871         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8872         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8873         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8874         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8875         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8876         * features/i386/amd64.xml: Add 64bit-segments.xml.
8877         * features/i386/amd64-avx-avx512.c: Regenerated.
8878         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8879         * features/i386/amd64-avx-mpx.c: Regenerated.
8880         * features/i386/amd64-avx.c: Regenerated.
8881         * features/i386/amd64-mpx.c: Regenerated.
8882         * features/i386/amd64.c: Regenerated.
8883         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8884         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8885         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8886         * regformats/i386/amd64-avx.dat: Regenerated.
8887         * regformats/i386/amd64-mpx.dat: Regenerated.
8888         * regformats/i386/amd64.dat: Regenerated.
8889
8890 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8891
8892         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8893         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8894
8895 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8896
8897         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8898         unsetenv.
8899         * gnulib/aclocal.m4: Regenerate.
8900         * gnulib/config.in: Regenerate.
8901         * gnulib/configure: Regenerate.
8902         * gnulib/import/Makefile.am: Regenerate.
8903         * gnulib/import/Makefile.in: Regenerate.
8904         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8905         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8906         * gnulib/import/m4/environ.m4: New file.
8907         * gnulib/import/m4/setenv.m4: New file.
8908         * gnulib/import/setenv.c: New file.
8909         * gnulib/import/unsetenv.c: New file.
8910
8911 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8912
8913         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8914         address when op is DW_OP_addr.
8915
8916 2017-07-09  Tom Tromey  <tom@tromey.com>
8917
8918         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8919         check and apply to outer type.
8920
8921 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8922
8923         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8924         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8925         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8926         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8927
8928 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8929
8930         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8931
8932 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8933
8934         * corelow.c (get_core_siginfo): Remove.
8935         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8936         instead of get_core_siginfo.
8937         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8938         * gdbarch.h: Re-generate.
8939         * gdbarch.c: Re-generate.
8940         * linux-tdep.c (linux_core_xfer_siginfo): New.
8941         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8942
8943 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8944
8945         * corelow.c (thread_section_name): Move to ...
8946         * gdbcore.h (thread_section_name): ... here.
8947
8948 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8949
8950         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8951         (struct siginfo32): New.
8952         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8953         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8954         via ptrace(PT_LWPINFO).
8955
8956 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8957
8958         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8959         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8960         (fbsd_get_siginfo_type): New.
8961         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8962         (_initialize_fbsd_tdep): New.
8963
8964 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8965
8966         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8967         a singular dwo_unit*) to support multiple CUs in the same way that
8968         multiple TUs are supported.
8969         (create_cus_hash_table): Replace create_dwo_cu with a function for
8970         parsing multiple CUs from a DWO file.
8971         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8972         create_dwo_cu.
8973         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8974         htab_find, rather than comparing the signature to a singleton CU in
8975         the dwo_file.
8976
8977 2017-07-06  Pedro Alves  <palves@redhat.com>
8978
8979         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8980
8981 2017-07-04  Pedro Alves  <palves@redhat.com>
8982
8983         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8984         * gdbtypes.h (TYPE_STATIC): Delete.
8985         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8986         is_synchronized, is_native>: Delete.
8987         <dummy>: Bump.
8988         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8989         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8990         (TYPE_FN_FIELD_ABSTRACT): Delete.
8991
8992 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8993
8994         * buffer.h (buffer_finish): Fix spelling mistakes.
8995
8996 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8997
8998         * .dir-locals.el: Automatically switch to C-style comments in
8999         versions of Emacs that support the feature.
9000
9001 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9002             Pedro Alves  <palves@redhat.com>
9003
9004         PR cli/21688
9005         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9006         (process_next_line): New variable 'inline_cmd'.
9007         Adjust 'if' clauses for "python", "compile" and "guile" to use
9008         'command_name_equals' and check for '!inline_cmd'.
9009
9010 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9011
9012         PR cli/21688
9013         * cli/cli-script.c (command_name_equals_not_inline): New function.
9014         (process_next_line): Adjust 'if' clauses for "python", "compile"
9015         and "guile" to use command_name_equals_not_inline.
9016
9017 2017-06-29  Pedro Alves  <palves@redhat.com>
9018
9019         * completer.c (expression_completer): Call
9020         linespec_location_completer instead of location_completer.
9021
9022 2017-06-29  Pedro Alves  <palves@redhat.com>
9023
9024         * completer.c (expression_completer): Remove code that recomputes
9025         'text' from 'word'.
9026
9027 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9028
9029         * regformats/regdat.sh: Generate code with
9030         "ifndef IN_PROCESS_AGENT".
9031
9032 2017-06-28  Pedro Alves  <palves@redhat.com>
9033
9034         * command.h: Include "common/scoped_restore.h".
9035
9036 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9037
9038         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9039         instead of obstack_grow.
9040
9041 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9042
9043         PR gdb/21337
9044         * symfile.c (reread_symbols): Call objfiles_changed just before
9045         read_symbols.
9046
9047 2017-06-27  Pedro Alves  <palves@redhat.com>
9048
9049         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9050         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9051         (completion_list_add_symbol, completion_list_add_msymbol):
9052         ... these new functions.
9053         (add_symtab_completions)
9054         (default_make_symbol_completion_list_break_on_1): Adjust.
9055
9056 2017-06-27  Pedro Alves  <palves@redhat.com>
9057
9058         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9059         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9060         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9061         dtor.
9062         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9063         'storage_obstack' field an auto_obstack.  In-class initialize all
9064         non-bitfield fields.  Make minsyms_read bool.
9065         * symfile.c (read_symbols): Adjust.
9066
9067 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9068
9069         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9070         (gdbsim_store_register): Likewise.
9071
9072 2017-06-27  Pedro Alves  <palves@redhat.com>
9073
9074         * c-exp.y (name_obstack): Now an auto_obstack.
9075         (yylex): Use auto_obstack::clear.
9076         (c_parse): Use auto_obstack::clear instead of reinitializing and
9077         freeing the obstack.
9078         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9079         * d-exp.y (name_obstack): Now an auto_obstack.
9080         (yylex): Use auto_obstack::clear.
9081         (d_parse): Use auto_obstack::clear instead of reinitializing and
9082         freeing the obstack.
9083         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9084         auto_obstack.
9085         * dwarf2read.c (create_addrmap_from_index)
9086         (dwarf2_build_psymtabs_hard)
9087         (update_enumeration_type_from_children): Likewise.
9088         * gdb_obstack.h (auto_obstack): New type.
9089         * go-exp.y (name_obstack): Now an auto_obstack.
9090         (build_packaged_name): Use auto_obstack::clear.
9091         (go_parse): Use auto_obstack::clear instead of reinitializing and
9092         freeing the obstack.
9093         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9094         auto_obstack.
9095         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9096         * rust-exp.y (work_obstack): Now an auto_obstack.
9097         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9098         reinitializing and freeing the obstack.
9099         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9100         (host_char_to_target): Use auto_obstack.
9101         * utils.h (make_cleanup_obstack_free): Delete declaration.
9102         * valprint.c (generic_emit_char, generic_printstr): Use
9103         auto_obstack.
9104
9105 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9106
9107         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9108         thread.
9109         (darwin_init_thread_list): Don't update dummy thread.
9110         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9111
9112 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9113
9114         * record-full.c (netorder16): Remove.
9115
9116 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9117
9118         * common/diagnostics.h: Define macros for GCC.
9119         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9120         * common/vec.h: Include diagnostics.h.
9121         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9122         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9123         warning.
9124
9125 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9126
9127         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9128         New macro.
9129         * ada-lex.l: Ignore deprecated register warnings.
9130
9131 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9132
9133         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9134         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9135
9136 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9137
9138         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9139         its own line.
9140
9141 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9142
9143         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9144
9145 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9146
9147         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9148         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9149         (xtensa_register_read_masked): Likewise.
9150
9151 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9152
9153         * common/environ.c (gdb_environ::unset): Update comment.
9154
9155 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9156
9157         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9158         registers.
9159
9160 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9161
9162         * record-full.c (record_full_exec_insn): Use byte_vector.
9163
9164 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9165
9166         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9167         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9168
9169 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9170
9171         * remote.c (cached_reg): Move from here...
9172         * regcache.h (cached_reg): ...to here.
9173         * python/py-unwind.c (struct reg_info): Remove.
9174         (cached_frame_info): Use cached_reg_t.
9175         (pyuw_prev_register): Likewise.
9176         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9177         (pyuw_dealloc_cache): Free all registers.
9178
9179 2017-06-22  Pedro Alves  <palves@redhat.com>
9180             Simon Marchi  <simon.marchi@ericsson.com>
9181
9182         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9183         warning.
9184         * common/diagnostics.h: New file.
9185
9186 2017-06-22  Pedro Alves  <palves@redhat.com>
9187
9188         * common/agent.h: Add include guards.
9189
9190 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9191
9192         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9193         talk about addressable units instead of bytes.
9194
9195 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9196
9197         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9198         of '::const_iterator'.
9199
9200 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9201
9202         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9203         'unittests/environ-selftests.c'.
9204         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9205         * charset.c (find_charset_names): Declare object 'iconv_env'.
9206         Update code to use 'iconv_env' object.  Remove call to
9207         'free_environ'.
9208         * common/environ.c: Include <utility>.
9209         (make_environ): Delete function.
9210         (free_environ): Delete function.
9211         (gdb_environ::clear): New function.
9212         (gdb_environ::operator=): New function.
9213         (gdb_environ::get): Likewise.
9214         (environ_vector): Delete function.
9215         (set_in_environ): Delete function.
9216         (gdb_environ::set): New function.
9217         (unset_in_environ): Delete function.
9218         (gdb_environ::unset): New function.
9219         (gdb_environ::envp): Likewise.
9220         * common/environ.h: Include <vector>.
9221         (struct gdb_environ): Delete; transform into...
9222         (class gdb_environ): ... this class.
9223         (free_environ): Delete prototype.
9224         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9225         environ_vector): Likewise.
9226         * infcmd.c (run_command_1): Update code to call
9227         'envp' from 'gdb_environ' class.
9228         (environment_info): Update code to call methods from 'gdb_environ'
9229         class.
9230         (unset_environment_command): Likewise.
9231         (path_info): Likewise.
9232         (path_command): Likewise.
9233         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9234         (inferior::inferior): Initialize 'environment' using the host's
9235         information.
9236         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9237         Include "environ.h".
9238         (class inferior) <environment>: Change type from 'struct
9239         gdb_environ' to 'gdb_environ'.
9240         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9241         methods from 'gdb_environ' class.
9242         * solib.c (solib_find_1): Likewise
9243         * unittests/environ-selftests.c: New file.
9244
9245 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9246
9247         * features/i386/i386-linux.xml: Exchange the order of including
9248         32bit-linux.xml and 32bit-sse.xml.
9249         * features/i386/i386-linux.c: Regenerated.
9250
9251 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9252
9253         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9254         Delete copy ctor and assignment operator.
9255         (tdesc_type): Likewise.
9256         (tdesc_feature): Likewise.
9257         (tdesc_free_reg): Remove.
9258         (tdesc_create_reg): Use new.
9259         (tdesc_free_type): Remove.
9260         (tdesc_create_vector): Use new.
9261         (tdesc_create_union): Likewise.
9262         (tdesc_create_flags): Likewise.
9263         (tdesc_create_enum): Likewise.
9264         (tdesc_free_feature): Delete.
9265         (free_target_description): Use delete.
9266
9267 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9268
9269         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9270         registers.
9271
9272 2017-06-19  Pedro Alves  <palves@redhat.com>
9273
9274         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9275         after gdb::unlinker.
9276
9277 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9278
9279         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9280         gdb_environ to access an environment variable.
9281
9282 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9283
9284         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9285         gdb_byte*.
9286
9287 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9288
9289         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9290
9291 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9292
9293         * configure: Re-generate.
9294         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9295
9296 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9297
9298         * configure: Re-generate.
9299         * warning.m4: Pass -Werror to compiler when checking for
9300         supported warning flags.
9301
9302 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9303
9304         * Makefile.in (COMPILE.pre): Add "-x c++".
9305
9306 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9307             Pedro Alves  <palves@redhat.com>
9308             Yao Qi  <yao.qi@linaro.org>
9309
9310         * defs.h (RequireLongest): New.
9311         (extract_integer): Declare function template.
9312         (extract_signed_integer): Remove the declaration, but define it
9313         static inline.
9314         (extract_unsigned_integer): Likewise.
9315         (store_integer): Declare function template.
9316         (store_signed_integer): Remove the declaration, but define it
9317         static inline.
9318         (store_unsigned_integer): Likewise.
9319         * findvar.c (extract_integer): New function template.
9320         (extract_signed_integer): Remove.
9321         (extract_unsigned_integer): Remove.
9322         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9323         instantiations.
9324         (store_integer): New function template.
9325         (store_signed_integer): Remove.
9326         (store_unsigned_integer): Remove.
9327         (store_integer): Explicit instantiations.
9328         * regcache.c (regcache_raw_read_signed): Update.
9329         (regcache::raw_read): New function.
9330         (regcache::raw_read_signed): Remove.
9331         (regcache::raw_read_unsigned): Remove.
9332         (regcache_raw_read_unsigned): Update.
9333         (regcache_raw_write_unsigned): Update.
9334         (regcache::raw_write_signed): Remove.
9335         (regcache::raw_write): New function.
9336         (regcache_cooked_read_signed): Update.
9337         (regcache::raw_write_unsigned): Remove.
9338         (regcache::cooked_read_signed): Remove.
9339         (regcache_cooked_read_unsigned): Update.
9340         (regcache::cooked_read_unsigned): Remove.
9341         (regcache_cooked_write_signed): Update.
9342         (regcache_cooked_write_unsigned): Update.
9343         * regcache.h (regcache) <raw_read_signed>: Remove.
9344         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9345         <raw_read, raw_write>: New.
9346         <cooked_read_signed, cooked_write_signed>: Remove.
9347         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9348         <cooked_read, cooked_write>: New.
9349         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9350         (sh64_pseudo_register_write): Update.
9351
9352 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9353
9354         * arc-tdep.c (arc_disassembler_options): New variable.
9355         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9356         of default_print_insn.
9357         (arc_delayed_print_insn): Set info->section when needed,
9358         use default_print_insn to retrieve a disassembler.
9359
9360 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9361
9362         PR gdb/21574
9363         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9364         to mention $SHELL and startup-with-shell.
9365
9366 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9367
9368         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9369
9370 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9371
9372         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9373         default_print_insn instead of print_insn_aarch64.
9374         * arm-tdep.c (gdb_print_insn_arm): Call
9375         default_print_insn instead of print_insn_big_arm
9376         and print_insn_little_arm.
9377         * i386-tdep.c (i386_print_insn): Call default_print_insn
9378         instead of print_insn_i386.
9379         * ia64-tdep.c (ia64_print_insn): Call
9380         default_print_insn instead of print_insn_ia64.
9381         * mips-tdep.c (gdb_print_insn_mips): Call
9382         default_print_insn instead of print_insn_big_mips
9383         and print_insn_little_mips.
9384         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9385         instead of print_insn_spu.
9386
9387 2017-06-14  Pedro Alves  <palves@redhat.com>
9388
9389         * ada-lang.c: Include "common/byte-vector.h".
9390         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9391         * charset.c (wchar_iterator::iterate): Resize the vector instead
9392         of reserving it.
9393         * common/byte-vector.h: Include "common/def-vector.h".
9394         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9395         * cli/cli-dump.c: Include "common/byte-vector.h".
9396         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9397         * common/byte-vector.h: New file.
9398         * common/def-vector.h: New file.
9399         * common/default-init-alloc.h: New file.
9400         * dwarf2loc.c: Include "common/byte-vector.h".
9401         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9402         instead of reserving it.
9403         * dwarf2read.c: Include "common/byte-vector.h".
9404         (data_buf::m_vec): Now a gdb::byte_vector.
9405         * gdb_regex.c: Include "common/def-vector.h".
9406         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9407         * mi/mi-main.c: Include "common/byte-vector.h".
9408         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9409         * printcmd.c: Include "common/byte-vector.h".
9410         (print_scalar_formatted): Use gdb::byte_vector.
9411         * valprint.c: Include "common/byte-vector.h".
9412         (maybe_negate_by_bytes, print_decimal_chars): Use
9413         gdb::byte_vector.
9414
9415 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9416
9417         * darwin-nat.c: Include "nat/fork-inferior.h".
9418
9419 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9420
9421         * configure.nat: Factor out Darwin bits that are not
9422         architecture-specific.  Add fork-inferior.o.
9423
9424 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9425
9426         * configure.nat: Factor out AIX bits that are not
9427         architecture-specific.  Add fork-inferior.o.
9428
9429 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9430
9431         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9432         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9433         wrappers that just call rw_pieced_value.
9434
9435 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9436
9437         * dwarf2loc.c (write_pieced_value): When writing the data for a
9438         memory piece, use write_memory_with_notification instead of
9439         write_memory.
9440
9441 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9442
9443         * valops.c (read_value_memory): Change embedded_offset to
9444         represent a bit offset instead of a byte offset.
9445         * value.h (read_value_memory): Adjust comment.
9446
9447 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9448
9449         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9450         dest_offset_bits and source_offset_bits.
9451         (write_pieced_value): Likewise.
9452
9453 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9454
9455         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9456         given by DW_OP_bit_piece.
9457         (write_pieced_value): Likewise.
9458
9459 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9460
9461         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9462         some other preparations to the places where sufficient information
9463         is available.
9464         (write_pieced_value): Likewise.
9465
9466 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9467
9468         * dwarf2loc.c (bits_to_bytes): New function.
9469         (read_pieced_value): Fix offset calculations for register pieces
9470         on big-endian targets.
9471         (write_pieced_value): Likewise.
9472
9473 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9474
9475         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9476         (write_pieced_value): Likewise.
9477
9478 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9479
9480         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9481         transfer the source value's least significant bits, instead of its
9482         lowest-addressed ones.  Rename type_len to max_offset.
9483         (read_pieced_value): Mirror above changes to write_pieced_value as
9484         applicable.
9485
9486 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9487
9488         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9489         truncate full bytes from dest_offset_bits before using it as an
9490         offset into the buffer.
9491
9492 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9493
9494         * dwarf2loc.c (write_pieced_value): Include transfer size in
9495         byte-wise check.
9496
9497 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9498
9499         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9500         calculation of this_size.
9501
9502 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9503
9504         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9505         when targeting a bit-field.
9506         (write_pieced_value): Likewise.
9507
9508 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9509
9510         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9511         (allocate_piece_closure): Drop addr_size parameter.
9512         (dwarf2_evaluate_loc_desc_full): Adjust call to
9513         allocate_piece_closure.
9514
9515 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9516
9517         PR gdb/21226
9518         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9519         the LSB end, independent of endianness.
9520
9521 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9522
9523         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9524         size capping.
9525
9526 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9527
9528         * mips-linux-nat.c: Move include features/mips*-linux.c to
9529         mips-linux-tdep.c.
9530         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9531         to mips-linux-tdep.c.
9532         * mips-linux-tdep.c: Include features/mips*-linux.c
9533         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9534         functions.
9535         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9536         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9537         (tdesc_mips64_dsp_linux): Declare.
9538
9539 2017-06-12  Tom Tromey  <tom@tromey.com>
9540
9541         * valprint.h (val_print_type_code_int): Remove.
9542         * valprint.c (generic_val_print_int): Always call
9543         val_print_scalar_formatted.
9544         (val_print_type_code_int): Remove.
9545         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9546         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9547         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9548         * ada-valprint.c (ada_val_print_num): Use
9549         val_print_scalar_formatted.
9550
9551 2017-06-12  Tom Tromey  <tom@tromey.com>
9552
9553         * printcmd.c (print_scalar_formatted): Unify the two switches.
9554         Don't convert scalars to LONGEST.
9555
9556 2017-06-12  Tom Tromey  <tom@tromey.com>
9557
9558         PR exp/16225:
9559         * valprint.h (print_decimal_chars): Update.
9560         * valprint.c (maybe_negate_by_bytes): New function.
9561         (print_decimal_chars): Add "is_signed" argument.
9562         * printcmd.c (print_scalar_formatted): Update.
9563
9564 2017-06-12  Tom Tromey  <tom@tromey.com>
9565
9566         PR exp/16225:
9567         * valprint.h (print_binary_chars, print_hex_chars): Update.
9568         * valprint.c (val_print_type_code_int): Update.
9569         (print_binary_chars): Add "zero_pad" argument.
9570         (emit_octal_digit): New function.
9571         (print_octal_chars): Don't zero-pad.
9572         (print_decimal_chars): Likewise.
9573         (print_hex_chars): Add "zero_pad" argument.
9574         * sh64-tdep.c (sh64_do_fp_register): Update.
9575         * regcache.c (regcache::dump): Update.
9576         * printcmd.c (print_scalar_formatted): Update.
9577         * infcmd.c (default_print_one_register_info): Update.
9578
9579 2017-06-12  Pedro Alves  <palves@redhat.com>
9580             Alan Hayward  <alan.hayward@arm.com>
9581
9582         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9583         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9584         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9585         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9586         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9587
9588 2017-06-12  Pedro Alves  <palves@redhat.com>
9589
9590         * dwarf2read.c (mapped_symtab::data): Now a vector of
9591         symtab_index_entry instead of vector of
9592         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9593         whether an element's name is NULL instead of checking whether the
9594         element itself is NULL.
9595         (find_slot): Change return type.  Adjust.
9596         (hash_expand, , add_index_entry, uniquify_cu_indices)
9597         (write_hash_table): Adjust.
9598
9599 2017-06-12  Pedro Alves  <palves@redhat.com>
9600
9601         * dwarf2read.c (recursively_count_psymbols): New function.
9602         (write_psymtabs_to_index): Call it to compute number of psyms and
9603         pass estimate size of psyms_seen to unordered_set's ctor.
9604
9605 2017-06-12  Pedro Alves  <palves@redhat.com>
9606
9607         * dwarf2read.c (write_hash_table): Check if key already exists
9608         before emplacing.
9609
9610 2017-06-12  Pedro Alves  <palves@redhat.com>
9611
9612         * dwarf2read.c (data_buf::append_space): Rename to...
9613         (data_buf::grow): ... this, and make private.  Adjust all callers.
9614         (data_buf::append_uint): New method.
9615         (add_address_entry, write_one_signatured_type)
9616         (write_psymtabs_to_index): Use it.
9617
9618 2017-06-12  Pedro Alves  <palves@redhat.com>
9619
9620         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9621         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9622         (data_buf::file_write): Call ::fwrite directly.
9623
9624 2017-06-12  Pedro Alves  <palves@redhat.com>
9625
9626         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9627         std::vector::erase.
9628
9629 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9630
9631         Code cleanup: C++ify .gdb_index producer.
9632         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9633         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9634         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9635         (create_strtab, add_string): Remove.
9636         (file_write, data_buf): New.
9637         (struct symtab_index_entry): Use std::vector for cu_indices.
9638         (struct mapped_symtab): Use std::vector for data.
9639         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9640         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9641         Remove.
9642         (find_slot): Change return type.  Update it to the new data structures.
9643         (hash_expand, add_index_entry): Update it to the new data structures.
9644         (offset_type_compare): Remove.
9645         (uniquify_cu_indices): Update it to the new data structures.
9646         (c_str_view, c_str_view_hasher, vector_hasher): New.
9647         (add_indices_to_cpool): Remove.
9648         (write_hash_table): Update it to the new data structures.
9649         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9650         (eq_psymtab_cu_index): Remove.
9651         (psym_index_map): New typedef.
9652         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9653         reference and std::unordered_map for cu_index_htab.
9654         (add_address_entry, add_address_entry_worker, write_address_map)
9655         (write_psymbols): Update it to the new data structures.
9656         (write_obstack): Remove.
9657         (struct signatured_type_index_data): Change types_list to a data_buf
9658         reference and psyms_seen to a std::unordered_set reference.
9659         (write_one_signatured_type, recursively_write_psymbols)
9660         (write_psymtabs_to_index): Update it to the new data structures.
9661
9662 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9663
9664         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9665         separate-debug-file commands.
9666         * symfile.h (separate_debug_file_debug): New global.
9667         * symfile.c (separate_debug_file_debug): New global.
9668         (separate_debug_file_exists, find_separate_debug_file): Add
9669         debug output.
9670         (_initialize_symfile): Add "set debug separate-debug-file"
9671         command.
9672         * build-id.c (build_id_to_debug_bfd,
9673         find_separate_debug_file_by_buildid): Add debug output.
9674
9675 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9676
9677         * gdbarch.sh (displaced_step_free_closure): Remove.
9678         * gdbarch.h, gdbarch.c: Re-generate.
9679         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9680         displaced_step_free_closure.
9681         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9682         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9683         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9684         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9685         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9686         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9687         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9688         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9689         * infrun.c (displaced_step_clear): Call xfree instead of
9690         gdbarch_displaced_step_free_closure.
9691
9692 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9693
9694         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9695         NULL".
9696
9697 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9698
9699         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9700         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9701         (mn10300_push_dummy_call): Likewise.
9702
9703 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9704
9705         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9706
9707 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9708
9709         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9710
9711 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9712
9713         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9714         able to start inferiors using a shell.
9715         (New remote packets): Announce new packet "QStartupWithShell".
9716         * remote.c: Add PACKET_QStartupWithShell.
9717         (extended_remote_create_inferior): Handle new
9718         PACKET_QStartupWithShell.
9719         (remote_protocol_features) <QStartupWithShell>: New entry for
9720         PACKET_QStartupWithShell.
9721         (_initialize_remote): Call "add_packet_config_cmd" for
9722         QStartupShell.
9723
9724 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9725             Pedro Alves  <palves@redhat.com>
9726
9727         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9728         and "nat/fork-inferior.h".
9729         * common/common-inferior.h: New file, with contents from
9730         "gdb/inferior.h".
9731         * commom/common-utils.c: Include "common-utils.h".
9732         (stringify_argv): New function.
9733         * common/common-utils.h (stringify_argv): New prototype.
9734         * configure.nat: Add "fork-inferior.o" as a dependency for
9735         "*linux*", "fbsd*" and "nbsd*" hosts.
9736         * corefile.c (get_exec_file): Update comment.
9737         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9738         instead of "startup_inferior".
9739         (darwin_create_inferior): Call "add_thread_silent" after
9740         "fork_inferior".
9741         * fork-child.c: Cleanup unnecessary includes.
9742         (SHELL_FILE): Move to "common/common-fork-child.c".
9743         (environ): Likewise.
9744         (exec_wrapper): Initialize.
9745         (get_exec_wrapper): New function.
9746         (breakup_args): Move to "common/common-fork-child.c"; rename to
9747         "breakup_args_for_exec".
9748         (escape_bang_in_quoted_argument): Move to
9749         "common/common-fork-child.c".
9750         (saved_ui): New variable.
9751         (prefork_hook): New function.
9752         (postfork_hook): Likewise.
9753         (postfork_child_hook): Likewise.
9754         (gdb_startup_inferior): Likewise.
9755         (fork_inferior): Move to "common/common-fork-child.c".  Update
9756         function to support gdbserver.
9757         (startup_inferior): Likewise.
9758         * gdbcore.h (get_exec_file): Remove declaration.
9759         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9760         instead of "startup_inferior".  Call "add_thread_silent" after
9761         "fork_inferior".
9762         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9763         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9764         instead of "startup_inferior".  Call "add_thread_silent" after
9765         "fork_inferior".
9766         * inferior.h: Include "common-inferior.h".
9767         (trace_start_error): Move to "common/common-utils.h".
9768         (trace_start_error_with_name): Likewise.
9769         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9770         (startup_inferior): Likewise.
9771         (gdb_startup_inferior): New prototype.
9772         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9773         * nat/fork-inferior.h: New file.
9774         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9775         instead of "startup_inferior".  Call "add_thread_silent" after
9776         "fork_inferior".
9777         * target.h (target_terminal_init): Move prototype to
9778         "target/target.h".
9779         (target_terminal_inferior): Likewise.
9780         (target_terminal_ours): Likewise.
9781         * target/target.h (target_terminal_init): New prototype, moved
9782         from "target.h".
9783         (target_terminal_inferior): Likewise.
9784         (target_terminal_ours): Likewise.
9785         * utils.c (gdb_flush_out_err): New function.
9786
9787 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9788
9789         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9790         * common/common-gdbthread.h: New file, with parts from
9791         "gdb/gdbthread.h".
9792         * gdbthread.h: Include "common-gdbthread.h".
9793         (switch_to_thread): Moved to "common/common-gdbthread.h".
9794
9795 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9796
9797         * Makefile.in (SFILES): Add "common/job-control.c".
9798         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9799         (COMMON_OBS): Add "job-control.o".
9800         * common/job-control.c: New file, with contents from
9801         "gdb/inflow.c".
9802         * common/job-control.h: New file, with contents from "terminal.h".
9803         * fork-child.c: Include "job-control.h".
9804         * inflow.c: Include "job-control.h".
9805         (gdb_setpgid): Move to "common/common-inflow.c".
9806         (_initialize_inflow): Move setting of "job_control" to
9807         "handle_job_control".
9808         * terminal.h (job_control): Moved to "common/common-terminal.h".
9809         (gdb_setpgid): Likewise.
9810         * top.c: Include "job_control.h".
9811         * utils.c: Likewise.
9812         (job_control): Moved to "job-control.c".
9813
9814 2017-06-07  Pedro Alves  <palves@redhat.com>
9815
9816         * Makefile.in (SFILES): Add gdb_regex.c.
9817         (COMMON_OBS): Add gdb_regex.o.
9818         * ada-lang.c (ada_add_standard_exceptions)
9819         (ada_add_exceptions_from_frame, name_matches_regex)
9820         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9821         parameter type to compiled_regex.  Adjust.
9822         (ada_exceptions_list): Use compiled_regex.
9823         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9824         std::unique_ptr<compiled_regex>.
9825         (exception_catchpoint::~exception_catchpoint): Remove regfree
9826         call.
9827         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9828         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9829         * breakpoint.c (solib_catchpoint::compiled): Now a
9830         std::unique_ptr<compiled_regex>.
9831         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9832         (check_status_catch_solib): Adjust to use compiled_regex.
9833         (add_solib_catchpoint): Adjust to use compiled_regex.
9834         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9835         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9836         compiled_regex reference.  Adjust to use it.
9837         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9838         declaration.  Include "gdb_regex.h".
9839         (apropos_cmd): Change regex parameter to compiled_regex reference.
9840         * gdb_regex.c: New file.
9841         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9842         declarations.
9843         (class compiled_regex): New.
9844         * linux-tdep.c: Include "common/gdb_optional.h".
9845         (struct mapping_regexes): New, factored out from
9846         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9847         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9848         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9849         * probe.c: Include "common/gdb_optional.h".
9850         (collect_probes): Use compiled_regex and gdb::optional and remove
9851         cleanups.
9852         * skip.c: Include "common/gdb_optional.h".
9853         (skiplist_entry::compiled_function_regexp): Now a
9854         gdb::optional<compiled_regex>.
9855         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9856         (free_skiplist_entry): Remove regfree call.
9857         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9858         compiled_regex and gdb::optional.
9859         * symtab.c: Include "common/gdb_optional.h".
9860         (search_symbols): Use compiled_regex and gdb::optional.
9861         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9862         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9863         to gdb_regex.c.
9864
9865 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9866
9867         * regcache.c (regcache::save): Avoid buffer use.
9868         (regcache::dump): Likewise.
9869
9870 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9871
9872         * sh-tdep.c (sh_pseudo_register_read): Remove
9873         MAX_REGISTER_SIZE.
9874         (sh_pseudo_register_write): Likewise.
9875         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9876         (sh64_pseudo_register_write): Likewise
9877
9878 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9879
9880         * aarch64-tdep.c (aarch64_store_return_value): Use
9881         V_REGISTER_SIZE.
9882         (aarch64_pseudo_read_value): Likewise.
9883         (aarch64_pseudo_write): Likewise.
9884
9885 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9886
9887         * regformats/regdef.h (set_register_cache): Remove the
9888         declaration.
9889
9890 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9891
9892         * frame.c (frame_unwind_register_signed): Use
9893         frame_unwind_register_value.
9894
9895 2017-06-06  Pedro Alves  <palves@redhat.com>
9896
9897         PR breakpoints/21553
9898         * breakpoint.c (create_breakpoints_sal_default)
9899         (init_breakpoint_sal, create_breakpoint_sal): Use
9900         gdb::unique_xmalloc_ptr for string parameters.
9901         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9902         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9903         (base_breakpoint_create_breakpoints_sal)
9904         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9905         (strace_marker_create_breakpoints_sal)
9906         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9907         string parameters.
9908         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9909         gdb::unique_xmalloc_ptr for string parameters.
9910         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9911         parameters.
9912
9913 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9914
9915         * alpha-tdep.c (alpha_register_to_value): Use
9916         get_frame_register_value.
9917         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9918
9919 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9920
9921         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9922         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9923         (ia64_value_to_register): Likewise.
9924         (ia64_extract_return_value): Likewise.
9925         (ia64_store_return_value): Likewise.
9926         (ia64_push_dummy_call): Likewise.
9927
9928 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9929
9930         GDB 8.0 released.
9931
9932 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9933
9934         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9935
9936 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9937
9938         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9939         parameter.
9940         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9941
9942 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9943
9944         * event-loop.c (poll_timers): Unallocate timer using delete
9945         instead of xfree.
9946
9947 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9948
9949         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9950         (struct breakpoint) <~breakpoint>: New.
9951         (struct watchpoint): Inherit from breakpoint.
9952         <~watchpoint>: New.
9953         <base>: Remove.
9954         (struct tracepoint): Inherit from breakpoint.
9955         <base>: Remove.
9956         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9957         (struct longjmp_breakpoint): Inherit from breakpoint.
9958         <~longjmp_breakpoint>: New.
9959         <base>: Remove.
9960         (new_breakpoint_from_type): Remove casts.
9961         (watchpoint_in_thread_scope): Remove reference to base field.
9962         (watchpoint_del_at_next_stop): Likewise.
9963         (update_watchpoint): Likewise.
9964         (watchpoint_check): Likewise.
9965         (bpstat_check_watchpoint): Likewise.
9966         (set_longjmp_breakpoint): Likewise.
9967         (struct fork_catchpoint): Inherit from breakpoint.
9968         <base>: Remove.
9969         (struct solib_catchpoint): Inherit from breakpoint.
9970         <~solib_catchpoint>: New.
9971         <base>: Remove.
9972         (dtor_catch_solib): Change to ...
9973         (solib_catchpoint::~solib_catchpoint): ... this.
9974         (breakpoint_hit_catch_solib): Remove reference to base field.
9975         (add_solib_catchpoint): Likewise.
9976         (create_fork_vfork_event_catchpoint): Likewise.
9977         (struct exec_catchpoint): Inherit from breakpoint.
9978         <~exec_catchpoint>: New.
9979         <base>: Remove.
9980         (dtor_catch_exec): Change to ...
9981         (exec_catchpoint::~exec_catchpoint): ... this.
9982         (dtor_watchpoint): Change to ...
9983         (watchpoint::~watchpoint): ... this.
9984         (watch_command_1): Remove reference to base field.
9985         (catch_exec_command_1): Likewise.
9986         (base_breakpoint_dtor): Change to ...
9987         (breakpoint::~breakpoint): ... this.
9988         (base_breakpoint_ops): Remove dtor field value.
9989         (longjmp_bkpt_dtor): Change to ...
9990         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9991         (strace_marker_create_breakpoints_sal): Remove reference to base
9992         field.
9993         (delete_breakpoint): Don't manually call breakpoint destructor.
9994         (create_tracepoint_from_upload): Remove reference to base field.
9995         (trace_pass_set_count): Likewise.
9996         (initialize_breakpoint_ops): Don't initialize
9997         momentary_breakpoint_ops, don't set dtors.
9998         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9999         <~ada_catchpoint>: New.
10000         <base>: Remove.
10001         (create_excep_cond_exprs): Remove reference to base field.
10002         (dtor_exception): Change to ...
10003         (ada_catchpoint::~ada_catchpoint): ... this.
10004         (dtor_catch_exception): Remove.
10005         (dtor_catch_exception_unhandled): Remove.
10006         (dtor_catch_assert): Remove.
10007         (create_ada_exception_catchpoint): Remove reference to base
10008         field.
10009         (initialize_ada_catchpoint_ops): Don't set dtors.
10010         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10011         breakpoint.
10012         <~signal_catchpoint>: New.
10013         <base>: Remove.
10014         (signal_catchpoint_dtor): Change to ...
10015         (signal_catchpoint::~signal_catchpoint): ... this.
10016         (create_signal_catchpoint): Remove reference to base field.
10017         (initialize_signal_catchpoint_ops): Don't set dtor.
10018         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10019         from breakpoint.
10020         <~syscall_catchpoint>: New.
10021         <base>: Remove.
10022         (dtor_catch_syscall): Change to ...
10023         (syscall_catchpoint::~syscall_catchpoint): ... this.
10024         (create_syscall_event_catchpoint): Remove reference to base
10025         field.
10026         (initialize_syscall_catchpoint_ops): Don't set dtor.
10027         * break-catch-throw.c (struct exception_catchpoint): Inherit
10028         from breakpoint.
10029         <~exception_catchpoint>: New.
10030         <base>: Remove.
10031         (dtor_exception_catchpoint): Change to ...
10032         (exception_catchpoint::~exception_catchpoint): ... this.
10033         (handle_gnu_v3_exceptions): Remove reference to base field.
10034         (initialize_throw_catchpoint_ops): Don't set dtor.
10035         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10036         field.
10037         * remote.c (remote_get_tracepoint_status): Likewise.
10038         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10039         * tracefile.c (tracefile_fetch_registers): Likewise.
10040         * tracepoint.c (actions_command): Likewise.
10041         (validate_actionline): Likewise.
10042         (tfind_1): Likewise.
10043         (get_traceframe_location): Likewise.
10044         (find_matching_tracepoint_location): Likewise.
10045         (parse_tracepoint_status): Likewise.
10046         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10047
10048 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10049
10050         * breakpoint.c (struct longjmp_breakpoint): New struct.
10051         (is_tracepoint_type): Change return type to bool.
10052         (is_longjmp_type): New function.
10053         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10054         (set_raw_breakpoint_without_location): Use
10055         new_breakpoint_from_type.
10056         (set_raw_breakpoint): Likewise.
10057
10058 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10059
10060         * breakpoint.c (new_breakpoint_from_type): New function.
10061         (create_breakpoint_sal): Use new_breakpoint_from_type and
10062         unique_ptr.
10063         (create_breakpoint): Likewise.
10064
10065 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10066
10067         * memattr.c (mem_info_command): Rename to ...
10068         (info_mem_command): ... this.
10069         (mem_enable_command): Rename to ...
10070         (enable_mem_command): ... this.
10071         (mem_disable_command): Rename to ...
10072         (disable_mem_command): ... this.
10073         (mem_delete_command): Rename to ...
10074         (delete_mem_command): ... this.
10075         (_initialize_mem): Adjust function names.
10076
10077 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10078
10079         * btrace.c (handle_pt_insn_events): New.
10080         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10081         STATUS.  Split into this and ...
10082         (handle_pt_insn_event_flags): ... this.
10083
10084 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10085
10086         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10087         and struct pt_insn.resynced.
10088         * configure: Regenerated.
10089         * config.in: Regenerated.
10090
10091 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10092
10093         * btrace.c (ftrace_find_call_by_number): New function.
10094         (ftrace_new_function): Store objects, not pointers.
10095         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10096         ftrace_new_gap, ftrace_update_function,
10097         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10098         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10099         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10100         btrace_ends_with_single_insn, btrace_call_get): Account for
10101         btrace_thread_info::functions now storing objects.
10102         * btrace.h (struct btrace_thread_info): Add constructor.
10103         (struct btrace_thread_info) <functions>: Make std::vector.
10104         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10105         Initialize with default values.
10106         * record-btrace.c (record_btrace_frame_sniffer): Account for
10107         btrace_thread_info::functions now storing objects.
10108
10109 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10110
10111         * btrace.c: Remove typedef bfun_s.
10112         (ftrace_new_gap): Directly add gaps to the list of gaps.
10113         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10114         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10115         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10116         instead of gdb VEC.
10117
10118 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10119
10120         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10121         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10122         with btrace_thread_info::next_segment and
10123         btrace_thread_info::prev_segment.
10124         * btrace.h: Remove struct btrace_func_link.
10125         (struct btrace_function): Replace pair of function segment pointers
10126         with pair of indices.
10127         * python/py-record-btrace.c (btpy_call_prev_sibling,
10128         btpy_call_next_sibling): Replace references to
10129         btrace_thread_info::segment with btrace_thread_info::next_segment and
10130         btrace_thread_info::prev_segment.
10131         * record-btrace.c (record_btrace_frame_this_id): Use
10132         btrace_find_call_by_number.
10133
10134 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10135
10136         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10137         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10138         btrace_insn_next, btrace_insn_prev): Remove references to
10139         btrace_thread_info::flow.
10140         * btrace.h (struct btrace_function): Remove FLOW.
10141
10142 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10143
10144         * btrace.c (ftrace_find_call_by_number): New function.
10145         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10146         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10147         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10148         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10149         index.
10150         * btrace.h (struct btrace_function): Turn UP into an index.
10151         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10152         as an index.
10153         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10154         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10155         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10156
10157 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10158
10159         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10160         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10161         ftrace_update_function, ftrace_compute_global_level_offset,
10162         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10163         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10164         btrace_insn_end, btrace_is_empty): Remove references to
10165         btrace_thread_info::begin and btrace_thread_info::end.
10166         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10167         (struct btrace_thread_info) <functions>: Adjust comment.
10168         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10169         btrace_thread_info::begin.
10170
10171 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10172
10173         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10174         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10175         ftrace_update_function): Remove arguments that implicitly were always
10176         BTINFO->END.
10177         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10178         Don't pass BTINFO->END.
10179
10180 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10181
10182         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10183         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10184         btrace_find_insn_by_number): Replace function segment pointer with
10185         index.
10186         (btrace_insn_cmp): Simplify.
10187         * btrace.h: (struct btrace_insn_iterator) Rename index to
10188         insn_index.  Replace function segment pointer with index into function
10189         segment vector.
10190         * record-btrace.c (record_btrace_call_history): Replace function
10191         segment pointer use with index.
10192         (record_btrace_frame_sniffer): Retrieve function call segment through
10193         vector.
10194         (record_btrace_set_replay): Remove defunc't safety check.
10195
10196 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10197
10198         * btrace.c (btrace_ends_with_single_insn): New function.
10199         (btrace_call_get, btrace_call_number, btrace_call_begin,
10200         btrace_call_end, btrace_call_next, btrace_call_prev,
10201         btrace_find_call_by_number): Use index into call segment vector
10202         instead of pointer.
10203         (btrace_call_cmp): Simplify.
10204         * btrace.h (struct btrace_call_iterator): Replace function call segment
10205         pointer with index into vector.
10206         * record-btrace.c (record_btrace_call_history): Use index instead of
10207         pointer.
10208
10209 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10210
10211         * btrace.c (btrace_insn_begin, btrace_insn_end,
10212         btrace_find_insn_by_number): Add btinfo to iterator.
10213         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10214
10215 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10216
10217         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10218         and save pointers directly.
10219         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10220         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10221         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10222         changed signature of functions.
10223         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10224         (btrace_fetch): Remove code that adds btrace_function pointers to
10225         vector of btrace_functions.
10226         (btrace_clear): Simplify freeing vector of btrace_functions.
10227
10228 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10229
10230         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10231         Replace VEC_* with std::vector functions.
10232         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10233         (struct btrace_thread_info)<functions>: Change type to std::vector.
10234
10235 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10236
10237         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10238         "Removed targets and native configurations" up.  Merge duplicate
10239         "New commands" sub-sections.  Add "New options" sub-sections.
10240
10241 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10242
10243         * defs.h (copy_integer_to_size): New declaration.
10244         * findvar.c (copy_integer_to_size): New function.
10245         (do_cint_test): New selftest function.
10246         (copy_integer_to_size_test): Likewise.
10247         (_initialize_findvar): Likewise.
10248         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10249         (mips_fbsd_collect_reg): Use raw_collect_integer.
10250         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10251         (mips64_fill_gregset): Use raw_collect_integer
10252         (mips64_fill_fpregset): Use raw_supply_integer.
10253         * regcache.c (regcache::raw_supply_integer): New function.
10254         (regcache::raw_collect_integer): Likewise.
10255         * regcache.h: (regcache::raw_supply_integer): New declaration.
10256         (regcache::raw_collect_integer): Likewise.
10257
10258 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10259
10260         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10261         (COMMON_OBS): Add gdbarch-selftests.o.
10262         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10263         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10264         * gdbarch-selftests.c: New file.
10265         * regcache.h (regcache) <~regcache>: Mark it virtual if
10266         GDB_SELF_TEST.
10267         <raw_write>: Likewise.
10268
10269 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10270
10271         * regcache.c (current_regcache): Change it to
10272         regcache::current_regcache.
10273         (regcache_observer_target_changed): Update.
10274         (regcache_thread_ptid_changed): Make it a regcache static
10275         method.
10276         (regcache_thread_ptid_changed): Update.
10277         (class regcache_access): New.
10278         (current_regcache_test): Update.
10279         (_initialize_regcache): Update.
10280         * regcache.h: Include forward_list.
10281         (regcache): Declare regcache_thread_ptid_changed and declare
10282         registers_changed_ptid as friend.
10283
10284 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10285
10286         * i387-tdep.c (i387_register_to_value): Use register_size
10287         instead of TYPE_LENGTH.
10288         * m68k-tdep.c (m68k_register_to_value): Likewise.
10289
10290 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10291
10292         * i387-tdep.c (i387_convert_register_p): Return false if type
10293         code isn't TYPE_CODE_FLT.
10294
10295 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10296
10297         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10298         length is 4.
10299         (alpha_register_to_value): Remove type length check.
10300         (alpha_value_to_register): Likewise.
10301
10302 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10303
10304         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10305         TYPE_CODE_FLT.
10306
10307 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10308
10309         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10310         TYPE_CODE_FLT or not.
10311
10312 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10313
10314         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10315         * avr-tdep.c (avr_gdbarch_init): Likewise.
10316         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10317         * cris-tdep.c (cris_gdbarch_init): Likewise.
10318         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10319         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10320         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10321         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10322         * mep-tdep.c (mep_gdbarch_init): Likewise.
10323         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10324         * mips-tdep.c (mips_gdbarch_init): Likewise.
10325         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10326         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10327         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10328         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10329         * v850-tdep.c (v850_gdbarch_init): Likewise.
10330
10331 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10332
10333         * selftest-arch.c (tests_with_arch): Call registers_changed
10334         and reinit_frame_cache.
10335         * selftest.c (run_self_tests): Likewise.
10336
10337 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10338
10339         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10340         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10341
10342 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10343
10344         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10345         set_gdbarch_print_insn.
10346
10347 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10348
10349         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10350         set_gdbarch_print_insn.
10351
10352 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10353
10354         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10355         set_gdbarch_print_insn.
10356         * arc-tdep.c (arc_gdbarch_init): Likewise.
10357         * arch-utils.c: include dis-asm.h.
10358         (default_print_insn): New function.
10359         * arch-utils.h (default_print_insn): Declare.
10360         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10361         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10362         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10363         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10364         * frv-tdep.c (frv_gdbarch_init): Likewise.
10365         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10366         * gdbarch.sh (print_insn): Use default_print_insn.
10367         * gdbarch.c: Regenerated.
10368         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10369         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10370         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10371         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10372         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10373         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10374         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10375         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10376         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10377         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10378         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10379         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10380         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10381         * mt-tdep.c (mt_gdbarch_init): Likewise.
10382         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10383         * nios2-tdep.c (nios2_print_insn): Remove.
10384         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10385         * rx-tdep.c (rx_gdbarch_init): Likewise.
10386         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10387         * score-tdep.c (score_print_insn): Remove.
10388         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10389         * sh-tdep.c (sh_gdbarch_init): Likewise.
10390         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10391         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10392         * tic6x-tdep.c (tic6x_print_insn): Remove.
10393         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10394         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10395         * v850-tdep.c (v850_gdbarch_init): Likewise.
10396         * vax-tdep.c (vax_gdbarch_init): Likewise.
10397         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10398         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10399
10400 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10401
10402         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10403         (MIPS_FP0_REGNUM): Remove.
10404         (MIPS_FSR_REGNUM): Remove.
10405         (mips_fbsd_supply_fpregs): Use mips_regnum.
10406         (mips_fbsd_supply_gregs): Likewise.
10407         (mips_fbsd_collect_fpregs): Likewise.
10408         (mips_fbsd_collect_gregs): Likewise.
10409
10410 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10411
10412         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10413         (getpfpregs_supplies): New function.
10414         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10415         getfpregs_supplies.
10416         (mips_fbsd_store_inferior_registers): Likewise.
10417
10418 2017-05-22  Pedro Alves <palves@redhat.com>
10419
10420         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10421         maintainer.
10422
10423 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10424
10425         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10426         (store_register): Likewise.
10427         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10428         (get_decimal_float_return_value): Likewise.
10429         (do_ppc_sysv_return_value): Likewise.
10430         (ppc64_sysv_abi_push_integer): Likewise.
10431         (ppc64_sysv_abi_push_freg): Likewise.
10432         (ppc64_sysv_abi_return_value_base): Likewise.
10433         (ppc64_sysv_abi_return_value): Likewise.
10434         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10435         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10436         * rs6000-nat.c: Likewise.
10437         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10438         (rs6000_value_to_register): Likewise.
10439         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10440
10441 2017-05-21  Tom Tromey  <tom@tromey.com>
10442
10443         PR rust/21466:
10444         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10445         arrays as "[T]", not "[T; ]".
10446
10447 2017-05-19  Tom Tromey  <tom@tromey.com>
10448
10449         PR rust/21484:
10450         * rust-lang.c (exp_descriptor_rust): New function.
10451         (rust_language_defn): Use it.
10452         * p-lang.c (pascal_language_defn): Update.
10453         * opencl-lang.c (opencl_language_defn): Update.
10454         * objc-lang.c (objc_language_defn): Update.
10455         * m2-lang.c (m2_language_defn): Update.
10456         * language.h (struct language_defn)
10457         <la_watch_location_expression>: New member.
10458         * language.c (unknown_language_defn, auto_language_defn)
10459         (local_language_defn): Update.
10460         * go-lang.c (go_language_defn): Update.
10461         * f-lang.c (f_language_defn): Update.
10462         * d-lang.c (d_language_defn): Update.
10463         * c-lang.h (c_watch_location_expression): Declare.
10464         * c-lang.c (c_watch_location_expression): New function.
10465         (c_language_defn, cplus_language_defn, asm_language_defn)
10466         (minimal_language_defn): Use it.
10467         * breakpoint.c (watch_command_1): Call
10468         la_watch_location_expression.
10469         * ada-lang.c (ada_language_defn): Update.
10470
10471 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10472
10473         PR tui/21482
10474         * gdb_curses.h (NOMACROS): Define.
10475         (NCURSES_NOMACROS): Define.
10476
10477 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10478
10479         PR tui/21482
10480         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10481         arg to char *.
10482         * tui/tui-wingeneral.c (box_win): Likewise.
10483         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10484         (tui_show_source_line): Likewise.
10485         (tui_show_exec_info_content): Likewise.
10486
10487 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10488
10489         * sparc-tdep.c (sparc_structure_return_p)
10490         (sparc_arg_on_registers_p): New functions.
10491         (sparc32_store_arguments): Use them.
10492         * sparc64-tdep.c (sparc64_16_byte_align_p)
10493         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10494         Handle TYPE_CODE_ARRAY.
10495
10496 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10497
10498         * cli/cli-decode.c (add_alias_cmd): New function.
10499         * command.h (add_alias_cmd): Declare.
10500         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10501         instead call add_alias_cmd.
10502
10503 2017-05-17  Pedro Alves  <palves@redhat.com>
10504
10505         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10506         (nat_makefile_frag): ... this.  All references updated.
10507         * configure.ac: Likewise.
10508         * configure.nat: Likewise.  Enhance comments.
10509         * configure: Regenerate.
10510
10511 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10512
10513         * procfs.c (procfs_create_inferior): Change prototype to match
10514         definition.
10515
10516 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10517
10518         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10519         C++ compiler warning.
10520
10521 2017-05-12  Tom Tromey  <tom@tromey.com>
10522
10523         PR rust/21483:
10524         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10525         recurse, just call value_struct_elt directly.
10526
10527 2017-05-12  Tom Tromey  <tom@tromey.com>
10528
10529         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10530         OP_RUST_ARRAY>: Fix.
10531
10532 2017-05-12  Tom Tromey  <tom@tromey.com>
10533
10534         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10535
10536 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10537
10538         * regcache.c: Include <forward_list>.
10539         (struct regcache_list): Remove.
10540         (current_regcache): Update.
10541         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10542         (regcache_thread_ptid_changed): Likewise.
10543         (registers_changed_ptid): Likewise.
10544         (current_regcache_size): Likewise.
10545
10546 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10547
10548         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10549         (current_regcache_size): New function.
10550         (current_regcache_test): New function.
10551         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10552
10553 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10554
10555         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10556         (print_gp_register_row): Use get_frame_register_value.
10557
10558 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10559
10560         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10561         (mips_supply_fpregset): Likewise.
10562         (mips64_supply_gregset): Likewise.
10563
10564 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10565
10566         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10567         regcache->raw_supply_zeroed.
10568
10569 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10570
10571         * configure.nat: Rearrange 'case' statements to match
10572         host before cpu.
10573
10574 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10575
10576         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10577         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10578         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10579         "@nat_extra_makefile_frag@".
10580         (Makefile): Remove dependency on "@frags@".
10581         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10582         (data-directory/Makefile): Likewise.
10583         * config/aarch64/linux.mh: Deleted; moved contents to
10584         "gdb/configure.nat".
10585         * config/alpha/alpha-linux.mh: Likewise.
10586         * config/alpha/nbsd.mh: Likewise.
10587         * config/arm/linux.mh: Likewise.
10588         * config/arm/nbsdelf.mh: Likewise.
10589         * config/i386/cygwin.mh: Likewise.
10590         * config/i386/cygwin64.mh: Likewise.
10591         * config/i386/darwin.mh: Likewise.
10592         * config/i386/fbsd.mh: Likewise.
10593         * config/i386/fbsd64.mh: Likewise.
10594         * config/i386/go32.mh: Likewise.
10595         * config/i386/i386gnu.mh: Likewise.
10596         * config/i386/i386sol2.mh: Likewise.
10597         * config/i386/linux.mh: Likewise.
10598         * config/i386/linux64.mh: Likewise.
10599         * config/i386/mingw.mh: Likewise.
10600         * config/i386/mingw64.mh: Likewise.
10601         * config/i386/nbsd64.mh: Likewise.
10602         * config/i386/nbsdelf.mh: Likewise.
10603         * config/i386/nto.mh: Likewise.
10604         * config/i386/obsd.mh: Likewise.
10605         * config/i386/obsd64.mh: Likewise.
10606         * config/i386/sol2-64.mh: Likewise.
10607         * config/ia64/linux.mh: Likewise.
10608         * config/m32r/linux.mh: Likewise.
10609         * config/m68k/linux.mh: Likewise.
10610         * config/m68k/nbsdelf.mh: Likewise.
10611         * config/m68k/obsd.mh: Likewise.
10612         * config/m88k/obsd.mh: Likewise.
10613         * config/mips/fbsd.mh: Likewise.
10614         * config/mips/linux.mh: Likewise.
10615         * config/mips/nbsd.mh: Likewise.
10616         * config/mips/obsd64.mh: Likewise.
10617         * config/pa/linux.mh: Likewise.
10618         * config/pa/nbsd.mh: Likewise.
10619         * config/pa/obsd.mh: Likewise.
10620         * config/powerpc/aix.mh: Likewise.
10621         * config/powerpc/fbsd.mh: Likewise.
10622         * config/powerpc/linux.mh: Likewise.
10623         * config/powerpc/nbsd.mh: Likewise.
10624         * config/powerpc/obsd.mh: Likewise.
10625         * config/powerpc/ppc64-linux.mh: Likewise.
10626         * config/powerpc/spu-linux.mh: Likewise.
10627         * config/s390/linux.mh: Likewise.
10628         * config/sh/nbsd.mh: Likewise.
10629         * config/sparc/fbsd.mh: Likewise.
10630         * config/sparc/linux.mh: Likewise.
10631         * config/sparc/linux64.mh: Likewise.
10632         * config/sparc/nbsd64.mh: Likewise.
10633         * config/sparc/nbsdelf.mh: Likewise.
10634         * config/sparc/obsd64.mh: Likewise.
10635         * config/sparc/sol2.mh: Likewise.
10636         * config/tilegx/linux.mh: Likewise.
10637         * config/vax/nbsdelf.mh: Likewise.
10638         * config/vax/obsd.mh: Likewise.
10639         * config/xtensa/linux.mh: Likewise.
10640         * config/i386/i386gnu.mn: New file, with excerpts from
10641         "config/i386/i386gnu.mh".
10642         * configure: Regenerate.
10643         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10644         *.mh files under "gdb/config".
10645         * configure.nat: New file, with contents from the
10646         "gdb/config/*/*.mh" files.
10647
10648 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10649
10650         * btrace.c (btrace_clear): Free insn vector.
10651
10652 2017-05-05  Pedro Alves  <palves@redhat.com>
10653
10654         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10655         * configure: Regenerate.
10656
10657 2017-05-04  Pedro Alves  <palves@redhat.com>
10658
10659         * Makefile.in (SFILES): Add progspace-and-thread.c.
10660         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10661         (COMMON_OBS): Add progspace-and-thread.o.
10662         * breakpoint.c: Include "progspace-and-thread.h".
10663         (update_inserted_breakpoint_locations)
10664         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10665         Use scoped_restore_current_pspace_and_thread.
10666         (create_std_terminate_master_breakpoint): Use
10667         scoped_restore_current_program_space.
10668         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10669         (print_breakpoint_location): Use
10670         scoped_restore_current_program_space.
10671         (bp_loc_is_permanent): Use
10672         scoped_restore_current_pspace_and_thread.
10673         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10674         (download_tracepoint_locations): Use
10675         scoped_restore_current_pspace_and_thread.
10676         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10677         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10678         (enum step_over_calls_kind): Moved from inferior.h.
10679         (class scoped_restore_current_thread): New class.
10680         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10681         declaration.
10682         (scoped_restore_current_thread): New class.
10683         * infcmd.c: Include "common/gdb_optional.h".
10684         (continue_1, proceed_after_attach): Use
10685         scoped_restore_current_thread.
10686         (notice_new_inferior): Use scoped_restore_current_thread.
10687         * inferior.c: Include "progspace-and-thread.h".
10688         (restore_inferior, save_current_inferior): Delete.
10689         (add_inferior_command, clone_inferior_command): Use
10690         scoped_restore_current_pspace_and_thread.
10691         * inferior.h (scoped_restore_current_inferior): New class.
10692         * infrun.c: Include "progspace-and-thread.h" and
10693         "common/gdb_optional.h".
10694         (follow_fork_inferior): Use
10695         scoped_restore_current_pspace_and_thread.
10696         (scoped_restore_exited_inferior): New class.
10697         (handle_vfork_child_exec_or_exit): Use
10698         scoped_restore_exited_inferior,
10699         scoped_restore_current_pspace_and_thread,
10700         scoped_restore_current_thread and scoped_restore.
10701         (fetch_inferior_event): Use scoped_restore_current_thread.
10702         * linespec.c (decode_line_full, decode_line_1): Use
10703         scoped_restore_current_program_space.
10704         * mi/mi-main.c: Include "progspace-and-thread.h".
10705         (exec_continue): Use scoped_restore_current_thread.
10706         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10707         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10708         * proc-service.c (ps_pglobal_lookup): Use
10709         scoped_restore_current_program_space.
10710         * progspace-and-thread.c: New file.
10711         * progspace-and-thread.h: New file.
10712         * progspace.c (release_program_space, clone_program_space): Use
10713         scoped_restore_current_program_space.
10714         (restore_program_space, save_current_program_space)
10715         (save_current_space_and_thread): Delete.
10716         (switch_to_program_space_and_thread): Moved to
10717         progspace-and-thread.c.
10718         * progspace.h (save_current_program_space)
10719         (save_current_space_and_thread): Delete declarations.
10720         (scoped_restore_current_program_space): New class.
10721         * remote.c (remote_btrace_maybe_reopen): Use
10722         scoped_restore_current_thread.
10723         * symtab.c: Include "progspace-and-thread.h".
10724         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10725         * thread.c (print_thread_info_1): Use
10726         scoped_restore_current_thread.
10727         (struct current_thread_cleanup): Delete.
10728         (do_restore_current_thread_cleanup)
10729         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10730         (scoped_restore_current_thread::~scoped_restore_current_thread):
10731         ... this new dtor.
10732         (make_cleanup_restore_current_thread): Rename/convert to ...
10733         (scoped_restore_current_thread::scoped_restore_current_thread):
10734         ... this new ctor.
10735         (thread_apply_all_command): Use scoped_restore_current_thread.
10736         (thread_apply_command): Use scoped_restore_current_thread.
10737         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10738         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10739
10740 2017-05-04  Pedro Alves  <palves@redhat.com>
10741
10742         * thread.c (make_cleanup_restore_current_thread): Move
10743         find_thread_ptid call before the is_stopped call.  Assert that the
10744         thread is found.  Replace is_stopped call by checking the thread's
10745         state directly.  Remove unnecessary NULL-thread check.
10746
10747 2017-05-04  Pedro Alves  <palves@redhat.com>
10748
10749         * corelow.c (thread_section_name): New class.
10750         (get_core_register_section, get_core_siginfo): Use it.
10751
10752 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10753
10754         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10755         (get_core_register_section): Remove xfree of NULL pointer.
10756
10757 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10758
10759         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10760         * regcache.c (regcache::raw_supply_zeroed): New function.
10761         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10762
10763 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10764
10765         * gdbarch.sh: Remove commented out definition of
10766         TARGET_CHAR_BIT.
10767         * gdbarch.h: Re-generate.
10768
10769 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10770
10771         * configure: Regenerate.
10772
10773 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10774
10775         * solib-target.c (solib_target_relocate_section_addresses):
10776         Remove num_section_bases, num_bases, segment_bases variables.
10777
10778 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10779
10780         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10781
10782 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10783
10784         * solib-target.c: Include <vector>
10785         (struct lm_info_target) <~lm_info_target>: Remove.
10786         <segment_bases, section_bases>: Change type to
10787         std::vector<CORE_ADDR>.
10788         (library_list_start_segment, library_list_start_section,
10789         library_list_end_library,
10790         solib_target_relocate_section_addresses): Adjust.
10791
10792 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10793
10794         * gdbarch.sh (software_single_step): Change return type to
10795         std::vector<CORE_ADDR>.
10796         * gdbarch.c, gdbarch.h: Re-generate.
10797         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10798         Adjust.
10799         (arm_deal_with_atomic_sequence_raw): Adjust.
10800         (thumb_get_next_pcs_raw): Adjust.
10801         (arm_get_next_pcs_raw): Adjust.
10802         (arm_get_next_pcs): Adjust.
10803         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10804         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10805         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10806         (alpha_software_single_step): Adjust.
10807         * alpha-tdep.h (alpha_software_single_step): Adjust.
10808         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10809         * arm-tdep.c (arm_software_single_step): Adjust.
10810         (arm_breakpoint_kind_from_current_state): Adjust.
10811         * arm-tdep.h (arm_software_single_step): Adjust.
10812         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10813         * cris-tdep.c (cris_software_single_step): Adjust.
10814         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10815         (micromips_deal_with_atomic_sequence): Adjust.
10816         (deal_with_atomic_sequence): Adjust.
10817         (mips_software_single_step): Adjust.
10818         * mips-tdep.h (mips_software_single_step): Adjust.
10819         * moxie-tdep.c (moxie_software_single_step): Adjust.
10820         * nios2-tdep.c (nios2_software_single_step): Adjust.
10821         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10822         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10823         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10824         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10825         * sparc-tdep.c (sparc_software_single_step): Adjust.
10826         * spu-tdep.c (spu_software_single_step): Adjust.
10827         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10828
10829 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10830
10831         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10832         * gdbarch.h: Re-generate.
10833
10834 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10835
10836         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10837         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10838         * python/py-instruction.c, python/py-instruction.h: New file.
10839         * python/py-record.c: Add py-instruction.h include.
10840         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10841         gdb.RecordInstruction.
10842         * python/python-internal.h: Add gdbpy_initialize_instruction
10843         declaration.
10844         * python/python.c (do_start_initialization): Add
10845         gdbpy_initialize_instruction.
10846
10847 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10848
10849         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10850         Remove.
10851         (btrace_func_from_recpy_func): New function.
10852         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10853         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10854         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10855         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10856         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10857         Also, use new helper functions.
10858         (btpy_list_item): Use new helper functions.
10859         (recpy_bt_function_call_history): Use new type name.
10860         (btpy_call_getset): Remove.
10861         (gdbpy_initialize_btrace): Remove code to initialize
10862         gdb.BtraceFunctionCall.
10863         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10864         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10865         recpy_bt_func_prev, recpy_bt_func_next): New export.
10866         * python/py-record.c (recpy_func_type): New static object.
10867         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10868         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10869         recpy_func_next): New function.
10870         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10871         (recpy_func_getset): New static object.
10872         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10873         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10874
10875 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10876
10877         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10878         (btpy_object, btpy_insn_type, btpy_new): Remove.
10879         (btpy_list_object): Use gdb.RecordInstruction type instead of
10880         gdb.BtraceInstruction type.
10881         (btrace_insn_from_recpy_insn): New function.
10882         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10883         btpy_new.
10884         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10885         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10886         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10887         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10888         instead of btpy_object.
10889         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10890         btpy_insn_data, btpy_insn_decode): Rename to ...
10891         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10892         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10893         recpy_bt_insn_decode): This.  Also, use new helper functions.
10894         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10895         recpy_insn_type.
10896         (btpy_insn_getset): Remove.
10897         (gdbpy_initialize_btrace): Remove code to initialize
10898         gdb.BtraceInstruction.  Use recpy_element_object.
10899         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10900         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10901         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10902         * python/py-record.c (recpy_insn_type): New static object.
10903         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10904         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10905         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10906         New function.
10907         (recpy_insn_getset): New static object.
10908         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10909         * python/py-record.h (recpy_element_object): New typedef.
10910         (recpy_insn_type, recpy_insn_new): New export.
10911
10912 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10913
10914         * py-record-btrace.c (btpy_insn_new): Removed.
10915         (btpy_insn_or_gap_new): New function.
10916         (btpy_insn_error): Removed.
10917         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10918         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10919         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10920         btpy_insn_or_gap_new instead of btpy_insn_new.
10921         (btpy_insn_getset): Remove btpy_insn_error.
10922         * py-record.c (recpy_gap_type): New static object.
10923         (recpy_gap_object): New typedef.
10924         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10925         recpy_gap_reason_string): New function.
10926         (recpy_gap_getset): New static object.
10927         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10928         * py-record.h (recpy_gap_new): New export.
10929
10930 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10931
10932         * python/py-record.c (recpy_ptid): Remove.
10933         (recpy_record_getset): Remove recpy_ptid.
10934
10935 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10936
10937         * btrace.c (btrace_fetch): Set inferior_ptid.
10938         * python/py-record-btrace.c: Add "py-record.h" include.
10939         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10940         recpy_bt_end, recpy_bt_instruction_history,
10941         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10942         in gdb.Record object instead of current ptid.
10943         * python/py-record.c: Include new "py-record.h" file.
10944         (recpy_record_object): Moved to py-record.h.
10945         * python/py-record.h: New file.
10946
10947 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10948
10949         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10950         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10951         indentation.
10952
10953 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10954
10955         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10956         the past maintainers section.
10957
10958 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10959
10960         * infcmd.c (get_return_value): Use regcache ctor, and remove
10961         cleanup.
10962
10963 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10964             Pedro Alves  <palves@redhat.com>
10965
10966         * regcache.c (regcache::regcache): New tag dispatch ctor.
10967         (do_cooked_read): Moved above.
10968         (regcache_dup): Use the tag dispatch ctor..
10969         * regcache.h (regcache): Declare ctor, delete copy ctor and
10970         assignment operator, remove friend regcache_dup.
10971
10972 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10973
10974         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10975         call method save instead of regcache_cpy.
10976         * regcache.h (struct regcache): Make regcache_dup a friend.
10977
10978 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10979
10980         * regcache.c (struct regcache): Move to regcache.h
10981         (regcache::arch): New method.
10982         (regcache_get_ptid): Update.
10983         (get_regcache_arch): Call arch method.
10984         (get_regcache_aspace): Call method aspace.
10985         (register_buffer): Change it to method.
10986         (regcache_save): Change it to regcache::save.
10987         (regcache_restore): Likewise.
10988         (regcache_cpy_no_passthrough): Remove the declaration.
10989         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10990         (regcache_cpy_no_passthrough): Change it to method
10991         cpy_no_passthrough.
10992         (regcache_register_status): Change it to method
10993         get_register_status.
10994         (regcache_invalidate): Change it to method invalidate.
10995         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10996         (regcache_raw_update): Change it to method raw_update.
10997         (regcache_raw_read): Likewise.
10998         (regcache_raw_read_signed): Likewise.
10999         (regcache_raw_read_unsigned): Likewise.
11000         (regcache_raw_write_signed): Likewise.
11001         (regcache_raw_write_unsigned): Likewise.
11002         (regcache_cooked_read): Likewise.
11003         (regcache_cooked_read_value): Likewise.
11004         (regcache_cooked_read_signed): Likewise.
11005         (regcache_cooked_read_unsigned): Likewise.
11006         (regcache_cooked_write_signed): Likewise.
11007         (regcache_cooked_write_unsigned): Likewise.
11008         (regcache_raw_set_cached_value): Likewise.
11009         (regcache_raw_write): Likewise.
11010         (regcache_cooked_write): Likewise.
11011         (regcache_xfer_part): Likewise.
11012         (regcache_raw_read_part): Likewise.
11013         (regcache_raw_write_part): Likewise.
11014         (regcache_cooked_read_part): Likewise.
11015         (regcache_cooked_write_part): Likewise.
11016         (regcache_raw_supply): Likewise.
11017         (regcache_raw_collect): Likewise.
11018         (regcache_transfer_regset): Likewise.
11019         (regcache_supply_regset): Likewise.
11020         (regcache_collect_regset): Likewise.
11021         (regcache_debug_print_register): Likewise.
11022         (enum regcache_dump_what): Move it to regcache.h.
11023         (regcache_dump): Change it to method dump.
11024         * regcache.h (enum regcache_dump_what): New.
11025         (class regcache): New.
11026         * target.c (target_fetch_registers): Call method
11027         debug_print_register.
11028         (target_store_registers): Likewise.
11029
11030 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11031
11032         * windows-nat.c (struct lm_info_windows): Initialize field.
11033         (windows_make_so): Allocate lm_info_windows with new.
11034         (windows_free_so): Free lm_info_windows with delete.
11035
11036 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11037
11038         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11039         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11040         cleanup.
11041         (darwin_free_so): Free lm_info_darwin with delete.
11042
11043 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11044
11045         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11046         <l_addr_p>: Change type to bool.
11047         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11048         (svr4_free_so): Free lm_info_svr4 with delete.
11049         (svr4_copy_library_list): Replace memcpy with call to copy
11050         constructor.
11051         (library_list_start_library, svr4_default_sos): Allocate
11052         lm_info_svr4 with new.
11053
11054 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11055
11056         * solib-target.c (struct lm_info_target): Add destructor,
11057         initialize fields.
11058         <name>: Change type to std::string.
11059         (library_list_start_library): Allocate lm_info_target with new.
11060         (solib_target_free_library_list): Free lm_info_target with
11061         delete.
11062         (solib_target_current_sos): Adapt to std::string.
11063         (solib_target_free_so): Free lm_info_target with delete.
11064
11065 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11066
11067         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11068         fields.
11069         (frv_current_sos): Allocate lm_info_frv with new.
11070         (frv_relocate_main_executable): Free lm_info_frv with delete,
11071         allocate with new.
11072         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11073
11074 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11075
11076         * solib-frv.c (struct lm_info_frv): Fix indentation.
11077
11078 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11079
11080         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11081         map field.
11082         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11083         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11084         and allocate with new.
11085         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11086
11087 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11088
11089         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11090         <filename, member_name>: Change type to std::string.
11091         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11092         (library_list_start_library): Allocate lm_info_aix with new.
11093         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11094         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11095         with copy constructor.
11096
11097 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11098
11099         * solist.h (struct lm_info): Remove.
11100         (struct lm_info_base): New class.
11101         (struct so_list) <lm_info>: Change type to lm_info_base *.
11102         * nto-tdep.c (struct lm_info): Remove.
11103         (lm_addr): Adjust.
11104         * solib-aix.c (struct lm_info): Rename to ...
11105         (struct lm_info_aix): ... this.  Extend lm_info_base.
11106         (lm_info_p): Rename to ...
11107         (lm_info_aix_p): ... this, and adjust.
11108         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11109         solib_aix_parse_libraries, library_list_start_library,
11110         solib_aix_free_library_list, solib_aix_parse_libraries,
11111         solib_aix_get_library_list,
11112         solib_aix_relocate_section_addresses, solib_aix_free_so,
11113         solib_aix_get_section_offsets,
11114         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11115         Adjust.
11116         (struct solib_aix_inferior_data) <library_list>: Adjust.
11117         * solib-darwin.c (struct lm_info): Rename to ...
11118         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11119         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11120         * solib-dsbt.c (struct lm_info): Rename to ...
11121         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11122         (struct dsbt_info) <main_executable_lm_info): Adjust.
11123         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11124         dsbt_relocate_section_addresses): Adjust.
11125         * solib-frv.c (struct lm_info): Rename to ...
11126         (struct lm_info_frv): ... this.  Extend lm_info_base.
11127         (main_executable_lm_info): Adjust.
11128         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11129         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11130         find_canonical_descriptor_in_load_object,
11131         frv_fdpic_find_canonical_descriptor): Adjust.
11132         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11133         to lm_info_svr4.
11134         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11135         svr4_clear_so, svr4_copy_library_list,
11136         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11137         svr4_current_sos, svr4_fetch_objfile_link_map,
11138         solist_update_incremental): Adjust.
11139         * solib-svr4.h (struct lm_info_svr4): Move here from
11140         solib-svr4.c.
11141         * solib-target.c (struct lm_info): Rename to ...
11142         (struct lm_info_target): ... this.  Extend lm_info_base.
11143         (lm_info_p): Rename to ...
11144         (lm_info_target_p): ... this.
11145         (solib_target_parse_libraries, library_list_start_segment,
11146         library_list_start_section, library_list_start_library,
11147         library_list_end_library, solib_target_free_library_list,
11148         solib_target_current_sos, solib_target_free_so,
11149         solib_target_relocate_section_addresses): Adjust.
11150         * windows-nat.c (struct lm_info): Rename to ...
11151         (struct lm_info_windows): ... this.  Extend lm_info_base.
11152         (windows_make_so, handle_load_dll, handle_unload_dll,
11153         windows_xfer_shared_libraries): Adjust.
11154
11155 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11156
11157         * solib-darwin.c (struct darwin_so_list): Remove.
11158         (darwin_current_sos): Allocate an so_list object instead of a
11159         darwin_so_list, separately allocate an lm_info object.
11160         (darwin_free_so): Free lm_info.
11161
11162 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11163
11164         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11165         with fprintf_filtered.
11166
11167 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11168
11169         * regcache.c (regcache::regcache): New function.
11170         (regcache::~regcache): New function.
11171         (regcache_xmalloc_1): Remove.
11172         (regcache_xmalloc): Call new regcache.
11173         (regcache_xfree): Call delete regcache.
11174         (get_thread_arch_aspace_regcache): Call new regcache.
11175
11176 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11177
11178         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11179         lwp instead of ptid_get_lwp.
11180
11181 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11182
11183         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11184         lwp_info instead of getting from inferior_ptid.
11185
11186 2017-04-27  Keith Seitz  <keiths@redhat.com>
11187
11188         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11189         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11190         (CV_CONVERSION_BADNESS): Define.
11191         (rank_one_type): Remove overly restrictive rvalue reference
11192         rank checks.
11193         Add cv-qualifier checks and subranks for type equality.
11194         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11195         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11196         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11197
11198 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11199
11200         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11201         count when creating the object.
11202
11203 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11204             Ulrich Weigand  <uweigand@de.ibm.com>
11205
11206         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11207         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11208         is used in AIX.
11209         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11210         (process_xcoff_symbol): Likewise.
11211         (scan_xcoff_symtab): Likewise.
11212
11213 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11214
11215         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11216         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11217         (ia64_access_reg): Use get_frame_register_unsigned.
11218         (ia64_access_rse_reg): Likewise.
11219         (ia64_libunwind_frame_prev_register): Likewise.
11220
11221 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11222
11223         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11224         * gdbarch.c: Regenerated.
11225         * gdbarch.h: Regenerated.
11226         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11227         visibility external.
11228         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11229         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11230         (enum cfa_how_kind): Move to ...
11231         (struct dwarf2_frame_state_reg_info): Likewise.
11232         (struct dwarf2_frame_state): Likewise.
11233         * dwarf2-frame.h: ... here.
11234         (dwarf2_frame_state_alloc_regs): New declaration.
11235         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11236         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11237
11238 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11239
11240         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11241         regcache_raw_read_unsigned.
11242         (xtensa_pseudo_register_write): Likewise.
11243
11244 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11245
11246         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11247         (nds32_pseudo_register_write): Likewise.
11248
11249 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11250
11251         * regcache.c (struct regcache) <readonly_p>: Change its type
11252         to bool.
11253         (regcache_xmalloc_1): Update parameter type and callers update.
11254
11255 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11256
11257         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11258         set_gdbarch_wchar_bit.
11259         * arm-tdep.c (arm_gdbarch_init): Likewise.
11260
11261 2017-04-25  Pedro Alves  <palves@redhat.com>
11262
11263         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11264         (BothAreRelocatable, memcopy, memmove): Don't define.
11265         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11266         macros.
11267
11268 2017-04-25  Pedro Alves  <palves@redhat.com>
11269
11270         * common/common-defs.h: Include "common/poison.h".
11271         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11272         and adjust.
11273         * common/poison.h: New file.
11274         * common/traits.h: Include <type_traits>.
11275         (Not, Or, Requires): New, moved from common/function-view.h.
11276
11277 2017-04-25  Pedro Alves  <palves@redhat.com>
11278
11279         * breakpoint.h (struct breakpoint): In-class initialize all
11280         fields.  Make boolean fields "bool".
11281         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11282         memset call and initializations no longer necessary.
11283
11284 2017-04-25  Pedro Alves  <palves@redhat.com>
11285
11286         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11287         reference.
11288         (pt_btrace_insn): New function.
11289         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11290
11291 2017-04-25  Pedro Alves  <palves@redhat.com>
11292
11293         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11294         "base" field and inherit from "bp_location" instead.  Add
11295         non-default ctor.
11296         (allocate_location_exception): Use new non-default ctor.
11297         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11298         (init_bp_location): Convert to ...
11299         (bp_location::bp_location): ... this new ctor, and remove memset
11300         call.
11301         (base_breakpoint_allocate_location): Use the new non-default ctor.
11302         * breakpoint.h (bp_location): Now a class.  Declare default and
11303         non-default ctors.  In-class initialize all members.
11304         (init_bp_location): Remove declaration.
11305
11306 2017-04-25  Pedro Alves  <palves@redhat.com>
11307
11308         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11309         assignment operator.
11310
11311 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11312
11313         * doublest.c (convert_doublest_to_floatformat): Call
11314         floatformat_totalsize_bytes.
11315
11316 2017-04-22  Tom Tromey  <tom@tromey.com>
11317
11318         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11319         ui_out_emit_list.
11320         * stack.c (print_frame): Use ui_out_emit_list.
11321         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11322         ui_out_emit_list.
11323         * mi/mi-main.c (print_one_inferior)
11324         (mi_cmd_data_list_register_names)
11325         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11326         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11327         ui_out_emit_list.
11328         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11329         (mi_output_solib_attribs): Use ui_out_emit_list,
11330         ui_out_emit_tuple.
11331         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11332         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11333         (mi_cmd_stack_list_args, list_args_or_locals): Use
11334         ui_out_emit_list.
11335         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11336         * breakpoint.c (print_solib_event, output_thread_groups): Use
11337         ui_out_emit_list.
11338
11339 2017-04-22  Tom Tromey  <tom@tromey.com>
11340
11341         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11342         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11343         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11344
11345 2017-04-22  Tom Tromey  <tom@tromey.com>
11346
11347         * tracepoint.c (tvariables_info_1)
11348         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11349
11350 2017-04-22  Tom Tromey  <tom@tromey.com>
11351
11352         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11353         annotate_arg_emitter.
11354         * breakpoint.c (print_mention_watchpoint)
11355         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11356         * annotate.h (struct annotate_arg_emitter): New.
11357
11358 2017-04-22  Tom Tromey  <tom@tromey.com>
11359
11360         * record-btrace.c (record_btrace_insn_history)
11361         (record_btrace_insn_history_range, record_btrace_call_history)
11362         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11363         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11364         ui_out_emit_tuple.
11365         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11366         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11367         * skip.c (skip_info): Use ui_out_emit_tuple.
11368         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11369         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11370         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11371         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11372         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11373         ui_out_emit_tuple.
11374         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11375         (output_register, mi_cmd_data_read_memory)
11376         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11377         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11378         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11379         Use ui_out_emit_tuple.
11380         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11381         ui_out_emit_tuple.
11382         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11383         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11384         * linux-thread-db.c (info_auto_load_libthread_db): Use
11385         ui_out_emit_tuple.
11386         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11387         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11388         * disasm.c (do_mixed_source_and_assembly_deprecated)
11389         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11390         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11391         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11392         * breakpoint.c (print_one_breakpoint_location)
11393         (print_one_breakpoint): Use ui_out_emit_tuple.
11394         * auto-load.c (print_script, info_auto_load_cmd): Use
11395         ui_out_emit_tuple.
11396         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11397
11398 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11399
11400         * thread.c (print_thread_info_1): Remove dead code.
11401
11402 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11403
11404         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11405         GDB_SELF_TEST.
11406         * arm-tdep.c (selftests::arm_record_test): Likewise.
11407
11408 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11409
11410         * regcache.c (regcache_restore): Remove argument 2.  Replace
11411         argument 3 with regcache.  Get register status from
11412         src->register_status and get register contents from
11413         register_buffer (src, regnum).
11414         (regcache_cpy): Update.
11415
11416 2017-04-19  Pedro Alves  <palves@redhat.com>
11417
11418         * gdbthread.h (thread): Add missing closing parenthesis in
11419         comment.
11420
11421 2017-04-19  Pedro Alves  <palves@redhat.com>
11422
11423         * common/refcounted-object.h: New file.
11424         * gdbthread.h: Include "common/refcounted-object.h".
11425         (thread_info): Inherit from refcounted_object and add comments.
11426         (thread_info::incref, thread_info::decref)
11427         (thread_info::m_refcount): Delete.
11428         (thread_info::deletable): Use the refcounted_object::refcount()
11429         method.
11430         * inferior.c (current_inferior_): Add comment.
11431         (set_current_inferior): Increment/decrement refcounts.
11432         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11433         not-deletable instead of comparing with the current inferior.
11434         (initialize_inferiors): Increment the initial inferior's refcount.
11435         * inferior.h (struct inferior): Forward declare.
11436         Include "common/refcounted-object.h".
11437         (current_inferior, set_current_inferior): Move declaration to
11438         before struct inferior's definition, and fix comment.
11439         (inferior): Inherit from refcounted_object.  Add comments.
11440         * thread.c (switch_to_thread_no_regs): Reference the thread's
11441         inferior pointer directly instead of doing a ptid lookup.
11442         (switch_to_no_thread): New function.
11443         (switch_to_thread(thread_info *)): New function, factored out
11444         from ...
11445         (switch_to_thread(ptid_t)): ... this.
11446         (restore_current_thread): Delete.
11447         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11448         fields, and add 'inf' field.
11449         (do_restore_current_thread_cleanup): Check whether old->inf is
11450         alive instead of looking up an inferior by ptid.  Use
11451         switch_to_thread and switch_to_no_thread.
11452         (restore_current_thread_cleanup_dtor): Use old->inf directly
11453         instead of lookup up an inferior by id.  Decref the inferior.
11454         Don't restore 'removable'.
11455         (make_cleanup_restore_current_thread): Same the inferior pointer
11456         in old, instead of the inferior number.  Incref the inferior.
11457         Don't save/clear 'removable'.
11458
11459 2017-04-19  Pedro Alves  <palves@redhat.com>
11460
11461         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11462         unittests/scoped_restore-selftests.c.
11463         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11464         * common/scoped_restore.h (scoped_restore_base): Make "class".
11465         (scoped_restore_base::release): New public method.
11466         (scoped_restore_base::scoped_restore_base): New protected ctor.
11467         (scoped_restore_base::m_saved_var): New protected field.
11468         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11469         scoped_restore_base base class instead of m_saved_var directly.
11470         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11471         (scoped_restore_tmpl::scoped_restore_tmpl(const
11472         scoped_restore_tmpl<T>&)): Likewise.
11473         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11474         method.
11475         (scoped_restore_tmpl::saved_var): New method.
11476         (scoped_restore_tmpl::m_saved_var): Delete.
11477         * inferior.h (inferior::detaching): Now a bool.
11478         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11479         cleanup.
11480         * unittests/scoped_restore-selftests.c: New file.
11481
11482 2017-04-19  Pedro Alves  <palves@redhat.com>
11483
11484         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11485         Re-sort in alphabetic order.
11486
11487 2017-04-18  Pedro Alves  <palves@redhat.com>
11488
11489         * xml-support.c (obstack_xml_printf): Delete.
11490         * xml-support.h (obstack_xml_printf): Delete.
11491
11492 2017-04-18  Pedro Alves  <palves@redhat.com>
11493
11494         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11495         vdebug, verror, body_text, start_element, end_element, name,
11496         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11497         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11498         is_xinclude>: Make private and add m_ prefix.
11499         (gdb_xml_parser::body_text): New method, based on ...
11500         (gdb_xml_body_text): ... this.  Adjust.
11501         (gdb_xml_parser::vdebug): New method, based on ...
11502         (gdb_xml_debug): ... this.  Adjust.
11503         (gdb_xml_parser::verror): New method, based on ...
11504         (gdb_xml_error): ... this.  Adjust.
11505         (gdb_xml_parser::start_element): New method, based on ...
11506         (gdb_xml_start_element): ... this.  Adjust.
11507         (gdb_xml_start_element_wrapper): Defer to
11508         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11509         (gdb_xml_parser::end_element): New method, based on ...
11510         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11511         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11512         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11513         (gdb_xml_parser::use_dtd): New method, based on ...
11514         (gdb_xml_use_dtd): ... this.  Adjust.
11515         (gdb_xml_parser::parse): New method, based on ...
11516         (gdb_xml_parse): ... this.  Adjust.
11517         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11518         (xinclude_start_include): Adjust to call the parser's name method.
11519         (xml_xinclude_default, xml_xinclude_start_doctype)
11520         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11521         method.
11522         (xml_process_xincludes): Adjust to call parser methods.
11523         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11524         declarations.
11525
11526 2017-04-18  Pedro Alves  <palves@redhat.com>
11527
11528         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11529         gdb::optional<std::string>.
11530         * xml-support.c: Include <string>.
11531         (scope_level::scope_level(scope_level &&))
11532         (scope_level::~scope_level): Delete.
11533         (scope_level::body): Now a std::string.
11534         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11535         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11536         parameter.
11537         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11538         (xinclude_parsing_data::output): Now a std::string reference.
11539         (xinclude_start_include): Adjust.
11540         (xml_xinclude_default): Adjust.
11541         (xml_process_xincludes): Add 'output' parameter, and return bool.
11542         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11543         and return bool.
11544         * xml-tdesc.c: Include <unordered_map> and <string>.
11545         (tdesc_xml_cache): Delete.
11546         (tdesc_xml_cache_s): Delete.
11547         (xml_cache): Now an std::unordered_map.
11548         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11549         (target_fetch_description_xml): Change return type to
11550         gdb::optional<std::string>, and adjust.
11551         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11552         (target_fetch_description_xml): Change return type to
11553         gdb::optional<std::string>.
11554
11555 2017-04-18  Pedro Alves  <palves@redhat.com>
11556
11557         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11558         unittests/optional-selftests.c.
11559         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11560         * unittests/optional-selftests.c: New file.
11561         * unittests/optional/assignment/1.cc: New file.
11562         * unittests/optional/assignment/2.cc: New file.
11563         * unittests/optional/assignment/3.cc: New file.
11564         * unittests/optional/assignment/4.cc: New file.
11565         * unittests/optional/assignment/5.cc: New file.
11566         * unittests/optional/assignment/6.cc: New file.
11567         * unittests/optional/assignment/7.cc: New file.
11568         * unittests/optional/cons/copy.cc: New file.
11569         * unittests/optional/cons/default.cc: New file.
11570         * unittests/optional/cons/move.cc: New file.
11571         * unittests/optional/cons/value.cc: New file.
11572         * unittests/optional/in_place.cc: New file.
11573         * unittests/optional/observers/1.cc: New file.
11574         * unittests/optional/observers/2.cc: New file.
11575
11576 2017-04-18  Pedro Alves  <palves@redhat.com>
11577
11578         * common/gdb_optional.h: Include common/traits.h.
11579         (in_place_t): New type.
11580         (in_place): New constexpr variable.
11581         (optional::optional): Remove member initialization of
11582         m_instantiated.
11583         (optional::optional(in_place_t...)): New constructor.
11584         (optional::~optional): Use reset.
11585         (optional::optional(const optional&)): New.
11586         (optional::optional(const optional&&)): New.
11587         (optional::optional(T &)): New.
11588         (optional::optional(T &&)): New.
11589         (operator::operator=(const optional &)): New.
11590         (operator::operator=(optional &&)): New.
11591         (operator::operator= (const T &))
11592         (operator::operator= (T &&))
11593         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11594         (operator::reset): New.
11595         (operator::m_instantiated):: Add in-class initializer.
11596         * common/traits.h: Include <type_traits>.
11597         (struct And): New types.
11598
11599 2017-04-18  Pedro Alves  <palves@redhat.com>
11600
11601         * xml-support.c: Include <vector>.
11602         (scope_level::scope_level(const gdb_xml_element *))
11603         (scope_level::scope_level(scope_level&&)): New.
11604         (scope_level::~scope_level): New.
11605         (scope_level_s): Delete.
11606         (gdb_xml_parser::scopes): Now a std::vector.
11607         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11608         Use std::vector.
11609         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11610         scope cleanup code.
11611         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11612         of the scopes member.  Use std::vector::emplace_back.
11613
11614 2017-04-18  Pedro Alves  <palves@redhat.com>
11615
11616         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11617         a bool.
11618         (gdb_xml_end_element): Change type of first parameter.
11619         (gdb_xml_cleanup): Rename to ...
11620         (gdb_xml_parser::~gdb_xml_parser): ... this.
11621         (gdb_xml_create_parser_and_cleanup): Delete with ...
11622         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11623         to this new ctor.
11624         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11625         using gdb_xml_create_parser_and_cleanup.
11626         (xinclude_parsing_data): Add ctor/dtor.
11627         (xml_xinclude_cleanup): Delete.
11628         (xml_process_xincludes): Create a local xinclude_parsing_data
11629         instead of heap-allocating one.  Create a local gdb_xml_parser
11630         instead of heap-allocating one with
11631         gdb_xml_create_parser_and_cleanup.
11632
11633 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11634
11635         PR threads/20743
11636         * fbsd-nat.c (resume_one_thread_cb): Remove.
11637         (resume_all_threads_cb): Remove.
11638         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11639         iterate_over_threads.
11640
11641 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11642
11643         * NEWS: Create a new section for the next release branch.
11644         Rename the section of the current branch, now that it has
11645         been cut.
11646
11647 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11648
11649         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11650         * version.in: Bump version to 8.0.50.DATE-git.
11651
11652 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11653
11654         PR gdb/21385
11655         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11656         independently of the host, and fix build breakage on Cygwin.
11657
11658 2017-04-13  Pedro Alves  <palves@redhat.com>
11659
11660         * inferior.c (free_inferior): Convert to ...
11661         (inferior::~inferior): ... this dtor.
11662         (inferior::inferior): New ctor, factored out from ...
11663         (add_inferior_silent): ... here.  Allocate the inferior with a new
11664         expression.
11665         (delete_inferior): Call delete instead of free_inferior.
11666         * inferior.h (gdb_environ, continuation): Forward declare.
11667         (inferior): Now a class.  Add in-class initialization to all
11668         members.  Make boolean fields bool, except 'detaching'.
11669         (inferior::inferior): New explicit ctor.
11670         (inferior::~inferior): New.
11671
11672 2017-04-13  Pedro Alves  <palves@redhat.com>
11673
11674         * inferior.c (init_inferior_list): Delete.
11675         * inferior.h (init_inferior_list): Delete.
11676
11677 2017-04-13  Pedro Alves  <palves@redhat.com>
11678
11679         PR threads/13217
11680         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11681         (top level): Call it twice, with different thread sets.
11682
11683 2017-04-13  Pedro Alves  <palves@redhat.com>
11684
11685         * thread.c: Include <algorithm>.
11686         (thread_array_cleanup): Delete.
11687         (scoped_inc_dec_ref): New class.
11688         (live_threads_count): New function.
11689         (set_thread_refcount): Delete.
11690         (tp_array_compar_ascending): Now a bool.
11691         (tp_array_compar): Convert to a std::sort comparison function.
11692         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11693         and live_threads_count.
11694
11695 2017-04-13  Pedro Alves  <palves@redhat.com>
11696
11697         * infrun.c (follow_fork_inferior): Also switch the current
11698         inferior.
11699
11700 2017-04-13  Pedro Alves  <palves@redhat.com>
11701
11702         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11703         before calling create_internal_breakpoint.
11704
11705 2017-04-13  Pedro Alves  <palves@redhat.com>
11706
11707         * fork-child.c (execv_argv): New class.
11708         (breakup_args): Refactored as ...
11709         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11710         Copy arguments to storage and replace separators with NULL
11711         terminators in place.
11712         (escape_bang_in_quoted_argument): Adjust to return bool.
11713         (execv_argv::execv_argv): New ctor.
11714         (execv_argv::init_for_shell): New method, factored out from
11715         fork_inferior.  Don't strdup strings into the vector.
11716         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11717         Remove free_vector_argv call.
11718
11719 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11720
11721         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11722         tdep->rx_psw_type.
11723
11724 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11725
11726         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11727         * rx-tdep.c (rx_gdbarch_init): Likewise.
11728
11729 2017-04-13  Pedro Alves  <palves@redhat.com>
11730
11731         * breakpoint.h (struct breakpoint): Reindent.
11732
11733 2017-04-13  Pedro Alves  <palves@redhat.com>
11734
11735         * breakpoint.c (bp_location): Rename to ...
11736         (bp_locations): ... this.  All references updated.
11737         (bp_location_count): Rename to ...
11738         (bp_locations_count): ... this.  All references updated.
11739         (bp_location_placed_address_before_address_max): Rename to ...
11740         (bp_locations_placed_address_before_address_max): ... this.  All
11741         references updated.
11742         (bp_location_shadow_len_after_address_max): Rename to ...
11743         (bp_locations_shadow_len_after_address_max): ... this.  All
11744         references updated.
11745         (bp_location_compare_addrs): Rename to ...
11746         (bp_locations_compare_addrs): ... this.  All references updated.
11747         (bp_location_compare):Rename to ...
11748         (bp_locations_compare): ... this.  All references updated.
11749         (bp_location_target_extensions_update): Rename to ...
11750         (bp_locations_target_extensions_update): ... this.  All references
11751         updated.
11752
11753 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11754
11755         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11756         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11757         'sgtty.h'.
11758         * common/gdb_termios.h: New file, with parts of "terminal.h".
11759         * inflow.c: Include "gdb_termios.h".
11760         * ser-unix.c: Include "gdb_termios.h".
11761         * terminal.h: Move terminal-related defines to
11762         "common/gdb_termios.h".
11763
11764 2017-04-12  Tom Tromey  <tom@tromey.com>
11765
11766         * probe.c (parse_probes): Update.
11767         * location.h (delete_event_location): Don't declare.
11768         (event_location_deleter::operator()): Update.
11769         * location.c (event_location_deleter::operator()): Rename from
11770         delete_event_location.
11771         * linespec.h (linespec_result) <location>: Change type to
11772         event_location_up.
11773         * linespec.c (canonicalize_linespec, event_location_to_sals)
11774         (decode_objc): Update.
11775         (linespec_result): Don't call delete_event_location.
11776         * breakpoint.c (create_breakpoints_sal)
11777         (bkpt_probe_create_sals_from_location)
11778         (strace_marker_create_sals_from_location): Update.
11779
11780 2017-04-12  Tom Tromey  <tom@tromey.com>
11781
11782         * linespec.h (struct linespec_result): Add constructor and
11783         destructor.
11784         (init_linespec_result, destroy_linespec_result)
11785         (make_cleanup_destroy_linespec_result): Don't declare.
11786         * linespec.c (init_linespec_result): Remove.
11787         (linespec_result::~linespec_result): Rename from
11788         destroy_linespec_result.  Update.
11789         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11790         Remove.
11791         * breakpoint.c (create_breakpoint, break_range_command)
11792         (decode_location_default): Update.
11793         * ax-gdb.c (agent_command_1): Update.
11794
11795 2017-04-12  Tom Tromey  <tom@tromey.com>
11796
11797         * remote.c (remote_download_tracepoint): Update.
11798         * python/py-breakpoint.c (bppy_get_location): Update.
11799         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11800         (gdbscm_breakpoint_location): Update.
11801         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11802         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11803         Change type to event_location_up.
11804         * breakpoint.c (create_overlay_event_breakpoint)
11805         (create_longjmp_master_breakpoint)
11806         (create_std_terminate_master_breakpoint)
11807         (create_exception_master_breakpoint)
11808         (breakpoint_event_location_empty_p, print_breakpoint_location)
11809         (print_one_breakpoint_location, create_thread_event_breakpoint)
11810         (init_breakpoint_sal, create_breakpoint)
11811         (print_recreate_ranged_breakpoint, break_range_command)
11812         (init_ada_exception_breakpoint, say_where): Update.
11813         (base_breakpoint_dtor): Don't call delete_event_location.
11814         (bkpt_print_recreate, tracepoint_print_recreate)
11815         (dprintf_print_recreate, update_static_tracepoint)
11816         (breakpoint_re_set_default): Update.
11817
11818 2017-04-12  Tom Tromey  <tom@tromey.com>
11819
11820         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11821         type of "to_do".  Update.
11822         (compute_stack_depth): Use std::vector.
11823
11824 2017-04-12  Tom Tromey  <tom@tromey.com>
11825
11826         * printcmd.c (find_instruction_backward): Use std::vector.
11827
11828 2017-04-12  Tom Tromey  <tom@tromey.com>
11829
11830         * symfile.c (objfilep): Remove typedef.
11831         (reread_symbols): Use a std::vector.
11832
11833 2017-04-12  Tom Tromey  <tom@tromey.com>
11834
11835         * mi/mi-main.c (exec_direction_forward): Remove.
11836         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11837         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11838         scoped_restore.
11839         * guile/guile.c (guile_repl_command, guile_command)
11840         (gdbscm_execute_gdb_command): Use scoped_restore.
11841         * go-exp.y (go_parse): Use scoped_restore.
11842         * d-exp.y (d_parse): Use scoped_restore.
11843         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11844         * c-exp.y (c_parse): Use scoped_restore.
11845
11846 2017-04-12  Tom Tromey  <tom@tromey.com>
11847
11848         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11849         (mi_parse): Update return type.
11850         (mi_parse_free): Remove.
11851         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11852         (mi_parse::~mi_parse): Rename from mi_parse_free.
11853         (mi_parse_cleanup): Remove.
11854         (mi_parse): Return a unique_ptr.  Use new.
11855         * mi/mi-main.c (mi_execute_command): Update.
11856
11857 2017-04-12  Tom Tromey  <tom@tromey.com>
11858
11859         * location.c (explicit_location_lex_one): Return a
11860         unique_xmalloc_ptr.
11861         (string_to_explicit_location): Update.  Remove cleanups.
11862
11863 2017-04-12  Tom Tromey  <tom@tromey.com>
11864
11865         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11866         (compare_value_and_voffset): Change type.  Update.
11867         (compute_vtable_size): Change type of "offset_vec".
11868         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11869         (gnuv3_get_typeid): Remove extraneous declaration.
11870
11871 2017-04-12  Tom Tromey  <tom@tromey.com>
11872
11873         * charset.h (wchar_iterator): Fix comment.
11874
11875 2017-04-12  Tom Tromey  <tom@tromey.com>
11876
11877         * charset.c (iconv_wrapper): New class.
11878         (cleanup_iconv): Remove.
11879         (convert_between_encodings): Use it.
11880
11881 2017-04-12  Tom Tromey  <tom@tromey.com>
11882
11883         * symfile.h (increment_reading_symtab): Update type.
11884         * symfile.c (decrement_reading_symtab): Remove.
11885         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11886         * psymtab.c (psymtab_to_symtab): Update.
11887         * dwarf2read.c (dw2_instantiate_symtab): Update.
11888
11889 2017-04-12  Tom Tromey  <tom@tromey.com>
11890
11891         * jit.c (struct jit_reader): Declare separately.  Add constructor
11892         and destructor.  Change type of "handle".
11893         (loaded_jit_reader): Define separately.
11894         (jit_reader_load): Update.  New "new".
11895         (jit_reader_unload_command): Use "delete".
11896         * gdb-dlfcn.h (struct dlclose_deleter): New.
11897         (gdb_dlhandle_up): New typedef.
11898         (gdb_dlopen, gdb_dlsym): Update types.
11899         (gdb_dlclose): Remove.
11900         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11901         (gdb_dlsym): Change type of "handle".
11902         (make_cleanup_dlclose): Remove.
11903         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11904         * compile/compile-c-support.c (load_libcc): Update.
11905
11906 2017-04-12  Tom Tromey  <tom@tromey.com>
11907
11908         * symtab.h (find_pcs_for_symtab_line): Change return type.
11909         * symtab.c (find_pcs_for_symtab_line): Change return type.
11910         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11911         type of "vec".  Update.
11912         (ltpy_get_pcs_for_line): Update.
11913         * linespec.c (decode_digits_ordinary): Update.
11914
11915 2017-04-12  Tom Tromey  <tom@tromey.com>
11916
11917         * tracepoint.c (actions_command): Update.
11918         * python/python.c (python_command, python_interactive_command):
11919         Update.
11920         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11921         * guile/guile.c (guile_command): Update.
11922         * defs.h (read_command_lines, read_command_lines_1): Return
11923         command_line_up.
11924         (command_lines_deleter): New struct.
11925         (command_line_up): New typedef.
11926         * compile/compile.c (compile_code_command)
11927         (compile_print_command): Update.
11928         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11929         command_line_up.
11930         (make_cleanup_free_command_lines): Remove.
11931         * cli/cli-script.c (get_command_line, read_command_lines_1)
11932         (copy_command_lines): Return command_line_up.
11933         (while_command, if_command, read_command_lines, define_command)
11934         (document_command): Update.
11935         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11936         Remove.
11937         * breakpoint.h (breakpoint_set_commands): Change type of
11938         "commands".
11939         * breakpoint.c (breakpoint_set_commands): Change type of
11940         "commands".  Update.
11941         (do_map_commands_command, update_dprintf_command_list)
11942         (create_tracepoint_from_upload): Update.
11943
11944 2017-04-12  Tom Tromey  <tom@tromey.com>
11945
11946         * tracepoint.c (scope_info): Update.
11947         * spu-tdep.c (spu_catch_start): Update.
11948         * python/python.c (gdbpy_decode_line): Update.
11949         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11950         * python/py-breakpoint.c (bppy_init): Update.
11951         * probe.c (parse_probes): Update.
11952         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11953         * location.h (event_location_deleter): New struct.
11954         (event_location_up): New typedef.
11955         (new_linespec_location, new_address_location, new_probe_location)
11956         (new_explicit_location, copy_event_location)
11957         (string_to_event_location, string_to_event_location_basic)
11958         (string_to_explicit_location): Update return type.
11959         (make_cleanup_delete_event_location): Remove.
11960         * location.c (new_linespec_location, new_address_location)
11961         (new_probe_location, new_explicit_location, copy_event_location):
11962         Return event_location_up.
11963         (delete_event_location_cleanup)
11964         (make_cleanup_delete_event_location): Remove.
11965         (string_to_explicit_location, string_to_event_location_basic)
11966         (string_to_event_location): Return event_location_up.
11967         * linespec.c (canonicalize_linespec, event_location_to_sals)
11968         (decode_line_with_current_source)
11969         (decode_line_with_last_displayed, decode_objc): Update.
11970         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11971         * completer.c (location_completer): Update.
11972         * cli/cli-cmds.c (edit_command, list_command): Update.
11973         * breakpoint.c (create_overlay_event_breakpoint)
11974         (create_longjmp_master_breakpoint)
11975         (create_std_terminate_master_breakpoint)
11976         (create_exception_master_breakpoint)
11977         (create_thread_event_breakpoint): Update.
11978         (init_breakpoint_sal): Update.  Remove some dead code.
11979         (create_breakpoint_sal): Change type of "location".  Update.
11980         (create_breakpoints_sal, create_breakpoint, break_command_1)
11981         (dprintf_command, break_range_command, until_break_command)
11982         (init_ada_exception_breakpoint)
11983         (strace_marker_create_sals_from_location)
11984         (update_static_tracepoint, trace_command, ftrace_command)
11985         (strace_command, create_tracepoint_from_upload): Update.
11986         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11987         * ax-gdb.c (agent_command_1): Update.
11988
11989 2017-04-12  Pedro Alves  <palves@redhat.com>
11990
11991         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11992         * configure.tgt: Handle i[34567]86-*-go32* and
11993         i[34567]86-*-msdosdjgpp*.
11994         * i386-tdep.c (i386_svr4_reg_to_regnum):
11995         Make extern.
11996         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11997         i386-go32-tdep.c.
11998         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11999         * i386-go32-tdep.c: New file.
12000         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12001         declarations.
12002
12003 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12004
12005         * aix-thread.c (pd_status2str): Change return type to const char *.
12006
12007 2017-04-12  Pedro Alves  <palves@redhat.com>
12008
12009         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12010         calls to set_gdbarch_gnu_triplet_regexp.
12011
12012 2017-04-12  Pedro Alves  <palves@redhat.com>
12013
12014         PR gdb/21323
12015         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12016         New enum value.
12017         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12018         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12019         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12020         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12021         * gdbarch.h, gdbarch.c: Regenerate.
12022         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12023         gdbarch_wchar_bit and gdbarch_wchar_signed.
12024         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12025         * arm-tdep.c (arm_gdbarch_init): Likewise.
12026         * avr-tdep.c (avr_gdbarch_init): Likewise.
12027         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12028         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12029         * i386-tdep.c (i386_go32_init_abi): Likewise.
12030         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12031         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12032         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12033         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12034         * sh-tdep.c (sh_gdbarch_init): Likewise.
12035         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12036         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12037         * windows-tdep.c (windows_init_abi): Likewise.
12038         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12039
12040 2017-04-12  Pedro Alves  <palves@redhat.com>
12041
12042         PR c++/21323
12043         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12044         cplus_primitive_type_char32_t>: New enum values.
12045         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12046         and cplus_primitive_type_char32_t.
12047         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12048         32, use the archtecture's built-in type for char16_t and char32_t,
12049         respectively.  Otherwise, fallback to init_integer_type as before,
12050         but make the type unsigned, and issue a complaint.
12051         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12052
12053 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12054
12055         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12056         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12057
12058 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12059
12060         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12061         'const char *'.
12062
12063 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12064
12065         * common/common-utils.c (free_vector_argv): New function.
12066         * common/common-utils.h: Include <vector>.
12067         (free_vector_argv): New prototype.
12068         * darwin-nat.c (darwin_create_inferior): Rewrite function
12069         prototype in order to constify "exec_file" and accept a
12070         "std::string" for "allargs".
12071         * fork-child.c: Include <vector>.
12072         (breakup_args): Rewrite function, using C++.
12073         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12074         and accept "std::string" for "allargs".  Update the code to
12075         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12076         and "execvp".
12077         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12078         order to constify "exec_file" and accept a "std::string" for
12079         "allargs".
12080         * go32-nat.c (go32_create_inferior): Likewise.
12081         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12082         * infcmd.c (run_command_1): Constify "exec_file".  Use
12083         "std::string" for inferior arguments.
12084         * inferior.h (fork_inferior): Update prototype.
12085         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12086         prototype in order to constify "exec_file" and accept a
12087         "std::string" for "allargs".
12088         * nto-procfs.c (procfs_create_inferior): Likewise.
12089         * procfs.c (procfs_create_inferior): Likewise.
12090         * remote-sim.c (gdbsim_create_inferior): Likewise.
12091         * remote.c (extended_remote_run): Update code to accept
12092         "std::string" as argument.
12093         (extended_remote_create_inferior): Rewrite function prototype in
12094         order to constify "exec_file" and accept a "std::string" for
12095         "allargs".
12096         * rs6000-nat.c (super_create_inferior): Likewise.
12097         (rs6000_create_inferior): Likewise.
12098         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12099         * windows-nat.c (windows_create_inferior): Likewise.
12100
12101 2017-04-11  Pedro Alves  <palves@redhat.com>
12102
12103         * thread.c: Fix whitespace throughout.
12104
12105 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12106
12107         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12108
12109 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12110
12111         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12112
12113 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12114
12115         PR gdb/21364
12116         * osdata.c (info_osdata): Check if 'type' is an empty string
12117         instead of NULL.
12118
12119 2017-04-10  Pedro Alves  <palves@redhat.com>
12120
12121         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12122         (ptid_to_global_thread_id, in_thread_list)
12123         (do_captured_list_thread_ids, set_resumed, set_running)
12124         (set_executing, set_stop_requested, finish_thread_state)
12125         (validate_registers_access, can_access_registers_ptid)
12126         (print_thread_info_1, switch_to_thread)
12127         (do_restore_current_thread_cleanup)
12128         (make_cleanup_restore_current_thread, thread_command)
12129         (thread_name_command): Use operator== instead of ptid_equal.
12130
12131 2017-04-10  Pedro Alves  <palves@redhat.com>
12132
12133         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12134         (current_thread_cleanup_chain): Delete.
12135         (restore_current_thread_cleanup_dtor)
12136         (make_cleanup_restore_current_thread): Remove references to
12137         current_thread_cleanup_chain.
12138
12139 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12140
12141         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12142         REG_UNKNOWN.
12143
12144 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12145
12146         PR gdb/19942
12147         * gdbthread.h (thread_info::deletable): New method.
12148         (thread_info::incref): New method.
12149         (thread_info::decref): New method.
12150         (thread_info::refcount): Move it to private.
12151         * infrun.c (save_stop_context): Call inc_refcount.
12152         (release_stop_context_cleanup): Likewise.
12153         * thread.c (set_thread_exited): New function.
12154         (init_thread_list): Delete "tp" only it is deletable, otherwise
12155         call set_thread_exited.
12156         (delete_thread_1): Call set_thread_exited.
12157         (current_thread_cleanup) <inferior_pid>: Remove.
12158         <thread>: New field.
12159         (restore_current_thread_ptid_changed): Removed.
12160         (do_restore_current_thread_cleanup): Adjust.
12161         (restore_current_thread_cleanup_dtor): Don't call
12162         find_thread_ptid.
12163         (set_thread_refcount): Use dec_refcount.
12164         (make_cleanup_restore_current_thread): Adjust.
12165         (thread_apply_all_command): Call inc_refcount.
12166         (_initialize_thread): Don't call
12167         observer_attach_thread_ptid_changed.
12168
12169 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12170
12171         * thread.c (delete_thread_1): Hoist code on marking thread as
12172         exited.
12173
12174 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12175
12176         * windows-nat.c (windows_detach): Initialize ptid with
12177         minus_one_ptid.
12178
12179 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12180
12181         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12182
12183 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12184
12185         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12186         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12187         (bfin_pseudo_register_write): Likewise
12188
12189 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12190
12191         * common/ptid.h (struct ptid): Change to...
12192         (class ptid_t): ... this.
12193         <ptid_t>: New constructors.
12194         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12195         matches>: New methods.
12196         <make_null, make_minus_one>: New static methods.
12197         <pid>: Rename to...
12198         <m_pid>: ...this.
12199         <lwp>: Rename to...
12200         <m_lwp>: ...this.
12201         <tid>: Rename to...
12202         <m_tid>: ...this.
12203         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12204         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12205         as references, move comment to class ptid_t.
12206         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12207         ptid_t static methods.
12208         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12209         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12210         Take ptid arguments as references, implement using ptid_t methods.
12211         * unittests/ptid-selftests.c: New file.
12212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12213         unittests/ptid-selftests.c.
12214         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12215
12216 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12217
12218         * python/python.c (python_run_simple_file): Cast mode literal to
12219         non-const char pointer as expected by PyFile_FromString.
12220
12221 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12222
12223         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12224         minus_one_ptid and null_ptid.
12225
12226 2017-04-05  Pedro Alves  <palves@redhat.com>
12227
12228         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12229         * configure: Regenerate.
12230
12231 2017-04-05  Pedro Alves  <palves@redhat.com>
12232
12233         * ada-exp.y (yyerror): Constify.
12234         * ada-lang.c (bound_name, get_selections)
12235         (ada_variant_discrim_type)
12236         (ada_variant_discrim_name, ada_value_struct_elt)
12237         (ada_lookup_struct_elt_type, is_unchecked_variant)
12238         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12239         (catch_ada_exception_command_split)
12240         (catch_ada_assert_command_split, catch_assert_command)
12241         (ada_op_name): Constify.
12242         * ada-lang.h (ada_yyerror, get_selections)
12243         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12244         * arc-tdep.c (arc_print_frame_cache): Constify.
12245         * arm-tdep.c (arm_skip_stub): Constify.
12246         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12247         (gen_aggregate_elt_ref): Constify.
12248         * bcache.c (print_bcache_statistics): Constify.
12249         * bcache.h (print_bcache_statistics): Constify.
12250         * break-catch-throw.c (catch_exception_command_1):
12251         * breakpoint.c (struct ep_type_description::description):
12252         Constify.
12253         (add_solib_catchpoint): Constify.
12254         (catch_fork_command_1): Add cast.
12255         (add_catch_command): Constify.
12256         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12257         Constify.
12258         * bsd-uthread.c (bsd_uthread_state): Constify.
12259         * buildsym.c (patch_subfile_names): Constify.
12260         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12261         Constify.
12262         * c-exp.y (yyerror): Constify.
12263         (token::oper): Constify.
12264         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12265         * c-varobj.c (cplus_describe_child): Constify.
12266         * charset.c (find_charset_names): Add cast.
12267         (find_charset_names): Constify array and add const_cast.
12268         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12269         (edit_command): Constify.
12270         * cli/cli-decode.c (lookup_cmd): Constify.
12271         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12272         Constify.
12273         (struct dump_context): Constify.
12274         (add_dump_command, restore_command): Constify.
12275         * cli/cli-script.c (get_command_line): Constify.
12276         * cli/cli-script.h (get_command_line): Constify.
12277         * cli/cli-utils.c (check_for_argument): Constify.
12278         * cli/cli-utils.h (check_for_argument): Constify.
12279         * coff-pe-read.c (struct read_pe_section_data): Constify.
12280         * command.h (lookup_cmd): Constify.
12281         * common/print-utils.c (decimal2str): Constify.
12282         * completer.c (gdb_print_filename): Constify.
12283         * corefile.c (set_gnutarget): Constify.
12284         * cp-name-parser.y (yyerror): Constify.
12285         * cp-valprint.c (cp_print_class_member): Constify.
12286         * cris-tdep.c (cris_register_name, crisv32_register_name):
12287         Constify.
12288         * d-exp.y (yyerror): Constify.
12289         (struct token::oper): Constify.
12290         * d-lang.h (d_yyerror): Constify.
12291         * dbxread.c (struct header_file_location::name): Constify.
12292         (add_old_header_file, add_new_header_file, last_function_name)
12293         (dbx_next_symbol_text, add_bincl_to_list)
12294         (find_corresponding_bincl_psymtab, set_namestring)
12295         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12296         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12297         * defs.h (command_line_input, print_address_symbolic)
12298         (deprecated_readline_begin_hook): Constify.
12299         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12300         Constify.
12301         * event-top.c (handle_line_of_input): Constify and add cast.
12302         * exceptions.c (catch_errors): Constify.
12303         * exceptions.h (catch_errors): Constify.
12304         * expprint.c (print_subexp_standard, op_string, op_name)
12305         (op_name_standard, dump_raw_expression, dump_raw_expression):
12306         * expression.h (op_name, op_string, dump_raw_expression):
12307         Constify.
12308         * f-exp.y (yyerror): Constify.
12309         (struct token::oper): Constify.
12310         (struct f77_boolean_val::name): Constify.
12311         * f-lang.c (f_word_break_characters): Constify.
12312         * f-lang.h (f_yyerror): Constify.
12313         * fork-child.c (fork_inferior): Add cast.
12314         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12315         (new_variant): Constify.
12316         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12317         * gdbarch.c: Regenerate.
12318         * gdbcore.h (set_gnutarget): Constify.
12319         * go-exp.y (yyerror): Constify.
12320         (token::oper): Constify.
12321         * go-lang.h (go_yyerror): Constify.
12322         * go32-nat.c (go32_sysinfo): Constify.
12323         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12324         * guile/scm-cmd.c (cmdscm_function): Constify.
12325         * guile/scm-param.c (pascm_param_value): Constify.
12326         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12327         (h8300sx_register_name): Constify.
12328         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12329         Constify.
12330         * ia64-tdep.c (ia64_register_names): Constify.
12331         * infcmd.c (construct_inferior_arguments): Constify.
12332         (path_command, attach_post_wait): Constify.
12333         * language.c (show_range_command, show_case_command)
12334         (unk_lang_error): Constify.
12335         * language.h (language_defn::la_error)
12336         (language_defn::la_name_of_this): Constify.
12337         * linespec.c (decode_line_2): Constify.
12338         * linux-thread-db.c (thread_db_err_str): Constify.
12339         * lm32-tdep.c (lm32_register_name): Constify.
12340         * m2-exp.y (yyerror): Constify.
12341         * m2-lang.h (m2_yyerror): Constify.
12342         * m32r-tdep.c (m32r_register_names): Constify and make static.
12343         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12344         * m88k-tdep.c (m88k_register_name): Constify.
12345         * macroexp.c (appendmem): Constify.
12346         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12347         (upgrade_type, parse_external, parse_partial_symbols)
12348         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12349         (new_symbol): Constify.
12350         * memattr.c (mem_info_command): Constify.
12351         * mep-tdep.c (register_name_from_keyword): Constify.
12352         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12353         Constify.
12354         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12355         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12356         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12357         cast.
12358         (mi_execute_async_cli_command): Constify.
12359         * mips-tdep.c (mips_register_name): Constify.
12360         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12361         (am33_register_name, am33_2_register_name)
12362         * moxie-tdep.c (moxie_register_names): Constify.
12363         * nat/linux-osdata.c (osdata_type): Constify fields.
12364         * nto-tdep.c (nto_parse_redirection): Constify.
12365         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12366         (lookup_child_selector): Constify.
12367         (objc_methcall::name): Constify.
12368         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12369         (lookup_struct_typedef): Constify.
12370         * objfiles.c (pc_in_section): Constify.
12371         * objfiles.h (pc_in_section): Constify.
12372         * p-exp.y (struct token::oper): Constify.
12373         (yyerror): Constify.
12374         * p-lang.h (pascal_yyerror): Constify.
12375         * parser-defs.h (op_name_standard): Constify.
12376         (op_print::string): Constify.
12377         (exp_descriptor::op_name): Constify.
12378         * printcmd.c (print_address_symbolic): Constify.
12379         * psymtab.c (print_partial_symbols): Constify.
12380         * python/py-breakpoint.c (stop_func): Constify.
12381         (bppy_get_expression): Constify.
12382         * python/py-cmd.c (cmdpy_completer::name): Constify.
12383         (cmdpy_function): Constify.
12384         * python/py-event.c (evpy_add_attribute)
12385         (gdbpy_initialize_event_generic): Constify.
12386         * python/py-event.h (evpy_add_attribute)
12387         (gdbpy_initialize_event_generic): Constify.
12388         * python/py-evts.c (add_new_registry): Constify.
12389         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12390         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12391         * python/py-inferior.c (get_buffer): Add cast.
12392         * python/py-param.c (parm_constant::name): Constify.
12393         * python/py-unwind.c (fprint_frame_id): Constify.
12394         * python/python.c (gdbpy_parameter_value): Constify.
12395         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12396         * remote.c (memory_packet_config::name): Constify.
12397         (show_packet_config_cmd, remote_write_bytes)
12398         (remote_buffer_add_string):
12399         * reverse.c (exec_reverse_once): Constify.
12400         * rs6000-tdep.c (variant::name, variant::description): Constify.
12401         * rust-exp.y (rustyyerror): Constify.
12402         * rust-lang.c (rust_op_name): Constify.
12403         * rust-lang.h (rustyyerror): Constify.
12404         * serial.h (serial_ops::name): Constify.
12405         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12406         (sh_sh3e_register_name, sh_sh2e_register_name)
12407         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12408         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12409         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12410         (sh_sh4al_dsp_register_name): Constify.
12411         * sh64-tdep.c (sh64_register_name): Constify.
12412         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12413         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12414         * stabsread.c (patch_block_stabs, read_type_number)
12415         (ref_map::stabs, ref_add, process_reference)
12416         (symbol_reference_defined, define_symbol, define_symbol)
12417         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12418         (read_one_struct_field, read_struct_fields, read_baseclasses)
12419         (read_tilde_fields, read_struct_type, read_array_type)
12420         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12421         (read_huge_number, read_range_type, read_args, common_block_start)
12422         (find_name_end): Constify.
12423         * stabsread.h (common_block_start, define_symbol)
12424         (process_one_symbol, symbol_reference_defined, ref_add):
12425         * symfile.c (get_section_index, add_symbol_file_command):
12426         * symfile.h (get_section_index): Constify.
12427         * target-descriptions.c (tdesc_type::name): Constify.
12428         (tdesc_free_type): Add cast.
12429         * target.c (find_default_run_target):
12430         (add_deprecated_target_alias, find_default_run_target)
12431         (target_announce_detach): Constify.
12432         (do_option): Constify.
12433         * target.h (add_deprecated_target_alias): Constify.
12434         * thread.c (print_thread_info_1): Constify.
12435         * top.c (deprecated_readline_begin_hook, command_line_input):
12436         Constify.
12437         (init_main): Add casts.
12438         * top.h (handle_line_of_input): Constify.
12439         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12440         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12441         (tfind_command): Rename to ...
12442         (tfind_command_1): ... this and constify.
12443         (tfind_command): New function.
12444         (tfind_end_command, tfind_start_command): Adjust.
12445         (encode_source_string): Constify.
12446         * tracepoint.h (encode_source_string): Constify.
12447         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12448         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12449         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12450         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12451         * tui/tui-win.c (parse_scrolling_args): Constify.
12452         * tui/tui-windata.c (tui_erase_data_content): Constify.
12453         * tui/tui-windata.h (tui_erase_data_content): Constify.
12454         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12455         * tui/tui.c (tui_enable): Add cast.
12456         * utils.c (defaulted_query): Constify.
12457         (init_page_info): Add cast.
12458         (puts_debug, subset_compare): Constify.
12459         * utils.h (subset_compare): Constify.
12460         * varobj.c (varobj_format_string): Constify.
12461         * varobj.h (varobj_format_string): Constify.
12462         * vax-tdep.c (vax_register_name): Constify.
12463         * windows-nat.c (windows_detach): Constify.
12464         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12465         * xml-support.c (gdb_xml_end_element): Constify.
12466         * xml-tdesc.c (tdesc_start_reg): Constify.
12467         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12468         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12469         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12470
12471 2017-04-05  Pedro Alves  <palves@redhat.com>
12472
12473         * proc-api.c (struct trans): Constify.
12474         (procfs_note): Constify.
12475         * proc-events.c (struct trans, syscall_table):
12476         * proc-flags.c (struct trans): Constify.
12477         * proc-utils.h (procfs_note): Constify.
12478         * proc-why.c (struct trans): Constify.
12479         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12480         (procfs_detach): Constify.
12481         * sol-thread.c (struct string_map): Constify.
12482         (td_err_string, td_state_string): Constify.
12483
12484 2017-04-05  Pedro Alves  <palves@redhat.com>
12485
12486         * proc-api.c (procfs_filename): Don't initialize
12487         procfs_filename.
12488         (prepare_to_trace): Assume procfs_filename is non-NULL.
12489         (_initialize_proc_api): Give procfs_filename a default value here.
12490
12491 2017-04-05  Pedro Alves  <palves@redhat.com>
12492
12493         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12494         'cond_string' parameter.
12495         (extract_exception_regexp): Constify 'string' parameter.
12496         (catch_exception_command_1): Constify.
12497         * breakpoint.c (init_catchpoint)
12498         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12499         parameter.
12500         (ep_parse_optional_if_clause, catch_fork_command_1)
12501         (catch_exec_command_1): Constify.
12502         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12503         parameter.
12504         (ep_parse_optional_if_clause): Constify.
12505         * cli/cli-utils.c (remove_trailing_whitespace)
12506         (check_for_argument): Constify.
12507         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12508         non-const overload.
12509         (check_for_argument): Likewise.
12510
12511 2017-04-05  Pedro Alves  <palves@redhat.com>
12512
12513         * event-top.c (command_line_handler): Add cast to execute_command
12514         call.
12515         * record-btrace.c (cmd_record_btrace_bts_start)
12516         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12517         (cmd_record_btrace_start): Add cast to execute_command call.
12518         * record-full.c (record_full_goto_insn):
12519         * record.c (record_start, record_stop): Add cast to
12520         execute_command_to_string calls.
12521         (cmd_record_start): Add cast to execute_command calls.
12522
12523 2017-04-05  Pedro Alves  <palves@redhat.com>
12524
12525         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12526         static inline function.
12527         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12528         array and use gdb_PyArg_ParseTupleAndKeywords.
12529         * python/py-cmd.c (cmdpy_init): Likewise.
12530         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12531         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12532         (infpy_search_memory): Likewise.
12533         * python/py-objfile.c (objfpy_add_separate_debug_file)
12534         (gdbpy_lookup_objfile): Likewise.
12535         * python/py-symbol.c (gdbpy_lookup_symbol)
12536         (gdbpy_lookup_global_symbol): Likewise.
12537         * python/py-type.c (gdbpy_lookup_type): Likewise.
12538         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12539         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12540         Likewise.
12541
12542 2017-04-05  Pedro Alves  <palves@redhat.com>
12543
12544         * python/python-internal.h (gdb_PyGetSetDef): New type.
12545         * python/py-block.c (block_object_getset)
12546         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12547         * python/py-event.c (event_object_getset)
12548         (finish_breakpoint_object_getset): Likewise.
12549         * python/py-inferior.c (inferior_object_getset): Likewise.
12550         * python/py-infthread.c (thread_object_getset): Likewise.
12551         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12552         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12553         * python/py-objfile.c (objfile_getset): Likewise.
12554         * python/py-progspace.c (pspace_getset): Likewise.
12555         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12556         Likewise.
12557         * python/py-record.c (recpy_record_getset): Likewise.
12558         * python/py-symbol.c (symbol_object_getset): Likewise.
12559         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12560         Likewise.
12561         * python/py-type.c (type_object_getset, field_object_getset):
12562         Likewise.
12563         * python/py-value.c (value_object_getset): Likewise.
12564
12565 2017-04-05  Pedro Alves  <palves@redhat.com>
12566
12567         * python/python-internal.h (gdb_PyObject_CallMethod)
12568         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12569         New functions.
12570         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12571         (PySys_GetObject, PySys_SetPath): New macros.
12572
12573 2017-04-05  Pedro Alves  <palves@redhat.com>
12574
12575         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12576         info_osdata_command.
12577         * osdata.c (info_osdata_command): Rename to ...
12578         (info_osdata): ... this.  Constify 'type' parameter, and remove
12579         the 'from_tty' parameter.  Accept NULL TYPE.
12580         (info_osdata_command): New function.
12581         * osdata.h (info_osdata_command): Remove declaration.
12582         (info_osdata): New declaration.
12583
12584 2017-04-05  Pedro Alves  <palves@redhat.com>
12585
12586         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12587         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12588         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12589         parameter.
12590         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12591         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12592         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12593         parameter.
12594         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12595         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12596         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12597         (mi_cmd_file_list_exec_source_files)
12598         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12599         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12600         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12601         parameter.
12602         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12603         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12604         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12605         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12606         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12607         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12608         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12609         'command' parameter.
12610         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12611         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12612         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12613         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12614         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12615         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12616         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12617         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12618         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12619         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12620         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12621         parameter.
12622         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12623         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12624         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12625         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12626         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12627         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12628         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12629         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12630         (mi_cmd_data_list_changed_registers)
12631         (mi_cmd_data_write_register_values)
12632         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12633         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12634         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12635         (mi_cmd_list_features, mi_cmd_list_target_features)
12636         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12637         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12638         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12639         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12640         (mi_cmd_trace_frame_collected): Constify 'command'
12641         parameter.
12642         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12643         'command' parameter.
12644
12645 2017-04-05  Pedro Alves  <palves@redhat.com>
12646
12647         * ada-lang.c (ada_completer_word_break_characters): Now a const
12648         array.
12649         (ada_get_gdb_completer_word_break_characters): Constify.
12650         * completer.c (gdb_completer_command_word_break_characters)
12651         (gdb_completer_file_name_break_characters)
12652         (gdb_completer_quote_characters): Now const arrays.
12653         (get_gdb_completer_quote_characters): Constify.
12654         (set_rl_completer_word_break_characters): New function.
12655         (set_gdb_completion_word_break_characters)
12656         (complete_line_internal): Use it.
12657         * completer.h (get_gdb_completer_quote_characters): Constify.
12658         (set_rl_completer_word_break_characters): Declare.
12659         * f-lang.c (f_word_break_characters): Constify.
12660         * language.c (default_word_break_characters): Constify.
12661         * language.h (language_defn::la_word_break_characters): Constify.
12662         (default_word_break_characters): Constify.
12663         * top.c (init_main): Use set_rl_completer_word_break_characters.
12664
12665 2017-04-05  Pedro Alves  <palves@redhat.com>
12666
12667         * aix-thread.c (aix_thread_pid_to_str)
12668         (aix_thread_extra_thread_info): Constify.
12669         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12670         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12671         (bsd_uthread_pid_to_str): Constify.
12672         * corelow.c (core_pid_to_str): Constify.
12673         * darwin-nat.c (darwin_pid_to_str): Constify.
12674         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12675         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12676         Constify.
12677         * gnu-nat.c (gnu_pid_to_str): Constify.
12678         * go32-nat.c (go32_pid_to_str): Constify.
12679         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12680         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12681         * inferior.c (inferior_pid_to_str): Constify.
12682         * linux-nat.c (linux_nat_pid_to_str): Constify.
12683         * linux-tdep.c (linux_core_pid_to_str): Constify.
12684         * linux-thread-db.c (thread_db_pid_to_str)
12685         (thread_db_extra_thread_info): Constify.
12686         * nto-tdep.c (nto_extra_thread_info): Constify.
12687         * nto-tdep.h (nto_extra_thread_info): Constify.
12688         * obsd-nat.c (obsd_pid_to_str): Constify.
12689         * procfs.c (procfs_pid_to_str): Constify.
12690         * ravenscar-thread.c (ravenscar_extra_thread_info)
12691         (ravenscar_pid_to_str): Constify.
12692         * remote-sim.c (gdbsim_pid_to_str): Constify.
12693         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12694         Constify.
12695         * sol-thread.c (solaris_pid_to_str): Constify.
12696         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12697         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12698         * target.c (default_pid_to_str, target_pid_to_str)
12699         (normal_pid_to_str, default_pid_to_str): Constify.
12700         * target.h (target_ops::to_pid_to_str)
12701         (target_ops::to_extra_thread_info): Constify.
12702         (target_pid_to_str, normal_pid_to_str): Constify.
12703         * windows-nat.c (windows_pid_to_str): Constify.
12704         * gdbarch.sh (core_pid_to_str): Constify.
12705         * target-delegates.c: Regenerate.
12706         * gdbarch.h, gdbarch.c: Regenerate.
12707
12708 2017-04-05  Pedro Alves  <palves@redhat.com>
12709
12710         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12711         the memory of the temporary warning_pre_print override.
12712         * utils.c (warning_pre_print): Constify.
12713         * utils.h (warning_pre_print): Constify.
12714
12715 2017-04-05  Pedro Alves  <palves@redhat.com>
12716
12717         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12718         (shell_command): New function.
12719         (make_command): Use std::string.
12720         (init_cli_cmds): Register shell_command instead of shell_escape.
12721
12722 2017-04-05  Pedro Alves  <palves@redhat.com>
12723
12724         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12725         * tracepoint.c (default_collect): Don't initialize.
12726
12727 2017-04-05  Pedro Alves  <palves@redhat.com>
12728
12729         * macroexp.c (macro_buffer::shared): Now a bool.
12730         (init_buffer): Update.
12731         (init_shared_buffer): Constify 'addr' parameter.
12732         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12733         casts.
12734
12735 2017-04-05  Pedro Alves  <palves@redhat.com>
12736
12737         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12738         * disasm.c (set_disassembler_options): Constify local.
12739         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12740
12741 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12742
12743         PR gdb/21352
12744         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12745         option.
12746
12747 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12748
12749         * frame.c (frame_unwind_register_unsigned): Call
12750         frame_unwind_register_value.
12751
12752 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12753
12754         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12755         Use gdb_test_multiple, and don't match anchor.
12756
12757 2017-04-05  Pedro Alves  <palves@redhat.com>
12758
12759         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12760         (Write After Approval): Remove Simon Marchi.
12761
12762 2017-04-05  Pedro Alves  <palves@redhat.com>
12763
12764         * common/gdb_optional.h (optional::optional): Make constexpr and
12765         initialize m_dummy.
12766
12767 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12768
12769         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12770         (amd64fbsd_jmp_buf_reg_offset): Remove.
12771         (amd64fbsd_supply_uthread): Remove function.
12772         (amd64fbsd_collect_uthread): Remove function.
12773         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12774         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12775         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12776         (fbsd-nat.c): Update comment.
12777         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12778         (i386fbsd_jmp_buf_reg_offset): Remove.
12779         (i386fbsd_supply_uthread): Remove function.
12780         (i386fbsd_collect_uthread): Remove function.
12781         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12782
12783 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12784
12785         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12786         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12787         * NEWS: Mention that support for FreeBSD/alpha was removed.
12788         * alpha-fbsd-tdep.c: Delete file.
12789         * config/alpha/fbsd.mh: Delete file.
12790         * configure.host: Delete alpha*-*-freebsd* and
12791         alpha*-*-kfreebsd*-gnu.
12792         * configure.tgt: Delete alpha*-*-freebsd* and
12793         alpha*-*-kfreebsd*-gnu.
12794
12795 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12796
12797         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12798         amd64bsd_store_inferior_registers): Use ptid from regcache.
12799
12800 2017-04-04  Pedro Alves  <palves@redhat.com>
12801
12802         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12803         data fields, make them private and add "m_" prefixes.
12804         (lnp_state_machine::lnp_state_machine): New ctor.
12805         (record_line, check_line_address, handle_set_discriminator)
12806         (handle_set_address, handle_advance_pc, handle_special_opcode)
12807         (handle_advance_line, handle_set_file, handle_negate_stmt)
12808         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12809         (end_sequence, advance_line): New methods.
12810         (m_gdbarch, m_record_lines_p): New fields.
12811         (lnp_reader_state): Delete.
12812         (dwarf_record_line): Rename to ...
12813         (lnp_state_machine::record_line): ... adjust.
12814         (init_lnp_state_machine): Delete.
12815         (lnp_state_machine::lnp_state_machine): New.
12816         (check_line_address): Rename to ...
12817         (lnp_state_machine::check_line_address): This.
12818         (dwarf_decode_lines_1): Remove reference to "reader_state".
12819         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12820         State machine internal state manipulation moved to
12821         lnp_state_machine methods.
12822
12823 2017-04-04  Pedro Alves  <palves@redhat.com>
12824
12825         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12826         unittests/offset-type-selftests.c.
12827         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12828         * common/offset-type.h: New file.
12829         * common/preprocessor.h: New file.
12830         * common/traits.h: New file.
12831         * common/valid-expr.h: New file.
12832         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12833         sect_offset and cu_offset strong typedefs throughout.
12834         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12835         typedefs throughout.
12836         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12837         sect_offset and cu_offset strong typedefs throughout.
12838         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12839         typedefs throughout.
12840         * gdbtypes.h: Include "common/offset-type.h".
12841         (cu_offset): Now an offset type (strong typedef) instead of a
12842         struct.
12843         (sect_offset): Likewise.
12844         (union call_site_parameter_u): Rename "param_offset" field to
12845         "param_cu_off".
12846         * unittests/offset-type-selftests.c: New file.
12847
12848 2017-04-04  Pedro Alves  <palves@redhat.com>
12849
12850         * common/underlying.h: New file.
12851         * dwarf2read.c: Include "common/gdb_optional.h" and
12852         "common/underlying.h".
12853         (dir_index, file_name_index): New types.
12854         (file_entry): Use them.
12855         (file_entry::include): Use to_underlying.
12856         (line_header::add_file_name): Use dir_index.
12857         (read_formatted_entries): Use gdb::optional.  Read form before
12858         writting to file_entry.
12859         (dwarf_decode_line_header): Use dir_index.
12860         (lnp_state_machine::current_file): Use to_underlying.
12861         (lnp_state_machine::file): Change type to file_name_index.
12862         (dwarf_record_line): Use to_underlying.
12863         (init_lnp_state_machine): Use file_name_index.
12864         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12865
12866 2017-04-04  Pedro Alves  <palves@redhat.com>
12867
12868         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12869         operator bool, has_value and get methods.
12870
12871 2017-04-04  Pedro Alves  <palves@redhat.com>
12872
12873         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12874         fields.
12875         (line_header): Initialize all data fields.  Change type of
12876         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12877         Change type of include_dirs to std::vector<const char *>.  Remove
12878         num_include_dirs, include_dirs_size.  Change type of file_names to
12879         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12880         (line_header::line_header): New.
12881         (line_header::add_include_dir, line_header::add_file_name): New
12882         methods.
12883         (line_header::include_dir_at): Remove NULL check.
12884         (line_header::file_name_at): Add const overload.
12885         (line_header_up): New unique_ptr typedef.
12886         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12887         std::vector.  Remove free_line_header call.
12888         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12889         free_line_header call.
12890         (free_cu_line_header): Delete.
12891         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12892         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12893         Adjust to use std::vector.
12894         (free_line_header): Delete.
12895         (free_line_header_voidp): Use delete.
12896         (add_include_dir): Replace with ...
12897         (line_header::add_include_dir): ... this method.  Use std::vector.
12898         (add_file_name): Replace with ...
12899         (line_header::add_file_name): ... this method.  Use std::vector.
12900         (add_include_dir_stub): Delete.
12901         (read_formatted_entries): Remove memset.
12902         (dwarf_decode_line_header): Return a line_header_up instead of a
12903         raw pointer.  Remove cleanup handling.  Pass lambdas to
12904         read_formatted_entries.  Adjust to use line_header methods.
12905         (dwarf_decode_lines_1): Adjust to use line_header methods.
12906         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12907         use std::vector.
12908
12909 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12910
12911         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12912         instead of struct ptid.
12913
12914 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12915
12916         * frame.c (get_frame_register_bytes): Unwind using value.
12917         (put_frame_register_bytes): Likewise.
12918
12919 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12920
12921         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12922         aggregate-like.
12923
12924 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12925
12926         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12927
12928 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12929
12930         * gdbthread.h (struct thread_info): Declare constructor and
12931         destructor.  Add some in-class member initializers.
12932         * thread.c (free_thread): Remove.
12933         (init_thread_list): Call delete instead of free_thread.
12934         (new_thread): Call thread_info constructor.
12935         (thread_info::thread_info): New function.
12936         (thread_info::~thread_info): New function.
12937         (delete_thread_1): Call delete instead of free_thread.
12938         (make_cleanup_restore_current_thread): Move tp and frame to
12939         inner block.
12940
12941 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12942
12943         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12944         (arc_skip_prologue): Likewise.
12945         (arc_make_frame_cache): Likewise.
12946         (arc_pv_get_operand): New function.
12947         (arc_is_in_prologue): Likewise.
12948         (arc_analyze_prologue): Likewise.
12949         (arc_print_frame_cache): Likewise.
12950         (MAX_PROLOGUE_LENGTH): New constant.
12951
12952 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12953
12954         * configure.tgt: Add arc-insn.o.
12955         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12956         (dump_arc_instruction_command): New function.
12957         (arc_fprintf_disasm): Likewise.
12958         (arc_disassemble_info): Likewise.
12959         (arc_insn_get_operand_value): Likewise.
12960         (arc_insn_get_operand_value_signed): Likewise.
12961         (arc_insn_get_memory_base_reg): Likewise.
12962         (arc_insn_get_memory_offset): Likewise.
12963         (arc_insn_get_branch_target): Likewise.
12964         (arc_insn_dump): Likewise.
12965         (arc_insn_get_linear_next_pc): Likewise.
12966         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12967         (arc_disassemble_info): Likewise.
12968         (arc_insn_get_branch_target): Likewise.
12969         (arc_insn_get_linear_next_pc): Likewise.
12970         * NEWS: Mention new "maint print arc arc-instruction".
12971
12972 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12973
12974         * arc-tdep (maintenance_print_arc_list): New variable.
12975         (maintenance_print_arc_command): New function.
12976
12977 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12978
12979         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12980         Add "limm" and "reserved".
12981         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12982         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12983         * arc-tdep.h (arc_regnum): Likewise.
12984
12985 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12986
12987         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12988         for THREADPTR register.
12989         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12990         register.
12991         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12992         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12993         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12994
12995 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12996
12997         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12998         registers above gdbarch_num_regs (gdbarch) as privileged in
12999         call0 ABI.
13000
13001 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13002
13003         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13004         for a single specified register or for all registers in
13005         a0_base..a0_base + C0_NREGS range.
13006         (supply_gregset_reg): Call regcache_raw_supply for a single
13007         specified register or for all registers in a0_base..a0_base +
13008         C0_NREGS range.
13009
13010 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13011
13012         * arch/xtensa.h (C0_NREGS): Add definition.
13013         * xtensa-tdep.c (C0_NREGS): Remove definition.
13014
13015 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13016
13017         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13018         Drop xtensa_default_isa initialization.
13019         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13020
13021 2017-03-27  Pedro Alves  <palves@redhat.com>
13022
13023         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13024         (file_entry::include_dir): New method.
13025         (line_header::include_dir_at, line_header::file_name_at): New
13026         methods.
13027         (setup_type_unit_groups, setup_type_unit_groups)
13028         (psymtab_include_file_name): Simplify using the new methods.
13029         (lnp_state_machine) <the_line_header>: New field.
13030         <file>: Add comment.
13031         (lnp_state_machine::current_file): New method.
13032         (dwarf_record_line): Simplify using the new methods.
13033         (init_lnp_state_machine): Initialize the "the_line_header" field.
13034         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13035         Simplify using the new methods.
13036
13037 2017-03-27  Pedro Alves  <palves@redhat.com>
13038
13039         * cp-name-parser.y (make_empty): Delete.
13040         (demangler_special, nested_name, ptr_operator, array_indicator)
13041         (direct_declarator, declarator_1): Use fill_comp instead of
13042         make_empty.
13043
13044 2017-03-27  Pedro Alves  <palves@redhat.com>
13045
13046         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13047         to ATTRIBUTE_PRINTF.
13048         * solib-target.c (library_list_start_list): Print "string" not
13049         "version".
13050         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13051         gdb_xml_error call.
13052
13053 2017-03-27  Pedro Alves  <palves@redhat.com>
13054
13055         * dwarf2read.c (struct file_and_directory): New.
13056         (dwarf2_get_dwz_file): Adjust to use std::string.
13057         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13058         (find_file_and_directory): Adjust to return a file_and_directory
13059         object.
13060         (read_file_scope): Adjust to use file_and_directory.  Remove
13061         make_cleanup/do_cleanups calls.
13062         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13063         make_cleanup/do_cleanups calls.
13064         * python/python.c (do_start_initialization): Adjust to ldirname
13065         returning a std::string.
13066         * utils.c (ldirname): Now returns a std::string.
13067         * utils.h (ldirname): Change return type to std::string.
13068         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13069         returning a std::string.
13070         * xml-tdesc.c (file_read_description_xml): Likewise.
13071
13072 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13073
13074         * regcache.c (regcache_debug_print_register): New function.
13075         * regcache.h (regcache_debug_print_register): New declaration.
13076         * target.c (debug_print_register): Remove.
13077         (target_fetch_registers): Call regcache_debug_print_register.
13078         (target_store_registers): Likewise.
13079
13080 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13081
13082         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13083         reference beyond the 'lh->include_dirs' array before accessing to
13084         it.
13085         (psymtab_include_file_name): Likewise.
13086         (dwarf_decode_lines_1): Likewise.
13087         (dwarf_decode_lines): Likewise.
13088         (file_file_name): Likewise.
13089
13090 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13091
13092         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13093         inferior_ptid.
13094         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13095         ps_lsetfpregs): Likewise.
13096         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13097         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13098         ps_lsetfpregs): Likewise.
13099         * target.c (target_fetch_registers, target_store_registers):
13100         Remove asserts.
13101
13102 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13103
13104         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13105
13106 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13107
13108         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13109         (_initialize_aarch64_tdep): Register it.
13110         (aarch64_record_load_store): Handle PRFM instruction.
13111         (aarch64_process_record_test): New function.
13112
13113 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13114
13115         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13116         indentation.
13117
13118 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13119
13120         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13121
13122 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13123
13124         python/python.c (do_start_initialization): Fix memory leak.
13125
13126 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13127
13128         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13129         using get_ptrace_pid.
13130         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13131         inferior_ptid.
13132         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13133         inferior_ptid instead of pid.
13134
13135 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13136
13137         * aarch64-tdep.c: Wrap locally used classes in anonymous
13138         namespace.
13139         * arm-tdep.c: Likewise.
13140         * linespec.c: Likewise.
13141         * ui-out.c: Likewise.
13142
13143 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13144
13145         PR gdb/19637
13146         * python/lib/gdb/printer/bound_registers.py: Import sys.
13147
13148 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13149
13150         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13151         windows_thread_info parameter and use it instead of
13152         current_thread.
13153         (windows_fetch_inferior_registers): Don't set current_thread,
13154         pass the thread to do_windows_fetch_inferior_registers.  Use
13155         ptid from regcache instead of inferior_ptid.
13156         (do_windows_store_inferior_registers): Add windows_thread_info
13157         parameter and use it instead of current_thread.
13158         (windows_store_inferior_registers): Don't set current_thread,
13159         pass the thread to do_windows_store_inferior_registers.  Use
13160         ptid from regcache instead of inferior_ptid.
13161
13162 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13163
13164         * ser-mingw.c (ser_windows_raw): Remove reference to
13165         struct serial::current_timeout.
13166
13167 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13168
13169         PR tdep/20928
13170         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13171         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13172         (sparc64_fsr_type): Fix %fsr decoding.
13173
13174 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13175
13176         * python/py-record-btrace.c (btpy_insn_data): Change return type
13177         for Python 2.
13178
13179 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13180
13181         * spu-linux-nat.c (spu_fetch_inferior_registers,
13182         spu_store_inferior_registers): Use ptid from regcache, set and
13183         restore inferior_ptid.
13184         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13185         Likewise.
13186
13187 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13188
13189         * i386-linux-nat.c (fetch_register, store_register,
13190         i386_linux_fetch_inferior_registers,
13191         i386_linux_store_inferior_registers): Use ptid from regcache.
13192         * ia64-linux-nat.c (ia64_linux_fetch_register,
13193         ia64_linux_store_register): Likewise.
13194         * inf-ptrace.c (inf_ptrace_fetch_register,
13195         inf_ptrace_store_register): Likewise.
13196         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13197         m32r_linux_store_inferior_registers): Likewise.
13198         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13199         m68kbsd_store_inferior_registers): Likewise.
13200         * m68k-linux-nat.c (fetch_register, store_register,
13201         m68k_linux_fetch_inferior_registers,
13202         m68k_linux_store_inferior_registers): Likewise.
13203         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13204         m88kbsd_store_inferior_registers): Likewise.
13205         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13206         mips_fbsd_store_inferior_registers): Likewise.
13207         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13208         mips64_linux_regsets_store_registers): Likewise.
13209         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13210         mipsnbsd_store_inferior_registers): Likewise.
13211         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13212         mips64obsd_store_inferior_registers): Likewise.
13213         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13214         Likewise.
13215         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13216         ppcfbsd_store_inferior_registers): Likewise.
13217         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13218         ppc_linux_store_inferior_registers): Likewise.
13219         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13220         ppcnbsd_store_inferior_registers): Likewise.
13221         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13222         ppcobsd_store_registers): Likewise.
13223         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13224         Likewise.
13225         * ravenscar-thread.c (ravenscar_fetch_registers,
13226         ravenscar_store_registers, ravenscar_prepare_to_store):
13227         Likewise.
13228         * record-btrace.c (record_btrace_fetch_registers,
13229         record_btrace_store_registers, record_btrace_prepare_to_store):
13230         Likewise.
13231         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13232         Lookup inferior using ptid from regcache, instead of
13233         current_inferior.
13234         * remote.c (remote_fetch_registers, remote_store_registers): Use
13235         ptid from regcache.
13236         * rs6000-nat.c (fetch_register, store_register): Likewise.
13237         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13238         s390_linux_store_inferior_registers): Likewise.
13239         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13240         shnbsd_store_inferior_registers): Likewise.
13241         * sol-thread.c (sol_thread_fetch_registers,
13242         sol_thread_store_registers): Likewise.
13243         * sparc-nat.c (sparc_fetch_inferior_registers,
13244         sparc_store_inferior_registers): Likewise.
13245         * tilegx-linux-nat.c (fetch_inferior_registers,
13246         store_inferior_registers): Likewise.
13247         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13248         vaxbsd_store_inferior_registers): Likewise.
13249         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13250         store_xtregs): Likewise.
13251
13252 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13253
13254         PR gdb/14441
13255         * NEWS: Mention support for rvalue references in GDB and python.
13256         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13257         supports both lvalue and rvalue references.
13258
13259 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13260
13261         PR gdb/14441
13262         * gdbtypes.c (rank_one_type): Implement overloading
13263         resolution rules regarding rvalue references.
13264
13265 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13266
13267         PR gdb/14441
13268         * aarch64-tdep.c (aarch64_type_align)
13269         (aarch64_extract_return_value, aarch64_store_return_value): Change
13270         lvalue reference type checks to general reference type checks.
13271         * amd64-tdep.c (amd64_classify): Likewise.
13272         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13273         Likewise.
13274         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13275         (arm_store_return_value): Likewise.
13276         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13277         * c-typeprint.c (c_print_type): Likewise.
13278         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13279         (cplus_number_of_children, cplus_describe_child): Likewise.
13280         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13281         * completer.c (expression_completer): Likewise.
13282         * cp-support.c (make_symbol_overload_list_adl_namespace):
13283         Likewise.
13284         * darwin-nat-info.c (info_mach_region_command): Likewise.
13285         * dwarf2loc.c (entry_data_value_coerce_ref)
13286         (value_of_dwarf_reg_entry): Likewise.
13287         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13288         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13289         Likewise.
13290         * findvar.c (extract_typed_address, store_typed_address):
13291         Likewise.
13292         * gdbtypes.c (rank_one_type): Likewise.
13293         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13294         * infcall.c (value_arg_coerce): Likewise.
13295         * language.c (pointer_type): Likewise.
13296         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13297         Likewise.
13298         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13299         * mn10300-tdep.c (mn10300_type_align): Likewise.
13300         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13301         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13302         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13303         Likewise.
13304         * printcmd.c (print_formatted, x_command): Likewise.
13305         * python/py-type.c (typy_get_composite, typy_template_argument):
13306         Likewise.
13307         * python/py-value.c (valpy_referenced_value)
13308         (valpy_get_dynamic_type, value_has_field): Likewise.
13309         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13310         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13311         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13312         * spu-tdep.c (spu_scalar_value_p): Likewise.
13313         * symtab.c (lookup_symbol_aux): Likewise.
13314         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13315         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13316         Likewise.
13317         * valops.c (value_cast_pointers, value_cast)
13318         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13319         (value_struct_elt, value_struct_elt_bitpos)
13320         (value_find_oload_method_list, find_overload_match)
13321         (value_rtti_indirect_type): Likewise.
13322         * valprint.c (val_print_scalar_type_p, generic_val_print):
13323         Likewise.
13324         * value.c (value_actual_type, value_as_address, unpack_long)
13325         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13326         (coerce_ref): Likewise.
13327         * varobj.c (varobj_get_value_type): Likewise.
13328
13329 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13330
13331         PR gdb/14441
13332         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13333         table of constants.
13334         * python/lib/gdb/command/explore.py: Support exploring values
13335         of rvalue reference types.
13336         * python/lib/gdb/types.py: Implement get_basic_type() for
13337         rvalue reference types.
13338         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13339         constant.
13340         * python/py-value.c (valpy_getitem): Add an rvalue reference
13341         check.
13342         (valpy_reference_value): Add new parameter "refcode".
13343         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13344         New wrappers for valpy_reference_value().
13345         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13346         (gdbpy_invoke_xmethod): Likewise.
13347
13348 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13349
13350         PR gdb/14441
13351         * dwarf2read.c (process_die, read_type_die_1): Handle the
13352         DW_TAG_rvalue_reference_type DIE.
13353         (read_tag_reference_type): Add new parameter "refcode".
13354
13355 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13356
13357         PR gdb/14441
13358         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13359         (c_type_print_modifier, c_type_print_varspec_suffix)
13360         (c_type_print_base): Support printing rvalue reference types.
13361         * c-valprint.c (c_val_print, c_value_print): Support printing
13362         rvalue reference values.
13363
13364 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13365
13366         PR gdb/14441
13367         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13368         typename.
13369         * cp-support.c (replace_typedefs): Handle
13370         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13371         * python/py-type.c (typy_lookup_type): Likewise.
13372
13373 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13374
13375         PR gdb/14441
13376         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13377         * parse.c (insert_type): Change assert statement.
13378         (follow_types): Handle rvalue reference types.
13379         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13380         constant.
13381
13382 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13383
13384         PR gdb/14441
13385         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13386         value_ref() interface.
13387         * c-valprint.c (c_value_print): Likewise.
13388         * infcall.c (value_arg_coerce): Likewise.
13389         * python/py-value.c (valpy_reference_value): Likewise.
13390         * valops.c (value_cast, value_reinterpret_cast)
13391         (value_dynamic_cast, typecmp): Likewise.
13392         (value_ref): Parameterize by kind of return value reference type.
13393         * value.h (value_ref): Add new parameter "refcode".
13394
13395 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13396
13397         PR gdb/14441
13398         * dwarf2read.c (read_tag_reference_type): Use
13399         lookup_lvalue_reference_type() instead of lookup_reference_type().
13400         * eval.c (evaluate_subexp_standard): Likewise.
13401         * f-exp.y: Likewise.
13402         * gdbtypes.c (make_reference_type, lookup_reference_type):
13403         Generalize with rvalue reference types.
13404         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13405         convenience wrappers for lookup_reference_type().
13406         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13407         reference kind parameter.
13408         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13409         wrappers for lookup_reference_type().
13410         * guile/scm-type.c (gdbscm_type_reference): Use
13411         lookup_lvalue_reference_type() instead of lookup_reference_type().
13412         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13413         * parse.c (follow_types): Likewise.
13414         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13415         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13416         Likewise.
13417         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13418         (gdbpy_invoke_xmethod): Likewise.
13419         * stabsread.c: Provide extra argument to make_reference_type()
13420         call.
13421         * valops.c (value_ref, value_rtti_indirect_type): Use
13422         lookup_lvalue_reference_type() instead of lookup_reference_type().
13423
13424 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13425
13426         PR gdb/14441
13427         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13428         (TYPE_IS_REFERENCE): New macro.
13429         (struct type): Add rvalue_reference_type field.
13430         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13431
13432 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13433
13434         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13435         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13436         New function definition.
13437         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13438         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13439         New function declaration.
13440         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13441         * mi/mi-interp.h: New file.
13442         * solib.c (info_sharedlibrary_command): Replace for loop with
13443         ALL_SO_LIBS macro
13444         * solib.h (update_solib_list): New function declaration.
13445         (so_list_head): Move macro.
13446         * solist.h (ALL_SO_LIBS): New macro.
13447
13448 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13449
13450         * infcmd.c (post_create_inferior): Remove unused argument in
13451         call to solib_add.
13452         * remote.c (remote_start_remote): Likewise.
13453         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13454         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13455         (enable_break): Likewise.
13456         * solib.c (update_solib_list): Remove unused target argument
13457         and its documentation.
13458         (solib_add): Remove unused target argument.  Remove unused
13459         argument in call to update_solib_list.
13460         (info_sharedlibrary_command): Remove unused argument in call
13461         to update_solib_list.
13462         (sharedlibrary_command): Remove unused argument in call to
13463         solib_add.
13464         (handle_solib_event): Likewise.
13465         (reload_shared_libraries): Likewise.
13466         * solib.h (solib_add): Remove unused target argument.
13467
13468 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13469
13470         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13471         (s390_displaced_step_fixup): Cover relative branches with the
13472         default fixup handling.  This fixes lack of support for some
13473         relative branch instructions.
13474
13475 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13476
13477         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13478         ptid from regcache.
13479
13480 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13481
13482         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13483         i386_darwin_store_inferior_registers): Use ptid from regcache.
13484
13485 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13486
13487         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13488         i386bsd_store_inferior_registers): Use ptid from regcache.
13489
13490 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13491
13492         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13493         hppaobsd_store_registers): Use ptid from regcache.
13494
13495 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13496
13497         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13498         hppanbsd_store_registers): Use ptid from regcache.
13499
13500 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13501
13502         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13503         from regcache.  Use get_ptrace_pid.
13504
13505 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13506
13507         * corelow.c (get_core_register_section): Use ptid from regcache,
13508         update doc.
13509
13510 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13511
13512         * bsd-uthread.c (bsd_uthread_fetch_registers,
13513         bsd_uthread_store_registers): Use ptid from regcache, set and
13514         restore inferior_ptid.
13515
13516 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13517
13518         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13519         fetch_fp_regs, store_register, store_regs, store_fp_register,
13520         store_fp_regs): Use ptid from regcache.
13521
13522 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13523
13524         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13525         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13526         store_vfp_regs): Use ptid from regcache.
13527
13528 2017-03-17  Pedro Alves  <palves@redhat.com>
13529
13530         PR remote/21188
13531         * ser-base.c (ser_base_wait_for): Add comment.
13532         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13533         version.
13534         * ser-unix.c (hardwire_raw): Remove reference to
13535         scb->current_timeout.
13536         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13537         (hardwire_ops): Install ser_base_readchar instead of
13538         hardwire_readchar.
13539         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13540         Remove fields.
13541
13542 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13543
13544         PR gdb/19637
13545         * python/lib/gdb/printer/bound_registers.py: Add support for
13546         Python 3.
13547
13548 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13549
13550         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13551         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13552         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13553         byte_offset to subobj_byte_offset.  Fix the handling of
13554         DWARF_VALUE_STACK on big-endian targets when coming via an
13555         implicit pointer.
13556         (dwarf2_evaluate_loc_desc): Adjust call to
13557         dwarf2_evaluate_loc_desc_full.
13558         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13559         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13560
13561 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13562
13563         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13564         and REVSH instructions.
13565
13566 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13567
13568         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13569         (arm_record_test): Declare.
13570         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13571         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13572         align with the manual.
13573         (thumb_record_misc): Adjust the code order to align with the
13574         manual.
13575         (thumb2_record_decode_insn_handler): Fix instruction matching.
13576         (instruction_reader_thumb): New class.
13577         (arm_record_test): New function.
13578
13579 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13580
13581         * arm-tdep.c (abstract_memory_reader): New class.
13582         (instruction_reader): New class.
13583         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13584         (decode_insn): Likewise.
13585
13586 2017-03-16  Doug Evans  <dje@google.com>
13587
13588         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13589         member.  Change type of TYPE member to SCM.  All uses updated.
13590         (lsscm_make_lazy_string_smob): Add assert.
13591         (lsscm_make_lazy_string): Flag bad length values.
13592         (lsscm_elt_type): New function.
13593         (gdbscm_lazy_string_to_value): Rewrite to use
13594         lsscm_safe_lazy_string_to_value.
13595         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13596         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13597         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13598         in incoming type.
13599         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13600         * guile/scm-type.c (tyscm_scm_to_type): New function.
13601
13602 2017-03-15  Doug Evans  <dje@google.com>
13603
13604         PR python/17728, python/18439, python/18779
13605         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13606         member.  Change type of TYPE member to PyObject *.  All uses updated.
13607         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13608         (gdbpy_create_lazy_string_object): Flag bad length values.
13609         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13610         Handle typedefs in incoming type.
13611         (stpy_lazy_string_elt_type): New function.
13612         (gdbpy_extract_lazy_string): Call it.
13613         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13614         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13615         typedefs in incoming type.
13616
13617 2017-03-16  Doug Evans  <dje@google.com>
13618
13619         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13620         * guile/scm-type.c (tyscm_scm_to_type): New function.
13621
13622 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13623
13624         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13625         "ULONGEST" for "skip".
13626
13627 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13628
13629         PR gdb/21220
13630         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13631         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13632         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13633         over ptrace peek/poke until end of buffer or error.
13634
13635 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13636
13637         * parse.c (length_of_subexp): Make static.
13638         * parser-defs.h (length_of_subexp): Remove.
13639
13640 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13641
13642         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13643         as well.
13644
13645 2017-03-14  Pedro Alves  <palves@redhat.com>
13646
13647         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13648         (main): Use std::unique_ptr.  Remove calls to
13649         cp_demangled_name_parse_free.
13650
13651 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13652
13653         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13654         alphabsd_store_inferior_registers): Use regcache->ptid instead
13655         of inferior_ptid.
13656
13657 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13658
13659         * aix-thread.c (aix_thread_fetch_registers,
13660         aix_thread_store_registers): Use regcache->ptid instead of
13661         inferior_ptid.
13662
13663 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13664
13665         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13666         store_gregs_to_thread, fetch_fpregs_from_thread,
13667         store_fpregs_to_thread): Use regcache->ptid instead of
13668         inferior_ptid.
13669
13670 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13671
13672         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13673         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13674         instead of inferior_ptid.
13675
13676 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13677
13678         * target.c (target_fetch_registers, target_store_registers): Add
13679         assert.
13680
13681 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13682
13683         * regcache.h (regcache_get_ptid): New function.
13684         * regcache.c (regcache_get_ptid): New function.
13685
13686 2017-03-13  Mark Wielaard  <mark@klomp.org>
13687
13688         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13689
13690 2017-03-10  Keith Seitz  <keiths@redhat.com>
13691
13692         PR c++/8218
13693         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13694
13695 2017-03-08  Pedro Alves  <palves@redhat.com>
13696
13697         PR gdb/18360
13698         * infrun.c (start_step_over, do_target_resume, resume)
13699         (restart_threads): Assert we're not resuming a thread that is
13700         meant to be stopped.
13701         (infrun_thread_stop_requested_callback): Delete.
13702         (infrun_thread_stop_requested): If the thread is internally
13703         stopped, queue a pending stop event and clear the thread's
13704         inline-frame state.
13705         (handle_stop_requested): New function.
13706         (handle_syscall_event, handle_inferior_event_1): Use
13707         handle_stop_requested.
13708         (handle_stop_requested): New function.
13709         (handle_signal_stop): Set the thread's stop_signal here instead of
13710         at caller.
13711         (finish_step_over): Clear step over info unconditionally.
13712         (handle_signal_stop): If the user had interrupted the event
13713         thread, consider the stop a random signal.
13714         (handle_signal_stop) <signal arrived while stepping over
13715         breakpoint>: Don't restart threads here.
13716         (stop_waiting): Don't clear step-over info here.
13717
13718 2017-03-08  Pedro Alves  <palves@redhat.com>
13719
13720         PR 21206
13721         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13722         goes to argument 2, not 1.
13723
13724 2017-03-08  Pedro Alves  <palves@redhat.com>
13725
13726         PR cli/21218
13727         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13728         display_gdb_prompt.
13729         (command_line_input): Add comment.
13730
13731 2017-03-08  Pedro Alves  <palves@redhat.com>
13732
13733         PR tui/21216
13734         * tui/tui-file.c (tui_file::write): New.
13735         * tui/tui-file.h (tui_file): Override "write".
13736         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13737         factored out from ...
13738         (tui_puts): ... here.
13739         (tui_putc): Use them.
13740         (tui_write): New function.
13741         * tui/tui-io.h (tui_write): Declare.
13742
13743 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13744
13745         * Makefile.in (SFILES): Replace "environ.c" with
13746         "common/environ.c".
13747         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13748         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13749         to...
13750         * common/environ.c: ... here.
13751         * environ.h: Moved to...
13752         * common/environ.h: ... here.
13753
13754 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13755
13756         * gdbarch.sh (pstring_ptr): New static function.
13757         (gdbarch_disassembler_options): Use it.
13758         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13759         not valid_disassembler_option->name.
13760         * gdbarch.c: Regenerate.
13761
13762 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13763
13764         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13765
13766 2017-03-07  Pedro Alves  <palves@redhat.com>
13767
13768         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13769
13770 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13771
13772         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13773         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13774         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13775         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13776
13777 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13778
13779         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13780
13781 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13782
13783         * remote.c (remote_add_target_side_commands): Use range-based
13784         for loop.
13785
13786 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13787
13788         PR gdb/21165
13789         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13790         value is lazy.
13791         * valprint.c (common_val_print): Likewise.
13792
13793 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13794
13795         * NEWS: Mention new set/show disassembler-options commands.
13796         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13797         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13798         (prospective_options): New static variable.
13799         (gdb_disassembler::gdb_disassembler): Initialize
13800         m_di.disassembler_options.
13801         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13802         (get_disassembler_options): New function.
13803         (set_disassembler_options): Likewise.
13804         (set_disassembler_options_sfunc): Likewise.
13805         (show_disassembler_options_sfunc): Likewise.
13806         (disassembler_options_completer): Likewise.
13807         (_initialize_disasm): Likewise.
13808         * disasm.h (get_disassembler_options): New prototype.
13809         (set_disassembler_options): Likewise.
13810         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13811         (gdbarch_verify_disassembler_options): Likewise.
13812         * gdbarch.c: Regenerate.
13813         * gdbarch.h: Likewise.
13814         * arm-tdep.c (num_disassembly_options): Delete.
13815         (set_disassembly_style): Likewise.
13816         (arm_disassembler_options): New static variable.
13817         (set_disassembly_style_sfunc): Convert short style name into long
13818         option name.  Call set_disassembler_options.
13819         (show_disassembly_style_sfunc): New function.
13820         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13821         set_gdbarch_verify_disassembler_options.
13822         (_initialize_arm_tdep): Delete regnames variable and update callers.
13823         (arm_disassembler_options): Initialize.
13824         (disasm_options): New variable.
13825         (num_disassembly_options): Rename from this...
13826         (num_disassembly_styles): ...to this.  Compute by scanning through
13827         disasm_options.
13828         (valid_disassembly_styles): Initialize using disasm_options.
13829         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13830         set_arm_regname_option.
13831         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13832         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13833         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13834         set_gdbarch_verify_disassembler_options.
13835         * s390-tdep.c (s390_disassembler_options): New static variable.
13836         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13837         set_gdbarch_verify_disassembler_options.
13838
13839 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13840
13841         * remote.c (remote_add_target_side_condition): Remove "struct"
13842         keyword from range-based for loop.
13843
13844 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13845
13846         * remote.c (remote_add_target_side_condition): Use range-based
13847         for loop.  Update comment.
13848
13849 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13850
13851         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13852
13853 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13854
13855         * regcache.c (regcache_raw_update): New function.
13856         (regcache_raw_read): Move code to regcache_raw_update.
13857         * regcache.h (regcache_raw_update): New declaration.
13858         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13859
13860 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13861
13862         * dwarf2read.c (create_debug_type_hash_table): Initialize
13863         header.signature and header.type_offset_in_tu.
13864
13865 2017-02-24  Pedro Alves  <palves@redhat.com>
13866
13867         * symtab.c (make_file_symbol_completion_list_1): Use
13868         add_symtab_completions.
13869
13870 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13871
13872         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13873
13874 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13875
13876         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13877         I386_MAX_REGISTER_SIZE.
13878         (i386_pseudo_register_write): Likewise.
13879         (i386_process_record): Likewise.
13880         * i387-tdep.c (i387_supply_xsave): Likewise.
13881         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13882         (store_register): Likewise.
13883
13884 2017-02-23  Pedro Alves  <palves@redhat.com>
13885
13886         * ada-lang.c: Include "common/function-view.h".
13887         (ada_iterate_over_symbols): Adjust to use function_view as
13888         callback type.
13889         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13890         (ada_make_symbol_completion_list): Use a lambda.
13891         (ada_exc_search_name_matches): Delete.
13892         (name_matches_regex): New.
13893         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13894         * compile/compile-c-support.c: Include "common/function-view.h".
13895         (print_one_macro): Change prototype to accept a ui_file pointer.
13896         (write_macro_definitions): Use a lambda.
13897         * dwarf2read.c: Include "common/function-view.h".
13898         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13899         (dw2_expand_symtabs_matching): Adjust to use function_view as
13900         callback type.
13901         * language.h: Include "common/function-view.h".
13902         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13903         function_view as callback type.
13904         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13905         * linespec.c: Include "common/function-view.h".
13906         (collect_info::add_symbol): New method.
13907         (struct symbol_and_data_callback, iterate_inline_only, struct
13908         symbol_matcher_data, iterate_name_matcher): Delete.
13909         (iterate_over_all_matching_symtabs): Adjust to use function_view
13910         as callback type and lambdas.
13911         (iterate_over_file_blocks): Adjust to use function_view as
13912         callback type.
13913         (decode_compound_collector): Now a class with private fields.
13914         (decode_compound_collector::release_symbols): New method.
13915         (collect_one_symbol): Rename to...
13916         (decode_compound_collector::operator()): ... this and adjust.
13917         (lookup_prefix_sym): decode_compound_collector construction bits
13918         move to decode_compound_collector ctor.  Pass the
13919         decode_compound_collector object directly as callback.  Remove
13920         cleanups and use decode_compound_collector::release_symbols
13921         instead.
13922         (symtab_collector): Now a class with private fields.
13923         (symtab_collector::release_symtabs): New method.
13924         (add_symtabs_to_list): Rename to...
13925         (symtab_collector::operator()): ... this and adjust.
13926         (collect_symtabs_from_filename): symtab_collector construction
13927         bits move to symtab_collector ctor.  Pass the symtab_collector
13928         object directly as callback.  Remove cleanups and use
13929         symtab_collector::release_symtabs instead.
13930         (collect_symbols): Delete.
13931         (add_matching_symbols_to_info): Use lambdas.
13932         * macrocmd.c (print_macro_callback): Delete.
13933         (info_macro_command): Use a lambda.
13934         (info_macros_command): Pass print_macro_definition as callable
13935         directly.
13936         (print_one_macro): Remove 'ignore' parameter.
13937         (macro_list_command): Adjust.
13938         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13939         (macro_for_each_data::user_data): Delete field.
13940         (foreach_macro): Adjust to call the function_view.
13941         (macro_for_each): Adjust to use function_view as callback type.
13942         (foreach_macro_in_scope): Adjust to call the function_view.
13943         (macro_for_each_in_scope): Adjust to use function_view as callback
13944         type.
13945         * macrotab.h: Include "common/function-view.h".
13946         (macro_callback_fn): Declare a prototype instead of a pointer.
13947         Remove "user_data" parameter.
13948         (macro_for_each, macro_for_each_in_scope): Adjust to use
13949         function_view as callback type.
13950         * psymtab.c (partial_map_expand_apply)
13951         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13952         Adjust to use function_view as callback type and to return bool.
13953         (psym_expand_symtabs_matching): Adjust to use function_view as
13954         callback types.
13955         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13956         to use function_view as callback type and to return bool.
13957         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13958         callback types.
13959         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13960         as callback types.
13961         * symfile.h: Include "common/function-view.h".
13962         (expand_symtabs_file_matcher_ftype)
13963         (expand_symtabs_symbol_matcher_ftype)
13964         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13965         return bool.
13966         (quick_symbol_functions::map_symtabs_matching_filename)
13967         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13968         function_view as callback type and return bool.
13969         (expand_symtabs_matching): Adjust to use function_view as callback
13970         type.
13971         (maintenance_expand_name_matcher)
13972         (maintenance_expand_file_matcher): Delete.
13973         (maintenance_expand_symtabs): Use lambdas.
13974         * symtab.c (iterate_over_some_symtabs): Adjust to use
13975         function_view as callback types and return bool.
13976         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13977         of a cleanup.
13978         (lookup_symtab_callback): Delete.
13979         (lookup_symtab): Use a lambda.
13980         (iterate_over_symbols): Adjust to use function_view as callback
13981         type.
13982         (struct search_symbols_data, search_symbols_file_matches)
13983         (search_symbols_name_matches): Delete.
13984         (search_symbols): Use a pair of lambdas.
13985         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13986         (symtab_expansion_callback): Delete.
13987         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13988         * symtab.h: Include "common/function-view.h".
13989         (iterate_over_some_symtabs): Adjust to use function_view as
13990         callback type and return bool.
13991         (iterate_over_symtabs): Adjust to use function_view as callback
13992         type.
13993         (symbol_found_callback_ftype): Remove 'data' parameter and return
13994         bool.
13995         (iterate_over_symbols): Adjust to use function_view as callback
13996         type.
13997
13998 2017-02-23  Pedro Alves  <palves@redhat.com>
13999
14000         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14001         (%.o) <unittests/%.c>: New pattern.
14002         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14003         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14004         * common/function-view.h: New file.
14005         * unittests/function-view-selftests.c: New file.
14006         * configure: Regenerate.
14007
14008 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14009
14010         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14011         inferior_ptid.
14012         * go32-nat.c (go32_thread_alive): Likewise.
14013
14014 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14015
14016         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14017         delete.
14018
14019 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14020
14021         * varobj.c (varobj_clear_saved_item): Use delete instead of
14022         xfree.
14023         (update_dynamic_varobj_children): Likewise.
14024
14025 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14026
14027         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14028
14029 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14030
14031         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14032         m_enum_value to 0 in default constructor.
14033
14034 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14035
14036         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14037         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14038         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14039         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14040         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14041         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14042         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14043         IS_STORE_CONDITIONAL_INSN.
14044
14045 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14046
14047         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14048
14049 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14050
14051         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14052
14053 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14054
14055         * dwarf2read.c (skip_one_die, read_attribute_value)
14056         (dwarf2_const_value_attr, dump_die_shallow)
14057         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14058         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14059
14060 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14061
14062         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14063         (dwarf_parse_macro_header): Accept DWARF version 5.
14064         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14065
14066 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14067
14068         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14069         DW_AT_GNU_*.
14070         * common/common-exceptions.h (enum errors): Likewise.
14071         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14072         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14073         (dwarf_expr_context::execute_stack_op): Likewise.
14074         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14075         Likewise.
14076         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14077         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14078         (show_entry_values_debug, call_site_to_target_addr)
14079         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14080         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14081         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14082         (value_of_dwarf_block_entry, indirect_pieced_value)
14083         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14084         (disassemble_dwarf_expression): Likewise.
14085         * dwarf2read.c (process_die, inherit_abstract_dies)
14086         (read_call_site_scope): Likewise.
14087         * gdbtypes.h (struct func_type, struct call_site_parameter)
14088         (struct call_site): Likewise.
14089         * stack.c (read_frame_arg): Likewise.
14090         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14091
14092 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14093
14094         * defs.h (read_unsigned_leb128): New declaration.
14095         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14096         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14097         (dwarf2_find_location_expression): Call also
14098         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14099         * dwarf2loc.h (dwarf2_version): New declaration.
14100         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14101         rnglists.
14102         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14103         .debug_rnglists.
14104         (struct dwop_section_names): Add loclists_dwo.
14105         (dwop_section_names): Add .debug_loclists.dwo.
14106         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14107         (struct dwarf2_per_cu_data): Add dwarf_version.
14108         (struct dwo_sections): Add loclists.
14109         (struct attr_abbrev): Add implicit_const.
14110         (read_indirect_line_string): New declaration.
14111         (read_unsigned_leb128): Delete declaration.
14112         (rcuh_kind): New definition.
14113         (read_and_check_comp_unit_head): Change parameter
14114         is_debug_types_section to section_kind.
14115         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14116         (read_comp_unit_head): Change parameter abfd to section, add parameter
14117         section_kind.  Handle DWARF-5.
14118         (error_check_comp_unit_head): Accept also DWARF version 5.
14119         (read_and_check_comp_unit_head): Change parameter
14120         is_debug_types_section to section_kind.
14121         (read_and_check_type_unit_head): Delete function.
14122         (read_abbrev_offset): Handle DWARF-5.
14123         (create_debug_type_hash_table): Add parameter section_kind.  Process
14124         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14125         comp_unit_head.
14126         (create_debug_types_hash_table): Update create_debug_type_hash_table
14127         caller.
14128         (create_all_type_units): Call create_debug_type_hash_table.
14129         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14130         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14131         caller.
14132         (skip_one_die): Handle DW_FORM_implicit_const.
14133         (dwarf2_rnglists_process): New function.
14134         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14135         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14136         (read_attribute_value): Handle DW_FORM_implicit_const,
14137         DW_FORM_line_strp.
14138         (read_attribute): Handle DW_FORM_implicit_const.
14139         (read_indirect_string_at_offset_from): New function from
14140         read_indirect_string_at_offset.
14141         (read_indirect_string_at_offset): Call
14142         read_indirect_string_at_offset_from.
14143         (read_indirect_line_string_at_offset): New function.
14144         (read_indirect_string): New function comment.
14145         (read_indirect_line_string): New function.
14146         (read_unsigned_leb128): Make it global.
14147         (dwarf2_string_attr): Handle DWARF-5.
14148         (add_include_dir_stub, read_formatted_entries): New functions.
14149         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14150         Handle DWARF-5.
14151         (per_cu_header_read_in): Update read_comp_unit_head caller.
14152         (dwarf2_version): New function.
14153         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14154         rnglists.
14155         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14156         fields.
14157
14158 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14159
14160         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14161
14162 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14163
14164         * dwarf2read.c (dwarf2_ranges_process): New function from
14165         dwarf2_ranges_read.
14166         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14167         dwarf2_ranges_process.
14168
14169 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14170
14171         * dwarf2read.c (create_debug_type_hash_table): New function from
14172         create_debug_types_hash_table.
14173         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14174         (create_all_type_units, open_and_init_dwo_file): Update
14175         create_debug_types_hash_table callers.
14176
14177 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14178
14179         PR gdb/16188
14180         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14181         refer to 'ap', not 'args'.
14182
14183 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14184             Pedro Alves  <palves@redhat.com>
14185
14186         PR gdb/16188
14187         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14188         calls succeeded.
14189         * fork-child.c (trace_start_error): New function.
14190         (trace_start_error_with_name): Likewise.
14191         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14192         * inf-ptrace.c (inf_ptrace_me): Likewise.
14193         * inferior.h (trace_start_error): New prototype.
14194         (trace_start_error_with_name): Likewise.
14195
14196 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14197
14198         PR gdb/21164
14199         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14200         NULL before using it.
14201         * symmisc.c (maintenance_print_symbols): Likewise.
14202         (maintenance_print_msymbols): Likewise.
14203
14204 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14205
14206         * NEWS: Add record Python bindings entry.
14207
14208 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14209
14210         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14211         py-record-full.o.
14212         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14213         * python/py-record-btrace.c, python/py-record-btrace.h,
14214         python/py-record-full.c, python/py-record-full.h: New file.
14215         * python/py-record.c: Add include for py-record-btrace.h and
14216         py-record-full.h.
14217         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14218         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14219         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14220         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14221         New definition.
14222         (gdbpy_initialize_btrace): New export.
14223         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14224
14225 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14226
14227         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14228         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14229         * python/py-record.c: New file.
14230         * python/python-internal.h (gdbpy_start_recording,
14231         gdbpy_current_recording, gdpy_stop_recording,
14232         gdbpy_initialize_record): New export.
14233         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14234         (python_GdbMethods): Add gdbpy_start_recording,
14235         gdbpy_current_recording and gdbpy_stop_recording.
14236
14237 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14238
14239         * record-btrace.c (record_btrace_record_method): New function.
14240         (init_record_btrace_ops): Initialize to_record_method.
14241         * record-full.c (record_full_record_method): New function.
14242         (init_record_full_ops, init_record_full_core_ops): Add
14243         record_full_record_method.
14244         * record.h (enum record_method): New enum.
14245         * target-debug.h (target_debug_print_enum_record_method: New define.
14246         * target-delegates.c: Regenerate.
14247         * target.c (target_record_method): New function.
14248         * target.h: Include record.h.
14249         (struct target_ops) <to_record_method>: New field.
14250         (target_record_method): New export.
14251
14252 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14253
14254         * record.h (record_start, record_stop): New export.
14255         * record.c (record_start, record_stop): New function.
14256
14257 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14258
14259         * btrace.c (btrace_fetch): Copy function call segments pointer
14260         into a vector.
14261         (btrace_clear): Clear the vector.
14262         (btrace_find_insn_by_number): Use binary search to find the correct
14263         function call segment.
14264         * btrace.h (brace_fun_p): New typedef.
14265         (struct btrace_thread_info) <functions>: New field.
14266
14267 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14268
14269         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14270         * btrace.c (btrace_decode_error): ... here.  New function.
14271         * btrace.h (btrace_decode_error): New export.
14272
14273 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14274
14275         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14276         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14277         btrace_find_insn_by_number): Remove special case for gaps.
14278         * btrace.h (btrace_insn_get_error): New export.
14279         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14280         * record-btrace.c (btrace_insn_history): Print number for gaps.
14281         (record_btrace_info, record_btrace_goto): Handle gaps.
14282
14283 2017-02-14  Tom Tromey  <tom@tromey.com>
14284
14285         PR python/13598:
14286         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14287         event.
14288         * python/py-evts.c (gdbpy_initialize_py_events): Add
14289         before_prompt registry.
14290         * python/py-events.h (events_object) <before_prompt>: New field.
14291
14292 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14293
14294         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14295
14296 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14297
14298         * symfile (_initialize_symfile): Add usage text to the load command's
14299         help text.
14300
14301 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14302
14303         * utils.c (defaulted_query): Don't query on secondary UIs.
14304
14305 2017-02-10  Tom Tromey  <tom@tromey.com>
14306
14307         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14308
14309 2017-02-10  Tom Tromey  <tom@tromey.com>
14310
14311         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14312         "cleanup" local.
14313         * python/py-type.c (typy_legacy_template_argument): Remove
14314         unnecessary "cleanup" local.
14315
14316 2017-02-10  Tom Tromey  <tom@tromey.com>
14317
14318         * python/python.c (do_start_initialization): New function, from
14319         _initialize_python.
14320         (_initialize_python): Call do_start_initialization.
14321         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14322         goto.
14323
14324 2017-02-10  Tom Tromey  <tom@tromey.com>
14325
14326         * python/py-prettyprint.c (pretty_print_one_value): Use
14327         gdbpy_ref.
14328
14329 2017-02-10  Tom Tromey  <tom@tromey.com>
14330
14331         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14332         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14333         gdbpy_ref.
14334         * python/py-type.c (field_new): Use gdbpy_ref.
14335         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14336         gdbpy_ref.
14337         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14338         (py_free_pspace): Likewise.
14339         (pspace_to_pspace_object): Likewise.
14340         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14341         (py_free_objfile): Likewise.
14342         (objfile_to_objfile_object): Likewise.
14343         * python/py-inferior.c (delete_thread_object): Use
14344         gdbpy_ref.
14345         (infpy_read_memory): Likewise.
14346         (py_free_inferior): Likewise.
14347         * python/py-evtregistry.c (create_eventregistry_object): Use
14348         gdbpy_ref.
14349         * python/py-event.c (create_event_object): Use gdbpy_ref.
14350
14351 2017-02-10  Tom Tromey  <tom@tromey.com>
14352
14353         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14354         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14355         used.
14356         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14357         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14358         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14359         python/py-framefilter.c, python/py-function.c,
14360         python/py-inferior.c, python/py-infevents.c,
14361         python/py-linetable.c, python/py-newobjfileevent.c,
14362         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14363         python/py-signalevent.c, python/py-stopevent.c,
14364         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14365         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14366         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14367         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14368
14369 2017-02-10  Tom Tromey  <tom@tromey.com>
14370
14371         * ui-out.h (ui_out_emit_type): New class.
14372         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14373         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14374         and ui_out_emit_tuple.
14375         (enumerate_locals): Likewise.
14376         (py_mi_print_variables, py_print_locals, py_print_args): Use
14377         ui_out_emit_list.
14378         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14379         ui_out_emit_list.
14380         * common/gdb_optional.h: New file.
14381
14382 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14383
14384         * MAINTAINERS (Write After Approval): Update my e-mail address.
14385
14386 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14387
14388         PR gdb/21122
14389         * breakpoint.c (_initialize_breakpoint): Update the help description
14390         of the 'commands' command to indicate that it takes a list argument.
14391
14392 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14393
14394         * interps.c (current_interp_set_logging): Remove "return".
14395
14396 2017-02-09  Gary Benson  <gbenson@redhat.com>
14397
14398         * symtab.c (add_symtab_completions): Prevent NULL pointer
14399         dereference.
14400
14401 2017-02-08  Pedro Alves  <palves@redhat.com>
14402
14403         * interps.c (interp::interp): Remove reference to quiet_p.
14404         (interp_set): Make static.  Remove dead "Switching to" output
14405         code.
14406         (interp_quiet_p, interp_set_quiet): Delete.
14407         (interpreter_exec_cmd): Don't set the interpreter quiet.
14408         * interps.h (interp_quiet_p): Make static.
14409         (class interp) <quiet_p>: Remove field
14410
14411 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14412
14413         * cli/cli-decode.c (find_command_name_length): Make it extern.
14414         * cli/cli-decode.h (find_command_name_length): Declare.
14415         * cli/cli-script.c (command_name_equals, line_first_arg):
14416         New functions.
14417         (process_next_line): Use cli-decode to parse command names.
14418         (build_command_line): Make args a constant pointer.
14419
14420 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14421
14422         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14423         Remove case-insensitive search.
14424
14425 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14426
14427         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14428         at the end of the line.  Avoids an ARI warning.
14429
14430 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14431
14432         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14433         rdseed instructions.
14434         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14435
14436 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14437
14438         PR tdep/20936
14439         Provide and use sparc32 and sparc64 target description XML files.
14440         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14441         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14442         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14443         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14444         * features/sparc/sparc32-solaris.xml: New file.
14445         * features/sparc/sparc64-solaris.xml: New file.
14446         * features/sparc/sparc32-solaris.c: Generated.
14447         * features/sparc/sparc64-solaris.c: Generated.
14448         * sparc-tdep.h: Account for differences in target descriptions.
14449         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14450         (sparc32_register_type): Use target provided registers.
14451         (validate_tdesc_registers): New function.
14452         (sparc32_gdbarch_init): Use tdesc_has_registers.
14453         Set pseudoregister functions.
14454         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14455         (sparc64_register_type): Use target provided registers.
14456         (sparc64_init_abi): Set pseudoregister functions.
14457
14458 2017-02-03  Tom Tromey  <tom@tromey.com>
14459
14460         PR rust/21097:
14461         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14462         with a single member.
14463
14464 2017-02-03  Pedro Alves  <palves@redhat.com>
14465
14466         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14467         (cli_interp_base::~cli_interp_base): New.
14468         (cli_interp): New struct.
14469         (as_cli_interp): Cast the interp itself to cli_interp.
14470         (cli_interpreter_pre_command_loop): Rename to ...
14471         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14472         parameter.
14473         (cli_interpreter_init): Rename to ...
14474         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14475         boolean.  Make extern.
14476         (cli_interpreter_resume): Rename to ...
14477         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14478         extern.
14479         (cli_interpreter_suspend): Rename to ...
14480         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14481         extern.
14482         (cli_interpreter_exec): Rename to ...
14483         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14484         extern.
14485         (cli_interpreter_supports_command_editing): Rename to ...
14486         (cli_interp_base::supports_command_editing): ... this.  Remove
14487         'interp' parameter.  Make extern.
14488         (cli_ui_out): Rename to ...
14489         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14490         Make extern.
14491         (cli_set_logging): Rename to ...
14492         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14493         parameter.  Make extern.
14494         (cli_interp_procs): Delete.
14495         (cli_interp_factory): Adjust to use "new".
14496         * cli/cli-interp.h: Include "interps.h".
14497         (struct cli_interp_base): New struct.
14498         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14499         (interp_new): Delete.
14500         (interp::interp, interp::~interp): New.
14501         (interp_set): Use bool, and return void.  Assume the interpreter
14502         has suspend, init and resume methods, and that the all return
14503         void.
14504         (set_top_level_interpreter): interp_set returns void.
14505         (interp_ui_out): Adapt.
14506         (current_interp_set_logging): Adapt.
14507         (interp_data): Delete.
14508         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14509         (interp_exec): Adapt.
14510         (top_level_interpreter_data): Delete.
14511         * interps.h (interp_init_ftype, interp_resume_ftype)
14512         (interp_suspend_ftype, interp_exec_ftype)
14513         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14514         (class interp): New.
14515         (interp_new): Delete.
14516         (interp_set): Now returns void.  Use bool.
14517         (interp_data, top_level_interpreter_data): Delete.
14518         * mi/mi-common.h: Include interps.h.
14519         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14520         init, resume, suspect, exec, interp_ui_out, set_logging and
14521         pre_command_loop methods.
14522         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14523         (mi_interpreter_init): Rename to ...
14524         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14525         bool, return void and make extern.  Adjust.
14526         (mi_interpreter_resume): ... Rename to ...
14527         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14528         return void and make extern.  Adjust.
14529         (mi_interpreter_suspend): ... Rename to ...
14530         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14531         return void and make extern.  Adjust.
14532         (mi_interpreter_exec): ... Rename to ...
14533         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14534         extern.  Adjust.
14535         (mi_interpreter_pre_command_loop): ... Rename to ...
14536         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14537         parameter and make extern.
14538         (mi_on_normal_stop_1): Adjust.
14539         (mi_ui_out): Rename to ...
14540         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14541         parameter and make extern.  Adjust.
14542         (mi_set_logging): Rename to ...
14543         (mi_interp::set_logging): ... this.  Remove the 'interp'
14544         parameter and make extern.  Adjust.
14545         (mi_interp_procs): Delete.
14546         (mi_interp_factory): Adjust to use 'new'.
14547         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14548         (mi_print_exception, mi_execute_command, mi_load_progress):
14549         Adjust.
14550         * tui/tui-interp.c (tui_interp): New class.
14551         (as_tui_interp): Return a tui_interp pointer.
14552         (tui_on_normal_stop, tui_on_signal_received)
14553         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14554         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14555         to use interp::interp_ui_out.
14556         (tui_init): Rename to ...
14557         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14558         bool, return void and make extern.  Adjust.
14559         (tui_resume): Rename to ...
14560         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14561         return void and make extern.  Adjust.
14562         (tui_suspend): Rename to ...
14563         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14564         return void and make extern.  Adjust.
14565         (tui_ui_out): Rename to ...
14566         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14567         parameter, and make extern.  Adjust.
14568         (tui_exec): Rename to ...
14569         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14570         make extern.
14571         (tui_interp_procs): Delete.
14572         (tui_interp_factory): Use "new".
14573
14574 2017-02-02  Tom Tromey  <tom@tromey.com>
14575
14576         * rust-exp.y (ends_raw_string, space_then_number)
14577         (rust_identifier_start_p): Return bool.
14578         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14579         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14580         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14581         (rust_chartype_p): Return bool.
14582         (val_print_struct, rust_print_struct_def, rust_print_type):
14583         Update.
14584         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14585         Return bool.
14586
14587 2017-02-02  Tom Tromey  <tom@tromey.com>
14588
14589         * rust-lang.c: Reindent.
14590
14591 2017-02-02  Tom Tromey  <tom@tromey.com>
14592
14593         * rust-lang.h (rust_crate_for_block): Update.
14594         * rust-lang.c (rust_crate_for_block): Return std::string.
14595         (rust_get_disr_info): Use std:;string, not
14596         gdb::unique_xmalloc_ptr.
14597         * rust-exp.y (crate_name): Update.
14598
14599 2017-02-02  Pedro Alves  <palves@redhat.com>
14600
14601         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14602         field out of gdb_disassembler_test and make it static.
14603
14604 2017-02-02  Pedro Alves  <palves@redhat.com>
14605
14606         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14607         mi1_interp and mi_interp fields.
14608
14609 2017-02-02  Pedro Alves  <palves@redhat.com>
14610
14611         * cli/cli-interp.c (struct saved_output_files, saved_output):
14612         Moved from cli/cli-logging.c.
14613         (cli_set_logging): New function.
14614         (cli_interp_procs): Install cli_set_logging.
14615         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14616         Declare.
14617         * cli/cli-logging.c (struct saved_output_files, saved_output):
14618         Moved to cli/cli-interp.c.
14619         (pop_output_files): Don't save outputs here.
14620         (make_logging_output): New function.
14621         (handle_redirections): Don't build tee nor save previous outputs
14622         here.
14623         * interps.c (current_interp_set_logging): Change prototype.
14624         Assume there's always a set_logging_proc method installed.
14625         * interps.h (interp_set_logging_ftype): Change prototype.
14626         (current_interp_set_logging): Change prototype and adjust comment.
14627         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14628         use make_logging_output.
14629         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14630 2017-02-02  Pedro Alves  <palves@redhat.com>
14631
14632         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14633         from ...
14634         (set_logging_overwrite): ... here.
14635         (logging_no_redirect_file): Delete.
14636         (set_logging_redirect): Don't handle redirection on the fly.
14637         Instead warn that "logging off" / "logging on" is necessary.
14638         (pop_output_files): Delete references to logging_no_redirect_file.
14639         (show_logging_command): Always speak in terms of what will happen
14640         once logging is reenabled.
14641
14642 2017-02-02  Pedro Alves  <palves@redhat.com>
14643
14644         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14645
14646 2017-02-02  Pedro Alves  <palves@redhat.com>
14647
14648         * disasm.c (gdb_pretty_print_insn): Rename to ...
14649         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14650         Remove gdbarch parameter.  Adapt to clear the object's buffers
14651         instead of allocating new buffers, and to print using the object's
14652         gdb_disassembler instead of calling gdb_print_insn.
14653         (dump_insns): Use gdb_pretty_print_disassembler.
14654         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14655         (gdb_pretty_print_disassembler): New class.
14656         * record-btrace.c (btrace_insn_history): Use
14657         gdb_pretty_print_disassembler.
14658
14659 2017-02-02  Pedro Alves  <palves@redhat.com>
14660
14661         * ada-lang.c (type_as_string): Use string_file.
14662         * ada-valprint.c (ada_print_floating): Use string_file.
14663         * ada-varobj.c (ada_varobj_scalar_image)
14664         (ada_varobj_get_value_image): Use string_file.
14665         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14666         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14667         * breakpoint.c (update_inserted_breakpoint_locations)
14668         (insert_breakpoint_locations, reattach_breakpoints)
14669         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14670         (print_it_watchpoint): Use string_file.
14671         (save_breakpoints): Use stdio_file.
14672         * c-exp.y (oper): Use string_file.
14673         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14674         tee_file.
14675         (pop_output_files): Use delete.
14676         (handle_redirections): Use stdio_file and tee_file.
14677         * cli/cli-setshow.c (do_show_command): Use string_file.
14678         * compile/compile-c-support.c (c_compute_program): Use
14679         string_file.
14680         * compile/compile-c-symbols.c (generate_vla_size): Take a
14681         'string_file &' instead of a 'ui_file *'.
14682         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14683         of a 'ui_file *'.  Use string_file.
14684         (generate_c_for_variable_locations): Take a 'string_file &'
14685         instead of a 'ui_file *'.
14686         * compile/compile-internal.h (generate_c_for_for_one_variable):
14687         Take a 'string_file &' instead of a 'ui_file *'.
14688         * compile/compile-loc2c.c (push, pushf, unary, binary)
14689         (print_label, pushf_register_address, pushf_register)
14690         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14691         'ui_file *'.  Adjust.
14692         * compile/compile.c (compile_to_object): Use string_file.
14693         * compile/compile.h (compile_dwarf_expr_to_c)
14694         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14695         'ui_file *'.
14696         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14697         (replace_typedefs_qualified_name): Use string_file and
14698         obstack_copy0.
14699         * disasm.c (gdb_pretty_print_insn): Use string_file.
14700         (gdb_disassembly): Adjust reference the null_stream global.
14701         (do_ui_file_delete): Delete.
14702         (gdb_insn_length): Use null_stream.
14703         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14704         * dwarf2loc.c (dwarf2_compile_property_to_c)
14705         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14706         'string_file &' instead of a 'ui_file *'.
14707         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14708         * dwarf2read.c (do_ui_file_peek_last): Delete.
14709         (dwarf2_compute_name): Use string_file.
14710         * event-top.c (gdb_setup_readline): Use stdio_file.
14711         * gdbarch.sh (verify_gdbarch): Use string_file.
14712         * gdbtypes.c (safe_parse_type): Use null_stream.
14713         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14714         string_file.
14715         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14716         'string_file *' instead of a 'ui_file *'.
14717         (gdbscm_arch_disassemble): Use string_file.
14718         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14719         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14720         inherits from ui_file.
14721         (ioscm_file_port_delete, ioscm_file_port_rewind)
14722         (ioscm_file_port_put): Delete.
14723         (ioscm_file_port_write): Rename to ...
14724         (ioscm_file_port::write): ... this.  Remove file_port_magic
14725         checks.
14726         (ioscm_file_port_new): Delete.
14727         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14728         ui_file_up.
14729         * guile/scm-type.c (tyscm_type_name): Use string_file.
14730         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14731         Use string_file.
14732         * infcmd.c (print_return_value_1): Use string_file.
14733         * infrun.c (print_target_wait_results): Use string_file.
14734         * language.c (add_language): Use string_file.
14735         * location.c (explicit_to_string_internal): Use string_file.
14736         * main.c (captured_main_1): Use null_file.
14737         * maint.c (maintenance_print_architecture): Use stdio_file.
14738         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14739         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14740         event_channel>: Change type to mi_console_file pointer.
14741         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14742         (mi_console_file_delete): Delete.
14743         (struct mi_console_file): Delete.
14744         (mi_console_file_magic): Delete.
14745         (mi_console_file_new): Delete.
14746         (mi_console_file::mi_console_file): New.
14747         (mi_console_file_delete): Delete.
14748         (mi_console_file_fputs): Delete.
14749         (mi_console_file::write): New.
14750         (mi_console_raw_packet): Delete.
14751         (mi_console_file::flush): New.
14752         (mi_console_file_flush): Delete.
14753         (mi_console_set_raw): Rename to ...
14754         (mi_console_file::set_raw): ... this.
14755         * mi/mi-console.h (class mi_console_file): New class.
14756         (mi_console_file_new, mi_console_set_raw): Delete.
14757         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14758         (mi_set_logging): Use delete and tee_file.  Adjust.
14759         * mi/mi-main.c (output_register): Use string_file.
14760         (mi_cmd_data_evaluate_expression): Use string_file.
14761         (mi_cmd_data_read_memory): Use string_file.
14762         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14763         * mi/mi-out.c (mi_ui_out::main_stream): New.
14764         (mi_ui_out::rewind): Use main_stream and
14765         string_file.
14766         (mi_ui_out::put): Use main_stream and string_file.
14767         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14768         Allocate a 'string_file' instead.
14769         (mi_out_new): Don't allocate a mem_fileopen stream here.
14770         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14771         (mi_ui_out::main_stream): Declare method.
14772         * printcmd.c (eval_command): Use string_file.
14773         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14774         * python/py-arch.c (archpy_disassemble): Use string_file.
14775         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14776         * python/py-frame.c (frapy_str): Use string_file.
14777         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14778         Use string_file.
14779         * python/py-type.c (typy_str): Use string_file.
14780         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14781         * python/py-value.c (valpy_str): Use string_file.
14782         * record-btrace.c (btrace_insn_history): Use string_file.
14783         * regcache.c (regcache_print): Use stdio_file.
14784         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14785         * remote.c (escape_buffer): Use string_file.
14786         * rust-lang.c (rust_get_disr_info): Use string_file.
14787         * serial.c (serial_open_ops_1): Use stdio_file.
14788         (do_serial_close): Use delete.
14789         * stack.c (print_frame_arg): Use string_file.
14790         (print_frame_args): Remove local mem_fileopen stream, not used.
14791         (print_frame): Use string_file.
14792         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14793         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14794         Take a 'string_file *' instead of a 'ui_file *'.
14795         * top.c (new_ui): Use stdio_file and stderr_file.
14796         (free_ui): Use delete.
14797         (execute_command_to_string): Use string_file.
14798         (quit_confirm): Use string_file.
14799         * tracepoint.c (collection_list::append_exp): Use string_file.
14800         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14801         * tui/tui-file.c: Don't include "ui-file.h".
14802         (enum streamtype, struct tui_stream): Delete.
14803         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14804         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14805         (tui_file::tui_file): New method.
14806         (tui_file_fputs): Delete.
14807         (tui_file_get_strbuf): Delete.
14808         (tui_file::puts): New method.
14809         (tui_file_adjust_strbuf): Delete.
14810         (tui_file_flush): Delete.
14811         (tui_file::flush): New method.
14812         * tui/tui-file.h: Tweak intro comment.
14813         Include ui-file.h.
14814         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14815         (tui_file_adjust_strbuf): Delete declarations.
14816         (class tui_file): New class.
14817         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14818         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14819         (tui_register_format): Use string_stream.
14820         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14821         (tui_get_function_from_frame): Use string_file.
14822         * typeprint.c (type_to_string): Use string_file.
14823         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14824         (null_stream): New global.
14825         (ui_file_delete): Delete.
14826         (ui_file::ui_file): New.
14827         (null_file_isatty): Delete.
14828         (ui_file::~ui_file): New.
14829         (null_file_rewind): Delete.
14830         (ui_file::printf): New.
14831         (null_file_put): Delete.
14832         (null_file_flush): Delete.
14833         (ui_file::putstr): New.
14834         (null_file_write): Delete.
14835         (ui_file::putstrn): New.
14836         (null_file_read): Delete.
14837         (ui_file::putc): New.
14838         (null_file_fputs): Delete.
14839         (null_file_write_async_safe): Delete.
14840         (ui_file::vprintf): New.
14841         (null_file_delete): Delete.
14842         (null_file::write): New.
14843         (null_file_fseek): Delete.
14844         (null_file::puts): New.
14845         (ui_file_data): Delete.
14846         (null_file::write_async_safe): New.
14847         (gdb_flush, ui_file_isatty): Adjust.
14848         (ui_file_put, ui_file_rewind): Delete.
14849         (ui_file_write): Adjust.
14850         (ui_file_write_for_put): Delete.
14851         (ui_file_write_async_safe, ui_file_read): Adjust.
14852         (ui_file_fseek): Delete.
14853         (fputs_unfiltered): Adjust.
14854         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14855         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14856         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14857         (set_ui_file_data): Delete.
14858         (string_file::~string_file, string_file::write)
14859         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14860         (do_ui_file_as_string, ui_file_as_string): Delete.
14861         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14862         (struct mem_file): Delete.
14863         (mem_file_new): Delete.
14864         (stdio_file::stdio_file): New.
14865         (mem_file_delete): Delete.
14866         (stdio_file::stdio_file): New.
14867         (mem_fileopen): Delete.
14868         (stdio_file::~stdio_file): New.
14869         (mem_file_rewind): Delete.
14870         (stdio_file::set_stream): New.
14871         (mem_file_put): Delete.
14872         (stdio_file::open): New.
14873         (mem_file_write): Delete.
14874         (stdio_file_magic, struct stdio_file): Delete.
14875         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14876         (stdio_file::flush): New.
14877         (stdio_file_read): Rename to ...
14878         (stdio_file::read): ... this.  Adjust.
14879         (stdio_file_write): Rename to ...
14880         (stdio_file::write): ... this.  Adjust.
14881         (stdio_file_write_async_safe): Rename to ...
14882         (stdio_file::write_async_safe) ... this.  Adjust.
14883         (stdio_file_fputs): Rename to ...
14884         (stdio_file::puts) ... this.  Adjust.
14885         (stdio_file_isatty): Delete.
14886         (stdio_file_fseek): Delete.
14887         (stdio_file::isatty): New.
14888         (stderr_file_write): Rename to ...
14889         (stderr_file::write) ... this.  Adjust.
14890         (stderr_file_fputs): Rename to ...
14891         (stderr_file::puts) ... this.  Adjust.
14892         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14893         (stderr_file::stderr_file): New.
14894         (tee_file_magic): Delete.
14895         (struct tee_file): Delete.
14896         (tee_file::tee_file): New.
14897         (tee_file_new): Delete.
14898         (tee_file::~tee_file): New.
14899         (tee_file_delete): Delete.
14900         (tee_file_flush): Rename to ...
14901         (tee_file::flush): ... this.  Adjust.
14902         (tee_file_write): Rename to ...
14903         (tee_file::write): ... this.  Adjust.
14904         (tee_file::write_async_safe): New.
14905         (tee_file_fputs): Rename to ...
14906         (tee_file::puts): ... this.  Adjust.
14907         (tee_file_isatty): Rename to ...
14908         (tee_file::isatty): ... this.  Adjust.
14909         * ui-file.h (struct obstack, struct ui_file): Don't
14910         forward-declare.
14911         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14912         (ui_file_write_ftype)
14913         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14914         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14915         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14916         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14917         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14918         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14919         (set_ui_file_fseek): Delete.
14920         (ui_file_data, ui_file_delete, ui_file_rewind)
14921         (struct ui_file): New.
14922         (ui_file_up): New.
14923         (class null_file): New.
14924         (null_stream): Declare.
14925         (ui_file_write_for_put, ui_file_put): Delete.
14926         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14927         Delete.
14928         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14929         (gdb_fopen, tee_file_new): Delete.
14930         (struct string_file): New.
14931         (struct stdio_file): New.
14932         (stdio_file_up): New.
14933         (struct stderr_file): New.
14934         (class tee_file): New.
14935         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14936         of a 'ui_file *'.  Adjust.
14937         * ui-out.h (class ui_out) <field_stream>: Likewise.
14938         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14939         (null_stream): Delete.
14940         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14941         Adjust.
14942         * utils.h (struct ui_file): Delete forward declaration..
14943         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14944         (error_stream): Take a 'string_file &' instead of a
14945         'ui_file *'.
14946         * varobj.c (varobj_value_get_print_value): Use string_file.
14947         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14948         * gdbarch.c: Regenerate.
14949
14950 2017-02-02  Pedro Alves  <palves@redhat.com>
14951
14952         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14953         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14954         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14955         Adjust to call gdb_print_insn instead of
14956         gdb_disassembler::print_insn.
14957         (dump_insns, do_mixed_source_and_assembly_deprecated)
14958         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14959         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14960         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14961         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14962         declaration.
14963         (gdb_pretty_print_insn): Re-add declaration.
14964         * record-btrace.c (btrace_insn_history): Don't allocate a
14965         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14966
14967 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14968
14969         * disasm.h (gdb_disassembly): Remove file_string parameter.
14970         * disasm.c (gdb_disassembly): Likewise.
14971         * cli/cli-cmds.c (print_disassembly): Adapt.
14972         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14973         * stack.c (do_gdb_disassembly): Likewise.
14974
14975 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14976
14977         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14978         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14979         targets.  And if the implicit value is longer than needed, extract
14980         the first bytes instead of the "least significant" ones.
14981
14982 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14983
14984         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14985         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14986         (btrace_fetch): Assert can_access_registers_ptid.
14987         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14988         validate_registers_access.
14989
14990 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14991
14992         * gdbthread.h (can_access_registers_ptid): New.
14993         * thread.c (can_access_registers_ptid): New.
14994
14995 2017-02-01  Pedro Alves  <palves@redhat.com>
14996
14997         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14998
14999 2017-01-31  Pedro Alves  <palves@redhat.com>
15000
15001         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15002         Fix typos.
15003
15004 2017-01-31  Pedro Alves  <palves@redhat.com>
15005
15006         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15007         not used.
15008
15009 2017-01-31  Pedro Alves  <palves@redhat.com>
15010
15011         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15012
15013 2017-01-31  Pedro Alves  <palves@redhat.com>
15014
15015         * common/scoped_restore.h
15016         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15017         change the value's parameter type to T2.
15018         (make_scoped_restore): Likewise.
15019
15020 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15021             Richard Henderson  <rth@redhat.com>
15022
15023         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15024         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15025         GS_BASE for older kernels.
15026         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15027         GS_BASE for older kernels.
15028         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15029         and GS_BASE to the offset table.
15030         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15031         system register group.
15032         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15033         for older kernels.
15034         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15035         amd64 ABI.
15036         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15037         AMD64_GSBASE_REGNUM.
15038         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15039         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15040         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15041         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15042         i386/64bit-segments.xml in those rules.
15043         * features/i386/64bit-segments.xml: New file.
15044         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15045         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15046         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15047         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15048         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15049         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15050         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15051         * features/i386/amd64-avx-linux.c: Regenerated.
15052         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15053         * features/i386/amd64-avx-mpx.c: Regenerated.
15054         * features/i386/amd64-avx512-linux.c: Regenerated.
15055         * features/i386/amd64-linux.c: Regenerated.
15056         * features/i386/amd64-mpx-linux.c: Regenerated.
15057         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15058         * features/i386/i386-avx-mpx.c: Regenerated.
15059         * features/i386/x32-avx-linux.c: Regenerated.
15060         * features/i386/x32-avx512-linux.c: Regenerated.
15061         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15062         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15063         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15064         * regformats/i386/amd64-linux.dat: Regenerated.
15065         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15066         * regformats/i386/x32-avx-linux.dat: Regenerated.
15067         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15068         * regformats/i386/x32-linux.dat: Regenerated.
15069
15070 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15071
15072         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15073         Set to AMD64_NUM_REGS.
15074
15075 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15076
15077         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15078         that checks validity of a register number.
15079
15080 2017-01-27  Kees Cook  <keescook@google.com>
15081
15082         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15083         fetch_fpregs if target has fpa registers.
15084         (arm_linux_store_inferior_registers): Call store_fpregs if target
15085         has fpa registers.
15086
15087 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15088
15089         * cris-tdep.c (cris_gdbarch_init): Remove check for
15090         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15091
15092 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15093
15094         * corelow.c (get_core_register_section): Check for regset
15095         existence before checking for REGSET_VARIABLE_SIZE.
15096
15097 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15098             Pedro Alves  <palves@redhat.com>
15099
15100         PR gdb/20939
15101         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15102         call memory_error, save memaddr instead.
15103         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15104         negative, cal memory_error.
15105         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15106
15107 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15108
15109         * disasm-selftests.c (memory_error_test): New function.
15110         (_initialize_disasm_selftests): Register memory_error_test.
15111
15112 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15113
15114         * Makefile.in (SFILES): Add disasm-selftests.c and
15115         selftest-arch.c.
15116         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15117         * disasm-selftests.c: New file.
15118         * selftest-arch.c: New file.
15119         * selftest-arch.h: New file.
15120
15121 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15122
15123         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15124         to bfd_arch_mep.  Don't return 0 if section is not
15125         found.  Call print_insn_mep.
15126
15127 2017-01-26  Pedro Alves  <palves@redhat.com>
15128             Yao Qi  <yao.qi@linaro.org>
15129
15130         * arm-tdep.c: Include "disasm.h".
15131         (gdb_print_insn_arm): Update code to get gdbarch.
15132         * disasm.c (dis_asm_read_memory): Change it to
15133         gdb_disassembler::dis_asm_read_memory.
15134         (dis_asm_memory_error): Likewise.
15135         (dis_asm_print_address): Likewise.
15136         (gdb_pretty_print_insn): Change it to
15137         gdb_disassembler::pretty_print_insn.
15138         (dump_insns): Add one argument gdb_disassemlber.  All
15139         callers updated.
15140         (do_mixed_source_and_assembly_deprecated): Likewise.
15141         (do_mixed_source_and_assembly): Likewise.
15142         (do_assembly_only): Likewise.
15143         (gdb_disassembler::gdb_disassembler): New.
15144         (gdb_disassembler::print_insn): New.
15145         * disasm.h (class gdb_disassembler): New.
15146         (gdb_pretty_print_insn): Remove declaration.
15147         (gdb_disassemble_info): Likewise.
15148         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15149         (gdbscm_disasm_read_memory_worker): Update.
15150         (gdbscm_disasm_read_memory): Update.
15151         (gdbscm_disasm_memory_error): Remove.
15152         (gdbscm_disasm_print_address): Remove.
15153         (gdbscm_disassembler::gdbscm_disassembler): New.
15154         (gdbscm_print_insn_from_port): Update.
15155         * mips-tdep.c: Include disasm.h.
15156         (gdb_print_insn_mips): Update code to get gdbarch.
15157         * record-btrace.c (btrace_insn_history): Update.
15158         * spu-tdep.c: Include disasm.h.
15159         (struct spu_dis_asm_data): Remove.
15160         (struct spu_dis_asm_info): New.
15161         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15162         SPU id.
15163         (gdb_print_insn_spu): Cast disassemble_info to
15164         spu_dis_asm_info.
15165
15166 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15167
15168         * disasm.c (do_ui_file_delete): Delete.
15169         (gdb_insn_length): Move code creating stream to ...
15170         * utils.c (null_stream): ... here.  New function.
15171         * utils.h (null_stream): Declare.
15172
15173 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15174
15175         * python/py-inferior.c (find_thread_object): Return directly
15176         from the loop.  Remove "found" variable.
15177
15178 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15179
15180         GDB 7.12.1 released.
15181
15182 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15183
15184         * python/py-function.c (fnpy_call): Reorder declarations to have
15185         the gdbpy_enter object declared first.
15186         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15187
15188 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15189
15190         PR python/21068
15191         * python/python-internal.h (PyMem_RawMalloc): Define for
15192         Python < 3.4.
15193         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15194         PyMem_RawMalloc instead of PyMem_Malloc.
15195
15196 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15197             Luis Machado  <lgustavo@codesourcery.com>
15198
15199         * NEWS (New commands): Mention flash-erase.
15200         (New MI commands): Mention target-flash-erase.
15201         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15202         command.
15203         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15204         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15205         * target.c (flash_erase_command): New function.
15206         (initialize_targets): Add new flash-erase command.
15207         * target.h (flash_erase_command): New declaration.
15208
15209 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15210
15211         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15212         HAVE_SYS_PROCFS_H is defined.
15213
15214 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15215
15216         * remote.c (struct cached_reg): Change data into a pointer.
15217         * (stop_reply_dtr): Free data pointers before deleting vector.
15218         (process_stop_reply): Likewise.
15219         (remote_parse_stop_reply): Allocate space for data
15220
15221 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15222
15223         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15224         MAX_REGISTER_SIZE.
15225         (amd64_pseudo_register_read_value): Likewise.
15226         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15227         (store_register_using_P): Likewise.
15228         * regcache.c (regcache_xfer_part): Likewise.
15229
15230 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15231
15232         Split real and pseudo registers.
15233         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15234         (sparc32_pseudo_regnum): New enum.
15235         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15236         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15237         (SPARC32_CP0_REGISTERS): New macro.
15238         (sparc32_pseudo_register_name): New function.
15239         (sparc32_register_name): Use sparc32_pseudo_register_name.
15240         (sparc32_pseudo_register_type): New function.
15241         (sparc32_register_type): Use sparc32_pseudo_register_type.
15242         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15243         pseudo register numbers.
15244         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15245         (SPARC64_CP0_REGISTERS): New macro.
15246         (sparc64_pseudo_register_name): New function.
15247         (sparc64_register_name): Use sparc64_pseudo_register_name.
15248         (sparc64_pseudo_register_type): New function.
15249         (sparc64_register_type): Use sparc64_pseudo_register_type.
15250         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15251         pseudo register numbers.
15252         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15253         sparc64_store_arguments): Handle pseudo register numbers.
15254
15255 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15256
15257         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15258         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15259         output.
15260         (getpkt_or_notif_sane_1): Likewise.
15261
15262 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15263
15264         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15265         of CC.  Pass "-x c++-header" instead of "-x c".
15266
15267 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15268
15269         * remote.c (remote_can_async_p): Update comment.
15270
15271 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15272
15273         * linux-nat.c (linux_nat_can_async_p): Update comment.
15274
15275 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15276
15277         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15278
15279 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15280
15281         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15282
15283 2017-01-10  Tom Tromey  <tom@tromey.com>
15284
15285         * python/py-type.c (typy_legacy_template_argument): Update.
15286         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15287         ~demangle_parse_info): Declare new members.
15288         (cp_demangled_name_to_comp): Return unique_ptr.
15289         (cp_demangled_name_parse_free)
15290         (make_cleanup_cp_demangled_name_parse_free)
15291         (cp_new_demangle_parse_info): Remove.
15292         * cp-support.c (do_demangled_name_parse_free_cleanup)
15293         (make_cleanup_cp_demangled_name_parse_free): Remove.
15294         (inspect_type, cp_canonicalize_string_full)
15295         (cp_canonicalize_string): Update.
15296         (mangled_name_to_comp): Change return type.
15297         (cp_class_name_from_physname, method_name_from_physname)
15298         (cp_func_name, cp_remove_params): Update.
15299         * cp-name-parser.y (demangle_parse_info): New constructor, from
15300         cp_new_demangle_parse_info.
15301         (~demangle_parse_info): New destructor, from
15302         cp_demangled_name_parse_free.
15303         (cp_merge_demangle_parse_infos): Update.
15304         (cp_demangled_name_to_comp): Change return type.
15305
15306 2017-01-10  Tom Tromey  <tom@tromey.com>
15307
15308         * top.c (prevent_dont_repeat): Change return type.
15309         * python/python.c (execute_gdb_command): Use std::string.
15310         Update.
15311         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15312         * command.h (prevent_dont_repeat): Change return type.
15313         * breakpoint.c (bpstat_do_actions_1): Update.
15314
15315 2017-01-10  Tom Tromey  <tom@tromey.com>
15316
15317         * value.h (scoped_value_mark::~scoped_value_mark): Call
15318         free_to_mark.
15319         (scoped_value_mark::free_to_mark): New method.
15320         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15321         scoped_value_mark.
15322
15323 2017-01-10  Tom Tromey  <tom@tromey.com>
15324
15325         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15326         (valpy_reference_value, valpy_const_value, valpy_get_address)
15327         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15328         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15329         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15330         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15331         scoped_value_mark.
15332         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15333         * value.h (scoped_value_mark): New class.
15334
15335 2017-01-10  Tom Tromey  <tom@tromey.com>
15336
15337         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15338         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15339         * psymtab.c (discard_psymtabs_upto): Remove.
15340         (make_cleanup_discard_psymtabs): Remove.
15341         (struct psymtab_state): Remove.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * record-full.c (record_full_save_cleanups): Remove.
15346         (record_full_save): Use gdb::unlinker.
15347         * gcore.c (do_bfd_delete_cleanup): Remove.
15348         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15349         cleanups.
15350         * dwarf2read.c (unlink_if_set): Remove.
15351         (write_psymtabs_to_index): Use gdb::unlinker.
15352         * common/gdb_unlinker.h: New file.
15353
15354 2017-01-10  Tom Tromey  <tom@tromey.com>
15355
15356         * windows-tdep.c (windows_xfer_shared_library): Update.
15357         * windows-nat.c (windows_make_so): Update.
15358         * utils.h (make_cleanup_bfd_unref): Remove.
15359         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15360         * symfile.h (symfile_bfd_open)
15361         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15362         * symfile.c (read_symbols, symbol_file_add)
15363         (separate_debug_file_exists): Update.
15364         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15365         (generic_load, reread_symbols): Update.
15366         * symfile-mem.c (symbol_file_add_from_memory): Update.
15367         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15368         (spu_symbol_file_add_from_memory): Update.
15369         * solist.h (struct target_so_ops) <bfd_open>: Return
15370         gdb_bfd_ref_ptr.
15371         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15372         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15373         gdb_bfd_ref_ptr.
15374         (solib_map_sections, reload_shared_libraries_1): Update.
15375         * solib-svr4.c (enable_break): Update.
15376         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15377         * solib-frv.c (enable_break2): Update.
15378         * solib-dsbt.c (enable_break): Update.
15379         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15380         gdb_bfd_ref_ptr.
15381         (darwin_solib_get_all_image_info_addr_at_init): Update.
15382         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15383         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15384         * record-full.c (record_full_save): Update.
15385         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15386         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15387         * minidebug.c (find_separate_debug_file_in_section): Return
15388         gdb_bfd_ref_ptr.
15389         * machoread.c (macho_add_oso_symfile): Change abfd to
15390         gdb_bfd_ref_ptr.
15391         (macho_symfile_read_all_oso): Update.
15392         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15393         (macho_symfile_read): Update.
15394         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15395         (jit_bfd_try_read_symtab): Update.
15396         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15397         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15398         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15399         gdb_bfd_ref_ptr.
15400         (gdb_bfd_ref_policy): New struct.
15401         (gdb_bfd_ref_ptr): New typedef.
15402         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15403         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15404         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15405         gdb_bfd_ref_ptr.
15406         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15407         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15408         (gcore_command): Update.
15409         * exec.c (exec_file_attach): Update.
15410         * elfread.c (elf_symfile_read): Update.
15411         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15412         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15413         (open_and_init_dwo_file): Update.
15414         (open_dwp_file): Return gdb_bfd_ref_ptr.
15415         (open_and_init_dwp_file): Update.
15416         * corelow.c (core_open): Update.
15417         * compile/compile-object-load.c (compile_object_load): Update.
15418         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15419         * coffread.c (coff_symfile_read): Update.
15420         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15421         gdb_bfd_ref_ptr.  Rename.
15422         (dump_bfd_file, restore_command): Update.
15423         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15424         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15425         (find_separate_debug_file_by_buildid): Update.
15426
15427 2017-01-10  Tom Tromey  <tom@tromey.com>
15428
15429         * common/gdb_ref_ptr.h: New file.
15430         * python/py-ref.h (struct gdbpy_ref_policy): New.
15431         (gdbpy_ref): Now a typedef.
15432
15433 2017-01-10  Tom Tromey  <tom@tromey.com>
15434
15435         * utils.h (make_cleanup_htab_delete): Don't declare.
15436         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15437         Remove.
15438         * linespec.c (decode_compound_collector): Add constructor,
15439         destructor.
15440         (lookup_prefix_sym): Remove cleanup.
15441         (symtab_collector): Add constructor, destructor.
15442         (collect_symtabs_from_filename): Remove cleanup.
15443         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15444         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15445         Use htab_up.
15446         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15447         * dwarf2read.c (dw2_expand_symtabs_matching)
15448         (dw2_map_symbol_filenames, dwarf_decode_macros)
15449         (write_psymtabs_to_index): Use htab_up.
15450         * dwarf2loc.c (func_verify_no_selftailcall)
15451         (call_site_find_chain_1, func_verify_no_selftailcall)
15452         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15453         std::vector, gdb::unique_xmalloc_ptr.
15454         (call_sitep): Remove typedef.
15455         (dwarf2_locexpr_baton_eval): Remove unused variable.
15456
15457 2017-01-10  Tom Tromey  <tom@tromey.com>
15458
15459         * python/python-internal.h (make_cleanup_py_decref)
15460         (make_cleanup_py_xdecref): Don't declare.
15461         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15462         (py_xdecref, make_cleanup_py_xdecref): Remove.
15463
15464 2017-01-10  Tom Tromey  <tom@tromey.com>
15465
15466         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15467         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-utils.c (unicode_to_encoded_string)
15476         (python_string_to_target_string)
15477         (python_string_to_target_python_string)
15478         (python_string_to_host_string, gdbpy_obj_to_string)
15479         (get_addr_from_python): Use gdbpy_ref.
15480
15481 2017-01-10  Tom Tromey  <tom@tromey.com>
15482
15483         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15484         gdbpy_ref.
15485
15486 2017-01-10  Tom Tromey  <tom@tromey.com>
15487
15488         * python/python.c (eval_python_command, gdbpy_decode_line)
15489         (gdbpy_run_events, gdbpy_start_type_printers)
15490         (gdbpy_apply_type_printers): Use gdbpy_ref.
15491
15492 2017-01-10  Tom Tromey  <tom@tromey.com>
15493
15494         * python/py-param.c (get_doc_string, compute_enum_values): Use
15495         gdbpy_ref.
15496
15497 2017-01-10  Tom Tromey  <tom@tromey.com>
15498
15499         * python/py-inferior.c (find_thread_object, build_inferior_list):
15500         Use gdbpy_ref.
15501
15502 2017-01-10  Tom Tromey  <tom@tromey.com>
15503
15504         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15505
15506 2017-01-10  Tom Tromey  <tom@tromey.com>
15507
15508         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15509         gdbpy_ref.
15510
15511 2017-01-10  Tom Tromey  <tom@tromey.com>
15512
15513         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15514         extra incref.
15515         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15516         Use gdbpy_ref.
15517
15518 2017-01-10  Tom Tromey  <tom@tromey.com>
15519
15520         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15521         gdbpy_ref.
15522
15523 2017-01-10  Tom Tromey  <tom@tromey.com>
15524
15525         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15526         decref results of PyArg_ParseTupleAndKeywords.
15527
15528 2017-01-10  Tom Tromey  <tom@tromey.com>
15529
15530         * python/python.c (python_run_simple_file): Use
15531         unique_xmalloc_ptr, gdbpy_ref.
15532
15533 2017-01-10  Tom Tromey  <tom@tromey.com>
15534
15535         * python/py-prettyprint.c (print_stack_unless_memory_error)
15536         (print_string_repr, print_children): Use gdbpy_ref.
15537         (dummy_python_frame): New class.
15538         (dummy_python_frame::dummy_python_frame): Rename from
15539         push_dummy_python_frame.
15540         (py_restore_tstate): Remove.
15541
15542 2017-01-10  Tom Tromey  <tom@tromey.com>
15543
15544         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15545
15546 2017-01-10  Tom Tromey  <tom@tromey.com>
15547
15548         * python/python.c (ensure_python_env, restore_python_env):
15549         Remove.
15550         * python/python-internal.h (ensure_python_env): Don't declare.
15551         * varobj.h (varobj_ensure_python_env): Don't declare.
15552         * varobj.c (varobj_ensure_python_env): Remove.
15553
15554 2017-01-10  Tom Tromey  <tom@tromey.com>
15555
15556         * varobj.c (varobj_value_get_print_value): Use
15557         gdbpy_enter_varobj.
15558
15559 2017-01-10  Tom Tromey  <tom@tromey.com>
15560
15561         * python/py-prettyprint.c (print_string_repr, print_children):
15562         Update.
15563         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15564         of "encoding".
15565         * varobj.c (varobj_value_get_print_value): Update.
15566         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15567
15568 2017-01-10  Tom Tromey  <tom@tromey.com>
15569
15570         * varobj.c (varobj_get_display_hint)
15571         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15572         (varobj_set_visualizer, free_variable): Use
15573         gdbpy_enter_varobj.
15574
15575 2017-01-10  Tom Tromey  <tom@tromey.com>
15576
15577         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15578         (do_finish_initialization): New function.  Use gdbpy_ref.
15579         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15580         do_finish_initialization.
15581
15582 2017-01-10  Tom Tromey  <tom@tromey.com>
15583
15584         * python/py-param.c (get_set_value, get_show_value): Use
15585         gdbpy_enter, gdbpy_ref.
15586
15587 2017-01-10  Tom Tromey  <tom@tromey.com>
15588
15589         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15590
15591 2017-01-10  Tom Tromey  <tom@tromey.com>
15592
15593         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15594
15595 2017-01-10  Tom Tromey  <tom@tromey.com>
15596
15597         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15598         Use gdbpy_enter_varobj.
15599
15600 2017-01-10  Tom Tromey  <tom@tromey.com>
15601
15602         * varobj.c (gdbpy_enter_varobj): New constructor.
15603         * python/python-internal.h (gdbpy_enter_varobj): New class.
15604         * python/py-varobj.c (py_varobj_get_iterator): Use
15605         gdbpy_enter_varobj.
15606
15607 2017-01-10  Tom Tromey  <tom@tromey.com>
15608
15609         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15610         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15611         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15612         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15613         unique_xmalloc_ptr.
15614         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15615
15616 2017-01-10  Tom Tromey  <tom@tromey.com>
15617
15618         * python/py-xmethods.c (invoke_match_method): Use
15619         gdbpy_ref.
15620
15621 2017-01-10  Tom Tromey  <tom@tromey.com>
15622
15623         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15624         gdbpy_enter, gdbpy_ref.
15625
15626 2017-01-10  Tom Tromey  <tom@tromey.com>
15627
15628         * python/python.c (python_interactive_command): Use gdbpy_enter.
15629
15630 2017-01-10  Tom Tromey  <tom@tromey.com>
15631
15632         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15633         gdbpy_ref.
15634
15635 2017-01-10  Tom Tromey  <tom@tromey.com>
15636
15637         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15638         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15639
15640 2017-01-10  Tom Tromey  <tom@tromey.com>
15641
15642         * utils.h (htab_deleter): New struct.
15643         (htab_up): New typedef.
15644         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15645         gdbpy_enter, gdbpy_ref, htab_up.
15646
15647 2017-01-10  Tom Tromey  <tom@tromey.com>
15648
15649         * python/py-unwind.c (pending_frame_invalidate): Remove.
15650         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15651
15652 2017-01-10  Tom Tromey  <tom@tromey.com>
15653
15654         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15655         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15656
15657 2017-01-10  Tom Tromey  <tom@tromey.com>
15658
15659         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15660
15661 2017-01-10  Tom Tromey  <tom@tromey.com>
15662
15663         * python/python.c (gdbpy_eval_from_control_command)
15664         (gdbpy_source_script, gdbpy_run_events)
15665         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15666         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15667         gdbpy_enter.
15668
15669 2017-01-10  Tom Tromey  <tom@tromey.com>
15670
15671         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15672
15673 2017-01-10  Tom Tromey  <tom@tromey.com>
15674
15675         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15676
15677 2017-01-10  Tom Tromey  <tom@tromey.com>
15678
15679         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15680         (python_on_inferior_call_pre, python_on_inferior_call_post)
15681         (python_on_memory_change, python_on_register_change)
15682         (python_inferior_exit, python_new_objfile, add_thread_object)
15683         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15684
15685 2017-01-10  Tom Tromey  <tom@tromey.com>
15686
15687         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15688         (bpfinishpy_handle_exit): Use gdbpy_enter.
15689
15690 2017-01-10  Tom Tromey  <tom@tromey.com>
15691
15692         * python/py-cmd.c (cmdpy_destroyer)
15693         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15694         gdbpy_enter.
15695
15696 2017-01-10  Tom Tromey  <tom@tromey.com>
15697
15698         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15699         gdbpy_enter.
15700         (gdbpy_breakpoint_has_cond): Likewise.
15701
15702 2017-01-10  Tom Tromey  <tom@tromey.com>
15703
15704         * python/python.c (gdbpy_enter): New constructor.
15705         (~gdbpy_enter): New destructor.
15706         (restore_python_env, ensure_python_env): Rewrite.
15707         * python/python-internal.h (gdbpy_enter): New class.
15708
15709 2017-01-10  Tom Tromey  <tom@tromey.com>
15710
15711         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15712
15713 2017-01-10  Tom Tromey  <tom@tromey.com>
15714
15715         * python/py-value.c (value_has_field, get_field_flag)
15716         (get_field_type, valpy_getitem, convert_value_from_python): Use
15717         gdbpy_ref.
15718
15719 2017-01-10  Tom Tromey  <tom@tromey.com>
15720
15721         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15722         gdbpy_ref.
15723
15724 2017-01-10  Tom Tromey  <tom@tromey.com>
15725
15726         * python/py-prettyprint.c (search_pp_list)
15727         (find_pretty_printer_from_objfiles)
15728         (find_pretty_printer_from_progspace)
15729         (find_pretty_printer_from_gdb, find_pretty_printer)
15730         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15731         gdbpy_ref.
15732
15733 2017-01-10  Tom Tromey  <tom@tromey.com>
15734
15735         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15736
15737 2017-01-10  Tom Tromey  <tom@tromey.com>
15738
15739         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15740         (ltpy_get_all_source_lines): Use gdbpy_ref.
15741
15742 2017-01-10  Tom Tromey  <tom@tromey.com>
15743
15744         * python/py-framefilter.c (extract_sym, extract_value)
15745         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15746         gdbpy_ref.
15747
15748 2017-01-10  Tom Tromey  <tom@tromey.com>
15749
15750         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15751
15752 2017-01-10  Tom Tromey  <tom@tromey.com>
15753
15754         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15755
15756 2017-01-10  Tom Tromey  <tom@tromey.com>
15757
15758         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15759         gdbpy_ref.
15760
15761 2017-01-10  Tom Tromey  <tom@tromey.com>
15762
15763         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15764
15765 2017-01-10  Tom Tromey  <tom@tromey.com>
15766
15767         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15768         (typy_range): Use gdbpy_ref.
15769
15770 2017-01-10  Tom Tromey  <tom@tromey.com>
15771
15772         * python/py-threadevent.c (create_thread_event_object): Use
15773         gdbpy_ref.
15774         * python/py-stopevent.c (create_stop_event_object): Simplify.
15775         (emit_stop_event): Use gdbpy_ref.
15776         * python/py-signalevent.c (create_signal_event_object): Use
15777         gdbpy_ref.
15778         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15779         (emit_new_objfile_event, create_clear_objfiles_event_object)
15780         (emit_clear_objfiles_event): Use gdbpy_ref.
15781         * python/py-infevents.c (create_inferior_call_event_object)
15782         (create_register_changed_event_object)
15783         (create_memory_changed_event_object, emit_inferior_call_event)
15784         (emit_memory_changed_event, emit_register_changed_event): Use
15785         gdbpy_ref.
15786         * python/py-exitedevent.c (create_exited_event_object)
15787         (emit_exited_event): Use gdbpy_ref.
15788         * python/py-event.h (evpy_emit_event): Remove
15789         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15790         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15791         * python/py-continueevent.c (emit_continue_event): Use
15792         gdbpy_ref.
15793         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15794         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15795         gdbpy_ref.
15796         * python/py-bpevent.c (create_breakpoint_event_object): Use
15797         gdbpy_ref.
15798
15799 2017-01-10  Tom Tromey  <tom@tromey.com>
15800
15801         * python/py-ref.h: New file.
15802
15803 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15804
15805         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15806         void.
15807         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15808         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15809         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15810         * ui-out.c (ui_out::redirect): Likewise.
15811         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15812         * cli/cli-logging.c (set_logging_redirect): Update call site of
15813         ui_out::redirect.
15814         (handle_redirections): Likewise.
15815         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15816         * top.c (execute_command_to_string): Likewise.
15817         * utils.c (do_ui_out_redirect_pop): Likewise.
15818
15819 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15820
15821         * stack.c (_initialize_stack): Update "frame" command help message.
15822
15823 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15824
15825         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15826
15827 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15828
15829         * x86-linux-nat.h: Include gdb_proc_service.h.
15830
15831 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15832
15833         * ser-base.h: Include serial.h.
15834
15835 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15836
15837         * ppc-linux-tdep.h: Include ppc-tdep.h.
15838
15839 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15840
15841         * nat/amd64-linux-siginfo.h: Include signal.h.
15842
15843 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15844
15845         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15846
15847 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15848
15849         * mi/mi-parse.h: Include mi-cmds.h.
15850
15851 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15852
15853         * inf-loop.c: Don't include "target.h".
15854         * inf-loop.h: Include it here.
15855
15856 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15857
15858         * dfp.h: Include "dboulest.h" and "expression.h".
15859
15860 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15861
15862         * ax-gdb.h: Include "ax.h".
15863
15864 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15865
15866         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15867         with nat/gdb_ptrace.h.
15868
15869 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15870
15871         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15872         new line.
15873         (mips64_fbsd_sigframe_init): Likewise.
15874
15875 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15876
15877         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15878         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15879
15880 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15881
15882         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15883         * NEWS: Mention new FreeBSD/mips native configuration.
15884         * config/mips/fbsd.mh: New file.
15885         * configure.host: Add mips*-*-freebsd*.
15886         * mips-fbsd-nat.c: New file.
15887
15888 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15889
15890         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15891         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15892         * NEWS: Mention new FreeBSD/mips target.
15893         * configure.tgt: Add mips*-*-freebsd*.
15894         * mips-fbsd-tdep.c: New file.
15895         * mips-fbsd-tdep.h: New file.
15896
15897 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15898
15899         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15900         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15901
15902 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15903
15904         Update copyright year range in all GDB files.
15905
15906 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15907
15908         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15909
15910 For older changes see ChangeLog-2016.
15911 \f
15912 Local Variables:
15913 mode: change-log
15914 left-margin: 8
15915 fill-column: 74
15916 version-control: never
15917 coding: utf-8
15918 End: