Fix build with GCC 8: strncpy -> memcpy
[external/binutils.git] / gdb / ChangeLog
1 2017-11-22  Yao Qi  <yao.qi@linaro.org>
2
3         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
4         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
5
6 2017-11-21  Jerome Guitton  <guitton@adacore.com>
7
8         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
9         with event ptid from the lower layer before doing the
10         ravenscar-specific update.
11
12 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
13
14         * ravenscar-thread.c (is_ravenscar_task): Also verify that
15         the ptid's TID is nonzero.
16
17 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
18
19         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
20         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
21         Make non-static.  Change return type to char *.  Adjust code
22         accordingly.  Rewrite the function's documentation.
23         (read_atcb): Adjust call to get_tcb_types_info accordingly.
24         * ravenscar-thread.c (ravenscar_inferior_created): Check that
25         we have enough debugging information in the runtime to support
26         Ada task debugging before we enable the ravenscar-thread layer.
27
28 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
29
30         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
31         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
32         * ravenscar-thread.c: Add into comment.
33         (base_magic_null_ptid): Delete.
34         (base_ptid): Change documentation.
35         (ravenscar_active_task): Renames ravenscar_running_thread.
36         All callers updated throughout.
37         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
38         (ravenscar_task_is_currently_active): Likewise.
39         (get_base_thread_from_ravenscar_task): Ditto.
40         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
41         (ravenscar_runtime_initialized): Likewise.
42         (get_running_thread_id): Add new parameter "cpu".  Adjust
43         implementation to handle this new parameter.
44         (ravenscar_fetch_registers): Small adjustment to use
45         is_ravenscar_task and ravenscar_task_is_currently_active in
46         order to decide whether to use the target beneath or this
47         module's arch_ops.
48         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
49         (ravenscar_stopped_by_sw_breakpoint): Use
50         get_base_thread_from_ravenscar_task to get the underlying
51         thread, rather than using base_ptid.
52         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
53         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
54         Likewise.
55         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
56
57 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
58
59         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
60         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
61         (get_tcb_types_info): Set fieldnos.base_cpu.
62         (read_atcb): Set task_info->base_cpu.
63         (info_task): Print "Base CPU" info if set by runtime.
64
65 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
66
67         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
68         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
69         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
70         New functions.
71         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
72         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
73         to_stopped_data_address and to_core_of_thread fields of
74         ravenscar_ops.
75
76 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
77
78         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
79         (struct gdbarch_tdep): New member long_double_abi.
80         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
81         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
82         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
83         format depending on long_double_abi tdep member.
84         (ppc_floatformat_for_type): Handle __ibm128 type.
85
86 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
87
88         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
89
90 2017-11-21  Pedro Alves  <palves@redhat.com>
91
92         * dwarf2read.c (mapped_index::find_name_components_bounds)
93         <completion mode, upper bound>: Use std::lower_bound instead of
94         std::upper_bound.
95         (test_mapped_index_find_name_component_bounds): Remove incorrect
96         "t1_fund" from expected symbols.
97
98 2017-11-21  Pedro Alves  <palves@redhat.com>
99
100         * dwarf2read.c (mapped_index::name_components_casing): New field.
101         (mapped_index) <build_name_components,
102         find_name_components_bounds): Declare new methods.
103         (mapped_index::find_name_components_bounds)
104         (mapped_index::build_name_components): New methods, factored out
105         from dw2_expand_symtabs_matching_symbol.
106         (check_find_bounds_finds)
107         (test_mapped_index_find_name_component_bounds): New.
108         (run_test): Rename to ...
109         (test_dw2_expand_symtabs_matching_symbol): ... this.
110         (run_test): Reimplement.
111
112 2017-11-21  Pedro Alves  <palves@redhat.com>
113
114         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
115         (symbol_end): Use cp_ident_is_alnum.
116         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
117         * dwarf2read.c (make_sort_after_prefix_name): New function.
118         (dw2_expand_symtabs_matching_symbol): Use it.
119         (test_symbols): Add more symbols.
120         (run_test): Add tests.
121
122 2017-11-17  Tom Tromey  <tom@tromey.com>
123
124         * symtab.h (enum symbol_subclass_kind): New.
125         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
126         Remove.
127         <subclass>: New member.
128         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
129         * rust-lang.c (rust_get_trait_object_pointer): Update.
130         * dwarf2read.c (read_func_scope): Update.
131         (read_variable): Update.
132
133 2017-11-17  Tom Tromey  <tom@tromey.com>
134
135         * dwarf2read.c (read_func_scope): Update.
136         * symtab.h (struct template_symbol): Derive from symbol.
137         <base>: Remove.
138
139 2017-11-17  Tom Tromey  <tom@tromey.com>
140
141         * symtab.h (struct symbol) <is_rust_vtable>: New member.
142         (struct rust_vtable_symbol): New.
143         (find_symbol_at_address): Declare.
144         * symtab.c (find_symbol_at_address): New function.
145         * symfile.h (struct quick_symbol_functions)
146         <find_compunit_symtab_by_address>: New member.
147         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
148         function.
149         (debug_sym_quick_functions): Link to
150         debug_qf_find_compunit_symtab_by_address.
151         * rust-lang.c (rust_get_trait_object_pointer): New function.
152         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
153         rust_get_trait_object_pointer.
154         * psymtab.c (psym_relocate): Clear psymbol_map.
155         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
156         functions.
157         (psym_functions): Link to psym_find_compunit_symtab_by_address.
158         * objfiles.h (struct objfile) <psymbol_map>: New member.
159         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
160         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
161         (rust_containing_type, read_variable): New functions.
162
163 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
164
165         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
166
167 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
168
169         * common/filestuff.c: Include <algorithm>.
170         (open_fds): Change type to std::vector<int>.
171         (do_mark_open_fd): Adjust.
172         (unmark_fd_no_cloexec): Adjust.
173         (do_close): Adjust.
174
175 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
176
177         * breakpoint.c (output_thread_groups): Take an std::vector.
178         (print_one_breakpoint_location): Adjust.
179
180 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
181
182         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
183         (ada_evaluate_subexp_for_cast): New function.
184         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
185         ada_evaluate_subexp_for_cast.
186         (ada_evaluate_subexp) <nosideret>: Replace code by call to
187         eval_skip_value.
188         * eval.c (evaluate_var_value): Make non-static.
189         (evaluate_var_msym_value, eval_skip_value): Likewise.
190         * value.h (evaluate_var_value, evaluate_var_msym_value)
191         (eval_skip_value): Declare.
192
193 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
194
195         * ada-lang.c (ada_value_cast): Remove parameter "noside".
196         Update all callers.
197
198 2017-11-16  Pedro Alves  <palves@redhat.com>
199
200         * python/py-unwind.c (pyuw_sniffer): Translate
201         PyExc_KeyboardInterrupt to a GDB Quit exception.
202
203 2017-11-16  Pedro Alves  <palves@redhat.com>
204
205         * infrun.c (resume_cleanups): Delete.
206         (resume): No longer install a resume_cleanups cleanup nor call
207         QUIT.
208         (proceed): Pass the terminal to the inferior.
209         (keep_going_pass_signal): No longer install a resume_cleanups
210         cleanup.
211
212 2017-11-16  Pedro Alves  <palves@redhat.com>
213
214         * inf-loop.c (inferior_event_handler): Don't swallow the exception
215         if the prompt is blocked.
216
217 2017-11-16  Pedro Alves  <palves@redhat.com>
218
219         * breakpoint.c (insert_bp_location): Replace bp_err and
220         bp_err_message locals by a gdb_exception local.
221
222 2017-11-16  Pedro Alves  <palves@redhat.com>
223
224         * inflow.c (scoped_ignore_sigttou): New class.
225         (child_terminal_ours_1, new_tty): Use it.
226
227 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
228
229         * target-float.c (decimal_from_number): Add byte_order argument and
230         call match_endianness.  Error if unknown floating-point type.
231         (decimal_to_number): Add byte_order argument and call match_endianness.
232         (decimal_from_longest): Update call.  Do not call match_endianness.
233         (decimal_from_ulongest): Likewise.
234         (decimal_binop): Likewise.
235         (decimal_is_zero): Likewise.
236         (decimal_compare): Likewise.
237         (decimal_convert): Likewise.
238
239 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
240
241         * python/python.c (gdbpy_rbreak): New function.
242         * NEWS: Document Python rbreak feature.
243
244 2017-11-16  Yao Qi  <yao.qi@linaro.org>
245
246         * features/tic6x-c62x.xml: Remove.
247         * features/tic6x-c64x.xml: Remove.
248         * features/tic6x-c64xp.xml: Remove.
249
250 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
251
252         * symtab.h: Include <array>.
253
254 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
255
256         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
257         (bsd_kvm_proc_cmd): Likewise.
258
259 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
260
261         * tui/tui-win.c (window_name_completer): Replace VEC with
262         std::vector.
263
264 2017-11-15  Andrew Cagney  <cagney@gnu.org>
265
266         * MAINTAINERS: Remove no-longer applicable entries.
267
268 2017-11-15  Andrew Cagney  <cagney@gnu.org>
269
270         * MAINTAINERS: Move self to Past Maintainers.
271
272 2017-11-15  Yao Qi  <yao.qi@linaro.org>
273
274         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
275         * features/nios2-linux.c: Remove.
276         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
277         initialize_tdesc_nios2_linux.
278
279 2017-11-15  Yao Qi  <yao.qi@linaro.org>
280
281         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
282         M68HC11_LAST_HARD_REG + 1.
283
284 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
285
286         PR gdb/22388
287         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
288         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
289         Return TARGET_XFER_EOF if size of returned data is 0.
290
291 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
292
293         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
294         memory-map-selftests.c.
295         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
296         * memory-map.c (memory_map_start_memory): Fix computation of hi
297         address.
298         * unittests/memory-map-selftests.c: New file.
299
300 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
301
302         * ada-lang.c: Fix some typos in the general command documenting
303         how Ada expressions are being evaluated and how their result
304         is printed.
305
306 2017-11-09  Tom Tromey  <tom@tromey.com>
307
308         * psymtab.c (psymbol_hash): Do not hash string contents.
309         (psymbol_compare): Add comment.
310
311 2017-11-09  Tom Tromey  <tom@tromey.com>
312
313         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
314
315 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
316
317         * ada-exp.y (write_var_from_sym): Remove parameter
318         "orig_left_context".  Update all callers.
319
320 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
321
322         * tracepoint.h (class collection_list) <stringify>: Return
323         std::vector<std::string>.
324         (encode_actions_rsp): Change parameters to
325         std::vector<std::string> *.
326         * tracepoint.c (collection_list::stringify): Return
327         std::vector<std::string> and adjust accordingly.
328         (encode_actions_rsp): Changee parameters to
329         std::vector<std::string> and adjust accordingly.
330         * remote.c (free_actions_list),
331         free_actions_list_cleanup_wrapper): Remove.
332         (remote_download_tracepoint): Adjust to std::vector.
333
334 2017-11-08  Tom Tromey  <tom@tromey.com>
335
336         * dwarf2read.c (symbolp): Remove typedef.
337         (read_func_scope): Use std::vector.
338         (process_structure_scope): Use std::vector.
339
340 2017-11-08  Pedro Alves  <palves@redhat.com>
341
342         * ada-lang.c (ada_make_symbol_completion_list): Use
343         completion_skip_symbol.
344         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
345         (symbol_is_function_or_method(symbol*)): New.
346         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
347         completion_skip_symbol.
348         (default_collect_symbol_completion_matches_break_on): Use
349         completion_skip_symbol.  Pass down mode.
350         (collect_file_symbol_completion_matches): Pass down mode.
351         * symtab.h (symbol_is_function_or_method): New declarations.
352         (completion_skip_symbol): New template function.
353
354 2017-11-08  Pedro Alves  <palves@redhat.com>
355
356         * linespec.c (iterate_over_all_matching_symtabs): Add
357         search_domain parameter.  Pass it down to expand_symtabs_matching.
358         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
359         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
360         search_domain.
361         (add_all_symbol_names_from_pspace): Add search_domain parameter.
362         Pass it down.
363         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
364         symbols.
365         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
366         it down.
367
368 2017-11-08  Pedro Alves  <palves@redhat.com>
369
370         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
371         text_len locals and don't pass them down.
372         * symtab.c (completion_list_add_name): Remove
373         sym_text/sym_text_len parameters and adjust.
374         (completion_list_add_symbol, completion_list_add_msymbol)
375         (completion_list_objc_symbol, completion_list_add_fields)
376         (add_symtab_completions): Likewise.
377         (default_collect_symbol_completion_matches_break_on)
378         (collect_file_symbol_completion_matches): Remove sym_text_len
379         local and don't pass it down.
380         * symtab.h (completion_list_add_name): Remove
381         sym_text/sym_text_len parameters.
382
383 2017-11-08  Pedro Alves  <palves@redhat.com>
384
385         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
386         unittests/lookup_name_info-selftests.c.
387         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
388         * cp-support.c: Include "selftest.h".
389         (cp_remove_params_1): Rename from cp_remove_params.  Add
390         'require_param' parameter, and handle it.
391         (cp_remove_params): Reimplement.
392         (cp_remove_params_if_any): New.
393         (selftests::quote): New.
394         (selftests::check_remove_params): New.
395         (selftests::test_cp_remove_params): New.
396         (_initialize_cp_support): Install
397         selftests::test_cp_remove_params.
398         * cp-support.h (cp_remove_params_if_any): Declare.
399         * dwarf2read.c :Include "selftest.h".
400         (dw2_expand_symtabs_matching_symbol): Use
401         lookup_name_info::make_ignore_params.
402         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
403         (selftests::dw2_expand_symtabs_matching::string_or_null)
404         (selftests::dw2_expand_symtabs_matching::check_match)
405         (selftests::dw2_expand_symtabs_matching::test_symbols)
406         (selftests::dw2_expand_symtabs_matching::run_test): New.
407         (_initialize_dwarf2_read): Register
408         selftests::dw2_expand_symtabs_matching::run_test.
409         * psymtab.c (psym_expand_symtabs_matching): Use
410         lookup_name_info::make_ignore_params.
411         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
412         If the lookup name wants to ignore parameters, strip them.
413         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
414         code handling '('.
415         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
416         (default_collect_symbol_completion_matches_break_on): Don't try to
417         strip parameters.
418         * symtab.h (lookup_name_info::lookup_name_info): Add
419         'ignore_parameters' parameter.
420         (lookup_name_info::ignore_parameters)
421         (lookup_name_info::make_ignore_params): New methods.
422         (lookup_name_info::m_ignore_parameters): New field.
423         * unittests/lookup_name_info-selftests.c: New file.
424
425 2017-11-08  Pedro Alves  <palves@redhat.com>
426
427         * dwarf2read.c (dw2_expand_marked_cus)
428         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
429         (dw2_expand_symtabs_matching): Move further below.
430         (dw2_expand_marked_cus): Reindent.
431
432 2017-11-08  Pedro Alves  <palves@redhat.com>
433
434         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
435         (struct name_component): New.
436         (mapped_index::name_components): New field.
437         (mapped_index::symbol_name_at): New method.
438         (dwarf2_read_index): Call mapped_index ctor.
439         (dw2_map_matching_symbols): Add comment about name_components
440         table.
441         (dw2_expand_symtabs_matching): Factor part to...
442         (dw2_expand_symtabs_matching_symbol): ... this new function.
443         Build name components table, and lookup symbols in it before
444         calling the name matcher.
445         (dw2_expand_marked_cus): New, factored out from
446         dw2_expand_symtabs_matching.
447         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
448
449 2017-11-08   Pedro Alves  <palves@redhat.com>
450
451         * ada-lang.c (ada_encode): Rename to ..
452         (ada_encode_1): ... this.  Add throw_errors parameter and handle
453         it.
454         (ada_encode): Reimplement.
455         (match_name): Delete, folded into full_name.
456         (resolve_subexp): No longer pass the encoded name to
457         ada_lookup_symbol_list.
458         (should_use_wild_match): Delete.
459         (name_match_type_from_name): New.
460         (ada_lookup_simple_minsym): Use lookup_name_info and the
461         language's symbol_name_matcher_ftype.
462         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
463         (ada_add_block_renamings): Adjust to use lookup_name_info.
464         (ada_lookup_name): New.
465         (add_nonlocal_symbols, ada_add_all_symbols)
466         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
467         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
468         (ada_name_for_lookup): Delete.
469         (ada_lookup_encoded_symbol): Construct a verbatim name.
470         (wild_match): Reverse sense of return type.  Use bool.
471         (full_match): Reverse sense of return type.  Inline bits of old
472         match_name here.
473         (ada_add_block_symbols): Adjust to use lookup_name_info.
474         (symbol_completion_match): Delete, folded into...
475         (ada_lookup_name_info::matches): ... .this new method.
476         (symbol_completion_add): Delete.
477         (ada_collect_symbol_completion_matches): Add name_match_type
478         parameter.  Adjust to use lookup_name_info and
479         completion_list_add_name.
480         (get_var_value, ada_add_global_exceptions): Adjust to use
481         lookup_name_info.
482         (ada_get_symbol_name_cmp): Delete.
483         (do_wild_match, do_full_match): New functions.
484         (ada_lookup_name_info::ada_lookup_name_info): New method.
485         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
486         functions.
487         (ada_language_defn): Install ada_get_symbol_name_matcher.
488         * ada-lex.l (processId): If name starts with '<', copy it
489         verbatim.
490         * block.c (block_iter_match_step, block_iter_match_first)
491         (block_iter_match_next, block_lookup_symbol)
492         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
493         lookup_name_info.
494         * block.h (block_iter_match_first, block_iter_match_next)
495         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
496         * c-lang.c (c_language_defn, cplus_language_defn)
497         (asm_language_defn, minimal_language_defn): Adjust comments to
498         refer to la_get_symbol_name_matcher.
499         * completer.c (complete_files_symbols)
500         (collect_explicit_location_matches, symbol_completer): Pass a
501         symbol_name_match_type down.
502         * completer.h (class completion_match, completion_match_result):
503         New classes.
504         (completion_tracker::reset_completion_match_result): New method.
505         (completion_tracker::m_completion_match_result): New field.
506         * cp-support.c (make_symbol_overload_list_block): Adjust to use
507         lookup_name_info.
508         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
509         functions.
510         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
511         * d-lang.c: Adjust comments to refer to
512         la_get_symbol_name_matcher.
513         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
514         Adjust to use lookup_name_info.
515         (dict_iter_match_first, dict_iter_match_next)
516         (iter_match_first_hashed, iter_match_next_hashed)
517         (iter_match_first_linear, iter_match_next_linear): Adjust to work
518         with a lookup_name_info.
519         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
520         Likewise.
521         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
522         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
523         (gdb_index_symbol_name_matcher): New class.
524         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
525         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
526         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
527         with a symbol_name_match_type.
528         (f_language_defn): Adjust comments to refer to
529         la_get_symbol_name_matcher.
530         * go-lang.c (go_language_defn): Adjust comments to refer to
531         la_get_symbol_name_matcher.
532         * language.c (default_symbol_name_matcher)
533         (language_get_symbol_name_matcher): New functions.
534         (unknown_language_defn, auto_language_defn): Adjust comments to
535         refer to la_get_symbol_name_matcher.
536         * language.h (symbol_name_cmp_ftype): Delete.
537         (language_defn) <la_collect_symbol_completion_matches>: Add match
538         type parameter.
539         <la_get_symbol_name_cmp>: Delete field.
540         <la_get_symbol_name_matcher>: New field.
541         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
542         (default_symbol_name_matcher, language_get_symbol_name_matcher):
543         Declare.
544         * linespec.c (iterate_over_all_matching_symtabs)
545         (iterate_over_file_blocks): Adjust to use lookup_name_info.
546         (find_methods): Add language parameter, and use lookup_name_info
547         and the language's symbol_name_matcher_ftype.
548         (linespec_complete_function): Adjust.
549         (lookup_prefix_sym): Use lookup_name_info.
550         (add_all_symbol_names_from_pspace): Adjust.
551         (find_superclass_methods): Add language parameter and pass it
552         down.
553         (find_method): Pass symbol language down.
554         (find_linespec_symbols): Don't demangle or Ada encode here.
555         (search_minsyms_for_name): Add lookup_name_info parameter.
556         (add_matching_symbols_to_info): Add name_match_type parameter.
557         Use lookup_name_info.
558         * m2-lang.c (m2_language_defn): Adjust comments to refer to
559         la_get_symbol_name_matcher.
560         * minsyms.c: Include <algorithm>.
561         (add_minsym_to_demangled_hash_table): Remove table parameter and
562         add objfile parameter.  Use search_name_hash, and add language to
563         demangled languages vector.
564         (struct found_minimal_symbols): New struct.
565         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
566         New functions.
567         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
568         input names here.  Use lookup_name_info instead.  Lookup up
569         demangled names once for each language in the demangled names
570         vector.
571         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
572         demangled names once for each language in the demangled names
573         vector.
574         (build_minimal_symbol_hash_tables): Adjust.
575         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
576         lookup_name_info.
577         * objc-lang.c (objc_language_defn): Adjust comment to refer to
578         la_get_symbol_name_matcher.
579         * objfiles.h: Include <vector>.
580         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
581         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
582         la_get_symbol_name_matcher.
583         * p-lang.c (pascal_language_defn): Adjust comment to refer to
584         la_get_symbol_name_matcher.
585         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
586         (match_partial_symbol): Use symbol_name_match_type,
587         lookup_name_info and psymbol_name_matches.
588         (lookup_partial_symbol): Use lookup_name_info.
589         (map_block): Use symbol_name_match_type and lookup_name_info.
590         (psym_map_matching_symbols): Use symbol_name_match_type.
591         (psymbol_name_matches): New.
592         (recursively_search_psymtabs): Use lookup_name_info and
593         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
594         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
595         'kind' parameter to 'domain'.
596         * rust-lang.c (rust_language_defn): Adjust comment to refer to
597         la_get_symbol_name_matcher.
598         * symfile-debug.c (debug_qf_map_matching_symbols)
599         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
600         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
601         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
602         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
603         Adjust to use symbol_name_match_type.
604         <expand_symtabs_matching>: Adjust to use lookup_name_info.
605         (expand_symtabs_matching): Adjust to use lookup_name_info.
606         * symmisc.c (maintenance_expand_symtabs): Use
607         lookup_name_info::match_any ().
608         * symtab.c (symbol_matches_search_name): New.
609         (eq_symbol_entry): Adjust to use lookup_name_info and the
610         language's matcher.
611         (demangle_for_lookup_info::demangle_for_lookup_info): New.
612         (lookup_name_info::match_any): New.
613         (iterate_over_symbols, search_symbols): Use lookup_name_info.
614         (compare_symbol_name): Add language, lookup_name_info and
615         completion_match_result parameters, and use them.
616         (completion_list_add_name): Make extern.  Add language and
617         lookup_name_info parameters.  Use them.
618         (completion_list_add_symbol, completion_list_add_msymbol)
619         (completion_list_objc_symbol): Add lookup_name_info parameters and
620         adjust.  Pass down language.
621         (completion_list_add_fields): Add lookup_name_info parameters and
622         adjust.  Pass down language.
623         (add_symtab_completions): Add lookup_name_info parameters and
624         adjust.
625         (default_collect_symbol_completion_matches_break_on): Add
626         name_match_type parameter, and use it.  Use lookup_name_info.
627         (default_collect_symbol_completion_matches)
628         (collect_symbol_completion_matches): Add name_match_type
629         parameter, and pass it down.
630         (collect_symbol_completion_matches_type): Adjust.
631         (collect_file_symbol_completion_matches): Add name_match_type
632         parameter, and use lookup_name_info.
633         * symtab.h: Include <string> and "common/gdb_optional.h".
634         (enum class symbol_name_match_type): New.
635         (class ada_lookup_name_info): New.
636         (struct demangle_for_lookup_info): New.
637         (class lookup_name_info): New.
638         (symbol_name_matcher_ftype): New.
639         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
640         (symbol_matches_search_name): Declare.
641         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
642         (default_collect_symbol_completion_matches)
643         (collect_symbol_completion_matches)
644         (collect_file_symbol_completion_matches): Add name_match_type
645         parameter.
646         (iterate_over_symbols): Use lookup_name_info.
647         (completion_list_add_name): Declare.
648         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
649         (strncmp_iw_with_mode): Now extern.
650         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
651         (strncmp_iw_with_mode): Declare.
652
653 2017-11-08  Keith Seitz  <keiths@redhat.com>
654             Pedro Alves  <palves@redhat.com>
655
656         * ada-lang.c (ada_language_defn): Install
657         default_search_name_hash.
658         * buildsym.c (struct buildsym_compunit): <language>: New field.
659         (finish_block_internal): Pass language when creating dictionaries.
660         (start_buildsym_compunit, start_symtab): New language parameters.
661         Use them.
662         (restart_symtab): Pass down compilation unit's language.
663         * buildsym.h (enum language): Forward declare.
664         (start_symtab): New 'language' parameter.
665         * c-lang.c (c_language_defn, cplus_language_defn)
666         (asm_language_defn, minimal_language_defn): Install
667         default_search_name_hash.
668         * coffread.c (coff_start_symtab): Adjust.
669         * d-lang.c (d_language_defn): Install default_search_name_hash.
670         * dbxread.c (struct symloc): Add 'pst_language' field.
671         (PST_LANGUAGE): Define.
672         (start_psymtab, read_ofile_symtab): Use it.
673         (process_one_symbol): New 'language' parameter.  Pass it down.
674         * dictionary.c (struct dictionary) <language>: New field.
675         (DICT_LANGUAGE): Define.
676         (dict_create_hashed, dict_create_hashed_expandable)
677         (dict_create_linear, dict_create_linear_expandable): New parameter
678         'language'.  Set the dictionary's language.
679         (iter_match_first_hashed): Adjust to rename.
680         (insert_symbol_hashed): Assert we don't see mismatching
681         languages.  Adjust to rename.
682         (dict_hash): Rename to ...
683         (default_search_name_hash): ... this and make extern.
684         * dictionary.h (struct language_defn): Forward declare.
685         (dict_create_hashed): New parameter 'language'.
686         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
687         * f-lang.c (f_language_defn): Install default_search_name_hash.
688         * go-lang.c (go_language_defn): Install default_search_name_hash.
689         * jit.c (finalize_symtab): Pass compunit's language to dictionary
690         creation.
691         * language.c (unknown_language_defn, auto_language_defn):
692         * language.h (language_defn::la_search_name_hash): New field.
693         (default_search_name_hash): Declare.
694         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
695         * mdebugread.c (new_block): New parameter 'language'.
696         * mdebugread.c (parse_symbol): Pass symbol language to block
697         allocation.
698         (psymtab_to_symtab_1): Pass down language.
699         (new_symtab): Pass compunit's language to block allocation.
700         * objc-lang.c (objc_language_defn): Install
701         default_search_name_hash.
702         * opencl-lang.c (opencl_language_defn):
703         * p-lang.c (pascal_language_defn): Install
704         default_search_name_hash.
705         * rust-lang.c (rust_language_defn): Install
706         default_search_name_hash.
707         * stabsread.h (enum language): Forward declare.
708         (process_one_symbol): Add 'language' parameter.
709         * symtab.c (search_name_hash): New function.
710         * symtab.h (search_name_hash): Declare.
711         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
712
713 2017-11-08  Pedro Alves  <palves@redhat.com>
714
715         * cp-name-parser.y (main): Don't initialize extra_chars.
716
717 2017-11-07  Tom Tromey  <tom@tromey.com>
718
719         * event-top.h (command_handler): Constify.
720         * record-full.c (cmd_record_full_start): Update.
721         * thread.c (thread_apply_all_command): Update.
722         * printcmd.c (eval_command): Update.
723         * mi/mi-main.c (mi_execute_cli_command): Update.
724         (mi_execute_async_cli_command): Update.
725         * tui/tui-stack.c (tui_update_command): Update.
726         * cli/cli-interp.c (safe_execute_command): Constify.
727         * record.c (record_start): Update.
728         (record_start, record_stop, cmd_record_start): Update.
729         * record-btrace.c (cmd_record_btrace_bts_start): Update.
730         (cmd_record_btrace_pt_start): Update.
731         (cmd_record_btrace_start): Update.
732         (cmd_record_btrace_start): Update.
733         * reverse.c (exec_reverse_once): Update.
734         * python/python.c (execute_gdb_command): Don't copy the command.
735         * event-top.c (command_line_handler): Update.
736         (command_handler): Constify.
737         * defs.h (deprecated_call_command_hook): Constify.
738         * cli/cli-script.h (execute_user_command): Constify.
739         * cli/cli-script.c (execute_user_command): Constify.
740         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
741         (enum command_control_type): Update.
742         * main.c (catch_command_errors): Remove non-const overload.
743         (catch_command_errors_ftype): Remove.
744         * python/py-cmd.c (cmdpy_function): Constify.
745         * guile/scm-cmd.c (cmdscm_function): Constify.
746         * cli/cli-dump.c (call_dump_func): Constify.
747         * cli/cli-decode.c (do_const_cfunc): Constify.
748         (do_sfunc): Constify.
749         (cmd_func): Constify.
750         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
751         * top.h (execute_command): Constify.
752         * top.c (execute_command): Constify.
753         (execute_command_to_string): Constify.
754         (deprecated_call_command_hook): Constify.
755         * command.h (cmd_func): Constify.
756         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
757
758 2017-11-07  Tom Tromey  <tom@tromey.com>
759
760         * ada-lang.c (catch_ada_exception_command): Constify.
761         (catch_assert_command): Constify.
762         * break-catch-throw.c (catch_catch_command, catch_throw_command)
763         (catch_rethrow_command): Constify.
764         (catch_exception_command_1): Constify.
765         * breakpoint.h (add_catch_command): Constify.
766         * break-catch-syscall.c (catch_syscall_command_1): Constify.
767         (catch_syscall_split_args): Constify.
768         * break-catch-sig.c (catch_signal_command): Constify.
769         (catch_signal_split_args): Constify.
770         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
771         cmd_const_sfunc_ftype.
772         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
773         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
774         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
775         (add_setshow_string_cmd, struct cmd_list_element)
776         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
777         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
778         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
779         Constify.
780         (set_cmd_sfunc): Constify.
781         (empty_sfunc): Constify.
782         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
783         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
784         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
785         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
786         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
787         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
788         Constify.
789         (set_cmd_sfunc): Constify.
790         (cmd_sfunc_ftype): Remove.
791         * compile/compile.c (set_compile_args): Constify.
792         * infrun.c (set_disable_randomization): Constify.
793         * infcmd.c (set_args_command, set_cwd_command): Constify.
794         * breakpoint.c (set_condition_evaluation_mode): Constify.
795         (add_catch_command): Constify.
796         (catch_fork_command_1, catch_exec_command_1)
797         (catch_load_command_1, catch_unload_command_1): Constify.
798         (catch_load_or_unload): Constify.
799         * guile/scm-param.c (pascm_set_func): Constify.
800         (add_setshow_generic): Constify.
801         * python/py-param.c (get_set_value): Constify.
802         * top.h (set_verbose): Constify.
803         * tui/tui-win.c (tui_set_var_cmd): Constify.
804         * mi/mi-main.c (set_mi_async_command): Constify.
805         * cli/cli-logging.c (set_logging_overwrite)
806         (set_logging_redirect): Constify.
807         * value.c (set_max_value_size): Constify.
808         * valprint.c (set_input_radix, set_output_radix): Constify.
809         * utils.c (set_width_command, set_height_command): Constify.
810         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
811         * tracepoint.c (set_disconnected_tracing)
812         (set_circular_trace_buffer, set_trace_buffer_size)
813         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
814         * top.c (set_history_size_command, set_verbose, set_editing)
815         (set_gdb_datadir, set_history_filename): Constify.
816         * target.c (set_targetdebug, maint_set_target_async_command)
817         (maint_set_target_non_stop_command, set_target_permissions)
818         (set_write_memory_permission): Constify.
819         (open_target): Constify.
820         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
821         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
822         * symtab.c (set_symbol_cache_size_handler): Constify.
823         * symfile.c (set_ext_lang_command): Constify.
824         * symfile-debug.c (set_debug_symfile): Constify.
825         * source.c (set_directories_command): Constify.
826         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
827         * serial.c (set_parity): Constify.
828         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
829         * remote.c (set_remote_exec_file, set_remotebreak)
830         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
831         * record.c (set_record_insn_history_size)
832         (set_record_call_history_size): Constify.
833         * record-full.c (set_record_full_insn_max_num): Constify.
834         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
835         * osabi.c (set_osabi): Constify.
836         * mips-tdep.c (set_mips64_transfers_32bit_regs)
837         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
838         * maint.c (maintenance_set_profile_cmd): Constify.
839         * linux-thread-db.c (set_libthread_db_search_path): Constify.
840         * language.c (set_language_command, set_range_command)
841         (set_case_command): Constify.
842         * infrun.c (set_non_stop, set_observer_mode)
843         (set_stop_on_solib_events, set_schedlock_func)
844         (set_exec_direction_func): Constify.
845         * infcmd.c (set_inferior_tty_command): Constify.
846         * disasm.c (set_disassembler_options_sfunc): Constify.
847         * demangle.c (set_demangling_command): Constify.
848         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
849         * cris-tdep.c (set_cris_version, set_cris_mode)
850         (set_cris_dwarf2_cfi): Constify.
851         * corefile.c (set_gnutarget_command): Constify.
852         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
853         (set_target_wide_charset_sfunc): Constify.
854         * breakpoint.c (update_dprintf_commands): Constify.
855         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
856         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
857         (set_disassembly_style_sfunc): Constify.
858         * arch-utils.c (set_endian, set_architecture): Constify.
859         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
860         * agent.c (set_can_use_agent): Constify.
861
862 2017-11-07  Tom Tromey  <tom@tromey.com>
863
864         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
865         (go32_pde, go32_pte, go32_pte_for_address): Constify.
866         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
867         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
868         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
869         (parse_int_arg, show_thread_default_detach_sc_cmd)
870         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
871         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
872         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
873         (show_task_pause_cmd, set_task_detach_sc_cmd)
874         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
875         (set_noninvasive_cmd, set_thread_pause_cmd)
876         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
877         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
878         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
879         * windows-nat.c (display_selectors): Constify.
880         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
881         non-const "cfunc".
882         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
883         (cmd_cfunc_eq): Likewise.
884         (struct cmd_list_element): Likewise.
885         (do_cfunc): Remove.
886         (cli_user_command_p): Update.
887         * command.h (add_cmd): Remove non-const overload.
888         (cmd_cfunc_ftype): Remove typedef.
889         (cmd_cfunc_eq): Remove non-const overload.
890         * value.c (show_values): Constify.
891         * thread.c (thread_apply_all_command): Constify.
892         * symfile.c (load_command): Constify.
893         * source.c (directory_command): Constify.
894         * maint.c (maintenance_internal_error)
895         (maintenance_demangler_warning, maintenance_space_display)
896         (maintenance_print_architecture, maintenance_translate_address)
897         (maintenance_info_selftests, maintenance_internal_warning):
898         Constify.
899         * breakpoint.c (disable_trace_command, enable_trace_command):
900         Constify.
901         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
902         Constify.
903         (add_auto_load_safe_path): Constify.
904         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
905         * top.h (show_commands): Constify.
906         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
907         * sparc64-tdep.c (adi_examine_command): Constify.
908         (adi_assign_command): Constify.
909
910 2017-11-07  Tom Tromey  <tom@tromey.com>
911
912         * frame.h (info_locals_command, info_args_command): Constify.
913         * auto-load.h (auto_load_info_scripts): Constify.
914         * inferior.h (registers_info): Constify.
915         * copying.c: Rebuild.
916         * copying.awk: Constify generated commands.
917         * auto-load.c (auto_load_info_scripts)
918         (info_auto_load_gdb_scripts): Constify.
919         * cli/cli-decode.c (struct cmd_list_element): Take a
920         cmd_const_cfunc_ftype.
921         * command.h (add_info): Take a cmd_const_cfunc_ftype.
922         * tui/tui-win.c (tui_all_windows_info): Constify.
923         * python/py-auto-load.c (info_auto_load_python_scripts):
924         Constify.
925         * cli/cli-cmds.c (show_command): Remove non-const overload.
926         * tracepoint.c (info_tvariables_command, info_scope_command):
927         Constify.
928         (info_static_tracepoint_markers_command): Constify.
929         * thread.c (info_threads_command): Constify.
930         (print_thread_info_1): Constify.
931         * target.c (info_target_command): Constify.
932         * symtab.c (info_sources_command, info_functions_command)
933         (info_types_command): Constify.
934         (info_variables_command): Remove non-const overload.
935         * symfile.c (info_ext_lang_command): Constify.
936         * stack.c (info_frame_command, info_locals_command)
937         (info_args_command): Constify.
938         (backtrace_command): Remove non-const overload.
939         * source.c (info_source_command, info_line_command): Constify.
940         * solib.c (info_sharedlibrary_command): Constify.
941         * skip.c (info_skip_command): Constify.
942         * ser-go32.c (info_serial_command): Constify.
943         * reverse.c (info_bookmarks_command): Constify.
944         * printcmd.c (info_symbol_command, info_address_command)
945         (info_display_command): Constify.
946         * osdata.c (info_osdata_command): Constify.
947         * objc-lang.c (info_selectors_command, info_classes_command):
948         Constify.
949         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
950         * memattr.c (info_mem_command): Constify.
951         * macrocmd.c (info_macro_command, info_macros_command): Constify.
952         * linux-fork.c (info_checkpoints_command): Constify.
953         * infrun.c (info_signals_command): Constify.
954         * inflow.c (info_terminal_command): Constify.
955         * inferior.c (info_inferiors_command): Constify.
956         (print_inferior): Constify.
957         * infcmd.c (info_program_command, info_all_registers_command)
958         (info_registers_command, info_vector_command)
959         (info_float_command): Constify.
960         (registers_info): Constify.
961         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
962         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
963         Constify.
964         * f-valprint.c (info_common_command): Constify.
965         * dcache.c (info_dcache_command): Constify.
966         (dcache_info_1): Constify.
967         * darwin-nat-info.c (info_mach_tasks_command)
968         (info_mach_task_command, info_mach_ports_command)
969         (info_mach_port_command, info_mach_threads_command)
970         (info_mach_thread_command, info_mach_regions_command)
971         (info_mach_regions_recurse_command, info_mach_region_command)
972         (info_mach_exceptions_command): Constify.
973         (get_task_from_args): Constify.
974         * cp-support.c (info_vtbl_command): Constify.
975         * breakpoint.c (info_watchpoints_command)
976         (info_tracepoints_command): Constify.
977         (info_breakpoints_command): Remove non-const overload.
978         * avr-tdep.c (avr_io_reg_read_command): Constify.
979         * auxv.c (info_auxv_command): Constify.
980         * ada-tasks.c (info_tasks_command): Constify.
981         (info_task): Constify.
982         * ada-lang.c (info_exceptions_command): Constify.
983
984 2017-11-07  Tom Tromey  <tom@tromey.com>
985
986         * solib.h (no_shared_libraries): Constify.
987         * frame.h (return_command): Constify.
988         * cli/cli-cmds.h (quit_command): Constify.
989         * top.h (quit_command, execute_command): Constify.
990         * target.h (flash_erase_command): Constify.
991         * inferior.h (set_inferior_args, attach_command): Constify.
992         * tracepoint.h (start_tracing, stop_tracing): Constify.
993         * breakpoint.h (break_command, tbreak_command)
994         (hbreak_command_wrapper, thbreak_command_wrapper)
995         (rbreak_command_wrapper, watch_command_wrapper)
996         (awatch_command_wrapper, rwatch_command_wrapper)
997         (get_tracepoint_by_number): Constify.
998         * symtab.c (info_variables_command, rbreak_command)
999         (symtab_symbol_info): Constify.
1000         (info_variables_command): Add non-const overload.
1001         * top.c (dont_repeat_command): Constify.
1002         * breakpoint.c (ignore_command, commands_command)
1003         (condition_command, tbreak_command, hbreak_command)
1004         (thbreak_command, clear_command, break_command)
1005         (info_breakpoints_command, watch_command, rwatch_command)
1006         (awatch_command, trace_command, ftrace_command, strace_command)
1007         (trace_pass_command, break_range_command, dprintf_command)
1008         (agent_printf_command, get_tracepoint_by_number)
1009         (watch_maybe_just_location, trace_pass_command): Constify.
1010         (info_breakpoints_command): Add non-const overload.
1011         * tracefile.c (tsave_command): Constify.
1012         * infcmd.c (attach_command, disconnect_command, signal_command)
1013         (queue_signal_command, stepi_command, nexti_command)
1014         (finish_command, next_command, step_command, until_command)
1015         (advance_command, jump_command, continue_command, run_command)
1016         (start_command, starti_command, interrupt_command)
1017         (run_command_1, set_inferior_args, step_1): Constify.
1018         * inferior.c (add_inferior_command, remove_inferior_command)
1019         (clone_inferior_command): Constify.
1020         * linux-fork.c (checkpoint_command, restart_command): Constify.
1021         * windows-nat.c (signal_event_command): Constify.
1022         * guile/guile.c (guile_repl_command, guile_command): Constify.
1023         * printcmd.c (x_command, display_command, printf_command)
1024         (output_command, set_command, call_command, print_command)
1025         (eval_command): Constify.
1026         (non_const_set_command): Remove.
1027         (_initialize_printcmd): Update.
1028         * source.c (forward_search_command, reverse_search_command):
1029         Constify.
1030         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1031         Constify.
1032         * infrun.c (handle_command): Constify.
1033         * memattr.c (mem_command): Constify.
1034         * stack.c (return_command, up_command, up_silently_command)
1035         (down_command, down_silently_command, frame_command)
1036         (backtrace_command, func_command, backtrace_command_1): Constify.
1037         (backtrace_command): Add non-const overload.
1038         * remote-sim.c (simulator_command): Constify.
1039         * exec.c (set_section_command): Constify.
1040         * tracepoint.c (tdump_command, trace_variable_command)
1041         (tstatus_command, tstop_command, tstart_command)
1042         (end_actions_pseudocommand, while_stepping_pseudocommand)
1043         (collect_pseudocommand, teval_pseudocommand, actions_command)
1044         (start_tracing, stop_tracing): Constify.
1045         * value.c (init_if_undefined_command): Constify.
1046         * tui/tui-stack.c (tui_update_command): Constify.
1047         * tui/tui-win.c (tui_refresh_all_command)
1048         (tui_set_tab_width_command, tui_set_win_height_command)
1049         (tui_set_focus_command, tui_scroll_forward_command)
1050         (tui_scroll_backward_command, tui_scroll_left_command)
1051         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1052         (tui_set_win_height): Constify.
1053         * tui/tui-layout.c (tui_layout_command): Constify.
1054         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1055         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1056         (proc_untrace_sysexit_cmd): Constify.
1057         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1058         (threadset_test_cmd, threadlist_update_test_cmd)
1059         (threadalive_test): Constify.
1060         * objc-lang.c (print_object_command): Constify.
1061         * command.h (add_com): Constify.
1062         * cli/cli-dump.c (restore_command): Constify.
1063         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1064         (help_command, complete_command, shell_command, edit_command)
1065         (list_command, disassemble_command, make_command)
1066         (apropos_command, alias_command): Constify.
1067         * cli/cli-script.c (document_command, define_command)
1068         (while_command, if_command, validate_comname): Constify.
1069         * cli/cli-decode.c (struct cmd_list_element): Change type of
1070         "fun".
1071         * target.c (do_monitor_command, flash_erase_command): Constify.
1072         * regcache.c (reg_flush_command): Constify.
1073         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1074         (reverse_nexti, reverse_continue, reverse_finish)
1075         (save_bookmark_command, goto_bookmark_command)
1076         (exec_reverse_once): Constify.
1077         * python/python.c (python_interactive_command, python_command):
1078         Constify.
1079         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1080         Constify.
1081         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1082         * gcore.c (gcore_command): Constify.
1083
1084 2017-11-07  Tom Tromey  <tom@tromey.com>
1085
1086         * printcmd.c (x_command): Call set_repeat_arguments.
1087         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1088         * top.c (repeat_arguments): New global.
1089         (set_repeat_arguments): New function.
1090         (execute_command): Handle repeat_arguments.
1091         (show_commands): Calls set_repeat_arguments.
1092         * command.h (set_repeat_arguments): Declare.
1093
1094 2017-11-07  Tom Tromey  <tom@tromey.com>
1095
1096         * stack.c (backtrace_command): Use std::string.
1097         (backtrace_command_1): Make "count_exp" const.
1098
1099 2017-11-07  Tom Tromey  <tom@tromey.com>
1100
1101         * source.c (directory_switch, mod_path, add_path): Constify.
1102         * defs.h (add_path, mod_path, directory_switch): Constify.
1103         * mi/mi-cmd-env.c (env_mod_path): Constify.
1104
1105 2017-11-07  Tom Tromey  <tom@tromey.com>
1106
1107         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1108         (run_command_1, continue_command, step_1, jump_command)
1109         (signal_command, until_command, advance_command, finish_command)
1110         (attach_command): Update.
1111
1112 2017-11-07  Tom Tromey  <tom@tromey.com>
1113
1114         * command.h (set_cmd_cfunc): Don't declare.
1115         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1116
1117 2017-11-07  Tom Tromey  <tom@tromey.com>
1118
1119         * stack.c (select_frame_command): Constify.
1120         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1121         * command.h (add_com_suppress_notification): Constify.
1122
1123 2017-11-07  Tom Tromey  <tom@tromey.com>
1124
1125         * breakpoint.c (stop_command): Constify.
1126         * cli/cli-decode.c (struct cmd_list_element): Constify.
1127         * command.h (add_abbrev_prefix_cmd): Constify.
1128
1129 2017-11-07  Pedro Alves  <palves@redhat.com>
1130
1131         * breakpoint.c (extract_bp_kind): New enum.
1132         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1133         factored out from ...
1134         (extract_bp_number_and_location): ... here.
1135         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1136
1137 2017-11-07  Pedro Alves  <palves@redhat.com>
1138
1139         * breakpoint.c (extract_bp_number_and_location): Change return
1140         type to void.  Throw error instead of warning.
1141         (enable_disable_command): Adjust.
1142
1143 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1144             Pedro Alves  <palves@redhat.com>
1145
1146         * breakpoint.c (map_breakpoint_number_range): New, factored out
1147         from ...
1148         (map_breakpoint_numbers): ... here.
1149         (find_location_by_number): Change parameters from string to
1150         breakpoint number and location.
1151         (extract_bp_number_and_location): New function.
1152         (enable_disable_bp_num_loc)
1153         (enable_disable_breakpoint_location_range)
1154         (enable_disable_command): New functions, factored out ...
1155         (enable_command, disable_command): ... these functions, and
1156         adjusted to support ranges.
1157         * NEWS: Document enable/disable breakpoint location range feature.
1158
1159 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1160
1161         * MAINTAINERS (Write After Approval): Update my e-mail address.
1162
1163 2017-11-06  Pedro Alves  <palves@redhat.com>
1164
1165         * gnu-nat.c (gnu_terminal_init): Delete.
1166         (gnu_target): Don't install gnu_terminal_init.
1167         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1168         (child_terminal_init): ... this function.
1169
1170 2017-11-06  Pedro Alves  <palves@redhat.com>
1171
1172         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1173         sgtty.h.
1174         * config.in, configure: Regenerate.
1175
1176 2017-11-06  Pedro Alves  <palves@redhat.com>
1177
1178         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1179         (async_init_signals): Adjust.
1180         (handle_stop_sig): Rename to ...
1181         (handle_sigtstp): ... this.
1182         (async_stop_sig): Rename to ...
1183         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1184         SIGTSTP path.
1185         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1186         instead of STOP_SIGNAL thoughout.
1187         (handle_stop_sig): Rename to ...
1188         (handle_sigtstp): ... this.
1189         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1190
1191 2017-11-06  Pedro Alves  <palves@redhat.com>
1192
1193         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1194         longer set flags twice in row.
1195
1196 2017-11-06  Pedro Alves  <palves@redhat.com>
1197
1198         * Makefile.in (SER_HARDWIRE): Update comment.
1199         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1200         * common/gdb_termios.h: Delete file.
1201         * common/job-control.c: Include termios.h and unistd.h instead of
1202         gdb_termios.h.
1203         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1204         check.
1205         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1206         Remove sgtty code.
1207         * configure.ac: No longer check for termio.h and sgtty.h.
1208         * configure: Regenerate.
1209         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1210         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1211         Replace PROCESS_GROUP_TYPE references with pid_t references
1212         throughout.
1213         (gdb_getpgrp): Delete.
1214         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1215         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1216         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1217         gdb_getpgrp.  Use serial_set_tty_state instead aof
1218         serial_noflush_set_tty_state.  Remove sgtty code.
1219         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1220         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1221         (inferior_process_group): Now returns pid_t.
1222         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1223         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1224         * ser-event.c (serial_event_ops): Update.
1225         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1226         (dos_ops): Update.
1227         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1228         * ser-pipe.c (pipe_ops): Update.
1229         * ser-tcp.c (tcp_ops): Update.
1230         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1231         HAVE_TERMIOS checks.
1232         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1233         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1234         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1235         assume termios.
1236         (hardwire_noflush_set_tty_state): Delete.
1237         (hardwire_print_tty_state, hardwire_drain_output)
1238         (hardwire_flush_output, hardwire_flush_input)
1239         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1240         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1241         code, and assume termios.
1242         (hardwire_ops): Update.
1243         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1244         * serial.c (serial_noflush_set_tty_state): Delete.
1245         * serial.h (serial_noflush_set_tty_state): Delete.
1246         (serial_ops::noflush_set_tty_state): Delete.
1247
1248 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1249
1250         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1251         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1252         (COMMON_OBS): Remove doublest.o and dfp.o.
1253         Do not build target-float.c (instead of doublest.c)
1254         with -Wformat-nonliteral.
1255
1256         * doublest.c: Remove file.
1257         * doublest.h: Remove file.
1258         * dfp.c: Remove file.
1259         * dfp.h: Remove file.
1260
1261         * target-float.c: Do not include "doublest.h" and "dfp.h".
1262         (DOUBLEST): Move here from doublest.h.
1263         (enum float_kind): Likewise.
1264         (FLOATFORMAT_CHAR_BIT): Likewise.
1265         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1266         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1267         (floatformat_precision): Likewise.
1268         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1269         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1270         Likewise.
1271         (host_float_format, host_double_format, host_long_double_format):
1272         Likewise.
1273         (floatformat_to_string, floatformat_from_string): Likewise.
1274         (floatformat_to_doublest): Likewise.  Also, inline the original
1275         convert_floatformat_to_doublest.
1276         (floatformat_from_doublest): Likewise.  Also, inline the original
1277         convert_floatformat_from_doublest.
1278
1279         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1280         (MAX_DECIMAL_STRING): Move here from dfp.c.
1281         (match_endianness): Likewise.
1282         (set_decnumber_context, decimal_check_errors): Likewise.
1283         (decimal_from_number, decimal_to_number): Likewise.
1284         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1285         (decimal_from_longest, decimal_from_ulongest): Likewise.
1286         (decimal_to_longest): Likewise.
1287         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1288         (decimal_convert): Likewise.
1289
1290 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1291
1292         * doublest.c: Do not include "gdbtypes.h".
1293         (extract_typed_floating): Remove.
1294         (store_typed_floating): Remove.
1295         (convert_typed_floating): Remove.
1296         * doublest.h (struct type): Remove.
1297         (DOUBLEST_PRINT_FORMAT): Remove.
1298         (DOUBLEST_SCAN_FORMAT): Remove.
1299         (extract_typed_floating): Remove.
1300         (store_typed_floating): Remove.
1301         (convert_typed_floating): Remove.
1302
1303         * dfp.c (decimal_from_doublest): Remove.
1304         (decimal_to_doublest): Remove.
1305         * dfp.h: Do not include "doublest.h".
1306         (decimal_from_doublest): Remove.
1307         (decimal_to_doublest): Remove.
1308
1309         * value.c: Do not include "doublest.h" and "dfp.h".
1310         (value_as_double): Remove.
1311         (unpack_double): Remove.
1312         (value_from_double): Remove.
1313         (value_from_decfloat): Remove.
1314         * value.h: Do not include "doublest.h".
1315         (value_as_double): Remove.
1316         (unpack_double): Remove.
1317         (value_from_double): Remove.
1318         (value_from_decfloat): Remove.
1319
1320 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1321
1322         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1323         (i386_extract_return_value): Use target_float_convert.
1324         (i386_store_return_value): Likewise.
1325         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1326         (i387_value_to_register): Likewise.
1327         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1328         (ia64_register_to_value): Use target_float_convert.
1329         (ia64_value_to_register): Likewise.
1330         (ia64_extract_return_value): Likewise.
1331         (ia64_store_return_value): Likewise.
1332         (ia64_push_dummy_call): Likewise.
1333         * m68k-tdep.c: Include "target-float.h".
1334         (m68k_register_to_value): Use target_float_convert.
1335         (m68k_value_to_register): Likewise.
1336         (m68k_svr4_extract_return_value): Likewise.
1337         (m68k_svr4_store_return_value): Likewise.
1338         * ppc-sysv-tdep.c: Include "target-float.h".
1339         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1340         (do_ppc_sysv_return_value): Likewise.
1341         (ppc64_sysv_abi_push_freg): Likewise.
1342         (ppc64_sysv_abi_return_value_base): Likewise.
1343         * rs6000-aix-tdep.c: Include "target-float.h".
1344         (rs6000_push_dummy_call): Use target_float_convert.
1345         (rs6000_return_value): Likewise.
1346         * rs6000-lynx178-tdep.c: Include "target-float.h".
1347         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1348         (rs6000_lynx178_return_value): Likewise.
1349         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1350         (rs6000_register_to_value): Use target_float_convert.
1351         (rs6000_value_to_register): Likewise.
1352         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1353         (arm_extract_return_value): Use target_float_convert.
1354         (arm_store_return_value): Likewise.
1355         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1356         (sh_register_convert_to_virtual): Use target_float_convert.
1357         (sh_register_convert_to_raw): Likewise.
1358         * sh64-tdep.c: Include "target-float.h".
1359         (sh64_extract_return_value): Use target_float_convert.
1360         (sh64_register_convert_to_virtual): Likewise.
1361         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1362
1363 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1364
1365         * target-float.c (floatformat_to_host_double): New function.
1366         (floatformat_from_host_double): Likewise.
1367         (target_float_to_host_double): Likewise.
1368         (target_float_from_host_double): Likewise.
1369         * target-float.h (target_float_to_host_double): Add prototype.
1370         (target_float_from_host_double): Likewise.
1371
1372         * guile/scm-value.c: Include "target-float.h".
1373         (gdbscm_value_to_real): Use target_float_to_host_double.
1374         Handle integer source values via value_as_long.
1375         * guile/scm-math.c: Include "target-float.h".  Do not include
1376         "doublest.h", "dfp.h", and "expression.h".
1377         (vlscm_convert_typed_number): Use target_float_from_host_double.
1378         (vlscm_convert_number): Likewise.
1379
1380         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1381         (convert_value_from_python): Use target_float_from_host_double.
1382
1383 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1384
1385         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1386         (cast_from_fixed): Likewise.
1387         (ada_scaling_type): New function.
1388         (ada_delta): Return value instead of DOUBLEST.  Perform target
1389         arithmetic instead of host arithmetic.
1390         (scaling_factor): Rename to ...
1391         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1392         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1393         (ada_fixed_to_float): Remove.
1394         (ada_float_to_fixed): Remove.
1395         * ada-lang.h (ada_fixed_to_float): Remove.
1396         (ada_float_to_fixed): Remove.
1397         (ada_delta): Return value instead of DOUBLEST.
1398         (ada_scaling_factor): Add prototype.
1399
1400         * ada-typeprint.c: Include "target-float.h".
1401         (print_fixed_point_type): Perform target arithmetic instead of
1402         host arithmetic.
1403         * ada-valprint.c: Include "target-float.h".
1404         (ada_val_print_num): Perform target arithmetic instead of
1405         host arithmetic for fixed-point types.
1406
1407 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1408
1409         * target-float.c: Include <math.h>.
1410         (floatformat_binop): New function.
1411         (floatformat_compare): Likewise.
1412         (target_float_binop): Likewise.
1413         (target_float_compare): Likewise.
1414         * target-float.h: Include "expression.h".
1415         (target_float_binop): Add prototype.
1416         (target_float_compare): Likewise.
1417
1418         * valarith.c: Do not include "doublest.h" and "dfp.h".
1419         Include "common/byte-vector.h".
1420         (value_args_as_decimal): Remove, replace by ...
1421         (value_args_as_target_float): ... this function.  Handle both
1422         binary and decimal target floating-point formats.
1423         (scalar_binop): Handle both binary and decimal FP using
1424         value_args_as_target_float and target_float_binop.
1425         (value_equal): Handle both binary and decimal FP using
1426         value_args_as_target_float and target_float_compare.
1427         (value_less): Likewise.
1428         (value_pos): Handle all scalar types as simple copy.
1429         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1430         * dfp.c (decimal_binop): Throw error instead of internal_error
1431         when called with an unsupported operation code.
1432
1433 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1434
1435         * target-float.c (target_float_to_string): New function.
1436         (target_float_from_string): New function.
1437         * target-float.h (target_float_to_string): Add prototype.
1438         (target_float_from_string): Add prototype.
1439
1440         * valprint.c: Include "target-float.h".  Do not include
1441         "doublest.h" and "dfp.h".
1442         (print_floating): Use target_float_to_string.
1443         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1444         (printf_floating): Use target_float_to_string.
1445         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1446         (print_i387_value): Use target_float_to_string.
1447         * mips-tdep.c: Include "target-float.h".
1448         (mips_print_fp_register): Use target_float_to_string.
1449         * sh64-tdep.c: Include "target-float.h".
1450         (sh64_do_fp_register): Use target_float_to_string.
1451
1452         * parse.c: Include "target-float.h".  Do not include
1453         "doublest.h" and "dfp.h".
1454         (parse_float): Use target_float_from_string.
1455         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1456         (define_symbol): Use target_float_from_string.
1457         * gdbarch-selftests.c: Include "target-float.h".
1458         (register_to_value_test): Use target_float_from_string.
1459
1460 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1461
1462         * Makefile.c (SFILES): Add target-float.c.
1463         (HFILES_NO_SRCDIR): Add target-float.h.
1464         (COMMON_OBS): Add target-float.o.
1465         * target-float.h: New file.
1466         * target-float.c: New file.
1467
1468         * doublest.c (floatformat_classify): Fix detection of float_zero.
1469
1470         * gdbtypes.c (is_floating_type): New function.
1471         * gdbtypes.h (is_floating_type): Add prototype.
1472
1473         * value.c: Do not include "floatformat.h".
1474         (unpack_double): Use target_float_is_valid.
1475         (is_floating_value): New function.
1476         * value.h (is_floating_value): Add prototype-
1477
1478         * valarith.c: Include "target-float.h".
1479         (value_logical_not): Use target_float_is_zero.
1480
1481         * python/py-value.c: Include "target-float.h".
1482         (valpy_nonzero): Use target_float_is_zero.
1483
1484 2017-11-04  Tom Tromey  <tom@tromey.com>
1485
1486         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1487
1488 2017-11-04  Tom Tromey  <tom@tromey.com>
1489
1490         * breakpoint.c (set_momentary_breakpoint): Return
1491         breakpoint_up.
1492         (until_break_command): Update.
1493         (new_until_break_fsm): Change argument types to
1494         breakpoint_up.
1495         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1496         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1497         Remove.
1498         * infcmd.c (finish_forward): Update.
1499         * breakpoint.h (set_momentary_breakpoint)
1500         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1501         (make_cleanup_delete_breakpoint): Remove.
1502         (struct breakpoint_deleter): New.
1503         (breakpoint_up): New typedef.
1504         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1505         (insert_exception_resume_breakpoint): Update.
1506         (insert_exception_resume_from_probe): Update.
1507         (insert_longjmp_resume_breakpoint): Update.
1508         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1509         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1510         * infcall.c (call_function_by_hand_dummy): Update
1511
1512 2017-11-04  Tom Tromey  <tom@tromey.com>
1513
1514         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1515
1516 2017-11-04  Tom Tromey  <tom@tromey.com>
1517
1518         * linux-tdep.c (linux_core_info_proc_mappings): Use
1519         gdb::def_vector.
1520         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1521         "size" argument.
1522         (linux_corefile_thread): Update.
1523         (linux_make_corefile_notes): Remove unused variable.
1524
1525 2017-11-04  Tom Tromey  <tom@tromey.com>
1526
1527         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1528         gdb::byte_vector.
1529
1530 2017-11-04  Tom Tromey  <tom@tromey.com>
1531
1532         * objfiles.c (do_free_objfile_cleanup): Remove.
1533         * compile/compile-object-load.c (compile_object_load): Update.
1534         * objfiles.h (make_cleanup_free_objfile): Remove.
1535
1536 2017-11-04  Tom Tromey  <tom@tromey.com>
1537
1538         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1539         (adi_read_versions): Change "tags" to "gdb_byte *".
1540         (adi_print_versions): Likewise.
1541
1542 2017-11-04  Tom Tromey  <tom@tromey.com>
1543
1544         * breakpoint.c
1545         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1546         from start_rbreak_breakpoints.
1547         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1548         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1549         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1550         * symtab.c (do_end_rbreak_breakpoints): Remove.
1551         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1552
1553 2017-11-04  Tom Tromey  <tom@tromey.com>
1554
1555         * cp-namespace.c (reset_directive_searched): Remove.
1556         (cp_lookup_symbol_via_imports): Use scoped_restore.
1557         * cp-support.c (reset_directive_searched): Remove.
1558         (make_symbol_overload_list_using): Use scoped_restore.
1559         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1560         (reset_directive_searched): Remove.
1561
1562 2017-11-04  Tom Tromey  <tom@tromey.com>
1563
1564         * symfile.c (find_separate_debug_file_by_debuglink): Use
1565         unique_xmalloc_ptr.
1566
1567 2017-11-04  Tom Tromey  <tom@tromey.com>
1568
1569         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1570         type of "info".
1571         (compute_stack_depth): Likewise.
1572         (do_compile_dwarf_expr_to_c): Use std::vector.
1573
1574 2017-11-04  Tom Tromey  <tom@tromey.com>
1575
1576         * compile/compile-object-load.c (link_callbacks_einfo): Use
1577         std::string.
1578
1579 2017-11-04  Tom Tromey  <tom@tromey.com>
1580
1581         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1582         Use scoped_free_pendings.
1583         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1584         scoped_free_pendings.
1585         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1586         (xcoff_initial_scan): Likewise.
1587         * buildsym.c (reset_symtab_globals): Update comment.
1588         (scoped_free_pendings): Rename from really_free_pendings.
1589         (prepare_for_building): Update comment.
1590         (buildsym_init): Likewise.
1591         * buildsym.h (class scoped_free_pendings): New class.
1592         (really_free_pendings): Don't declare.
1593
1594 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1595
1596         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1597         output when converting a zero value to a special byteorder format.
1598
1599 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1600
1601         * frame.c (do_frame_register_read): Remove aspace.
1602         * jit.c (jit_frame_sniffer): Likwise.
1603         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1604         * regcache.c (regcache::regcache): Pass nullptr.
1605         (regcache_print): Caller updated.
1606         * regcache.h (regcache::regcache): Remove one constructor
1607         parameter aspace.
1608
1609 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1610
1611         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1612
1613 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1614
1615         * breakpoint.c (insert_single_step_breakpoints): Update.
1616         * frame.c (struct frame_info) <aspace>: Add const.
1617         (frame_save_as_regcache): Add const.
1618         (get_frame_address_space): Return const address_space *.
1619         * frame.h (get_frame_address_space): Update declaration.
1620         * infrun.c (struct step_over_info) <aspace>: Add const.
1621         (set_step_over_info): Make aspace const.
1622         (displaced_step_prepare_throw): Change variable const.
1623         (resume): Likewise.
1624         (proceed): Likewise.
1625         (adjust_pc_after_break): Likewise.
1626         (save_waitstatus): Likewise.
1627         (handle_signal_stop): Likewise.
1628         (keep_going_pass_signal): Likewise.
1629         * jit.c (jit_frame_sniffer): Add const.
1630         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1631         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1632         * record-full.c (record_full_wait_1): Likewise.
1633         * regcache.c (regcache::regcache): Change parameter to const.
1634         * regcache.h (regcache::regcache): Likewise.
1635         (regcache::aspace): Return const address_space *.
1636         (regcache) <m_aspace>: Add const.
1637
1638 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1639
1640         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1641         * frame.c (create_sentinel_frame): Likewise.
1642         * infrun.c (displaced_step_prepare_throw): Likewise.
1643         (resume): Likewise.
1644         (thread_still_needs_step_over_bp): Likewise.
1645         (proceed): Likewise.
1646         (do_target_wait): Likewise.
1647         (adjust_pc_after_break): Likewise.
1648         (handle_syscall_event): Likewise.
1649         (save_waitstatus): Likewise.
1650         (handle_inferior_event_1): Likewise.
1651         (handle_signal_stop): Likewise.
1652         (keep_going_pass_signal): Likewise.
1653         * linux-nat.c (status_callback): Likewise.
1654         (save_stop_reason): Likewise.
1655         (resume_stopped_resumed_lwps): Likewise.
1656         * record-full.c (record_full_exec_insn): Likewise.
1657         (record_full_wait_1): Likewise.
1658         * regcache.c (get_regcache_aspace): Remove.
1659         * regcache.h (get_regcache_aspace): Remove.
1660
1661 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1662
1663         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1664         (init_regcache_descr): Use gdbarch_num_regs.
1665         (regcache::regcache): Likewise.
1666         (regcache::get_register_status): Likewise.
1667         (regcache::assert_raw_regnum): Likewise.
1668         (regcache::cooked_read): Likewise.
1669         (regcache::cooked_read_value): Likewise.
1670         (regcache::cooked_write): Likewise.
1671         (regcache::dump): Likewise.
1672         (regcache::num_raw_registers): New method.
1673         * regcache.h (class regcache) <num_raw_registers>: New.
1674
1675 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1676
1677         * regcache.c (regcache::assert_regnum): New method.
1678         (regcache::invalidate): Call assert_regnum.
1679         (regcache::raw_update): Likewise.
1680         (regcache::raw_write): Likewise.
1681         (regcache::raw_read_part): Likewise.
1682         (regcache::raw_write_part): Likewise.
1683         (regcache::raw_supply): Likewise.
1684         (regcache::raw_supply_integer): Likewise.
1685         (regcache::raw_supply_zeroed): Likewise.
1686         (regcache::raw_collect): Likewise.
1687         (regcache::raw_collect_integer): Likewise.
1688         * regcache.h (regcache::assert_regnum): Declare.
1689
1690 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1691
1692         * regcache.c (regcache::dump): Remove code.
1693
1694 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1695
1696         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1697         Remove.
1698         <sizeof_cooked_register_status>: Remove.
1699         (init_regcache_descr): Update.
1700         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1701         (regcache::save): Likewise.
1702         (regcache::dump): Likewise.
1703
1704 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1705
1706         * ft32-tdep.c (ft32_fetch_instruction): New function.
1707         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1708
1709 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1710
1711         * cli/cli-script.c (execute_control_command): Rename to ...
1712         (execute_control_command_1): ... this.
1713         (execute_control_command): New function.
1714
1715 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1716
1717         * tracepoint.c (tfind_command): Remove const_cast.
1718
1719 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1720
1721         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1722
1723 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1724
1725         * common/common-utils.h (in_inclusive_range): New function.
1726         * arm-tdep.c (arm_record_extension_space): Use
1727         in_inclusive_range.
1728         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1729         * cris-tdep.c (cris_spec_reg_applicable): Use
1730         in_inclusive_range.
1731
1732 2017-10-30  Pedro Alves  <palves@redhat.com>
1733             Simon Marchi <simon.marchi@ericsson.com>
1734
1735         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1736         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1737
1738 2017-10-30  Pedro Alves  <palves@redhat.com>
1739
1740         * common/common-utils.c (string_appendf, string_vappendf): New
1741         functions.
1742         * common/common-utils.h (string_appendf, string_vappendf): New
1743         declarations.
1744         * unittests/common-utils-selftests.c (string_appendf_func)
1745         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1746         (string_vappendf_tests): New functions.
1747         (_initialize_common_utils_selftests): Register "string_appendf" and
1748         "string_vappendf tests".
1749
1750 2017-10-30  Pedro Alves  <palves@redhat.com>
1751
1752         * unittests/common-utils-selftests.c (format_func): New typedef.
1753         (string_printf_tests, string_vprintf_tests): Tests factored out
1754         and merged to ...
1755         (test_format_func): ... this new function.
1756         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1757         test_format_func.
1758
1759 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1760
1761         * darwin-nat.c: Remove include of gdb.h.
1762
1763 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1764
1765         * xtensa-xtregs.c: Fix formatting issues.
1766
1767 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1768
1769         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1770
1771 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1772
1773         PR python/21213
1774         * python/py-infthread.c (thpy_get_inferior): Increment reference
1775         of inferior before returning it.
1776
1777 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1778
1779         * unittests/common-utils-selftests.c (format): Add
1780         ATTRIBUTE_PRINTF.
1781
1782 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1783
1784         * xml-syscall.c (struct syscall_desc): Add constructor.
1785         <name>: Change type to std::string.
1786         (syscall_desc_up): New typedef.
1787         (syscall_desc_p): Remove typeder.
1788         (DEF_VEC_P(syscall_desc_p)): Remove.
1789         (struct syscall_group_desc): Add constructor.
1790         <name>: Change type to std::string.
1791         <syscalls>: Change type to std::vector.
1792         (syscall_group_desc_up): New typedef.
1793         (syscall_group_desc_p): Remove typedef.
1794         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1795         (struct syscalls_info) <syscalls>: Change type to std::vector of
1796         unique_ptr.
1797         <groups>: Likewise.
1798         <my_gdb_datadir>: Change type to std::string.
1799         (syscalls_info_up): New typedef.
1800         (allocate_syscalls_info): Remove.
1801         (syscalls_info_free_syscalls_desc): Remove.
1802         (syscalls_info_free_syscall_group_desc): Remove.
1803         (free_syscalls_info): Remove.
1804         (make_cleanup_free_syscalls_info): Remove.
1805         (syscall_group_create_syscall_group_desc): Adjust.
1806         (syscall_group_add_syscall): Adjust.
1807         (syscall_create_syscall_desc): Adjust.
1808         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1809         (init_syscalls_info): Adjust.
1810         (syscall_group_get_group_by_name): Adjust.
1811         (xml_get_syscall_number): Adjust.
1812         (xml_get_syscall_name): Adjust.
1813         (xml_list_of_syscalls): Adjust.
1814         (xml_list_syscalls_by_group): Adjust.
1815         (xml_list_of_groups): Adjust.
1816
1817 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1818
1819         * probe.h: Don't include gdb_vecs.h.
1820         (DEF_VEC_P (probe_p)): Remove.
1821         (find_probes_in_objfile): Return an std::vector.
1822         * probe.c (find_probes_in_objfile): Likewise.
1823         * breakpoint.c (breakpoint_objfile_data)
1824         <longjmp_probes>: Change type to std::vector.
1825         <exception_probes>: Likewise.
1826         (free_breakpoint_probes): Don't manually free vectors.
1827         (create_longjmp_master_breakpoint): Adjust.
1828         (create_exception_master_breakpoint): Adjust.
1829         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1830         parameter type, adjust.
1831         (svr4_create_solib_event_breakpoints): Adjust.
1832
1833 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1834
1835         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1836         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1837         with new.
1838         (free_breakpoint_probes): Rename to ...
1839         (free_breakpoint_objfile_data): ... this, and call delete on
1840         bp_objfile_data..
1841
1842 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1843
1844         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1845         (loaded_script_ptr): Remove typedef.
1846         (DEF_VEC_P (loaded_script_ptr)): Remove.
1847         (struct collect_matching_scripts_data): Add constructor.
1848         <scripts_p>: Change type to (pointer to) std::vector.
1849         (collect_matching_scripts_data): Adjust.
1850         (sort_scripts_by_name): Make suitable for std::sort.
1851         (print_scripts): Don't sort vector, adjust to std::vector.
1852         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1853
1854 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1855
1856         * symfile.c (filename_language): Make struct, not typedef.  Add
1857         constructor.
1858         <ext>: Change type to std::string.
1859         (DEF_VEC_O (filename_language)): Remove.
1860         (filename_language_table): Change type to std::vector.
1861         (add_filename_language): Adjust.
1862         (set_ext_lang_command): Adjust.
1863         (info_ext_lang_command): Adjust.
1864         (deduce_language_from_filename): Adjust.
1865         (class scoped_restore_filename_language_table): Remove.
1866         (test_filename_language): Use scoped_restore.
1867         (test_set_ext_lang_command): Use scoped_restore, adjust to
1868         std::vector change.
1869
1870 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1871
1872         * symfile.c: Include selftest.h.
1873         (class scoped_restore_filename_language_table): New.
1874         (test_filename_language): New test.
1875         (test_set_ext_lang_command): New test.
1876         (_initialize_symfile): Register tests.
1877
1878 2017-10-27  Keith Seitz  <keiths@redhat.com>
1879
1880         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1881         in the bp_location, falling back to find_pc_sect_function when
1882         needed.
1883         (add_location_to_breakpoint): Save sal->symbol.
1884         * breakpoint.h (struct bp_location) <symbol>: New field.
1885         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1886         * symtab.h (struct symtab_and_line) <symbol>: New field.
1887
1888 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1889
1890         PR gdb/13669
1891         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1892         to rewind obstack.
1893
1894 2017-10-26  Pedro Alves  <palves@redhat.com>
1895
1896         * remote.c (remote_async_terminal_ours_p): Delete.
1897         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1898         Remove references to 'remote_async_terminal_ours_p'.
1899
1900 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1901
1902         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1903
1904 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1905
1906         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1907         aspace const.
1908         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1909         Likewise.
1910         * breakpoint.c (bpstat_check_location): Remove cast.
1911         (breakpoint_hit_catch_fork): Make aspce const.
1912         (breakpoint_hit_catch_solib): Likewise.
1913         (breakpoint_hit_catch_exec): Likewise.
1914         (breakpoint_hit_ranged_breakpoint): Likewise.
1915         (breakpoint_hit_watchpoint): Likewise.
1916         (base_breakpoint_breakpoint_hit): Likewise.
1917         (bkpt_breakpoint_hit): Likewise.
1918         (dprintf_breakpoint_hit): Likewise.
1919         (tracepoint_breakpoint_hit): Likewise.
1920         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1921
1922 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1923
1924         * breakpoint.c (breakpoint_location_address_match): Change
1925         "struct address_space *" to "const address_space".
1926         (breakpoint_location_address_range_overlap): Likewise.
1927         (breakpoint_here_p): Likewise.
1928         (breakpoint_in_range_p): Likewise.
1929         (moribund_breakpoint_here_p): Likewise.
1930         (bp_location_inserted_here_p): Likewise.
1931         (software_breakpoint_inserted_here_p): Likewise.
1932         (hardware_breakpoint_inserted_here_p): Likewise.
1933         (hardware_watchpoint_inserted_in_range): Likewise.
1934         (bpstat_check_location): Likewise.
1935         (bpstat_stop_status): Likewise.
1936         (breakpoint_address_match): Likewise.
1937         (breakpoint_address_match_range): Likewise.
1938         (breakpoint_location_address_match): Likewise.
1939         (breakpoint_location_address_range_overlap): Likewise.
1940         (insert_single_step_breakpoint): Likewise.
1941         (breakpoint_has_location_inserted_here): Likewise.
1942         (single_step_breakpoint_inserted_here_p): Likewise.
1943         (pc_at_non_inline_function): Likewise.
1944         * breakpoint.h (bpstat_stop_status): Update declaration.
1945         (breakpoint_here_p): Likewise.
1946         (breakpoint_in_range_p): Likewise.
1947         (moribund_breakpoint_here_p): Likewise.
1948         (breakpoint_inserted_here_p): Likewise.
1949         (software_breakpoint_inserted_here_p): Likewise.
1950         (hardware_breakpoint_inserted_here_p): Likewise.
1951         (breakpoint_has_location_inserted_here): Likewise.
1952         (single_step_breakpoint_inserted_here_p): Likewise.
1953         (hardware_watchpoint_inserted_in_range): Likewise.
1954         (breakpoint_address_match): Likewise.
1955         (insert_single_step_breakpoint): Likewise.
1956         (pc_at_non_inline_function): Likewise.
1957         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1958         * record.c (record_check_stopped_by_breakpoint): Likewise.
1959         * record.h (record_check_stopped_by_breakpoint): Likewise.
1960         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1961
1962 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1963
1964         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1965         regcache->arch () instead get_regcache_arch.
1966         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1967         Likewise.
1968         (aarch64_fbsd_store_inferior_registers): Likewise.
1969         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1970         (store_gregs_to_thread): Likewise.
1971         (fetch_fpregs_from_thread): Likewise.
1972         (store_fpregs_to_thread): Likewise.
1973         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1974         (aarch64_store_return_value): Likewise.
1975         (aarch64_software_single_step): Likewise.
1976         * aix-thread.c (aix_thread_wait): Likewise.
1977         (supply_reg32): Likewise.
1978         (supply_sprs64): Likewise.
1979         (supply_sprs32): Likewise.
1980         (fill_gprs64): Likewise.
1981         (fill_gprs32): Likewise.
1982         (fill_sprs64): Likewise.
1983         (fill_sprs32): Likewise.
1984         (store_regs_user_thread): Likewise.
1985         (store_regs_kernel_thread): Likewise.
1986         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1987         (alphabsd_store_inferior_registers): Likewise.
1988         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1989         (alpha_store_return_value): Likewise.
1990         (alpha_deal_with_atomic_sequence): Likewise.
1991         (alpha_next_pc): Likewise.
1992         (alpha_software_single_step): Likewise.
1993         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1994         (amd64bsd_store_inferior_registers): Likewise.
1995         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1996         Likewise.
1997         (amd64_linux_store_inferior_registers): Likewise.
1998         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1999         (amd64_collect_native_gregset): Likewise.
2000         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2001         (amd64obsd_collect_uthread): Likewise.
2002         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2003         (amd64_collect_fpregset): Likewise.
2004         (amd64_supply_fxsave): Likewise.
2005         (amd64_supply_xsave): Likewise.
2006         (amd64_collect_fxsave): Likewise.
2007         (amd64_collect_xsave): Likewise.
2008         * arc-tdep.c (arc_write_pc): Likewise.
2009         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2010         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2011         (arm_fbsd_store_inferior_registers): Likewise.
2012         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2013         (store_vfp_regs): Likewise.
2014         (arm_linux_fetch_inferior_registers): Likewise.
2015         (arm_linux_store_inferior_registers): Likewise.
2016         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2017         (arm_linux_sigreturn_next_pc): Likewise.
2018         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2019         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2020         (fetch_register): Likewise.
2021         (store_register): Likewise.
2022         * arm-tdep.c (arm_is_thumb): Likewise.
2023         (displaced_in_arm_mode): Likewise.
2024         (bx_write_pc): Likewise.
2025         (arm_get_next_pcs_addr_bits_remove): Likewise.
2026         (arm_software_single_step): Likewise.
2027         (arm_extract_return_value): Likewise.
2028         (arm_store_return_value): Likewise.
2029         (arm_write_pc): Likewise.
2030         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2031         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2032         (bsd_uthread_store_registers): Likewise.
2033         * core-regset.c (fetch_core_registers): Likewise.
2034         * corelow.c (get_core_registers): Likewise.
2035         * cris-tdep.c (cris_store_return_value): Likewise.
2036         (cris_extract_return_value): Likewise.
2037         (find_step_target): Likewise.
2038         (find_step_target): Likewise.
2039         (cris_software_single_step): Likewise.
2040         * ctf.c (ctf_fetch_registers): Likewise.
2041         * darwin-nat.c (cancel_breakpoint): Likewise.
2042         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2043         * frv-tdep.c (frv_extract_return_value): Likewise.
2044         * ft32-tdep.c (ft32_store_return_value): Likewise.
2045         (ft32_extract_return_value): Likewise.
2046         * go32-nat.c (fetch_register): Likewise.
2047         (go32_fetch_registers): Likewise.
2048         (go32_store_registers): Likewise.
2049         (store_register): Likewise.
2050         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2051         (h8300_store_return_value): Likewise.
2052         * hppa-linux-nat.c (fetch_register): Likewise.
2053         (store_register): Likewise.
2054         (hppa_linux_fetch_inferior_registers): Likewise.
2055         (hppa_linux_store_inferior_registers): Likewise.
2056         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2057         (i386_darwin_store_inferior_registers): Likewise.
2058         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2059         (gnu_store_registers): Likewise.
2060         * i386-linux-nat.c (fetch_register): Likewise.
2061         (store_register): Likewise.
2062         (supply_gregset): Likewise.
2063         (fill_gregset): Likewise.
2064         (i386_linux_fetch_inferior_registers): Likewise.
2065         (i386_linux_store_inferior_registers): Likewise.
2066         (i386_linux_resume): Likewise.
2067         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2068         Likewise.
2069         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2070         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2071         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2072         (i386obsd_collect_uthread): Likewise.
2073         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2074         (i386_supply_gregset): Likewise.
2075         (i386_collect_gregset): Likewise.
2076         (i386_supply_fpregset): Likewise.
2077         (i386_collect_fpregset): Likewise.
2078         (i386_mpx_bd_base): Likewise.
2079         * i386-v4-nat.c (supply_fpregset): Likewise.
2080         (fill_fpregset): Likewise.
2081         * i387-tdep.c (i387_supply_fsave): Likewise.
2082         (i387_collect_fsave): Likewise.
2083         (i387_supply_fxsave): Likewise.
2084         (i387_collect_fxsave): Likewise.
2085         (i387_supply_xsave): Likewise.
2086         (i387_collect_xsave): Likewise.
2087         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2088         (ia64_linux_store_registers): Likewise.
2089         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2090         (ia64_extract_return_value): Likewise.
2091         (ia64_store_return_value): Likewise.
2092         (find_func_descr): Likewise.
2093         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2094         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2095         (inf_ptrace_store_registers): Likewise.
2096         * infrun.c (use_displaced_stepping): Likewise.
2097         (displaced_step_prepare_throw): Likewise.
2098         (resume): Likewise.
2099         (proceed): Likewise.
2100         (do_target_wait): Likewise.
2101         (adjust_pc_after_break): Likewise.
2102         (handle_inferior_event_1): Likewise.
2103         (handle_signal_stop): Likewise.
2104         (save_infcall_suspend_state): Likewise.
2105         (restore_infcall_suspend_state): Likewise.
2106         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2107         * jit.c (jit_frame_prev_register): Likewise.
2108         * linux-nat.c (save_stop_reason): Likewise.
2109         (linux_nat_wait_1): Likewise.
2110         (resume_stopped_resumed_lwps): Likewise.
2111         * linux-record.c (record_linux_sockaddr): Likewise.
2112         (record_linux_msghdr): Likewise.
2113         (record_linux_system_call): Likewise.
2114         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2115         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2116         (lm32_store_return_value): Likewise.
2117         * m32c-tdep.c (m32c_read_flg): Likewise.
2118         (m32c_pseudo_register_read): Likewise.
2119         (m32c_pseudo_register_write): Likewise.
2120         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2121         (m32r_linux_collect_gregset): Likewise.
2122         * m32r-tdep.c (m32r_store_return_value): Likewise.
2123         (m32r_extract_return_value): Likewise.
2124         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2125         (m68kbsd_collect_fpregset): Likewise.
2126         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2127         * m68k-linux-nat.c (fetch_register): Likewise.
2128         (old_fetch_inferior_registers): Likewise.
2129         (old_store_inferior_registers): Likewise.
2130         (store_regs): Likewise.
2131         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2132         (m68k_svr4_store_return_value): Likewise.
2133         * m88k-tdep.c (m88k_store_arguments): Likewise.
2134         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2135         (mi_cmd_data_write_register_values): Likewise.
2136         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2137         (mips_fbsd_store_inferior_registers): Likewise.
2138         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2139         (mips_fbsd_supply_gregs): Likewise.
2140         (mips_fbsd_collect_fpregs): Likewise.
2141         (mips_fbsd_collect_gregs): Likewise.
2142         (mips_fbsd_supply_fpregset): Likewise.
2143         (mips_fbsd_collect_fpregset): Likewise.
2144         (mips_fbsd_supply_gregset): Likewise.
2145         (mips_fbsd_collect_gregset): Likewise.
2146         * mips-linux-nat.c (supply_gregset): Likewise.
2147         (fill_gregset): Likewise.
2148         (supply_fpregset): Likewise.
2149         (fill_fpregset): Likewise.
2150         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2151         (mips_fill_gregset): Likewise.
2152         (mips_supply_fpregset): Likewise.
2153         (mips_fill_fpregset): Likewise.
2154         (mips64_supply_gregset): Likewise.
2155         (micromips_linux_sigframe_validate): Likewise.
2156         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2157         (mipsnbsd_fetch_inferior_registers): Likewise.
2158         (mipsnbsd_store_inferior_registers): Likewise.
2159         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2160         (mipsnbsd_supply_gregset): Likewise.
2161         (mipsnbsd_iterate_over_regset_sections): Likewise.
2162         (mipsnbsd_supply_reg): Likewise.
2163         (mipsnbsd_supply_fpreg): Likewise.
2164         * mips-tdep.c (mips_in_frame_stub): Likewise.
2165         (mips_dummy_id): Likewise.
2166         (is_octeon_bbit_op): Likewise.
2167         (micromips_bc1_pc): Likewise.
2168         (extended_mips16_next_pc): Likewise.
2169         (mips16_next_pc): Likewise.
2170         (deal_with_atomic_sequence): Likewise.
2171         * moxie-tdep.c (moxie_process_readu): Likewise.
2172         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2173         * nto-procfs.c (procfs_store_registers): Likewise.
2174         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2175         (ppcfbsd_store_inferior_registers): Likewise.
2176         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2177         (fetch_altivec_register): Likewise.
2178         (get_spe_registers): Likewise.
2179         (fetch_spe_register): Likewise.
2180         (fetch_altivec_registers): Likewise.
2181         (fetch_all_gp_regs): Likewise.
2182         (fetch_all_fp_regs): Likewise.
2183         (store_vsx_register): Likewise.
2184         (store_altivec_register): Likewise.
2185         (set_spe_registers): Likewise.
2186         (store_spe_register): Likewise.
2187         (store_altivec_registers): Likewise.
2188         (store_all_gp_regs): Likewise.
2189         (store_all_fp_regs): Likewise.
2190         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2191         (ppc_linux_collect_gregset): Likewise.
2192         (ppc_canonicalize_syscall): Likewise.
2193         (ppc_linux_record_signal): Likewise.
2194         (ppu2spu_prev_register): Likewise.
2195         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2196         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2197         (ppcobsd_store_registers): Likewise.
2198         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2199         Likewise.
2200         (ppc_ravenscar_generic_store_registers): Likewise.
2201         * procfs.c (procfs_fetch_registers): Likewise.
2202         (procfs_store_registers): Likewise.
2203         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2204         (ravenscar_store_registers): Likewise.
2205         (ravenscar_prepare_to_store): Likewise.
2206         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2207         * record-full.c (record_full_wait_1): Likewise.
2208         (record_full_registers_change): Likewise.
2209         (record_full_store_registers): Likewise.
2210         (record_full_core_fetch_registers): Likewise.
2211         (record_full_save): Likewise.
2212         (record_full_goto_insn): Likewise.
2213         * regcache.c (regcache_register_size): Likewise.
2214         (get_regcache_arch): Remove.
2215         (regcache_read_pc): Likewise.
2216         * regcache.h (get_regcache_arch): Remove.
2217         * remote-sim.c (gdbsim_fetch_register): Likewise.
2218         (gdbsim_store_register): Likewise.
2219         * remote.c (fetch_register_using_p): Likewise.
2220         (send_g_packet): Likewise.
2221         (remote_prepare_to_store): Likewise.
2222         (store_registers_using_G): Likewise.
2223         * reverse.c (save_bookmark_command): Likewise.
2224         (goto_bookmark_command): Likewise.
2225         * rs6000-aix-tdep.c (branch_dest): Likewise.
2226         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2227         (fetch_register): Likewise.
2228         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2229         (ppc_collect_reg): Likewise.
2230         (ppc_collect_gregset): Likewise.
2231         (ppc_collect_fpregset): Likewise.
2232         (ppc_collect_vsxregset): Likewise.
2233         (ppc_collect_vrregset): Likewise.
2234         (ppc_displaced_step_hw_singlestep): Likewise.
2235         (rs6000_pseudo_register_read): Likewise.
2236         (rs6000_pseudo_register_write): Likewise.
2237         * s390-linux-nat.c (supply_gregset): Likewise.
2238         (fill_gregset): Likewise.
2239         (s390_linux_fetch_inferior_registers): Likewise.
2240         * s390-linux-tdep.c (s390_write_pc): Likewise.
2241         (s390_software_single_step): Likewise.
2242         (s390_all_but_pc_registers_record): Likewise.
2243         (s390_linux_syscall_record): Likewise.
2244         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2245         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2246         (shnbsd_store_inferior_registers): Likewise.
2247         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2248         (sh_extract_return_value_fpu): Likewise.
2249         (sh_store_return_value_nofpu): Likewise.
2250         (sh_corefile_supply_regset): Likewise.
2251         (sh_corefile_collect_regset): Likewise.
2252         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2253         (sh64_store_return_value): Likewise.
2254         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2255         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2256         (sparc_store_inferior_registers): Likewise.
2257         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2258         (sparc_ravenscar_prepare_to_store): Likewise.
2259         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2260         (sparc_analyze_control_transfer): Likewise.
2261         (sparc_step_trap): Likewise.
2262         (sparc_software_single_step): Likewise.
2263         (sparc32_gdbarch_init): Likewise.
2264         (sparc_supply_rwindow): Likewise.
2265         (sparc_collect_rwindow): Likewise.
2266         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2267         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2268         (sparc64nbsd_collect_gregset): Likewise.
2269         (sparc64nbsd_supply_fpregset): Likewise.
2270         (sparc64nbsd_collect_fpregset): Likewise.
2271         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2272         (sparc64_supply_gregset): Likewise.
2273         (sparc64_collect_gregset): Likewise.
2274         (sparc64_supply_fpregset): Likewise.
2275         (sparc64_collect_fpregset): Likewise.
2276         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2277         * spu-tdep.c (spu_unwind_sp): Likewise.
2278         (spu2ppu_prev_register): Likewise.
2279         (spu_memory_remove_breakpoint): Likewise.
2280         * stack.c (return_command): Likewise.
2281         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2282         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2283         * tracefile.c (trace_save_ctf): Likewise.
2284         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2285         (do_windows_store_inferior_registers): Likewise.
2286         (windows_resume): Likewise.
2287         * xtensa-linux-nat.c (fill_gregset): Likewise.
2288         (supply_gregset_reg): Likewise.
2289         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2290         (xtensa_register_read_masked): Likewise.
2291         (xtensa_supply_gregset): Likewise.
2292         (xtensa_extract_return_value): Likewise.
2293         (xtensa_store_return_value): Likewise.
2294
2295 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2296
2297         * doublest.c (floatformat_from_string): New function.
2298         * doublest.h (floatformat_from_string): Add prototype.
2299
2300         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2301         (OP_FLOAT): ... this.
2302         * expression.h: Do not include "doublest.h".
2303         (union exp_element): Replace doubleconst and decfloatconst by
2304         new element floatconst.
2305         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2306         (ada_evaluate_subexp): Likewise.
2307         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2308         OP_DOUBLE and OP_DECFLOAT.
2309         * expprint.c (print_subexp_standard): Likewise.
2310         (dump_subexp_body_standard): Likewise.
2311         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2312
2313         * parse.c: Include "dfp.h".
2314         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2315         (write_exp_elt_floatcst): New function.
2316         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2317         and OP_DECFLOAT.
2318         (operator_check_standard): Likewise.
2319         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2320         Return target format buffer instead of host DOUBLEST.
2321         Use floatformat_from_string and decimal_from_string to parse
2322         either binary or decimal floating-point types.
2323         (parse_c_float): Remove.
2324         * parser-defs.h: Do not include "doublest.h".
2325         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2326         (write_exp_elt_floatcst): Add prototype.
2327         (parse_float): Update prototype.
2328         (parse_c_float): Remove.
2329
2330         * c-exp.y: Do not include "dfp.h".
2331         (typed_val_float): Use byte buffer instead of DOUBLEST.
2332         (typed_val_decfloat): Remove.
2333         (DECFLOAT): Remove.
2334         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2335         (parse_number): Update to new parse_float interface.
2336         Parse suffixes and determine type before calling parse_float.
2337         Handle decimal and binary FP types the same way.
2338
2339         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2340         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2341         (parse_number): Update to new parse_float interface.
2342         Parse suffixes and determine type before calling parse_float.
2343
2344         * f-exp.y: Replace dval by typed_val_float.
2345         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2346         (parse_number): Use parse_float instead of atof.
2347
2348         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2349         (parse_go_float): Remove.
2350         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2351         (parse_number): Call parse_float instead of parse_go_float.
2352         Parse suffixes and determine type before calling parse_float.
2353
2354         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2355         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2356         (parse_number): Update to new parse_float interface.
2357         Parse suffixes and determine type before calling parse_float.
2358
2359         * m2-exp.y: Replace dval by byte buffer val.
2360         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2361         (parse_number): Call parse_float instead of atof.
2362
2363         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2364         (lex_number): Call parse_float instead of strtod.
2365         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2366         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2367         Use write_exp_elt_floatcst.
2368         (unit_testing): Remove static variable.
2369         (rust_type): Do not check unit_testing.
2370         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2371
2372         * ada-exp.y (type_float, type_double): Remove.
2373         (typed_val_float): Use byte buffer instead of DOUBLEST.
2374         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2375         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2376
2377 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2378
2379         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2380         * arch/aarch64.h: New file.
2381
2382 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2383
2384         * dfp.h (decimal_from_string): Use const reference for argument.
2385         * dfp.c (decimal_from_string): Likewise.
2386
2387 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2388
2389         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2390         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2391         * mips-tdep.c (mips_print_fp_register): Likewise.
2392
2393 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2394
2395         * common/format.h (enum argclass): Replace decfloat_arg by
2396         dec32float_arg, dec64float_arg, and dec128float_arg.
2397         * common/format.c (parse_format_string): Update to return
2398         new decimal float argument classes.
2399
2400         * printcmd.c (printf_decfloat): Rename to ...
2401         (printf_floating): ... this.  Add argclass argument, and use it
2402         instead of parsing the format string again.  Add support for
2403         binary floating-point values, using floatformat_to_string.
2404         Convert value to the target format if it doesn't already match.
2405         (ui_printf): Call printf_floating instead of printf_decfloat,
2406         also for double_arg / long_double_arg.  Pass argclass.
2407
2408         * dfp.c (decimal_to_string): Add format string argument.
2409         * dfp.h (decimal_to_string): Likewise.
2410
2411         * doublest.c (floatformat_to_string): Add format string argument.
2412         * doublest.h (floatformat_to_string): Likewise.
2413
2414 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2415
2416         * doublest.c (floatformat_precision): New routine.
2417         (floatformat_to_string): Likewise.
2418         * doublest.c (floatformat_to_string): Add prototype.
2419
2420         * printcmd.c (print_scalar_formatted): Only call print_floating
2421         on floating-point types.
2422         * valprint.c: Do not include "floatformat.h".
2423         (generic_val_print_decfloat): Remove.
2424         (generic_val_print): Call generic_val_print_float for both
2425         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2426         (print_floating): Use floatformat_to_string.  Handle decimal float.
2427         (print_decimal_floating): Remove, merge into floatformat_to_string.
2428         * value.h (print_decimal_floating): Remove.
2429
2430         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2431
2432 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2433
2434         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2435
2436 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2437
2438         * memattr.h: Don't include vec.h.
2439         (struct mem_attrib): Initialize fields.
2440         <unknown>: New static method.
2441         (struct mem_region): Add constructors, operator<, initialize
2442         fields.
2443         * memattr.c: Include algorithm.
2444         (default_mem_attrib, unknown_mem_attrib): Remove.
2445         (user_mem_region_list): New global.
2446         (target_mem_region_list, mem_region_list): Change type to
2447         std::vector<mem_region>.
2448         (mem_use_target): Now a function.
2449         (target_mem_regions_valid): Change type to bool.
2450         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2451         (require_user_regions): Adjust.
2452         (require_target_regions): Adjust.
2453         (create_mem_region): Adjust.
2454         (lookup_mem_region): Adjust.
2455         (invalidate_target_mem_regions): Adjust.
2456         (mem_clear): Rename to...
2457         (user_mem_clear): ... this, and adjust.
2458         (mem_command): Adjust.
2459         (info_mem_command): Adjust.
2460         (mem_enable, enable_mem_command, mem_disable,
2461         disable_mem_command): Adjust.
2462         (mem_delete): Adjust.
2463         (delete_mem_command): Adjust.
2464         * memory-map.h (parse_memory_map): Return an std::vector.
2465         * memory-map.c (parse_memory_map): Likewise.
2466         (struct memory_map_parsing_data): Add constructor.
2467         <memory_map>: Point to std::vector.
2468         (memory_map_start_memory): Adjust.
2469         (memory_map_end_memory): Adjust.
2470         (memory_map_end_property): Adjust.
2471         (clear_result): Remove.
2472         * remote.c (remote_memory_map): Return an std::vector.
2473         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2474         Remove.
2475         (target_debug_print_mem_region_vector): New.
2476         * target-delegates.c: Regenerate.
2477         * target.h (mem_region_vector): New typedef.
2478         (to_memory_map): Return mem_region_vector.
2479         (target_memory_map): Return an std::vector.
2480         * target.c (target_memory_map): Return an std::vector.
2481         (flash_erase_command): Adjust.
2482
2483 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2484
2485         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2486         Change type to std::string.
2487         (memory_map_start_property): Adjust.
2488         (memory_map_end_property): Adjust.
2489
2490 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2491
2492         * infrun.h: Include common/byte-vector.h.
2493         (struct displaced_step_closure): New struct.
2494         (struct buf_displaced_step_closure): New struct.
2495         * infrun.c (displaced_step_closure::~displaced_step_closure):
2496         Provide default implementation.
2497         (displaced_step_clear): Deallocate step closure with delete.
2498         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2499         (aarch64_displaced_step_closure): ... this, extend
2500         displaced_step_closure.
2501         (aarch64_displaced_step_data) <dsc>: Change type to
2502         aarch64_displaced_step_closure.
2503         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2504         unique_ptr.
2505         (aarch64_displaced_step_fixup): Add cast for displaced step
2506         closure.
2507         * amd64-tdep.c (displaced_step_closure): Rename to ...
2508         (amd64_displaced_step_closure): ... this, extend
2509         displaced_step_closure.
2510         <insn_buf>: Change type to std::vector<gdb_byte>.
2511         <max_len>: Remove.
2512         (fixup_riprel): Change type of DSC parameter, adjust to type
2513         change of insn_buf.
2514         (fixup_displaced_copy): Change type of DSC parameter.
2515         (amd64_displaced_step_copy_insn): Instantiate
2516         amd64_displaced_step_closure.
2517         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2518         to type change of insn_buf.
2519         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2520         parameter DSC.
2521         (arm_linux_copy_svc): Likewise.
2522         (cleanup_kernel_helper_return): Likewise.
2523         (arm_catch_kernel_helper_return): Likewise.
2524         (arm_linux_displaced_step_copy_insn): Instantiate
2525         arm_displaced_step_closure.
2526         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2527         (displaced_read_reg): Change type of parameter DSC.
2528         (branch_write_pc): Likewise.
2529         (load_write_pc): Likewise.
2530         (alu_write_pc): Likewise.
2531         (displaced_write_reg): Likewise.
2532         (arm_copy_unmodified): Likewise.
2533         (thumb_copy_unmodified_32bit): Likewise.
2534         (thumb_copy_unmodified_16bit): Likewise.
2535         (cleanup_preload): Likewise.
2536         (install_preload): Likewise.
2537         (arm_copy_preload): Likewise.
2538         (thumb2_copy_preload): Likewise.
2539         (install_preload_reg): Likewise.
2540         (arm_copy_preload_reg): Likewise.
2541         (cleanup_copro_load_store): Likewise.
2542         (install_copro_load_store): Likewise.
2543         (arm_copy_copro_load_store) Likewise.
2544         (thumb2_copy_copro_load_store): Likewise.
2545         (cleanup_branch): Likewise.
2546         (install_b_bl_blx): Likewise.
2547         (arm_copy_b_bl_blx): Likewise.
2548         (thumb2_copy_b_bl_blx): Likewise.
2549         (thumb_copy_b): Likewise.
2550         (install_bx_blx_reg): Likewise.
2551         (arm_copy_bx_blx_reg): Likewise.
2552         (thumb_copy_bx_blx_reg): Likewise.
2553         (cleanup_alu_imm): Likewise.
2554         (arm_copy_alu_imm): Likewise.
2555         (thumb2_copy_alu_imm): Likewise.
2556         (cleanup_alu_reg): Likewise.
2557         (install_alu_reg): Likewise.
2558         (arm_copy_alu_reg): Likewise.
2559         (thumb_copy_alu_reg): Likewise.
2560         (cleanup_alu_shifted_reg): Likewise.
2561         (install_alu_shifted_reg): Likewise.
2562         (arm_copy_alu_shifted_reg): Likewise.
2563         (cleanup_load): Likewise.
2564         (cleanup_store): Likewise.
2565         (arm_copy_extra_ld_st): Likewise.
2566         (install_load_store): Likewise.
2567         (thumb2_copy_load_literal): Likewise.
2568         (thumb2_copy_load_reg_imm): Likewise.
2569         (arm_copy_ldr_str_ldrb_strb): Likewise.
2570         (cleanup_block_load_all): Likewise.
2571         (cleanup_block_store_pc): Likewise.
2572         (cleanup_block_load_pc): Likewise.
2573         (arm_copy_block_xfer): Likewise.
2574         (thumb2_copy_block_xfer): Likewise.
2575         (cleanup_svc): Likewise.
2576         (install_svc): Likewise.
2577         (arm_copy_svc): Likewise.
2578         (thumb_copy_svc): Likewise.
2579         (arm_copy_undef): Likewise.
2580         (thumb_32bit_copy_undef): Likewise.
2581         (arm_copy_unpred): Likewise.
2582         (arm_decode_misc_memhint_neon): Likewise.
2583         (arm_decode_unconditional): Likewise.
2584         (arm_decode_miscellaneous): Likewise.
2585         (arm_decode_dp_misc): Likewise.
2586         (arm_decode_ld_st_word_ubyte): Likewise.
2587         (arm_decode_media): Likewise.
2588         (arm_decode_b_bl_ldmstm): Likewise.
2589         (arm_decode_ext_reg_ld_st): Likewise.
2590         (thumb2_decode_dp_shift_reg): Likewise.
2591         (thumb2_decode_ext_reg_ld_st): Likewise.
2592         (arm_decode_svc_copro): Likewise.
2593         (thumb2_decode_svc_copro): Likewise.
2594         (install_pc_relative): Likewise.
2595         (thumb_copy_pc_relative_16bit): Likewise.
2596         (thumb_decode_pc_relative_16bit): Likewise.
2597         (thumb_copy_pc_relative_32bit): Likewise.
2598         (thumb_copy_16bit_ldr_literal): Likewise.
2599         (thumb_copy_cbnz_cbz): Likewise.
2600         (thumb2_copy_table_branch): Likewise.
2601         (cleanup_pop_pc_16bit_all): Likewise.
2602         (thumb_copy_pop_pc_16bit): Likewise.
2603         (thumb_process_displaced_16bit_insn): Likewise.
2604         (decode_thumb_32bit_ld_mem_hints): Likewise.
2605         (thumb_process_displaced_32bit_insn): Likewise.
2606         (thumb_process_displaced_insn): Likewise.
2607         (arm_process_displaced_insn): Likewise.
2608         (arm_displaced_init_closure): Likewise.
2609         (arm_displaced_step_fixup): Add cast for closure.
2610         * arm-tdep.h: Include infrun.h.
2611         (displaced_step_closure): Rename to ...
2612         (arm_displaced_step_closure): ... this, extend
2613         displaced_step_closure.
2614         <u::svc::copy_svc_os>: Change type of parameter DSC.
2615         <cleanup>: Likewise.
2616         (arm_process_displaced_insn): Likewise.
2617         (arm_displaced_init_closure): Likewise.
2618         (displaced_read_reg): Likewise.
2619         (displaced_write_reg): Likewise.
2620         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2621         Adjust.
2622         * i386-tdep.h: Include infrun.h.
2623         (i386_displaced_step_closure): New typedef.
2624         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2625         i386_displaced_step_closure.
2626         (i386_displaced_step_fixup): Adjust.
2627         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2628         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2629         and unique_ptr.
2630         (ppc_displaced_step_fixup): Adjust.
2631         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2632         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2633         and unique_ptr.
2634         (s390_displaced_step_fixup): Adjust.
2635
2636 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2637
2638         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2639         Remove declarations.
2640
2641 2017-10-20  Tom Tromey  <tom@tromey.com>
2642
2643         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2644         std::vector.
2645         (gdb_bfd_record_inclusion): Update.
2646         (bfdp): Remove typedef.
2647
2648 2017-10-20  Tom Tromey  <tom@tromey.com>
2649
2650         * gdb_bfd.c (gdb_bfd_ref): Use new.
2651         (struct gdb_bfd_data): Add constructor, destructor, and member
2652         initializers.
2653         (gdb_bfd_unref): Use delete.
2654
2655 2017-10-20  Tom Tromey  <tom@tromey.com>
2656
2657         * exec.c (exec_file_attach): Use new_bfd_ref.
2658         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2659         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2660         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2661         new_bfd_ref.
2662         * gdb_bfd.h (new_bfd_ref): New function.
2663
2664 2017-10-20  Pedro Alves  <palves@redhat.com>
2665
2666         * main.c (captured_command_loop): Add attribute noinline.
2667
2668 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2669
2670         * interps.c (struct interp_factory): Add constructor.
2671         (interp_factory_p): Remove typedef.
2672         (DEF_VEC_P(interp_factory_p)): Remove.
2673         (interpreter_factories): Change type to std::vector.
2674         (interp_factory_register): Adjust.
2675         (interp_lookup): Adjust.
2676         (interpreter_completer): Adjust.
2677
2678 2017-10-19  Tom Tromey  <tom@tromey.com>
2679
2680         * break-catch-syscall.c (catch_syscall_completer): Use
2681         std::string, gdb::unique_xmalloc_ptr.
2682
2683 2017-10-19  Tom Tromey  <tom@tromey.com>
2684
2685         * infcall.c (call_function_by_hand_dummy): Use std::string.
2686
2687 2017-10-19  Tom Tromey  <tom@tromey.com>
2688
2689         * mi/mi-main.c (mi_cmd_execute): Update.
2690         * top.h (prepare_execute_command): Return scoped_value_mark.
2691         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2692         Add move constructor.
2693         * top.c (prepare_execute_command): Return scoped_value_mark.
2694         (execute_command): Update.
2695
2696 2017-10-19  Pedro Alves  <palves@redhat.com>
2697
2698         * xml-support.c (xml_fetch_content_from_file): Check fread's
2699         return.
2700
2701 2017-10-19  Pedro Alves  <palves@redhat.com>
2702
2703         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2704         async.
2705         (handle_error_fd): New function.
2706         (ser_base_async): Add/delete an event loop file handler for
2707         error_fd.
2708
2709 2017-10-19  Pedro Alves  <palves@redhat.com>
2710
2711         * xml-support.c (xml_fetch_content_from_file): Don't read in
2712         chunks.  Instead use fseek to determine the file's size, and read
2713         it in one go.
2714
2715 2017-11-18  Keith Seitz  <keiths@redhat.com>
2716
2717         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2718         types.
2719         Add whitespace to front of type name.
2720
2721 2017-10-18  Keith Seitz  <keiths@redhat.com>
2722
2723         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2724         DW_AT_accessibility.
2725
2726 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2727
2728         * features/tic6x-c62x-linux.c: Remove.
2729
2730 2017-10-17  Tom Tromey  <tom@tromey.com>
2731
2732         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2733         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2734         (do_mixed_source_and_assembly): Likewise.
2735
2736 2017-10-17  Tom Tromey  <tom@tromey.com>
2737
2738         * regcache.c (regcache::xfer_part): Remove assertion.
2739
2740 2017-10-17  Pedro Alves  <palves@redhat.com>
2741
2742         * xml-support.c (xml_fetch_content_from_file): Call
2743         unique_ptr::release() instead unique_ptr::get() when passing
2744         through xrealloc.
2745
2746 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2747
2748         * regcache.c (regcache::xfer_part): Remove parameters read and
2749         write, add parameter is_raw.  All callers are updated.
2750
2751 2017-10-16  Keith Seitz  <keiths@redhat.com>
2752
2753         * c-typeprint.c (enum access_specifier): Moved here from
2754         c_type_print_base.
2755         (output_access_specifier): New function.
2756         (c_type_print_base): Consider typedefs when assessing
2757         whether access labels are needed.
2758         Use output_access_specifier as needed.
2759         Output access specifier for typedefs, if needed.
2760         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2761         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2762         fields.
2763         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2764         accessor macros.
2765
2766 2017-10-16  Tom Tromey  <tom@tromey.com>
2767
2768         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2769         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2770         * target.c (target_fileio_read_stralloc): Update.
2771         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2772         * target.h (target_fileio_read_stralloc): Return
2773         unique_xmalloc_ptr.
2774
2775 2017-10-16  Tom Tromey  <tom@tromey.com>
2776
2777         * xml-syscall.c (xml_init_syscalls_info): Update.
2778         * xml-support.c (xinclude_start_include): Update.
2779         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2780         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2781         (xml_fetch_content_from_file): Likewise.
2782         * osdata.c (get_osdata): Update.
2783         * target.h (target_read_stralloc, target_get_osdata): Return
2784         unique_xmalloc_ptr.
2785         * solib-aix.c (solib_aix_get_library_list): Update.
2786         * solib-target.c (solib_target_current_sos): Update.
2787         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2788         * xml-tdesc.c (fetch_available_features_from_target): Update.
2789         (target_fetch_description_xml): Update.
2790         (file_read_description_xml): Update.
2791         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2792         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2793         (remote_pid_to_exec_file): Update.
2794         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2795         (target_get_osdata): Likewise.
2796
2797 2017-10-16  Tom Tromey  <tom@tromey.com>
2798
2799         * remote.c (remote_register_number_and_offset): Use std::vector.
2800         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2801         (putpkt_binary): Use gdb::def_vector.
2802         (compare_sections_command): Use gdb::byte_vector.
2803
2804 2017-10-16  Tom Tromey  <tom@tromey.com>
2805
2806         * ppc-linux-nat.c (hwdebug_insert_point): Use
2807         gdb::unique_xmalloc_ptr, XDUP.
2808
2809 2017-10-16  Tom Tromey  <tom@tromey.com>
2810
2811         * probe.c (parse_probes): Use std::string.
2812         (info_probes_for_ops, enable_probes_command)
2813         (disable_probes_command): Remove cleanups.
2814
2815 2017-10-16  Tom Tromey  <tom@tromey.com>
2816
2817         * buildsym.c (block_compar): Remove.
2818         (end_symtab_get_static_block): Use std::vector.
2819
2820 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2821
2822         * memrange.h (struct mem_range): Define operator< and operator==.
2823         (mem_range_s): Remove.
2824         (DEF_VEC_O (mem_range_s)): Remove.
2825         (normalize_mem_ranges): Change parameter type to std::vector.
2826         * memrange.c (compare_mem_ranges): Remove.
2827         (normalize_mem_ranges): Change parameter type to std::vector,
2828         adjust to vector change.
2829         * exec.c (section_table_available_memory): Return vector, remove
2830         parameter.
2831         (section_table_read_available_memory): Adjust to std::vector
2832         change.
2833         * remote.c (remote_read_bytes): Adjust to std::vector
2834         change.
2835         * tracepoint.h (traceframe_available_memory): Change parameter
2836         type to std::vector.
2837         * tracepoint.c (traceframe_available_memory): Change parameter
2838         type to std::vector, adjust.
2839         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2840         std::vector change.
2841         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2842         unittests/memrange-selftests.c.
2843         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2844         * gdb/unittests/memrange-selftests.c: New file.
2845
2846 2017-10-16  Pedro Alves  <palves@redhat.com>
2847
2848         * elfread.c (probe_key_free): Rename range-for variable.
2849         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2850         (find_probe_by_pc, collect_probes): Rename range-for variable.
2851
2852 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2853
2854         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2855         * features/tic6x-c62x.c: Remove.
2856         * features/tic6x-c64x-linux.c: Remove.
2857         * features/tic6x-c64x.c: Remove.
2858         * features/tic6x-c64xp-linux.c: Remove.
2859         * features/tic6x-c64xp.c: Remove.
2860         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2861         initialize_tdesc_tic6x_*_linux functions.
2862         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2863         initialize_tdesc_tic6x_* functions.
2864
2865 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2866
2867         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2868         tic6x-c62x.
2869         * regformats/tic6x-c62x.dat: Remove.
2870         * regformats/tic6x-c64x.dat: Remove.
2871         * regformats/tic6x-c64xp.dat: Remove.
2872
2873 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2874
2875         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2876         (the !HAVE_LIBEXPAT version).
2877
2878 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2879
2880         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2881         const.
2882
2883 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2884
2885         * target.h: Include tracepoint.h.
2886         (enum trace_find_type): Move to tracepoint.h.
2887         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2888         * tracepoint.h: Don't include target.h
2889         (enum trace_find_type): Move from target.h.
2890         (parse_traceframe_info): Return a unique ptr.
2891         * tracepoint.c (current_traceframe_info): Change type to unique
2892         ptr.
2893         (free_traceframe_info): Remove.
2894         (clear_traceframe_info): Don't manually free
2895         current_traceframe_info.
2896         (free_result): Remove.
2897         (parse_traceframe_info): Return a unique ptr.
2898         (get_traceframe_info): Adjust to unique ptr.
2899         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2900         * remote.c (remote_traceframe_info): Return a unique ptr.
2901         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2902         ptr.
2903         * target-debug.h (target_debug_print_traceframe_info_up): New
2904         macro.
2905         * target-delegates.c: Regenerate.
2906
2907 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2908
2909         * memrange.h (struct mem_range): Add constructors.
2910         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2911         std::vector<mem_range>.
2912         * tracepoint.c (free_traceframe_info): Don't manually free
2913         vector.
2914         (traceframe_info_start_memory): Adjust to vector change.
2915         (traceframe_available_memory): Likewise.
2916         * tracefile-tfile.c (build_traceframe_info): Likewise.
2917         * ctf.c (ctf_traceframe_info): Likewise.
2918
2919 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2920
2921         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2922         std::vector<int>.
2923         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2924         (traceframe_info_start_tvar): Adjust to vector change.
2925         (parse_traceframe_info): Allocate with new.
2926         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2927         vector change.
2928         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2929         change.
2930         tfile_traceframe_info): Allocate with new.
2931         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2932         change.
2933
2934 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2935
2936         * tracepoint.c (traceframe_info): Rename to...
2937         (current_traceframe_info): ...this.
2938         (clear_traceframe_info): Adjust.
2939         (get_traceframe_info): Adjust.
2940
2941 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2942
2943         * nat/linux-osdata.c: Include algorithm.
2944         (compare_processes): Remove.
2945         (struct pid_pgid_entry): New struct.
2946         (linux_xfer_osdata_processgroups): Use std::vector instead of
2947         XNEWVEC.
2948
2949 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2950
2951         * objfiles.h: Don't include symfile.h.
2952         (struct partial_symbol): Remove forward-declaration.
2953         (struct objfile) <global_psymbols, static_psymbols>: Change type
2954         to std::vector<partial_symbol *>.
2955         * objfiles.c (objfile::objfile): Don't memset those fields.
2956         (objfile::~objfile): Don't free those fields.
2957         * psympriv.h (struct psymbol_allocation_list): Remove
2958         forward-declaration.
2959         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2960         to std::vector.
2961         (start_psymtab_common): Change parameters to std::vector.
2962         * psymtab.c: Include algorithm.
2963         (require_partial_symbols): Call shrink_to_fit.
2964         (find_pc_sect_psymbol): Adjust to vector change.
2965         (match_partial_symbol): Likewise.
2966         (lookup_partial_symbol): Likewise.
2967         (psym_relocate): Likewise.
2968         (dump_psymtab): Likewise.
2969         (recursively_search_psymtabs): Likewise.
2970         (compare_psymbols): Remove.
2971         (sort_pst_symbols): Adjust to vector change.
2972         (start_psymtab_common): Likewise.
2973         (end_psymtab_common): Likewise.
2974         (psymbol_bcache_full): De-constify return value.
2975         (add_psymbol_to_bcache): Likewise.
2976         (extend_psymbol_list): Remove.
2977         (append_psymbol_to_list): Adjust to vector change.
2978         (add_psymbol_to_list): Likewise.
2979         (init_psymbol_list): Likewise.
2980         (maintenance_info_psymtabs): Likewise.
2981         (maintenance_check_psymtabs): Likewise.
2982         * symfile.h (struct psymbol_allocation_list): Remove.
2983         * symfile.c (reread_symbols): Adjust to vector change.
2984         * dbxread.c (start_psymtab): Change type of parameters.
2985         (dbx_symfile_read): Adjust to vector change.
2986         (read_dbx_symtab): Likewise.
2987         (start_psymtab): Change type of parameters.
2988         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2989         (create_partial_symtab): Likewise.
2990         (add_partial_symbol): Likewise.
2991         (write_one_signatured_type): Likewise.
2992         (recursively_write_psymbols): Likewise.
2993         * mdebugread.c (parse_partial_symbols): Likewise.
2994         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2995         (scan_xcoff_symtab): Adjust to vector change.
2996         (xcoff_initial_scan): Likewise.
2997
2998 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2999
3000         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3001
3002 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3003
3004         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3005         Remove s390x-*-expedite, add s390x-expedite.
3006
3007 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3008
3009         * features/s390-gs-linux64.c: Regenerated.
3010         * features/s390x-gs-linux64.c: Regenerated.
3011
3012 2017-10-13  Tom Tromey  <tom@tromey.com>
3013
3014         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3015         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3016         delete.
3017         * symfile.c (symbol_file_add_with_addrs): Use new.
3018         (symbol_file_add_separate): Update comment.
3019         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3020         * jit.c (jit_object_close_impl): Use new.
3021         (jit_unregister_code): Use delete.
3022         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3023         (~objfile): Rename from free_objfile.
3024         (free_objfile_separate_debug, do_free_objfile_cleanup)
3025         (free_all_objfiles, objfile_purge_solibs): Use delete.
3026         * objfiles.h (struct objfile): Add constructor and destructor.
3027         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3028         (allocate_objfile, free_objfile): Don't declare.
3029         (struct objstats): Add initializers.
3030
3031 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3032
3033         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3034         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3035         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3036         * gdbarch.h: Regenerate.
3037         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3038         Adjust comment.
3039         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3040         (i386_displaced_step_fixup): Adjust comment.
3041         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3042
3043 2017-10-12  Tom Tromey  <tom@tromey.com>
3044
3045         * prologue-value.h (pv_area::store_would_trash): Return bool.
3046         (pv_area::find_reg): Likewise.
3047         * prologue-value.c (pv_area::store_would_trash): Return bool.
3048         (pv_area::find_reg): Likewise.
3049
3050 2017-10-12  Tom Tromey  <tom@tromey.com>
3051
3052         * s390-linux-tdep.c (s390_store, s390_load)
3053         (s390_check_for_saved, s390_analyze_prologue): Update.
3054         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3055         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3056         * prologue-value.h (class pv_area): Move from prologue-value.c.
3057         Change names of members.  Add constructor, destructor, member
3058         functions.
3059         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3060         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3061         (pv_area_fetch, pv_area_scan): Don't declare.
3062         * prologue-value.c (struct pv_area::area_entry): Now member of
3063         pv_area.
3064         (struct pv_area): Move to prologue-value.h.
3065         (pv_area::pv_area): Rename from make_pv_area.
3066         (pv_area::~pv_area): Rename from free_pv_area.
3067         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3068         (clear_entries, find_entry, overlaps, store_would_trash, store)
3069         (fetch, find_reg, scan): Now member of pv_area.
3070         Remove "area" argument.  Update.
3071         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3072         Update.
3073         * mn10300-tdep.c (push_reg, check_for_saved)
3074         (mn10300_analyze_prologue): Update.
3075         * mep-tdep.c (is_arg_spill, check_for_saved)
3076         (mep_analyze_prologue): Update.
3077         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3078         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3079         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3080         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3081         Update.
3082         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3083         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3084
3085 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3086
3087         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3088         * linux-nat.c (linux_nat_delete_thread): New variable.
3089         (lwp_free): Invoke linux_nat_delete_thread if set.
3090         (linux_nat_set_delete_thread): New function.
3091         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3092         thread delete callback.
3093         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3094         (_initialize_arm_linux_nat): Assign thread delete callback.
3095         * s390-linux-nat.c (s390_delete_thread): New function.
3096         (_initialize_s390_nat): Assign thread delete callback.
3097         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3098         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3099         function.
3100         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3101         declaration.
3102         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3103         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3104
3105 2017-10-09  Tom Tromey  <tom@tromey.com>
3106
3107         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3108         std::string.
3109         * tui/tui-layout.c (enum tui_status): Use std::string.
3110
3111 2017-10-11  Tom Tromey  <tom@tromey.com>
3112
3113         * gdbthread.h (thread_command): Constify.
3114         * inferior.h (detach_command): Constify.
3115         * top.h (set_history, show_history): Constify.
3116         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3117         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3118         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3119         * printcmd.c (set_command): Constify.
3120         (non_const_set_command): New function.
3121         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3122         * breakpoint.c (enable_command, disable_command, delete_command)
3123         (catch_command, tcatch_command, set_breakpoint_cmd)
3124         (show_breakpoint_cmd): Constify.
3125         * macrocmd.c (macro_command): Constify.
3126         * infcmd.c (unset_command, kill_command, detach_command)
3127         (info_proc_cmd): Constify.
3128         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3129         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3130         (info_auto_load_cmd): Constify.
3131         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3132         (unset_tdesc_cmd): Constify.
3133         * ada-lang.c (set_ada_command, show_ada_command)
3134         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3135         * guile/guile.c (set_guile_command, show_guile_command)
3136         (info_guile_command): Constify.
3137         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3138         Constify.
3139         * skip.c (skip_command): Constify.
3140         * compile/compile.c (_initialize_compile): Constify.
3141         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3142         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3143         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3144         (maint_btrace_pt_show_cmd): Constify.
3145         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3146         Constify.
3147         * python/python.c (user_show_python, user_set_python): Constify.
3148         * mips-tdep.c (set_mips_command, show_mips_command)
3149         (set_mipsfpu_command): Constify.
3150         * record-btrace.c (cmd_record_btrace_start)
3151         (cmd_set_record_btrace, cmd_show_record_btrace)
3152         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3153         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3154         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3155         Constify.
3156         * symfile.c (overlay_command): Constify.
3157         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3158         * cli/cli-logging.c (set_logging_command, show_logging_command):
3159         Constify.
3160         * cli/cli-dump.c (dump_command, append_command)
3161         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3162         (tekhex_dump_command, binary_dump_command)
3163         (binary_append_command): Constify.
3164         * cli/cli-decode.c (struct cmd_list_element): Change type of
3165         "fun".
3166         * cli/cli-cmds.c (info_command, show_command, set_debug)
3167         (show_debug): Constify.
3168         (show_command): Add non-const overload.
3169         * top.c (set_history, show_history): Constify.
3170         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3171         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3172         * target.c (target_command): Constify.
3173         * sparc64-tdep.c (info_adi_command): Constify.
3174         * record-full.c (cmd_record_full_start): Constify.
3175         (set_record_full_command): Constify.  Fix typo.
3176         (show_record_full_command): Constify.
3177         * thread.c (thread_command, thread_apply_command): Constify.
3178         * memattr.c (dummy_cmd): Constify.
3179         * value.c (function_command): Constify.
3180         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3181         * probe.c (info_probes_command): Constify.
3182         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3183         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3184         (show_thread_cmd, set_thread_default_cmd)
3185         (show_thread_default_cmd): Constify.
3186         (check_empty): Constify.
3187         * tracepoint.c (tfind_command): Constify.
3188         * cp-support.c (maint_cplus_command): Constify.
3189         * windows-tdep.c (info_w32_command): Constify.
3190         * record.c (cmd_record_start, set_record_command)
3191         (show_record_command, info_record_command, cmd_record_goto):
3192         Constify.
3193         * ravenscar-thread.c (set_ravenscar_command)
3194         (show_ravenscar_command): Constify.
3195         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3196         Constify.
3197         (add_internal_problem_command): Remove casts.
3198         * arc-tdep.c (maintenance_print_arc_command): Constify.
3199         * valprint.c (set_print, show_print, set_print_raw)
3200         (show_print_raw): Constify.
3201         * maint.c (maintenance_command, maintenance_info_command)
3202         (maintenance_print_command, maintenance_set_cmd)
3203         (maintenance_show_cmd, set_per_command_cmd)
3204         (show_per_command_cmd, maintenance_check_command): Constify.
3205         * language.c (set_check, show_check): Constify.
3206         * typeprint.c (show_print_type, set_print_type): Constify.
3207         * go32-nat.c (go32_info_dos_command): Constify.
3208
3209 2017-10-11  Tom Tromey  <tom@tromey.com>
3210
3211         * breakpoint.c (prepare_re_set_context): Remove.
3212         (breakpoint_re_set_one): Update.  Don't use cleanups.
3213         (breakpoint_re_set): Use scoped_restore, std::string, and
3214         scoped_restore_current_language.
3215
3216 2017-10-11  Tom Tromey  <tom@tromey.com>
3217
3218         * breakpoint.c (commands_command_1): Use std::string.
3219         (cleanup_executing_breakpoints): Remove.
3220         (bpstat_do_actions_1): Use scoped_restore.
3221         (bpstat_check_watchpoint): Use std::string.
3222         (decode_static_tracepoint_spec): Likewise.
3223         (break_range_command): Likewise.
3224         (watch_command_1): Likewise.
3225         (compare_breakpoints): Change argument types.
3226         (clear_command): Use std::vector.
3227         (cleanup_executing_breakpoints): Remove.
3228         (update_global_location_list): Use unique_xmalloc_ptr.
3229         (strace_command): Remove unused declaration.
3230
3231 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3232
3233         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3234         * NEWS: Mention new FreeBSD/arm native configuration.
3235         * configure.host: Add arm*-*-freebsd*.
3236         * configure.nat: Likewise.
3237         * arm-fbsd-nat.c: New file.
3238
3239 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3240
3241         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3242         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3243         * NEWS: Mention new FreeBSD/arm target.
3244         * configure.tgt: Add arm*-*-freebsd*.
3245         * arm-fbsd-tdep.c: New file.
3246         * arm-fbsd-tdep.h: New file.
3247
3248 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3249
3250         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3251         `gdbarch_elfcore_write_linux_prpsinfo'.
3252         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3253         method.
3254         (elf_internal_linux_prpsinfo): Remove declaration.
3255         * gdbarch.h: Regenerate.
3256         * gdbarch.c: Regenerate.
3257
3258 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3259
3260         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3261         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3262
3263 2017-10-11  Pedro Alves  <palves@redhat.com>
3264
3265         * breakpoint.c (reattach_breakpoints): Delete.
3266         * breakpoint.h (reattach_breakpoints): Delete.
3267
3268 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3269
3270         * symfile.c (registered_sym_fns): Make struct, not typedef.
3271         (DEF_VEC_O (registered_sym_fns)): Remove.
3272         (symtab_fns): Change type to std::vector.
3273         (add_symtab_fns): Adjust.
3274         (find_sym_fns): Adjust.
3275
3276 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3277
3278         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3279         * arc-tdep.h (arc_arch_is_em): New function.
3280         (arc_arch_is_hs): Likewise.
3281
3282 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3283
3284         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3285         parentheses in the declaration.
3286         (macro_lookup_inclusion): Likewise.
3287         (macro_lookup_definition): Likewise.
3288         * p-lang.h (pascal_builtin_types): Likewise.
3289         * tui/tui-data.c (tui_win_list): Likewise.
3290         * tui/tui-data.h (tui_win_list): Likewise.
3291         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3292
3293 2017-10-11  Mark Rages  <markrages@gmail.com>
3294
3295         * target-memory.c (block_boundaries): Fix for block address not
3296         aligned on block size.
3297
3298 2017-10-10  Pedro Alves <palves@redhat.com>
3299             Tom Tromey  <tom@tromey.com>
3300
3301         * breakpoint.c (struct captured_breakpoint_query_args)
3302         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3303         (print_breakpoint): New.
3304         * breakpoint.h (print_breakpoint): Declare.
3305         * common/common-exceptions.h (enum return_reason): Remove
3306         references to catch_exceptions.
3307         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3308         Delete.
3309         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3310         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3311         * gdb.h: Delete.
3312         * gdbthread.h (thread_select): Declare.
3313         * mi/mi-cmd-break.c: Don't include gdb.h.
3314         (breakpoint_notify): Use print_breakpoint.
3315         * mi/mi-cmd-catch.c: Don't include gdb.h.
3316         * mi/mi-interp.c: Don't include gdb.h.
3317         (mi_print_breakpoint_for_event): New.
3318         (mi_breakpoint_created, mi_breakpoint_modified): Use
3319         mi_print_breakpoint_for_event.
3320         * mi/mi-main.c: Don't include gdb.h.
3321         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3322         thread_select instead of gdb_thread_select.
3323         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3324         of using gdb_list_thread_ids.
3325         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3326         FILEIO_ENOSYS here.
3327         (remote_fileio_request): Use TRY/CATCH instead of
3328         catch_exceptions.
3329         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3330         (symbol_file_add_from_memory_wrapper): Delete.
3331         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3332         * thread.c: Don't include gdb.h.
3333         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3334         (thread_alive): Use thread_select.
3335         (do_captured_thread_select): Delete, parts salvaged as ...
3336         (thread_select): ... this new function.
3337         (gdb_thread_select): Delete.
3338
3339 2017-10-10  Pedro Alves  <palves@redhat.com>
3340             Tom Tromey  <tom@tromey.com>
3341
3342         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3343         and reverse logic.
3344         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3345         No longer macros.  Instead ...
3346         (enum wp_check_result): They're now values of this new
3347         enumeration.
3348         (watchpoint_check): Change return type to wp_check_result and
3349         parameter type to bpstat.
3350         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3351         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3352         catch_errors.  Reverse logic of watchpoint_check call.
3353         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3354         pointer as parameter.
3355         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3356         * common/common-exceptions.c (throw_exception_sjlj): Update
3357         comments to avoid mentioning catch_errors.
3358         * exceptions.c (catch_errors): Delete.
3359         * exceptions.h: Update comments to avoid mentioning catch_errors.
3360         (catch_errors_ftype, catch_errors): Delete.
3361         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3362         (hook_stop_stub): Delete.
3363         (restore_selected_frame): Change return type to void, and
3364         parameter type to const frame_id &.
3365         (restore_infcall_control_state): Use TRY/CATCH instead of
3366         catch_errors.
3367         * main.c (captured_command_loop): Return void and remove
3368         parameter.  Remove references to catch_errors.
3369         (captured_main): Use TRY/CATCH instead of catch_errors.
3370         * objc-lang.c (objc_submethod_helper_data)
3371         (find_objc_msgcall_submethod_helper): Delete.
3372         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3373         catch_errors.
3374         * record-full.c (record_full_message): Return void.
3375         (record_full_message_args, record_full_message_wrapper): Delete.
3376         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3377         instead of catch_errors.
3378         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3379         parameter type to int.
3380         * solib-darwin.c (open_symbol_file_object): Ditto.
3381         * solib-dsbt.c (open_symbol_file_object): Ditto.
3382         * solib-frv.c (open_symbol_file_object): Ditto.
3383         * solib-svr4.c (open_symbol_file_object): Ditto.
3384         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3385         * solib.c (update_solib_list): Use TRY/CATCH instead of
3386         catch_errors.
3387         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3388         Change type.
3389         * symmisc.c (struct print_symbol_args): Remove.
3390         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3391         (print_symbol): Change type.
3392         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3393         and remove parameters.
3394         (catch_errors): New.
3395         (get_windows_debug_event): Adjust.
3396
3397 2017-10-09  Tom Tromey  <tom@tromey.com>
3398
3399         * mi/mi-main.c (free_splay_tree): Remove.
3400         (list_available_thread_groups): Use splay_tree_up.
3401         * common/gdb_splay_tree.h: New file.
3402
3403 2017-10-09  Tom Tromey  <tom@tromey.com>
3404
3405         * mi/mi-main.c (do_nothing): Remove.
3406         (list_available_thread_groups): Update.
3407
3408 2017-10-09  Pedro Alves  <palves@redhat.com>
3409
3410         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3411         reading registers when switching context.
3412
3413 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3414
3415         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3416         (fbsd_convert_siginfo): Likewise.
3417         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3418
3419 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3420
3421         * configure.ac (try_guile_versions): Remove guile-2.2.
3422         * configure: Regenerate.
3423
3424 2017-10-09  Tom Tromey  <tom@tromey.com>
3425
3426         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3427         (COMPILE.pre): Use $(CXX).
3428
3429 2017-10-09  Pedro Alves  <palves@redhat.com>
3430
3431         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3432         Use bool.
3433         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3434         * cp-support.h (cp_remove_params): Now returns a
3435         gdb::unique_xmalloc_ptr.
3436         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3437         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3438         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3439         returning a gdb::unique_xmalloc_ptr.
3440         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3441         * stack.c (find_frame_funname): Adjust to cp_remove_params
3442         returning a gdb::unique_xmalloc_ptr.
3443
3444 2017-10-08  Tom Tromey  <tom@tromey.com>
3445
3446         * dwarf2read.c (dwarf2_get_dwz_file): Use
3447         gdb::unique_xmalloc_ptr.
3448         (find_slot_in_mapped_hash): Likewise.
3449         (dwarf2_physname): Likewise.
3450         (create_dwo_unit_in_dwp_v1): Use std::string.
3451         (create_dwo_unit_in_dwp_v2): Likewise.
3452         (lookup_dwo_cutu): Likewise.
3453         (inherit_abstract_dies): Use std::vector.
3454         (read_array_type): Likewise.
3455         (dwarf_decode_macros): Remove unused declaration.
3456         (unsigned_int_compar): Remove.
3457         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3458         (psymtabs_addrmap_cleanup): Remove.
3459
3460 2017-10-08  Tom Tromey  <tom@tromey.com>
3461
3462         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3463         * frame.h (frame_cleanup_after_sniffer): Declare.
3464         (frame_prepare_for_sniffer): Return void.
3465         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3466         type of argument.
3467         (frame_prepare_for_sniffer): Return void.
3468
3469 2017-10-08  Tom Tromey  <tom@tromey.com>
3470
3471         * utils.h (make_cleanup_value_free): Remove.
3472         * utils.c (do_value_free, struct cleanup): Remove.
3473         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3474         Use gdb_value_up.
3475         * value.h (struct value_deleter): New.
3476         (gdb_value_up): New typedef.
3477
3478 2017-10-08  Tom Tromey  <tom@tromey.com>
3479
3480         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3481         (make_cleanup_free_search_symbols): Remove.
3482         (search_symbols): Return std::vector.
3483         (symbol_search::compare_search_syms): Now member of
3484         symbol_search.  Change arguments.
3485         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3486         (symtab_symbol_info, rbreak_command): Update.
3487         * symtab.h (struct symbol_search) <next>: Remove.
3488         Add constructors.
3489         (symbol_search::operator<): New function.
3490         (symbol_search::operator==): New function.
3491         (search_symbols): Remove std::vector.
3492         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3493         (symbol_search::compare_search_syms): Declare.
3494
3495 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3496
3497         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3498         arch/aarch64-insn.o.
3499         Remove one rule.
3500         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3501
3502 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3503
3504         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3505         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3506         arch/arm-linux.o respectively.
3507         * configure.tgt: Likewise.
3508
3509 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3510
3511         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3512         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3513
3514 2017-10-06  Pedro Alves  <palves@redhat.com>
3515
3516         * windows-nat.c: Include <algorithm>.
3517
3518 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3519
3520         * configure.tgt (i386_tobjs): New variable.
3521         (amd64_tobjs): New variable.
3522         Set $cpu_obs and $os_obs.
3523
3524 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3525
3526         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3527         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3528         (clean): Remove object files and dependency files.
3529         (distclean): Remove the directory.
3530         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3531         * configure: Re-generated.
3532         * configure.tgt: Replace amd64.o with arch/amd64.o.
3533
3534 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3535
3536         PR build/22188
3537         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3538         and SETEND.
3539
3540 2017-10-05  Pedro Alves  <palves@redhat.com>
3541
3542         * linux-nat.c (linux_child_follow_fork): When following the parent
3543         and detaching the child, consult the parent thread's architecture
3544         instead of the child's.
3545
3546 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3547
3548         * ax.h: Do not include "doublest.h".
3549         (union agent_val): Remove.
3550
3551 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3552
3553         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3554         (decimal_to_string): Return std::string object.
3555         (decimal_from_string): Accept std::string object.  Return bool.
3556         (decimal_from_integral, decimal_from_doublest): Remove.
3557         (decimal_from_longest): Add prototype.
3558         (decimal_from_ulongest): Likewise.
3559         (decimal_to_longest): Likewise.
3560         (decimal_from_doublest): Likewise.
3561         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3562         (MAX_DECIMAL_STRING): Move here.
3563         (decimal_to_string): Return std::string object.
3564         (decimal_from_string): Accept std::string object.  Return bool.
3565         (decimal_from_integral): Remove, replace by ...
3566         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3567         (decimal_to_longest): New function.
3568         (decimal_from_floating): Remove, replace by ...
3569         (decimal_from_doublest): ... this new function.
3570         (decimal_to_doublest): Update to new decimal_to_string interface.
3571
3572         * value.c (unpack_long): Use decimal_to_longest.
3573         * valops.c (value_cast): Use decimal_from_doublest instead of
3574         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3575         decimal_from_integral.
3576         * valarith.c (value_args_as_decimal): Likewise.
3577         * valprint.c (print_decimal_floating): Update to new
3578         decimal_to_string interface.
3579         * printcmd.c (printf_decfloat): Likewise.
3580         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3581
3582 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3583
3584         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3585         * gdbtypes.c: Include "floatformat.h".
3586         * value.c: Likewise.
3587         * m68k-tdep.c: Likewise.
3588
3589         * findvar.c: Do not include "floatformat.h".
3590         * amd64-darwin-tdep.c: Likewise.
3591         * arm-linux-tdep.c: Likewise.
3592         * i386-darwin-tdep.c: Likewise.
3593         * i387-tdep.c: Likewise.
3594         * m68k-linux-tdep.c: Likewise.
3595         * mep-tdep.c: Likewise.
3596         * mips-tdep.c: Likewise.
3597         * nios2-tdep.c: Likewise.
3598         * s390-linux-tdep.c: Likewise.
3599         * sparc-obsd-tdep.c: Likewise.
3600         * sparc-tdep.c: Likewise.
3601         * sparc64-tdep.c: Likewise.
3602         * spu-tdep.c: Likewise.
3603         * tic6x-tdep.c: Likewise.
3604         * tilegx-tdep.c: Likewise.
3605         * vax-tdep.c: Likewise.
3606         * xstormy16-tdep.c: Likewise.
3607         * xtensa-tdep.c: Likewise.
3608
3609         * top.c: Do not include "doublest.h".
3610         * aarch64-tdep.c: Likewise.
3611         * alpha-tdep.c: Likewise.
3612         * arm-linux-tdep.c: Likewise.
3613         * m68k-linux-tdep.c: Likewise.
3614         * tilegx-tdep.c: Likewise.
3615         * xstormy16-tdep.c: Likewise.
3616
3617 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3618
3619         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3620         (mipsn32_fbsd_sigframe): Define.
3621         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3622         for FreeBSD/mipsn32.
3623
3624 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3625
3626         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3627         AT_HWCAP.
3628
3629 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3630
3631         * MAINTAINERS (Misc): Update my email address.
3632
3633 2017-10-04  Pedro Alves  <palves@redhat.com>
3634
3635         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3636         it instead of target_gdbarch.
3637         (get_remote_state, get_remote_packet_size): Adjust
3638         get_remote_arch_state calls, passing down target_gdbarch
3639         explicitly.
3640         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3641         'gdbarch' and use it instead of target_gdbarch.
3642         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3643         passing down target_gdbarch explicitly.
3644         (struct stop_reply) <arch>: New field.
3645         (remote_parse_stop_reply): Use the stopped thread's architecture,
3646         not the current inferior's.  Save the architecture in the
3647         stop_reply.
3648         (process_stop_reply): Use the stop reply's architecture.
3649         (process_g_packet, remote_fetch_registers)
3650         (remote_prepare_to_store, store_registers_using_G)
3651         (remote_store_registers): Adjust get_remote_arch_state calls,
3652         using the regcache's architecture.
3653         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3654         passing down target_gdbarch explicitly.
3655         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3656         beneath instead of calling target_gdbarch.
3657         * target.c (default_thread_architecture): Use the specified
3658         inferior's architecture, instead of the current inferior's
3659         architecture (via target_gdbarch).
3660
3661 2017-10-04  Pedro Alves  <palves@redhat.com>
3662
3663         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3664         case.
3665         (regcache_print): Handle !target_has_registers here instead.
3666
3667 2017-10-04  Pedro Alves  <palves@redhat.com>
3668
3669         * frame.c (create_test_frame): Delete.
3670         * frame.h (create_test_frame): Delete.
3671         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3672         (class regcache_test): Delete.
3673         (test_target_has_registers, test_target_has_stack)
3674         (test_target_has_memory, test_target_prepare_to_store)
3675         (test_target_store_registers): New functions.
3676         (test_target_ops): New class.
3677         (register_to_value_test): Error out if there's already a
3678         process_stratum (or higher) target pushed.  Create a fuller mock
3679         environment, with mock target_ops, inferior, address space, thread
3680         and inferior_ptid.
3681         * progspace.c (struct address_space): Move to ...
3682         * progspace.h (struct address_space): ... here.
3683         * regcache.h (regcache::~regcache, regcache::raw_write)
3684         [GDB_SELF_TEST]: No longer virtual.
3685
3686 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3687
3688         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3689
3690 2017-10-04  Pedro Alves  <palves@redhat.com>
3691
3692         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3693         out of 'between TRY and CATCH'.
3694
3695 2017-10-04  Pedro Alves  <palves@redhat.com>
3696
3697         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3698         * common/common-exceptions.h (TRY): Open an outermost scope.
3699         Expand intro comment.
3700         (CATCH): Reindent.
3701         (END_CATCH): Close the outermost scope.
3702         * completer.c (complete_line_internal): Add missing END_CATCH.
3703
3704 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3705
3706         * NEWS (Changes since GDB 8.0): Add entry about new
3707         'set-cwd-on-gdbserver' feature.
3708         (New remote packets): Add entry for QSetWorkingDir.
3709         * common/common-inferior.h (set_inferior_cwd): New prototype.
3710         * infcmd.c (set_inferior_cwd): Remove "static".
3711         (show_cwd_command): Expand text to include remote debugging.
3712         * remote.c: Add PACKET_QSetWorkingDir.
3713         (remote_protocol_features) <QSetWorkingDir>: New entry for
3714         PACKET_QSetWorkingDir.
3715         (extended_remote_set_inferior_cwd): New function.
3716         (extended_remote_create_inferior): Call
3717         "extended_remote_set_inferior_cwd".
3718         (_initialize_remote): Call "add_packet_config_cmd" for
3719         QSetWorkingDir.
3720
3721 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3722
3723         * NEWS (New commands): Mention "set/show cwd".
3724         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3725         "cd" command's help text.
3726         * common/common-inferior.h (get_inferior_cwd): New prototype.
3727         * infcmd.c (inferior_cwd_scratch): New global variable.
3728         (set_inferior_cwd): New function.
3729         (get_inferior_cwd): Likewise.
3730         (set_cwd_command): Likewise.
3731         (show_cwd_command): Likewise.
3732         (_initialize_infcmd): Add "set/show cwd" commands.
3733         * inferior.h (class inferior) <cwd>: New field.
3734         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3735         (fork_inferior): Change inferior's cwd before its execution.
3736         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3737         to CreateProcess.
3738
3739 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3740
3741         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3742         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3743         (COMMON_OBS): Add gdb_tilde_expand.o.
3744         * common/gdb_tilde_expand.c: New file.
3745         * common/gdb_tilde_expand.h: Likewise.
3746
3747 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3748
3749         * gdbarch.sh (objfile): Remove duplicate declaration.
3750         * gdbarch.h: Regenerate.
3751
3752 2017-10-03  Tom Tromey  <tom@tromey.com>
3753
3754         * utils.c (internal_vproblem): Use string_vprintf.
3755
3756 2017-10-03  Tom Tromey  <tom@tromey.com>
3757
3758         * printcmd.c (info_symbol_command): Use std::string.
3759
3760 2017-10-03  Tom Tromey  <tom@tromey.com>
3761
3762         * top.c (gdb_safe_append_history): Use std::string.
3763
3764 2017-10-03  Tom Tromey  <tom@tromey.com>
3765
3766         * event-top.c (stdin_event_handler): Update.
3767         * main.c (captured_main_1): Update.
3768         * top.h (make_delete_ui_cleanup): Remove.
3769         (struct ui): Add constructor and destructor.
3770         (new_ui, delete_ui): Remove.
3771         * top.c (make_delete_ui_cleanup): Remove.
3772         (new_ui_command): Use std::unique_ptr.
3773         (delete_ui_cleanup): Remove.
3774         (ui::ui): Rename from new_ui.  Update.
3775         (free_ui): Remove.
3776         (ui::~ui): Rename from delete_ui.  Update.
3777
3778 2017-10-03  Tom Tromey  <tom@tromey.com>
3779
3780         * symfile.c (load_progress): Use gdb::byte_vector.
3781
3782 2017-10-03  Tom Tromey  <tom@tromey.com>
3783
3784         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3785         declaration.
3786         * printcmd.c (x_command): Remove unused declaration.
3787         * symfile.c (symbol_file_command): Remove unused declaration.
3788
3789 2017-10-03  Tom Tromey  <tom@tromey.com>
3790
3791         * utils.c (internal_vproblem): Use std::string.
3792         (defaulted_query): Likewise.
3793
3794 2017-10-03  Tom Tromey  <tom@tromey.com>
3795
3796         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3797         * top.c (execute_command_to_string): Update.
3798         * utils.c (make_cleanup_restore_page_info): Remove.
3799         (do_restore_page_info_cleanup): Remove.
3800         (set_batch_flag_and_restore_page_info):
3801         New.
3802         (make_cleanup_restore_page_info): Remove.
3803         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3804         (~set_batch_flag_and_restore_page_info): New
3805         (make_cleanup_restore_uinteger): Remove.
3806         (make_cleanup_restore_integer): Remove.
3807         (struct restore_integer_closure): Remove.
3808         (restore_integer): Remove.
3809         * utils.h (struct set_batch_flag_and_restore_page_info): New
3810         class.
3811         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3812         (make_cleanup_restore_page_info): Remove.
3813         (make_cleanup_restore_uinteger) Remove.
3814         (make_cleanup_restore_integer) Remove.
3815
3816 2017-10-03  Tom Tromey  <tom@tromey.com>
3817
3818         * record-full.h (record_full_gdb_operation_disable_set): Return
3819         scoped_restore_tmpl<int>.
3820         * infrun.c (adjust_pc_after_break): Update.
3821         (handle_signal_stop): Update.
3822         * record-full.c (record_full_gdb_operation_disable_set): Return
3823         scoped_restore_tmpl<int>.
3824         (record_full_wait_1, record_full_insert_breakpoint)
3825         (record_full_remove_breakpoint, record_full_save)
3826         (record_full_goto_insn): Update.
3827
3828 2017-10-02  Tom Tromey  <tom@tromey.com>
3829
3830         PR rust/22236:
3831         * rust-lang.c (rust_val_print_str): New function.
3832         (val_print_struct): Call it.
3833         (rust_subscript): Preserve name of slice type.
3834
3835 2017-10-02  Tom Tromey  <tom@tromey.com>
3836
3837         * rust-lang.c (rust_subscript): Handle slices in
3838         EVAL_AVOID_SIDE_EFFECTS case.
3839
3840 2017-10-02  Tom Tromey  <tom@tromey.com>
3841
3842         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3843
3844 2017-10-02  Tom Tromey  <tom@tromey.com>
3845
3846         * rust-lang.h (rust_slice_type): Add "extern".
3847
3848 2017-10-02  Tom Tromey  <tom@tromey.com>
3849             Pedro Alves  <palves@redhat.com>
3850
3851         * ada-lang.h (ada_exc_info::operator<): Make const.
3852         (ada_exc_info::operator==): Make const.
3853         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3854         Make const.
3855
3856 2017-09-29  Tom Tromey  <tom@tromey.com>
3857
3858         * target.c (read_whatever_is_readable): Change type of "result".
3859         Update.
3860         (free_memory_read_result_vector): Remove.
3861         (read_memory_robust): Change return type.  Update.
3862         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3863         bin2hex, std::string.
3864         * target.h (memory_read_result_s): Remove typedef.
3865         (free_memory_read_result_vector): Remove.
3866         (read_memory_robust): Return std::vector.
3867
3868 2017-09-29  Tom Tromey  <tom@tromey.com>
3869
3870         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3871
3872 2017-09-29  Tom Tromey  <tom@tromey.com>
3873
3874         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3875         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3876         operator< and operator==.
3877         (ada_exceptions_list): Return a std::vector.
3878         * ada-lang.c (ada_exc_info::operator<): Rename from
3879         compare_ada_exception_info.
3880         (ada_exc_info::operator==): New.
3881         (sort_remove_dups_ada_exceptions_list): Change type of
3882         "exceptions".
3883         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3884         (ada_add_global_exceptions): Likewise.
3885         (ada_exceptions_list_1): Return a std::vector.
3886         (ada_exceptions_list): Likewise.
3887
3888 2017-09-29  Tom Tromey  <tom@tromey.com>
3889
3890         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3891         'std::set *'.
3892         (print_one_inferior): Update.
3893         (free_vector_of_ints): Remove.
3894         (list_available_thread_groups): Change "ids" to std::set.
3895         (mi_cmd_list_thread_groups): Update.
3896         (struct collect_cores_data) <core>: Now a std::set.
3897         (collect_cores): Update.
3898         (unique): Remove.
3899         (print_one_inferior): Update.
3900
3901 2017-09-29  Tom Tromey  <tom@tromey.com>
3902
3903         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3904         (mi_execute_async_cli_command): Likewise.
3905         (mi_cmd_trace_frame_collected): Use field_fmt.
3906
3907 2017-09-29  Tom Tromey  <tom@tromey.com>
3908
3909         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3910         gdb::byte_vector.
3911
3912 2017-09-29  Tom Tromey  <tom@tromey.com>
3913
3914         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3915
3916 2017-09-29  Tom Tromey  <tom@tromey.com>
3917
3918         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3919
3920 2017-09-29  Tom Tromey  <tom@tromey.com>
3921
3922         * varobj.h (varobj_gen_name): Return std::string.
3923         * varobj.c (varobj_gen_name): Return std::string.
3924         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3925         (mi_cmd_var_delete): Don't copy "name".
3926
3927 2017-09-29  Tom Tromey  <tom@tromey.com>
3928
3929         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3930         (mi_cmd_break_insert_1): Update.
3931
3932 2017-09-29  Tom Tromey  <tom@tromey.com>
3933
3934         * target.h (make_scoped_defer_target_commit_resume): Update.
3935         * target.c (make_scoped_defer_target_commit_resume): Rename from
3936         make_cleanup_defer_target_commit_resume.  Return a
3937         scoped_restore.
3938         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3939
3940 2017-09-29  Tom Tromey  <tom@tromey.com>
3941
3942         * main.c (captured_main_1): Remove unused declaration.
3943         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3944
3945 2017-09-29  Tom Tromey  <tom@tromey.com>
3946
3947         * symtab.c (search_symbols): Remove unused outer cleanup.
3948         (make_source_files_completion_list): Remove unused declaration.
3949
3950 2017-09-29  Tom Tromey  <tom@tromey.com>
3951
3952         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3953
3954 2017-09-29  Tom Tromey  <tom@tromey.com>
3955
3956         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3957         gdb::byte_vector.
3958
3959 2017-09-29  Tom Tromey  <tom@tromey.com>
3960
3961         * complaints.c (vcomplaint): Use std::string.
3962
3963 2017-09-29  Tom Tromey  <tom@tromey.com>
3964
3965         * tracepoint.c (trace_variable_command): Use std::string.
3966         (encode_actions_1): Remove unused declarations.
3967         (create_tsv_from_upload): Use std::string.
3968
3969 2017-09-29  Tom Tromey  <tom@tromey.com>
3970
3971         * cp-support.c (gdb_demangle): Use std::string.
3972
3973 2017-09-29  Tom Tromey  <tom@tromey.com>
3974
3975         * stack.c (parse_frame_specification): Use std::string
3976         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3977
3978 2017-09-29  Tom Tromey  <tom@tromey.com>
3979
3980         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3981
3982 2017-09-29  Tom Tromey  <tom@tromey.com>
3983
3984         * utils.c (vfprintf_maybe_filtered): Use std::string.
3985         (vfprintf_unfiltered): Likewise.
3986
3987 2017-09-29  Tom Tromey  <tom@tromey.com>
3988
3989         * event-top.c (top_level_prompt): Return std::string.
3990         (display_gdb_prompt): Update.
3991
3992 2017-09-29  Tom Tromey  <tom@tromey.com>
3993
3994         * unittests/common-utils-selftests.c (format): New function.
3995         (string_vprintf_tests): New function.
3996         (_initialize_common_utils_selftests): Register new tests.
3997         * common/common-utils.c (string_vprintf): New function.
3998         * common/common-utils.h (string_vprintf): Declare.
3999
4000 2017-09-29  Pedro Alves  <palves@redhat.com>
4001
4002         * common/rsp-low.c (unpack_varlen_hex): Constify.
4003         * common/rsp-low.h (unpack_varlen_hex): Constify.
4004         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4005         Constify.
4006         * remote.c (remote_set_permissions, read_ptid)
4007         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4008         (remote_static_tracepoint_marker_at)
4009         (remote_static_tracepoint_markers_by_strid)
4010         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4011         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4012         (parse_tracepoint_definition, parse_tsv_definition)
4013         (parse_static_tracepoint_marker_definition): Constify.
4014         * tracepoint.h (parse_static_tracepoint_marker_definition)
4015         (parse_trace_status, parse_tracepoint_status)
4016         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4017
4018 2017-09-29  Pedro Alves  <palves@redhat.com>
4019
4020         * remote.c (target_buf, target_buf_size): Delete.
4021         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4022         Use the connection's packet buffer instead.
4023         All callers adjusted.
4024         (_initialize_remote): Remove references to target_buf and
4025         target_buf_size.
4026
4027 2017-09-28  Pedro Alves  <palves@redhat.com>
4028
4029         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4030         unittests/common-utils-selftests.c.
4031         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4032         (COMMON_OBS): Remove utils-selftests.o.
4033         * utils-selftests.c: Move to ...
4034         * unittests/common-utils-selftests.c: ... here and rename self
4035         test to "string_printf".
4036
4037 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4038
4039         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4040         having NULL cus or tus.
4041
4042 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4043
4044         * arm-tdep.c: (convert_from_extended): Remove.
4045         (convert_to_extended): Likewise.
4046         (arm_extract_return_value): Use convert_typed_floating.
4047         (arm_store_return_value): Likewise.
4048
4049         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4050         * sh-tdep.c: Do not include "floatformat.h".
4051         (sh_littlebyte_bigword_type): New function.
4052         (sh_register_convert_to_virtual): Use convert_typed_floating.
4053         (sh_register_convert_to_raw): Likewise.
4054         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4055         (sh64_littlebyte_bigword_type): New function.
4056         (sh64_extract_return_value): Use convert_typed_floating.
4057         (sh64_register_convert_to_virtual): Likewise.
4058         (sh64_register_convert_to_raw): Likewise.
4059
4060 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4061
4062         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4063         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4064
4065         * gdbtypes.h (union type_specific): Make field floatformat hold
4066         just a single struct floatformat, not an array.
4067         (floatformat_from_type): Move here.
4068         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4069         changed TYPE_FLOATFORMAT definition.
4070         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4071         (recursive_dump_type): Likewise.
4072         (init_float_type): Install correct floatformat for byte order.
4073         (arch_float_type): Likewise.
4074
4075 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4076
4077         * gdbtypes.c (init_type): Change incoming argument from
4078         length-in-bytes to length-in-bits.  Assert length is a
4079         multiple of TARGET_CHAR_BITS.
4080         (arch_type, arch_flags_type): Likewise.
4081         (init_integer_type): Update call to init_type.
4082         (init_character_type): Likewise.
4083         (init_boolean_type): Likewise.
4084         (init_float_type): Likewise.
4085         (init_decfloat_type): Likewise.
4086         (init_complex_type): Likewise.
4087         (init_pointer_type): Likewise.
4088         (objfile_type): Likewise.
4089         (arch_integer_type): Update call to arch_type.
4090         (arch_character_type): Likewise.
4091         (arch_boolean_type): Likewise.
4092         (arch_float_type): Likewise.
4093         (arch_decfloat_type): Likewise.
4094         (arch_complex_type): Likewise.
4095         (arch_pointer_type): Likewise.
4096         (gdbtypes_post_init): Likewise.
4097
4098         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4099         (read_base_type): Likewise.
4100         * mdebugread.c (basic_type): Likewise.
4101         * stabsread.c (dbx_init_float_type): Likewise.
4102         (rs6000_builtin_type): Likewise.
4103         (read_range_type): Likewise.  Also, fix call to init_integer_type
4104         with erroneous length argument.
4105
4106         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4107         * d-lang.c (build_d_types): Likewise.
4108         * f-lang.c (build_fortran_types): Likewise.
4109         * go-lang.c (build_go_types): Likewise.
4110         * opencl-lang.c (build_opencl_types): Likewise.
4111         * jit.c (finalize_symtab): Likewise.
4112         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4113         (build_std_type_info_type): Likewise.
4114         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4115         update call to arch_flags_type.
4116
4117         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4118         arch_type.
4119         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4120         * windows-tdep.c (windows_get_tlb_type): Likewise.
4121
4122         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4123         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4124         * m32c-tdep.c (make_types): Likewise.
4125         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4126         (rl78_psw_type): Update call to arch_flags_type.
4127         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4128         * rx-tdep.c (rx_psw_type): Likewise.
4129         (rx_fpsw_type): Likewise.
4130         * sparc-tdep.c (sparc_psr_type): Likewise.
4131         (sparc_fsr_type): Likewise.
4132         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4133         (sparc64_ccr_type): Likewise.
4134         (sparc64_fsr_type): Likewise.
4135         (sparc64_fprs_type): Likewise.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * findcmd.c (find_command): Constify.
4140
4141 2017-09-27  Tom Tromey  <tom@tromey.com>
4142
4143         * ada-tasks.c (task_command_1, task_command): Constify.
4144
4145 2017-09-27  Tom Tromey  <tom@tromey.com>
4146
4147         * symtab.c (maintenance_print_symbol_cache)
4148         (maintenance_flush_symbol_cache)
4149         (maintenance_print_symbol_cache_statistics): Constify.
4150
4151 2017-09-27  Tom Tromey  <tom@tromey.com>
4152
4153         * inferior.c (detach_inferior_command, kill_inferior_command)
4154         (inferior_command): Constify.
4155
4156 2017-09-27  Tom Tromey  <tom@tromey.com>
4157
4158         * regcache.c (regcache_print, maintenance_print_registers)
4159         (maintenance_print_raw_registers)
4160         (maintenance_print_cooked_registers)
4161         (maintenance_print_register_groups)
4162         (maintenance_print_remote_registers): Constify.
4163
4164 2017-09-27  Tom Tromey  <tom@tromey.com>
4165
4166         * printcmd.c (map_display_numbers, undisplay_command)
4167         (enable_disable_display_command, enable_display_command)
4168         (disable_display_command): Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * breakpoint.h (delete_command): Don't declare.
4173         * breakpoint.c (delete_command, enable_once_command)
4174         (enable_count_command, enable_delete_command, breakpoint_1)
4175         (maintenance_info_breakpoints, stopin_command, stopat_command)
4176         (delete_command, delete_trace_command, save_breakpoints)
4177         (save_breakpoints_command, save_tracepoints_command): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4182         (skip_ws, extract_identifier, macro_define_command)
4183         (macro_undef_command, macro_list_command): Constify.
4184
4185 2017-09-27  Tom Tromey  <tom@tromey.com>
4186
4187         * infcmd.c (environment_info, set_environment_command)
4188         (unset_environment_command, path_info, info_proc_cmd_1)
4189         (info_proc_cmd_mappings, info_proc_cmd_stat)
4190         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4191         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4192
4193 2017-09-27  Tom Tromey  <tom@tromey.com>
4194
4195         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4196         Constify.
4197
4198 2017-09-27  Tom Tromey  <tom@tromey.com>
4199
4200         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4201
4202 2017-09-27  Tom Tromey  <tom@tromey.com>
4203
4204         * demangle.c (demangle_command): Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * progspace.c (maintenance_info_program_spaces_command):
4209         Constify.
4210
4211 2017-09-27  Tom Tromey  <tom@tromey.com>
4212
4213         * compile/compile.c (check_raw_argument, compile_file_command)
4214         (compile_code_command, compile_print_command): Constify.
4215
4216 2017-09-27  Tom Tromey  <tom@tromey.com>
4217
4218         * reggroups.c (maintenance_print_reggroups): Constify.
4219
4220 2017-09-27  Tom Tromey  <tom@tromey.com>
4221
4222         * dwarf2read.c (save_gdb_index_command): Constify.
4223
4224 2017-09-27  Tom Tromey  <tom@tromey.com>
4225
4226         * stap-probe.c (info_probes_stap_command): Constify.
4227
4228 2017-09-27  Tom Tromey  <tom@tromey.com>
4229
4230         * fork-child.c (unset_exec_wrapper_command): Constify.
4231
4232 2017-09-27  Tom Tromey  <tom@tromey.com>
4233
4234         * btrace.c (get_uint, get_context_size, no_chunk)
4235         (maint_btrace_packet_history_cmd)
4236         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4237         (maint_info_btrace_cmd): Constify.
4238
4239 2017-09-27  Tom Tromey  <tom@tromey.com>
4240
4241         * reverse.c (delete_bookmark_command): Constify.
4242
4243 2017-09-27  Tom Tromey  <tom@tromey.com>
4244
4245         * remote.c (set_memory_packet_size)
4246         (set_memory_write_packet_size, show_memory_write_packet_size)
4247         (set_memory_read_packet_size, show_memory_read_packet_size)
4248         (compare_sections_command, packet_command, remote_put_command)
4249         (remote_get_command, remote_delete_command): Constify.
4250
4251 2017-09-27  Tom Tromey  <tom@tromey.com>
4252
4253         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4254         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4255         (set_mipsfpu_auto_command): Constify.
4256
4257 2017-09-27  Tom Tromey  <tom@tromey.com>
4258
4259         * cli/cli-cmds.h (cd_command): Constify.
4260         * cli/cli-cmds.c (cd_command): Constify.
4261
4262 2017-09-27  Tom Tromey  <tom@tromey.com>
4263
4264         * thread.c (thread_name_command, thread_find_command): Constify.
4265
4266 2017-09-27  Tom Tromey  <tom@tromey.com>
4267
4268         * probe.c (enable_probes_command, disable_probes_command):
4269         Constify.
4270
4271 2017-09-27  Tom Tromey  <tom@tromey.com>
4272
4273         * symfile.c (symbol_file_command): Constify.
4274         * gdbcore.h (deprecated_file_changed_hook): Constify.
4275         * exec.c (deprecated_file_changed_hook, exec_file_command)
4276         (file_command): Constify.
4277         * defs.h (symbol_file_command): Constify.
4278
4279 2017-09-27  Tom Tromey  <tom@tromey.com>
4280
4281         * remote-fileio.c (set_system_call_allowed)
4282         (show_system_call_allowed): Constify.
4283
4284 2017-09-27  Tom Tromey  <tom@tromey.com>
4285
4286         * tracepoint.c (delete_trace_variable_command)
4287         (tfind_end_command, tfind_start_command, tfind_pc_command)
4288         (tfind_tracepoint_command, tfind_line_command)
4289         (tfind_range_command, tfind_outside_command): Constify.
4290
4291 2017-09-27  Tom Tromey  <tom@tromey.com>
4292
4293         * ax-gdb.c (maint_agent_printf_command, agent_command)
4294         (agent_eval_command): Constify.
4295
4296 2017-09-27  Tom Tromey  <tom@tromey.com>
4297
4298         * tracepoint.c (info_scope_command): Constify.
4299         * python/python.c (gdbpy_decode_line): Constify.
4300         * python/py-breakpoint.c (bppy_init): Constify.
4301         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4302         * location.h: (new_linespec_location)
4303         (string_to_event_location_basic, string_to_event_location):
4304         Constify.
4305         * location.c (new_linespec_location)
4306         (string_to_event_location_basic, string_to_event_location):
4307         Constify.
4308         * linespec.h (decode_line_with_current_source)
4309         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4310         * linespec.c (linespec_lex_to_end)
4311         (decode_line_with_current_source)
4312         (decode_line_with_last_displayed): Constify.
4313         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4314         Constify.
4315         * cli/cli-cmds.c (edit_command, list_command): Constify.
4316         * breakpoint.h (until_break_command, watch_command_wrapper)
4317         (awatch_command_wrapper, rwatch_command_wrapper)
4318         (init_ada_exception_breakpoint): Constify.
4319         * breakpoint.c (break_command_1, dprintf_command)
4320         (break_range_command, watch_command_wrapper)
4321         (rwatch_command_wrapper, awatch_command_wrapper)
4322         (until_break_command, init_ada_exception_breakpoint)
4323         (strace_marker_create_sals_from_location, trace_command)
4324         (ftrace_command, strace_command, struct tracepoint): Constify.
4325         * ax-gdb.c (agent_command_1): Constify.
4326         * ada-lang.c (ada_exception_sal): Constify.
4327
4328 2017-09-27  Tom Tromey  <tom@tromey.com>
4329
4330         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4331         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4332         (get_context_size, no_chunk, get_insn_history_modifiers)
4333         (cmd_record_insn_history, get_call_history_modifiers)
4334         (cmd_record_call_history): Constify.
4335
4336 2017-09-27  Tom Tromey  <tom@tromey.com>
4337
4338         * source.c (show_substitute_path_command)
4339         (unset_substitute_path_command, set_substitute_path_command):
4340         Constify.
4341
4342 2017-09-27  Tom Tromey  <tom@tromey.com>
4343
4344         * typeprint.c (maintenance_print_type): Constify.
4345         * maint.c (maintenance_dump_me, maintenance_demangle)
4346         (maintenance_time_display, maintenance_info_sections)
4347         (maintenance_print_statistics, maintenance_deprecate)
4348         (maintenance_undeprecate): Constify.
4349         (maintenance_do_deprecate): Constify.  Use std::string.
4350         (maintenance_selftest): Constify.
4351         * gdbtypes.h (maintenance_print_type): Constify.
4352
4353 2017-09-27  Tom Tromey  <tom@tromey.com>
4354
4355         * hppa-tdep.c (unwind_command): Constify.
4356
4357 2017-09-27  Tom Tromey  <tom@tromey.com>
4358
4359         * target-descriptions.c (unset_tdesc_filename_cmd)
4360         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4361         Constify.
4362
4363 2017-09-27  Tom Tromey  <tom@tromey.com>
4364
4365         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4366
4367 2017-09-27  Tom Tromey  <tom@tromey.com>
4368
4369         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4370
4371 2017-09-27  Tom Tromey  <tom@tromey.com>
4372
4373         * tui/tui-regs.c (tui_reg_command): Constify.
4374
4375 2017-09-27  Tom Tromey  <tom@tromey.com>
4376
4377         * skip.c (skip_file_command, skip_function_command)
4378         (skip_enable_command, skip_disable_command, skip_delete_command):
4379         Constify.
4380
4381 2017-09-27  Tom Tromey  <tom@tromey.com>
4382
4383         * record-btrace.c (cmd_record_btrace_bts_start)
4384         (cmd_record_btrace_pt_start): Constify.
4385
4386 2017-09-27  Tom Tromey  <tom@tromey.com>
4387
4388         * symmisc.c (maintenance_print_symbols)
4389         (maintenance_print_msymbols, maintenance_print_objfiles)
4390         (maintenance_info_symtabs, maintenance_check_symtabs)
4391         (maintenance_expand_symtabs, maintenance_info_line_tables):
4392         Constify.
4393
4394 2017-09-27  Tom Tromey  <tom@tromey.com>
4395
4396         * top.c (new_ui_command): Constify.
4397
4398 2017-09-27  Tom Tromey  <tom@tromey.com>
4399
4400         * symfile.c (add_symbol_file_command)
4401         (remove_symbol_file_command, list_overlays_command)
4402         (map_overlay_command, unmap_overlay_command)
4403         (overlay_auto_command, overlay_manual_command)
4404         (overlay_off_command, overlay_load_command): Constify.
4405
4406 2017-09-27  Tom Tromey  <tom@tromey.com>
4407
4408         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4409         (info_spu_mailbox_command, info_spu_dma_command)
4410         (info_spu_proxydma_command): Constify.
4411
4412 2017-09-27  Tom Tromey  <tom@tromey.com>
4413
4414         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4415
4416 2017-09-27  Tom Tromey  <tom@tromey.com>
4417
4418         * cli/cli-script.c (user_defined_command): Constify.
4419
4420 2017-09-27  Tom Tromey  <tom@tromey.com>
4421
4422         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4423         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4424         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4425         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4426         (dump_binary_value, append_binary_memory, append_binary_value):
4427         Constify.
4428         (struct dump_context) <func>: Constify.
4429         (add_dump_command): Update.
4430
4431 2017-09-27  Tom Tromey  <tom@tromey.com>
4432
4433         * cli/cli-cmds.c (show_version, show_configuration)
4434         (source_command, show_user): Constify.
4435
4436 2017-09-27  Tom Tromey  <tom@tromey.com>
4437
4438         * target.c (maintenance_print_target_stack): Constify.
4439
4440 2017-09-27  Tom Tromey  <tom@tromey.com>
4441
4442         * interps.c (interpreter_exec_cmd): Constify.
4443
4444 2017-09-27  Tom Tromey  <tom@tromey.com>
4445
4446         * record-full.c (cmd_record_full_restore): Constify.
4447
4448 2017-09-27  Tom Tromey  <tom@tromey.com>
4449
4450         * memattr.c (enable_mem_command, disable_mem_command)
4451         (delete_mem_command): Constify.
4452
4453 2017-09-27  Tom Tromey  <tom@tromey.com>
4454
4455         * value.c (show_convenience): Constify.
4456
4457 2017-09-27  Tom Tromey  <tom@tromey.com>
4458
4459         * gdbcore.h (core_file_command): Update.
4460         * corefile.c (core_file_command): Constify.
4461
4462 2017-09-27  Tom Tromey  <tom@tromey.com>
4463
4464         * user-regs.c (maintenance_print_user_registers): Constify.
4465
4466 2017-09-27  Tom Tromey  <tom@tromey.com>
4467
4468         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4469
4470 2017-09-27  Tom Tromey  <tom@tromey.com>
4471
4472         * cp-support.c (first_component_command): Constify.
4473
4474 2017-09-27  Tom Tromey  <tom@tromey.com>
4475
4476         * psymtab.c (maintenance_print_psymbols)
4477         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4478         Constify.
4479
4480 2017-09-27  Tom Tromey  <tom@tromey.com>
4481
4482         * windows-tdep.c (display_tib): Constify.
4483
4484 2017-09-27  Tom Tromey  <tom@tromey.com>
4485
4486         * linux-fork.c (delete_checkpoint_command)
4487         (detach_checkpoint_command): Constify.
4488
4489 2017-09-27  Tom Tromey  <tom@tromey.com>
4490
4491         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4492
4493 2017-09-27  Tom Tromey  <tom@tromey.com>
4494
4495         * arc-tdep.c (dump_arc_instruction_command): Constify.
4496
4497 2017-09-27  Tom Tromey  <tom@tromey.com>
4498
4499         * valprint.c (set_radix, show_radix): Constify.
4500
4501 2017-09-27  Tom Tromey  <tom@tromey.com>
4502
4503         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4504
4505 2017-09-27  Tom Tromey  <tom@tromey.com>
4506
4507         * command.h (not_just_help_class_command): Update.
4508         * cli/cli-decode.h (not_just_help_class_command): Update.
4509         * cli/cli-decode.c (not_just_help_class_command): Constify.
4510
4511 2017-09-27  Tom Tromey  <tom@tromey.com>
4512
4513         * gdb_bfd.c (maintenance_info_bfds): Constify.
4514
4515 2017-09-27  Tom Tromey  <tom@tromey.com>
4516
4517         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4518         overloads.
4519         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4520         (do_const_cfunc): New function.
4521         (cmd_cfunc_eq): New overload.
4522         (cli_user_command_p): Check do_const_cfunc.
4523         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4524         const_cfunc.
4525         * command.h (add_cmd): Add const overload and no-function
4526         overload.
4527         (set_cmd_cfunc): Add const overload.
4528         (cmd_const_cfunc_ftype): Declare.
4529         (cmd_cfunc_eq): Add const overload.
4530         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4531         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4532         overload.
4533
4534 2017-09-27  Tom Tromey  <tom@tromey.com>
4535
4536         * macroexp.c (get_next_token_for_substitution): New function.
4537         (substitute_args): Call it.  Check for __VA_OPT__.
4538
4539 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4540             Pedro Alves <palves@redhat.com>
4541
4542         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4543         producer_is_icc_lt_14.
4544         (producer_is_icc_lt_14): New function.
4545         (check_producer): Add code for checking version of ICC.
4546         (producer_is_icc): Move to producer.c.
4547         (read_structure_type): Restrict ICC workaround to ICC<14.
4548         * producer.c: Include selftest.h.
4549         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4550         New functions.
4551         * producer.h (producer_is_icc): New declaration.
4552
4553 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4554
4555         * Makefile.in (SFILES): Add producer.c.
4556         (COMMON_OBS): Add producer.o
4557         * amd64-tdep.c (producer.h): Add new include.
4558         * dwarf2read.c (producer.h): Add new include.
4559         * producer.c: New file.
4560         * producer.h: New file.
4561         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4562         producer.c.
4563         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4564         producer.h.
4565
4566 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4567
4568         * configure.ac: Search ncursesw before ncurses.
4569         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4570         * gdb_curses.h: Include <ncursesw/ncurses.h>
4571         * config.in, configure: Regenerate.
4572
4573 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4574
4575         PR gdb/22185
4576         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4577         obsolete.
4578         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4579         Remove i386sol2 support.
4580         * configure.nat <i386sol2>: Remove.
4581         <sol2-64>: Fold into ...
4582         <sol2>: ... this.
4583         Move common settings to default section.
4584         Add sol-thread.o.
4585         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4586         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4587         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4588         <i[34567]86-*-solaris*>: Remove.
4589         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4590
4591         * configure.ac: Remove wctype in libw check.
4592         (_MSE_INT_H): Don't define on Solaris 7-9.
4593         <solaris*>: Remove libthread_db.so.1 check.
4594         * configure: Regenerate.
4595         * config.in: Regenerate.
4596
4597         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4598         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4599         (gdb_ps_size_t): Remove.
4600         Use base types in users.
4601         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4602
4603         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4604
4605 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4606
4607         PR build/22206
4608         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4609         (adi_is_addr_mapped): Likewise.
4610         (PSR_ICC): Don't redefine.
4611         (PSR_IMPL): Likewise.
4612
4613 2017-09-25  Tom Tromey  <tom@tromey.com>
4614
4615         * regcache.c (regcache::dump): Use string_printf.
4616
4617 2017-09-25  Tom Tromey  <tom@tromey.com>
4618
4619         * regcache.c (class regcache_invalidator): New.
4620         (struct register_to_invalidate): Remove.
4621         (make_cleanup_regcache_invalidate): Remove.
4622         (regcache::raw_write): Use regcache_invalidator.
4623
4624 2017-09-25  Tom Tromey  <tom@tromey.com>
4625
4626         * spu-tdep.c (spu2ppu_sniffer): Update.
4627         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4628         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4629         Remove.
4630         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4631         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4632         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4633         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4634         (frame_pop): Update.
4635
4636 2017-09-25  Tom Tromey  <tom@tromey.com>
4637
4638         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4639         * regcache.h (regcache_xfree): Don't declare.
4640         * regcache.c (regcache_xfree): Remove.
4641         (do_regcache_xfree): Use delete.
4642         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4643         * linux-fork.c (free_fork): Use delete.
4644         (fork_save_infrun_state): Likewise.
4645         * jit.c (jit_dealloc_cache): Use delete.
4646         * infrun.c (discard_infcall_suspend_state): Use delete.
4647
4648 2017-09-25  Tom Tromey  <tom@tromey.com>
4649
4650         * regcache.h (regcache_xmalloc): Don't declare.
4651         (regcache_raw_set_cached_value): Update comment.
4652         * regcache.c (regcache_xmalloc): Remove.
4653         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4654         * jit.c (jit_frame_sniffer): Use new.
4655         * frame.c (frame_save_as_regcache): Use new.
4656
4657 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4658
4659         * NEWS: Advertise support for guarded-storage registers on IBM z.
4660
4661 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4662
4663         * s390-linux-nat.c (have_regset_gs): New static variable.
4664         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4665         control block and guarded-storage broadcast control regsets.
4666         (s390_read_description): Detect whether the target has
4667         guarded-storage support, return appropriate tdesc.
4668         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4669         (features/s390x-gs-linux64.c): Likewise.
4670         (struct gdbarch_tdep) <have_gs>: New field.
4671         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4672         (s390_gsbc_regset): New variables.
4673         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4674         and s390_gsbc_regset, if applicable.
4675         (s390_core_read_description): Check whether core file was from a
4676         target with guarded-storage support; include appropriate regsets.
4677         (s390_gdbarch_init): Add registers for guarded-storage support.
4678         (_initialize_s390_tdep): Initialize new target descriptions that
4679         include registers for guarded-storage support.
4680         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4681         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4682         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4683         (S390_NUM_REGS): Adjust macro definition.
4684         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4685         (tdesc_s390x_gs_linux64): New declarations.
4686
4687 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4688
4689         * features/s390-gs-linux64.xml: New file.
4690         * features/s390-gs.xml: New file.
4691         * features/s390-gsbc.xml: New file.
4692         * features/s390x-gs-linux64.xml: New file.
4693         * features/Makefile (WHICH): Add s390-gs-linux64 and
4694         s390x-gs-linux64.
4695         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4696         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4697         * features/s390-gs-linux64.c: New generated file.
4698         * features/s390x-gs-linux64.c: New file.
4699         * regformats/s390-gs-linux64.dat: New file.
4700         * regformats/s390x-gs-linux64.dat: New file.
4701
4702 2017-09-23  Tom Tromey  <tom@tromey.com>
4703
4704         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4705
4706 2017-09-22  Tom Tromey  <tom@tromey.com>
4707
4708         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4709         type to scoped_restore_tmpl.
4710         <scoped_input_handler>: Initialize m_quit_handler directly.
4711
4712 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4713
4714         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4715         (cd_command): Likewise.  Free "current_directory" before
4716         assigning to it.
4717         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4718         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4719         * top.c (gdb_dirbuf): Remove global declaration.
4720         * top.h (gdb_dirbuf): Likewise.
4721
4722 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4723
4724         * gnulib/aclocal.m4: Regenerate.
4725         * gnulib/config.in: Regenerate.
4726         * gnulib/configure: Regenerate.
4727         * gnulib/import/Makefile.am: Regenerate.
4728         * gnulib/import/Makefile.in: Regenerate.
4729         * gnulib/import/assure.h: New file.
4730         * gnulib/import/at-func.c: Likewise
4731         * gnulib/import/chdir-long.c: New file.
4732         * gnulib/import/chdir-long.h: New file.
4733         * gnulib/import/cloexec.c: New file.
4734         * gnulib/import/cloexec.h: New file.
4735         * gnulib/import/close.c: New file.
4736         * gnulib/import/closedir.c: New file.
4737         * gnulib/import/dirent-private.h: New file.
4738         * gnulib/import/dup-safer.c: New file.
4739         * gnulib/import/dup.c: New file.
4740         * gnulib/import/dup2.c: New file.
4741         * gnulib/import/error.c: New file.
4742         * gnulib/import/error.h: New file.
4743         * gnulib/import/exitfail.c: New file.
4744         * gnulib/import/exitfail.h: New file.
4745         * gnulib/import/fchdir.c: New file.
4746         * gnulib/import/fcntl.c: New file.
4747         * gnulib/import/fcntl.in.h: New file.
4748         * gnulib/import/fd-hook.c: New file.
4749         * gnulib/import/fd-hook.h: New file.
4750         * gnulib/import/fd-safer.c: New file.
4751         * gnulib/import/fdopendir.c: New file.
4752         * gnulib/import/filename.h: New file.
4753         * gnulib/import/filenamecat-lgpl.c: New file.
4754         * gnulib/import/filenamecat.h: New file.
4755         * gnulib/import/fstat.c: New file.
4756         * gnulib/import/fstatat.c: New file.
4757         * gnulib/import/getcwd-lgpl.c: New file.
4758         * gnulib/import/getcwd.c: New file.
4759         * gnulib/import/getdtablesize.c: New file.
4760         * gnulib/import/getlogin_r.c: New file.
4761         * gnulib/import/getprogname.c: New file.
4762         * gnulib/import/getprogname.h: New file.
4763         * gnulib/import/gettext.h: New file.
4764         * gnulib/import/glob-libc.h: New file.
4765         * gnulib/import/glob.c: New file.
4766         * gnulib/import/glob.in.h: New file.
4767         * gnulib/import/intprops.h: New file.
4768         * gnulib/import/m4/chdir-long.m4: New file.
4769         * gnulib/import/m4/close.m4: New file.
4770         * gnulib/import/m4/closedir.m4: New file.
4771         * gnulib/import/m4/d-ino.m4: New file.
4772         * gnulib/import/m4/d-type.m4: New file.
4773         * gnulib/import/m4/dup.m4: New file.
4774         * gnulib/import/m4/dup2.m4: New file.
4775         * gnulib/import/m4/error.m4: New file.
4776         * gnulib/import/m4/fchdir.m4: New file.
4777         * gnulib/import/m4/fcntl.m4: New file.
4778         * gnulib/import/m4/fcntl_h.m4: New file.
4779         * gnulib/import/m4/fdopendir.m4: New file.
4780         * gnulib/import/m4/filenamecat.m4: New file.
4781         * gnulib/import/m4/fstat.m4: New file.
4782         * gnulib/import/m4/fstatat.m4: New file.
4783         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4784         * gnulib/import/m4/getcwd-path-max.m4: New file.
4785         * gnulib/import/m4/getcwd.m4: New file.
4786         * gnulib/import/m4/getdtablesize.m4: New file.
4787         * gnulib/import/m4/getlogin_r.m4: New file.
4788         * gnulib/import/m4/getprogname.m4: New file.
4789         * gnulib/import/m4/glob.m4: New file.
4790         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4791         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4792         * gnulib/import/m4/mempcpy.m4: New file.
4793         * gnulib/import/m4/memrchr.m4: New file.
4794         * gnulib/import/m4/mode_t.m4: New file.
4795         * gnulib/import/m4/msvc-inval.m4: New file.
4796         * gnulib/import/m4/msvc-nothrow.m4: New file.
4797         * gnulib/import/m4/open.m4: New file.
4798         * gnulib/import/m4/openat.m4: New file.
4799         * gnulib/import/m4/opendir.m4: New file.
4800         * gnulib/import/m4/readdir.m4: New file.
4801         * gnulib/import/m4/realloc.m4: New file.
4802         * gnulib/import/m4/rewinddir.m4: New file.
4803         * gnulib/import/m4/save-cwd.m4: New file.
4804         * gnulib/import/m4/strdup.m4: New file.
4805         * gnulib/import/m4/strerror.m4: New file.
4806         * gnulib/import/m4/unistd-safer.m4: New file.
4807         * gnulib/import/mempcpy.c: New file.
4808         * gnulib/import/memrchr.c: New file.
4809         * gnulib/import/msvc-inval.c: New file.
4810         * gnulib/import/msvc-inval.h: New file.
4811         * gnulib/import/msvc-nothrow.c: New file.
4812         * gnulib/import/msvc-nothrow.h: New file.
4813         * gnulib/import/open.c: New file.
4814         * gnulib/import/openat-die.c: New file.
4815         * gnulib/import/openat-priv.h: New file.
4816         * gnulib/import/openat-proc.c: New file.
4817         * gnulib/import/openat.c: New file.
4818         * gnulib/import/openat.h: New file.
4819         * gnulib/import/opendir.c: New file.
4820         * gnulib/import/pipe-safer.c: New file.
4821         * gnulib/import/readdir.c: New file.
4822         * gnulib/import/realloc.c: New file.
4823         * gnulib/import/rewinddir.c: New file.
4824         * gnulib/import/save-cwd.c: New file.
4825         * gnulib/import/save-cwd.h: New file.
4826         * gnulib/import/strdup.c: New file.
4827         * gnulib/import/strerror-override.c: New file.
4828         * gnulib/import/strerror-override.h: New file.
4829         * gnulib/import/strerror.c: New file.
4830         * gnulib/import/unistd--.h: New file.
4831         * gnulib/import/unistd-safer.h: New file.
4832         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4833         "getcwd" and "glob".
4834         * ser-tcp.c: Undefine "close" before redefining it.
4835
4836 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4837
4838         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4839         get rid of res_val.
4840
4841 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4842
4843         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4844         <sol2,sparc>: Likewise.
4845         <sol2-64,i386>: Likewise.
4846
4847         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4848         -Wdeprecated-declarations on *-*-solaris*.
4849         * configure: Regenerate.
4850
4851         * procfs.c: Include "nat/inferior.h".
4852         (procfs_info_proc): Fix typo.
4853
4854 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4855
4856         * remote.c (vector): Include.
4857         (struct private_thread_info): Add field, thread_handle.
4858         (free_private_thread_info): Deallocate storage associated with
4859         thread handle.
4860         (get_private_info_thread): Initialize `thread_handle' field.
4861         (struct thread_item): Add field, thread_handle.
4862         (clear_threads_listing_context): Deallocate storage associated
4863         with thread handle.
4864         (start_thread): Add support for "handle" attribute.
4865         (thread_attributes): Add "handle".
4866         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4867         field.
4868         (remote_update_thread_list): Update thread_handle.
4869         (remote_thread_handle_to_thread_info): New function.
4870         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4871
4872 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4873
4874         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4875         function.
4876         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4877         * python/python-internal.h (thread_object_type): Declare.
4878
4879 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4880
4881         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4882         (target_thread_handle_to_thread_info): Declare.
4883         * target.c (target_thread_handle_to_thread_info): New function.
4884         * target-delegates.c: Regenerate.
4885         * gdbthread.h (find_thread_by_handle): Declare.
4886         * thread.c (find_thread_by_handle): New function.
4887         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4888         function.
4889         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4890
4891 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4894
4895 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4896
4897         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4898
4899 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4900
4901         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4902         to gdb_target_obs.
4903
4904 2017-09-20  Tom Tromey  <tom@tromey.com>
4905
4906         * breakpoint.c (struct counted_command_line): Remove.
4907         (breakpoint_commands): Update.
4908         (alloc_counted_command_line, incref_counted_command_line)
4909         (decref_counted_command_line, do_cleanup_counted_command_line)
4910         (make_cleanup_decref_counted_command_line): Remove.
4911         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4912         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4913         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4914         (save_breakpoints): Update.
4915         * breakpoint.h (counted_command_line): Now a typedef to
4916         shared_ptr.
4917         (struct breakpoint) <commands>: Now a counted_command_line.
4918         (struct bpstats) <command>: Likewise.
4919
4920 2017-09-20  Tom Tromey  <tom@tromey.com>
4921
4922         * breakpoint.c (struct commands_info, do_map_commands_command):
4923         Remove.
4924         (commands_command_1): Update.
4925         (iterate_over_related_breakpoints): Take a function_view.
4926         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4927         (delete_command): Update.
4928         (map_breakpoint_numbers): Take a function_view.
4929         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4930         (disable_command): Update.
4931         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4932         (enable_command): Update.
4933         (struct disp_data, do_enable_breakpoint_disp)
4934         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4935         (do_map_enable_delete_breakpoint): Remove.
4936         (enable_once_command, enable_count_command, enable_delete_command)
4937         (delete_trace_variable_command): Update.
4938
4939 2017-09-20  Tom Tromey  <tom@tromey.com>
4940
4941         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4942         (bpstat_clear): Use delete.
4943         (bpstats): New constructors.
4944         (bpstat_copy, bpstat_stop_status): Use new.
4945         (dprintf_after_condition_true): Update.
4946         * breakpoint.h (bpstats::bpstats): Add constructors.
4947         (bpstats::~bpstats): Add destructor.
4948
4949 2017-09-20  Pedro Alves  <palves@redhat.com>
4950
4951         * eval.c (make_params): Delete, refactored as ...
4952         (class fake_method): ... this new type's ctor.
4953         (fake_method::~fake_method): New.
4954         (evaluate_subexp_standard): Use 'fake_method'.
4955
4956 2017-09-20  Tom Tromey  <tom@tromey.com>
4957
4958         * windows-nat.c (get_windows_debug_event, windows_wait)
4959         (do_initial_windows_stuff, windows_attach): Update.
4960         * utils.c (vwarning, internal_vproblem): Update.
4961         (ui_unregister_input_event_handler_cleanup)
4962         (prepare_to_handle_input): Remove.
4963         (class scoped_input_handler): New.
4964         (defaulted_query, prompt_for_continue): Update.
4965         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4966         Update.
4967         * top.c (undo_terminal_modifications_before_exit): Update.
4968         * target/target.h (target_terminal_init, target_terminal_inferior)
4969         (target_terminal_ours): Don't declare.
4970         (class target_terminal): New.
4971         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4972         (target_terminal_ours_for_output)
4973         (make_cleanup_restore_target_terminal): Don't declare.
4974         (target_terminal_info): Remove.
4975         * target.c (enum terminal_state, terminal_state): Remove.
4976         (target_terminal::terminal_state): Define.
4977         (target_terminal::init): Rename from target_terminal_init.
4978         (target_terminal::inferior): Rename from
4979         target_terminal_inferior.
4980         (target_terminal::ours): Rename from target_terminal_ours.
4981         (target_terminal::ours_for_output): Rename from
4982         target_terminal_ours_for_output.
4983         (target_terminal::info): New method.
4984         (cleanup_restore_target_terminal)
4985         (make_cleanup_restore_target_terminal): Remove.
4986         * solib.c (handle_solib_event): Update.
4987         * remote.c (remote_serial_quit_handler): Update.
4988         (remote_terminal_inferior, remote_wait_as): Update.
4989         * record-full.c (record_full_wait_1): Update.
4990         * nto-procfs.c (procfs_create_inferior): Update.
4991         * nat/fork-inferior.c (startup_inferior): Update.
4992         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4993         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4994         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4995         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4996         (mi_breakpoint_created, mi_breakpoint_deleted)
4997         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4998         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4999         (mi_user_selected_context_changed, report_initial_inferior):
5000         Update.
5001         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5002         (linux_nat_terminal_inferior): Update.
5003         * infrun.c (follow_fork_inferior)
5004         (handle_vfork_child_exec_or_exit, do_target_resume)
5005         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5006         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5007         Update.
5008         * inflow.c (child_terminal_init, info_terminal_command): Update.
5009         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5010         (attach_command): Update.
5011         * infcall.c (call_thread_fsm_should_stop): Update.
5012         * gnu-nat.c (gnu_attach): Update.
5013         * extension.c (struct active_ext_lang_state)
5014         (restore_active_ext_lang): Update.
5015         * exceptions.c (print_flush): Update.
5016         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5017         (struct quit_handler_cleanup_data, restore_quit_handler)
5018         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5019         Remove.
5020         * cp-support.c (gdb_demangle): Update.
5021         * breakpoint.c (update_inserted_breakpoint_locations)
5022         (insert_breakpoint_locations, handle_jit_event)
5023         (disable_breakpoints_in_unloaded_shlib): Update.
5024         * annotate.c (annotate_breakpoints_invalid)
5025         (annotate_frames_invalid): Update.
5026
5027 2017-09-20  Tom Tromey  <tom@tromey.com>
5028
5029         * main.c (catch_command_errors): Rename from
5030         catch_command_errors_const.
5031         (captured_main_1): Update.
5032
5033 2017-09-20  Pedro Alves  <palves@redhat.com>
5034
5035         * cli/cli-cmds.c (list_command): Use print_sal_location.
5036         (print_sal_location): New function.
5037         (ambiguous_line_spec): Use print_sal_location.
5038         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5039         * symtab.c (find_function_start_sal): Likewise.
5040         * symtab.h (symtab_and_line::symbol): New field.
5041
5042 2017-09-20  Pedro Alves  <palves@redhat.com>
5043
5044         * linespec.c (minsym_found): Handle non-text minsyms.
5045         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5046
5047 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5048
5049         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5050         backslash.
5051
5052 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5053
5054         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5055         vmovups instead vmovaps.
5056         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5057
5058 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5059
5060         * NEWS (Changes since GDB 8.0): Add starti.
5061         * infcmd.c (enum run_break): New.
5062         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5063         case.
5064         (run_command): Use enum run_how.
5065         (start_command): Likewise.
5066         (starti_command): New function.
5067         (RUN_ARGS_HELP): New macro.
5068         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5069         commands.  Add starti command.
5070
5071 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5072
5073         * Makefile.in (monitor.o): Remove the rule.
5074
5075 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5076
5077         * annotate.h (struct annotate_arg_emitter): Use
5078         DISABLE_COPY_AND_ASSIGN.
5079         * common/refcounted-object.h (refcounted_object): Likewise.
5080         * completer.h (struct completion_result): Likewise.
5081         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5082         * filename-seen-cache.h (filename_seen_cache): Likewise.
5083         * gdbcore.h (thread_section_name): Likewise.
5084         * gdb_regex.h (compiled_regex): Likewise.
5085         * gdbthread.h (scoped_restore_current_thread): Likewise.
5086         * inferior.h (scoped_restore_current_inferior): Likewise.
5087         * jit.c (jit_reader): Likewise.
5088         * linespec.h (struct linespec_result): Likewise.
5089         * mi/mi-parse.h (struct mi_parse): Likewise.
5090         * nat/fork-inferior.c (execv_argv): Likewise.
5091         * progspace.h (scoped_restore_current_program_space): Likewise.
5092         * python/python-internal.h (class gdbpy_enter): Likewise.
5093         * regcache.h (regcache): Likewise.
5094         * target-descriptions.c (struct tdesc_reg): Likewise.
5095         (struct tdesc_type): Likewise.
5096         (struct tdesc_feature): Likewise.
5097         * ui-out.h (ui_out_emit_type): Likewise.
5098
5099 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5100
5101         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5102         label abort_expression.
5103
5104 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5105
5106         * common/buffer.c (buffer_xml_printf): Adjust.
5107         * common/xml-utils.c (xml_escape_text): Change return type to
5108         std::string, update code accordingly.
5109         * common/xml-utils.h (xml_escape_text): Change return type to
5110         std::string.
5111         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5112         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5113         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5114         Adjust.
5115
5116 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5117
5118         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5119         (SUBDIR_UNITTESTS_OBS): Add new object file.
5120         * unittests/xml-utils-selftests.c: New file.
5121
5122 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * common/selftest.h (selftest): New struct/interface.
5125         (register_test): Add name parameter, add new overload.
5126         (run_tests): Add filter parameter.
5127         (for_each_selftest_ftype): New typedef.
5128         (for_each_selftest): New declaration.
5129         * common/selftest.c (tests): Change type to
5130         map<string, unique_ptr<selftest>>.
5131         (simple_selftest): New struct.
5132         (register_test): New function.
5133         (register_test): Add name parameter and use it.
5134         (run_tests): Add filter parameter and use it.  Add prints.
5135         Adjust to vector -> map change.
5136         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5137         registering selftests.
5138         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5139         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5140         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5141         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5142         * findvar.c (_initialize_findvar): Likewise.
5143         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5144         * maint.c (maintenance_selftest): Update call to run_tests.
5145         (maintenance_info_selftests): New function.
5146         (_initialize_maint_cmds): Register "maintenance info selftests"
5147         command.  Update "maintenance selftest" doc.
5148         * regcache.c (_initialize_regcache): Add names when registering
5149         selftests.
5150         * rust-exp.y (_initialize_rust_exp): Likewise.
5151         * selftest-arch.c (gdbarch_selftest): New struct.
5152         (gdbarch_tests): Remove.
5153         (register_test_foreach_arch): Add name parameter.  Call
5154         register_test.
5155         (tests_with_arch): Remove, move most content to
5156         gdbarch_selftest::operator().
5157         (_initialize_selftests_foreach_arch): Remove.
5158         * selftest-arch.h (register_test_foreach_arch): Add name
5159         parameter.
5160         (run_tests_with_arch): New declaration.
5161         * utils-selftests.c (_initialize_utils_selftests): Add names
5162         when registering selftests.
5163         * utils.c (_initialize_utils): Likewise.
5164         * unittests/array-view-selftests.c
5165         (_initialize_array_view_selftests): Likewise.
5166         * unittests/environ-selftests.c (_initialize_environ_selftests):
5167         Likewise.
5168         * unittests/function-view-selftests.c
5169         (_initialize_function_view_selftests): Likewise.
5170         * unittests/offset-type-selftests.c
5171         (_initialize_offset_type_selftests): Likewise.
5172         * unittests/optional-selftests.c
5173         (_initialize_optional_selftests): Likewise.
5174         * unittests/scoped_restore-selftests.c
5175         (_initialize_scoped_restore_selftests): Likewise.
5176         * NEWS: Document "maintenance selftest" and "maint info
5177         selftests".
5178
5179 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5180
5181         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5182         scoped_restore.
5183
5184 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5185
5186         * mi/mi-main.c (mi_load_progress): Make uiout variable
5187         a unique_ptr.
5188
5189 2017-09-15  Pedro Alves  <palves@redhat.com>
5190
5191         * compile/compile-c-types.c (convert_enum, convert_int)
5192         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5193
5194 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5195
5196         * dwarf2read.c (copy_string): Remove.
5197         (parse_macro_definition): Replace copy_string with savestring.
5198
5199 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5200
5201         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5202         gdb_target_obs.
5203         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5204         Likewise.
5205         (i[34567]86-*-linux*): Likewise.
5206
5207 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5208
5209         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5210         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5211         <stack>: Change type to std::vector.
5212         <stack_len, stack_allocated>: Remove.
5213         <grow_stack>: Remove.
5214         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5215         (dwarf_expr_context::~dwarf_expr_context): Remove.
5216         (dwarf_expr_context::grow_stack): Remove.
5217         (dwarf_expr_context::push): Adjust.
5218         (dwarf_expr_context::pop): Adjust.
5219         (dwarf_expr_context::fetch): Adjust.
5220         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5221         (dwarf_expr_context::stack_empty_p): Adjust.
5222         (dwarf_expr_context::execute_stack_op): Adjust.
5223
5224 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5225
5226         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5227         return type to bool.
5228         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5229
5230 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5231
5232         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5233         Change type to bool.
5234         (dwarf_stack_value) <in_stack_memory>: Likewise.
5235         (dwarf_expr_context) <push_address>: Change parameter type to
5236         bool.
5237         <fetch_in_stack_memory>: Change return type to bool.
5238         <push>: Change parameter type to bool.
5239         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5240         to bool.
5241         (dwarf_expr_context::push_address): Likewise.
5242         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5243         to bool.
5244         (dwarf_expr_context::execute_stack_op): Adjust.
5245         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5246
5247 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5248
5249         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5250         (struct dwarf_expr_context) <n_pieces>: Remove.
5251         <pieces>: Change type to std::vector.
5252         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5253         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5254         pieces.
5255         (dwarf_expr_context::add_piece): Adjust.
5256         * dwarf2loc.c (struct piece_closure): Initialize fields.
5257         <n_pieces>: Remove.
5258         <pieces>: Change type to std::vector.
5259         (allocate_piece_closure): Adjust, change parameter to
5260         std::vector rvalue and std::move it to piece_closure.
5261         (rw_pieced_value): Adjust.
5262         (check_pieced_synthetic_pointer): Adjust.
5263         (indirect_synthetic_pointer): Adjust.
5264         (coerce_pieced_ref): Adjust.
5265         (free_pieced_value_closure):  Adjust.  Use delete to free
5266         piece_closure.
5267         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5268         to allocate_piece_closure.
5269         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5270
5271 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5272
5273         * probe.h (probe_ops_cp): Remove typedef.
5274         (DEF_VEC_P (probe_ops_cp)): Remove.
5275         (all_probe_ops): Change type to std::vector.
5276         * probe.c (info_probes_for_ops): Adjust to vector change.
5277         (probe_linespec_to_ops): Likewise.
5278         (all_probe_ops): Change type to std::vector.
5279         (_initialize_probe): Adjust to vector change.
5280         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5281         * elfread.c (elf_get_probes): Likewise.
5282         * stap-probe.c (_initialize_stap_probe): Likewise.
5283
5284 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5285
5286         * probe.h (struct bound_probe): Define constructors.
5287         * probe.c (bound_probe_s): Remove typedef.
5288         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5289         (collect_probes): Change return type to std::vector, remove
5290         cleanup.
5291         (compare_probes): Return bool, change parameter type.  Change
5292         semantic to "less than".
5293         (gen_ui_out_table_header_info): Change parameter to std::vector
5294         and update.
5295         (exists_probe_with_pops): Likewise.
5296         (info_probes_for_ops): Update to std::vector change.
5297         (enable_probes_command): Likewise.
5298         (disable_probes_command): Likewise.
5299
5300 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5301
5302         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5303         vec to std::vector.
5304         * probe.c (parse_probes_in_pspace): Update.
5305         (find_probes_in_objfile): Update.
5306         (find_probe_by_pc): Update.
5307         (collect_probes): Update.
5308         (probe_any_get_probes): Update.
5309         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5310         return type to reference to std::vector.
5311         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5312         std::vector and update.
5313         (dtrace_process_dof): Likewise.
5314         (dtrace_get_probes): Likewise.
5315         * elfread.c (elf_get_probes): Change return type to std::vector,
5316         store an std::vector in bfd_data.
5317         (probe_key_free): Update to std::vector.
5318         * stap-probe.c (handle_stap_probe): Change parameter to
5319         std::vector and update.
5320         (stap_get_probes): Likewise.
5321         * symfile-debug.c (debug_sym_get_probes): Change return type to
5322         std::vector and update.
5323
5324 2017-09-11  Tom Tromey  <tom@tromey.com>
5325
5326         * breakpoint.c (program_breakpoint_here_p): Update.
5327         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5328         from make_show_memory_breakpoints_cleanup.  Return a
5329         scoped_restore_tmpl<int>.
5330         (restore_show_memory_breakpoints): Remove.
5331         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5332         * mem-break.c (memory_validate_breakpoint): Update.
5333         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5334         (ia64_memory_remove_breakpoint): Update.
5335         (ia64_breakpoint_from_pc): Update.
5336         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5337         from make_show_memory_breakpoints_cleanup.
5338
5339 2017-09-11  Tom Tromey  <tom@tromey.com>
5340
5341         * d-namespace.c (d_lookup_symbol): Use std::string.
5342         (find_symbol_in_baseclass): Likewise.
5343
5344 2017-09-11  Tom Tromey  <tom@tromey.com>
5345
5346         * ctf.c (ctf_start): Use std::string.
5347
5348 2017-09-11  Tom Tromey  <tom@tromey.com>
5349
5350         * ada-lang.c (is_known_support_routine): Update.
5351         (ada_unhandled_exception_name_addr_from_raise): Update.
5352         * guile/scm-frame.c (gdbscm_frame_name): Update.
5353         * python/py-frame.c (frapy_name): Update.
5354         (frapy_function): Update.
5355         * stack.h (find_frame_funname): Update.
5356         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5357         (print_frame): Update.
5358
5359 2017-09-11  Tom Tromey  <tom@tromey.com>
5360
5361         * findcmd.c (put_bits): Take a gdb::byte_vector.
5362         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5363         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5364         cleanups.
5365         (find_command): Update.
5366
5367 2017-09-11  Tom Tromey  <tom@tromey.com>
5368
5369         * cli/cli-script.c (class scoped_restore_hook_in): New.
5370         (clear_hook_in_cleanup): Remove.
5371         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5372         scoped_restore_hook_in.
5373
5374 2017-09-11  Tom Tromey  <tom@tromey.com>
5375
5376         * cli/cli-script.c (restore_interp): Remove.
5377         (read_command_lines): Use scoped_restore_interp.
5378         * interps.c (scoped_restore_interp::set_temp): Rename from
5379         interp_set_temp.
5380         * interps.h (class scoped_restore_interp): New.
5381         (interp_set_temp): Remove.
5382
5383 2017-09-11  Tom Tromey  <tom@tromey.com>
5384
5385         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5386         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5387         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5388         scoped_restore.
5389         (mi_cmd_break_insert_1): Update.
5390         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5391         scoped_restore.
5392
5393 2017-09-11  Tom Tromey  <tom@tromey.com>
5394
5395         * demangle.c (demangle_command): Update.
5396         * breakpoint.c (disable_command): Update.
5397         (enable_command): Update.
5398         (find_location_by_number): Make "number" const.  Use
5399         get_number_trailer.
5400         * cli/cli-utils.c (extract_arg): Return std::string.
5401         * probe.c (parse_probe_linespec): Update.  Change types.
5402         (collect_probes): Take string arguments.
5403         (parse_probe_linespec): Likewise.
5404         (info_probes_for_ops): Update.
5405         (enable_probes_command): Update.
5406         (disable_probes_command): Update.
5407         * break-catch-sig.c (catch_signal_split_args): Update.
5408         * mi/mi-parse.c (mi_parse): Update.
5409
5410 2017-09-11  Tom Tromey  <tom@tromey.com>
5411
5412         * language.h (language_enum): Make argument const.
5413         * language.c (language_enum): Make argument const.
5414
5415 2017-09-11  Tom Tromey  <tom@tromey.com>
5416
5417         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5418         as function.
5419         (skip_to_space): Rename from skip_to_space_const.
5420         * common/common-utils.c (skip_to_space): New function.
5421         (skip_to_space): Rename from skip_to_space_const.
5422         * cli/cli-utils.h (get_number): Rename from get_number_const.
5423         (extract_arg): Rename from extract_arg_const.
5424         * cli/cli-utils.c (get_number): Rename from get_number_const.
5425         (extract_arg): Rename from extract_arg_const.
5426         (number_or_range_parser::get_number): Use ::get_number.
5427         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5428         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5429         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5430         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5431         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5432         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5433         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5434         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5435
5436 2017-09-11  Tom Tromey  <tom@tromey.com>
5437
5438         * python/python.c (do_start_initialization): Use
5439         py-event-types.def to initialize types.
5440         Define all object type structures.
5441         * python/python-internal.h: Don't declare event initialization
5442         functions.
5443         * python/py-threadevent.c (thread_event_object_type): Don't
5444         define.
5445         * python/py-stopevent.c (stop_event_object_type): Don't define.
5446         * python/py-signalevent.c (signal_event_object_type): Don't
5447         declare or define.
5448         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5449         (clear_objfiles_event_object_type): Don't declare or define.
5450         * python/py-infevents.c (inferior_call_pre_event_object_type)
5451         (inferior_call_post_event_object_type)
5452         (register_changed_event_object_type)
5453         (memory_changed_event_object_type): Don't declare or define.
5454         * python/py-inferior.c (new_thread_event_object_type)
5455         (new_inferior_event_object_type)
5456         (inferior_deleted_event_object_type): Don't declare or define.
5457         * python/py-exitedevent.c (exited_event_object_type): Don't
5458         declare or define.
5459         * python/py-evts.c (gdbpy_initialize_py_events): Use
5460         py-all-events.def.
5461         * python/py-events.h (thread_event_object_type): Don't declare.
5462         (events_object): Use py-all-events.def.
5463         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5464         py-event-types.def.
5465         * python/py-event-types.def: New file.
5466         * python/py-continueevent.c (create_continue_event_object): Don't
5467         declare or define.
5468         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5469         declare or define.
5470         * python/py-all-events.def: New file.
5471
5472 2017-09-11  Tom Tromey  <tom@tromey.com>
5473
5474         * python/py-threadevent.c (create_thread_event_object): Return
5475         gdbpy_ref.
5476         * python/py-stopevent.h (create_stop_event_object)
5477         (create_breakpoint_event_object, create_signal_event_object):
5478         Update.
5479         * python/py-stopevent.c (create_stop_event_object): Return
5480         gdbpy_ref.
5481         (emit_stop_event): Update.
5482         * python/py-signalevent.c (create_signal_event_object): Return
5483         gdbpy_ref.
5484         * python/py-infevents.c (create_inferior_call_event_object):
5485         Update.
5486         * python/py-event.h (create_event_object)
5487         (create_thread_event_object): Update.
5488         * python/py-event.c (create_event_object): Return gdbpy_ref.
5489         * python/py-continueevent.c: Return gdbpy_ref.
5490         * python/py-bpevent.c (create_breakpoint_event_object): Return
5491         gdbpy_ref.
5492
5493 2017-09-11  Tom Tromey  <tom@tromey.com>
5494
5495         PR python/15622:
5496         * NEWS: Add entry.
5497         * python/python.c (do_start_initialization): Initialize new event
5498         types.
5499         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5500         (gdbpy_initialize_inferior_deleted_event)
5501         (gdbpy_initialize_new_thread_event): Declare.
5502         * python/py-threadevent.c (create_thread_event_object): Add option
5503         "thread" parameter.
5504         * python/py-inferior.c (new_thread_event_object_type)
5505         (new_inferior_event_object_type)
5506         (inferior_deleted_event_object_type): Declare.
5507         (python_new_inferior, python_inferior_deleted): New functions.
5508         (add_thread_object): Emit new_thread event.
5509         (gdbpy_initialize_inferior): Attach new functions to corresponding
5510         observers.
5511         (new_thread, new_inferior, inferior_deleted): Define new event
5512         types.
5513         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5514         registries.
5515         * python/py-events.h (events_object) <new_inferior,
5516         inferior_deleted, new_thread>: New fields.
5517         * python/py-event.h (create_thread_event_breakpoint): Add optional
5518         "thread" parameter.
5519
5520 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5521
5522         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5523         check current_ui instead.
5524         (internal_vproblem): Likewise.
5525
5526 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5527
5528         * thread.c (print_thread_info_1): Remove unnecessary calls to
5529         uiout->is_mi_like_p.
5530
5531 2017-09-09  Tom Tromey  <tom@tromey.com>
5532
5533         * namespace.h (add_using_directive): Update.
5534         * namespace.c (add_using_directive): Change type of excludes to
5535         std::vector.
5536         * dwarf2read.c (read_import_statement): Use std::vector.
5537         (read_namespace): Update.
5538         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5539
5540 2017-09-09  Tom Tromey  <tom@tromey.com>
5541
5542         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5543
5544 2017-09-09  Tom Tromey  <tom@tromey.com>
5545
5546         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5547
5548 2017-09-09  Tom Tromey  <tom@tromey.com>
5549
5550         * stack.c (func_command): Use gdb::def_vector.
5551
5552 2017-09-09  Tom Tromey  <tom@tromey.com>
5553
5554         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5555         ui_out_emit_list, ui_out_emit_tuple.
5556         (mi_cmd_var_update): Likewise.
5557
5558 2017-09-09  Tom Tromey  <tom@tromey.com>
5559
5560         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5561         ui_out_redirect_pop.
5562         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5563         ui_out_redirect_pop.
5564         * utils.c (do_ui_out_redirect_pop)
5565         (make_cleanup_ui_out_redirect_pop): Remove.
5566         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5567         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5568         * ui-out.h (ui_out_redirect_pop): New class.
5569
5570 2017-09-09  Tom Tromey  <tom@tromey.com>
5571
5572         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5573         (list_available_thread_groups, mi_cmd_list_thread_groups)
5574         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5575         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5576         Likewise.
5577
5578 2017-09-09  Tom Tromey  <tom@tromey.com>
5579
5580         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5581         ui_out_emit_tuple.
5582
5583 2017-09-09  Tom Tromey  <tom@tromey.com>
5584
5585         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5586         * stack.c (print_frame): Use ui_out_emit_tuple.
5587         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5588         (info_spu_mailbox_command, info_spu_dma_command)
5589         (info_spu_proxydma_command): Likewise.
5590         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5591         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5592         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5593         ui_out_emit_tuple.
5594         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5595
5596 2017-09-09  Tom Tromey  <tom@tromey.com>
5597
5598         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5599         (class ui_out_emit_table): Update comment.
5600         * ui-out.c (do_cleanup_table_end)
5601         (make_cleanup_ui_out_table_begin_end): Remove.
5602         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5603         (info_spu_dma_cmdlist): Likewise.
5604         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5605         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5606         ui_out_emit_table.
5607
5608 2017-09-09  Tom Tromey  <tom@tromey.com>
5609
5610         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5611         ui_out_emit_list, gdb::optional.
5612
5613 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5614
5615         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5616         prototype.
5617         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5618         prototype.
5619         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5620         prototype.
5621         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5622         * ada-exp.y: Remove _initialize_ada_exp prototype.
5623         * ada-lang.c: Remove _initialize_ada_language prototype.
5624         * ada-tasks.c: Remove _initialize_tasks prototype.
5625         * addrmap.c: Remove _initialize_addrmap prototype.
5626         * agent.c: Remove _initialize_agent prototype.
5627         * aix-thread.c: Remove _initialize_aix_thread prototype.
5628         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5629         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5630         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5631         prototype.
5632         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5633         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5634         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5635         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5636         prototype.
5637         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5638         prototype.
5639         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5640         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5641         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5642         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5643         prototype.
5644         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5645         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5646         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5647         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5648         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5649         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5650         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5651         prototype.
5652         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5653         prototype.
5654         * annotate.c: Remove _initialize_annotate prototype.
5655         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5656         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5657         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5658         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5659         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5660         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5661         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5662         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5663         prototype.
5664         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5665         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5666         * auto-load.c: Remove _initialize_auto_load prototype.
5667         * auxv.c: Remove _initialize_auxv prototype.
5668         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5669         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5670         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5671         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5672         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5673         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5674         prototype.
5675         * break-catch-throw.c: Remove _initialize_break_catch_throw
5676         prototype.
5677         * breakpoint.c: Remove _initialize_breakpoint prototype.
5678         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5679         * btrace.c: Remove _initialize_btrace prototype.
5680         * charset.c: Remove _initialize_charset prototype.
5681         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5682         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5683         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5684         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5685         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5686         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5687         * coffread.c: Remove _initialize_coffread prototype.
5688         * compile/compile.c: Remove _initialize_compile prototype.
5689         * complaints.c: Remove _initialize_complaints prototype.
5690         * completer.c: Remove _initialize_completer prototype.
5691         * copying.awk: Remove _initialize_copying prototype.
5692         * copying.c: Regenerate.
5693         * core-regset.c: Remove _initialize_core_regset prototype.
5694         * corefile.c: Remove _initialize_core prototype.
5695         * corelow.c: Remove _initialize_corelow prototype.
5696         * cp-abi.c: Remove _initialize_cp_abi prototype.
5697         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5698         * cp-support.c: Remove _initialize_cp_support prototype.
5699         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5700         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5701         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5702         * ctf.c: Remove _initialize_ctf prototype.
5703         * d-lang.c: Remove _initialize_d_language prototype.
5704         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5705         prototype.
5706         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5707         * dbxread.c: Remove _initialize_dbxread prototype.
5708         * dcache.c: Remove _initialize_dcache prototype.
5709         * demangle.c: Remove _initialize_demangler prototype.
5710         * disasm-selftests.c: Remove _initialize_disasm_selftests
5711         prototype.
5712         * disasm.c: Remove _initialize_disasm prototype.
5713         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5714         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5715         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5716         prototype.
5717         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5718         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5719         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5720         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5721         * elfread.c: Remove _initialize_elfread prototype.
5722         * exec.c: Remove _initialize_exec prototype.
5723         * extension.c: Remove _initialize_extension prototype.
5724         * f-lang.c: Remove _initialize_f_language prototype.
5725         * f-valprint.c: Remove _initialize_f_valprint prototype.
5726         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5727         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5728         * filesystem.c: Remove _initialize_filesystem prototype.
5729         * findcmd.c: Remove _initialize_mem_search prototype.
5730         * fork-child.c: Remove _initialize_fork_child prototype.
5731         * frame-base.c: Remove _initialize_frame_base prototype.
5732         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5733         * frame.c: Remove _initialize_frame prototype.
5734         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5735         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5736         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5737         * gcore.c: Remove _initialize_gcore prototype.
5738         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5739         * gdbarch.c: Regenerate.
5740         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5741         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5742         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5743         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5744         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5745         * go-lang.c: Remove _initialize_go_language prototype.
5746         * go32-nat.c: Remove _initialize_go32_nat prototype.
5747         * guile/guile.c: Remove _initialize_guile prototype.
5748         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5749         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5750         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5751         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5752         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5753         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5754         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5755         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5756         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5757         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5758         prototype.
5759         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5760         prototype.
5761         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5762         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5763         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5764         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5765         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5766         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5767         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5768         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5769         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5770         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5771         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5772         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5773         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5774         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5775         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5776         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5777         prototype.
5778         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5779         prototype.
5780         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5781         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5782         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5783         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5784         * infcall.c: Remove _initialize_infcall prototype.
5785         * infcmd.c: Remove _initialize_infcmd prototype.
5786         * inferior.c: Remove _initialize_inferiors prototype.
5787         * inflow.c: Remove _initialize_inflow prototype.
5788         * infrun.c: Remove _initialize_infrun prototype.
5789         * interps.c: Remove _initialize_interpreter prototype.
5790         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5791         * jit.c: Remove _initialize_jit prototype.
5792         * language.c: Remove _initialize_language prototype.
5793         * linux-fork.c: Remove _initialize_linux_fork prototype.
5794         * linux-nat.c: Remove _initialize_linux_nat prototype.
5795         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5796         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5797         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5798         * m2-lang.c: Remove _initialize_m2_language prototype.
5799         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5800         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5801         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5802         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5803         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5804         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5805         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5806         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5807         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5808         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5809         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5810         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5811         * machoread.c: Remove _initialize_machoread prototype.
5812         * macrocmd.c: Remove _initialize_macrocmd prototype.
5813         * macroscope.c: Remove _initialize_macroscope prototype.
5814         * maint.c: Remove _initialize_maint_cmds prototype.
5815         * mdebugread.c: Remove _initialize_mdebugread prototype.
5816         * memattr.c: Remove _initialize_mem prototype.
5817         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5818         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5819         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5820         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5821         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5822         * microblaze-linux-tdep.c: Remove
5823         _initialize_microblaze_linux_tdep prototype.
5824         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5825         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5826         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5827         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5828         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5829         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5830         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5831         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5832         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5833         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5834         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5835         prototype.
5836         * mipsread.c: Remove _initialize_mipsread prototype.
5837         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5838         prototype.
5839         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5840         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5841         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5842         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5843         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5844         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5845         prototype.
5846         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5847         * nto-procfs.c: Remove _initialize_procfs prototype.
5848         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5849         * objc-lang.c: Remove _initialize_objc_language prototype.
5850         * objfiles.c: Remove _initialize_objfiles prototype.
5851         * observer.c: Remove observer_test_first_notification_function,
5852         observer_test_second_notification_function,
5853         observer_test_third_notification_function, and
5854         _initialize_observer prototypes.
5855         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5856         * osabi.c: Remove _initialize_gdb_osabi prototype.
5857         * osdata.c: Remove _initialize_osdata prototype.
5858         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5859         * parse.c: Remove _initialize_parse prototype.
5860         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5861         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5862         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5863         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5864         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5865         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5866         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5867         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5868         * printcmd.c: Remove _initialize_printcmd prototype.
5869         * probe.c: Remove _initialize_probe prototype.
5870         * proc-api.c: Remove _initialize_proc_api prototype.
5871         * proc-events.c: Remove _initialize_proc_events prototype.
5872         * proc-service.c: Remove _initialize_proc_service prototype.
5873         * procfs.c: Remove _initialize_procfs prototype.
5874         * psymtab.c: Remove _initialize_psymtab prototype.
5875         * python/python.c: Remove _initialize_python prototype.
5876         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5877         * record-btrace.c: Remove _initialize_record_btrace prototype.
5878         * record-full.c: Remove _initialize_record_full prototype.
5879         * record.c: Remove _initialize_record prototype.
5880         * regcache.c: Remove _initialize_regcache prototype.
5881         * reggroups.c: Remove _initialize_reggroup prototype.
5882         * remote-notif.c: Remove _initialize_notif prototype.
5883         * remote-sim.c: Remove _initialize_remote_sim prototype.
5884         * remote.c: Remove _initialize_remote prototype.
5885         * reverse.c: Remove _initialize_reverse prototype.
5886         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5887         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5888         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5889         prototype.
5890         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5891         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5892         * rust-exp.y: Remove _initialize_rust_exp prototype.
5893         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5894         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5895         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5896         * score-tdep.c: Remove _initialize_score_tdep prototype.
5897         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5898         prototype.
5899         * ser-go32.c: Remove _initialize_ser_dos prototype.
5900         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5901         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5902         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5903         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5904         * serial.c: Remove _initialize_serial prototype.
5905         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5906         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5907         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5908         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5909         * skip.c: Remove _initialize_step_skip prototype.
5910         * sol-thread.c: Remove _initialize_sol_thread prototype.
5911         * solib-aix.c: Remove _initialize_solib_aix prototype.
5912         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5913         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5914         * solib-frv.c: Remove _initialize_frv_solib prototype.
5915         * solib-spu.c: Remove _initialize_spu_solib prototype.
5916         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5917         * solib-target.c: Remove _initialize_solib_target prototype.
5918         * solib.c: Remove _initialize_solib prototype.
5919         * source.c: Remove _initialize_source prototype.
5920         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5921         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5922         prototype.
5923         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5924         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5925         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5926         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5927         prototype.
5928         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5929         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5930         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5931         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5932         prototype.
5933         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5934         prototype.
5935         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5936         prototype.
5937         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5938         prototype.
5939         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5940         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5941         prototype.
5942         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5943         prototype.
5944         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5945         prototype.
5946         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5947         prototype.
5948         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5949         prototype.
5950         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5951         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5952         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5953         * stabsread.c: Remove _initialize_stabsread prototype.
5954         * stack.c: Remove _initialize_stack prototype.
5955         * stap-probe.c: Remove _initialize_stap_probe prototype.
5956         * std-regs.c: Remove _initialize_frame_reg prototype.
5957         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5958         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5959         * symfile.c: Remove _initialize_symfile prototype.
5960         * symmisc.c: Remove _initialize_symmisc prototype.
5961         * symtab.c: Remove _initialize_symtab prototype.
5962         * target-dcache.c: Remove _initialize_target_dcache prototype.
5963         * target-descriptions.c: Remove _initialize_target_descriptions
5964         prototype.
5965         * thread.c: Remove _initialize_thread prototype.
5966         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5967         prototype.
5968         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5969         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5970         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5971         prototype.
5972         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5973         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5974         * tracefile.c: Remove _initialize_tracefile prototype.
5975         * tracepoint.c: Remove _initialize_tracepoint prototype.
5976         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5977         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5978         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5979         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5980         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5981         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5982         * tui/tui.c: Remove _initialize_tui prototype.
5983         * typeprint.c: Remove _initialize_typeprint prototype.
5984         * user-regs.c: Remove _initialize_user_regs prototype.
5985         * utils.c: Remove _initialize_utils prototype.
5986         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5987         * valarith.c: Remove _initialize_valarith prototype.
5988         * valops.c: Remove _initialize_valops prototype.
5989         * valprint.c: Remove _initialize_valprint prototype.
5990         * value.c: Remove _initialize_values prototype.
5991         * varobj.c: Remove _initialize_varobj prototype.
5992         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5993         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5994         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5995         * windows-nat.c: Remove _initialize_windows_nat,
5996         _initialize_check_for_gdb_ini, and _initialize_loadable
5997         prototypes.
5998         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5999         * xcoffread.c: Remove _initialize_xcoffread prototype.
6000         * xml-support.c: Remove _initialize_xml_support prototype.
6001         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6002         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6003         prototype.
6004         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6005         prototype.
6006         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6007
6008 2017-09-08  Keith Seitz  <keiths@redhat.com>
6009
6010         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6011         field.
6012
6013 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6014
6015         * f-valprint.c (f_val_print): Remove check for one byte
6016         sized integers. Remove printing of character type.
6017
6018 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6019             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6020             Bernhard Heckel  <bernhard.heckel@intel.com>
6021
6022         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6023         to maintain proper indentation when printing pointers/refs.
6024
6025 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6026
6027         GDB 8.0.1 released.
6028
6029 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6030
6031         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6032
6033 2017-09-05  Tom Tromey  <tom@tromey.com>
6034
6035         * parse.c (funcall_chain): Now a std::vector.
6036         (start_arglist, end_arglist): Simplify.
6037         (free_funcalls): Remove.
6038         (parse_exp_in_context_1): Remove cleanup.
6039
6040 2017-09-05  Tom Tromey  <tom@tromey.com>
6041
6042         * go-exp.y (go_parse): Don't create a cleanup.
6043
6044 2017-09-05  Tom Tromey  <tom@tromey.com>
6045
6046         * d-exp.y (PrimaryExpression): Use std::string.
6047         (d_parse): Don't create a cleanup.
6048
6049 2017-09-05  Tom Tromey  <tom@tromey.com>
6050
6051         * utils.c (do_clear_parser_state): Remove.
6052         (make_cleanup_clear_parser_state): Remove.
6053         * p-exp.y (pascal_parse): Use scoped_restore.
6054         * m2-exp.y (m2_parse): Use scoped_restore.
6055         * f-exp.y (f_parse): Use scoped_restore.
6056         * d-exp.y (d_parse): Use scoped_restore.
6057         * c-exp.y (c_parse): Use scoped_restore.
6058         * ada-exp.y (ada_parse): Use scoped_restore.
6059         * utils.h (make_cleanup_clear_parser_state): Remove.
6060
6061 2017-09-06  Keith Seitz  <keiths@redhat.com>
6062
6063         * dwarf2read.c (dw2_linkage_name_attr): New function.
6064         (dw2_linkage_name): New function.
6065         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6066         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6067         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6068
6069 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6070
6071         * config/djgpp/djconfig.sh: Correct shell portability issue.
6072
6073 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6074
6075         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6076
6077 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6078
6079         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6080         * NEWS: Mention new FreeBSD/mips native configuration.
6081         * configure.host: Add aarch64*-*-freebsd*.
6082         * configure.nat: Likewise.
6083         * aarch64-fbsd-nat.c: New file.
6084
6085 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6086
6087         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6088         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6089         * NEWS: Mention new FreeBSD/aarch64 target.
6090         * configure.tgt: Add aarch64*-*-freebsd*.
6091         * aarch64-fbsd-tdep.c: New file.
6092         * aarch64-fbsd-tdep.h: New file.
6093
6094 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6095
6096         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6097
6098 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6099
6100         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6101         of TLS symbols.
6102
6103 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6104
6105         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6106         call.
6107
6108 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6109
6110         * infrun.c (follow_exec): Call add_thread after
6111         target_find_description.
6112
6113 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6114
6115         * infrun.c (handle_inferior_event_1): When exec'ing, read
6116         stop_pc after follow_exec.
6117
6118 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6119
6120         * remote.c (process_g_packet): Update error message.
6121
6122 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6123
6124         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6125         targets.
6126
6127 2017-09-05  Pedro Alves  <palves@redhat.com>
6128
6129         * eval.c (eval_call, evaluate_funcall): New functions, factored
6130         out from ...
6131         (evaluate_subexp_standard): ... this.
6132
6133 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6134
6135         * amd64-tdep.c (amd64_target_description): Create target
6136         descriptions.
6137         (_initialize_amd64_tdep): Don't call functions
6138         initialize_tdesc_amd64_*.  Add self tests.
6139         * arch/amd64.c (amd64_create_target_description): Add parameter
6140         is_linux.  Call set_tdesc_osabi if is_linux is true.
6141         * arch/amd64.h (amd64_create_target_description): Update the
6142         declaration.
6143         * arch/i386.c (i386_create_target_description): Add parameter
6144         is_linux.  Call set_tdesc_osabi if is_linux is true.
6145         * arch/i386.h (i386_create_target_description): Update
6146         declaration.
6147         * configure.tgt: Add i386.o to gdb_target_obs.
6148         * features/Makefile (XMLTOC): Remove i386/*.xml.
6149         * features/i386/amd64-avx-avx512.c: Remove.
6150         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6151         * features/i386/amd64-avx-mpx.c: Remove.
6152         * features/i386/amd64-avx.c: Remove.
6153         * features/i386/amd64-mpx.c: Remove.
6154         * features/i386/amd64.c: Remove.
6155         * features/i386/i386-avx-avx512.c: Remove.
6156         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6157         * features/i386/i386-avx-mpx.c: Remove.
6158         * features/i386/i386-avx.c: Remove.
6159         * features/i386/i386-mmx.c: Remove.
6160         * features/i386/i386-mpx.c: Remove.
6161         * features/i386/i386.c: Remove.
6162         * i386-tdep.c: Don't include features/i386/i386*.c., include
6163         target-descriptions.h and arch/i386.h.
6164         (i386_target_description): Create target descriptions.
6165         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6166         functions.  Do self tests.
6167
6168 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6169
6170         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6171         * features/i386/amd64-avx-avx512-linux.c: Removed.
6172         * features/i386/amd64-avx-linux.c: Removed.
6173         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6174         * features/i386/amd64-avx-mpx-linux.c: Removed.
6175         * features/i386/amd64-linux.c: Removed.
6176         * features/i386/amd64-mpx-linux.c: Removed.
6177         * features/i386/x32-avx-avx512-linux.c: Removed.
6178         * features/i386/x32-avx-linux.c: Removed.
6179         * features/i386/x32-linux.c: Removed.
6180
6181 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6182
6183         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6184         features/i386/*.c.
6185         (amd64_linux_read_description): Call
6186         amd64_create_target_description.
6187         * arch/amd64.c: New file.
6188         * arch/amd64.h: New file.
6189         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6190         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6191
6192 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6193
6194         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6195         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6196         (amd64_linux_read_description): Create target descriptions.
6197         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6198         functions.  Add unit tests.
6199         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6200         x32-core.xml.
6201         * features/i386/64bit-avx.c: Generated.
6202         * features/i386/64bit-avx512.c: Generated.
6203         * features/i386/64bit-core.c: Generated.
6204         * features/i386/64bit-linux.c: Generated.
6205         * features/i386/64bit-mpx.c: Generated.
6206         * features/i386/64bit-pkeys.c: Generated.
6207         * features/i386/64bit-segments.c: Generated.
6208         * features/i386/64bit-sse.c: Generated.
6209         * features/i386/x32-core.c: Generated.
6210         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6211         c files for amd64-linux and x32-linux.
6212
6213 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6214
6215         * amd64-linux-tdep.c (amd64_linux_read_description): New
6216         function.
6217         (amd64_linux_core_read_description): Call
6218         amd64_linux_read_description.
6219         (amd64_linux_init_abi): Likewise.
6220         (amd64_x32_linux_init_abi): Likewise.
6221         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6222         * x86-linux-nat.c (x86_linux_read_description): Call
6223         amd64_linux_read_description.
6224
6225 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6226
6227         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6228         comments.
6229
6230 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6231
6232         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6233         * features/i386/i386-avx-avx512-linux.c: Remove.
6234         * features/i386/i386-avx-linux.c: Remove.
6235         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6236         * features/i386/i386-avx-mpx-linux.c: Remove.
6237         * features/i386/i386-linux.c: Remove.
6238         * features/i386/i386-mmx-linux.c: Remove.
6239         * features/i386/i386-mpx-linux.c: Remove.
6240
6241 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6242
6243         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6244         (SFILES): Add arch/i386.c.
6245         (HFILES_NO_SRCDIR): Add arch/i386.h.
6246         * arch/i386.c: New file.
6247         * arch/i386.h: New file.
6248         * arch/tdesc.h (allocate_target_description): Declare.
6249         (set_tdesc_architecture): Declare.
6250         (set_tdesc_osabi): Declare.
6251         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6252         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6253         include arch/i386.h.
6254         (i386_linux_read_description): Remove code and call
6255         i386_create_target_description.
6256         (set_tdesc_architecture): New function.
6257         (set_tdesc_osabi): New function.
6258         * target-descriptions.h (allocate_target_description): Remove.
6259
6260 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6261
6262         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6263         * target-descriptions.c (tdesc_create_feature): Likewise, and
6264         adjust code.
6265         * features/i386/32bit-avx.c: Re-generated.
6266         * features/i386/32bit-avx512.c: Re-generated.
6267         * features/i386/32bit-core.c: Re-generated.
6268         * features/i386/32bit-linux.c: Re-generated.
6269         * features/i386/32bit-mpx.c: Re-generated.
6270         * features/i386/32bit-pkeys.c: Re-generated.
6271         * features/i386/32bit-sse.c: Re-generated.
6272
6273 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6274
6275         * regformats/regdef.h (struct reg): Override operator == and !=.
6276
6277 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6278
6279         * arch/tdesc.h: New file.
6280         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6281         * target-descriptions.c: Update comments.
6282         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6283         declarations.
6284         * features/i386/32bit-avx.c: Re-generated.
6285         * features/i386/32bit-avx512.c: Re-generated.
6286         * features/i386/32bit-core.c: Re-generated.
6287         * features/i386/32bit-linux.c: Re-generated.
6288         * features/i386/32bit-mpx.c: Re-generated.
6289         * features/i386/32bit-pkeys.c: Re-generated.
6290         * features/i386/32bit-sse.c: Re-generated.
6291
6292 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6293
6294         * regformats/regdat.sh: Update generated code.
6295
6296 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6297
6298         * regformats/regdat.sh: Adjust code order.
6299
6300 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6301
6302         * expprint.c (dump_subexp_body_standard): Use constant format
6303         string in fprintf_filtered call.
6304
6305 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6306
6307         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6308         NetBSD/i386.
6309         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6310
6311 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6312
6313         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6314
6315 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6316
6317         * bsd-kvm.o: Define _KMEMUSER.
6318         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6319         * configure: Regenerate.
6320
6321 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6322
6323         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6324         * i386-fbsd-nat.c: Likewise.
6325
6326 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6327
6328         * unittests/array-view-selftests.c: Add include of <array>.
6329
6330 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6331
6332         * spu-tdep.c (flush_ea_cache): Add missing argument to
6333         call_function_by_hand.
6334
6335 2017-09-04  Pedro Alves  <palves@redhat.com>
6336
6337         * NEWS (Safer support for debugging with no debug info): New.
6338
6339 2017-09-04  Pedro Alves  <palves@redhat.com>
6340
6341         * c-exp.y (function_method, function_method_void): Add current
6342         instance flags to TYPE_INSTANCE.
6343         * dwarf2read.c (check_modifier): New.
6344         (compute_delayed_physnames): Assert that only C++ adds delayed
6345         physnames.  Mark fn_fields as const/volatile depending on
6346         physname.
6347         * eval.c (make_params): New type_instance_flags parameter.  Use
6348         it as the new type's instance flags.
6349         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6350         flags element and pass it to make_params.
6351         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6352         instance flags element.
6353         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6354         * gdbtypes.h: Include "enum-flags.h".
6355         (type_instance_flags): New enum-flags type.
6356         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6357         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6358         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6359         (follow_type_instance_flags): New function.
6360         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6361         * parser-defs.h (follow_type_instance_flags): Declare.
6362         * valops.c (value_struct_elt_for_reference): const/volatile must
6363         match too.
6364
6365 2017-09-04  Pedro Alves  <palves@redhat.com>
6366
6367         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6368         function/method scopes; lookup the nested name as a function local
6369         static variable.
6370
6371 2017-09-04  Pedro Alves  <palves@redhat.com>
6372
6373         (%type <voidval>): Add function_method.
6374         * c-exp.y (exp): New production for calls with no arguments.
6375         (function_method, function_method_void_or_typelist): New
6376         productions.
6377         (exp): New production for "method()::static_var".
6378         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6379         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6380         Handle OP_FUNC_STATIC_VAR.
6381         * parse.c (operator_length_standard):
6382         Handle OP_FUNC_STATIC_VAR.
6383
6384 2017-09-04  Pedro Alves  <palves@redhat.com>
6385
6386         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6387         handling.
6388         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6389         Ditto.
6390         * parse.c (operator_length_standard, operator_check_standard):
6391         Ditto.
6392         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6393
6394 2017-09-04  Pedro Alves  <palves@redhat.com>
6395
6396         * ax-gdb.c: Include "typeprint.h".
6397         (gen_expr_for_cast): New function.
6398         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6399         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6400         type is unknown.
6401         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6402         nodebug_data_symbol.
6403         * eval.c: Include "typeprint.h".
6404         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6405         Error out if symbol has unknown type.
6406         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6407         evaluate_subexp_for_cast.
6408         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6409         OP_VAR_MSYM_VALUE.
6410         (evaluate_subexp_for_cast): New function.
6411         * gdbtypes.c (init_nodebug_var_type): New function.
6412         (objfile_type): Use it to initialize types of variables with no
6413         debug info.
6414         * typeprint.c (error_unknown_type): New.
6415         * typeprint.h (error_unknown_type): New declaration.
6416         * compile/compile-c-types.c (convert_type_basic): Handle
6417         TYPE_CODE_ERROR; warn and fallback to int for variables with
6418         unknown type.
6419
6420 2017-09-04  Pedro Alves  <palves@redhat.com>
6421
6422         * eval.c (evaluate_var_value): New function, factored out from ...
6423         (evaluate_subexp_standard): ... here.
6424
6425 2017-09-04  Pedro Alves  <palves@redhat.com>
6426
6427         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6428         Remove useless assignments to 'op'.
6429
6430 2017-09-04  Pedro Alves  <palves@redhat.com>
6431
6432         * eval.c (eval_skip_value): New function.
6433         (evaluate_subexp_standard): Use it.
6434
6435 2017-09-04  Pedro Alves  <palves@redhat.com>
6436
6437         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6438         function name from symbol/minsym and pass it to
6439         error_call_unknown_return_type.
6440
6441 2017-09-04  Pedro Alves  <palves@redhat.com>
6442
6443         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6444         * ax-gdb.c (gen_msym_var_ref): New function.
6445         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6446         * eval.c (evaluate_var_msym_value): New function.
6447         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6448         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6449         to call_function_by_hand.
6450         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6451         Handle OP_VAR_MSYM_VALUE.
6452         (union exp_element) <msymbol>: New field.
6453         * minsyms.h (struct type): Forward declare.
6454         (find_minsym_type_and_address): Declare.
6455         * parse.c (write_exp_elt_msym): New function.
6456         (write_exp_msymbol): Delete, refactored as ...
6457         (find_minsym_type_and_address): ... this new function.
6458         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6459         (operator_length_standard, operator_check_standard): Handle
6460         OP_VAR_MSYM_VALUE.
6461         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6462
6463 2017-09-04  Pedro Alves  <palves@redhat.com>
6464
6465         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6466         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6467         unknown.
6468         * ada-typeprint.c (print_func_type): Handle functions with unknown
6469         return type.
6470         * c-typeprint.c (c_type_print_base): Handle functions and methods
6471         with unknown return type.
6472         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6473         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6474         * compile/compile-c-types.c: Include "objfiles.h".
6475         (convert_func): For functions with unknown return type, warn and
6476         default to int.
6477         * compile/compile-object-run.c (compile_object_run): Adjust call
6478         to call_function_by_hand_dummy.
6479         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6480         call_function_by_hand.
6481         * eval.c (evaluate_subexp_standard): Adjust calls to
6482         call_function_by_hand.  Handle functions and methods with unknown
6483         return type.  Pass expect_type to call_function_by_hand.
6484         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6485         return type.
6486         * gcore.c (call_target_sbrk): Adjust call to
6487         call_function_by_hand.
6488         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6489         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6490         an integer address type instead of nodebug.
6491         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6492         call_function_by_hand.
6493         * infcall.c (error_call_unknown_return_type): New function.
6494         (call_function_by_hand): New "default_return_type" parameter.
6495         Pass it down.
6496         (call_function_by_hand_dummy): New "default_return_type"
6497         parameter.  Use it instead of defaulting to int.  If there's no
6498         default and the return type is unknown, throw an error.  If
6499         there's a default return type, and the called function has no
6500         debug info, then assume the function is prototyped.
6501         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6502         New "default_return_type" parameter.
6503         (error_call_unknown_return_type): New declaration.
6504         * linux-fork.c (call_lseek): Cast return type of lseek.
6505         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6506         call_function_by_hand.
6507         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6508         calls to call_function_by_hand.
6509         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6510         return type.
6511         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6512         (value_nsstring, print_object_command): Adjust calls to
6513         call_function_by_hand.
6514         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6515         functions with unknown return type.
6516         (pascal_type_print_func_varspec_suffix): New function.
6517         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6518         TYPE_CODE_METHOD>: Use it.
6519         * python/py-value.c (valpy_call): Adjust call to
6520         call_function_by_hand.
6521         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6522         call_function_by_hand.
6523         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6524         call_function_by_hand.
6525         * valops.c (value_allocate_space_in_inferior): Adjust call to
6526         call_function_by_hand.
6527         * typeprint.c (type_print_unknown_return_type): New function.
6528         * typeprint.h (type_print_unknown_return_type): New declaration.
6529
6530 2017-09-04  Pedro Alves  <palves@redhat.com>
6531
6532         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6533         types with more than one parameter as prototyped.
6534
6535 2017-09-04  Pedro Alves  <palves@redhat.com>
6536
6537         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6538         (disassemble_command): Use gdb_disassembly_flags instead of bare
6539         int.
6540         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6541         (dump_insns, do_mixed_source_and_assembly_deprecated)
6542         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6543         Use gdb_disassembly_flags instead of bare int.
6544         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6545         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6546         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6547         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6548         (enum gdb_disassembly_flag): ... values of this new enumeration.
6549         (gdb_disassembly_flags): Define.
6550         (gdb_disassembly)
6551         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6552         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6553         gdb_disassembly_flags instead of bare int.
6554         * record-btrace.c (btrace_insn_history)
6555         (record_btrace_insn_history, record_btrace_insn_history_range)
6556         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6557         instead of bare int.
6558         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6559         Use gdb_disassembly_flags instead of bare int.
6560         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6561         Define.
6562         * target-delegates.c: Regenerate.
6563         * target.c (target_insn_history, target_insn_history_from)
6564         (target_insn_history_range): Use gdb_disassembly_flags instead of
6565         bare int.
6566         * target.h: Include "disasm.h".
6567         (struct target_ops) <to_insn_history, to_insn_history_from,
6568         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6569         int.
6570         (target_insn_history, target_insn_history_from)
6571         (target_insn_history_range): Use gdb_disassembly_flags instead of
6572         bare int.
6573
6574 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6575
6576         * cli/cli-script.c (build_command_line): For if/while commands,
6577         check whether args is empty.
6578
6579 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6580
6581         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6582         (enum command_control_type): Likewise.
6583         (struct command_line): Likewise.
6584         (free_command_lines): Likewise.
6585         (struct command_lines_deleter): Likewise.
6586         (command_line_up): Likewise.
6587         (read_command_lines): Likewise.
6588         (read_command_lines_1): Likewise.
6589         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6590         (enum command_control_type): Likewise.
6591         (struct command_line): Likewise.
6592         (free_command_lines): Likewise.
6593         (struct command_lines_deleter): Likewise.
6594         (command_line_up): Likewise.
6595         (read_command_lines): Likewise.
6596         (read_command_lines_1): Likewise.
6597         * breakpoint.h: Include cli/cli-script.h.
6598         * extension-priv.h: Likewise.
6599         * gdbcmd.h: Likewise.
6600
6601 2017-09-04  Pedro Alves  <palves@redhat.com>
6602
6603         * ada-lang.c (is_known_support_routine): Move sal declaration to
6604         where it is initialized.
6605         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6606         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6607         (clear_command, update_static_tracepoint): Remove init_sal
6608         references.  Move declarations closer to initializations.
6609         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6610         initializations.
6611         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6612         references.  Move sal declarations closer to initializations.
6613         * frame.c (find_frame_sal): Return a symtab_and_line via function
6614         return instead of output parameter.  Remove init_sal references.
6615         * frame.h (find_frame_sal): Return a symtab_and_line via function
6616         return instead of output parameter.
6617         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6618         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6619         instead of memset.
6620         (gdbscm_find_pc_line): Remove init_sal reference.
6621         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6622         references.  Move declarations closer to initializations.
6623         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6624         initializations.
6625         (finish_backward): Remove init_sal references.  Move declarations
6626         closer to initializations.
6627         * infrun.c (process_event_stop_test, handle_step_into_function)
6628         (insert_hp_step_resume_breakpoint_at_frame)
6629         (insert_step_resume_breakpoint_at_caller): Likewise.
6630         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6631         (symbol_to_sal): Likewise.
6632         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6633         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6634         to its initialization.
6635         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6636         init_sal references.  Move declarations closer to initializations.
6637         * source.c (get_current_source_symtab_and_line): Remove brace
6638         initialization.
6639         (set_current_source_symtab_and_line): Now takes the sal by const
6640         reference.  Remove brace initialization.
6641         (line_info): Remove init_sal reference.
6642         * source.h (set_current_source_symtab_and_line): Now takes a
6643         symtab_and_line via const reference.
6644         * stack.c (set_current_sal_from_frame): Adjust.
6645         (print_frame_info): Adjust.
6646         (get_last_displayed_sal): Return the sal via function return
6647         instead of via output parameter.  Simplify.
6648         (frame_info): Adjust.
6649         * stack.h (get_last_displayed_sal): Return the sal via function
6650         return instead of via output parameter.
6651         * symtab.c (init_sal): Delete.
6652         (find_pc_sect_line): Remove init_sal references.  Move
6653         declarations closer to initializations.
6654         (find_function_start_sal): Remove init_sal references.  Move
6655         declarations closer to initializations.
6656         * symtab.h (struct symtab_and_line): In-class initialize all
6657         fields.
6658         * tracepoint.c (set_traceframe_context)
6659         (print_one_static_tracepoint_marker): Remove init_sal references.
6660         Move declarations closer to initializations.
6661         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6662         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6663         declarations closer to initializations.
6664         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6665         init_sal references.  Adjust.
6666
6667 2017-09-04  Pedro Alves  <palves@redhat.com>
6668
6669         * ax-gdb.c (agent_command_1): Use range-for.
6670         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6671         * breakpoint.c: Include "common/array-view.h".
6672         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6673         parameter from struct symtabs_and_lines to
6674         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6675         (breakpoint_sals_to_pc): Change sals parameter from struct
6676         symtabs_and_lines to std::vector reference.
6677         (check_fast_tracepoint_sals): Change sals parameter from struct
6678         symtabs_and_lines to std::array_view.  Use range-for.
6679         (decode_static_tracepoint_spec): Return a std::vector instead of
6680         symtabs_and_lines.  Update.
6681         (create_breakpoint): Update.
6682         (break_range_command, until_break_command, clear_command): Update.
6683         (base_breakpoint_decode_location, bkpt_decode_location)
6684         (bkpt_probe_create_sals_from_location)
6685         (bkpt_probe_decode_location, tracepoint_decode_location)
6686         (tracepoint_probe_decode_location)
6687         (strace_marker_create_sals_from_location): Return a std::vector
6688         instead of symtabs_and_lines.
6689         (strace_marker_create_breakpoints_sal): Update.
6690         (strace_marker_decode_location): Return a std::vector instead of
6691         symtabs_and_lines.  Update.
6692         (update_breakpoint_locations): Change struct symtabs_and_lines
6693         parameters to gdb::array_view.  Adjust.
6694         (location_to_sals): Return a std::vector instead of
6695         symtabs_and_lines.  Update.
6696         (breakpoint_re_set_default): Use std::vector instead of struct
6697         symtabs_and_lines.
6698         (decode_location_default): Return a std::vector instead of
6699         symtabs_and_lines.  Update.
6700         * breakpoint.h: Include "common/array-view.h".
6701         (struct breakpoint_ops) <decode_location>: Now returns a
6702         std::vector instead of returning a symtabs_and_lines via output
6703         parameter.
6704         (update_breakpoint_locations): Change sals parameters to use
6705         gdb::array_view.
6706         * cli/cli-cmds.c (edit_command, list_command): Update to use
6707         std::vector and gdb::array_view.
6708         (ambiguous_line_spec): Adjust to use gdb::array_view and
6709         range-for.
6710         (compare_symtabs): Rename to ...
6711         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6712         const reference and adjust.
6713         (filter_sals): Rewrite using std::vector and standard algorithms.
6714         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6715         (jump_command): Update to use std::vector.
6716         * linespec.c (struct linespec_state) <canonical_names>: Update
6717         comment.
6718         (add_sal_to_sals_basic): Delete.
6719         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6720         (decode_line_2, create_sals_line_offset)
6721         (convert_address_location_to_sals, convert_linespec_to_sals)
6722         (convert_explicit_location_to_sals, parse_linespec)
6723         (event_location_to_sals, decode_line_full, decode_line_1)
6724         (decode_line_with_current_source)
6725         (decode_line_with_last_displayed, decode_objc)
6726         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6727         (linespec_result::~linespec_result): Adjust to use std::vector
6728         instead of symtabs_and_lines.
6729         * linespec.h (linespec_sals::sals): Now a std::vector.
6730         (struct linespec_result): Use std::vector, bool, and in-class
6731         initialization.
6732         (decode_line_1, decode_line_with_current_source)
6733         (decode_line_with_last_displayed): Return std::vector.
6734         * macrocmd.c (info_macros_command): Use std::vector.
6735         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6736         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6737         std::vector.
6738         * probe.h (parse_probes): Return a std::vector.
6739         * python/python.c (gdbpy_decode_line): Use std::vector and
6740         gdb::array_view.
6741         * source.c (select_source_symtab, line_info): Use std::vector.
6742         * stack.c (func_command): Use std::vector.
6743         * symtab.h (struct symtabs_and_lines): Delete.
6744         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6745
6746 2017-09-04  Pedro Alves  <palves@redhat.com>
6747
6748         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6749         unittests/array-view-selftests.c.
6750         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6751         * common/array-view.h: New file.
6752         * unittests/array-view-selftests.c: New file.
6753
6754 2017-09-04  Pedro Alves  <palves@redhat.com>
6755
6756         * cli/cli-cmds.c (edit_command): Pass message to
6757         ambiguous_line_spec.
6758         (list_command): Pass message to ambiguous_line_spec.  Say
6759         "first"/"last" instead of "start" and "end" to be consistent with
6760         the manual.
6761         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6762         them to print formatted message.
6763
6764 2017-09-04  Pedro Alves  <palves@redhat.com>
6765
6766         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6767         ftrace_update_insns by reference instead of pointer.
6768
6769 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6770
6771         * i386-go32-tdep.c: Include x86-xstate.h.
6772         (i386_go32_init_abi): Call i386_target_description.
6773         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6774         if xcr0 is X86_XSTATE_X87_MASK.
6775         * i386-tdep.h (tdesc_i386): Remove the declaration.
6776         (tdesc_i386_mmx): Likewise.
6777
6778 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6779
6780         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6781         X86_XSTATE_SSE_MASK instead of 0.
6782
6783 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6784
6785         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6786         i386_target_description.
6787         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6788         i386_target_description.
6789         * i386-tdep.c (i386_gdbarch_init): Likewise.
6790
6791 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6792
6793         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6794         (x86_darwin_init_abi_64): Call amd64_target_description.
6795         * amd64-dicos-tdep.c: Likewise.
6796         * amd64-fbsd-nat.c: Likewise.
6797         * amd64-fbsd-tdep.c: Likewise.
6798         * amd64-nbsd-tdep.c: Likewise.
6799         * amd64-obsd-tdep.c: Likewise.
6800         * amd64-sol2-tdep.c: Likewise.
6801         * amd64-windows-tdep.c: Likewise.
6802         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6803
6804 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6805
6806         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6807         (btrace_function) <insn>: Change type to use std::vector.
6808         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6809         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6810         ftrace_update_insns, ftrace_compute_global_level_offset,
6811         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6812         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6813         change to std::vector.
6814         (ftrace_update_insns): Adjust to change to std::vector, change
6815         type of INSN parameter.
6816         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6817         * record-btrace.c (btrace_call_history_insn_range,
6818         btrace_compute_src_line_range,
6819         record_btrace_frame_prev_register): Adjust to change to
6820         std::vector.
6821         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6822         to change to std::vector.
6823
6824 2017-09-03  Tom Tromey  <tom@tromey.com>
6825
6826         * corefile.c (reopen_exec_file): Use std::string.
6827
6828 2017-09-03  Tom Tromey  <tom@tromey.com>
6829
6830         * compile/compile.c (compile_register_name_mangled): Return
6831         std::string.
6832         * compile/compile-loc2c.c (pushf_register_address): Update.
6833         (pushf_register): Update.
6834         * compile/compile-c-types.c (convert_array): Update.
6835         * compile/compile-c-symbols.c (generate_vla_size): Update.
6836         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6837         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6838         (convert_one_symbol): Update.
6839         (generate_c_for_for_one_variable): Update.
6840         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6841         std::string.
6842         (generate_register_struct): Update.
6843         * compile/compile-internal.h (c_get_range_decl_name): Return a
6844         std::string.
6845         (compile_register_name_mangled): Return std::string.
6846
6847 2017-09-03  Tom Tromey  <tom@tromey.com>
6848
6849         * utils.c (perror_string): Return a std::string.
6850         (throw_perror_with_name, perror_warning_with_name): Update.
6851
6852 2017-09-03  Tom Tromey  <tom@tromey.com>
6853
6854         * demangle.c (demangle_command): Use std::string,
6855         unique_xmalloc_ptr.
6856
6857 2017-09-03  Tom Tromey  <tom@tromey.com>
6858
6859         * cli/cli-setshow.c (do_set_command): Use std::string.
6860
6861 2017-09-03  Tom Tromey  <tom@tromey.com>
6862
6863         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6864
6865 2017-09-03  Tom Tromey  <tom@tromey.com>
6866
6867         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6868
6869 2017-09-03  Tom Tromey  <tom@tromey.com>
6870
6871         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6872         gdb::unique_xmalloc_ptr.
6873
6874 2017-09-03  Tom Tromey  <tom@tromey.com>
6875
6876         * thread.c (print_thread_info_1): Use string_printf.
6877         (thread_apply_command, thread_apply_all_command): Use
6878         std::string.
6879
6880 2017-09-03  Tom Tromey  <tom@tromey.com>
6881
6882         * valprint.c (val_print_string): Update.
6883         * gdbcore.h (memory_error_message): Return std::string.
6884         * corefile.c (memory_error_message): Return std::string.
6885         (memory_error): Update.
6886         * breakpoint.c (insert_bp_location): Update.
6887
6888 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6889
6890         * target/waitstatus.h (target_waitstatus_to_string): Change
6891         return type to std::string.
6892         * target/waitstatus.c (target_waitstatus_to_string): Return
6893         std::string.
6894         * target.h (target_waitstatus_to_string): Remove declaration.
6895         * infrun.c (resume, clear_proceed_status_thread,
6896         print_target_wait_results, do_target_wait, save_waitstatus,
6897         stop_all_threads): Adjust.
6898         * record-btrace.c (record_btrace_wait): Adjust.
6899         * target-debug.h
6900         (target_debug_print_struct_target_waitstatus_p): Adjust.
6901
6902 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6903
6904         PR gdb/22046
6905         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6906         detection.
6907
6908 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6909
6910         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6911         for setting/unsetting environment variables on the remote target.
6912         (New remote packets): Add entries for QEnvironmentHexEncoded,
6913         QEnvironmentUnset and QEnvironmentReset.
6914         * common/environ.c (gdb_environ::operator=): Extend method to
6915         handle m_user_set_env_list and m_user_unset_env_list.
6916         (gdb_environ::clear): Likewise.
6917         (match_var_in_string): Change type of first parameter from 'char
6918         *' to 'const char *'.
6919         (gdb_environ::set): Extend method to handle
6920         m_user_set_env_list and m_user_unset_env_list.
6921         (gdb_environ::unset): Likewise.
6922         (gdb_environ::clear_user_set_env): New method.
6923         (gdb_environ::user_set_envp): Likewise.
6924         (gdb_environ::user_unset_envp): Likewise.
6925         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6926         m_user_unset_env_list on move constructor/assignment.
6927         (unset): Add new default parameter 'update_unset_list = true'.
6928         (clear_user_set_env): New method.
6929         (user_set_envp): Likewise.
6930         (user_unset_envp): Likewise.
6931         (m_user_set_env_list): New std::set.
6932         (m_user_unset_env_list): Likewise.
6933         * common/rsp-low.c (hex2str): New function.
6934         (bin2hex): New overload for bin2hex function.
6935         * common/rsp-low.c (hex2str): New prototype.
6936         (str2hex): New overload prototype.
6937         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6938         QEnvironmentUnset and QEnvironmentReset.
6939         (remote_protocol_features): Add QEnvironmentHexEncoded,
6940         QEnvironmentUnset and QEnvironmentReset packets.
6941         (send_environment_packet): New function.
6942         (extended_remote_environment_support): Likewise.
6943         (extended_remote_create_inferior): Call
6944         extended_remote_environment_support.
6945         (_initialize_remote): Add QEnvironmentHexEncoded,
6946         QEnvironmentUnset and QEnvironmentReset packet configs.
6947         * unittests/environ-selftests.c (gdb_selftest_env_var):
6948         New variable.
6949         (test_vector_initialization): New function.
6950         (test_init_from_host_environ): Likewise.
6951         (test_reinit_from_host_environ): Likewise.
6952         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6953         Likewise.
6954         (test_unset_set_empty_vector): Likewise.
6955         (test_vector_clear): Likewise.
6956         (test_std_move): Likewise.
6957         (test_move_constructor):
6958         (test_self_move): Likewise.
6959         (test_set_unset_reset): Likewise.
6960         (run_tests): Rewrite in terms of the functions above.
6961
6962 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6963
6964         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6965         (adi_available): Use a temp variable of type CORE_ADDR as argument
6966         3 when calling target_auxv_search.
6967         (adi_normalize_address): Use masks and xor operators to calculate
6968         normalized address.
6969         (adi_read_versions, adi_write_versions, adi_print_versions)
6970         (do_examine, do_assign): Use paddress.
6971
6972 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6973
6974         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6975         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6976         out of loop and add supply of FIR.
6977         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6978         add collect of FIR.
6979
6980 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6981
6982         PR gdb/21827
6983         * cli/cli-script.c (define_command): Don't convert command name
6984         to lower case.
6985
6986 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6987
6988         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6989         Update all callers accordingly. Remove all code blocks handling
6990         the case where DISPP is not NULL.
6991
6992 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6993
6994         PR symtab/22003
6995         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6996         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6997         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6998
6999 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7000
7001         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7002         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7003         (read_comp_units_from_section): New parameter abbrev_section, use
7004         read_and_check_comp_unit_head, allocate signatured_type if needed.
7005         (create_all_comp_units): Update read_comp_units_from_section caller.
7006
7007 2017-08-23  Pedro Alves  <palves@redhat.com>
7008
7009         PR remote/21852
7010         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7011         to null_ptid and switch to thread without reading the registers
7012         after adding the inferior.
7013
7014 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7015
7016         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7017         compile-gcc.
7018         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7019         (compile_to_object): Implement compile_gcc.
7020         (_initialize_compile): Install "set compile-gcc".  Initialize
7021         compile_gcc.
7022
7023 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7024
7025         * compile/compile.c (compile_to_object): Conditionally call
7026         set_verbose.  Conditionally call compile or compile_v0.
7027
7028 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7029
7030         * sparc64-tdep.h: (adi_normalize_address): New export.
7031         * sparc-nat.h: (open_adi_tag_fd): New export.
7032         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7033         * sparc64-linux-tdep.c:
7034         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7035         (sparc64_linux_handle_segmentation_fault): New function.
7036         (sparc64_linux_init_abi): Register
7037         sparc64_linux_handle_segmentation_fault
7038         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7039         (sparc64_addr_bits_remove): New function.
7040         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7041         (MAX_PROC_NAME_SIZE): New macro.
7042         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7043         (sparc64adilist): New variable.
7044         (adi_proc_list): New variable.
7045         (find_adi_info): New function.
7046         (add_adi_info): New function.
7047         (get_adi_info_proc): New function.
7048         (get_adi_info): New function.
7049         (info_adi_command): New function.
7050         (read_maps_entry): New function.
7051         (adi_available): New function.
7052         (adi_normalize_address): New function.
7053         (adi_align_address): New function.
7054         (adi_convert_byte_count): New function.
7055         (adi_tag_fd): New function.
7056         (adi_is_addr_mapped): New function.
7057         (adi_read_versions): New function.
7058         (adi_write_versions): New function.
7059         (adi_print_versions): New function.
7060         (do_examine): New function.
7061         (do_assign): New function.
7062         (adi_examine_command): New function.
7063         (adi_assign_command): New function.
7064         (_initialize_sparc64_adi_tdep): New function.
7065
7066 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7067
7068         * breakpoint.c (breakpoints_info): Rename to ...
7069         (info_breakpoints_command): ... this.
7070         (watchpoints_info): Rename to ...
7071         (info_watchpoints_command): ... this.
7072         (tracepoints_info): Rename to ...
7073         (info_tracepoints_command): ... this.
7074         (_initialize_breakpoint): Adjust.
7075         * dcache.c (dcache_info): Rename to ...
7076         (info_display_command): ... this.
7077         (_initialize_dcache): Adjust.
7078         * frame.h (args_info): Rename to ...
7079         (info_args_command): ... this.
7080         (locals_info): Rename to ...
7081         (info_locals_command): ... this.
7082         * infcmd.c (nofp_registers_info): Rename to ...
7083         (info_registers_command): ... this.
7084         (float_info): Rename to ...
7085         (info_float_command): ... this.
7086         (program_info): Rename to ...
7087         (info_program_command): ... this.
7088         (all_registers_info): Rename to ...
7089         (info_all_registers_command): ... this.
7090         (vector_info): Rename to ...
7091         (info_vector_command): ... this.
7092         (float_info): Rename to ...
7093         (info_float_command): ... this.
7094         (_initialize_infcmd): Adjust.
7095         * inferior.h (term_info): Rename to ...
7096         (info_terminal_command): ... this.
7097         * inflow.c (term_info): Rename to ...
7098         (info_terminal_command): ... this.
7099         (_initialize_inflow): Adjust.
7100         * infrun.c (signals_info): Rename to ...
7101         (info_signals_command): ... this.
7102         (_initialize_infrun): Adjust.
7103         * objc-lang.c (classes_info): Rename to ...
7104         (info_classes_command): ... this.
7105         (selectors_info): Rename to ...
7106         (info_selectors_command): ... this.
7107         (_initialize_objc_language): Adjust.
7108         * printcmd.c (sym_info): Rename to ...
7109         (info_symbol_command): ... this.
7110         (address_info): Rename to ...
7111         (info_address_command): ... this.
7112         (display_info): Rename to ...
7113         (info_display_command): ... this.
7114         (_initialize_printcmd): Adjust.
7115         * reverse.c (bookmarks_info): Rename to ...
7116         (info_breakpoints_command): ... this.
7117         (_initialize_reverse): Adjust.
7118         * ser-go32.c (dos_info): Rename to ...
7119         (info_serial_command): ... this.
7120         (_initialize_ser_dos): Adjust.
7121         * skip.c (skip_info): Rename to ...
7122         (info_skip_command): ... this.
7123         (_initialize_step_skip): Adjust.
7124         * source.c (line_info): Rename to ...
7125         (info_line_command): ... this.
7126         (source_info): Rename to ...
7127         (info_source_command)
7128         * stack.c (frame_info): Rename to ...
7129         (info_frame_command): ... this.
7130         (locals_info): Rename to ...
7131         (info_locals_command): ... this.
7132         (args_info): Rename to ...
7133         (info_args_command): ... this.
7134         (_initialize_stack): Adjust.
7135         * symtab.c (sources_info): Rename to ...
7136         (info_sources_command): ... this.
7137         (variables_info): Rename to ...
7138         (info_variables_command): ... this.
7139         (functions_info): Rename to ...
7140         (info_functions_command): ... this.
7141         (types_info): Rename to ...
7142         (info_types_command): ... this.
7143         (_initialize_symtab): Adjust.
7144         * target.c (target_info): Rename to ...
7145         (info_target_command): ... this.
7146         (initialize_targets): Adjust.
7147         * tracepoint.c (tvariables_info): Rename to ...
7148         (info_tvariables_command): ... this.
7149         (scope_info): Rename to ...
7150         (info_scope_command): ... this.
7151         (trace_dump_actions): Adjust.
7152         (_initialize_tracepoint): Adjust.
7153
7154 2017-08-22  Tom Tromey  <tom@tromey.com>
7155
7156         * breakpoint.h (install_breakpoint): Update.
7157         * breakpoint.c (add_solib_catchpoint): Update.
7158         (install_breakpoint): Change argument to a std::unique_ptr.
7159         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7160         (create_breakpoint_sal, create_breakpoint): Update.
7161         (watch_command_1, catch_exec_command_1)
7162         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7163         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7164         Return the breakpoint.
7165         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7166         (new_single_step_breakpoint): Update.
7167         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7168         std::unique_ptr.
7169         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7170         std::unique_ptr.
7171         * break-catch-sig.c (create_signal_catchpoint): Use
7172         std::unique_ptr.
7173         * ada-lang.c (create_ada_exception_catchpoint): Use
7174         std::unique_ptr.
7175
7176 2017-08-22  Tom Tromey  <tom@tromey.com>
7177
7178         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7179
7180 2017-08-22  Tom Tromey  <tom@tromey.com>
7181
7182         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7183         (lookup_partial_symbol): Update.
7184
7185 2017-08-22  Tom Tromey  <tom@tromey.com>
7186
7187         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7188         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7189         (find_and_open_source, symtab_to_fullname): Update.
7190         * psymtab.c (psymtab_to_fullname): Update.
7191
7192 2017-08-22  Tom Tromey  <tom@tromey.com>
7193
7194         * exec.c (exec_file_attach): Update.
7195         * linux-thread-db.c (try_thread_db_load): Update.
7196         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7197         * utils.c (gdb_realpath): Change return type.
7198         (gdb_realpath_keepfile): Update.
7199         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7200         (_initialize_utils): Register the new self test.
7201         * source.c (openp): Update.
7202         (find_and_open_source): Update.
7203         * nto-tdep.c (nto_find_and_open_solib): Update.
7204         * main.c (set_gdb_data_directory): Update.
7205         (captured_main_1): Update.
7206         * dwarf2read.c (dwarf2_get_dwz_file): Update
7207         (dw2_map_symbol_filenames): Update.
7208         * auto-load.c (auto_load_safe_path_vec_update): Update.
7209         (filename_is_in_auto_load_safe_path_vec): Change type of
7210         "filename_realp".
7211         (auto_load_objfile_script): Update.
7212         (file_is_auto_load_safe): Update.  Use std::string.
7213         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7214
7215 2017-08-22  Tom Tromey  <tom@tromey.com>
7216
7217         * utils.c (gdb_realpath_keepfile): Return a
7218         gdb::unique_xmalloc_ptr.
7219         * exec.c (exec_file_attach): Update.
7220         * utils.h (gdb_realpath_keepfile): Return a
7221         gdb::unique_xmalloc_ptr.
7222
7223 2017-08-22  Tom Tromey  <tom@tromey.com>
7224
7225         * compile/compile.c (compile_file_command): Use
7226         gdb::unique_xmalloc_ptr, std::string.
7227         * utils.c (gdb_abspath): Change return type.
7228         * source.c (openp): Update.
7229         * objfiles.c (allocate_objfile): Update.
7230         * main.c (set_gdb_data_directory): Update.
7231         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7232
7233 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7234
7235         * cli-cmds.c (list_commands): List actual code around more than
7236         one location.
7237
7238 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7239
7240         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7241
7242 2017-08-21  Pedro Alves  <palves@redhat.com>
7243
7244         PR gdb/19487
7245         * c-exp.y (variable production): Handle function aliases.
7246         * minsyms.c (msymbol_is_text): New function.
7247         * minsyms.h (msymbol_is_text): Declare.
7248         * symtab.c (find_function_alias_target): New function.
7249         * symtab.h (find_function_alias_target): Declare.
7250
7251 2017-08-21  Pedro Alves  <palves@redhat.com>
7252
7253         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7254         typedefs.
7255         * typeprint.c (whatis_exp): If handling "whatis", and expression
7256         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7257         typedefs here.
7258         * valops.c (value_cast): Save "to" type before resolving
7259         stubs/typedefs.  Use that type as resulting value's type.
7260
7261 2017-08-18  Tom Tromey  <tom@tromey.com>
7262             Pedro Alves  <palves@redhat.com>
7263
7264         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7265         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7266         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7267         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7268         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7269         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7270         (linux_get_siginfo_data): Add "thread" argument.  Use
7271         scoped_restore.
7272         * linux-nat.c (linux_child_follow_fork)
7273         (check_stopped_by_watchpoint): Use scoped_restore.
7274         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7275         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7276         (restore_inferior_ptid, save_inferior_ptid): Remove.
7277         * btrace.c (btrace_fetch): Use scoped_restore.
7278         * bsd-uthread.c (bsd_uthread_fetch_registers)
7279         (bsd_uthread_store_registers): Use scoped_restore.
7280         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7281         scoped_restore.
7282         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7283         (aix_thread_xfer_partial): Use scoped_restore.
7284         * inferior.h (save_inferior_ptid): Remove.
7285
7286 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7287
7288         PR tdep/21818
7289         * arm-tdep.c (gdb_print_insn_arm): Mark
7290         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7291
7292 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7293
7294         * NEWS: Mention GDBserver's new option "--selftest".
7295         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7296         * selftest.c: Move it to common/selftest.c.
7297         * selftest.h: Move it to common/selftest.h.
7298         * selftest-arch.c (reset): New function.
7299         (tests_with_arch): Call reset.
7300
7301 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7302
7303         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7304         instead of exception_fprintf and printf_filtered.
7305
7306 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7307
7308         * selftest.c (register_self_test): Rename it to
7309         selftests::register_test.
7310         (run_self_tests): selftest::run_tests.
7311         * selftest.h: Update declarations.
7312         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7313         selftests::register_test_foreach_arch.
7314         * selftest-arch.h: Update declaration.
7315         * aarch64-tdep.c: Update.
7316         * arm-tdep.c: Likewise.
7317         * disasm-selftests.c: Likewise.
7318         * dwarf2loc.c: Likewise.
7319         * dwarf2-frame.c: Likewise.
7320         * findvar.c: Likewise.
7321         * gdbarch-selftests.c: Likewise.
7322         * maint.c (maintenance_selftest): Likewise.
7323         * regcache.c: Likewise.
7324         * rust-exp.y: Likewise.
7325         * selftest-arch.c: Likewise.
7326         * unittests/environ-selftests.c: Likewise.
7327         * unittests/function-view-selftests.c: Likewise.
7328         * unittests/offset-type-selftests.c: Likewise.
7329         * unittests/optional-selftests.c: Likewise.
7330         * unittests/scoped_restore-selftests.c: Likewise.
7331         * utils-selftests.c: Likewise.
7332
7333 2017-08-17  Pedro Alves  <palves@redhat.com>
7334
7335         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7336         local.
7337
7338 2017-08-17  Pedro Alves  <palves@redhat.com>
7339
7340         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7341         field.
7342         (reset_die_in_process): Delete, replaced by ...
7343         (process_die_scope): ... this new class.  Make it responsible for
7344         freeing cu->line_header too.
7345         (process_die): Use process_die_scope.
7346         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7347         cu->line_header_die_owner.  Don't release the line header if it's
7348         owned by the CU.
7349         (setup_type_unit_groups): Make the CU/DIE own the line header.
7350         Don't release the line header here.
7351
7352 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7353
7354         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7355
7356 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7357
7358         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7359         Single-Key mode
7360
7361 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7362
7363         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7364         mode command list.
7365
7366 2017-08-15  Stafford Horne  <shorne@gmail.com>
7367
7368         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7369
7370 2017-08-15  Stafford Horne  <shorne@gmail.com>
7371
7372         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7373
7374 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7375
7376         PR gdb/21954
7377         * infcmd.c (unset_environment_command): Use the 'clear' method on
7378         the environment instead of resetting it.
7379
7380 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7381
7382         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7383         platforms.
7384
7385 2017-08-14  Tom Tromey  <tom@tromey.com>
7386
7387         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7388         (print_binary_chars): Likewise.
7389         (BITS_IN_BYTES): Remove.
7390
7391 2017-08-14  Tom Tromey  <tom@tromey.com>
7392
7393         PR gdb/21675
7394         * valprint.c (LOW_ZERO): Change value to 034.
7395         (print_octal_chars): Add static_asserts for octal constants.
7396         * printcmd.c (print_scalar_formatted): Add 'd' case.
7397
7398 2017-08-11  Tom Tromey  <tom@tromey.com>
7399
7400         * symfile.c (add_symbol_file_command): Use std::vector.
7401
7402 2017-08-14  Tom Tromey  <tom@tromey.com>
7403
7404         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7405         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7406         std::move.
7407         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7408
7409 2017-08-11  Pedro Alves  <palves@redhat.com>
7410
7411         * infrun.c (process_event_stop_test): Adjust
7412         function_name_is_marked_for_skip call.
7413         * skip.c: Include <list>.
7414         (skiplist_entry): Make it a class with private fields, and
7415         getters/setters.
7416         (skiplist_entry_chain): Delete.
7417         (skiplist_entries): New.
7418         (skiplist_entry_count): Delete.
7419         (highest_skiplist_entry_num): New.
7420         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7421         (add_skiplist_entry): Delete.
7422         (skiplist_entry::skiplist_entry): New.
7423         (skiplist_entry::add_entry): New.
7424         (skip_file_command, skip_function): Adjust.
7425         (compile_skip_regexp): Delete.
7426         (skip_command): Don't compile regexp here.  Adjust to use
7427         skiplist_entry::add_entry.
7428         (skip_info): Adjust to use range-for and getters.
7429         (skip_enable_command, skip_disable_command): Adjust to use
7430         range-for and setters.
7431         (skip_delete_command): Adjust to use std::list.
7432         (add_skiplist_entry): Delete.
7433         (skip_file_p): Delete, refactored as ...
7434         (skiplist_entry::do_skip_file_p): ... this new method.
7435         (skip_gfile_p): Delete, refactored as ...
7436         (skiplist_entry::do_gskip_file_p): ... this new method.
7437         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7438         (skiplist_entry::skip_function_p): ... this new method.
7439         (function_name_is_marked_for_skip): Now returns bool, and takes
7440         the function sal by const reference.  Adjust to use range-for and
7441         skiplist_entry methods.
7442         (_initialize_step_skip): Remove references to
7443         skiplist_entry_chain, skiplist_entry_count.
7444         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7445         takes the function sal by const reference.
7446
7447 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7448
7449         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7450         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7451         (dwarf2_frame_cache):
7452         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7453         RETURN_MASK_ALL and set *this_case to NULL.
7454         * frame-unwind.h: Update comments.
7455
7456 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7457
7458         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7459         (dwarf2_frame_state_copy_regs): Remove.
7460         (dwarf2_frame_state_free_regs): Remove.
7461         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7462         (dwarf2_restore_rule): Call method .alloc_regs instead of
7463         dwarf2_frame_state_alloc_regs.
7464         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7465         constructor.  Call std::move.
7466         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7467         (dwarf2_frame_cache): Likewise.
7468
7469         [GDB_SELF_TEST]: Include selftest.h and
7470         selftest-arch.h.
7471         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7472         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7473         execute_cfa_program_test.
7474
7475         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7476         copy ctor, assignment operator, move assignment.
7477         <alloc_regs>: New method.
7478         <swap>: New method.
7479         (struct dwarf2_frame_state): Delete dtor.
7480         (dwarf2_frame_state_alloc_regs): Remove declaration.
7481         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7482         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7483
7484 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7485
7486         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7487         (dwarf2_frame_state::dwarf2_frame_state): New.
7488         (dwarf2_frame_state::~dwarf2_frame_state): New.
7489         (dwarf2_fetch_cfa_info): Update.
7490         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7491         rather than a pointer.  Update code.
7492         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7493         dtor.
7494         <data_align, code_align, retaddr_column>: Change them to const.
7495         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7496         to bool.
7497
7498 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7499
7500         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7501         <loc.exp>: New field.
7502         * dwarf2-frame.c (execute_cfa_program): Update.
7503         (dwarf2_frame_prev_register): Update.
7504
7505 2017-08-10  Pedro Alves  <palves@redhat.com>
7506
7507         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7508
7509 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7510
7511         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7512         (fbsd_pending_children): Use std::list.
7513         (fbsd_remember_child): Likewise.
7514         (fbsd_is_child_pending): Likewise.
7515         (fbsd_pending_vfork_done): Use std::forward_list.
7516         (fbsd_add_vfork_done): Likewise.
7517         (fbsd_is_vfork_done_pending): Likewise.
7518         (fbsd_next_vfork_done): Likewise.
7519
7520 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7521
7522         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7523         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7524         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7525         for `mapfilename'.
7526         (fbsd_xfer_partial): Use gdb::byte_vector.
7527         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7528
7529 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7530
7531         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7532         "filestuff.h".
7533         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7534
7535 2017-08-09  Tom Tromey  <tom@tromey.com>
7536
7537         * skip.c (skiplist_entry): New constructor.
7538         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7539         (skiplist_entry::file_is_glob): Now bool.
7540         (skiplist_entry::file, skiplist_entry::function): Now
7541         std::string.
7542         (make_skip_entry): Return a unique_ptr.  Use new.
7543         (free_skiplist_entry, free_skiplist_entry_cleanup)
7544         (make_free_skiplist_entry_cleanup): Remove.
7545         (skip_command, skip_disable_command, add_skiplist_entry)
7546         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7547         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7548         (function_name_is_marked_for_skip): Update.
7549         (skip_delete_command): Update.  Use delete.
7550
7551 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7552
7553         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7554         (aarch64_linux_core_read_description): New function.
7555         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7556
7557 2017-08-09  Pedro Alves  <palves@redhat.com>
7558
7559         * cp-name-parser.y (cp_comp_to_string): Return a
7560         gdb::unique_xmalloc_ptr<char>.
7561         * cp-support.c (replace_typedefs_qualified_name)
7562         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7563         (cp_canonicalize_string_full): Use op= instead of explicit
7564         convertion.
7565         (cp_class_name_from_physname, method_name_from_physname)
7566         (cp_func_name, cp_remove_params): Adjust to use
7567         gdb::unique_xmalloc_ptr<char>.
7568         * cp-support.h (cp_comp_to_string): Return a
7569         gdb::unique_xmalloc_ptr<char>.
7570         * python/py-type.c (typy_lookup_type): Adjust to use
7571         gdb::unique_xmalloc_ptr<char>.
7572
7573 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7574
7575         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7576
7577 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7578             Yao Qi  <yao.qi@linaro.org>
7579
7580         * cp-support.c (cp_canonicalize_string_full): Use
7581         gdb::unique_xmalloc_ptr<char>.
7582         (cp_canonicalize_string): Likewise.
7583
7584 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7585
7586         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7587         * regformats/i386/amd64-avx-avx512.dat: Remove.
7588         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7589         * regformats/i386/amd64-avx-mpx.dat:Remove.
7590         * regformats/i386/amd64-avx.dat: Remove.
7591         * regformats/i386/amd64-mpx.dat: Remove.
7592         * regformats/i386/i386-avx-avx512.dat: Remove.
7593         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7594         * regformats/i386/i386-avx-mpx.dat: Remove.
7595         * regformats/i386/i386-mmx.dat: Remove.
7596         * regformats/i386/i386-mpx.dat: Remove.
7597
7598 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7599
7600         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7601         * amd64-tdep.c: Don't include features/i386/x32*.c.
7602         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7603         functions.
7604         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7605         and i386/x32-avx-avx512.
7606         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7607         and i386/x32.xml.
7608         * features/i386/x32-avx-avx512.c: Removed.
7609         * features/i386/x32-avx-avx512.xml: Removed.
7610         * features/i386/x32-avx.c: Removed.
7611         * features/i386/x32-avx.xml: Removed.
7612         * features/i386/x32.c: Removed.
7613         * features/i386/x32.xml: Removed.
7614         * regformats/i386/x32-avx-avx512.dat: Removed.
7615         * regformats/i386/x32-avx.dat: Removed.
7616         * regformats/i386/x32.dat: Removed.
7617
7618 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7619
7620         PR breakpoints/21886
7621         * mem-break.c (default_memory_insert_breakpoint): Use
7622         `->placed_address' rather than `->reqstd_address' for the
7623         breakpoint location.
7624
7625 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7626
7627         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7628         assertions.
7629
7630 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7631
7632         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7633         a union of `tdep_info', `tdesc_data' and `id'.
7634         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7635         rather than `info.tdep_info'.
7636         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7637         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7638         * i386-tdep.c (i386_gdbarch_init): Likewise.
7639         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7640         * mips-tdep.c (mips_gdbarch_init): Likewise.
7641         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7642         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7643         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7644         `info.tdep_info'.
7645         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7646         `info.tdep_info'.
7647         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7648         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7649         `info.tdep_info'.
7650         * spu-tdep.c (spu_gdbarch_init): Likewise.
7651         * gdbarch.h: Regenerate.
7652
7653 2017-08-07  Leszek Swirski  <leszeks@google.com>
7654
7655         PR symtab/20899
7656         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7657
7658 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7659
7660         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7661         (gdbsim_open): Rename gdb_argv args object to argv.
7662
7663 2017-08-05  Tom Tromey  <tom@tromey.com>
7664
7665         * compile/compile-object-load.c (compile_object_load): Use
7666         gdb::unique_xmalloc_ptr.
7667         * cli/cli-dump.c (scan_filename): Rename from
7668         scan_filename_with_cleanup.  Change return type.
7669         (scan_expression): Rename from scan_expression_with_cleanup.
7670         Change return type.
7671         (dump_memory_to_file, dump_value_to_file, restore_command):
7672         Use gdb::unique_xmalloc_ptr.  Update.
7673         * cli/cli-cmds.c (find_and_open_script): Use
7674         gdb::unique_xmalloc_ptr.
7675         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7676         * symmisc.c (maintenance_print_symbols)
7677         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7678         * symfile.c (symfile_bfd_open, generic_load)
7679         (add_symbol_file_command, remove_symbol_file_command): Use
7680         gdb::unique_xmalloc_ptr.
7681         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7682         * psymtab.c (maintenance_print_psymbols): Use
7683         gdb::unique_xmalloc_ptr.
7684         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7685         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7686         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7687         (reload_shared_libraries_1): Likewise.
7688
7689 2017-08-05  Tom Tromey  <tom@tromey.com>
7690
7691         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7692         (rust_op_vector, rust_set_vector): New typedefs.
7693         (current_parser): New global.
7694         (work_obstack): Change to pointer type.  Update all users.
7695         (rust_ast, pstate): Remove globals.
7696         (struct rust_parser): New.
7697         (%union) <params, field_inits>: Change type.
7698         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7699         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7700         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7701         (convert_params_to_types, convert_params_to_expression): Change
7702         type of "params".
7703         (ast_string): Change type of "fields".
7704         (rust_parse): Make a rust_parser.  Remove cleanups.
7705         (rust_lex_tests): Make and install an auto_obstack.
7706
7707 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7708
7709         * configure.srv (ipa_x32_linux_regobj): New.
7710         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7711         instead of X86_TDESC_AVX512.
7712         (initialize_low_tracepoint): Call
7713         init_registers_x32_avx_avx512_linux.
7714
7715 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7716
7717         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7718
7719 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7720
7721         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7722
7723 2017-08-03  Tom Tromey  <tom@tromey.com>
7724
7725         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7726         Remove.
7727         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7728
7729 2017-08-03  Tom Tromey  <tom@tromey.com>
7730
7731         * python/py-param.c (compute_enum_values): Use gdb_argv.
7732
7733 2017-08-03  Tom Tromey  <tom@tromey.com>
7734
7735         * utils.h (struct gdb_argv_deleter): New.
7736         (gdb_argv): New class.
7737         * utils.c (gdb_argv::reset): New method.
7738         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7739         * tracefile.c (tsave_command): Use gdb_argv.
7740         * top.c (new_ui_command): Use gdb_argv.
7741         * symmisc.c (maintenance_print_symbols)
7742         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7743         * symfile.c (symbol_file_command, generic_load)
7744         (remove_symbol_file_command): Use gdb_argv.
7745         * stack.c (backtrace_command): Use gdb_argv.
7746         * source.c (add_path, show_substitute_path_command)
7747         (unset_substitute_path_command, set_substitute_path_command):
7748         Use gdb_argv.
7749         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7750         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7751         * remote.c (extended_remote_run, remote_put_command)
7752         (remote_get_command, remote_delete_command): Use gdb_argv.
7753         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7754         (gdbsim_open): Use gdb_argv.
7755         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7756         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7757         * procfs.c (procfs_info_proc): Use gdb_argv.
7758         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7759         * infrun.c (handle_command): Use gdb_argv.
7760         * inferior.c (add_inferior_command, clone_inferior_command):
7761         Use gdb_argv.
7762         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7763         * exec.c (exec_file_command): Use gdb_argv.
7764         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7765         * compile/compile.c (build_argc_argv): Use gdb_argv.
7766
7767 2017-08-03  Tom Tromey  <tom@tromey.com>
7768
7769         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7770
7771 2017-08-03  Tom Tromey  <tom@tromey.com>
7772
7773         * python/python.c (compute_python_string): Return std::string.
7774         (gdbpy_eval_from_control_command): Update.
7775         (do_start_initialization): Use std::string.
7776         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7777         xstrprintf.
7778         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7779         xstrprintf.
7780
7781 2017-08-03  Tom Tromey  <tom@tromey.com>
7782
7783         * top.h (do_restore_instream_cleanup): Remove.
7784         * top.c (do_restore_instream_cleanup): Remove.
7785         (read_command_file): Use scoped_restore.
7786         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7787
7788 2017-08-03  Tom Tromey  <tom@tromey.com>
7789
7790         * cli/cli-script.c (execute_user_command)
7791         (execute_control_command): Use scoped_restore.
7792
7793 2017-08-03  Tom Tromey  <tom@tromey.com>
7794
7795         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7796         (execute_user_command): Remove user_call_depth; use
7797         user_args_stack's size instead.
7798
7799 2017-08-03  Tom Tromey  <tom@tromey.com>
7800
7801         * top.h (in_user_command): Remove.
7802         * top.c (in_user_command): Remove.
7803         * cli/cli-script.c (do_restore_user_call_depth)
7804         (execute_user_command): Update.
7805
7806 2017-08-03  Tom Tromey  <tom@tromey.com>
7807
7808         * valops.c (search_struct_method): Use gdb::byte_vector.
7809         * valarith.c (value_concat): Use std::vector.
7810         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7811         (simple_search_memory): Likewise.
7812         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7813         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7814         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7815         * elfread.c (elf_rel_plt_read): Use std::string.
7816         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7817         * cli/cli-dump.c (restore_section_callback): Use
7818         gdb::byte_vector.
7819
7820 2017-08-03  Tom Tromey  <tom@tromey.com>
7821
7822         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7823
7824 2017-08-03  Tom Tromey  <tom@tromey.com>
7825
7826         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7827         (tui_register_format): Use scoped_restore.
7828
7829 2017-08-03  Tom Tromey  <tom@tromey.com>
7830
7831         * reverse.c (exec_direction_default): Remove.
7832         (exec_reverse_once): Use scoped_restore.
7833         * remote.c (restore_remote_timeout): Remove.
7834         (remote_flash_erase, remote_flash_write, remote_flash_done)
7835         (readchar, remote_serial_write): Use scoped_restore.
7836         * cli/cli-script.c (struct source_cleanup_lines_args)
7837         (source_cleanup_lines): Remove.
7838         (script_from_file): Use scoped_restore.
7839         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7840         (source_command): Use scoped_restore.
7841
7842 2017-08-03  Tom Tromey  <tom@tromey.com>
7843
7844         * utils.h (make_cleanup_free_so): Remove.
7845         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7846         * solist.h (struct so_deleter): New.
7847         (so_list_up): New typedef.
7848         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7849
7850 2017-08-03  Tom Tromey  <tom@tromey.com>
7851
7852         * utils.h (make_cleanup_restore_current_language): Remove.
7853         * utils.c (do_restore_current_language)
7854         (make_cleanup_restore_current_language): Remove.
7855         * parse.c (parse_exp_in_context_1)
7856         (parse_expression_with_language): Use
7857         scoped_restore_current_language.
7858         * mi/mi-main.c (mi_cmd_execute): Use
7859         scoped_restore_current_language.
7860         * language.h (scoped_restore_current_language): New class.
7861
7862 2017-08-03  Tom Tromey  <tom@tromey.com>
7863
7864         * compile/compile.c (cleanup_unlink_file): Remove.
7865         (compile_to_object): Use gdb::unlinker.
7866         (eval_compile_command): Likewise.
7867
7868 2017-08-03  Tom Tromey  <tom@tromey.com>
7869
7870         * utils.h (make_cleanup_fclose): Remove.
7871         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7872
7873 2017-08-03  Tom Tromey  <tom@tromey.com>
7874
7875         * top.c (open_terminal_stream): Return gdb_file_up.
7876         (new_ui_command): Update.
7877
7878 2017-08-03  Tom Tromey  <tom@tromey.com>
7879
7880         * source.c (print_source_lines_base, forward_search_command)
7881         (reverse_search_command): Use gdb_file_up.
7882
7883 2017-08-03  Tom Tromey  <tom@tromey.com>
7884
7885         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7886
7887 2017-08-03  Tom Tromey  <tom@tromey.com>
7888
7889         * cli/cli-cmds.c (find_and_open_script): Change return type.
7890         Remove "streamp" and "full_path" parameters.
7891         (source_script_with_search): Update.
7892         * auto-load.c (source_script_file): Update.
7893         * cli/cli-cmds.h (find_and_open_script): Change type.
7894         (open_script): New struct.
7895
7896 2017-08-03  Tom Tromey  <tom@tromey.com>
7897
7898         * xml-support.c (xml_fetch_content_from_file): Update.
7899         * ui-file.c (stdio_file::open): Update.
7900         * tracefile-tfile.c (tfile_start): Update.
7901         * remote.c (remote_file_put, remote_file_get): Update.
7902         * nat/linux-procfs.c (linux_proc_get_int)
7903         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7904         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7905         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7906         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7907         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7908         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7909         * linux-nat.c (linux_proc_pending_signals): Update.
7910         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7911         (file_closer): Remove.
7912         * compile/compile.c (compile_to_object): Update.
7913         * common/filestuff.h (struct gdb_file_deleter): New.
7914         (gdb_file_up): New typedef.
7915         (gdb_fopen_cloexec): Change return type.
7916         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7917         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7918         (dump_binary_file, restore_binary_file): Update.
7919         * auto-load.c (auto_load_objfile_script_1): Update.
7920
7921 2017-08-03  Tom Tromey  <tom@tromey.com>
7922
7923         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7924         (info_static_tracepoint_markers_command): Likewise.
7925         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7926         * skip.c (skip_info): Use ui_out_emit_table.
7927         * progspace.c (print_program_space): Use ui_out_emit_table.
7928         * osdata.c (info_osdata): Use ui_out_emit_table.
7929         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7930         ui_out_emit_table.
7931         * linux-thread-db.c (info_auto_load_libthread_db): Use
7932         ui_out_emit_table.
7933         * inferior.c (print_inferior): Use ui_out_emit_table.
7934         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7935         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7936         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7937         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7938         * ui-out.h (class ui_out_emit_table): New.
7939
7940 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7941
7942         * mips-tdep.c (mips_fpu_type_str): New function.
7943         (mips_dump_tdep): Call it.
7944
7945 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7946
7947         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7948         `->mips_fpu_type'.
7949
7950 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7951
7952         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7953
7954 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7955
7956         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7957
7958 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7959
7960         * cli/cli-cmds.c (maintenancechecklist): New variable.
7961         * gdbcmd.h (maintenancechecklist): Declare it.
7962         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7963         Call i386_linux_read_description with different masks.
7964         * maint.c (maintenance_check_command): New function.
7965         (_initialize_maint_cmds): Call add_prefix_cmd.
7966         * target-descriptions.c (tdesc_reg): override operator != and ==.
7967         (tdesc_type): Likewise.
7968         (tdesc_feature): Likewise.
7969         (target_desc): Likewise.
7970         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7971         (maintenance_check_xml_descriptions): New function.
7972         (_initialize_target_descriptions) Add command "xml-descriptions".
7973         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7974
7975 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7976
7977         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7978         Include features/i386/32bit-*.c.
7979         (i386_linux_read_description): Generate target description if it
7980         doesn't exist.
7981         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7982         functions.
7983         * features/i386/32bit-linux.c: Re-generated.
7984         * features/i386/32bit-sse.c: Likewise.
7985         * target-descriptions.c (print_c_feature::visit): Print code to
7986         set register number if needed.
7987         (print_c_feature) <m_next_regnum>: New field.
7988
7989 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7990
7991         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7992         (FEATURE_XMLFILES): New.
7993         (FEATURE_CFILES): New.
7994         New rules.
7995         (clean-cfiles): Remove generated c files.
7996         * features/i386/32bit-avx.c: Generated.
7997         * features/i386/32bit-avx512.c: Generated.
7998         * features/i386/32bit-core.c: Generated.
7999         * features/i386/32bit-linux.c: Generated.
8000         * features/i386/32bit-mpx.c: Generated.
8001         * features/i386/32bit-pkeys.c: Generated.
8002         * features/i386/32bit-sse.c: Generated.
8003         * target-descriptions.c: Include algorithm.
8004         (tdesc_element_visitor): Add method visit_end.
8005         (print_c_tdesc): Implement visit_end.
8006         (print_c_tdesc:: m_filename_after_features): Move it to
8007         protected.
8008         (print_c_feature): New class.
8009         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8010         name starts with "i386/32bit-".
8011
8012 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8013
8014         * target-descriptions.c (tdesc_element_visitor): New class.
8015         (tdesc_element): New class.
8016         (tdesc_reg): Inherit from tdesc_element.
8017         (tdesc_reg::accept): New function.
8018         (tdesc_type): Inherit from tdesc_element.
8019         (tdesc_type::accept): New function.
8020         (tdesc_feature): Inherit from tdesc_element.
8021         (tdesc_feature::accept): New function.
8022         (target_desc): Inherit from tdesc_element.
8023         (target_desc::target_desc): New.
8024         (target_desc::~target_desc): New.
8025         (target_desc::accept): New.
8026         (allocate_target_description): Use new.
8027         (free_target_description): Use delete.
8028         (print_c_tdesc): New class.
8029         (maint_print_c_tdesc_cmd): Adjust.
8030
8031         * features/aarch64.c: Re-generated.
8032         * features/arc-arcompact.c: Re-generated.
8033         * features/arc-v2.c: Re-generated.
8034         * features/arm/arm-with-iwmmxt.c: Re-generated.
8035         * features/arm/arm-with-m.c: Re-generated.
8036         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8037         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8038         * features/arm/arm-with-neon.c: Re-generated.
8039         * features/arm/arm-with-vfpv2.c: Re-generated.
8040         * features/arm/arm-with-vfpv3.c: Re-generated.
8041         * features/i386/amd64-avx-avx512.c: Re-generated.
8042         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8043         * features/i386/amd64-avx.c: Re-generated.
8044         * features/i386/amd64-avx-linux.c: Re-generated.
8045         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8046         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8047         * features/i386/amd64-avx-mpx.c: Re-generated.
8048         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8049         * features/i386/amd64.c: Re-generated.
8050         * features/i386/amd64-linux.c: Re-generated.
8051         * features/i386/amd64-mpx.c: Re-generated.
8052         * features/i386/amd64-mpx-linux.c: Re-generated.
8053         * features/i386/i386-avx-avx512.c: Re-generated.
8054         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8055         * features/i386/i386-avx.c: Re-generated.
8056         * features/i386/i386-avx-linux.c: Re-generated.
8057         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8058         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8059         * features/i386/i386-avx-mpx.c: Re-generated.
8060         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8061         * features/i386/i386.c: Re-generated.
8062         * features/i386/i386-linux.c: Re-generated.
8063         * features/i386/i386-mmx.c: Re-generated.
8064         * features/i386/i386-mmx-linux.c: Re-generated.
8065         * features/i386/i386-mpx.c: Re-generated.
8066         * features/i386/i386-mpx-linux.c: Re-generated.
8067         * features/i386/x32-avx-avx512.c: Re-generated.
8068         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8069         * features/i386/x32-avx.c: Re-generated.
8070         * features/i386/x32-avx-linux.c: Re-generated.
8071         * features/i386/x32.c: Re-generated.
8072         * features/i386/x32-linux.c: Re-generated.
8073         * features/microblaze.c: Re-generated.
8074         * features/microblaze-with-stack-protect.c: Re-generated.
8075         * features/mips64-dsp-linux.c: Re-generated.
8076         * features/mips64-linux.c: Re-generated.
8077         * features/mips-dsp-linux.c: Re-generated.
8078         * features/mips-linux.c: Re-generated.
8079         * features/nds32.c: Re-generated.
8080         * features/nios2.c: Re-generated.
8081         * features/nios2-linux.c: Re-generated.
8082         * features/rs6000/powerpc-32.c: Re-generated.
8083         * features/rs6000/powerpc-32l.c: Re-generated.
8084         * features/rs6000/powerpc-403.c: Re-generated.
8085         * features/rs6000/powerpc-403gc.c : Re-generated.
8086         * features/rs6000/powerpc-405.c: Re-generated.
8087         * features/rs6000/powerpc-505.c: Re-generated.
8088         * features/rs6000/powerpc-601.c: Re-generated.
8089         * features/rs6000/powerpc-602.c: Re-generated.
8090         * features/rs6000/powerpc-603.c: Re-generated.
8091         * features/rs6000/powerpc-604.c: Re-generated.
8092         * features/rs6000/powerpc-64.c: Re-generated.
8093         * features/rs6000/powerpc-64l.c: Re-generated.
8094         * features/rs6000/powerpc-7400.c: Re-generated.
8095         * features/rs6000/powerpc-750.c: Re-generated.
8096         * features/rs6000/powerpc-860.c: Re-generated.
8097         * features/rs6000/powerpc-altivec32.c: Re-generated.
8098         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8099         * features/rs6000/powerpc-altivec64.c: Re-generated.
8100         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8101         * features/rs6000/powerpc-cell32l.c: Re-generated.
8102         * features/rs6000/powerpc-cell64l.c: Re-generated.
8103         * features/rs6000/powerpc-e500.c: Re-generated.
8104         * features/rs6000/powerpc-e500l.c: Re-generated.
8105         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8106         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8107         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8108         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8109         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8110         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8111         * features/rs6000/powerpc-vsx32.c: Re-generated.
8112         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8113         * features/rs6000/powerpc-vsx64.c: Re-generated.
8114         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8115         * features/rs6000/rs6000.c: Re-generated.
8116         * features/s390-linux32.c: Re-generated.
8117         * features/s390-linux32v1.c: Re-generated.
8118         * features/s390-linux32v2.c: Re-generated.
8119         * features/s390-linux64.c: Re-generated.
8120         * features/s390-linux64v1.c: Re-generated.
8121         * features/s390-linux64v2.c: Re-generated.
8122         * features/s390-te-linux64.c: Re-generated.
8123         * features/s390-tevx-linux64.c: Re-generated.
8124         * features/s390-vx-linux64.c: Re-generated.
8125         * features/s390x-linux64.c: Re-generated.
8126         * features/s390x-linux64v1.c: Re-generated.
8127         * features/s390x-linux64v2.c: Re-generated.
8128         * features/s390x-te-linux64.c: Re-generated.
8129         * features/s390x-tevx-linux64.c: Re-generated.
8130         * features/s390x-vx-linux64.c: Re-generated.
8131         * features/sparc/sparc32-solaris.c: Re-generated.
8132         * features/sparc/sparc64-solaris.c: Re-generated.
8133         * features/tic6x-c62x.c: Re-generated.
8134         * features/tic6x-c62x-linux.c: Re-generated.
8135         * features/tic6x-c64x.c: Re-generated.
8136         * features/tic6x-c64x-linux.c: Re-generated.
8137         * features/tic6x-c64xp.c: Re-generated.
8138         * features/tic6x-c64xp-linux.c: Re-generated.
8139
8140 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8141
8142         * i386-linux-tdep.c (i386_linux_read_description): New function.
8143         (i386_linux_core_read_description): Call
8144         i386_linux_read_description.
8145         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8146         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8147         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8148         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8149         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8150         * x86-linux-nat.c (x86_linux_read_description): Call
8151         i386_linux_read_description.
8152
8153 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8154
8155         * NEWS: Mention it.
8156         * features/Makefile (%.c: %.xml): Pass the xml file name to
8157         command "maint print c-tdesc".
8158         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8159         name from 'arg'.
8160
8161 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8162
8163         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8164         in-class initialization.
8165         (tdesc_create_feature): Call new instead of XCNEW.
8166         (free_target_description): Ue delete.
8167
8168 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8169
8170         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8171
8172 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8173
8174         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8175         constant.
8176         (amd64_x32_init_abi): Likewise.
8177         * amd64-tdep.h (amd64_init_abi): Update declaration.
8178         (amd64_x32_init_abi): Likewise.
8179
8180 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8181
8182         PR tdep/21717
8183         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8184         condition for FPSCR.
8185         (arm_linux_store_inferior_registers): Likewise.
8186
8187 2017-07-22  Tom Tromey  <tom@tromey.com>
8188
8189         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8190         <syscalls_counts>: Now a std::vector.
8191         (get_catch_syscall_inferior_data): Use "new".
8192         (catch_syscall_inferior_data_cleanup): Use "delete".
8193         (insert_catch_syscall, remove_catch_syscall)
8194         (clear_syscall_counts): Update.
8195
8196 2017-07-22  Tom Tromey  <tom@tromey.com>
8197
8198         * break-catch-syscall.c (syscall_catchpoint)
8199         <syscalls_to_be_caught>: Now a std::vector<int>
8200         (~syscall_catchpoint): Remove.
8201         (insert_catch_syscall, remove_catch_syscall)
8202         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8203         (print_mention_catch_syscall, print_recreate_catch_syscall):
8204         Update.
8205         (create_syscall_event_catchpoint): Change type of "filter"
8206         parameter.
8207         (catch_syscall_split_args): Return a std::vector.
8208         (catch_syscall_command_1, catching_syscall_number_1): Update.
8209
8210 2017-07-22  Tom Tromey  <tom@tromey.com>
8211
8212         * break-catch-throw.c (struct exception_catchpoint)
8213         <exception_rx>: Now a std::string.
8214         (~exception_catchpoint): Remove.
8215         (print_one_detail_exception_catchpoint): Update.
8216         (handle_gnu_v3_exceptions): Change type of except_rx.
8217         (extract_exception_regexp): Return a std::string.
8218         (catch_exception_command_1): Update.
8219
8220 2017-07-22  Tom Tromey  <tom@tromey.com>
8221
8222         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8223         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8224         std::vector.
8225         <catch_all>: Now a bool.
8226         (~signal_catchpoint): Remove.
8227         (signal_catchpoint_insert_location)
8228         (signal_catchpoint_remove_location)
8229         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8230         (signal_catchpoint_print_mention)
8231         (signal_catchpoint_print_recreate)
8232         (signal_catchpoint_explains_signal): Update.
8233         (create_signal_catchpoint): Change type of "filter" and
8234         "catch_all".
8235         (catch_signal_split_args): Return a std::vector.  Change type of
8236         "catch_all".
8237         (catch_signal_command): Update.
8238
8239 2017-07-20  Pedro Alves  <palves@redhat.com>
8240
8241         * ada-lang.c (ada_language_defn): Make extern.
8242         (_initialize_ada_language): Remove add_language call.
8243         * c-lang.c (c_language_defn, cplus_language_defn)
8244         (asm_language_defn, minimal_language_defn): Make extern.
8245         (_initialize_c_language): Delete.
8246         * completer.c (compare_cstrings): Delete, moved to utils.h.
8247         * d-lang.c (d_language_defn): Make extern.
8248         (_initialize_d_language): Remove add_language calls.
8249         * defs.h (enum language): Add comment.
8250         * f-lang.c (f_language_defn): Make extern.
8251         (_initialize_f_language): Remove add_language call.
8252         * go-lang.c (go_language_defn): Make extern.
8253         (_initialize_go_language): Remove add_language call.
8254         * language.c: Include <algorithm>.
8255         (languages): Redefine as const array.
8256         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8257         (set_language_command): Handle "local".  Use for-range loop.
8258         (set_language): Remove loop.
8259         (language_enum): Rewrite.
8260         (language_def, language_str): Remove loops.
8261         (add_language): Delete.
8262         (add_set_language_command): New, based on add_languages.
8263         (skip_language_trampoline): Adjust.
8264         (local_language_defn): Delete.
8265         (language_gdbarch_post_init): Adjust.
8266         (_initialize_language): Remove add_language calls.  Call
8267         add_set_language_command.
8268         * language.h (add_language): Delete.
8269         (auto_language_defn)
8270         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8271         (asm_language_defn, c_language_defn, cplus_language_defn)
8272         (d_language_defn, f_language_defn, go_language_defn)
8273         (m2_language_defn, objc_language_defn, opencl_language_defn)
8274         (pascal_language_defn, rust_language_defn): Declare.
8275         * m2-lang.c (m2_language_defn): Make extern.
8276         (_initialize_m2_language): Remove add_language call.
8277         * objc-lang.c (objc_language_defn): Make extern.
8278         (_initialize_objc_language): Remove add_language call.
8279         * opencl-lang.c (opencl_language_defn): Make extern.
8280         (_initialize_opencl_language): Remove add_language call.
8281         * p-lang.c (pascal_language_defn): Make extern.
8282         (_initialize_pascal_language): Delete.
8283         * rust-lang.c (rust_language_defn): Make extern.
8284         (_initialize_rust_language): Delete.
8285         * utils.h (compare_cstrings): New static inline function.
8286
8287 2017-07-20  Pedro Alves  <palves@redhat.com>
8288
8289         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8290         (get_var_value): Constify parameters.
8291         (get_int_var_value): Change prototype.
8292         (to_fixed_range_type): Adjust.
8293         * ada-lang.h (get_int_var_value): Change prototype.
8294
8295 2017-07-20  Pedro Alves  <palves@redhat.com>
8296
8297         * dwarf2read.c (dw2_lookup_symbol): Use
8298         SYMBOL_MATCHES_SEARCH_NAME.
8299         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8300
8301 2017-07-20  Pedro Alves  <palves@redhat.com>
8302
8303         * block.c (block_iter_name_step, block_iter_name_first)
8304         (block_iter_name_next): Delete.
8305         (block_lookup_symbol_primary): Adjust to use
8306         dict_iter_match_first/dict_iter_match_next.
8307         * block.h (block_iter_name_first, block_iter_name_next): Delete
8308         declarations.
8309         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8310         dict_iter_match_first/dict_iter_match_next.
8311
8312 2017-07-20  Pedro Alves  <palves@redhat.com>
8313
8314         * cp-support.c (cp_find_first_component_aux): Add missing case for
8315         end of string.
8316
8317 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8318
8319         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8320         of dwo_cu's dwo_file.
8321
8322 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8323
8324         * remote.c (store_registers_using_G): Remove one line comment.
8325
8326 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8327
8328         * regcache.c (regcache_cpy): Simplify it.
8329         (regcache::cpy_no_passthrough): Remove it.
8330         * regcache.h (cpy_no_passthrough): Remove it.
8331         (regcache_dup, regcache_cpy): Update comments.
8332
8333 2017-07-18  Pedro Alves  <palves@redhat.com>
8334
8335         * remote-sim.c (sim_command_completer): Adjust to work with a
8336         completion_tracker instead of a VEC.
8337
8338 2017-07-17  Pedro Alves  <palves@redhat.com>
8339
8340         * completer.c (complete_source_filenames): New function.
8341         (complete_address_and_linespec_locations): New function.
8342         (location_completer): Use complete_address_and_linespec_locations.
8343         (completion_tracker::build_completion_result): Honor the tracker's
8344         request to suppress append.
8345         * completer.h (completion_tracker::suppress_append_ws)
8346         (completion_tracker::set_suppress_append_ws): New methods.
8347         (completion_tracker::m_suppress_append_ws): New field.
8348         (complete_source_filenames): New declaration.
8349         * linespec.c (linespec_complete_what): New.
8350         (struct ls_parser) <complete_what, completion_word,
8351         completion_quote_char, completion_quote_end, completion_tracker>:
8352         New fields.
8353         (string_find_incomplete_keyword_at_end): New.
8354         (linespec_lexer_lex_string): Record quote char.  If in completion
8355         mode, don't throw.
8356         (linespec_lexer_consume_token): Advance the completion word point.
8357         (linespec_lexer_peek_token): Save/restore completion info.
8358         (save_stream_and_consume_token): New.
8359         (set_completion_after_number): New.
8360         (linespec_parse_basic): Set what to complete next depending on
8361         token.  Handle function and label completions specially.
8362         (parse_linespec): Disable objc shortcut in completion mode.  Set
8363         what to complete next depending on token type.  Skip keyword if in
8364         completion mode.
8365         (complete_linespec_component, linespec_complete): New.
8366         * linespec.h (linespec_complete): Declare.
8367
8368 2017-07-17  Pedro Alves  <palves@redhat.com>
8369
8370         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8371         Handle 'operator<' / 'operator<<'.
8372
8373 2017-07-17  Pedro Alves  <palves@redhat.com>
8374
8375         * completer.c (collect_explicit_location_matches): Handle
8376         MATCH_LABEL.
8377         (convert_explicit_location_to_linespec): New, factored out from
8378         ...
8379         (convert_explicit_location_to_sals): ... this.
8380         (complete_label): New.
8381         (linespec_complete_label, find_label_symbols_in_block): New.
8382         (find_label_symbols): Add completion_mode parameter and adjust to
8383         call find_label_symbols_in_block.
8384         * linespec.h (linespec_complete_label): Declare.
8385
8386 2017-07-17  Pedro Alves  <palves@redhat.com>
8387
8388         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8389         complete_symbol_mode parameter.
8390         * cli/cli-cmds.c (complete_command): Get the completion result out
8391         of the handle_brkchars tracker if used a custom word point.
8392         * completer.c: Include "linespec.h".
8393         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8394         (advance_to_expression_complete_word_point): New.
8395         (completion_tracker::completes_to_completion_word): New.
8396         (complete_files_symbols): Pass down
8397         complete_symbol_mode::EXPRESSION.
8398         (explicit_options, probe_options): New.
8399         (collect_explicit_location_matches): Complete on the
8400         explictit_loc->foo instead of word.  Use
8401         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8402         keyword and options completions.
8403         (backup_text_ptr): Delete.
8404         (skip_keyword): New.
8405         (complete_explicit_location): Remove 'word' parameter.  Add
8406         language, quoted_arg_start and quoted_arg_end parameters.
8407         Rewrite, parsing left to right.
8408         (location_completer): Rewrite.
8409         (location_completer_handle_brkchars): New function.
8410         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8411         (enum complete_line_internal_reason): Adjust comments.
8412         (completion_tracker::discard_completions): New.
8413         (completer_handle_brkchars_func_for_completer): Handle
8414         location_completer.
8415         (gdb_custom_word_point_brkchars)
8416         (gdb_org_rl_basic_quote_characters): New.
8417         (gdb_completion_word_break_characters_throw)
8418         (completion_find_completion_word): Handle trackers that use a
8419         custom word point.
8420         (completion_tracker::advance_custom_word_point_by): New.
8421         (completion_tracker::build_completion_result): Don't rely on
8422         readline appending the quote char.
8423         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8424         use a custom word point.
8425         (gdb_rl_attempted_completion_function): Restore
8426         rl_basic_quote_characters.
8427         * completer.h (class completion_tracker): Extend intro comment.
8428         (completion_tracker::set_quote_char)
8429         (completion_tracker::quote_char)
8430         (completion_tracker::set_use_custom_word_point)
8431         (completion_tracker::use_custom_word_point)
8432         (completion_tracker::custom_word_point)
8433         (completion_tracker::set_custom_word_point)
8434         (completion_tracker::advance_custom_word_point_by)
8435         (completion_tracker::completes_to_completion_word)
8436         (completion_tracker::discard_completions): New methods.
8437         (completion_tracker::m_quote_char)
8438         (completion_tracker::m_use_custom_word_point)
8439         (completion_tracker::m_custom_word_point): New fields.
8440         (advance_to_expression_complete_word_point): Declare.
8441         * f-lang.c (f_collect_symbol_completion_matches): Add
8442         complete_symbol_mode parameter.
8443         * language.h (struct language_defn)
8444         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8445         parameter.
8446         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8447         (linespec_complete_function): New function.
8448         (linespec_lexer_lex_keyword): Adjust.
8449         * linespec.h (linespec_keywords, linespec_complete_function): New
8450         declarations.
8451         * location.c (find_end_quote): New function.
8452         (explicit_location_lex_one): Add explicit_completion_info
8453         parameter.  Save quoting info.  Don't throw if being called for
8454         completion.  Don't handle Ada operators here.
8455         (is_cp_operator, skip_op_false_positives, first_of)
8456         (explicit_location_lex_one_function): New function.
8457         (string_to_explicit_location): Replace 'dont_throw' parameter with
8458         an explicit_completion_info pointer parameter.  Handle it.  Don't
8459         use explicit_location_lex_one to lex function names.  Use
8460         explicit_location_lex_one_function instead.
8461         * location.h (struct explicit_completion_info): New.
8462         (string_to_explicit_location): Replace 'dont_throw' parameter with
8463         an explicit_completion_info pointer parameter.
8464         * symtab.c (default_collect_symbol_completion_matches_break_on):
8465         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8466         (default_collect_symbol_completion_matches)
8467         (collect_symbol_completion_matches): Add complete_symbol_mode
8468         parameter.
8469         (collect_symbol_completion_matches_type): Pass down
8470         complete_symbol_mode::EXPRESSION.
8471         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8472         parameter.  Handle LINESPEC mode.
8473         * symtab.h (complete_symbol_mode): New.
8474         (default_collect_symbol_completion_matches_break_on)
8475         (default_collect_symbol_completion_matches)
8476         (collect_symbol_completion_matches)
8477         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8478         parameter.
8479
8480 2017-07-17  Pedro Alves  <palves@redhat.com>
8481
8482         * utils.c (enum class strncmp_iw_mode): New.
8483         (strcmp_iw): Rename to ...
8484         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8485         parameters.  Handle them.
8486         (strncmp_iw): New.
8487         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8488         * utils.h (strncmp_iw): Declare.
8489         (strcmp_iw): Move describing comments here.
8490
8491 2017-07-17  Pedro Alves  <palves@redhat.com>
8492
8493         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8494         CP_OPERATOR_STR.
8495         * c-typeprint.c (is_type_conversion_operator): Use
8496         CP_OPERATOR_STR.
8497         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8498         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8499         CP_OPERATOR_LEN.
8500         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8501         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8502         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8503         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8504         CP_OPERATOR_STR.
8505         * location.c: Include "cp-support.h".
8506         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8507         CP_OPERATOR_STR.
8508         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8509         CP_OPERATOR_LEN.
8510
8511 2017-07-17  Pedro Alves  <palves@redhat.com>
8512
8513         * cli/cli-cmds.c (complete_command): Use a completion tracker
8514         along with completion_find_completion_word for handle_brkchars
8515         phase.
8516         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8517         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8518         (struct gdb_rl_completion_word_info): New.
8519         (gdb_rl_find_completion_word): New.
8520         (completion_find_completion_word): New.
8521         * completer.h (completion_find_completion_word): Declare.
8522
8523 2017-07-17  Pedro Alves  <palves@redhat.com>
8524
8525         * ada-lang.c (symbol_completion_match): Adjust comments.
8526         (symbol_completion_add): Replace vector parameter with
8527         completion_tracker parameter.  Use it.
8528         (ada_make_symbol_completion_list): Rename to...
8529         (ada_collect_symbol_completion_matches): ... this.  Add
8530         completion_tracker parameter and use it.
8531         (ada_language_defn): Adjust.
8532         * break-catch-syscall.c (catch_syscall_completer): Adjust
8533         prototype and work with completion_tracker instead of VEC.
8534         * breakpoint.c (condition_completer): Adjust prototype and work
8535         with completion_tracker instead of VEC.
8536         * c-lang.c (c_language_defn, cplus_language_defn)
8537         (asm_language_defn, minimal_language_defn): Adjust to renames.
8538         * cli/cli-cmds.c (complete_command): Rework using
8539         completion_tracker.  Catch exceptions when completing.
8540         * cli/cli-decode.c (integer_unlimited_completer)
8541         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8542         with completion_tracker instead of VEC.
8543         * command.h (struct completion_tracker): Forward declare.
8544         (completer_ftype, completer_handle_brkchars_ftype): Change
8545         types.
8546         (complete_on_cmdlist, complete_on_enum): Adjust.
8547         * completer.c: Include <algorithm>.
8548         (struct gdb_completer_state): New.
8549         (current_completion): New global.
8550         (readline_line_completion_function): Delete.
8551         (noop_completer, filename_completer)
8552         (filename_completer_handle_brkchars, complete_files_symbols)
8553         (linespec_location_completer): Adjust to work with a
8554         completion_tracker instead of a VEC.
8555         (string_or_empty): New.
8556         (collect_explicit_location_matches): Adjust to work with a
8557         completion_tracker instead of a VEC.
8558         (explicit_location_completer): Rename to ...
8559         (complete_explicit_location): ... this and adjust to work with a
8560         completion_tracker instead of a VEC.
8561         (location_completer): Adjust to work with a completion_tracker
8562         instead of a VEC.
8563         (add_struct_fields): Adjust to work with a completion_list instead
8564         of VEC.
8565         (expression_completer): Rename to ...
8566         (complete_expression): ... this and adjust to work with a
8567         completion_tracker instead of a VEC.  Use complete_files_symbols.
8568         (expression_completer): Reimplement on top of complete_expression.
8569         (symbol_completer): Adjust to work with a completion_tracker
8570         instead of a VEC.
8571         (enum complete_line_internal_reason): Add describing comments.
8572         (complete_line_internal_normal_command): Adjust to work with a
8573         completion_tracker instead of a VEC.
8574         (complete_line_internal): Rename to ...
8575         (complete_line_internal_1): ... this and adjust to work with a
8576         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8577         handle_brkchars phase.
8578         (new_completion_tracker): Delete.
8579         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8580         complete_line_internal_1.
8581         (free_completion_tracker): Delete.
8582         (INITIAL_COMPLETION_HTAB_SIZE): New.
8583         (completion_tracker::completion_tracker)
8584         (completion_tracker::~completion_tracker): New.
8585         (maybe_add_completion): Delete.
8586         (completion_tracker::maybe_add_completion)
8587         (completion_tracker::add_completion)
8588         (completion_tracker::add_completions): New.
8589         (throw_max_completions_reached_error): Delete.
8590         (complete_line): Adjust to work with a completion_tracker instead
8591         of a VEC.  Don't create a completion_tracker_t or check for max
8592         completions here.
8593         (command_completer, command_completer_handle_brkchars)
8594         (signal_completer, reg_or_group_completer_1)
8595         (reg_or_group_completer, default_completer_handle_brkchars):
8596         Adjust to work with a completion_tracker.
8597         (gdb_completion_word_break_characters_throw): New.
8598         (gdb_completion_word_break_characters): Reimplement.
8599         (line_completion_function): Delete.
8600         (completion_tracker::recompute_lowest_common_denominator)
8601         (expand_preserving_ws)
8602         (completion_tracker::build_completion_result)
8603         (completion_result::completion_result)
8604         (completion_result::completion_result)
8605         (completion_result::~completion_result)
8606         (completion_result::completion_result)
8607         (completion_result::release_match_list, compare_cstrings)
8608         (completion_result::sort_match_list)
8609         (completion_result::reset_match_list)
8610         (gdb_rl_attempted_completion_function_throw)
8611         (gdb_rl_attempted_completion_function): New.
8612         * completer.h (completion_list, struct completion_result)
8613         (class completion_tracker): New.
8614         (complete_line): Add completion_tracker parameter.
8615         (readline_line_completion_function): Delete.
8616         (gdb_rl_attempted_completion_function): New.
8617         (noop_completer, filename_completer, expression_completer)
8618         (location_completer, symbol_completer, command_completer)
8619         (signal_completer, reg_or_group_completer): Update prototypes.
8620         (completion_tracker_t, new_completion_tracker)
8621         (make_cleanup_free_completion_tracker): Delete.
8622         (enum maybe_add_completion_enum): Delete.
8623         (maybe_add_completion): Delete.
8624         (throw_max_completions_reached_error): Delete.
8625         * corefile.c (complete_set_gnutarget): Adjust to work with a
8626         completion_tracker instead of a VEC.
8627         * cp-abi.c (cp_abi_completer): Adjust to work with a
8628         completion_tracker instead of a VEC.
8629         * d-lang.c (d_language_defn): Adjust.
8630         * disasm.c (disassembler_options_completer): Adjust to work with a
8631         completion_tracker instead of a VEC.
8632         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8633         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8634         with a completion_tracker instead of a VEC.
8635         (f_language_defn): Adjust.
8636         * go-lang.c (go_language_defn): Adjust.
8637         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8638         Adjust to work with a completion_tracker instead of a VEC.
8639         * infrun.c (handle_completer): Likewise.
8640         * interps.c (interpreter_completer): Likewise.
8641         * interps.h (interpreter_completer): Likewise.
8642         * language.c (unknown_language_defn, auto_language_defn)
8643         (local_language_defn): Adjust.
8644         * language.h (language_defn::la_make_symbol_completion_list):
8645         Rename to ...
8646         (language_defn::la_collect_symbol_completion_matches): ... this
8647         and adjust to work with a completion_tracker instead of a VEC.
8648         * m2-lang.c (m2_language_defn): Adjust.
8649         * objc-lang.c (objc_language_defn): Adjust.
8650         * opencl-lang.c (opencl_language_defn): Adjust.
8651         * p-lang.c (pascal_language_defn): Adjust.
8652         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8653         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8654         with a completion_tracker.
8655         * rust-lang.c (rust_language_defn): Adjust.
8656         * symtab.c (free_completion_list, do_free_completion_list)
8657         (return_val, completion_tracker): Delete.
8658         (completion_list_add_name, completion_list_add_symbol)
8659         (completion_list_add_msymbol, completion_list_objc_symbol)
8660         (completion_list_add_fields, add_symtab_completions): Add
8661         completion_tracker parameter and use it.
8662         (default_make_symbol_completion_list_break_on_1): Rename to...
8663         (default_collect_symbol_completion_matches_break_on): ... this.
8664         Add completion_tracker parameter and use it instead of allocating
8665         a completion tracker here.
8666         (default_make_symbol_completion_list_break_on): Delete old
8667         implementation.
8668         (default_make_symbol_completion_list): Delete.
8669         (default_collect_symbol_completion_matches): New.
8670         (make_symbol_completion_list): Delete.
8671         (collect_symbol_completion_matches): New.
8672         (make_symbol_completion_type): Rename to ...
8673         (collect_symbol_completion_matches_type): ... this.  Add
8674         completion_tracker parameter and use it instead of VEC.
8675         (make_file_symbol_completion_list_1): Rename to...
8676         (collect_file_symbol_completion_matches): ... this.  Add
8677         completion_tracker parameter and use it instead of VEC.
8678         (make_file_symbol_completion_list): Delete.
8679         (add_filename_to_list): Use completion_list instead of a VEC.
8680         (add_partial_filename_data::list): Now a completion_list.
8681         (make_source_files_completion_list): Work with a completion_list
8682         instead of a VEC.
8683         * symtab.h: Include "completer.h".
8684         (default_make_symbol_completion_list_break_on)
8685         (default_make_symbol_completion_list, make_symbol_completion_list)
8686         (make_symbol_completion_type, make_file_symbol_completion_list)
8687         (make_source_files_completion_list): Delete.
8688         (default_collect_symbol_completion_matches_break_on)
8689         (default_collect_symbol_completion_matches)
8690         (collect_symbol_completion_matches)
8691         (collect_symbol_completion_matches_type)
8692         (collect_file_symbol_completion_matches)
8693         (make_source_files_completion_list): New.
8694         * top.c (init_main): Don't install a rl_completion_entry_function
8695         hook.  Install a rl_attempted_completion_function hook instead.
8696         * tui/tui-layout.c (layout_completer): Adjust to work with a
8697         completion_tracker.
8698         * tui/tui-regs.c (tui_reggroup_completer):
8699         * tui/tui-win.c (window_name_completer, focus_completer)
8700         (winheight_completer): Adjust to work with a completion_tracker.
8701         * value.c: Include "completer.h".
8702         (complete_internalvar): Adjust to work with a completion_tracker.
8703         * value.h (complete_internalvar): Likewise.
8704
8705 2017-07-17  Pedro Alves  <palves@redhat.com>
8706
8707         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8708         renames.
8709         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8710         comments to completer_ftype's declaration.
8711         <completer_handle_brkchars>: Change type to
8712         completer_handle_brkchars_ftype.
8713         * command.h (completer_ftype): Add describing comment and give
8714         names to parameters.
8715         (completer_ftype_void): Rename to ...
8716         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8717         (set_cmd_completer_handle_brkchars): Adjust.
8718         * completer.c (filename_completer_handle_brkchars): New function.
8719         (complete_line_internal_normal_command): New function, factored
8720         out from ...
8721         (complete_line_internal): ... here.
8722         (command_completer_handle_brkchars)
8723         (default_completer_handle_brkchars)
8724         (completer_handle_brkchars_func_for_completer): New functions.
8725         * completer.h (set_gdb_completion_word_break_characters): Delete
8726         declaration.
8727         (completer_handle_brkchars_func_for_completer): New declaration.
8728         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8729         completer_handle_brkchars_func_for_completer.
8730
8731 2017-07-17  Pedro Alves  <palves@redhat.com>
8732
8733         * completer.c (symbol_completer): New function, based on
8734         make_symbol_completion_list_fn.
8735         * completer.h (symbol_completer): New declaration.
8736         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8737         * python/py-cmd.c (completers): Adjust.
8738         * symtab.c (make_symbol_completion_list_fn): Delete.
8739         * symtab.h (make_symbol_completion_list_fn): Delete.
8740         * cli/cli-decode.c (add_cmd): Adjust.
8741
8742 2017-07-17  Pedro Alves  <palves@redhat.com>
8743
8744         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8745         * dwarf2read.c: Include "filename-seen-cache.h".
8746         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8747         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8748         * filename-seen-cache.c: New file.
8749         * filename-seen-cache.h: New file.
8750         * symtab.c: Include "filename-seen-cache.h".
8751         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8752         (create_filename_seen_cache, clear_filename_seen_cache)
8753         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8754         to filename-seen-cache.h/filename-seen-cache.c.
8755         (output_source_filename, sources_info)
8756         (maybe_add_partial_symtab_filename)
8757         (make_source_files_completion_list): Adjust to use
8758         filename_seen_cache.
8759
8760 2017-07-17  Pedro Alves  <palves@redhat.com>
8761
8762         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8763         fields.
8764         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8765         dwarf2_debug_sections*)): New.
8766         (dwarf2_per_objfile::dwarf2_per_objfile(const
8767         dwarf2_per_objfile&)): Declare as deleted.
8768         (dwarf2_per_objfile::operator=): Declare as deleted.
8769         (dwarf2_per_objfile::dwarf2_per_objfile)
8770         (dwarf2_per_objfile::~dwarf2_per_objfile)
8771         (dwarf2_per_objfile::free_cached_comp_units): New.
8772         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8773         ctor.  Call dwarf2_per_objfile's ctor manually.
8774         (dwarf2_locate_sections): Deleted/refactored as ...
8775         (dwarf2_per_objfile::locate_sections): ... this new method.
8776         (free_cached_comp_units): Defer to
8777         dwarf2_per_objfile::free_cached_comp_units.
8778         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8779
8780 2017-07-14  Tom Tromey  <tom@tromey.com>
8781
8782         PR rust/21764:
8783         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8784         parameter.
8785         <UNOP_SIZEOF>: Split into separate case.
8786         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8787
8788 2017-07-14  Tom Tromey  <tom@tromey.com>
8789
8790         PR rust/21763:
8791         * symtab.c (symbol_matches_domain): Add language_rust to special
8792         case.
8793         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8794         treat LOC_TYPEDEF symbols as variables.
8795
8796 2017-07-14  Pedro Alves  <palves@redhat.com>
8797
8798         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8799         symtabs matching all symtabs with SRCFILE as file name instead of
8800         only considering the first hit, with lookup_symtab.
8801
8802 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8803
8804         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8805         operator_name parameters.
8806         (gen_expr): Update function call.
8807
8808 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8809
8810         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8811         parameter.
8812         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8813         Likewise.
8814         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8815         parameter, use agent_expr::gdbarch instead, update function
8816         calls.
8817         (locexpr_tracepoint_var_ref): Likewise.
8818         (loclist_tracepoint_var_ref): Likewise.
8819         * ax-gdb.c (gen_trace_static_fields): Likewise.
8820         (gen_traced_pop): Likewise.
8821         (gen_frame_args_address): Likewise.
8822         (gen_frame_locals_address): Likewise.
8823         (gen_var_ref): Likewise.
8824         (gen_struct_ref_recursive): Likewise.
8825         (gen_static_field): Likewise.
8826         (gen_maybe_namespace_elt): Likewise.
8827         (gen_expr): Likewise.
8828         (gen_trace_for_var): Likewise.
8829         (gen_trace_for_expr): Likewise.
8830         (gen_trace_for_return_address): Likewise.
8831
8832 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8833
8834         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8835         parameter.
8836         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8837
8838 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8839
8840         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8841         from ax, update calls.
8842         (gen_usual_arithmetic): Likewise.
8843         (gen_integral_promotions): Likewise.
8844         (gen_bitfield_ref): Likewise.
8845         (gen_primitive_field): Likewise.
8846         (gen_struct_ref_recursive): Likewise.
8847         (gen_struct_ref): Likewise.
8848         (gen_maybe_namespace_elt): Likewise.
8849         (gen_struct_elt_for_reference): Likewise.
8850         (gen_namespace_elt): Likewise.
8851         (gen_aggregate_elt_ref): Likewise.
8852         (gen_expr): Get gdbarch from ax, update calls.
8853         (gen_expr_binop_rest): Likewise.
8854
8855 2017-07-13  Pedro Alves  <palves@redhat.com>
8856
8857         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8858         as default tdesc.
8859         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8860         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8861         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8862         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8863         tdep.
8864         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8865         Get final tdesc from the tdep.
8866         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8867         default tdesc.
8868         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8869         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8870         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8871         Use it as default tdesc.
8872         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8873         down to amd_init_abi.  No longer handle fallback tdesc here.
8874         * amd64-tdep.h (tdesc_x32): Declare.
8875         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8876         parameter.
8877         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8878         as default tdesc.
8879
8880 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8881
8882         * s390-linux-tdep.c (s390_process_record): Add support for
8883         instructions new in arch12.
8884
8885 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8886
8887         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8888         PT_GETFSBASE and PT_GETGSBASE.
8889         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8890         PT_SETGSBASE.
8891
8892 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8893
8894         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8895         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8896         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8897         those rules.
8898         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8899         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8900         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8901         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8902         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8903         * features/i386/amd64.xml: Add 64bit-segments.xml.
8904         * features/i386/amd64-avx-avx512.c: Regenerated.
8905         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8906         * features/i386/amd64-avx-mpx.c: Regenerated.
8907         * features/i386/amd64-avx.c: Regenerated.
8908         * features/i386/amd64-mpx.c: Regenerated.
8909         * features/i386/amd64.c: Regenerated.
8910         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8911         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8912         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8913         * regformats/i386/amd64-avx.dat: Regenerated.
8914         * regformats/i386/amd64-mpx.dat: Regenerated.
8915         * regformats/i386/amd64.dat: Regenerated.
8916
8917 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8918
8919         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8920         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8921
8922 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8923
8924         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8925         unsetenv.
8926         * gnulib/aclocal.m4: Regenerate.
8927         * gnulib/config.in: Regenerate.
8928         * gnulib/configure: Regenerate.
8929         * gnulib/import/Makefile.am: Regenerate.
8930         * gnulib/import/Makefile.in: Regenerate.
8931         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8932         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8933         * gnulib/import/m4/environ.m4: New file.
8934         * gnulib/import/m4/setenv.m4: New file.
8935         * gnulib/import/setenv.c: New file.
8936         * gnulib/import/unsetenv.c: New file.
8937
8938 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8939
8940         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8941         address when op is DW_OP_addr.
8942
8943 2017-07-09  Tom Tromey  <tom@tromey.com>
8944
8945         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8946         check and apply to outer type.
8947
8948 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8949
8950         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8951         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8952         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8953         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8954
8955 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8956
8957         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8958
8959 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8960
8961         * corelow.c (get_core_siginfo): Remove.
8962         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8963         instead of get_core_siginfo.
8964         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8965         * gdbarch.h: Re-generate.
8966         * gdbarch.c: Re-generate.
8967         * linux-tdep.c (linux_core_xfer_siginfo): New.
8968         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8969
8970 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8971
8972         * corelow.c (thread_section_name): Move to ...
8973         * gdbcore.h (thread_section_name): ... here.
8974
8975 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8976
8977         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8978         (struct siginfo32): New.
8979         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8980         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8981         via ptrace(PT_LWPINFO).
8982
8983 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8984
8985         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8986         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8987         (fbsd_get_siginfo_type): New.
8988         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8989         (_initialize_fbsd_tdep): New.
8990
8991 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8992
8993         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8994         a singular dwo_unit*) to support multiple CUs in the same way that
8995         multiple TUs are supported.
8996         (create_cus_hash_table): Replace create_dwo_cu with a function for
8997         parsing multiple CUs from a DWO file.
8998         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8999         create_dwo_cu.
9000         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9001         htab_find, rather than comparing the signature to a singleton CU in
9002         the dwo_file.
9003
9004 2017-07-06  Pedro Alves  <palves@redhat.com>
9005
9006         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9007
9008 2017-07-04  Pedro Alves  <palves@redhat.com>
9009
9010         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9011         * gdbtypes.h (TYPE_STATIC): Delete.
9012         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9013         is_synchronized, is_native>: Delete.
9014         <dummy>: Bump.
9015         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9016         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9017         (TYPE_FN_FIELD_ABSTRACT): Delete.
9018
9019 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9020
9021         * buffer.h (buffer_finish): Fix spelling mistakes.
9022
9023 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9024
9025         * .dir-locals.el: Automatically switch to C-style comments in
9026         versions of Emacs that support the feature.
9027
9028 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9029             Pedro Alves  <palves@redhat.com>
9030
9031         PR cli/21688
9032         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9033         (process_next_line): New variable 'inline_cmd'.
9034         Adjust 'if' clauses for "python", "compile" and "guile" to use
9035         'command_name_equals' and check for '!inline_cmd'.
9036
9037 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9038
9039         PR cli/21688
9040         * cli/cli-script.c (command_name_equals_not_inline): New function.
9041         (process_next_line): Adjust 'if' clauses for "python", "compile"
9042         and "guile" to use command_name_equals_not_inline.
9043
9044 2017-06-29  Pedro Alves  <palves@redhat.com>
9045
9046         * completer.c (expression_completer): Call
9047         linespec_location_completer instead of location_completer.
9048
9049 2017-06-29  Pedro Alves  <palves@redhat.com>
9050
9051         * completer.c (expression_completer): Remove code that recomputes
9052         'text' from 'word'.
9053
9054 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9055
9056         * regformats/regdat.sh: Generate code with
9057         "ifndef IN_PROCESS_AGENT".
9058
9059 2017-06-28  Pedro Alves  <palves@redhat.com>
9060
9061         * command.h: Include "common/scoped_restore.h".
9062
9063 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9064
9065         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9066         instead of obstack_grow.
9067
9068 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9069
9070         PR gdb/21337
9071         * symfile.c (reread_symbols): Call objfiles_changed just before
9072         read_symbols.
9073
9074 2017-06-27  Pedro Alves  <palves@redhat.com>
9075
9076         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9077         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9078         (completion_list_add_symbol, completion_list_add_msymbol):
9079         ... these new functions.
9080         (add_symtab_completions)
9081         (default_make_symbol_completion_list_break_on_1): Adjust.
9082
9083 2017-06-27  Pedro Alves  <palves@redhat.com>
9084
9085         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9086         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9087         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9088         dtor.
9089         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9090         'storage_obstack' field an auto_obstack.  In-class initialize all
9091         non-bitfield fields.  Make minsyms_read bool.
9092         * symfile.c (read_symbols): Adjust.
9093
9094 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9095
9096         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9097         (gdbsim_store_register): Likewise.
9098
9099 2017-06-27  Pedro Alves  <palves@redhat.com>
9100
9101         * c-exp.y (name_obstack): Now an auto_obstack.
9102         (yylex): Use auto_obstack::clear.
9103         (c_parse): Use auto_obstack::clear instead of reinitializing and
9104         freeing the obstack.
9105         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9106         * d-exp.y (name_obstack): Now an auto_obstack.
9107         (yylex): Use auto_obstack::clear.
9108         (d_parse): Use auto_obstack::clear instead of reinitializing and
9109         freeing the obstack.
9110         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9111         auto_obstack.
9112         * dwarf2read.c (create_addrmap_from_index)
9113         (dwarf2_build_psymtabs_hard)
9114         (update_enumeration_type_from_children): Likewise.
9115         * gdb_obstack.h (auto_obstack): New type.
9116         * go-exp.y (name_obstack): Now an auto_obstack.
9117         (build_packaged_name): Use auto_obstack::clear.
9118         (go_parse): Use auto_obstack::clear instead of reinitializing and
9119         freeing the obstack.
9120         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9121         auto_obstack.
9122         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9123         * rust-exp.y (work_obstack): Now an auto_obstack.
9124         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9125         reinitializing and freeing the obstack.
9126         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9127         (host_char_to_target): Use auto_obstack.
9128         * utils.h (make_cleanup_obstack_free): Delete declaration.
9129         * valprint.c (generic_emit_char, generic_printstr): Use
9130         auto_obstack.
9131
9132 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9133
9134         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9135         thread.
9136         (darwin_init_thread_list): Don't update dummy thread.
9137         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9138
9139 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9140
9141         * record-full.c (netorder16): Remove.
9142
9143 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9144
9145         * common/diagnostics.h: Define macros for GCC.
9146         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9147         * common/vec.h: Include diagnostics.h.
9148         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9149         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9150         warning.
9151
9152 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9153
9154         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9155         New macro.
9156         * ada-lex.l: Ignore deprecated register warnings.
9157
9158 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9159
9160         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9161         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9162
9163 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9164
9165         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9166         its own line.
9167
9168 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9169
9170         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9171
9172 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9173
9174         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9175         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9176         (xtensa_register_read_masked): Likewise.
9177
9178 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9179
9180         * common/environ.c (gdb_environ::unset): Update comment.
9181
9182 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9183
9184         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9185         registers.
9186
9187 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9188
9189         * record-full.c (record_full_exec_insn): Use byte_vector.
9190
9191 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9192
9193         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9194         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9195
9196 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9197
9198         * remote.c (cached_reg): Move from here...
9199         * regcache.h (cached_reg): ...to here.
9200         * python/py-unwind.c (struct reg_info): Remove.
9201         (cached_frame_info): Use cached_reg_t.
9202         (pyuw_prev_register): Likewise.
9203         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9204         (pyuw_dealloc_cache): Free all registers.
9205
9206 2017-06-22  Pedro Alves  <palves@redhat.com>
9207             Simon Marchi  <simon.marchi@ericsson.com>
9208
9209         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9210         warning.
9211         * common/diagnostics.h: New file.
9212
9213 2017-06-22  Pedro Alves  <palves@redhat.com>
9214
9215         * common/agent.h: Add include guards.
9216
9217 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9218
9219         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9220         talk about addressable units instead of bytes.
9221
9222 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9223
9224         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9225         of '::const_iterator'.
9226
9227 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9228
9229         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9230         'unittests/environ-selftests.c'.
9231         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9232         * charset.c (find_charset_names): Declare object 'iconv_env'.
9233         Update code to use 'iconv_env' object.  Remove call to
9234         'free_environ'.
9235         * common/environ.c: Include <utility>.
9236         (make_environ): Delete function.
9237         (free_environ): Delete function.
9238         (gdb_environ::clear): New function.
9239         (gdb_environ::operator=): New function.
9240         (gdb_environ::get): Likewise.
9241         (environ_vector): Delete function.
9242         (set_in_environ): Delete function.
9243         (gdb_environ::set): New function.
9244         (unset_in_environ): Delete function.
9245         (gdb_environ::unset): New function.
9246         (gdb_environ::envp): Likewise.
9247         * common/environ.h: Include <vector>.
9248         (struct gdb_environ): Delete; transform into...
9249         (class gdb_environ): ... this class.
9250         (free_environ): Delete prototype.
9251         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9252         environ_vector): Likewise.
9253         * infcmd.c (run_command_1): Update code to call
9254         'envp' from 'gdb_environ' class.
9255         (environment_info): Update code to call methods from 'gdb_environ'
9256         class.
9257         (unset_environment_command): Likewise.
9258         (path_info): Likewise.
9259         (path_command): Likewise.
9260         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9261         (inferior::inferior): Initialize 'environment' using the host's
9262         information.
9263         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9264         Include "environ.h".
9265         (class inferior) <environment>: Change type from 'struct
9266         gdb_environ' to 'gdb_environ'.
9267         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9268         methods from 'gdb_environ' class.
9269         * solib.c (solib_find_1): Likewise
9270         * unittests/environ-selftests.c: New file.
9271
9272 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9273
9274         * features/i386/i386-linux.xml: Exchange the order of including
9275         32bit-linux.xml and 32bit-sse.xml.
9276         * features/i386/i386-linux.c: Regenerated.
9277
9278 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9279
9280         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9281         Delete copy ctor and assignment operator.
9282         (tdesc_type): Likewise.
9283         (tdesc_feature): Likewise.
9284         (tdesc_free_reg): Remove.
9285         (tdesc_create_reg): Use new.
9286         (tdesc_free_type): Remove.
9287         (tdesc_create_vector): Use new.
9288         (tdesc_create_union): Likewise.
9289         (tdesc_create_flags): Likewise.
9290         (tdesc_create_enum): Likewise.
9291         (tdesc_free_feature): Delete.
9292         (free_target_description): Use delete.
9293
9294 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9295
9296         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9297         registers.
9298
9299 2017-06-19  Pedro Alves  <palves@redhat.com>
9300
9301         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9302         after gdb::unlinker.
9303
9304 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9305
9306         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9307         gdb_environ to access an environment variable.
9308
9309 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9310
9311         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9312         gdb_byte*.
9313
9314 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9315
9316         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9317
9318 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9319
9320         * configure: Re-generate.
9321         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9322
9323 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9324
9325         * configure: Re-generate.
9326         * warning.m4: Pass -Werror to compiler when checking for
9327         supported warning flags.
9328
9329 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9330
9331         * Makefile.in (COMPILE.pre): Add "-x c++".
9332
9333 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9334             Pedro Alves  <palves@redhat.com>
9335             Yao Qi  <yao.qi@linaro.org>
9336
9337         * defs.h (RequireLongest): New.
9338         (extract_integer): Declare function template.
9339         (extract_signed_integer): Remove the declaration, but define it
9340         static inline.
9341         (extract_unsigned_integer): Likewise.
9342         (store_integer): Declare function template.
9343         (store_signed_integer): Remove the declaration, but define it
9344         static inline.
9345         (store_unsigned_integer): Likewise.
9346         * findvar.c (extract_integer): New function template.
9347         (extract_signed_integer): Remove.
9348         (extract_unsigned_integer): Remove.
9349         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9350         instantiations.
9351         (store_integer): New function template.
9352         (store_signed_integer): Remove.
9353         (store_unsigned_integer): Remove.
9354         (store_integer): Explicit instantiations.
9355         * regcache.c (regcache_raw_read_signed): Update.
9356         (regcache::raw_read): New function.
9357         (regcache::raw_read_signed): Remove.
9358         (regcache::raw_read_unsigned): Remove.
9359         (regcache_raw_read_unsigned): Update.
9360         (regcache_raw_write_unsigned): Update.
9361         (regcache::raw_write_signed): Remove.
9362         (regcache::raw_write): New function.
9363         (regcache_cooked_read_signed): Update.
9364         (regcache::raw_write_unsigned): Remove.
9365         (regcache::cooked_read_signed): Remove.
9366         (regcache_cooked_read_unsigned): Update.
9367         (regcache::cooked_read_unsigned): Remove.
9368         (regcache_cooked_write_signed): Update.
9369         (regcache_cooked_write_unsigned): Update.
9370         * regcache.h (regcache) <raw_read_signed>: Remove.
9371         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9372         <raw_read, raw_write>: New.
9373         <cooked_read_signed, cooked_write_signed>: Remove.
9374         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9375         <cooked_read, cooked_write>: New.
9376         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9377         (sh64_pseudo_register_write): Update.
9378
9379 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9380
9381         * arc-tdep.c (arc_disassembler_options): New variable.
9382         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9383         of default_print_insn.
9384         (arc_delayed_print_insn): Set info->section when needed,
9385         use default_print_insn to retrieve a disassembler.
9386
9387 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9388
9389         PR gdb/21574
9390         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9391         to mention $SHELL and startup-with-shell.
9392
9393 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9394
9395         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9396
9397 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9398
9399         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9400         default_print_insn instead of print_insn_aarch64.
9401         * arm-tdep.c (gdb_print_insn_arm): Call
9402         default_print_insn instead of print_insn_big_arm
9403         and print_insn_little_arm.
9404         * i386-tdep.c (i386_print_insn): Call default_print_insn
9405         instead of print_insn_i386.
9406         * ia64-tdep.c (ia64_print_insn): Call
9407         default_print_insn instead of print_insn_ia64.
9408         * mips-tdep.c (gdb_print_insn_mips): Call
9409         default_print_insn instead of print_insn_big_mips
9410         and print_insn_little_mips.
9411         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9412         instead of print_insn_spu.
9413
9414 2017-06-14  Pedro Alves  <palves@redhat.com>
9415
9416         * ada-lang.c: Include "common/byte-vector.h".
9417         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9418         * charset.c (wchar_iterator::iterate): Resize the vector instead
9419         of reserving it.
9420         * common/byte-vector.h: Include "common/def-vector.h".
9421         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9422         * cli/cli-dump.c: Include "common/byte-vector.h".
9423         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9424         * common/byte-vector.h: New file.
9425         * common/def-vector.h: New file.
9426         * common/default-init-alloc.h: New file.
9427         * dwarf2loc.c: Include "common/byte-vector.h".
9428         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9429         instead of reserving it.
9430         * dwarf2read.c: Include "common/byte-vector.h".
9431         (data_buf::m_vec): Now a gdb::byte_vector.
9432         * gdb_regex.c: Include "common/def-vector.h".
9433         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9434         * mi/mi-main.c: Include "common/byte-vector.h".
9435         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9436         * printcmd.c: Include "common/byte-vector.h".
9437         (print_scalar_formatted): Use gdb::byte_vector.
9438         * valprint.c: Include "common/byte-vector.h".
9439         (maybe_negate_by_bytes, print_decimal_chars): Use
9440         gdb::byte_vector.
9441
9442 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9443
9444         * darwin-nat.c: Include "nat/fork-inferior.h".
9445
9446 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9447
9448         * configure.nat: Factor out Darwin bits that are not
9449         architecture-specific.  Add fork-inferior.o.
9450
9451 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9452
9453         * configure.nat: Factor out AIX bits that are not
9454         architecture-specific.  Add fork-inferior.o.
9455
9456 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9457
9458         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9459         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9460         wrappers that just call rw_pieced_value.
9461
9462 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9463
9464         * dwarf2loc.c (write_pieced_value): When writing the data for a
9465         memory piece, use write_memory_with_notification instead of
9466         write_memory.
9467
9468 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9469
9470         * valops.c (read_value_memory): Change embedded_offset to
9471         represent a bit offset instead of a byte offset.
9472         * value.h (read_value_memory): Adjust comment.
9473
9474 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9475
9476         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9477         dest_offset_bits and source_offset_bits.
9478         (write_pieced_value): Likewise.
9479
9480 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9481
9482         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9483         given by DW_OP_bit_piece.
9484         (write_pieced_value): Likewise.
9485
9486 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9487
9488         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9489         some other preparations to the places where sufficient information
9490         is available.
9491         (write_pieced_value): Likewise.
9492
9493 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9494
9495         * dwarf2loc.c (bits_to_bytes): New function.
9496         (read_pieced_value): Fix offset calculations for register pieces
9497         on big-endian targets.
9498         (write_pieced_value): Likewise.
9499
9500 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9501
9502         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9503         (write_pieced_value): Likewise.
9504
9505 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9506
9507         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9508         transfer the source value's least significant bits, instead of its
9509         lowest-addressed ones.  Rename type_len to max_offset.
9510         (read_pieced_value): Mirror above changes to write_pieced_value as
9511         applicable.
9512
9513 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9514
9515         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9516         truncate full bytes from dest_offset_bits before using it as an
9517         offset into the buffer.
9518
9519 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9520
9521         * dwarf2loc.c (write_pieced_value): Include transfer size in
9522         byte-wise check.
9523
9524 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9525
9526         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9527         calculation of this_size.
9528
9529 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9530
9531         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9532         when targeting a bit-field.
9533         (write_pieced_value): Likewise.
9534
9535 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9536
9537         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9538         (allocate_piece_closure): Drop addr_size parameter.
9539         (dwarf2_evaluate_loc_desc_full): Adjust call to
9540         allocate_piece_closure.
9541
9542 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9543
9544         PR gdb/21226
9545         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9546         the LSB end, independent of endianness.
9547
9548 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9549
9550         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9551         size capping.
9552
9553 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9554
9555         * mips-linux-nat.c: Move include features/mips*-linux.c to
9556         mips-linux-tdep.c.
9557         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9558         to mips-linux-tdep.c.
9559         * mips-linux-tdep.c: Include features/mips*-linux.c
9560         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9561         functions.
9562         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9563         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9564         (tdesc_mips64_dsp_linux): Declare.
9565
9566 2017-06-12  Tom Tromey  <tom@tromey.com>
9567
9568         * valprint.h (val_print_type_code_int): Remove.
9569         * valprint.c (generic_val_print_int): Always call
9570         val_print_scalar_formatted.
9571         (val_print_type_code_int): Remove.
9572         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9573         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9574         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9575         * ada-valprint.c (ada_val_print_num): Use
9576         val_print_scalar_formatted.
9577
9578 2017-06-12  Tom Tromey  <tom@tromey.com>
9579
9580         * printcmd.c (print_scalar_formatted): Unify the two switches.
9581         Don't convert scalars to LONGEST.
9582
9583 2017-06-12  Tom Tromey  <tom@tromey.com>
9584
9585         PR exp/16225:
9586         * valprint.h (print_decimal_chars): Update.
9587         * valprint.c (maybe_negate_by_bytes): New function.
9588         (print_decimal_chars): Add "is_signed" argument.
9589         * printcmd.c (print_scalar_formatted): Update.
9590
9591 2017-06-12  Tom Tromey  <tom@tromey.com>
9592
9593         PR exp/16225:
9594         * valprint.h (print_binary_chars, print_hex_chars): Update.
9595         * valprint.c (val_print_type_code_int): Update.
9596         (print_binary_chars): Add "zero_pad" argument.
9597         (emit_octal_digit): New function.
9598         (print_octal_chars): Don't zero-pad.
9599         (print_decimal_chars): Likewise.
9600         (print_hex_chars): Add "zero_pad" argument.
9601         * sh64-tdep.c (sh64_do_fp_register): Update.
9602         * regcache.c (regcache::dump): Update.
9603         * printcmd.c (print_scalar_formatted): Update.
9604         * infcmd.c (default_print_one_register_info): Update.
9605
9606 2017-06-12  Pedro Alves  <palves@redhat.com>
9607             Alan Hayward  <alan.hayward@arm.com>
9608
9609         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9610         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9611         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9612         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9613         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9614
9615 2017-06-12  Pedro Alves  <palves@redhat.com>
9616
9617         * dwarf2read.c (mapped_symtab::data): Now a vector of
9618         symtab_index_entry instead of vector of
9619         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9620         whether an element's name is NULL instead of checking whether the
9621         element itself is NULL.
9622         (find_slot): Change return type.  Adjust.
9623         (hash_expand, , add_index_entry, uniquify_cu_indices)
9624         (write_hash_table): Adjust.
9625
9626 2017-06-12  Pedro Alves  <palves@redhat.com>
9627
9628         * dwarf2read.c (recursively_count_psymbols): New function.
9629         (write_psymtabs_to_index): Call it to compute number of psyms and
9630         pass estimate size of psyms_seen to unordered_set's ctor.
9631
9632 2017-06-12  Pedro Alves  <palves@redhat.com>
9633
9634         * dwarf2read.c (write_hash_table): Check if key already exists
9635         before emplacing.
9636
9637 2017-06-12  Pedro Alves  <palves@redhat.com>
9638
9639         * dwarf2read.c (data_buf::append_space): Rename to...
9640         (data_buf::grow): ... this, and make private.  Adjust all callers.
9641         (data_buf::append_uint): New method.
9642         (add_address_entry, write_one_signatured_type)
9643         (write_psymtabs_to_index): Use it.
9644
9645 2017-06-12  Pedro Alves  <palves@redhat.com>
9646
9647         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9648         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9649         (data_buf::file_write): Call ::fwrite directly.
9650
9651 2017-06-12  Pedro Alves  <palves@redhat.com>
9652
9653         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9654         std::vector::erase.
9655
9656 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9657
9658         Code cleanup: C++ify .gdb_index producer.
9659         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9660         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9661         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9662         (create_strtab, add_string): Remove.
9663         (file_write, data_buf): New.
9664         (struct symtab_index_entry): Use std::vector for cu_indices.
9665         (struct mapped_symtab): Use std::vector for data.
9666         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9667         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9668         Remove.
9669         (find_slot): Change return type.  Update it to the new data structures.
9670         (hash_expand, add_index_entry): Update it to the new data structures.
9671         (offset_type_compare): Remove.
9672         (uniquify_cu_indices): Update it to the new data structures.
9673         (c_str_view, c_str_view_hasher, vector_hasher): New.
9674         (add_indices_to_cpool): Remove.
9675         (write_hash_table): Update it to the new data structures.
9676         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9677         (eq_psymtab_cu_index): Remove.
9678         (psym_index_map): New typedef.
9679         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9680         reference and std::unordered_map for cu_index_htab.
9681         (add_address_entry, add_address_entry_worker, write_address_map)
9682         (write_psymbols): Update it to the new data structures.
9683         (write_obstack): Remove.
9684         (struct signatured_type_index_data): Change types_list to a data_buf
9685         reference and psyms_seen to a std::unordered_set reference.
9686         (write_one_signatured_type, recursively_write_psymbols)
9687         (write_psymtabs_to_index): Update it to the new data structures.
9688
9689 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9690
9691         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9692         separate-debug-file commands.
9693         * symfile.h (separate_debug_file_debug): New global.
9694         * symfile.c (separate_debug_file_debug): New global.
9695         (separate_debug_file_exists, find_separate_debug_file): Add
9696         debug output.
9697         (_initialize_symfile): Add "set debug separate-debug-file"
9698         command.
9699         * build-id.c (build_id_to_debug_bfd,
9700         find_separate_debug_file_by_buildid): Add debug output.
9701
9702 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9703
9704         * gdbarch.sh (displaced_step_free_closure): Remove.
9705         * gdbarch.h, gdbarch.c: Re-generate.
9706         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9707         displaced_step_free_closure.
9708         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9709         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9710         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9711         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9712         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9713         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9714         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9715         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9716         * infrun.c (displaced_step_clear): Call xfree instead of
9717         gdbarch_displaced_step_free_closure.
9718
9719 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9720
9721         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9722         NULL".
9723
9724 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9725
9726         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9727         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9728         (mn10300_push_dummy_call): Likewise.
9729
9730 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9731
9732         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9733
9734 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9735
9736         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9737
9738 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9739
9740         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9741         able to start inferiors using a shell.
9742         (New remote packets): Announce new packet "QStartupWithShell".
9743         * remote.c: Add PACKET_QStartupWithShell.
9744         (extended_remote_create_inferior): Handle new
9745         PACKET_QStartupWithShell.
9746         (remote_protocol_features) <QStartupWithShell>: New entry for
9747         PACKET_QStartupWithShell.
9748         (_initialize_remote): Call "add_packet_config_cmd" for
9749         QStartupShell.
9750
9751 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9752             Pedro Alves  <palves@redhat.com>
9753
9754         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9755         and "nat/fork-inferior.h".
9756         * common/common-inferior.h: New file, with contents from
9757         "gdb/inferior.h".
9758         * commom/common-utils.c: Include "common-utils.h".
9759         (stringify_argv): New function.
9760         * common/common-utils.h (stringify_argv): New prototype.
9761         * configure.nat: Add "fork-inferior.o" as a dependency for
9762         "*linux*", "fbsd*" and "nbsd*" hosts.
9763         * corefile.c (get_exec_file): Update comment.
9764         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9765         instead of "startup_inferior".
9766         (darwin_create_inferior): Call "add_thread_silent" after
9767         "fork_inferior".
9768         * fork-child.c: Cleanup unnecessary includes.
9769         (SHELL_FILE): Move to "common/common-fork-child.c".
9770         (environ): Likewise.
9771         (exec_wrapper): Initialize.
9772         (get_exec_wrapper): New function.
9773         (breakup_args): Move to "common/common-fork-child.c"; rename to
9774         "breakup_args_for_exec".
9775         (escape_bang_in_quoted_argument): Move to
9776         "common/common-fork-child.c".
9777         (saved_ui): New variable.
9778         (prefork_hook): New function.
9779         (postfork_hook): Likewise.
9780         (postfork_child_hook): Likewise.
9781         (gdb_startup_inferior): Likewise.
9782         (fork_inferior): Move to "common/common-fork-child.c".  Update
9783         function to support gdbserver.
9784         (startup_inferior): Likewise.
9785         * gdbcore.h (get_exec_file): Remove declaration.
9786         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9787         instead of "startup_inferior".  Call "add_thread_silent" after
9788         "fork_inferior".
9789         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9790         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9791         instead of "startup_inferior".  Call "add_thread_silent" after
9792         "fork_inferior".
9793         * inferior.h: Include "common-inferior.h".
9794         (trace_start_error): Move to "common/common-utils.h".
9795         (trace_start_error_with_name): Likewise.
9796         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9797         (startup_inferior): Likewise.
9798         (gdb_startup_inferior): New prototype.
9799         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9800         * nat/fork-inferior.h: New file.
9801         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9802         instead of "startup_inferior".  Call "add_thread_silent" after
9803         "fork_inferior".
9804         * target.h (target_terminal_init): Move prototype to
9805         "target/target.h".
9806         (target_terminal_inferior): Likewise.
9807         (target_terminal_ours): Likewise.
9808         * target/target.h (target_terminal_init): New prototype, moved
9809         from "target.h".
9810         (target_terminal_inferior): Likewise.
9811         (target_terminal_ours): Likewise.
9812         * utils.c (gdb_flush_out_err): New function.
9813
9814 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9815
9816         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9817         * common/common-gdbthread.h: New file, with parts from
9818         "gdb/gdbthread.h".
9819         * gdbthread.h: Include "common-gdbthread.h".
9820         (switch_to_thread): Moved to "common/common-gdbthread.h".
9821
9822 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9823
9824         * Makefile.in (SFILES): Add "common/job-control.c".
9825         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9826         (COMMON_OBS): Add "job-control.o".
9827         * common/job-control.c: New file, with contents from
9828         "gdb/inflow.c".
9829         * common/job-control.h: New file, with contents from "terminal.h".
9830         * fork-child.c: Include "job-control.h".
9831         * inflow.c: Include "job-control.h".
9832         (gdb_setpgid): Move to "common/common-inflow.c".
9833         (_initialize_inflow): Move setting of "job_control" to
9834         "handle_job_control".
9835         * terminal.h (job_control): Moved to "common/common-terminal.h".
9836         (gdb_setpgid): Likewise.
9837         * top.c: Include "job_control.h".
9838         * utils.c: Likewise.
9839         (job_control): Moved to "job-control.c".
9840
9841 2017-06-07  Pedro Alves  <palves@redhat.com>
9842
9843         * Makefile.in (SFILES): Add gdb_regex.c.
9844         (COMMON_OBS): Add gdb_regex.o.
9845         * ada-lang.c (ada_add_standard_exceptions)
9846         (ada_add_exceptions_from_frame, name_matches_regex)
9847         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9848         parameter type to compiled_regex.  Adjust.
9849         (ada_exceptions_list): Use compiled_regex.
9850         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9851         std::unique_ptr<compiled_regex>.
9852         (exception_catchpoint::~exception_catchpoint): Remove regfree
9853         call.
9854         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9855         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9856         * breakpoint.c (solib_catchpoint::compiled): Now a
9857         std::unique_ptr<compiled_regex>.
9858         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9859         (check_status_catch_solib): Adjust to use compiled_regex.
9860         (add_solib_catchpoint): Adjust to use compiled_regex.
9861         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9862         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9863         compiled_regex reference.  Adjust to use it.
9864         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9865         declaration.  Include "gdb_regex.h".
9866         (apropos_cmd): Change regex parameter to compiled_regex reference.
9867         * gdb_regex.c: New file.
9868         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9869         declarations.
9870         (class compiled_regex): New.
9871         * linux-tdep.c: Include "common/gdb_optional.h".
9872         (struct mapping_regexes): New, factored out from
9873         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9874         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9875         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9876         * probe.c: Include "common/gdb_optional.h".
9877         (collect_probes): Use compiled_regex and gdb::optional and remove
9878         cleanups.
9879         * skip.c: Include "common/gdb_optional.h".
9880         (skiplist_entry::compiled_function_regexp): Now a
9881         gdb::optional<compiled_regex>.
9882         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9883         (free_skiplist_entry): Remove regfree call.
9884         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9885         compiled_regex and gdb::optional.
9886         * symtab.c: Include "common/gdb_optional.h".
9887         (search_symbols): Use compiled_regex and gdb::optional.
9888         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9889         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9890         to gdb_regex.c.
9891
9892 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9893
9894         * regcache.c (regcache::save): Avoid buffer use.
9895         (regcache::dump): Likewise.
9896
9897 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9898
9899         * sh-tdep.c (sh_pseudo_register_read): Remove
9900         MAX_REGISTER_SIZE.
9901         (sh_pseudo_register_write): Likewise.
9902         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9903         (sh64_pseudo_register_write): Likewise
9904
9905 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9906
9907         * aarch64-tdep.c (aarch64_store_return_value): Use
9908         V_REGISTER_SIZE.
9909         (aarch64_pseudo_read_value): Likewise.
9910         (aarch64_pseudo_write): Likewise.
9911
9912 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9913
9914         * regformats/regdef.h (set_register_cache): Remove the
9915         declaration.
9916
9917 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9918
9919         * frame.c (frame_unwind_register_signed): Use
9920         frame_unwind_register_value.
9921
9922 2017-06-06  Pedro Alves  <palves@redhat.com>
9923
9924         PR breakpoints/21553
9925         * breakpoint.c (create_breakpoints_sal_default)
9926         (init_breakpoint_sal, create_breakpoint_sal): Use
9927         gdb::unique_xmalloc_ptr for string parameters.
9928         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9929         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9930         (base_breakpoint_create_breakpoints_sal)
9931         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9932         (strace_marker_create_breakpoints_sal)
9933         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9934         string parameters.
9935         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9936         gdb::unique_xmalloc_ptr for string parameters.
9937         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9938         parameters.
9939
9940 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9941
9942         * alpha-tdep.c (alpha_register_to_value): Use
9943         get_frame_register_value.
9944         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9945
9946 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9947
9948         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9949         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9950         (ia64_value_to_register): Likewise.
9951         (ia64_extract_return_value): Likewise.
9952         (ia64_store_return_value): Likewise.
9953         (ia64_push_dummy_call): Likewise.
9954
9955 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9956
9957         GDB 8.0 released.
9958
9959 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9960
9961         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9962
9963 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9964
9965         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9966         parameter.
9967         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9968
9969 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9970
9971         * event-loop.c (poll_timers): Unallocate timer using delete
9972         instead of xfree.
9973
9974 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9975
9976         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9977         (struct breakpoint) <~breakpoint>: New.
9978         (struct watchpoint): Inherit from breakpoint.
9979         <~watchpoint>: New.
9980         <base>: Remove.
9981         (struct tracepoint): Inherit from breakpoint.
9982         <base>: Remove.
9983         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9984         (struct longjmp_breakpoint): Inherit from breakpoint.
9985         <~longjmp_breakpoint>: New.
9986         <base>: Remove.
9987         (new_breakpoint_from_type): Remove casts.
9988         (watchpoint_in_thread_scope): Remove reference to base field.
9989         (watchpoint_del_at_next_stop): Likewise.
9990         (update_watchpoint): Likewise.
9991         (watchpoint_check): Likewise.
9992         (bpstat_check_watchpoint): Likewise.
9993         (set_longjmp_breakpoint): Likewise.
9994         (struct fork_catchpoint): Inherit from breakpoint.
9995         <base>: Remove.
9996         (struct solib_catchpoint): Inherit from breakpoint.
9997         <~solib_catchpoint>: New.
9998         <base>: Remove.
9999         (dtor_catch_solib): Change to ...
10000         (solib_catchpoint::~solib_catchpoint): ... this.
10001         (breakpoint_hit_catch_solib): Remove reference to base field.
10002         (add_solib_catchpoint): Likewise.
10003         (create_fork_vfork_event_catchpoint): Likewise.
10004         (struct exec_catchpoint): Inherit from breakpoint.
10005         <~exec_catchpoint>: New.
10006         <base>: Remove.
10007         (dtor_catch_exec): Change to ...
10008         (exec_catchpoint::~exec_catchpoint): ... this.
10009         (dtor_watchpoint): Change to ...
10010         (watchpoint::~watchpoint): ... this.
10011         (watch_command_1): Remove reference to base field.
10012         (catch_exec_command_1): Likewise.
10013         (base_breakpoint_dtor): Change to ...
10014         (breakpoint::~breakpoint): ... this.
10015         (base_breakpoint_ops): Remove dtor field value.
10016         (longjmp_bkpt_dtor): Change to ...
10017         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10018         (strace_marker_create_breakpoints_sal): Remove reference to base
10019         field.
10020         (delete_breakpoint): Don't manually call breakpoint destructor.
10021         (create_tracepoint_from_upload): Remove reference to base field.
10022         (trace_pass_set_count): Likewise.
10023         (initialize_breakpoint_ops): Don't initialize
10024         momentary_breakpoint_ops, don't set dtors.
10025         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10026         <~ada_catchpoint>: New.
10027         <base>: Remove.
10028         (create_excep_cond_exprs): Remove reference to base field.
10029         (dtor_exception): Change to ...
10030         (ada_catchpoint::~ada_catchpoint): ... this.
10031         (dtor_catch_exception): Remove.
10032         (dtor_catch_exception_unhandled): Remove.
10033         (dtor_catch_assert): Remove.
10034         (create_ada_exception_catchpoint): Remove reference to base
10035         field.
10036         (initialize_ada_catchpoint_ops): Don't set dtors.
10037         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10038         breakpoint.
10039         <~signal_catchpoint>: New.
10040         <base>: Remove.
10041         (signal_catchpoint_dtor): Change to ...
10042         (signal_catchpoint::~signal_catchpoint): ... this.
10043         (create_signal_catchpoint): Remove reference to base field.
10044         (initialize_signal_catchpoint_ops): Don't set dtor.
10045         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10046         from breakpoint.
10047         <~syscall_catchpoint>: New.
10048         <base>: Remove.
10049         (dtor_catch_syscall): Change to ...
10050         (syscall_catchpoint::~syscall_catchpoint): ... this.
10051         (create_syscall_event_catchpoint): Remove reference to base
10052         field.
10053         (initialize_syscall_catchpoint_ops): Don't set dtor.
10054         * break-catch-throw.c (struct exception_catchpoint): Inherit
10055         from breakpoint.
10056         <~exception_catchpoint>: New.
10057         <base>: Remove.
10058         (dtor_exception_catchpoint): Change to ...
10059         (exception_catchpoint::~exception_catchpoint): ... this.
10060         (handle_gnu_v3_exceptions): Remove reference to base field.
10061         (initialize_throw_catchpoint_ops): Don't set dtor.
10062         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10063         field.
10064         * remote.c (remote_get_tracepoint_status): Likewise.
10065         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10066         * tracefile.c (tracefile_fetch_registers): Likewise.
10067         * tracepoint.c (actions_command): Likewise.
10068         (validate_actionline): Likewise.
10069         (tfind_1): Likewise.
10070         (get_traceframe_location): Likewise.
10071         (find_matching_tracepoint_location): Likewise.
10072         (parse_tracepoint_status): Likewise.
10073         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10074
10075 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10076
10077         * breakpoint.c (struct longjmp_breakpoint): New struct.
10078         (is_tracepoint_type): Change return type to bool.
10079         (is_longjmp_type): New function.
10080         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10081         (set_raw_breakpoint_without_location): Use
10082         new_breakpoint_from_type.
10083         (set_raw_breakpoint): Likewise.
10084
10085 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10086
10087         * breakpoint.c (new_breakpoint_from_type): New function.
10088         (create_breakpoint_sal): Use new_breakpoint_from_type and
10089         unique_ptr.
10090         (create_breakpoint): Likewise.
10091
10092 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10093
10094         * memattr.c (mem_info_command): Rename to ...
10095         (info_mem_command): ... this.
10096         (mem_enable_command): Rename to ...
10097         (enable_mem_command): ... this.
10098         (mem_disable_command): Rename to ...
10099         (disable_mem_command): ... this.
10100         (mem_delete_command): Rename to ...
10101         (delete_mem_command): ... this.
10102         (_initialize_mem): Adjust function names.
10103
10104 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10105
10106         * btrace.c (handle_pt_insn_events): New.
10107         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10108         STATUS.  Split into this and ...
10109         (handle_pt_insn_event_flags): ... this.
10110
10111 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10112
10113         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10114         and struct pt_insn.resynced.
10115         * configure: Regenerated.
10116         * config.in: Regenerated.
10117
10118 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10119
10120         * btrace.c (ftrace_find_call_by_number): New function.
10121         (ftrace_new_function): Store objects, not pointers.
10122         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10123         ftrace_new_gap, ftrace_update_function,
10124         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10125         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10126         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10127         btrace_ends_with_single_insn, btrace_call_get): Account for
10128         btrace_thread_info::functions now storing objects.
10129         * btrace.h (struct btrace_thread_info): Add constructor.
10130         (struct btrace_thread_info) <functions>: Make std::vector.
10131         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10132         Initialize with default values.
10133         * record-btrace.c (record_btrace_frame_sniffer): Account for
10134         btrace_thread_info::functions now storing objects.
10135
10136 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10137
10138         * btrace.c: Remove typedef bfun_s.
10139         (ftrace_new_gap): Directly add gaps to the list of gaps.
10140         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10141         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10142         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10143         instead of gdb VEC.
10144
10145 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10146
10147         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10148         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10149         with btrace_thread_info::next_segment and
10150         btrace_thread_info::prev_segment.
10151         * btrace.h: Remove struct btrace_func_link.
10152         (struct btrace_function): Replace pair of function segment pointers
10153         with pair of indices.
10154         * python/py-record-btrace.c (btpy_call_prev_sibling,
10155         btpy_call_next_sibling): Replace references to
10156         btrace_thread_info::segment with btrace_thread_info::next_segment and
10157         btrace_thread_info::prev_segment.
10158         * record-btrace.c (record_btrace_frame_this_id): Use
10159         btrace_find_call_by_number.
10160
10161 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10162
10163         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10164         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10165         btrace_insn_next, btrace_insn_prev): Remove references to
10166         btrace_thread_info::flow.
10167         * btrace.h (struct btrace_function): Remove FLOW.
10168
10169 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10170
10171         * btrace.c (ftrace_find_call_by_number): New function.
10172         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10173         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10174         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10175         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10176         index.
10177         * btrace.h (struct btrace_function): Turn UP into an index.
10178         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10179         as an index.
10180         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10181         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10182         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10183
10184 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10185
10186         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10187         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10188         ftrace_update_function, ftrace_compute_global_level_offset,
10189         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10190         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10191         btrace_insn_end, btrace_is_empty): Remove references to
10192         btrace_thread_info::begin and btrace_thread_info::end.
10193         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10194         (struct btrace_thread_info) <functions>: Adjust comment.
10195         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10196         btrace_thread_info::begin.
10197
10198 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10199
10200         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10201         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10202         ftrace_update_function): Remove arguments that implicitly were always
10203         BTINFO->END.
10204         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10205         Don't pass BTINFO->END.
10206
10207 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10208
10209         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10210         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10211         btrace_find_insn_by_number): Replace function segment pointer with
10212         index.
10213         (btrace_insn_cmp): Simplify.
10214         * btrace.h: (struct btrace_insn_iterator) Rename index to
10215         insn_index.  Replace function segment pointer with index into function
10216         segment vector.
10217         * record-btrace.c (record_btrace_call_history): Replace function
10218         segment pointer use with index.
10219         (record_btrace_frame_sniffer): Retrieve function call segment through
10220         vector.
10221         (record_btrace_set_replay): Remove defunc't safety check.
10222
10223 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10224
10225         * btrace.c (btrace_ends_with_single_insn): New function.
10226         (btrace_call_get, btrace_call_number, btrace_call_begin,
10227         btrace_call_end, btrace_call_next, btrace_call_prev,
10228         btrace_find_call_by_number): Use index into call segment vector
10229         instead of pointer.
10230         (btrace_call_cmp): Simplify.
10231         * btrace.h (struct btrace_call_iterator): Replace function call segment
10232         pointer with index into vector.
10233         * record-btrace.c (record_btrace_call_history): Use index instead of
10234         pointer.
10235
10236 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10237
10238         * btrace.c (btrace_insn_begin, btrace_insn_end,
10239         btrace_find_insn_by_number): Add btinfo to iterator.
10240         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10241
10242 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10243
10244         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10245         and save pointers directly.
10246         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10247         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10248         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10249         changed signature of functions.
10250         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10251         (btrace_fetch): Remove code that adds btrace_function pointers to
10252         vector of btrace_functions.
10253         (btrace_clear): Simplify freeing vector of btrace_functions.
10254
10255 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10256
10257         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10258         Replace VEC_* with std::vector functions.
10259         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10260         (struct btrace_thread_info)<functions>: Change type to std::vector.
10261
10262 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10263
10264         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10265         "Removed targets and native configurations" up.  Merge duplicate
10266         "New commands" sub-sections.  Add "New options" sub-sections.
10267
10268 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10269
10270         * defs.h (copy_integer_to_size): New declaration.
10271         * findvar.c (copy_integer_to_size): New function.
10272         (do_cint_test): New selftest function.
10273         (copy_integer_to_size_test): Likewise.
10274         (_initialize_findvar): Likewise.
10275         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10276         (mips_fbsd_collect_reg): Use raw_collect_integer.
10277         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10278         (mips64_fill_gregset): Use raw_collect_integer
10279         (mips64_fill_fpregset): Use raw_supply_integer.
10280         * regcache.c (regcache::raw_supply_integer): New function.
10281         (regcache::raw_collect_integer): Likewise.
10282         * regcache.h: (regcache::raw_supply_integer): New declaration.
10283         (regcache::raw_collect_integer): Likewise.
10284
10285 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10286
10287         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10288         (COMMON_OBS): Add gdbarch-selftests.o.
10289         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10290         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10291         * gdbarch-selftests.c: New file.
10292         * regcache.h (regcache) <~regcache>: Mark it virtual if
10293         GDB_SELF_TEST.
10294         <raw_write>: Likewise.
10295
10296 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10297
10298         * regcache.c (current_regcache): Change it to
10299         regcache::current_regcache.
10300         (regcache_observer_target_changed): Update.
10301         (regcache_thread_ptid_changed): Make it a regcache static
10302         method.
10303         (regcache_thread_ptid_changed): Update.
10304         (class regcache_access): New.
10305         (current_regcache_test): Update.
10306         (_initialize_regcache): Update.
10307         * regcache.h: Include forward_list.
10308         (regcache): Declare regcache_thread_ptid_changed and declare
10309         registers_changed_ptid as friend.
10310
10311 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10312
10313         * i387-tdep.c (i387_register_to_value): Use register_size
10314         instead of TYPE_LENGTH.
10315         * m68k-tdep.c (m68k_register_to_value): Likewise.
10316
10317 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10318
10319         * i387-tdep.c (i387_convert_register_p): Return false if type
10320         code isn't TYPE_CODE_FLT.
10321
10322 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10323
10324         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10325         length is 4.
10326         (alpha_register_to_value): Remove type length check.
10327         (alpha_value_to_register): Likewise.
10328
10329 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10330
10331         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10332         TYPE_CODE_FLT.
10333
10334 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10335
10336         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10337         TYPE_CODE_FLT or not.
10338
10339 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10340
10341         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10342         * avr-tdep.c (avr_gdbarch_init): Likewise.
10343         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10344         * cris-tdep.c (cris_gdbarch_init): Likewise.
10345         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10346         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10347         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10348         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10349         * mep-tdep.c (mep_gdbarch_init): Likewise.
10350         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10351         * mips-tdep.c (mips_gdbarch_init): Likewise.
10352         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10353         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10354         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10355         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10356         * v850-tdep.c (v850_gdbarch_init): Likewise.
10357
10358 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10359
10360         * selftest-arch.c (tests_with_arch): Call registers_changed
10361         and reinit_frame_cache.
10362         * selftest.c (run_self_tests): Likewise.
10363
10364 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10365
10366         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10367         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10368
10369 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10370
10371         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10372         set_gdbarch_print_insn.
10373
10374 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10375
10376         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10377         set_gdbarch_print_insn.
10378
10379 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10380
10381         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10382         set_gdbarch_print_insn.
10383         * arc-tdep.c (arc_gdbarch_init): Likewise.
10384         * arch-utils.c: include dis-asm.h.
10385         (default_print_insn): New function.
10386         * arch-utils.h (default_print_insn): Declare.
10387         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10388         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10389         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10390         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10391         * frv-tdep.c (frv_gdbarch_init): Likewise.
10392         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10393         * gdbarch.sh (print_insn): Use default_print_insn.
10394         * gdbarch.c: Regenerated.
10395         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10396         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10397         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10398         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10399         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10400         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10401         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10402         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10403         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10404         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10405         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10406         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10407         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10408         * mt-tdep.c (mt_gdbarch_init): Likewise.
10409         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10410         * nios2-tdep.c (nios2_print_insn): Remove.
10411         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10412         * rx-tdep.c (rx_gdbarch_init): Likewise.
10413         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10414         * score-tdep.c (score_print_insn): Remove.
10415         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10416         * sh-tdep.c (sh_gdbarch_init): Likewise.
10417         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10418         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10419         * tic6x-tdep.c (tic6x_print_insn): Remove.
10420         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10421         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10422         * v850-tdep.c (v850_gdbarch_init): Likewise.
10423         * vax-tdep.c (vax_gdbarch_init): Likewise.
10424         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10425         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10426
10427 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10428
10429         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10430         (MIPS_FP0_REGNUM): Remove.
10431         (MIPS_FSR_REGNUM): Remove.
10432         (mips_fbsd_supply_fpregs): Use mips_regnum.
10433         (mips_fbsd_supply_gregs): Likewise.
10434         (mips_fbsd_collect_fpregs): Likewise.
10435         (mips_fbsd_collect_gregs): Likewise.
10436
10437 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10438
10439         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10440         (getpfpregs_supplies): New function.
10441         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10442         getfpregs_supplies.
10443         (mips_fbsd_store_inferior_registers): Likewise.
10444
10445 2017-05-22  Pedro Alves <palves@redhat.com>
10446
10447         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10448         maintainer.
10449
10450 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10451
10452         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10453         (store_register): Likewise.
10454         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10455         (get_decimal_float_return_value): Likewise.
10456         (do_ppc_sysv_return_value): Likewise.
10457         (ppc64_sysv_abi_push_integer): Likewise.
10458         (ppc64_sysv_abi_push_freg): Likewise.
10459         (ppc64_sysv_abi_return_value_base): Likewise.
10460         (ppc64_sysv_abi_return_value): Likewise.
10461         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10462         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10463         * rs6000-nat.c: Likewise.
10464         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10465         (rs6000_value_to_register): Likewise.
10466         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10467
10468 2017-05-21  Tom Tromey  <tom@tromey.com>
10469
10470         PR rust/21466:
10471         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10472         arrays as "[T]", not "[T; ]".
10473
10474 2017-05-19  Tom Tromey  <tom@tromey.com>
10475
10476         PR rust/21484:
10477         * rust-lang.c (exp_descriptor_rust): New function.
10478         (rust_language_defn): Use it.
10479         * p-lang.c (pascal_language_defn): Update.
10480         * opencl-lang.c (opencl_language_defn): Update.
10481         * objc-lang.c (objc_language_defn): Update.
10482         * m2-lang.c (m2_language_defn): Update.
10483         * language.h (struct language_defn)
10484         <la_watch_location_expression>: New member.
10485         * language.c (unknown_language_defn, auto_language_defn)
10486         (local_language_defn): Update.
10487         * go-lang.c (go_language_defn): Update.
10488         * f-lang.c (f_language_defn): Update.
10489         * d-lang.c (d_language_defn): Update.
10490         * c-lang.h (c_watch_location_expression): Declare.
10491         * c-lang.c (c_watch_location_expression): New function.
10492         (c_language_defn, cplus_language_defn, asm_language_defn)
10493         (minimal_language_defn): Use it.
10494         * breakpoint.c (watch_command_1): Call
10495         la_watch_location_expression.
10496         * ada-lang.c (ada_language_defn): Update.
10497
10498 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10499
10500         PR tui/21482
10501         * gdb_curses.h (NOMACROS): Define.
10502         (NCURSES_NOMACROS): Define.
10503
10504 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10505
10506         PR tui/21482
10507         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10508         arg to char *.
10509         * tui/tui-wingeneral.c (box_win): Likewise.
10510         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10511         (tui_show_source_line): Likewise.
10512         (tui_show_exec_info_content): Likewise.
10513
10514 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10515
10516         * sparc-tdep.c (sparc_structure_return_p)
10517         (sparc_arg_on_registers_p): New functions.
10518         (sparc32_store_arguments): Use them.
10519         * sparc64-tdep.c (sparc64_16_byte_align_p)
10520         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10521         Handle TYPE_CODE_ARRAY.
10522
10523 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10524
10525         * cli/cli-decode.c (add_alias_cmd): New function.
10526         * command.h (add_alias_cmd): Declare.
10527         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10528         instead call add_alias_cmd.
10529
10530 2017-05-17  Pedro Alves  <palves@redhat.com>
10531
10532         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10533         (nat_makefile_frag): ... this.  All references updated.
10534         * configure.ac: Likewise.
10535         * configure.nat: Likewise.  Enhance comments.
10536         * configure: Regenerate.
10537
10538 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10539
10540         * procfs.c (procfs_create_inferior): Change prototype to match
10541         definition.
10542
10543 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10544
10545         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10546         C++ compiler warning.
10547
10548 2017-05-12  Tom Tromey  <tom@tromey.com>
10549
10550         PR rust/21483:
10551         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10552         recurse, just call value_struct_elt directly.
10553
10554 2017-05-12  Tom Tromey  <tom@tromey.com>
10555
10556         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10557         OP_RUST_ARRAY>: Fix.
10558
10559 2017-05-12  Tom Tromey  <tom@tromey.com>
10560
10561         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10562
10563 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10564
10565         * regcache.c: Include <forward_list>.
10566         (struct regcache_list): Remove.
10567         (current_regcache): Update.
10568         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10569         (regcache_thread_ptid_changed): Likewise.
10570         (registers_changed_ptid): Likewise.
10571         (current_regcache_size): Likewise.
10572
10573 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10574
10575         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10576         (current_regcache_size): New function.
10577         (current_regcache_test): New function.
10578         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10579
10580 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10581
10582         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10583         (print_gp_register_row): Use get_frame_register_value.
10584
10585 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10586
10587         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10588         (mips_supply_fpregset): Likewise.
10589         (mips64_supply_gregset): Likewise.
10590
10591 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10592
10593         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10594         regcache->raw_supply_zeroed.
10595
10596 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10597
10598         * configure.nat: Rearrange 'case' statements to match
10599         host before cpu.
10600
10601 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10602
10603         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10604         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10605         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10606         "@nat_extra_makefile_frag@".
10607         (Makefile): Remove dependency on "@frags@".
10608         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10609         (data-directory/Makefile): Likewise.
10610         * config/aarch64/linux.mh: Deleted; moved contents to
10611         "gdb/configure.nat".
10612         * config/alpha/alpha-linux.mh: Likewise.
10613         * config/alpha/nbsd.mh: Likewise.
10614         * config/arm/linux.mh: Likewise.
10615         * config/arm/nbsdelf.mh: Likewise.
10616         * config/i386/cygwin.mh: Likewise.
10617         * config/i386/cygwin64.mh: Likewise.
10618         * config/i386/darwin.mh: Likewise.
10619         * config/i386/fbsd.mh: Likewise.
10620         * config/i386/fbsd64.mh: Likewise.
10621         * config/i386/go32.mh: Likewise.
10622         * config/i386/i386gnu.mh: Likewise.
10623         * config/i386/i386sol2.mh: Likewise.
10624         * config/i386/linux.mh: Likewise.
10625         * config/i386/linux64.mh: Likewise.
10626         * config/i386/mingw.mh: Likewise.
10627         * config/i386/mingw64.mh: Likewise.
10628         * config/i386/nbsd64.mh: Likewise.
10629         * config/i386/nbsdelf.mh: Likewise.
10630         * config/i386/nto.mh: Likewise.
10631         * config/i386/obsd.mh: Likewise.
10632         * config/i386/obsd64.mh: Likewise.
10633         * config/i386/sol2-64.mh: Likewise.
10634         * config/ia64/linux.mh: Likewise.
10635         * config/m32r/linux.mh: Likewise.
10636         * config/m68k/linux.mh: Likewise.
10637         * config/m68k/nbsdelf.mh: Likewise.
10638         * config/m68k/obsd.mh: Likewise.
10639         * config/m88k/obsd.mh: Likewise.
10640         * config/mips/fbsd.mh: Likewise.
10641         * config/mips/linux.mh: Likewise.
10642         * config/mips/nbsd.mh: Likewise.
10643         * config/mips/obsd64.mh: Likewise.
10644         * config/pa/linux.mh: Likewise.
10645         * config/pa/nbsd.mh: Likewise.
10646         * config/pa/obsd.mh: Likewise.
10647         * config/powerpc/aix.mh: Likewise.
10648         * config/powerpc/fbsd.mh: Likewise.
10649         * config/powerpc/linux.mh: Likewise.
10650         * config/powerpc/nbsd.mh: Likewise.
10651         * config/powerpc/obsd.mh: Likewise.
10652         * config/powerpc/ppc64-linux.mh: Likewise.
10653         * config/powerpc/spu-linux.mh: Likewise.
10654         * config/s390/linux.mh: Likewise.
10655         * config/sh/nbsd.mh: Likewise.
10656         * config/sparc/fbsd.mh: Likewise.
10657         * config/sparc/linux.mh: Likewise.
10658         * config/sparc/linux64.mh: Likewise.
10659         * config/sparc/nbsd64.mh: Likewise.
10660         * config/sparc/nbsdelf.mh: Likewise.
10661         * config/sparc/obsd64.mh: Likewise.
10662         * config/sparc/sol2.mh: Likewise.
10663         * config/tilegx/linux.mh: Likewise.
10664         * config/vax/nbsdelf.mh: Likewise.
10665         * config/vax/obsd.mh: Likewise.
10666         * config/xtensa/linux.mh: Likewise.
10667         * config/i386/i386gnu.mn: New file, with excerpts from
10668         "config/i386/i386gnu.mh".
10669         * configure: Regenerate.
10670         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10671         *.mh files under "gdb/config".
10672         * configure.nat: New file, with contents from the
10673         "gdb/config/*/*.mh" files.
10674
10675 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10676
10677         * btrace.c (btrace_clear): Free insn vector.
10678
10679 2017-05-05  Pedro Alves  <palves@redhat.com>
10680
10681         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10682         * configure: Regenerate.
10683
10684 2017-05-04  Pedro Alves  <palves@redhat.com>
10685
10686         * Makefile.in (SFILES): Add progspace-and-thread.c.
10687         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10688         (COMMON_OBS): Add progspace-and-thread.o.
10689         * breakpoint.c: Include "progspace-and-thread.h".
10690         (update_inserted_breakpoint_locations)
10691         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10692         Use scoped_restore_current_pspace_and_thread.
10693         (create_std_terminate_master_breakpoint): Use
10694         scoped_restore_current_program_space.
10695         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10696         (print_breakpoint_location): Use
10697         scoped_restore_current_program_space.
10698         (bp_loc_is_permanent): Use
10699         scoped_restore_current_pspace_and_thread.
10700         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10701         (download_tracepoint_locations): Use
10702         scoped_restore_current_pspace_and_thread.
10703         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10704         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10705         (enum step_over_calls_kind): Moved from inferior.h.
10706         (class scoped_restore_current_thread): New class.
10707         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10708         declaration.
10709         (scoped_restore_current_thread): New class.
10710         * infcmd.c: Include "common/gdb_optional.h".
10711         (continue_1, proceed_after_attach): Use
10712         scoped_restore_current_thread.
10713         (notice_new_inferior): Use scoped_restore_current_thread.
10714         * inferior.c: Include "progspace-and-thread.h".
10715         (restore_inferior, save_current_inferior): Delete.
10716         (add_inferior_command, clone_inferior_command): Use
10717         scoped_restore_current_pspace_and_thread.
10718         * inferior.h (scoped_restore_current_inferior): New class.
10719         * infrun.c: Include "progspace-and-thread.h" and
10720         "common/gdb_optional.h".
10721         (follow_fork_inferior): Use
10722         scoped_restore_current_pspace_and_thread.
10723         (scoped_restore_exited_inferior): New class.
10724         (handle_vfork_child_exec_or_exit): Use
10725         scoped_restore_exited_inferior,
10726         scoped_restore_current_pspace_and_thread,
10727         scoped_restore_current_thread and scoped_restore.
10728         (fetch_inferior_event): Use scoped_restore_current_thread.
10729         * linespec.c (decode_line_full, decode_line_1): Use
10730         scoped_restore_current_program_space.
10731         * mi/mi-main.c: Include "progspace-and-thread.h".
10732         (exec_continue): Use scoped_restore_current_thread.
10733         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10734         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10735         * proc-service.c (ps_pglobal_lookup): Use
10736         scoped_restore_current_program_space.
10737         * progspace-and-thread.c: New file.
10738         * progspace-and-thread.h: New file.
10739         * progspace.c (release_program_space, clone_program_space): Use
10740         scoped_restore_current_program_space.
10741         (restore_program_space, save_current_program_space)
10742         (save_current_space_and_thread): Delete.
10743         (switch_to_program_space_and_thread): Moved to
10744         progspace-and-thread.c.
10745         * progspace.h (save_current_program_space)
10746         (save_current_space_and_thread): Delete declarations.
10747         (scoped_restore_current_program_space): New class.
10748         * remote.c (remote_btrace_maybe_reopen): Use
10749         scoped_restore_current_thread.
10750         * symtab.c: Include "progspace-and-thread.h".
10751         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10752         * thread.c (print_thread_info_1): Use
10753         scoped_restore_current_thread.
10754         (struct current_thread_cleanup): Delete.
10755         (do_restore_current_thread_cleanup)
10756         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10757         (scoped_restore_current_thread::~scoped_restore_current_thread):
10758         ... this new dtor.
10759         (make_cleanup_restore_current_thread): Rename/convert to ...
10760         (scoped_restore_current_thread::scoped_restore_current_thread):
10761         ... this new ctor.
10762         (thread_apply_all_command): Use scoped_restore_current_thread.
10763         (thread_apply_command): Use scoped_restore_current_thread.
10764         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10765         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10766
10767 2017-05-04  Pedro Alves  <palves@redhat.com>
10768
10769         * thread.c (make_cleanup_restore_current_thread): Move
10770         find_thread_ptid call before the is_stopped call.  Assert that the
10771         thread is found.  Replace is_stopped call by checking the thread's
10772         state directly.  Remove unnecessary NULL-thread check.
10773
10774 2017-05-04  Pedro Alves  <palves@redhat.com>
10775
10776         * corelow.c (thread_section_name): New class.
10777         (get_core_register_section, get_core_siginfo): Use it.
10778
10779 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10780
10781         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10782         (get_core_register_section): Remove xfree of NULL pointer.
10783
10784 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10785
10786         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10787         * regcache.c (regcache::raw_supply_zeroed): New function.
10788         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10789
10790 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10791
10792         * gdbarch.sh: Remove commented out definition of
10793         TARGET_CHAR_BIT.
10794         * gdbarch.h: Re-generate.
10795
10796 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10797
10798         * configure: Regenerate.
10799
10800 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10801
10802         * solib-target.c (solib_target_relocate_section_addresses):
10803         Remove num_section_bases, num_bases, segment_bases variables.
10804
10805 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10806
10807         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10808
10809 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10810
10811         * solib-target.c: Include <vector>
10812         (struct lm_info_target) <~lm_info_target>: Remove.
10813         <segment_bases, section_bases>: Change type to
10814         std::vector<CORE_ADDR>.
10815         (library_list_start_segment, library_list_start_section,
10816         library_list_end_library,
10817         solib_target_relocate_section_addresses): Adjust.
10818
10819 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10820
10821         * gdbarch.sh (software_single_step): Change return type to
10822         std::vector<CORE_ADDR>.
10823         * gdbarch.c, gdbarch.h: Re-generate.
10824         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10825         Adjust.
10826         (arm_deal_with_atomic_sequence_raw): Adjust.
10827         (thumb_get_next_pcs_raw): Adjust.
10828         (arm_get_next_pcs_raw): Adjust.
10829         (arm_get_next_pcs): Adjust.
10830         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10831         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10832         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10833         (alpha_software_single_step): Adjust.
10834         * alpha-tdep.h (alpha_software_single_step): Adjust.
10835         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10836         * arm-tdep.c (arm_software_single_step): Adjust.
10837         (arm_breakpoint_kind_from_current_state): Adjust.
10838         * arm-tdep.h (arm_software_single_step): Adjust.
10839         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10840         * cris-tdep.c (cris_software_single_step): Adjust.
10841         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10842         (micromips_deal_with_atomic_sequence): Adjust.
10843         (deal_with_atomic_sequence): Adjust.
10844         (mips_software_single_step): Adjust.
10845         * mips-tdep.h (mips_software_single_step): Adjust.
10846         * moxie-tdep.c (moxie_software_single_step): Adjust.
10847         * nios2-tdep.c (nios2_software_single_step): Adjust.
10848         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10849         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10850         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10851         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10852         * sparc-tdep.c (sparc_software_single_step): Adjust.
10853         * spu-tdep.c (spu_software_single_step): Adjust.
10854         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10855
10856 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10857
10858         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10859         * gdbarch.h: Re-generate.
10860
10861 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10862
10863         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10864         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10865         * python/py-instruction.c, python/py-instruction.h: New file.
10866         * python/py-record.c: Add py-instruction.h include.
10867         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10868         gdb.RecordInstruction.
10869         * python/python-internal.h: Add gdbpy_initialize_instruction
10870         declaration.
10871         * python/python.c (do_start_initialization): Add
10872         gdbpy_initialize_instruction.
10873
10874 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10875
10876         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10877         Remove.
10878         (btrace_func_from_recpy_func): New function.
10879         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10880         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10881         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10882         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10883         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10884         Also, use new helper functions.
10885         (btpy_list_item): Use new helper functions.
10886         (recpy_bt_function_call_history): Use new type name.
10887         (btpy_call_getset): Remove.
10888         (gdbpy_initialize_btrace): Remove code to initialize
10889         gdb.BtraceFunctionCall.
10890         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10891         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10892         recpy_bt_func_prev, recpy_bt_func_next): New export.
10893         * python/py-record.c (recpy_func_type): New static object.
10894         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10895         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10896         recpy_func_next): New function.
10897         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10898         (recpy_func_getset): New static object.
10899         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10900         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10901
10902 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10903
10904         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10905         (btpy_object, btpy_insn_type, btpy_new): Remove.
10906         (btpy_list_object): Use gdb.RecordInstruction type instead of
10907         gdb.BtraceInstruction type.
10908         (btrace_insn_from_recpy_insn): New function.
10909         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10910         btpy_new.
10911         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10912         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10913         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10914         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10915         instead of btpy_object.
10916         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10917         btpy_insn_data, btpy_insn_decode): Rename to ...
10918         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10919         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10920         recpy_bt_insn_decode): This.  Also, use new helper functions.
10921         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10922         recpy_insn_type.
10923         (btpy_insn_getset): Remove.
10924         (gdbpy_initialize_btrace): Remove code to initialize
10925         gdb.BtraceInstruction.  Use recpy_element_object.
10926         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10927         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10928         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10929         * python/py-record.c (recpy_insn_type): New static object.
10930         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10931         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10932         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10933         New function.
10934         (recpy_insn_getset): New static object.
10935         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10936         * python/py-record.h (recpy_element_object): New typedef.
10937         (recpy_insn_type, recpy_insn_new): New export.
10938
10939 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10940
10941         * py-record-btrace.c (btpy_insn_new): Removed.
10942         (btpy_insn_or_gap_new): New function.
10943         (btpy_insn_error): Removed.
10944         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10945         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10946         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10947         btpy_insn_or_gap_new instead of btpy_insn_new.
10948         (btpy_insn_getset): Remove btpy_insn_error.
10949         * py-record.c (recpy_gap_type): New static object.
10950         (recpy_gap_object): New typedef.
10951         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10952         recpy_gap_reason_string): New function.
10953         (recpy_gap_getset): New static object.
10954         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10955         * py-record.h (recpy_gap_new): New export.
10956
10957 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10958
10959         * python/py-record.c (recpy_ptid): Remove.
10960         (recpy_record_getset): Remove recpy_ptid.
10961
10962 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10963
10964         * btrace.c (btrace_fetch): Set inferior_ptid.
10965         * python/py-record-btrace.c: Add "py-record.h" include.
10966         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10967         recpy_bt_end, recpy_bt_instruction_history,
10968         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10969         in gdb.Record object instead of current ptid.
10970         * python/py-record.c: Include new "py-record.h" file.
10971         (recpy_record_object): Moved to py-record.h.
10972         * python/py-record.h: New file.
10973
10974 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10975
10976         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10977         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10978         indentation.
10979
10980 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10981
10982         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10983         the past maintainers section.
10984
10985 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10986
10987         * infcmd.c (get_return_value): Use regcache ctor, and remove
10988         cleanup.
10989
10990 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10991             Pedro Alves  <palves@redhat.com>
10992
10993         * regcache.c (regcache::regcache): New tag dispatch ctor.
10994         (do_cooked_read): Moved above.
10995         (regcache_dup): Use the tag dispatch ctor..
10996         * regcache.h (regcache): Declare ctor, delete copy ctor and
10997         assignment operator, remove friend regcache_dup.
10998
10999 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11000
11001         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11002         call method save instead of regcache_cpy.
11003         * regcache.h (struct regcache): Make regcache_dup a friend.
11004
11005 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11006
11007         * regcache.c (struct regcache): Move to regcache.h
11008         (regcache::arch): New method.
11009         (regcache_get_ptid): Update.
11010         (get_regcache_arch): Call arch method.
11011         (get_regcache_aspace): Call method aspace.
11012         (register_buffer): Change it to method.
11013         (regcache_save): Change it to regcache::save.
11014         (regcache_restore): Likewise.
11015         (regcache_cpy_no_passthrough): Remove the declaration.
11016         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11017         (regcache_cpy_no_passthrough): Change it to method
11018         cpy_no_passthrough.
11019         (regcache_register_status): Change it to method
11020         get_register_status.
11021         (regcache_invalidate): Change it to method invalidate.
11022         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11023         (regcache_raw_update): Change it to method raw_update.
11024         (regcache_raw_read): Likewise.
11025         (regcache_raw_read_signed): Likewise.
11026         (regcache_raw_read_unsigned): Likewise.
11027         (regcache_raw_write_signed): Likewise.
11028         (regcache_raw_write_unsigned): Likewise.
11029         (regcache_cooked_read): Likewise.
11030         (regcache_cooked_read_value): Likewise.
11031         (regcache_cooked_read_signed): Likewise.
11032         (regcache_cooked_read_unsigned): Likewise.
11033         (regcache_cooked_write_signed): Likewise.
11034         (regcache_cooked_write_unsigned): Likewise.
11035         (regcache_raw_set_cached_value): Likewise.
11036         (regcache_raw_write): Likewise.
11037         (regcache_cooked_write): Likewise.
11038         (regcache_xfer_part): Likewise.
11039         (regcache_raw_read_part): Likewise.
11040         (regcache_raw_write_part): Likewise.
11041         (regcache_cooked_read_part): Likewise.
11042         (regcache_cooked_write_part): Likewise.
11043         (regcache_raw_supply): Likewise.
11044         (regcache_raw_collect): Likewise.
11045         (regcache_transfer_regset): Likewise.
11046         (regcache_supply_regset): Likewise.
11047         (regcache_collect_regset): Likewise.
11048         (regcache_debug_print_register): Likewise.
11049         (enum regcache_dump_what): Move it to regcache.h.
11050         (regcache_dump): Change it to method dump.
11051         * regcache.h (enum regcache_dump_what): New.
11052         (class regcache): New.
11053         * target.c (target_fetch_registers): Call method
11054         debug_print_register.
11055         (target_store_registers): Likewise.
11056
11057 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11058
11059         * windows-nat.c (struct lm_info_windows): Initialize field.
11060         (windows_make_so): Allocate lm_info_windows with new.
11061         (windows_free_so): Free lm_info_windows with delete.
11062
11063 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11064
11065         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11066         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11067         cleanup.
11068         (darwin_free_so): Free lm_info_darwin with delete.
11069
11070 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11071
11072         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11073         <l_addr_p>: Change type to bool.
11074         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11075         (svr4_free_so): Free lm_info_svr4 with delete.
11076         (svr4_copy_library_list): Replace memcpy with call to copy
11077         constructor.
11078         (library_list_start_library, svr4_default_sos): Allocate
11079         lm_info_svr4 with new.
11080
11081 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11082
11083         * solib-target.c (struct lm_info_target): Add destructor,
11084         initialize fields.
11085         <name>: Change type to std::string.
11086         (library_list_start_library): Allocate lm_info_target with new.
11087         (solib_target_free_library_list): Free lm_info_target with
11088         delete.
11089         (solib_target_current_sos): Adapt to std::string.
11090         (solib_target_free_so): Free lm_info_target with delete.
11091
11092 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11093
11094         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11095         fields.
11096         (frv_current_sos): Allocate lm_info_frv with new.
11097         (frv_relocate_main_executable): Free lm_info_frv with delete,
11098         allocate with new.
11099         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11100
11101 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11102
11103         * solib-frv.c (struct lm_info_frv): Fix indentation.
11104
11105 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11106
11107         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11108         map field.
11109         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11110         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11111         and allocate with new.
11112         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11113
11114 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11115
11116         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11117         <filename, member_name>: Change type to std::string.
11118         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11119         (library_list_start_library): Allocate lm_info_aix with new.
11120         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11121         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11122         with copy constructor.
11123
11124 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11125
11126         * solist.h (struct lm_info): Remove.
11127         (struct lm_info_base): New class.
11128         (struct so_list) <lm_info>: Change type to lm_info_base *.
11129         * nto-tdep.c (struct lm_info): Remove.
11130         (lm_addr): Adjust.
11131         * solib-aix.c (struct lm_info): Rename to ...
11132         (struct lm_info_aix): ... this.  Extend lm_info_base.
11133         (lm_info_p): Rename to ...
11134         (lm_info_aix_p): ... this, and adjust.
11135         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11136         solib_aix_parse_libraries, library_list_start_library,
11137         solib_aix_free_library_list, solib_aix_parse_libraries,
11138         solib_aix_get_library_list,
11139         solib_aix_relocate_section_addresses, solib_aix_free_so,
11140         solib_aix_get_section_offsets,
11141         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11142         Adjust.
11143         (struct solib_aix_inferior_data) <library_list>: Adjust.
11144         * solib-darwin.c (struct lm_info): Rename to ...
11145         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11146         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11147         * solib-dsbt.c (struct lm_info): Rename to ...
11148         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11149         (struct dsbt_info) <main_executable_lm_info): Adjust.
11150         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11151         dsbt_relocate_section_addresses): Adjust.
11152         * solib-frv.c (struct lm_info): Rename to ...
11153         (struct lm_info_frv): ... this.  Extend lm_info_base.
11154         (main_executable_lm_info): Adjust.
11155         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11156         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11157         find_canonical_descriptor_in_load_object,
11158         frv_fdpic_find_canonical_descriptor): Adjust.
11159         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11160         to lm_info_svr4.
11161         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11162         svr4_clear_so, svr4_copy_library_list,
11163         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11164         svr4_current_sos, svr4_fetch_objfile_link_map,
11165         solist_update_incremental): Adjust.
11166         * solib-svr4.h (struct lm_info_svr4): Move here from
11167         solib-svr4.c.
11168         * solib-target.c (struct lm_info): Rename to ...
11169         (struct lm_info_target): ... this.  Extend lm_info_base.
11170         (lm_info_p): Rename to ...
11171         (lm_info_target_p): ... this.
11172         (solib_target_parse_libraries, library_list_start_segment,
11173         library_list_start_section, library_list_start_library,
11174         library_list_end_library, solib_target_free_library_list,
11175         solib_target_current_sos, solib_target_free_so,
11176         solib_target_relocate_section_addresses): Adjust.
11177         * windows-nat.c (struct lm_info): Rename to ...
11178         (struct lm_info_windows): ... this.  Extend lm_info_base.
11179         (windows_make_so, handle_load_dll, handle_unload_dll,
11180         windows_xfer_shared_libraries): Adjust.
11181
11182 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11183
11184         * solib-darwin.c (struct darwin_so_list): Remove.
11185         (darwin_current_sos): Allocate an so_list object instead of a
11186         darwin_so_list, separately allocate an lm_info object.
11187         (darwin_free_so): Free lm_info.
11188
11189 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11190
11191         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11192         with fprintf_filtered.
11193
11194 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11195
11196         * regcache.c (regcache::regcache): New function.
11197         (regcache::~regcache): New function.
11198         (regcache_xmalloc_1): Remove.
11199         (regcache_xmalloc): Call new regcache.
11200         (regcache_xfree): Call delete regcache.
11201         (get_thread_arch_aspace_regcache): Call new regcache.
11202
11203 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11204
11205         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11206         lwp instead of ptid_get_lwp.
11207
11208 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11209
11210         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11211         lwp_info instead of getting from inferior_ptid.
11212
11213 2017-04-27  Keith Seitz  <keiths@redhat.com>
11214
11215         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11216         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11217         (CV_CONVERSION_BADNESS): Define.
11218         (rank_one_type): Remove overly restrictive rvalue reference
11219         rank checks.
11220         Add cv-qualifier checks and subranks for type equality.
11221         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11222         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11223         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11224
11225 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11226
11227         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11228         count when creating the object.
11229
11230 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11231             Ulrich Weigand  <uweigand@de.ibm.com>
11232
11233         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11234         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11235         is used in AIX.
11236         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11237         (process_xcoff_symbol): Likewise.
11238         (scan_xcoff_symtab): Likewise.
11239
11240 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11241
11242         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11243         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11244         (ia64_access_reg): Use get_frame_register_unsigned.
11245         (ia64_access_rse_reg): Likewise.
11246         (ia64_libunwind_frame_prev_register): Likewise.
11247
11248 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11249
11250         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11251         * gdbarch.c: Regenerated.
11252         * gdbarch.h: Regenerated.
11253         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11254         visibility external.
11255         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11256         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11257         (enum cfa_how_kind): Move to ...
11258         (struct dwarf2_frame_state_reg_info): Likewise.
11259         (struct dwarf2_frame_state): Likewise.
11260         * dwarf2-frame.h: ... here.
11261         (dwarf2_frame_state_alloc_regs): New declaration.
11262         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11263         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11264
11265 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11266
11267         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11268         regcache_raw_read_unsigned.
11269         (xtensa_pseudo_register_write): Likewise.
11270
11271 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11272
11273         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11274         (nds32_pseudo_register_write): Likewise.
11275
11276 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11277
11278         * regcache.c (struct regcache) <readonly_p>: Change its type
11279         to bool.
11280         (regcache_xmalloc_1): Update parameter type and callers update.
11281
11282 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11283
11284         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11285         set_gdbarch_wchar_bit.
11286         * arm-tdep.c (arm_gdbarch_init): Likewise.
11287
11288 2017-04-25  Pedro Alves  <palves@redhat.com>
11289
11290         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11291         (BothAreRelocatable, memcopy, memmove): Don't define.
11292         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11293         macros.
11294
11295 2017-04-25  Pedro Alves  <palves@redhat.com>
11296
11297         * common/common-defs.h: Include "common/poison.h".
11298         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11299         and adjust.
11300         * common/poison.h: New file.
11301         * common/traits.h: Include <type_traits>.
11302         (Not, Or, Requires): New, moved from common/function-view.h.
11303
11304 2017-04-25  Pedro Alves  <palves@redhat.com>
11305
11306         * breakpoint.h (struct breakpoint): In-class initialize all
11307         fields.  Make boolean fields "bool".
11308         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11309         memset call and initializations no longer necessary.
11310
11311 2017-04-25  Pedro Alves  <palves@redhat.com>
11312
11313         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11314         reference.
11315         (pt_btrace_insn): New function.
11316         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11317
11318 2017-04-25  Pedro Alves  <palves@redhat.com>
11319
11320         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11321         "base" field and inherit from "bp_location" instead.  Add
11322         non-default ctor.
11323         (allocate_location_exception): Use new non-default ctor.
11324         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11325         (init_bp_location): Convert to ...
11326         (bp_location::bp_location): ... this new ctor, and remove memset
11327         call.
11328         (base_breakpoint_allocate_location): Use the new non-default ctor.
11329         * breakpoint.h (bp_location): Now a class.  Declare default and
11330         non-default ctors.  In-class initialize all members.
11331         (init_bp_location): Remove declaration.
11332
11333 2017-04-25  Pedro Alves  <palves@redhat.com>
11334
11335         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11336         assignment operator.
11337
11338 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11339
11340         * doublest.c (convert_doublest_to_floatformat): Call
11341         floatformat_totalsize_bytes.
11342
11343 2017-04-22  Tom Tromey  <tom@tromey.com>
11344
11345         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11346         ui_out_emit_list.
11347         * stack.c (print_frame): Use ui_out_emit_list.
11348         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11349         ui_out_emit_list.
11350         * mi/mi-main.c (print_one_inferior)
11351         (mi_cmd_data_list_register_names)
11352         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11353         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11354         ui_out_emit_list.
11355         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11356         (mi_output_solib_attribs): Use ui_out_emit_list,
11357         ui_out_emit_tuple.
11358         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11359         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11360         (mi_cmd_stack_list_args, list_args_or_locals): Use
11361         ui_out_emit_list.
11362         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11363         * breakpoint.c (print_solib_event, output_thread_groups): Use
11364         ui_out_emit_list.
11365
11366 2017-04-22  Tom Tromey  <tom@tromey.com>
11367
11368         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11369         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11370         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11371
11372 2017-04-22  Tom Tromey  <tom@tromey.com>
11373
11374         * tracepoint.c (tvariables_info_1)
11375         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11376
11377 2017-04-22  Tom Tromey  <tom@tromey.com>
11378
11379         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11380         annotate_arg_emitter.
11381         * breakpoint.c (print_mention_watchpoint)
11382         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11383         * annotate.h (struct annotate_arg_emitter): New.
11384
11385 2017-04-22  Tom Tromey  <tom@tromey.com>
11386
11387         * record-btrace.c (record_btrace_insn_history)
11388         (record_btrace_insn_history_range, record_btrace_call_history)
11389         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11390         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11391         ui_out_emit_tuple.
11392         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11393         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11394         * skip.c (skip_info): Use ui_out_emit_tuple.
11395         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11396         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11397         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11398         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11399         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11400         ui_out_emit_tuple.
11401         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11402         (output_register, mi_cmd_data_read_memory)
11403         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11404         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11405         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11406         Use ui_out_emit_tuple.
11407         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11408         ui_out_emit_tuple.
11409         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11410         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11411         * linux-thread-db.c (info_auto_load_libthread_db): Use
11412         ui_out_emit_tuple.
11413         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11414         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11415         * disasm.c (do_mixed_source_and_assembly_deprecated)
11416         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11417         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11418         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11419         * breakpoint.c (print_one_breakpoint_location)
11420         (print_one_breakpoint): Use ui_out_emit_tuple.
11421         * auto-load.c (print_script, info_auto_load_cmd): Use
11422         ui_out_emit_tuple.
11423         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11424
11425 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11426
11427         * thread.c (print_thread_info_1): Remove dead code.
11428
11429 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11430
11431         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11432         GDB_SELF_TEST.
11433         * arm-tdep.c (selftests::arm_record_test): Likewise.
11434
11435 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11436
11437         * regcache.c (regcache_restore): Remove argument 2.  Replace
11438         argument 3 with regcache.  Get register status from
11439         src->register_status and get register contents from
11440         register_buffer (src, regnum).
11441         (regcache_cpy): Update.
11442
11443 2017-04-19  Pedro Alves  <palves@redhat.com>
11444
11445         * gdbthread.h (thread): Add missing closing parenthesis in
11446         comment.
11447
11448 2017-04-19  Pedro Alves  <palves@redhat.com>
11449
11450         * common/refcounted-object.h: New file.
11451         * gdbthread.h: Include "common/refcounted-object.h".
11452         (thread_info): Inherit from refcounted_object and add comments.
11453         (thread_info::incref, thread_info::decref)
11454         (thread_info::m_refcount): Delete.
11455         (thread_info::deletable): Use the refcounted_object::refcount()
11456         method.
11457         * inferior.c (current_inferior_): Add comment.
11458         (set_current_inferior): Increment/decrement refcounts.
11459         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11460         not-deletable instead of comparing with the current inferior.
11461         (initialize_inferiors): Increment the initial inferior's refcount.
11462         * inferior.h (struct inferior): Forward declare.
11463         Include "common/refcounted-object.h".
11464         (current_inferior, set_current_inferior): Move declaration to
11465         before struct inferior's definition, and fix comment.
11466         (inferior): Inherit from refcounted_object.  Add comments.
11467         * thread.c (switch_to_thread_no_regs): Reference the thread's
11468         inferior pointer directly instead of doing a ptid lookup.
11469         (switch_to_no_thread): New function.
11470         (switch_to_thread(thread_info *)): New function, factored out
11471         from ...
11472         (switch_to_thread(ptid_t)): ... this.
11473         (restore_current_thread): Delete.
11474         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11475         fields, and add 'inf' field.
11476         (do_restore_current_thread_cleanup): Check whether old->inf is
11477         alive instead of looking up an inferior by ptid.  Use
11478         switch_to_thread and switch_to_no_thread.
11479         (restore_current_thread_cleanup_dtor): Use old->inf directly
11480         instead of lookup up an inferior by id.  Decref the inferior.
11481         Don't restore 'removable'.
11482         (make_cleanup_restore_current_thread): Same the inferior pointer
11483         in old, instead of the inferior number.  Incref the inferior.
11484         Don't save/clear 'removable'.
11485
11486 2017-04-19  Pedro Alves  <palves@redhat.com>
11487
11488         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11489         unittests/scoped_restore-selftests.c.
11490         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11491         * common/scoped_restore.h (scoped_restore_base): Make "class".
11492         (scoped_restore_base::release): New public method.
11493         (scoped_restore_base::scoped_restore_base): New protected ctor.
11494         (scoped_restore_base::m_saved_var): New protected field.
11495         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11496         scoped_restore_base base class instead of m_saved_var directly.
11497         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11498         (scoped_restore_tmpl::scoped_restore_tmpl(const
11499         scoped_restore_tmpl<T>&)): Likewise.
11500         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11501         method.
11502         (scoped_restore_tmpl::saved_var): New method.
11503         (scoped_restore_tmpl::m_saved_var): Delete.
11504         * inferior.h (inferior::detaching): Now a bool.
11505         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11506         cleanup.
11507         * unittests/scoped_restore-selftests.c: New file.
11508
11509 2017-04-19  Pedro Alves  <palves@redhat.com>
11510
11511         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11512         Re-sort in alphabetic order.
11513
11514 2017-04-18  Pedro Alves  <palves@redhat.com>
11515
11516         * xml-support.c (obstack_xml_printf): Delete.
11517         * xml-support.h (obstack_xml_printf): Delete.
11518
11519 2017-04-18  Pedro Alves  <palves@redhat.com>
11520
11521         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11522         vdebug, verror, body_text, start_element, end_element, name,
11523         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11524         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11525         is_xinclude>: Make private and add m_ prefix.
11526         (gdb_xml_parser::body_text): New method, based on ...
11527         (gdb_xml_body_text): ... this.  Adjust.
11528         (gdb_xml_parser::vdebug): New method, based on ...
11529         (gdb_xml_debug): ... this.  Adjust.
11530         (gdb_xml_parser::verror): New method, based on ...
11531         (gdb_xml_error): ... this.  Adjust.
11532         (gdb_xml_parser::start_element): New method, based on ...
11533         (gdb_xml_start_element): ... this.  Adjust.
11534         (gdb_xml_start_element_wrapper): Defer to
11535         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11536         (gdb_xml_parser::end_element): New method, based on ...
11537         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11538         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11539         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11540         (gdb_xml_parser::use_dtd): New method, based on ...
11541         (gdb_xml_use_dtd): ... this.  Adjust.
11542         (gdb_xml_parser::parse): New method, based on ...
11543         (gdb_xml_parse): ... this.  Adjust.
11544         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11545         (xinclude_start_include): Adjust to call the parser's name method.
11546         (xml_xinclude_default, xml_xinclude_start_doctype)
11547         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11548         method.
11549         (xml_process_xincludes): Adjust to call parser methods.
11550         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11551         declarations.
11552
11553 2017-04-18  Pedro Alves  <palves@redhat.com>
11554
11555         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11556         gdb::optional<std::string>.
11557         * xml-support.c: Include <string>.
11558         (scope_level::scope_level(scope_level &&))
11559         (scope_level::~scope_level): Delete.
11560         (scope_level::body): Now a std::string.
11561         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11562         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11563         parameter.
11564         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11565         (xinclude_parsing_data::output): Now a std::string reference.
11566         (xinclude_start_include): Adjust.
11567         (xml_xinclude_default): Adjust.
11568         (xml_process_xincludes): Add 'output' parameter, and return bool.
11569         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11570         and return bool.
11571         * xml-tdesc.c: Include <unordered_map> and <string>.
11572         (tdesc_xml_cache): Delete.
11573         (tdesc_xml_cache_s): Delete.
11574         (xml_cache): Now an std::unordered_map.
11575         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11576         (target_fetch_description_xml): Change return type to
11577         gdb::optional<std::string>, and adjust.
11578         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11579         (target_fetch_description_xml): Change return type to
11580         gdb::optional<std::string>.
11581
11582 2017-04-18  Pedro Alves  <palves@redhat.com>
11583
11584         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11585         unittests/optional-selftests.c.
11586         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11587         * unittests/optional-selftests.c: New file.
11588         * unittests/optional/assignment/1.cc: New file.
11589         * unittests/optional/assignment/2.cc: New file.
11590         * unittests/optional/assignment/3.cc: New file.
11591         * unittests/optional/assignment/4.cc: New file.
11592         * unittests/optional/assignment/5.cc: New file.
11593         * unittests/optional/assignment/6.cc: New file.
11594         * unittests/optional/assignment/7.cc: New file.
11595         * unittests/optional/cons/copy.cc: New file.
11596         * unittests/optional/cons/default.cc: New file.
11597         * unittests/optional/cons/move.cc: New file.
11598         * unittests/optional/cons/value.cc: New file.
11599         * unittests/optional/in_place.cc: New file.
11600         * unittests/optional/observers/1.cc: New file.
11601         * unittests/optional/observers/2.cc: New file.
11602
11603 2017-04-18  Pedro Alves  <palves@redhat.com>
11604
11605         * common/gdb_optional.h: Include common/traits.h.
11606         (in_place_t): New type.
11607         (in_place): New constexpr variable.
11608         (optional::optional): Remove member initialization of
11609         m_instantiated.
11610         (optional::optional(in_place_t...)): New constructor.
11611         (optional::~optional): Use reset.
11612         (optional::optional(const optional&)): New.
11613         (optional::optional(const optional&&)): New.
11614         (optional::optional(T &)): New.
11615         (optional::optional(T &&)): New.
11616         (operator::operator=(const optional &)): New.
11617         (operator::operator=(optional &&)): New.
11618         (operator::operator= (const T &))
11619         (operator::operator= (T &&))
11620         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11621         (operator::reset): New.
11622         (operator::m_instantiated):: Add in-class initializer.
11623         * common/traits.h: Include <type_traits>.
11624         (struct And): New types.
11625
11626 2017-04-18  Pedro Alves  <palves@redhat.com>
11627
11628         * xml-support.c: Include <vector>.
11629         (scope_level::scope_level(const gdb_xml_element *))
11630         (scope_level::scope_level(scope_level&&)): New.
11631         (scope_level::~scope_level): New.
11632         (scope_level_s): Delete.
11633         (gdb_xml_parser::scopes): Now a std::vector.
11634         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11635         Use std::vector.
11636         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11637         scope cleanup code.
11638         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11639         of the scopes member.  Use std::vector::emplace_back.
11640
11641 2017-04-18  Pedro Alves  <palves@redhat.com>
11642
11643         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11644         a bool.
11645         (gdb_xml_end_element): Change type of first parameter.
11646         (gdb_xml_cleanup): Rename to ...
11647         (gdb_xml_parser::~gdb_xml_parser): ... this.
11648         (gdb_xml_create_parser_and_cleanup): Delete with ...
11649         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11650         to this new ctor.
11651         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11652         using gdb_xml_create_parser_and_cleanup.
11653         (xinclude_parsing_data): Add ctor/dtor.
11654         (xml_xinclude_cleanup): Delete.
11655         (xml_process_xincludes): Create a local xinclude_parsing_data
11656         instead of heap-allocating one.  Create a local gdb_xml_parser
11657         instead of heap-allocating one with
11658         gdb_xml_create_parser_and_cleanup.
11659
11660 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11661
11662         PR threads/20743
11663         * fbsd-nat.c (resume_one_thread_cb): Remove.
11664         (resume_all_threads_cb): Remove.
11665         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11666         iterate_over_threads.
11667
11668 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11669
11670         * NEWS: Create a new section for the next release branch.
11671         Rename the section of the current branch, now that it has
11672         been cut.
11673
11674 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11675
11676         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11677         * version.in: Bump version to 8.0.50.DATE-git.
11678
11679 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11680
11681         PR gdb/21385
11682         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11683         independently of the host, and fix build breakage on Cygwin.
11684
11685 2017-04-13  Pedro Alves  <palves@redhat.com>
11686
11687         * inferior.c (free_inferior): Convert to ...
11688         (inferior::~inferior): ... this dtor.
11689         (inferior::inferior): New ctor, factored out from ...
11690         (add_inferior_silent): ... here.  Allocate the inferior with a new
11691         expression.
11692         (delete_inferior): Call delete instead of free_inferior.
11693         * inferior.h (gdb_environ, continuation): Forward declare.
11694         (inferior): Now a class.  Add in-class initialization to all
11695         members.  Make boolean fields bool, except 'detaching'.
11696         (inferior::inferior): New explicit ctor.
11697         (inferior::~inferior): New.
11698
11699 2017-04-13  Pedro Alves  <palves@redhat.com>
11700
11701         * inferior.c (init_inferior_list): Delete.
11702         * inferior.h (init_inferior_list): Delete.
11703
11704 2017-04-13  Pedro Alves  <palves@redhat.com>
11705
11706         PR threads/13217
11707         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11708         (top level): Call it twice, with different thread sets.
11709
11710 2017-04-13  Pedro Alves  <palves@redhat.com>
11711
11712         * thread.c: Include <algorithm>.
11713         (thread_array_cleanup): Delete.
11714         (scoped_inc_dec_ref): New class.
11715         (live_threads_count): New function.
11716         (set_thread_refcount): Delete.
11717         (tp_array_compar_ascending): Now a bool.
11718         (tp_array_compar): Convert to a std::sort comparison function.
11719         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11720         and live_threads_count.
11721
11722 2017-04-13  Pedro Alves  <palves@redhat.com>
11723
11724         * infrun.c (follow_fork_inferior): Also switch the current
11725         inferior.
11726
11727 2017-04-13  Pedro Alves  <palves@redhat.com>
11728
11729         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11730         before calling create_internal_breakpoint.
11731
11732 2017-04-13  Pedro Alves  <palves@redhat.com>
11733
11734         * fork-child.c (execv_argv): New class.
11735         (breakup_args): Refactored as ...
11736         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11737         Copy arguments to storage and replace separators with NULL
11738         terminators in place.
11739         (escape_bang_in_quoted_argument): Adjust to return bool.
11740         (execv_argv::execv_argv): New ctor.
11741         (execv_argv::init_for_shell): New method, factored out from
11742         fork_inferior.  Don't strdup strings into the vector.
11743         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11744         Remove free_vector_argv call.
11745
11746 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11747
11748         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11749         tdep->rx_psw_type.
11750
11751 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11752
11753         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11754         * rx-tdep.c (rx_gdbarch_init): Likewise.
11755
11756 2017-04-13  Pedro Alves  <palves@redhat.com>
11757
11758         * breakpoint.h (struct breakpoint): Reindent.
11759
11760 2017-04-13  Pedro Alves  <palves@redhat.com>
11761
11762         * breakpoint.c (bp_location): Rename to ...
11763         (bp_locations): ... this.  All references updated.
11764         (bp_location_count): Rename to ...
11765         (bp_locations_count): ... this.  All references updated.
11766         (bp_location_placed_address_before_address_max): Rename to ...
11767         (bp_locations_placed_address_before_address_max): ... this.  All
11768         references updated.
11769         (bp_location_shadow_len_after_address_max): Rename to ...
11770         (bp_locations_shadow_len_after_address_max): ... this.  All
11771         references updated.
11772         (bp_location_compare_addrs): Rename to ...
11773         (bp_locations_compare_addrs): ... this.  All references updated.
11774         (bp_location_compare):Rename to ...
11775         (bp_locations_compare): ... this.  All references updated.
11776         (bp_location_target_extensions_update): Rename to ...
11777         (bp_locations_target_extensions_update): ... this.  All references
11778         updated.
11779
11780 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11781
11782         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11783         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11784         'sgtty.h'.
11785         * common/gdb_termios.h: New file, with parts of "terminal.h".
11786         * inflow.c: Include "gdb_termios.h".
11787         * ser-unix.c: Include "gdb_termios.h".
11788         * terminal.h: Move terminal-related defines to
11789         "common/gdb_termios.h".
11790
11791 2017-04-12  Tom Tromey  <tom@tromey.com>
11792
11793         * probe.c (parse_probes): Update.
11794         * location.h (delete_event_location): Don't declare.
11795         (event_location_deleter::operator()): Update.
11796         * location.c (event_location_deleter::operator()): Rename from
11797         delete_event_location.
11798         * linespec.h (linespec_result) <location>: Change type to
11799         event_location_up.
11800         * linespec.c (canonicalize_linespec, event_location_to_sals)
11801         (decode_objc): Update.
11802         (linespec_result): Don't call delete_event_location.
11803         * breakpoint.c (create_breakpoints_sal)
11804         (bkpt_probe_create_sals_from_location)
11805         (strace_marker_create_sals_from_location): Update.
11806
11807 2017-04-12  Tom Tromey  <tom@tromey.com>
11808
11809         * linespec.h (struct linespec_result): Add constructor and
11810         destructor.
11811         (init_linespec_result, destroy_linespec_result)
11812         (make_cleanup_destroy_linespec_result): Don't declare.
11813         * linespec.c (init_linespec_result): Remove.
11814         (linespec_result::~linespec_result): Rename from
11815         destroy_linespec_result.  Update.
11816         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11817         Remove.
11818         * breakpoint.c (create_breakpoint, break_range_command)
11819         (decode_location_default): Update.
11820         * ax-gdb.c (agent_command_1): Update.
11821
11822 2017-04-12  Tom Tromey  <tom@tromey.com>
11823
11824         * remote.c (remote_download_tracepoint): Update.
11825         * python/py-breakpoint.c (bppy_get_location): Update.
11826         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11827         (gdbscm_breakpoint_location): Update.
11828         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11829         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11830         Change type to event_location_up.
11831         * breakpoint.c (create_overlay_event_breakpoint)
11832         (create_longjmp_master_breakpoint)
11833         (create_std_terminate_master_breakpoint)
11834         (create_exception_master_breakpoint)
11835         (breakpoint_event_location_empty_p, print_breakpoint_location)
11836         (print_one_breakpoint_location, create_thread_event_breakpoint)
11837         (init_breakpoint_sal, create_breakpoint)
11838         (print_recreate_ranged_breakpoint, break_range_command)
11839         (init_ada_exception_breakpoint, say_where): Update.
11840         (base_breakpoint_dtor): Don't call delete_event_location.
11841         (bkpt_print_recreate, tracepoint_print_recreate)
11842         (dprintf_print_recreate, update_static_tracepoint)
11843         (breakpoint_re_set_default): Update.
11844
11845 2017-04-12  Tom Tromey  <tom@tromey.com>
11846
11847         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11848         type of "to_do".  Update.
11849         (compute_stack_depth): Use std::vector.
11850
11851 2017-04-12  Tom Tromey  <tom@tromey.com>
11852
11853         * printcmd.c (find_instruction_backward): Use std::vector.
11854
11855 2017-04-12  Tom Tromey  <tom@tromey.com>
11856
11857         * symfile.c (objfilep): Remove typedef.
11858         (reread_symbols): Use a std::vector.
11859
11860 2017-04-12  Tom Tromey  <tom@tromey.com>
11861
11862         * mi/mi-main.c (exec_direction_forward): Remove.
11863         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11864         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11865         scoped_restore.
11866         * guile/guile.c (guile_repl_command, guile_command)
11867         (gdbscm_execute_gdb_command): Use scoped_restore.
11868         * go-exp.y (go_parse): Use scoped_restore.
11869         * d-exp.y (d_parse): Use scoped_restore.
11870         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11871         * c-exp.y (c_parse): Use scoped_restore.
11872
11873 2017-04-12  Tom Tromey  <tom@tromey.com>
11874
11875         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11876         (mi_parse): Update return type.
11877         (mi_parse_free): Remove.
11878         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11879         (mi_parse::~mi_parse): Rename from mi_parse_free.
11880         (mi_parse_cleanup): Remove.
11881         (mi_parse): Return a unique_ptr.  Use new.
11882         * mi/mi-main.c (mi_execute_command): Update.
11883
11884 2017-04-12  Tom Tromey  <tom@tromey.com>
11885
11886         * location.c (explicit_location_lex_one): Return a
11887         unique_xmalloc_ptr.
11888         (string_to_explicit_location): Update.  Remove cleanups.
11889
11890 2017-04-12  Tom Tromey  <tom@tromey.com>
11891
11892         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11893         (compare_value_and_voffset): Change type.  Update.
11894         (compute_vtable_size): Change type of "offset_vec".
11895         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11896         (gnuv3_get_typeid): Remove extraneous declaration.
11897
11898 2017-04-12  Tom Tromey  <tom@tromey.com>
11899
11900         * charset.h (wchar_iterator): Fix comment.
11901
11902 2017-04-12  Tom Tromey  <tom@tromey.com>
11903
11904         * charset.c (iconv_wrapper): New class.
11905         (cleanup_iconv): Remove.
11906         (convert_between_encodings): Use it.
11907
11908 2017-04-12  Tom Tromey  <tom@tromey.com>
11909
11910         * symfile.h (increment_reading_symtab): Update type.
11911         * symfile.c (decrement_reading_symtab): Remove.
11912         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11913         * psymtab.c (psymtab_to_symtab): Update.
11914         * dwarf2read.c (dw2_instantiate_symtab): Update.
11915
11916 2017-04-12  Tom Tromey  <tom@tromey.com>
11917
11918         * jit.c (struct jit_reader): Declare separately.  Add constructor
11919         and destructor.  Change type of "handle".
11920         (loaded_jit_reader): Define separately.
11921         (jit_reader_load): Update.  New "new".
11922         (jit_reader_unload_command): Use "delete".
11923         * gdb-dlfcn.h (struct dlclose_deleter): New.
11924         (gdb_dlhandle_up): New typedef.
11925         (gdb_dlopen, gdb_dlsym): Update types.
11926         (gdb_dlclose): Remove.
11927         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11928         (gdb_dlsym): Change type of "handle".
11929         (make_cleanup_dlclose): Remove.
11930         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11931         * compile/compile-c-support.c (load_libcc): Update.
11932
11933 2017-04-12  Tom Tromey  <tom@tromey.com>
11934
11935         * symtab.h (find_pcs_for_symtab_line): Change return type.
11936         * symtab.c (find_pcs_for_symtab_line): Change return type.
11937         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11938         type of "vec".  Update.
11939         (ltpy_get_pcs_for_line): Update.
11940         * linespec.c (decode_digits_ordinary): Update.
11941
11942 2017-04-12  Tom Tromey  <tom@tromey.com>
11943
11944         * tracepoint.c (actions_command): Update.
11945         * python/python.c (python_command, python_interactive_command):
11946         Update.
11947         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11948         * guile/guile.c (guile_command): Update.
11949         * defs.h (read_command_lines, read_command_lines_1): Return
11950         command_line_up.
11951         (command_lines_deleter): New struct.
11952         (command_line_up): New typedef.
11953         * compile/compile.c (compile_code_command)
11954         (compile_print_command): Update.
11955         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11956         command_line_up.
11957         (make_cleanup_free_command_lines): Remove.
11958         * cli/cli-script.c (get_command_line, read_command_lines_1)
11959         (copy_command_lines): Return command_line_up.
11960         (while_command, if_command, read_command_lines, define_command)
11961         (document_command): Update.
11962         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11963         Remove.
11964         * breakpoint.h (breakpoint_set_commands): Change type of
11965         "commands".
11966         * breakpoint.c (breakpoint_set_commands): Change type of
11967         "commands".  Update.
11968         (do_map_commands_command, update_dprintf_command_list)
11969         (create_tracepoint_from_upload): Update.
11970
11971 2017-04-12  Tom Tromey  <tom@tromey.com>
11972
11973         * tracepoint.c (scope_info): Update.
11974         * spu-tdep.c (spu_catch_start): Update.
11975         * python/python.c (gdbpy_decode_line): Update.
11976         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11977         * python/py-breakpoint.c (bppy_init): Update.
11978         * probe.c (parse_probes): Update.
11979         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11980         * location.h (event_location_deleter): New struct.
11981         (event_location_up): New typedef.
11982         (new_linespec_location, new_address_location, new_probe_location)
11983         (new_explicit_location, copy_event_location)
11984         (string_to_event_location, string_to_event_location_basic)
11985         (string_to_explicit_location): Update return type.
11986         (make_cleanup_delete_event_location): Remove.
11987         * location.c (new_linespec_location, new_address_location)
11988         (new_probe_location, new_explicit_location, copy_event_location):
11989         Return event_location_up.
11990         (delete_event_location_cleanup)
11991         (make_cleanup_delete_event_location): Remove.
11992         (string_to_explicit_location, string_to_event_location_basic)
11993         (string_to_event_location): Return event_location_up.
11994         * linespec.c (canonicalize_linespec, event_location_to_sals)
11995         (decode_line_with_current_source)
11996         (decode_line_with_last_displayed, decode_objc): Update.
11997         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11998         * completer.c (location_completer): Update.
11999         * cli/cli-cmds.c (edit_command, list_command): Update.
12000         * breakpoint.c (create_overlay_event_breakpoint)
12001         (create_longjmp_master_breakpoint)
12002         (create_std_terminate_master_breakpoint)
12003         (create_exception_master_breakpoint)
12004         (create_thread_event_breakpoint): Update.
12005         (init_breakpoint_sal): Update.  Remove some dead code.
12006         (create_breakpoint_sal): Change type of "location".  Update.
12007         (create_breakpoints_sal, create_breakpoint, break_command_1)
12008         (dprintf_command, break_range_command, until_break_command)
12009         (init_ada_exception_breakpoint)
12010         (strace_marker_create_sals_from_location)
12011         (update_static_tracepoint, trace_command, ftrace_command)
12012         (strace_command, create_tracepoint_from_upload): Update.
12013         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12014         * ax-gdb.c (agent_command_1): Update.
12015
12016 2017-04-12  Pedro Alves  <palves@redhat.com>
12017
12018         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12019         * configure.tgt: Handle i[34567]86-*-go32* and
12020         i[34567]86-*-msdosdjgpp*.
12021         * i386-tdep.c (i386_svr4_reg_to_regnum):
12022         Make extern.
12023         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12024         i386-go32-tdep.c.
12025         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12026         * i386-go32-tdep.c: New file.
12027         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12028         declarations.
12029
12030 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12031
12032         * aix-thread.c (pd_status2str): Change return type to const char *.
12033
12034 2017-04-12  Pedro Alves  <palves@redhat.com>
12035
12036         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12037         calls to set_gdbarch_gnu_triplet_regexp.
12038
12039 2017-04-12  Pedro Alves  <palves@redhat.com>
12040
12041         PR gdb/21323
12042         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12043         New enum value.
12044         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12045         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12046         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12047         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12048         * gdbarch.h, gdbarch.c: Regenerate.
12049         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12050         gdbarch_wchar_bit and gdbarch_wchar_signed.
12051         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12052         * arm-tdep.c (arm_gdbarch_init): Likewise.
12053         * avr-tdep.c (avr_gdbarch_init): Likewise.
12054         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12055         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12056         * i386-tdep.c (i386_go32_init_abi): Likewise.
12057         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12058         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12059         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12060         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12061         * sh-tdep.c (sh_gdbarch_init): Likewise.
12062         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12063         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12064         * windows-tdep.c (windows_init_abi): Likewise.
12065         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12066
12067 2017-04-12  Pedro Alves  <palves@redhat.com>
12068
12069         PR c++/21323
12070         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12071         cplus_primitive_type_char32_t>: New enum values.
12072         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12073         and cplus_primitive_type_char32_t.
12074         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12075         32, use the archtecture's built-in type for char16_t and char32_t,
12076         respectively.  Otherwise, fallback to init_integer_type as before,
12077         but make the type unsigned, and issue a complaint.
12078         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12079
12080 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12081
12082         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12083         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12084
12085 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12086
12087         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12088         'const char *'.
12089
12090 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12091
12092         * common/common-utils.c (free_vector_argv): New function.
12093         * common/common-utils.h: Include <vector>.
12094         (free_vector_argv): New prototype.
12095         * darwin-nat.c (darwin_create_inferior): Rewrite function
12096         prototype in order to constify "exec_file" and accept a
12097         "std::string" for "allargs".
12098         * fork-child.c: Include <vector>.
12099         (breakup_args): Rewrite function, using C++.
12100         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12101         and accept "std::string" for "allargs".  Update the code to
12102         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12103         and "execvp".
12104         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12105         order to constify "exec_file" and accept a "std::string" for
12106         "allargs".
12107         * go32-nat.c (go32_create_inferior): Likewise.
12108         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12109         * infcmd.c (run_command_1): Constify "exec_file".  Use
12110         "std::string" for inferior arguments.
12111         * inferior.h (fork_inferior): Update prototype.
12112         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12113         prototype in order to constify "exec_file" and accept a
12114         "std::string" for "allargs".
12115         * nto-procfs.c (procfs_create_inferior): Likewise.
12116         * procfs.c (procfs_create_inferior): Likewise.
12117         * remote-sim.c (gdbsim_create_inferior): Likewise.
12118         * remote.c (extended_remote_run): Update code to accept
12119         "std::string" as argument.
12120         (extended_remote_create_inferior): Rewrite function prototype in
12121         order to constify "exec_file" and accept a "std::string" for
12122         "allargs".
12123         * rs6000-nat.c (super_create_inferior): Likewise.
12124         (rs6000_create_inferior): Likewise.
12125         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12126         * windows-nat.c (windows_create_inferior): Likewise.
12127
12128 2017-04-11  Pedro Alves  <palves@redhat.com>
12129
12130         * thread.c: Fix whitespace throughout.
12131
12132 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12133
12134         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12135
12136 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12137
12138         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12139
12140 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12141
12142         PR gdb/21364
12143         * osdata.c (info_osdata): Check if 'type' is an empty string
12144         instead of NULL.
12145
12146 2017-04-10  Pedro Alves  <palves@redhat.com>
12147
12148         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12149         (ptid_to_global_thread_id, in_thread_list)
12150         (do_captured_list_thread_ids, set_resumed, set_running)
12151         (set_executing, set_stop_requested, finish_thread_state)
12152         (validate_registers_access, can_access_registers_ptid)
12153         (print_thread_info_1, switch_to_thread)
12154         (do_restore_current_thread_cleanup)
12155         (make_cleanup_restore_current_thread, thread_command)
12156         (thread_name_command): Use operator== instead of ptid_equal.
12157
12158 2017-04-10  Pedro Alves  <palves@redhat.com>
12159
12160         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12161         (current_thread_cleanup_chain): Delete.
12162         (restore_current_thread_cleanup_dtor)
12163         (make_cleanup_restore_current_thread): Remove references to
12164         current_thread_cleanup_chain.
12165
12166 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12167
12168         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12169         REG_UNKNOWN.
12170
12171 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12172
12173         PR gdb/19942
12174         * gdbthread.h (thread_info::deletable): New method.
12175         (thread_info::incref): New method.
12176         (thread_info::decref): New method.
12177         (thread_info::refcount): Move it to private.
12178         * infrun.c (save_stop_context): Call inc_refcount.
12179         (release_stop_context_cleanup): Likewise.
12180         * thread.c (set_thread_exited): New function.
12181         (init_thread_list): Delete "tp" only it is deletable, otherwise
12182         call set_thread_exited.
12183         (delete_thread_1): Call set_thread_exited.
12184         (current_thread_cleanup) <inferior_pid>: Remove.
12185         <thread>: New field.
12186         (restore_current_thread_ptid_changed): Removed.
12187         (do_restore_current_thread_cleanup): Adjust.
12188         (restore_current_thread_cleanup_dtor): Don't call
12189         find_thread_ptid.
12190         (set_thread_refcount): Use dec_refcount.
12191         (make_cleanup_restore_current_thread): Adjust.
12192         (thread_apply_all_command): Call inc_refcount.
12193         (_initialize_thread): Don't call
12194         observer_attach_thread_ptid_changed.
12195
12196 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12197
12198         * thread.c (delete_thread_1): Hoist code on marking thread as
12199         exited.
12200
12201 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12202
12203         * windows-nat.c (windows_detach): Initialize ptid with
12204         minus_one_ptid.
12205
12206 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12209
12210 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12211
12212         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12213         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12214         (bfin_pseudo_register_write): Likewise
12215
12216 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12217
12218         * common/ptid.h (struct ptid): Change to...
12219         (class ptid_t): ... this.
12220         <ptid_t>: New constructors.
12221         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12222         matches>: New methods.
12223         <make_null, make_minus_one>: New static methods.
12224         <pid>: Rename to...
12225         <m_pid>: ...this.
12226         <lwp>: Rename to...
12227         <m_lwp>: ...this.
12228         <tid>: Rename to...
12229         <m_tid>: ...this.
12230         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12231         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12232         as references, move comment to class ptid_t.
12233         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12234         ptid_t static methods.
12235         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12236         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12237         Take ptid arguments as references, implement using ptid_t methods.
12238         * unittests/ptid-selftests.c: New file.
12239         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12240         unittests/ptid-selftests.c.
12241         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12242
12243 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12244
12245         * python/python.c (python_run_simple_file): Cast mode literal to
12246         non-const char pointer as expected by PyFile_FromString.
12247
12248 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12249
12250         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12251         minus_one_ptid and null_ptid.
12252
12253 2017-04-05  Pedro Alves  <palves@redhat.com>
12254
12255         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12256         * configure: Regenerate.
12257
12258 2017-04-05  Pedro Alves  <palves@redhat.com>
12259
12260         * ada-exp.y (yyerror): Constify.
12261         * ada-lang.c (bound_name, get_selections)
12262         (ada_variant_discrim_type)
12263         (ada_variant_discrim_name, ada_value_struct_elt)
12264         (ada_lookup_struct_elt_type, is_unchecked_variant)
12265         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12266         (catch_ada_exception_command_split)
12267         (catch_ada_assert_command_split, catch_assert_command)
12268         (ada_op_name): Constify.
12269         * ada-lang.h (ada_yyerror, get_selections)
12270         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12271         * arc-tdep.c (arc_print_frame_cache): Constify.
12272         * arm-tdep.c (arm_skip_stub): Constify.
12273         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12274         (gen_aggregate_elt_ref): Constify.
12275         * bcache.c (print_bcache_statistics): Constify.
12276         * bcache.h (print_bcache_statistics): Constify.
12277         * break-catch-throw.c (catch_exception_command_1):
12278         * breakpoint.c (struct ep_type_description::description):
12279         Constify.
12280         (add_solib_catchpoint): Constify.
12281         (catch_fork_command_1): Add cast.
12282         (add_catch_command): Constify.
12283         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12284         Constify.
12285         * bsd-uthread.c (bsd_uthread_state): Constify.
12286         * buildsym.c (patch_subfile_names): Constify.
12287         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12288         Constify.
12289         * c-exp.y (yyerror): Constify.
12290         (token::oper): Constify.
12291         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12292         * c-varobj.c (cplus_describe_child): Constify.
12293         * charset.c (find_charset_names): Add cast.
12294         (find_charset_names): Constify array and add const_cast.
12295         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12296         (edit_command): Constify.
12297         * cli/cli-decode.c (lookup_cmd): Constify.
12298         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12299         Constify.
12300         (struct dump_context): Constify.
12301         (add_dump_command, restore_command): Constify.
12302         * cli/cli-script.c (get_command_line): Constify.
12303         * cli/cli-script.h (get_command_line): Constify.
12304         * cli/cli-utils.c (check_for_argument): Constify.
12305         * cli/cli-utils.h (check_for_argument): Constify.
12306         * coff-pe-read.c (struct read_pe_section_data): Constify.
12307         * command.h (lookup_cmd): Constify.
12308         * common/print-utils.c (decimal2str): Constify.
12309         * completer.c (gdb_print_filename): Constify.
12310         * corefile.c (set_gnutarget): Constify.
12311         * cp-name-parser.y (yyerror): Constify.
12312         * cp-valprint.c (cp_print_class_member): Constify.
12313         * cris-tdep.c (cris_register_name, crisv32_register_name):
12314         Constify.
12315         * d-exp.y (yyerror): Constify.
12316         (struct token::oper): Constify.
12317         * d-lang.h (d_yyerror): Constify.
12318         * dbxread.c (struct header_file_location::name): Constify.
12319         (add_old_header_file, add_new_header_file, last_function_name)
12320         (dbx_next_symbol_text, add_bincl_to_list)
12321         (find_corresponding_bincl_psymtab, set_namestring)
12322         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12323         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12324         * defs.h (command_line_input, print_address_symbolic)
12325         (deprecated_readline_begin_hook): Constify.
12326         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12327         Constify.
12328         * event-top.c (handle_line_of_input): Constify and add cast.
12329         * exceptions.c (catch_errors): Constify.
12330         * exceptions.h (catch_errors): Constify.
12331         * expprint.c (print_subexp_standard, op_string, op_name)
12332         (op_name_standard, dump_raw_expression, dump_raw_expression):
12333         * expression.h (op_name, op_string, dump_raw_expression):
12334         Constify.
12335         * f-exp.y (yyerror): Constify.
12336         (struct token::oper): Constify.
12337         (struct f77_boolean_val::name): Constify.
12338         * f-lang.c (f_word_break_characters): Constify.
12339         * f-lang.h (f_yyerror): Constify.
12340         * fork-child.c (fork_inferior): Add cast.
12341         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12342         (new_variant): Constify.
12343         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12344         * gdbarch.c: Regenerate.
12345         * gdbcore.h (set_gnutarget): Constify.
12346         * go-exp.y (yyerror): Constify.
12347         (token::oper): Constify.
12348         * go-lang.h (go_yyerror): Constify.
12349         * go32-nat.c (go32_sysinfo): Constify.
12350         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12351         * guile/scm-cmd.c (cmdscm_function): Constify.
12352         * guile/scm-param.c (pascm_param_value): Constify.
12353         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12354         (h8300sx_register_name): Constify.
12355         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12356         Constify.
12357         * ia64-tdep.c (ia64_register_names): Constify.
12358         * infcmd.c (construct_inferior_arguments): Constify.
12359         (path_command, attach_post_wait): Constify.
12360         * language.c (show_range_command, show_case_command)
12361         (unk_lang_error): Constify.
12362         * language.h (language_defn::la_error)
12363         (language_defn::la_name_of_this): Constify.
12364         * linespec.c (decode_line_2): Constify.
12365         * linux-thread-db.c (thread_db_err_str): Constify.
12366         * lm32-tdep.c (lm32_register_name): Constify.
12367         * m2-exp.y (yyerror): Constify.
12368         * m2-lang.h (m2_yyerror): Constify.
12369         * m32r-tdep.c (m32r_register_names): Constify and make static.
12370         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12371         * m88k-tdep.c (m88k_register_name): Constify.
12372         * macroexp.c (appendmem): Constify.
12373         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12374         (upgrade_type, parse_external, parse_partial_symbols)
12375         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12376         (new_symbol): Constify.
12377         * memattr.c (mem_info_command): Constify.
12378         * mep-tdep.c (register_name_from_keyword): Constify.
12379         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12380         Constify.
12381         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12382         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12383         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12384         cast.
12385         (mi_execute_async_cli_command): Constify.
12386         * mips-tdep.c (mips_register_name): Constify.
12387         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12388         (am33_register_name, am33_2_register_name)
12389         * moxie-tdep.c (moxie_register_names): Constify.
12390         * nat/linux-osdata.c (osdata_type): Constify fields.
12391         * nto-tdep.c (nto_parse_redirection): Constify.
12392         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12393         (lookup_child_selector): Constify.
12394         (objc_methcall::name): Constify.
12395         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12396         (lookup_struct_typedef): Constify.
12397         * objfiles.c (pc_in_section): Constify.
12398         * objfiles.h (pc_in_section): Constify.
12399         * p-exp.y (struct token::oper): Constify.
12400         (yyerror): Constify.
12401         * p-lang.h (pascal_yyerror): Constify.
12402         * parser-defs.h (op_name_standard): Constify.
12403         (op_print::string): Constify.
12404         (exp_descriptor::op_name): Constify.
12405         * printcmd.c (print_address_symbolic): Constify.
12406         * psymtab.c (print_partial_symbols): Constify.
12407         * python/py-breakpoint.c (stop_func): Constify.
12408         (bppy_get_expression): Constify.
12409         * python/py-cmd.c (cmdpy_completer::name): Constify.
12410         (cmdpy_function): Constify.
12411         * python/py-event.c (evpy_add_attribute)
12412         (gdbpy_initialize_event_generic): Constify.
12413         * python/py-event.h (evpy_add_attribute)
12414         (gdbpy_initialize_event_generic): Constify.
12415         * python/py-evts.c (add_new_registry): Constify.
12416         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12417         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12418         * python/py-inferior.c (get_buffer): Add cast.
12419         * python/py-param.c (parm_constant::name): Constify.
12420         * python/py-unwind.c (fprint_frame_id): Constify.
12421         * python/python.c (gdbpy_parameter_value): Constify.
12422         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12423         * remote.c (memory_packet_config::name): Constify.
12424         (show_packet_config_cmd, remote_write_bytes)
12425         (remote_buffer_add_string):
12426         * reverse.c (exec_reverse_once): Constify.
12427         * rs6000-tdep.c (variant::name, variant::description): Constify.
12428         * rust-exp.y (rustyyerror): Constify.
12429         * rust-lang.c (rust_op_name): Constify.
12430         * rust-lang.h (rustyyerror): Constify.
12431         * serial.h (serial_ops::name): Constify.
12432         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12433         (sh_sh3e_register_name, sh_sh2e_register_name)
12434         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12435         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12436         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12437         (sh_sh4al_dsp_register_name): Constify.
12438         * sh64-tdep.c (sh64_register_name): Constify.
12439         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12440         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12441         * stabsread.c (patch_block_stabs, read_type_number)
12442         (ref_map::stabs, ref_add, process_reference)
12443         (symbol_reference_defined, define_symbol, define_symbol)
12444         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12445         (read_one_struct_field, read_struct_fields, read_baseclasses)
12446         (read_tilde_fields, read_struct_type, read_array_type)
12447         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12448         (read_huge_number, read_range_type, read_args, common_block_start)
12449         (find_name_end): Constify.
12450         * stabsread.h (common_block_start, define_symbol)
12451         (process_one_symbol, symbol_reference_defined, ref_add):
12452         * symfile.c (get_section_index, add_symbol_file_command):
12453         * symfile.h (get_section_index): Constify.
12454         * target-descriptions.c (tdesc_type::name): Constify.
12455         (tdesc_free_type): Add cast.
12456         * target.c (find_default_run_target):
12457         (add_deprecated_target_alias, find_default_run_target)
12458         (target_announce_detach): Constify.
12459         (do_option): Constify.
12460         * target.h (add_deprecated_target_alias): Constify.
12461         * thread.c (print_thread_info_1): Constify.
12462         * top.c (deprecated_readline_begin_hook, command_line_input):
12463         Constify.
12464         (init_main): Add casts.
12465         * top.h (handle_line_of_input): Constify.
12466         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12467         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12468         (tfind_command): Rename to ...
12469         (tfind_command_1): ... this and constify.
12470         (tfind_command): New function.
12471         (tfind_end_command, tfind_start_command): Adjust.
12472         (encode_source_string): Constify.
12473         * tracepoint.h (encode_source_string): Constify.
12474         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12475         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12476         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12477         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12478         * tui/tui-win.c (parse_scrolling_args): Constify.
12479         * tui/tui-windata.c (tui_erase_data_content): Constify.
12480         * tui/tui-windata.h (tui_erase_data_content): Constify.
12481         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12482         * tui/tui.c (tui_enable): Add cast.
12483         * utils.c (defaulted_query): Constify.
12484         (init_page_info): Add cast.
12485         (puts_debug, subset_compare): Constify.
12486         * utils.h (subset_compare): Constify.
12487         * varobj.c (varobj_format_string): Constify.
12488         * varobj.h (varobj_format_string): Constify.
12489         * vax-tdep.c (vax_register_name): Constify.
12490         * windows-nat.c (windows_detach): Constify.
12491         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12492         * xml-support.c (gdb_xml_end_element): Constify.
12493         * xml-tdesc.c (tdesc_start_reg): Constify.
12494         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12495         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12496         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12497
12498 2017-04-05  Pedro Alves  <palves@redhat.com>
12499
12500         * proc-api.c (struct trans): Constify.
12501         (procfs_note): Constify.
12502         * proc-events.c (struct trans, syscall_table):
12503         * proc-flags.c (struct trans): Constify.
12504         * proc-utils.h (procfs_note): Constify.
12505         * proc-why.c (struct trans): Constify.
12506         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12507         (procfs_detach): Constify.
12508         * sol-thread.c (struct string_map): Constify.
12509         (td_err_string, td_state_string): Constify.
12510
12511 2017-04-05  Pedro Alves  <palves@redhat.com>
12512
12513         * proc-api.c (procfs_filename): Don't initialize
12514         procfs_filename.
12515         (prepare_to_trace): Assume procfs_filename is non-NULL.
12516         (_initialize_proc_api): Give procfs_filename a default value here.
12517
12518 2017-04-05  Pedro Alves  <palves@redhat.com>
12519
12520         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12521         'cond_string' parameter.
12522         (extract_exception_regexp): Constify 'string' parameter.
12523         (catch_exception_command_1): Constify.
12524         * breakpoint.c (init_catchpoint)
12525         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12526         parameter.
12527         (ep_parse_optional_if_clause, catch_fork_command_1)
12528         (catch_exec_command_1): Constify.
12529         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12530         parameter.
12531         (ep_parse_optional_if_clause): Constify.
12532         * cli/cli-utils.c (remove_trailing_whitespace)
12533         (check_for_argument): Constify.
12534         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12535         non-const overload.
12536         (check_for_argument): Likewise.
12537
12538 2017-04-05  Pedro Alves  <palves@redhat.com>
12539
12540         * event-top.c (command_line_handler): Add cast to execute_command
12541         call.
12542         * record-btrace.c (cmd_record_btrace_bts_start)
12543         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12544         (cmd_record_btrace_start): Add cast to execute_command call.
12545         * record-full.c (record_full_goto_insn):
12546         * record.c (record_start, record_stop): Add cast to
12547         execute_command_to_string calls.
12548         (cmd_record_start): Add cast to execute_command calls.
12549
12550 2017-04-05  Pedro Alves  <palves@redhat.com>
12551
12552         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12553         static inline function.
12554         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12555         array and use gdb_PyArg_ParseTupleAndKeywords.
12556         * python/py-cmd.c (cmdpy_init): Likewise.
12557         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12558         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12559         (infpy_search_memory): Likewise.
12560         * python/py-objfile.c (objfpy_add_separate_debug_file)
12561         (gdbpy_lookup_objfile): Likewise.
12562         * python/py-symbol.c (gdbpy_lookup_symbol)
12563         (gdbpy_lookup_global_symbol): Likewise.
12564         * python/py-type.c (gdbpy_lookup_type): Likewise.
12565         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12566         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12567         Likewise.
12568
12569 2017-04-05  Pedro Alves  <palves@redhat.com>
12570
12571         * python/python-internal.h (gdb_PyGetSetDef): New type.
12572         * python/py-block.c (block_object_getset)
12573         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12574         * python/py-event.c (event_object_getset)
12575         (finish_breakpoint_object_getset): Likewise.
12576         * python/py-inferior.c (inferior_object_getset): Likewise.
12577         * python/py-infthread.c (thread_object_getset): Likewise.
12578         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12579         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12580         * python/py-objfile.c (objfile_getset): Likewise.
12581         * python/py-progspace.c (pspace_getset): Likewise.
12582         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12583         Likewise.
12584         * python/py-record.c (recpy_record_getset): Likewise.
12585         * python/py-symbol.c (symbol_object_getset): Likewise.
12586         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12587         Likewise.
12588         * python/py-type.c (type_object_getset, field_object_getset):
12589         Likewise.
12590         * python/py-value.c (value_object_getset): Likewise.
12591
12592 2017-04-05  Pedro Alves  <palves@redhat.com>
12593
12594         * python/python-internal.h (gdb_PyObject_CallMethod)
12595         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12596         New functions.
12597         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12598         (PySys_GetObject, PySys_SetPath): New macros.
12599
12600 2017-04-05  Pedro Alves  <palves@redhat.com>
12601
12602         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12603         info_osdata_command.
12604         * osdata.c (info_osdata_command): Rename to ...
12605         (info_osdata): ... this.  Constify 'type' parameter, and remove
12606         the 'from_tty' parameter.  Accept NULL TYPE.
12607         (info_osdata_command): New function.
12608         * osdata.h (info_osdata_command): Remove declaration.
12609         (info_osdata): New declaration.
12610
12611 2017-04-05  Pedro Alves  <palves@redhat.com>
12612
12613         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12614         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12615         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12616         parameter.
12617         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12618         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12619         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12620         parameter.
12621         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12622         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12623         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12624         (mi_cmd_file_list_exec_source_files)
12625         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12626         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12627         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12628         parameter.
12629         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12630         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12631         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12632         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12633         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12634         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12635         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12636         'command' parameter.
12637         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12638         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12639         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12640         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12641         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12642         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12643         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12644         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12645         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12646         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12647         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12648         parameter.
12649         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12650         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12651         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12652         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12653         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12654         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12655         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12656         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12657         (mi_cmd_data_list_changed_registers)
12658         (mi_cmd_data_write_register_values)
12659         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12660         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12661         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12662         (mi_cmd_list_features, mi_cmd_list_target_features)
12663         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12664         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12665         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12666         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12667         (mi_cmd_trace_frame_collected): Constify 'command'
12668         parameter.
12669         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12670         'command' parameter.
12671
12672 2017-04-05  Pedro Alves  <palves@redhat.com>
12673
12674         * ada-lang.c (ada_completer_word_break_characters): Now a const
12675         array.
12676         (ada_get_gdb_completer_word_break_characters): Constify.
12677         * completer.c (gdb_completer_command_word_break_characters)
12678         (gdb_completer_file_name_break_characters)
12679         (gdb_completer_quote_characters): Now const arrays.
12680         (get_gdb_completer_quote_characters): Constify.
12681         (set_rl_completer_word_break_characters): New function.
12682         (set_gdb_completion_word_break_characters)
12683         (complete_line_internal): Use it.
12684         * completer.h (get_gdb_completer_quote_characters): Constify.
12685         (set_rl_completer_word_break_characters): Declare.
12686         * f-lang.c (f_word_break_characters): Constify.
12687         * language.c (default_word_break_characters): Constify.
12688         * language.h (language_defn::la_word_break_characters): Constify.
12689         (default_word_break_characters): Constify.
12690         * top.c (init_main): Use set_rl_completer_word_break_characters.
12691
12692 2017-04-05  Pedro Alves  <palves@redhat.com>
12693
12694         * aix-thread.c (aix_thread_pid_to_str)
12695         (aix_thread_extra_thread_info): Constify.
12696         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12697         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12698         (bsd_uthread_pid_to_str): Constify.
12699         * corelow.c (core_pid_to_str): Constify.
12700         * darwin-nat.c (darwin_pid_to_str): Constify.
12701         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12702         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12703         Constify.
12704         * gnu-nat.c (gnu_pid_to_str): Constify.
12705         * go32-nat.c (go32_pid_to_str): Constify.
12706         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12707         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12708         * inferior.c (inferior_pid_to_str): Constify.
12709         * linux-nat.c (linux_nat_pid_to_str): Constify.
12710         * linux-tdep.c (linux_core_pid_to_str): Constify.
12711         * linux-thread-db.c (thread_db_pid_to_str)
12712         (thread_db_extra_thread_info): Constify.
12713         * nto-tdep.c (nto_extra_thread_info): Constify.
12714         * nto-tdep.h (nto_extra_thread_info): Constify.
12715         * obsd-nat.c (obsd_pid_to_str): Constify.
12716         * procfs.c (procfs_pid_to_str): Constify.
12717         * ravenscar-thread.c (ravenscar_extra_thread_info)
12718         (ravenscar_pid_to_str): Constify.
12719         * remote-sim.c (gdbsim_pid_to_str): Constify.
12720         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12721         Constify.
12722         * sol-thread.c (solaris_pid_to_str): Constify.
12723         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12724         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12725         * target.c (default_pid_to_str, target_pid_to_str)
12726         (normal_pid_to_str, default_pid_to_str): Constify.
12727         * target.h (target_ops::to_pid_to_str)
12728         (target_ops::to_extra_thread_info): Constify.
12729         (target_pid_to_str, normal_pid_to_str): Constify.
12730         * windows-nat.c (windows_pid_to_str): Constify.
12731         * gdbarch.sh (core_pid_to_str): Constify.
12732         * target-delegates.c: Regenerate.
12733         * gdbarch.h, gdbarch.c: Regenerate.
12734
12735 2017-04-05  Pedro Alves  <palves@redhat.com>
12736
12737         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12738         the memory of the temporary warning_pre_print override.
12739         * utils.c (warning_pre_print): Constify.
12740         * utils.h (warning_pre_print): Constify.
12741
12742 2017-04-05  Pedro Alves  <palves@redhat.com>
12743
12744         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12745         (shell_command): New function.
12746         (make_command): Use std::string.
12747         (init_cli_cmds): Register shell_command instead of shell_escape.
12748
12749 2017-04-05  Pedro Alves  <palves@redhat.com>
12750
12751         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12752         * tracepoint.c (default_collect): Don't initialize.
12753
12754 2017-04-05  Pedro Alves  <palves@redhat.com>
12755
12756         * macroexp.c (macro_buffer::shared): Now a bool.
12757         (init_buffer): Update.
12758         (init_shared_buffer): Constify 'addr' parameter.
12759         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12760         casts.
12761
12762 2017-04-05  Pedro Alves  <palves@redhat.com>
12763
12764         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12765         * disasm.c (set_disassembler_options): Constify local.
12766         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12767
12768 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12769
12770         PR gdb/21352
12771         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12772         option.
12773
12774 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12775
12776         * frame.c (frame_unwind_register_unsigned): Call
12777         frame_unwind_register_value.
12778
12779 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12780
12781         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12782         Use gdb_test_multiple, and don't match anchor.
12783
12784 2017-04-05  Pedro Alves  <palves@redhat.com>
12785
12786         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12787         (Write After Approval): Remove Simon Marchi.
12788
12789 2017-04-05  Pedro Alves  <palves@redhat.com>
12790
12791         * common/gdb_optional.h (optional::optional): Make constexpr and
12792         initialize m_dummy.
12793
12794 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12795
12796         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12797         (amd64fbsd_jmp_buf_reg_offset): Remove.
12798         (amd64fbsd_supply_uthread): Remove function.
12799         (amd64fbsd_collect_uthread): Remove function.
12800         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12801         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12802         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12803         (fbsd-nat.c): Update comment.
12804         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12805         (i386fbsd_jmp_buf_reg_offset): Remove.
12806         (i386fbsd_supply_uthread): Remove function.
12807         (i386fbsd_collect_uthread): Remove function.
12808         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12809
12810 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12811
12812         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12813         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12814         * NEWS: Mention that support for FreeBSD/alpha was removed.
12815         * alpha-fbsd-tdep.c: Delete file.
12816         * config/alpha/fbsd.mh: Delete file.
12817         * configure.host: Delete alpha*-*-freebsd* and
12818         alpha*-*-kfreebsd*-gnu.
12819         * configure.tgt: Delete alpha*-*-freebsd* and
12820         alpha*-*-kfreebsd*-gnu.
12821
12822 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12823
12824         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12825         amd64bsd_store_inferior_registers): Use ptid from regcache.
12826
12827 2017-04-04  Pedro Alves  <palves@redhat.com>
12828
12829         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12830         data fields, make them private and add "m_" prefixes.
12831         (lnp_state_machine::lnp_state_machine): New ctor.
12832         (record_line, check_line_address, handle_set_discriminator)
12833         (handle_set_address, handle_advance_pc, handle_special_opcode)
12834         (handle_advance_line, handle_set_file, handle_negate_stmt)
12835         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12836         (end_sequence, advance_line): New methods.
12837         (m_gdbarch, m_record_lines_p): New fields.
12838         (lnp_reader_state): Delete.
12839         (dwarf_record_line): Rename to ...
12840         (lnp_state_machine::record_line): ... adjust.
12841         (init_lnp_state_machine): Delete.
12842         (lnp_state_machine::lnp_state_machine): New.
12843         (check_line_address): Rename to ...
12844         (lnp_state_machine::check_line_address): This.
12845         (dwarf_decode_lines_1): Remove reference to "reader_state".
12846         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12847         State machine internal state manipulation moved to
12848         lnp_state_machine methods.
12849
12850 2017-04-04  Pedro Alves  <palves@redhat.com>
12851
12852         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12853         unittests/offset-type-selftests.c.
12854         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12855         * common/offset-type.h: New file.
12856         * common/preprocessor.h: New file.
12857         * common/traits.h: New file.
12858         * common/valid-expr.h: New file.
12859         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12860         sect_offset and cu_offset strong typedefs throughout.
12861         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12862         typedefs throughout.
12863         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12864         sect_offset and cu_offset strong typedefs throughout.
12865         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12866         typedefs throughout.
12867         * gdbtypes.h: Include "common/offset-type.h".
12868         (cu_offset): Now an offset type (strong typedef) instead of a
12869         struct.
12870         (sect_offset): Likewise.
12871         (union call_site_parameter_u): Rename "param_offset" field to
12872         "param_cu_off".
12873         * unittests/offset-type-selftests.c: New file.
12874
12875 2017-04-04  Pedro Alves  <palves@redhat.com>
12876
12877         * common/underlying.h: New file.
12878         * dwarf2read.c: Include "common/gdb_optional.h" and
12879         "common/underlying.h".
12880         (dir_index, file_name_index): New types.
12881         (file_entry): Use them.
12882         (file_entry::include): Use to_underlying.
12883         (line_header::add_file_name): Use dir_index.
12884         (read_formatted_entries): Use gdb::optional.  Read form before
12885         writting to file_entry.
12886         (dwarf_decode_line_header): Use dir_index.
12887         (lnp_state_machine::current_file): Use to_underlying.
12888         (lnp_state_machine::file): Change type to file_name_index.
12889         (dwarf_record_line): Use to_underlying.
12890         (init_lnp_state_machine): Use file_name_index.
12891         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12892
12893 2017-04-04  Pedro Alves  <palves@redhat.com>
12894
12895         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12896         operator bool, has_value and get methods.
12897
12898 2017-04-04  Pedro Alves  <palves@redhat.com>
12899
12900         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12901         fields.
12902         (line_header): Initialize all data fields.  Change type of
12903         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12904         Change type of include_dirs to std::vector<const char *>.  Remove
12905         num_include_dirs, include_dirs_size.  Change type of file_names to
12906         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12907         (line_header::line_header): New.
12908         (line_header::add_include_dir, line_header::add_file_name): New
12909         methods.
12910         (line_header::include_dir_at): Remove NULL check.
12911         (line_header::file_name_at): Add const overload.
12912         (line_header_up): New unique_ptr typedef.
12913         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12914         std::vector.  Remove free_line_header call.
12915         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12916         free_line_header call.
12917         (free_cu_line_header): Delete.
12918         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12919         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12920         Adjust to use std::vector.
12921         (free_line_header): Delete.
12922         (free_line_header_voidp): Use delete.
12923         (add_include_dir): Replace with ...
12924         (line_header::add_include_dir): ... this method.  Use std::vector.
12925         (add_file_name): Replace with ...
12926         (line_header::add_file_name): ... this method.  Use std::vector.
12927         (add_include_dir_stub): Delete.
12928         (read_formatted_entries): Remove memset.
12929         (dwarf_decode_line_header): Return a line_header_up instead of a
12930         raw pointer.  Remove cleanup handling.  Pass lambdas to
12931         read_formatted_entries.  Adjust to use line_header methods.
12932         (dwarf_decode_lines_1): Adjust to use line_header methods.
12933         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12934         use std::vector.
12935
12936 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12937
12938         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12939         instead of struct ptid.
12940
12941 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12942
12943         * frame.c (get_frame_register_bytes): Unwind using value.
12944         (put_frame_register_bytes): Likewise.
12945
12946 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12947
12948         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12949         aggregate-like.
12950
12951 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12952
12953         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12954
12955 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12956
12957         * gdbthread.h (struct thread_info): Declare constructor and
12958         destructor.  Add some in-class member initializers.
12959         * thread.c (free_thread): Remove.
12960         (init_thread_list): Call delete instead of free_thread.
12961         (new_thread): Call thread_info constructor.
12962         (thread_info::thread_info): New function.
12963         (thread_info::~thread_info): New function.
12964         (delete_thread_1): Call delete instead of free_thread.
12965         (make_cleanup_restore_current_thread): Move tp and frame to
12966         inner block.
12967
12968 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12969
12970         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12971         (arc_skip_prologue): Likewise.
12972         (arc_make_frame_cache): Likewise.
12973         (arc_pv_get_operand): New function.
12974         (arc_is_in_prologue): Likewise.
12975         (arc_analyze_prologue): Likewise.
12976         (arc_print_frame_cache): Likewise.
12977         (MAX_PROLOGUE_LENGTH): New constant.
12978
12979 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12980
12981         * configure.tgt: Add arc-insn.o.
12982         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12983         (dump_arc_instruction_command): New function.
12984         (arc_fprintf_disasm): Likewise.
12985         (arc_disassemble_info): Likewise.
12986         (arc_insn_get_operand_value): Likewise.
12987         (arc_insn_get_operand_value_signed): Likewise.
12988         (arc_insn_get_memory_base_reg): Likewise.
12989         (arc_insn_get_memory_offset): Likewise.
12990         (arc_insn_get_branch_target): Likewise.
12991         (arc_insn_dump): Likewise.
12992         (arc_insn_get_linear_next_pc): Likewise.
12993         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12994         (arc_disassemble_info): Likewise.
12995         (arc_insn_get_branch_target): Likewise.
12996         (arc_insn_get_linear_next_pc): Likewise.
12997         * NEWS: Mention new "maint print arc arc-instruction".
12998
12999 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13000
13001         * arc-tdep (maintenance_print_arc_list): New variable.
13002         (maintenance_print_arc_command): New function.
13003
13004 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13005
13006         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13007         Add "limm" and "reserved".
13008         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13009         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13010         * arc-tdep.h (arc_regnum): Likewise.
13011
13012 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13013
13014         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13015         for THREADPTR register.
13016         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13017         register.
13018         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13019         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13020         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13021
13022 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13023
13024         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13025         registers above gdbarch_num_regs (gdbarch) as privileged in
13026         call0 ABI.
13027
13028 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13029
13030         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13031         for a single specified register or for all registers in
13032         a0_base..a0_base + C0_NREGS range.
13033         (supply_gregset_reg): Call regcache_raw_supply for a single
13034         specified register or for all registers in a0_base..a0_base +
13035         C0_NREGS range.
13036
13037 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13038
13039         * arch/xtensa.h (C0_NREGS): Add definition.
13040         * xtensa-tdep.c (C0_NREGS): Remove definition.
13041
13042 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13043
13044         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13045         Drop xtensa_default_isa initialization.
13046         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13047
13048 2017-03-27  Pedro Alves  <palves@redhat.com>
13049
13050         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13051         (file_entry::include_dir): New method.
13052         (line_header::include_dir_at, line_header::file_name_at): New
13053         methods.
13054         (setup_type_unit_groups, setup_type_unit_groups)
13055         (psymtab_include_file_name): Simplify using the new methods.
13056         (lnp_state_machine) <the_line_header>: New field.
13057         <file>: Add comment.
13058         (lnp_state_machine::current_file): New method.
13059         (dwarf_record_line): Simplify using the new methods.
13060         (init_lnp_state_machine): Initialize the "the_line_header" field.
13061         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13062         Simplify using the new methods.
13063
13064 2017-03-27  Pedro Alves  <palves@redhat.com>
13065
13066         * cp-name-parser.y (make_empty): Delete.
13067         (demangler_special, nested_name, ptr_operator, array_indicator)
13068         (direct_declarator, declarator_1): Use fill_comp instead of
13069         make_empty.
13070
13071 2017-03-27  Pedro Alves  <palves@redhat.com>
13072
13073         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13074         to ATTRIBUTE_PRINTF.
13075         * solib-target.c (library_list_start_list): Print "string" not
13076         "version".
13077         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13078         gdb_xml_error call.
13079
13080 2017-03-27  Pedro Alves  <palves@redhat.com>
13081
13082         * dwarf2read.c (struct file_and_directory): New.
13083         (dwarf2_get_dwz_file): Adjust to use std::string.
13084         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13085         (find_file_and_directory): Adjust to return a file_and_directory
13086         object.
13087         (read_file_scope): Adjust to use file_and_directory.  Remove
13088         make_cleanup/do_cleanups calls.
13089         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13090         make_cleanup/do_cleanups calls.
13091         * python/python.c (do_start_initialization): Adjust to ldirname
13092         returning a std::string.
13093         * utils.c (ldirname): Now returns a std::string.
13094         * utils.h (ldirname): Change return type to std::string.
13095         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13096         returning a std::string.
13097         * xml-tdesc.c (file_read_description_xml): Likewise.
13098
13099 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13100
13101         * regcache.c (regcache_debug_print_register): New function.
13102         * regcache.h (regcache_debug_print_register): New declaration.
13103         * target.c (debug_print_register): Remove.
13104         (target_fetch_registers): Call regcache_debug_print_register.
13105         (target_store_registers): Likewise.
13106
13107 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13108
13109         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13110         reference beyond the 'lh->include_dirs' array before accessing to
13111         it.
13112         (psymtab_include_file_name): Likewise.
13113         (dwarf_decode_lines_1): Likewise.
13114         (dwarf_decode_lines): Likewise.
13115         (file_file_name): Likewise.
13116
13117 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13118
13119         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13120         inferior_ptid.
13121         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13122         ps_lsetfpregs): Likewise.
13123         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13124         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13125         ps_lsetfpregs): Likewise.
13126         * target.c (target_fetch_registers, target_store_registers):
13127         Remove asserts.
13128
13129 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13130
13131         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13132
13133 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13134
13135         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13136         (_initialize_aarch64_tdep): Register it.
13137         (aarch64_record_load_store): Handle PRFM instruction.
13138         (aarch64_process_record_test): New function.
13139
13140 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13141
13142         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13143         indentation.
13144
13145 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13146
13147         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13148
13149 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13150
13151         python/python.c (do_start_initialization): Fix memory leak.
13152
13153 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13154
13155         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13156         using get_ptrace_pid.
13157         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13158         inferior_ptid.
13159         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13160         inferior_ptid instead of pid.
13161
13162 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13163
13164         * aarch64-tdep.c: Wrap locally used classes in anonymous
13165         namespace.
13166         * arm-tdep.c: Likewise.
13167         * linespec.c: Likewise.
13168         * ui-out.c: Likewise.
13169
13170 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13171
13172         PR gdb/19637
13173         * python/lib/gdb/printer/bound_registers.py: Import sys.
13174
13175 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13176
13177         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13178         windows_thread_info parameter and use it instead of
13179         current_thread.
13180         (windows_fetch_inferior_registers): Don't set current_thread,
13181         pass the thread to do_windows_fetch_inferior_registers.  Use
13182         ptid from regcache instead of inferior_ptid.
13183         (do_windows_store_inferior_registers): Add windows_thread_info
13184         parameter and use it instead of current_thread.
13185         (windows_store_inferior_registers): Don't set current_thread,
13186         pass the thread to do_windows_store_inferior_registers.  Use
13187         ptid from regcache instead of inferior_ptid.
13188
13189 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13190
13191         * ser-mingw.c (ser_windows_raw): Remove reference to
13192         struct serial::current_timeout.
13193
13194 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13195
13196         PR tdep/20928
13197         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13198         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13199         (sparc64_fsr_type): Fix %fsr decoding.
13200
13201 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13202
13203         * python/py-record-btrace.c (btpy_insn_data): Change return type
13204         for Python 2.
13205
13206 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13207
13208         * spu-linux-nat.c (spu_fetch_inferior_registers,
13209         spu_store_inferior_registers): Use ptid from regcache, set and
13210         restore inferior_ptid.
13211         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13212         Likewise.
13213
13214 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13215
13216         * i386-linux-nat.c (fetch_register, store_register,
13217         i386_linux_fetch_inferior_registers,
13218         i386_linux_store_inferior_registers): Use ptid from regcache.
13219         * ia64-linux-nat.c (ia64_linux_fetch_register,
13220         ia64_linux_store_register): Likewise.
13221         * inf-ptrace.c (inf_ptrace_fetch_register,
13222         inf_ptrace_store_register): Likewise.
13223         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13224         m32r_linux_store_inferior_registers): Likewise.
13225         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13226         m68kbsd_store_inferior_registers): Likewise.
13227         * m68k-linux-nat.c (fetch_register, store_register,
13228         m68k_linux_fetch_inferior_registers,
13229         m68k_linux_store_inferior_registers): Likewise.
13230         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13231         m88kbsd_store_inferior_registers): Likewise.
13232         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13233         mips_fbsd_store_inferior_registers): Likewise.
13234         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13235         mips64_linux_regsets_store_registers): Likewise.
13236         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13237         mipsnbsd_store_inferior_registers): Likewise.
13238         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13239         mips64obsd_store_inferior_registers): Likewise.
13240         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13241         Likewise.
13242         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13243         ppcfbsd_store_inferior_registers): Likewise.
13244         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13245         ppc_linux_store_inferior_registers): Likewise.
13246         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13247         ppcnbsd_store_inferior_registers): Likewise.
13248         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13249         ppcobsd_store_registers): Likewise.
13250         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13251         Likewise.
13252         * ravenscar-thread.c (ravenscar_fetch_registers,
13253         ravenscar_store_registers, ravenscar_prepare_to_store):
13254         Likewise.
13255         * record-btrace.c (record_btrace_fetch_registers,
13256         record_btrace_store_registers, record_btrace_prepare_to_store):
13257         Likewise.
13258         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13259         Lookup inferior using ptid from regcache, instead of
13260         current_inferior.
13261         * remote.c (remote_fetch_registers, remote_store_registers): Use
13262         ptid from regcache.
13263         * rs6000-nat.c (fetch_register, store_register): Likewise.
13264         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13265         s390_linux_store_inferior_registers): Likewise.
13266         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13267         shnbsd_store_inferior_registers): Likewise.
13268         * sol-thread.c (sol_thread_fetch_registers,
13269         sol_thread_store_registers): Likewise.
13270         * sparc-nat.c (sparc_fetch_inferior_registers,
13271         sparc_store_inferior_registers): Likewise.
13272         * tilegx-linux-nat.c (fetch_inferior_registers,
13273         store_inferior_registers): Likewise.
13274         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13275         vaxbsd_store_inferior_registers): Likewise.
13276         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13277         store_xtregs): Likewise.
13278
13279 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13280
13281         PR gdb/14441
13282         * NEWS: Mention support for rvalue references in GDB and python.
13283         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13284         supports both lvalue and rvalue references.
13285
13286 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13287
13288         PR gdb/14441
13289         * gdbtypes.c (rank_one_type): Implement overloading
13290         resolution rules regarding rvalue references.
13291
13292 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13293
13294         PR gdb/14441
13295         * aarch64-tdep.c (aarch64_type_align)
13296         (aarch64_extract_return_value, aarch64_store_return_value): Change
13297         lvalue reference type checks to general reference type checks.
13298         * amd64-tdep.c (amd64_classify): Likewise.
13299         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13300         Likewise.
13301         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13302         (arm_store_return_value): Likewise.
13303         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13304         * c-typeprint.c (c_print_type): Likewise.
13305         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13306         (cplus_number_of_children, cplus_describe_child): Likewise.
13307         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13308         * completer.c (expression_completer): Likewise.
13309         * cp-support.c (make_symbol_overload_list_adl_namespace):
13310         Likewise.
13311         * darwin-nat-info.c (info_mach_region_command): Likewise.
13312         * dwarf2loc.c (entry_data_value_coerce_ref)
13313         (value_of_dwarf_reg_entry): Likewise.
13314         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13315         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13316         Likewise.
13317         * findvar.c (extract_typed_address, store_typed_address):
13318         Likewise.
13319         * gdbtypes.c (rank_one_type): Likewise.
13320         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13321         * infcall.c (value_arg_coerce): Likewise.
13322         * language.c (pointer_type): Likewise.
13323         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13324         Likewise.
13325         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13326         * mn10300-tdep.c (mn10300_type_align): Likewise.
13327         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13328         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13329         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13330         Likewise.
13331         * printcmd.c (print_formatted, x_command): Likewise.
13332         * python/py-type.c (typy_get_composite, typy_template_argument):
13333         Likewise.
13334         * python/py-value.c (valpy_referenced_value)
13335         (valpy_get_dynamic_type, value_has_field): Likewise.
13336         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13337         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13338         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13339         * spu-tdep.c (spu_scalar_value_p): Likewise.
13340         * symtab.c (lookup_symbol_aux): Likewise.
13341         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13342         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13343         Likewise.
13344         * valops.c (value_cast_pointers, value_cast)
13345         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13346         (value_struct_elt, value_struct_elt_bitpos)
13347         (value_find_oload_method_list, find_overload_match)
13348         (value_rtti_indirect_type): Likewise.
13349         * valprint.c (val_print_scalar_type_p, generic_val_print):
13350         Likewise.
13351         * value.c (value_actual_type, value_as_address, unpack_long)
13352         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13353         (coerce_ref): Likewise.
13354         * varobj.c (varobj_get_value_type): Likewise.
13355
13356 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13357
13358         PR gdb/14441
13359         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13360         table of constants.
13361         * python/lib/gdb/command/explore.py: Support exploring values
13362         of rvalue reference types.
13363         * python/lib/gdb/types.py: Implement get_basic_type() for
13364         rvalue reference types.
13365         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13366         constant.
13367         * python/py-value.c (valpy_getitem): Add an rvalue reference
13368         check.
13369         (valpy_reference_value): Add new parameter "refcode".
13370         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13371         New wrappers for valpy_reference_value().
13372         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13373         (gdbpy_invoke_xmethod): Likewise.
13374
13375 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13376
13377         PR gdb/14441
13378         * dwarf2read.c (process_die, read_type_die_1): Handle the
13379         DW_TAG_rvalue_reference_type DIE.
13380         (read_tag_reference_type): Add new parameter "refcode".
13381
13382 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13383
13384         PR gdb/14441
13385         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13386         (c_type_print_modifier, c_type_print_varspec_suffix)
13387         (c_type_print_base): Support printing rvalue reference types.
13388         * c-valprint.c (c_val_print, c_value_print): Support printing
13389         rvalue reference values.
13390
13391 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13392
13393         PR gdb/14441
13394         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13395         typename.
13396         * cp-support.c (replace_typedefs): Handle
13397         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13398         * python/py-type.c (typy_lookup_type): Likewise.
13399
13400 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13401
13402         PR gdb/14441
13403         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13404         * parse.c (insert_type): Change assert statement.
13405         (follow_types): Handle rvalue reference types.
13406         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13407         constant.
13408
13409 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13410
13411         PR gdb/14441
13412         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13413         value_ref() interface.
13414         * c-valprint.c (c_value_print): Likewise.
13415         * infcall.c (value_arg_coerce): Likewise.
13416         * python/py-value.c (valpy_reference_value): Likewise.
13417         * valops.c (value_cast, value_reinterpret_cast)
13418         (value_dynamic_cast, typecmp): Likewise.
13419         (value_ref): Parameterize by kind of return value reference type.
13420         * value.h (value_ref): Add new parameter "refcode".
13421
13422 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13423
13424         PR gdb/14441
13425         * dwarf2read.c (read_tag_reference_type): Use
13426         lookup_lvalue_reference_type() instead of lookup_reference_type().
13427         * eval.c (evaluate_subexp_standard): Likewise.
13428         * f-exp.y: Likewise.
13429         * gdbtypes.c (make_reference_type, lookup_reference_type):
13430         Generalize with rvalue reference types.
13431         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13432         convenience wrappers for lookup_reference_type().
13433         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13434         reference kind parameter.
13435         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13436         wrappers for lookup_reference_type().
13437         * guile/scm-type.c (gdbscm_type_reference): Use
13438         lookup_lvalue_reference_type() instead of lookup_reference_type().
13439         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13440         * parse.c (follow_types): Likewise.
13441         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13442         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13443         Likewise.
13444         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13445         (gdbpy_invoke_xmethod): Likewise.
13446         * stabsread.c: Provide extra argument to make_reference_type()
13447         call.
13448         * valops.c (value_ref, value_rtti_indirect_type): Use
13449         lookup_lvalue_reference_type() instead of lookup_reference_type().
13450
13451 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13452
13453         PR gdb/14441
13454         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13455         (TYPE_IS_REFERENCE): New macro.
13456         (struct type): Add rvalue_reference_type field.
13457         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13458
13459 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13460
13461         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13462         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13463         New function definition.
13464         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13465         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13466         New function declaration.
13467         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13468         * mi/mi-interp.h: New file.
13469         * solib.c (info_sharedlibrary_command): Replace for loop with
13470         ALL_SO_LIBS macro
13471         * solib.h (update_solib_list): New function declaration.
13472         (so_list_head): Move macro.
13473         * solist.h (ALL_SO_LIBS): New macro.
13474
13475 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13476
13477         * infcmd.c (post_create_inferior): Remove unused argument in
13478         call to solib_add.
13479         * remote.c (remote_start_remote): Likewise.
13480         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13481         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13482         (enable_break): Likewise.
13483         * solib.c (update_solib_list): Remove unused target argument
13484         and its documentation.
13485         (solib_add): Remove unused target argument.  Remove unused
13486         argument in call to update_solib_list.
13487         (info_sharedlibrary_command): Remove unused argument in call
13488         to update_solib_list.
13489         (sharedlibrary_command): Remove unused argument in call to
13490         solib_add.
13491         (handle_solib_event): Likewise.
13492         (reload_shared_libraries): Likewise.
13493         * solib.h (solib_add): Remove unused target argument.
13494
13495 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13496
13497         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13498         (s390_displaced_step_fixup): Cover relative branches with the
13499         default fixup handling.  This fixes lack of support for some
13500         relative branch instructions.
13501
13502 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13503
13504         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13505         ptid from regcache.
13506
13507 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13508
13509         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13510         i386_darwin_store_inferior_registers): Use ptid from regcache.
13511
13512 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13513
13514         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13515         i386bsd_store_inferior_registers): Use ptid from regcache.
13516
13517 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13518
13519         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13520         hppaobsd_store_registers): Use ptid from regcache.
13521
13522 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13523
13524         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13525         hppanbsd_store_registers): Use ptid from regcache.
13526
13527 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13528
13529         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13530         from regcache.  Use get_ptrace_pid.
13531
13532 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13533
13534         * corelow.c (get_core_register_section): Use ptid from regcache,
13535         update doc.
13536
13537 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13538
13539         * bsd-uthread.c (bsd_uthread_fetch_registers,
13540         bsd_uthread_store_registers): Use ptid from regcache, set and
13541         restore inferior_ptid.
13542
13543 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13544
13545         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13546         fetch_fp_regs, store_register, store_regs, store_fp_register,
13547         store_fp_regs): Use ptid from regcache.
13548
13549 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13550
13551         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13552         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13553         store_vfp_regs): Use ptid from regcache.
13554
13555 2017-03-17  Pedro Alves  <palves@redhat.com>
13556
13557         PR remote/21188
13558         * ser-base.c (ser_base_wait_for): Add comment.
13559         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13560         version.
13561         * ser-unix.c (hardwire_raw): Remove reference to
13562         scb->current_timeout.
13563         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13564         (hardwire_ops): Install ser_base_readchar instead of
13565         hardwire_readchar.
13566         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13567         Remove fields.
13568
13569 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13570
13571         PR gdb/19637
13572         * python/lib/gdb/printer/bound_registers.py: Add support for
13573         Python 3.
13574
13575 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13576
13577         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13578         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13579         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13580         byte_offset to subobj_byte_offset.  Fix the handling of
13581         DWARF_VALUE_STACK on big-endian targets when coming via an
13582         implicit pointer.
13583         (dwarf2_evaluate_loc_desc): Adjust call to
13584         dwarf2_evaluate_loc_desc_full.
13585         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13586         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13587
13588 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13589
13590         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13591         and REVSH instructions.
13592
13593 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13594
13595         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13596         (arm_record_test): Declare.
13597         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13598         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13599         align with the manual.
13600         (thumb_record_misc): Adjust the code order to align with the
13601         manual.
13602         (thumb2_record_decode_insn_handler): Fix instruction matching.
13603         (instruction_reader_thumb): New class.
13604         (arm_record_test): New function.
13605
13606 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13607
13608         * arm-tdep.c (abstract_memory_reader): New class.
13609         (instruction_reader): New class.
13610         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13611         (decode_insn): Likewise.
13612
13613 2017-03-16  Doug Evans  <dje@google.com>
13614
13615         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13616         member.  Change type of TYPE member to SCM.  All uses updated.
13617         (lsscm_make_lazy_string_smob): Add assert.
13618         (lsscm_make_lazy_string): Flag bad length values.
13619         (lsscm_elt_type): New function.
13620         (gdbscm_lazy_string_to_value): Rewrite to use
13621         lsscm_safe_lazy_string_to_value.
13622         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13623         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13624         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13625         in incoming type.
13626         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13627         * guile/scm-type.c (tyscm_scm_to_type): New function.
13628
13629 2017-03-15  Doug Evans  <dje@google.com>
13630
13631         PR python/17728, python/18439, python/18779
13632         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13633         member.  Change type of TYPE member to PyObject *.  All uses updated.
13634         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13635         (gdbpy_create_lazy_string_object): Flag bad length values.
13636         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13637         Handle typedefs in incoming type.
13638         (stpy_lazy_string_elt_type): New function.
13639         (gdbpy_extract_lazy_string): Call it.
13640         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13641         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13642         typedefs in incoming type.
13643
13644 2017-03-16  Doug Evans  <dje@google.com>
13645
13646         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13647         * guile/scm-type.c (tyscm_scm_to_type): New function.
13648
13649 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13650
13651         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13652         "ULONGEST" for "skip".
13653
13654 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13655
13656         PR gdb/21220
13657         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13658         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13659         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13660         over ptrace peek/poke until end of buffer or error.
13661
13662 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13663
13664         * parse.c (length_of_subexp): Make static.
13665         * parser-defs.h (length_of_subexp): Remove.
13666
13667 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13668
13669         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13670         as well.
13671
13672 2017-03-14  Pedro Alves  <palves@redhat.com>
13673
13674         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13675         (main): Use std::unique_ptr.  Remove calls to
13676         cp_demangled_name_parse_free.
13677
13678 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13679
13680         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13681         alphabsd_store_inferior_registers): Use regcache->ptid instead
13682         of inferior_ptid.
13683
13684 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13685
13686         * aix-thread.c (aix_thread_fetch_registers,
13687         aix_thread_store_registers): Use regcache->ptid instead of
13688         inferior_ptid.
13689
13690 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13691
13692         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13693         store_gregs_to_thread, fetch_fpregs_from_thread,
13694         store_fpregs_to_thread): Use regcache->ptid instead of
13695         inferior_ptid.
13696
13697 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13698
13699         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13700         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13701         instead of inferior_ptid.
13702
13703 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13704
13705         * target.c (target_fetch_registers, target_store_registers): Add
13706         assert.
13707
13708 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13709
13710         * regcache.h (regcache_get_ptid): New function.
13711         * regcache.c (regcache_get_ptid): New function.
13712
13713 2017-03-13  Mark Wielaard  <mark@klomp.org>
13714
13715         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13716
13717 2017-03-10  Keith Seitz  <keiths@redhat.com>
13718
13719         PR c++/8218
13720         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13721
13722 2017-03-08  Pedro Alves  <palves@redhat.com>
13723
13724         PR gdb/18360
13725         * infrun.c (start_step_over, do_target_resume, resume)
13726         (restart_threads): Assert we're not resuming a thread that is
13727         meant to be stopped.
13728         (infrun_thread_stop_requested_callback): Delete.
13729         (infrun_thread_stop_requested): If the thread is internally
13730         stopped, queue a pending stop event and clear the thread's
13731         inline-frame state.
13732         (handle_stop_requested): New function.
13733         (handle_syscall_event, handle_inferior_event_1): Use
13734         handle_stop_requested.
13735         (handle_stop_requested): New function.
13736         (handle_signal_stop): Set the thread's stop_signal here instead of
13737         at caller.
13738         (finish_step_over): Clear step over info unconditionally.
13739         (handle_signal_stop): If the user had interrupted the event
13740         thread, consider the stop a random signal.
13741         (handle_signal_stop) <signal arrived while stepping over
13742         breakpoint>: Don't restart threads here.
13743         (stop_waiting): Don't clear step-over info here.
13744
13745 2017-03-08  Pedro Alves  <palves@redhat.com>
13746
13747         PR 21206
13748         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13749         goes to argument 2, not 1.
13750
13751 2017-03-08  Pedro Alves  <palves@redhat.com>
13752
13753         PR cli/21218
13754         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13755         display_gdb_prompt.
13756         (command_line_input): Add comment.
13757
13758 2017-03-08  Pedro Alves  <palves@redhat.com>
13759
13760         PR tui/21216
13761         * tui/tui-file.c (tui_file::write): New.
13762         * tui/tui-file.h (tui_file): Override "write".
13763         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13764         factored out from ...
13765         (tui_puts): ... here.
13766         (tui_putc): Use them.
13767         (tui_write): New function.
13768         * tui/tui-io.h (tui_write): Declare.
13769
13770 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13771
13772         * Makefile.in (SFILES): Replace "environ.c" with
13773         "common/environ.c".
13774         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13775         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13776         to...
13777         * common/environ.c: ... here.
13778         * environ.h: Moved to...
13779         * common/environ.h: ... here.
13780
13781 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13782
13783         * gdbarch.sh (pstring_ptr): New static function.
13784         (gdbarch_disassembler_options): Use it.
13785         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13786         not valid_disassembler_option->name.
13787         * gdbarch.c: Regenerate.
13788
13789 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13790
13791         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13792
13793 2017-03-07  Pedro Alves  <palves@redhat.com>
13794
13795         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13796
13797 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13798
13799         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13800         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13801         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13802         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13803
13804 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13805
13806         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13807
13808 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13809
13810         * remote.c (remote_add_target_side_commands): Use range-based
13811         for loop.
13812
13813 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13814
13815         PR gdb/21165
13816         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13817         value is lazy.
13818         * valprint.c (common_val_print): Likewise.
13819
13820 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13821
13822         * NEWS: Mention new set/show disassembler-options commands.
13823         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13824         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13825         (prospective_options): New static variable.
13826         (gdb_disassembler::gdb_disassembler): Initialize
13827         m_di.disassembler_options.
13828         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13829         (get_disassembler_options): New function.
13830         (set_disassembler_options): Likewise.
13831         (set_disassembler_options_sfunc): Likewise.
13832         (show_disassembler_options_sfunc): Likewise.
13833         (disassembler_options_completer): Likewise.
13834         (_initialize_disasm): Likewise.
13835         * disasm.h (get_disassembler_options): New prototype.
13836         (set_disassembler_options): Likewise.
13837         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13838         (gdbarch_verify_disassembler_options): Likewise.
13839         * gdbarch.c: Regenerate.
13840         * gdbarch.h: Likewise.
13841         * arm-tdep.c (num_disassembly_options): Delete.
13842         (set_disassembly_style): Likewise.
13843         (arm_disassembler_options): New static variable.
13844         (set_disassembly_style_sfunc): Convert short style name into long
13845         option name.  Call set_disassembler_options.
13846         (show_disassembly_style_sfunc): New function.
13847         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13848         set_gdbarch_verify_disassembler_options.
13849         (_initialize_arm_tdep): Delete regnames variable and update callers.
13850         (arm_disassembler_options): Initialize.
13851         (disasm_options): New variable.
13852         (num_disassembly_options): Rename from this...
13853         (num_disassembly_styles): ...to this.  Compute by scanning through
13854         disasm_options.
13855         (valid_disassembly_styles): Initialize using disasm_options.
13856         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13857         set_arm_regname_option.
13858         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13859         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13860         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13861         set_gdbarch_verify_disassembler_options.
13862         * s390-tdep.c (s390_disassembler_options): New static variable.
13863         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13864         set_gdbarch_verify_disassembler_options.
13865
13866 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13867
13868         * remote.c (remote_add_target_side_condition): Remove "struct"
13869         keyword from range-based for loop.
13870
13871 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13872
13873         * remote.c (remote_add_target_side_condition): Use range-based
13874         for loop.  Update comment.
13875
13876 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13877
13878         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13879
13880 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13881
13882         * regcache.c (regcache_raw_update): New function.
13883         (regcache_raw_read): Move code to regcache_raw_update.
13884         * regcache.h (regcache_raw_update): New declaration.
13885         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13886
13887 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13888
13889         * dwarf2read.c (create_debug_type_hash_table): Initialize
13890         header.signature and header.type_offset_in_tu.
13891
13892 2017-02-24  Pedro Alves  <palves@redhat.com>
13893
13894         * symtab.c (make_file_symbol_completion_list_1): Use
13895         add_symtab_completions.
13896
13897 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13898
13899         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13900
13901 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13902
13903         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13904         I386_MAX_REGISTER_SIZE.
13905         (i386_pseudo_register_write): Likewise.
13906         (i386_process_record): Likewise.
13907         * i387-tdep.c (i387_supply_xsave): Likewise.
13908         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13909         (store_register): Likewise.
13910
13911 2017-02-23  Pedro Alves  <palves@redhat.com>
13912
13913         * ada-lang.c: Include "common/function-view.h".
13914         (ada_iterate_over_symbols): Adjust to use function_view as
13915         callback type.
13916         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13917         (ada_make_symbol_completion_list): Use a lambda.
13918         (ada_exc_search_name_matches): Delete.
13919         (name_matches_regex): New.
13920         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13921         * compile/compile-c-support.c: Include "common/function-view.h".
13922         (print_one_macro): Change prototype to accept a ui_file pointer.
13923         (write_macro_definitions): Use a lambda.
13924         * dwarf2read.c: Include "common/function-view.h".
13925         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13926         (dw2_expand_symtabs_matching): Adjust to use function_view as
13927         callback type.
13928         * language.h: Include "common/function-view.h".
13929         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13930         function_view as callback type.
13931         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13932         * linespec.c: Include "common/function-view.h".
13933         (collect_info::add_symbol): New method.
13934         (struct symbol_and_data_callback, iterate_inline_only, struct
13935         symbol_matcher_data, iterate_name_matcher): Delete.
13936         (iterate_over_all_matching_symtabs): Adjust to use function_view
13937         as callback type and lambdas.
13938         (iterate_over_file_blocks): Adjust to use function_view as
13939         callback type.
13940         (decode_compound_collector): Now a class with private fields.
13941         (decode_compound_collector::release_symbols): New method.
13942         (collect_one_symbol): Rename to...
13943         (decode_compound_collector::operator()): ... this and adjust.
13944         (lookup_prefix_sym): decode_compound_collector construction bits
13945         move to decode_compound_collector ctor.  Pass the
13946         decode_compound_collector object directly as callback.  Remove
13947         cleanups and use decode_compound_collector::release_symbols
13948         instead.
13949         (symtab_collector): Now a class with private fields.
13950         (symtab_collector::release_symtabs): New method.
13951         (add_symtabs_to_list): Rename to...
13952         (symtab_collector::operator()): ... this and adjust.
13953         (collect_symtabs_from_filename): symtab_collector construction
13954         bits move to symtab_collector ctor.  Pass the symtab_collector
13955         object directly as callback.  Remove cleanups and use
13956         symtab_collector::release_symtabs instead.
13957         (collect_symbols): Delete.
13958         (add_matching_symbols_to_info): Use lambdas.
13959         * macrocmd.c (print_macro_callback): Delete.
13960         (info_macro_command): Use a lambda.
13961         (info_macros_command): Pass print_macro_definition as callable
13962         directly.
13963         (print_one_macro): Remove 'ignore' parameter.
13964         (macro_list_command): Adjust.
13965         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13966         (macro_for_each_data::user_data): Delete field.
13967         (foreach_macro): Adjust to call the function_view.
13968         (macro_for_each): Adjust to use function_view as callback type.
13969         (foreach_macro_in_scope): Adjust to call the function_view.
13970         (macro_for_each_in_scope): Adjust to use function_view as callback
13971         type.
13972         * macrotab.h: Include "common/function-view.h".
13973         (macro_callback_fn): Declare a prototype instead of a pointer.
13974         Remove "user_data" parameter.
13975         (macro_for_each, macro_for_each_in_scope): Adjust to use
13976         function_view as callback type.
13977         * psymtab.c (partial_map_expand_apply)
13978         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13979         Adjust to use function_view as callback type and to return bool.
13980         (psym_expand_symtabs_matching): Adjust to use function_view as
13981         callback types.
13982         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13983         to use function_view as callback type and to return bool.
13984         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13985         callback types.
13986         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13987         as callback types.
13988         * symfile.h: Include "common/function-view.h".
13989         (expand_symtabs_file_matcher_ftype)
13990         (expand_symtabs_symbol_matcher_ftype)
13991         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13992         return bool.
13993         (quick_symbol_functions::map_symtabs_matching_filename)
13994         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13995         function_view as callback type and return bool.
13996         (expand_symtabs_matching): Adjust to use function_view as callback
13997         type.
13998         (maintenance_expand_name_matcher)
13999         (maintenance_expand_file_matcher): Delete.
14000         (maintenance_expand_symtabs): Use lambdas.
14001         * symtab.c (iterate_over_some_symtabs): Adjust to use
14002         function_view as callback types and return bool.
14003         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
14004         of a cleanup.
14005         (lookup_symtab_callback): Delete.
14006         (lookup_symtab): Use a lambda.
14007         (iterate_over_symbols): Adjust to use function_view as callback
14008         type.
14009         (struct search_symbols_data, search_symbols_file_matches)
14010         (search_symbols_name_matches): Delete.
14011         (search_symbols): Use a pair of lambdas.
14012         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14013         (symtab_expansion_callback): Delete.
14014         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14015         * symtab.h: Include "common/function-view.h".
14016         (iterate_over_some_symtabs): Adjust to use function_view as
14017         callback type and return bool.
14018         (iterate_over_symtabs): Adjust to use function_view as callback
14019         type.
14020         (symbol_found_callback_ftype): Remove 'data' parameter and return
14021         bool.
14022         (iterate_over_symbols): Adjust to use function_view as callback
14023         type.
14024
14025 2017-02-23  Pedro Alves  <palves@redhat.com>
14026
14027         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14028         (%.o) <unittests/%.c>: New pattern.
14029         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14030         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14031         * common/function-view.h: New file.
14032         * unittests/function-view-selftests.c: New file.
14033         * configure: Regenerate.
14034
14035 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14036
14037         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14038         inferior_ptid.
14039         * go32-nat.c (go32_thread_alive): Likewise.
14040
14041 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14042
14043         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14044         delete.
14045
14046 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14047
14048         * varobj.c (varobj_clear_saved_item): Use delete instead of
14049         xfree.
14050         (update_dynamic_varobj_children): Likewise.
14051
14052 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14053
14054         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14055
14056 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14057
14058         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14059         m_enum_value to 0 in default constructor.
14060
14061 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14062
14063         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14064         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14065         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14066         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14067         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14068         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14069         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14070         IS_STORE_CONDITIONAL_INSN.
14071
14072 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14073
14074         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14075
14076 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14077
14078         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14079
14080 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14081
14082         * dwarf2read.c (skip_one_die, read_attribute_value)
14083         (dwarf2_const_value_attr, dump_die_shallow)
14084         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14085         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14086
14087 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14088
14089         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14090         (dwarf_parse_macro_header): Accept DWARF version 5.
14091         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14092
14093 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14094
14095         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14096         DW_AT_GNU_*.
14097         * common/common-exceptions.h (enum errors): Likewise.
14098         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14099         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14100         (dwarf_expr_context::execute_stack_op): Likewise.
14101         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14102         Likewise.
14103         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14104         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14105         (show_entry_values_debug, call_site_to_target_addr)
14106         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14107         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14108         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14109         (value_of_dwarf_block_entry, indirect_pieced_value)
14110         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14111         (disassemble_dwarf_expression): Likewise.
14112         * dwarf2read.c (process_die, inherit_abstract_dies)
14113         (read_call_site_scope): Likewise.
14114         * gdbtypes.h (struct func_type, struct call_site_parameter)
14115         (struct call_site): Likewise.
14116         * stack.c (read_frame_arg): Likewise.
14117         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14118
14119 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14120
14121         * defs.h (read_unsigned_leb128): New declaration.
14122         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14123         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14124         (dwarf2_find_location_expression): Call also
14125         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14126         * dwarf2loc.h (dwarf2_version): New declaration.
14127         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14128         rnglists.
14129         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14130         .debug_rnglists.
14131         (struct dwop_section_names): Add loclists_dwo.
14132         (dwop_section_names): Add .debug_loclists.dwo.
14133         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14134         (struct dwarf2_per_cu_data): Add dwarf_version.
14135         (struct dwo_sections): Add loclists.
14136         (struct attr_abbrev): Add implicit_const.
14137         (read_indirect_line_string): New declaration.
14138         (read_unsigned_leb128): Delete declaration.
14139         (rcuh_kind): New definition.
14140         (read_and_check_comp_unit_head): Change parameter
14141         is_debug_types_section to section_kind.
14142         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14143         (read_comp_unit_head): Change parameter abfd to section, add parameter
14144         section_kind.  Handle DWARF-5.
14145         (error_check_comp_unit_head): Accept also DWARF version 5.
14146         (read_and_check_comp_unit_head): Change parameter
14147         is_debug_types_section to section_kind.
14148         (read_and_check_type_unit_head): Delete function.
14149         (read_abbrev_offset): Handle DWARF-5.
14150         (create_debug_type_hash_table): Add parameter section_kind.  Process
14151         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14152         comp_unit_head.
14153         (create_debug_types_hash_table): Update create_debug_type_hash_table
14154         caller.
14155         (create_all_type_units): Call create_debug_type_hash_table.
14156         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14157         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14158         caller.
14159         (skip_one_die): Handle DW_FORM_implicit_const.
14160         (dwarf2_rnglists_process): New function.
14161         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14162         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14163         (read_attribute_value): Handle DW_FORM_implicit_const,
14164         DW_FORM_line_strp.
14165         (read_attribute): Handle DW_FORM_implicit_const.
14166         (read_indirect_string_at_offset_from): New function from
14167         read_indirect_string_at_offset.
14168         (read_indirect_string_at_offset): Call
14169         read_indirect_string_at_offset_from.
14170         (read_indirect_line_string_at_offset): New function.
14171         (read_indirect_string): New function comment.
14172         (read_indirect_line_string): New function.
14173         (read_unsigned_leb128): Make it global.
14174         (dwarf2_string_attr): Handle DWARF-5.
14175         (add_include_dir_stub, read_formatted_entries): New functions.
14176         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14177         Handle DWARF-5.
14178         (per_cu_header_read_in): Update read_comp_unit_head caller.
14179         (dwarf2_version): New function.
14180         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14181         rnglists.
14182         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14183         fields.
14184
14185 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14186
14187         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14188
14189 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14190
14191         * dwarf2read.c (dwarf2_ranges_process): New function from
14192         dwarf2_ranges_read.
14193         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14194         dwarf2_ranges_process.
14195
14196 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14197
14198         * dwarf2read.c (create_debug_type_hash_table): New function from
14199         create_debug_types_hash_table.
14200         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14201         (create_all_type_units, open_and_init_dwo_file): Update
14202         create_debug_types_hash_table callers.
14203
14204 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14205
14206         PR gdb/16188
14207         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14208         refer to 'ap', not 'args'.
14209
14210 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14211             Pedro Alves  <palves@redhat.com>
14212
14213         PR gdb/16188
14214         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14215         calls succeeded.
14216         * fork-child.c (trace_start_error): New function.
14217         (trace_start_error_with_name): Likewise.
14218         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14219         * inf-ptrace.c (inf_ptrace_me): Likewise.
14220         * inferior.h (trace_start_error): New prototype.
14221         (trace_start_error_with_name): Likewise.
14222
14223 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14224
14225         PR gdb/21164
14226         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14227         NULL before using it.
14228         * symmisc.c (maintenance_print_symbols): Likewise.
14229         (maintenance_print_msymbols): Likewise.
14230
14231 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14232
14233         * NEWS: Add record Python bindings entry.
14234
14235 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14236
14237         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14238         py-record-full.o.
14239         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14240         * python/py-record-btrace.c, python/py-record-btrace.h,
14241         python/py-record-full.c, python/py-record-full.h: New file.
14242         * python/py-record.c: Add include for py-record-btrace.h and
14243         py-record-full.h.
14244         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14245         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14246         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14247         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14248         New definition.
14249         (gdbpy_initialize_btrace): New export.
14250         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14251
14252 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14253
14254         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14255         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14256         * python/py-record.c: New file.
14257         * python/python-internal.h (gdbpy_start_recording,
14258         gdbpy_current_recording, gdpy_stop_recording,
14259         gdbpy_initialize_record): New export.
14260         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14261         (python_GdbMethods): Add gdbpy_start_recording,
14262         gdbpy_current_recording and gdbpy_stop_recording.
14263
14264 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14265
14266         * record-btrace.c (record_btrace_record_method): New function.
14267         (init_record_btrace_ops): Initialize to_record_method.
14268         * record-full.c (record_full_record_method): New function.
14269         (init_record_full_ops, init_record_full_core_ops): Add
14270         record_full_record_method.
14271         * record.h (enum record_method): New enum.
14272         * target-debug.h (target_debug_print_enum_record_method: New define.
14273         * target-delegates.c: Regenerate.
14274         * target.c (target_record_method): New function.
14275         * target.h: Include record.h.
14276         (struct target_ops) <to_record_method>: New field.
14277         (target_record_method): New export.
14278
14279 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14280
14281         * record.h (record_start, record_stop): New export.
14282         * record.c (record_start, record_stop): New function.
14283
14284 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14285
14286         * btrace.c (btrace_fetch): Copy function call segments pointer
14287         into a vector.
14288         (btrace_clear): Clear the vector.
14289         (btrace_find_insn_by_number): Use binary search to find the correct
14290         function call segment.
14291         * btrace.h (brace_fun_p): New typedef.
14292         (struct btrace_thread_info) <functions>: New field.
14293
14294 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14295
14296         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14297         * btrace.c (btrace_decode_error): ... here.  New function.
14298         * btrace.h (btrace_decode_error): New export.
14299
14300 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14301
14302         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14303         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14304         btrace_find_insn_by_number): Remove special case for gaps.
14305         * btrace.h (btrace_insn_get_error): New export.
14306         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14307         * record-btrace.c (btrace_insn_history): Print number for gaps.
14308         (record_btrace_info, record_btrace_goto): Handle gaps.
14309
14310 2017-02-14  Tom Tromey  <tom@tromey.com>
14311
14312         PR python/13598:
14313         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14314         event.
14315         * python/py-evts.c (gdbpy_initialize_py_events): Add
14316         before_prompt registry.
14317         * python/py-events.h (events_object) <before_prompt>: New field.
14318
14319 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14320
14321         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14322
14323 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14324
14325         * symfile (_initialize_symfile): Add usage text to the load command's
14326         help text.
14327
14328 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14329
14330         * utils.c (defaulted_query): Don't query on secondary UIs.
14331
14332 2017-02-10  Tom Tromey  <tom@tromey.com>
14333
14334         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14335
14336 2017-02-10  Tom Tromey  <tom@tromey.com>
14337
14338         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14339         "cleanup" local.
14340         * python/py-type.c (typy_legacy_template_argument): Remove
14341         unnecessary "cleanup" local.
14342
14343 2017-02-10  Tom Tromey  <tom@tromey.com>
14344
14345         * python/python.c (do_start_initialization): New function, from
14346         _initialize_python.
14347         (_initialize_python): Call do_start_initialization.
14348         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14349         goto.
14350
14351 2017-02-10  Tom Tromey  <tom@tromey.com>
14352
14353         * python/py-prettyprint.c (pretty_print_one_value): Use
14354         gdbpy_ref.
14355
14356 2017-02-10  Tom Tromey  <tom@tromey.com>
14357
14358         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14359         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14360         gdbpy_ref.
14361         * python/py-type.c (field_new): Use gdbpy_ref.
14362         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14363         gdbpy_ref.
14364         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14365         (py_free_pspace): Likewise.
14366         (pspace_to_pspace_object): Likewise.
14367         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14368         (py_free_objfile): Likewise.
14369         (objfile_to_objfile_object): Likewise.
14370         * python/py-inferior.c (delete_thread_object): Use
14371         gdbpy_ref.
14372         (infpy_read_memory): Likewise.
14373         (py_free_inferior): Likewise.
14374         * python/py-evtregistry.c (create_eventregistry_object): Use
14375         gdbpy_ref.
14376         * python/py-event.c (create_event_object): Use gdbpy_ref.
14377
14378 2017-02-10  Tom Tromey  <tom@tromey.com>
14379
14380         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14381         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14382         used.
14383         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14384         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14385         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14386         python/py-framefilter.c, python/py-function.c,
14387         python/py-inferior.c, python/py-infevents.c,
14388         python/py-linetable.c, python/py-newobjfileevent.c,
14389         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14390         python/py-signalevent.c, python/py-stopevent.c,
14391         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14392         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14393         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14394         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14395
14396 2017-02-10  Tom Tromey  <tom@tromey.com>
14397
14398         * ui-out.h (ui_out_emit_type): New class.
14399         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14400         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14401         and ui_out_emit_tuple.
14402         (enumerate_locals): Likewise.
14403         (py_mi_print_variables, py_print_locals, py_print_args): Use
14404         ui_out_emit_list.
14405         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14406         ui_out_emit_list.
14407         * common/gdb_optional.h: New file.
14408
14409 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14410
14411         * MAINTAINERS (Write After Approval): Update my e-mail address.
14412
14413 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14414
14415         PR gdb/21122
14416         * breakpoint.c (_initialize_breakpoint): Update the help description
14417         of the 'commands' command to indicate that it takes a list argument.
14418
14419 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14420
14421         * interps.c (current_interp_set_logging): Remove "return".
14422
14423 2017-02-09  Gary Benson  <gbenson@redhat.com>
14424
14425         * symtab.c (add_symtab_completions): Prevent NULL pointer
14426         dereference.
14427
14428 2017-02-08  Pedro Alves  <palves@redhat.com>
14429
14430         * interps.c (interp::interp): Remove reference to quiet_p.
14431         (interp_set): Make static.  Remove dead "Switching to" output
14432         code.
14433         (interp_quiet_p, interp_set_quiet): Delete.
14434         (interpreter_exec_cmd): Don't set the interpreter quiet.
14435         * interps.h (interp_quiet_p): Make static.
14436         (class interp) <quiet_p>: Remove field
14437
14438 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14439
14440         * cli/cli-decode.c (find_command_name_length): Make it extern.
14441         * cli/cli-decode.h (find_command_name_length): Declare.
14442         * cli/cli-script.c (command_name_equals, line_first_arg):
14443         New functions.
14444         (process_next_line): Use cli-decode to parse command names.
14445         (build_command_line): Make args a constant pointer.
14446
14447 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14448
14449         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14450         Remove case-insensitive search.
14451
14452 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14453
14454         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14455         at the end of the line.  Avoids an ARI warning.
14456
14457 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14458
14459         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14460         rdseed instructions.
14461         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14462
14463 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14464
14465         PR tdep/20936
14466         Provide and use sparc32 and sparc64 target description XML files.
14467         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14468         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14469         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14470         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14471         * features/sparc/sparc32-solaris.xml: New file.
14472         * features/sparc/sparc64-solaris.xml: New file.
14473         * features/sparc/sparc32-solaris.c: Generated.
14474         * features/sparc/sparc64-solaris.c: Generated.
14475         * sparc-tdep.h: Account for differences in target descriptions.
14476         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14477         (sparc32_register_type): Use target provided registers.
14478         (validate_tdesc_registers): New function.
14479         (sparc32_gdbarch_init): Use tdesc_has_registers.
14480         Set pseudoregister functions.
14481         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14482         (sparc64_register_type): Use target provided registers.
14483         (sparc64_init_abi): Set pseudoregister functions.
14484
14485 2017-02-03  Tom Tromey  <tom@tromey.com>
14486
14487         PR rust/21097:
14488         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14489         with a single member.
14490
14491 2017-02-03  Pedro Alves  <palves@redhat.com>
14492
14493         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14494         (cli_interp_base::~cli_interp_base): New.
14495         (cli_interp): New struct.
14496         (as_cli_interp): Cast the interp itself to cli_interp.
14497         (cli_interpreter_pre_command_loop): Rename to ...
14498         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14499         parameter.
14500         (cli_interpreter_init): Rename to ...
14501         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14502         boolean.  Make extern.
14503         (cli_interpreter_resume): Rename to ...
14504         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14505         extern.
14506         (cli_interpreter_suspend): Rename to ...
14507         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14508         extern.
14509         (cli_interpreter_exec): Rename to ...
14510         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14511         extern.
14512         (cli_interpreter_supports_command_editing): Rename to ...
14513         (cli_interp_base::supports_command_editing): ... this.  Remove
14514         'interp' parameter.  Make extern.
14515         (cli_ui_out): Rename to ...
14516         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14517         Make extern.
14518         (cli_set_logging): Rename to ...
14519         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14520         parameter.  Make extern.
14521         (cli_interp_procs): Delete.
14522         (cli_interp_factory): Adjust to use "new".
14523         * cli/cli-interp.h: Include "interps.h".
14524         (struct cli_interp_base): New struct.
14525         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14526         (interp_new): Delete.
14527         (interp::interp, interp::~interp): New.
14528         (interp_set): Use bool, and return void.  Assume the interpreter
14529         has suspend, init and resume methods, and that the all return
14530         void.
14531         (set_top_level_interpreter): interp_set returns void.
14532         (interp_ui_out): Adapt.
14533         (current_interp_set_logging): Adapt.
14534         (interp_data): Delete.
14535         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14536         (interp_exec): Adapt.
14537         (top_level_interpreter_data): Delete.
14538         * interps.h (interp_init_ftype, interp_resume_ftype)
14539         (interp_suspend_ftype, interp_exec_ftype)
14540         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14541         (class interp): New.
14542         (interp_new): Delete.
14543         (interp_set): Now returns void.  Use bool.
14544         (interp_data, top_level_interpreter_data): Delete.
14545         * mi/mi-common.h: Include interps.h.
14546         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14547         init, resume, suspect, exec, interp_ui_out, set_logging and
14548         pre_command_loop methods.
14549         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14550         (mi_interpreter_init): Rename to ...
14551         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14552         bool, return void and make extern.  Adjust.
14553         (mi_interpreter_resume): ... Rename to ...
14554         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14555         return void and make extern.  Adjust.
14556         (mi_interpreter_suspend): ... Rename to ...
14557         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14558         return void and make extern.  Adjust.
14559         (mi_interpreter_exec): ... Rename to ...
14560         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14561         extern.  Adjust.
14562         (mi_interpreter_pre_command_loop): ... Rename to ...
14563         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14564         parameter and make extern.
14565         (mi_on_normal_stop_1): Adjust.
14566         (mi_ui_out): Rename to ...
14567         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14568         parameter and make extern.  Adjust.
14569         (mi_set_logging): Rename to ...
14570         (mi_interp::set_logging): ... this.  Remove the 'interp'
14571         parameter and make extern.  Adjust.
14572         (mi_interp_procs): Delete.
14573         (mi_interp_factory): Adjust to use 'new'.
14574         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14575         (mi_print_exception, mi_execute_command, mi_load_progress):
14576         Adjust.
14577         * tui/tui-interp.c (tui_interp): New class.
14578         (as_tui_interp): Return a tui_interp pointer.
14579         (tui_on_normal_stop, tui_on_signal_received)
14580         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14581         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14582         to use interp::interp_ui_out.
14583         (tui_init): Rename to ...
14584         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14585         bool, return void and make extern.  Adjust.
14586         (tui_resume): Rename to ...
14587         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14588         return void and make extern.  Adjust.
14589         (tui_suspend): Rename to ...
14590         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14591         return void and make extern.  Adjust.
14592         (tui_ui_out): Rename to ...
14593         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14594         parameter, and make extern.  Adjust.
14595         (tui_exec): Rename to ...
14596         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14597         make extern.
14598         (tui_interp_procs): Delete.
14599         (tui_interp_factory): Use "new".
14600
14601 2017-02-02  Tom Tromey  <tom@tromey.com>
14602
14603         * rust-exp.y (ends_raw_string, space_then_number)
14604         (rust_identifier_start_p): Return bool.
14605         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14606         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14607         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14608         (rust_chartype_p): Return bool.
14609         (val_print_struct, rust_print_struct_def, rust_print_type):
14610         Update.
14611         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14612         Return bool.
14613
14614 2017-02-02  Tom Tromey  <tom@tromey.com>
14615
14616         * rust-lang.c: Reindent.
14617
14618 2017-02-02  Tom Tromey  <tom@tromey.com>
14619
14620         * rust-lang.h (rust_crate_for_block): Update.
14621         * rust-lang.c (rust_crate_for_block): Return std::string.
14622         (rust_get_disr_info): Use std:;string, not
14623         gdb::unique_xmalloc_ptr.
14624         * rust-exp.y (crate_name): Update.
14625
14626 2017-02-02  Pedro Alves  <palves@redhat.com>
14627
14628         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14629         field out of gdb_disassembler_test and make it static.
14630
14631 2017-02-02  Pedro Alves  <palves@redhat.com>
14632
14633         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14634         mi1_interp and mi_interp fields.
14635
14636 2017-02-02  Pedro Alves  <palves@redhat.com>
14637
14638         * cli/cli-interp.c (struct saved_output_files, saved_output):
14639         Moved from cli/cli-logging.c.
14640         (cli_set_logging): New function.
14641         (cli_interp_procs): Install cli_set_logging.
14642         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14643         Declare.
14644         * cli/cli-logging.c (struct saved_output_files, saved_output):
14645         Moved to cli/cli-interp.c.
14646         (pop_output_files): Don't save outputs here.
14647         (make_logging_output): New function.
14648         (handle_redirections): Don't build tee nor save previous outputs
14649         here.
14650         * interps.c (current_interp_set_logging): Change prototype.
14651         Assume there's always a set_logging_proc method installed.
14652         * interps.h (interp_set_logging_ftype): Change prototype.
14653         (current_interp_set_logging): Change prototype and adjust comment.
14654         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14655         use make_logging_output.
14656         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14657 2017-02-02  Pedro Alves  <palves@redhat.com>
14658
14659         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14660         from ...
14661         (set_logging_overwrite): ... here.
14662         (logging_no_redirect_file): Delete.
14663         (set_logging_redirect): Don't handle redirection on the fly.
14664         Instead warn that "logging off" / "logging on" is necessary.
14665         (pop_output_files): Delete references to logging_no_redirect_file.
14666         (show_logging_command): Always speak in terms of what will happen
14667         once logging is reenabled.
14668
14669 2017-02-02  Pedro Alves  <palves@redhat.com>
14670
14671         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14672
14673 2017-02-02  Pedro Alves  <palves@redhat.com>
14674
14675         * disasm.c (gdb_pretty_print_insn): Rename to ...
14676         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14677         Remove gdbarch parameter.  Adapt to clear the object's buffers
14678         instead of allocating new buffers, and to print using the object's
14679         gdb_disassembler instead of calling gdb_print_insn.
14680         (dump_insns): Use gdb_pretty_print_disassembler.
14681         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14682         (gdb_pretty_print_disassembler): New class.
14683         * record-btrace.c (btrace_insn_history): Use
14684         gdb_pretty_print_disassembler.
14685
14686 2017-02-02  Pedro Alves  <palves@redhat.com>
14687
14688         * ada-lang.c (type_as_string): Use string_file.
14689         * ada-valprint.c (ada_print_floating): Use string_file.
14690         * ada-varobj.c (ada_varobj_scalar_image)
14691         (ada_varobj_get_value_image): Use string_file.
14692         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14693         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14694         * breakpoint.c (update_inserted_breakpoint_locations)
14695         (insert_breakpoint_locations, reattach_breakpoints)
14696         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14697         (print_it_watchpoint): Use string_file.
14698         (save_breakpoints): Use stdio_file.
14699         * c-exp.y (oper): Use string_file.
14700         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14701         tee_file.
14702         (pop_output_files): Use delete.
14703         (handle_redirections): Use stdio_file and tee_file.
14704         * cli/cli-setshow.c (do_show_command): Use string_file.
14705         * compile/compile-c-support.c (c_compute_program): Use
14706         string_file.
14707         * compile/compile-c-symbols.c (generate_vla_size): Take a
14708         'string_file &' instead of a 'ui_file *'.
14709         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14710         of a 'ui_file *'.  Use string_file.
14711         (generate_c_for_variable_locations): Take a 'string_file &'
14712         instead of a 'ui_file *'.
14713         * compile/compile-internal.h (generate_c_for_for_one_variable):
14714         Take a 'string_file &' instead of a 'ui_file *'.
14715         * compile/compile-loc2c.c (push, pushf, unary, binary)
14716         (print_label, pushf_register_address, pushf_register)
14717         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14718         'ui_file *'.  Adjust.
14719         * compile/compile.c (compile_to_object): Use string_file.
14720         * compile/compile.h (compile_dwarf_expr_to_c)
14721         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14722         'ui_file *'.
14723         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14724         (replace_typedefs_qualified_name): Use string_file and
14725         obstack_copy0.
14726         * disasm.c (gdb_pretty_print_insn): Use string_file.
14727         (gdb_disassembly): Adjust reference the null_stream global.
14728         (do_ui_file_delete): Delete.
14729         (gdb_insn_length): Use null_stream.
14730         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14731         * dwarf2loc.c (dwarf2_compile_property_to_c)
14732         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14733         'string_file &' instead of a 'ui_file *'.
14734         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14735         * dwarf2read.c (do_ui_file_peek_last): Delete.
14736         (dwarf2_compute_name): Use string_file.
14737         * event-top.c (gdb_setup_readline): Use stdio_file.
14738         * gdbarch.sh (verify_gdbarch): Use string_file.
14739         * gdbtypes.c (safe_parse_type): Use null_stream.
14740         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14741         string_file.
14742         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14743         'string_file *' instead of a 'ui_file *'.
14744         (gdbscm_arch_disassemble): Use string_file.
14745         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14746         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14747         inherits from ui_file.
14748         (ioscm_file_port_delete, ioscm_file_port_rewind)
14749         (ioscm_file_port_put): Delete.
14750         (ioscm_file_port_write): Rename to ...
14751         (ioscm_file_port::write): ... this.  Remove file_port_magic
14752         checks.
14753         (ioscm_file_port_new): Delete.
14754         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14755         ui_file_up.
14756         * guile/scm-type.c (tyscm_type_name): Use string_file.
14757         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14758         Use string_file.
14759         * infcmd.c (print_return_value_1): Use string_file.
14760         * infrun.c (print_target_wait_results): Use string_file.
14761         * language.c (add_language): Use string_file.
14762         * location.c (explicit_to_string_internal): Use string_file.
14763         * main.c (captured_main_1): Use null_file.
14764         * maint.c (maintenance_print_architecture): Use stdio_file.
14765         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14766         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14767         event_channel>: Change type to mi_console_file pointer.
14768         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14769         (mi_console_file_delete): Delete.
14770         (struct mi_console_file): Delete.
14771         (mi_console_file_magic): Delete.
14772         (mi_console_file_new): Delete.
14773         (mi_console_file::mi_console_file): New.
14774         (mi_console_file_delete): Delete.
14775         (mi_console_file_fputs): Delete.
14776         (mi_console_file::write): New.
14777         (mi_console_raw_packet): Delete.
14778         (mi_console_file::flush): New.
14779         (mi_console_file_flush): Delete.
14780         (mi_console_set_raw): Rename to ...
14781         (mi_console_file::set_raw): ... this.
14782         * mi/mi-console.h (class mi_console_file): New class.
14783         (mi_console_file_new, mi_console_set_raw): Delete.
14784         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14785         (mi_set_logging): Use delete and tee_file.  Adjust.
14786         * mi/mi-main.c (output_register): Use string_file.
14787         (mi_cmd_data_evaluate_expression): Use string_file.
14788         (mi_cmd_data_read_memory): Use string_file.
14789         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14790         * mi/mi-out.c (mi_ui_out::main_stream): New.
14791         (mi_ui_out::rewind): Use main_stream and
14792         string_file.
14793         (mi_ui_out::put): Use main_stream and string_file.
14794         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14795         Allocate a 'string_file' instead.
14796         (mi_out_new): Don't allocate a mem_fileopen stream here.
14797         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14798         (mi_ui_out::main_stream): Declare method.
14799         * printcmd.c (eval_command): Use string_file.
14800         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14801         * python/py-arch.c (archpy_disassemble): Use string_file.
14802         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14803         * python/py-frame.c (frapy_str): Use string_file.
14804         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14805         Use string_file.
14806         * python/py-type.c (typy_str): Use string_file.
14807         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14808         * python/py-value.c (valpy_str): Use string_file.
14809         * record-btrace.c (btrace_insn_history): Use string_file.
14810         * regcache.c (regcache_print): Use stdio_file.
14811         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14812         * remote.c (escape_buffer): Use string_file.
14813         * rust-lang.c (rust_get_disr_info): Use string_file.
14814         * serial.c (serial_open_ops_1): Use stdio_file.
14815         (do_serial_close): Use delete.
14816         * stack.c (print_frame_arg): Use string_file.
14817         (print_frame_args): Remove local mem_fileopen stream, not used.
14818         (print_frame): Use string_file.
14819         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14820         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14821         Take a 'string_file *' instead of a 'ui_file *'.
14822         * top.c (new_ui): Use stdio_file and stderr_file.
14823         (free_ui): Use delete.
14824         (execute_command_to_string): Use string_file.
14825         (quit_confirm): Use string_file.
14826         * tracepoint.c (collection_list::append_exp): Use string_file.
14827         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14828         * tui/tui-file.c: Don't include "ui-file.h".
14829         (enum streamtype, struct tui_stream): Delete.
14830         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14831         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14832         (tui_file::tui_file): New method.
14833         (tui_file_fputs): Delete.
14834         (tui_file_get_strbuf): Delete.
14835         (tui_file::puts): New method.
14836         (tui_file_adjust_strbuf): Delete.
14837         (tui_file_flush): Delete.
14838         (tui_file::flush): New method.
14839         * tui/tui-file.h: Tweak intro comment.
14840         Include ui-file.h.
14841         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14842         (tui_file_adjust_strbuf): Delete declarations.
14843         (class tui_file): New class.
14844         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14845         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14846         (tui_register_format): Use string_stream.
14847         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14848         (tui_get_function_from_frame): Use string_file.
14849         * typeprint.c (type_to_string): Use string_file.
14850         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14851         (null_stream): New global.
14852         (ui_file_delete): Delete.
14853         (ui_file::ui_file): New.
14854         (null_file_isatty): Delete.
14855         (ui_file::~ui_file): New.
14856         (null_file_rewind): Delete.
14857         (ui_file::printf): New.
14858         (null_file_put): Delete.
14859         (null_file_flush): Delete.
14860         (ui_file::putstr): New.
14861         (null_file_write): Delete.
14862         (ui_file::putstrn): New.
14863         (null_file_read): Delete.
14864         (ui_file::putc): New.
14865         (null_file_fputs): Delete.
14866         (null_file_write_async_safe): Delete.
14867         (ui_file::vprintf): New.
14868         (null_file_delete): Delete.
14869         (null_file::write): New.
14870         (null_file_fseek): Delete.
14871         (null_file::puts): New.
14872         (ui_file_data): Delete.
14873         (null_file::write_async_safe): New.
14874         (gdb_flush, ui_file_isatty): Adjust.
14875         (ui_file_put, ui_file_rewind): Delete.
14876         (ui_file_write): Adjust.
14877         (ui_file_write_for_put): Delete.
14878         (ui_file_write_async_safe, ui_file_read): Adjust.
14879         (ui_file_fseek): Delete.
14880         (fputs_unfiltered): Adjust.
14881         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14882         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14883         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14884         (set_ui_file_data): Delete.
14885         (string_file::~string_file, string_file::write)
14886         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14887         (do_ui_file_as_string, ui_file_as_string): Delete.
14888         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14889         (struct mem_file): Delete.
14890         (mem_file_new): Delete.
14891         (stdio_file::stdio_file): New.
14892         (mem_file_delete): Delete.
14893         (stdio_file::stdio_file): New.
14894         (mem_fileopen): Delete.
14895         (stdio_file::~stdio_file): New.
14896         (mem_file_rewind): Delete.
14897         (stdio_file::set_stream): New.
14898         (mem_file_put): Delete.
14899         (stdio_file::open): New.
14900         (mem_file_write): Delete.
14901         (stdio_file_magic, struct stdio_file): Delete.
14902         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14903         (stdio_file::flush): New.
14904         (stdio_file_read): Rename to ...
14905         (stdio_file::read): ... this.  Adjust.
14906         (stdio_file_write): Rename to ...
14907         (stdio_file::write): ... this.  Adjust.
14908         (stdio_file_write_async_safe): Rename to ...
14909         (stdio_file::write_async_safe) ... this.  Adjust.
14910         (stdio_file_fputs): Rename to ...
14911         (stdio_file::puts) ... this.  Adjust.
14912         (stdio_file_isatty): Delete.
14913         (stdio_file_fseek): Delete.
14914         (stdio_file::isatty): New.
14915         (stderr_file_write): Rename to ...
14916         (stderr_file::write) ... this.  Adjust.
14917         (stderr_file_fputs): Rename to ...
14918         (stderr_file::puts) ... this.  Adjust.
14919         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14920         (stderr_file::stderr_file): New.
14921         (tee_file_magic): Delete.
14922         (struct tee_file): Delete.
14923         (tee_file::tee_file): New.
14924         (tee_file_new): Delete.
14925         (tee_file::~tee_file): New.
14926         (tee_file_delete): Delete.
14927         (tee_file_flush): Rename to ...
14928         (tee_file::flush): ... this.  Adjust.
14929         (tee_file_write): Rename to ...
14930         (tee_file::write): ... this.  Adjust.
14931         (tee_file::write_async_safe): New.
14932         (tee_file_fputs): Rename to ...
14933         (tee_file::puts): ... this.  Adjust.
14934         (tee_file_isatty): Rename to ...
14935         (tee_file::isatty): ... this.  Adjust.
14936         * ui-file.h (struct obstack, struct ui_file): Don't
14937         forward-declare.
14938         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14939         (ui_file_write_ftype)
14940         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14941         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14942         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14943         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14944         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14945         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14946         (set_ui_file_fseek): Delete.
14947         (ui_file_data, ui_file_delete, ui_file_rewind)
14948         (struct ui_file): New.
14949         (ui_file_up): New.
14950         (class null_file): New.
14951         (null_stream): Declare.
14952         (ui_file_write_for_put, ui_file_put): Delete.
14953         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14954         Delete.
14955         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14956         (gdb_fopen, tee_file_new): Delete.
14957         (struct string_file): New.
14958         (struct stdio_file): New.
14959         (stdio_file_up): New.
14960         (struct stderr_file): New.
14961         (class tee_file): New.
14962         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14963         of a 'ui_file *'.  Adjust.
14964         * ui-out.h (class ui_out) <field_stream>: Likewise.
14965         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14966         (null_stream): Delete.
14967         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14968         Adjust.
14969         * utils.h (struct ui_file): Delete forward declaration..
14970         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14971         (error_stream): Take a 'string_file &' instead of a
14972         'ui_file *'.
14973         * varobj.c (varobj_value_get_print_value): Use string_file.
14974         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14975         * gdbarch.c: Regenerate.
14976
14977 2017-02-02  Pedro Alves  <palves@redhat.com>
14978
14979         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14980         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14981         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14982         Adjust to call gdb_print_insn instead of
14983         gdb_disassembler::print_insn.
14984         (dump_insns, do_mixed_source_and_assembly_deprecated)
14985         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14986         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14987         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14988         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14989         declaration.
14990         (gdb_pretty_print_insn): Re-add declaration.
14991         * record-btrace.c (btrace_insn_history): Don't allocate a
14992         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14993
14994 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14995
14996         * disasm.h (gdb_disassembly): Remove file_string parameter.
14997         * disasm.c (gdb_disassembly): Likewise.
14998         * cli/cli-cmds.c (print_disassembly): Adapt.
14999         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15000         * stack.c (do_gdb_disassembly): Likewise.
15001
15002 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15003
15004         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15005         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15006         targets.  And if the implicit value is longer than needed, extract
15007         the first bytes instead of the "least significant" ones.
15008
15009 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15010
15011         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15012         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15013         (btrace_fetch): Assert can_access_registers_ptid.
15014         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15015         validate_registers_access.
15016
15017 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15018
15019         * gdbthread.h (can_access_registers_ptid): New.
15020         * thread.c (can_access_registers_ptid): New.
15021
15022 2017-02-01  Pedro Alves  <palves@redhat.com>
15023
15024         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15025
15026 2017-01-31  Pedro Alves  <palves@redhat.com>
15027
15028         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15029         Fix typos.
15030
15031 2017-01-31  Pedro Alves  <palves@redhat.com>
15032
15033         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15034         not used.
15035
15036 2017-01-31  Pedro Alves  <palves@redhat.com>
15037
15038         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15039
15040 2017-01-31  Pedro Alves  <palves@redhat.com>
15041
15042         * common/scoped_restore.h
15043         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15044         change the value's parameter type to T2.
15045         (make_scoped_restore): Likewise.
15046
15047 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15048             Richard Henderson  <rth@redhat.com>
15049
15050         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15051         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15052         GS_BASE for older kernels.
15053         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15054         GS_BASE for older kernels.
15055         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15056         and GS_BASE to the offset table.
15057         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15058         system register group.
15059         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15060         for older kernels.
15061         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15062         amd64 ABI.
15063         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15064         AMD64_GSBASE_REGNUM.
15065         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15066         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15067         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15068         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15069         i386/64bit-segments.xml in those rules.
15070         * features/i386/64bit-segments.xml: New file.
15071         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15072         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15073         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15074         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15075         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15076         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15077         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15078         * features/i386/amd64-avx-linux.c: Regenerated.
15079         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15080         * features/i386/amd64-avx-mpx.c: Regenerated.
15081         * features/i386/amd64-avx512-linux.c: Regenerated.
15082         * features/i386/amd64-linux.c: Regenerated.
15083         * features/i386/amd64-mpx-linux.c: Regenerated.
15084         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15085         * features/i386/i386-avx-mpx.c: Regenerated.
15086         * features/i386/x32-avx-linux.c: Regenerated.
15087         * features/i386/x32-avx512-linux.c: Regenerated.
15088         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15089         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15090         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15091         * regformats/i386/amd64-linux.dat: Regenerated.
15092         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15093         * regformats/i386/x32-avx-linux.dat: Regenerated.
15094         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15095         * regformats/i386/x32-linux.dat: Regenerated.
15096
15097 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15098
15099         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15100         Set to AMD64_NUM_REGS.
15101
15102 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15103
15104         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15105         that checks validity of a register number.
15106
15107 2017-01-27  Kees Cook  <keescook@google.com>
15108
15109         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15110         fetch_fpregs if target has fpa registers.
15111         (arm_linux_store_inferior_registers): Call store_fpregs if target
15112         has fpa registers.
15113
15114 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15115
15116         * cris-tdep.c (cris_gdbarch_init): Remove check for
15117         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15118
15119 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15120
15121         * corelow.c (get_core_register_section): Check for regset
15122         existence before checking for REGSET_VARIABLE_SIZE.
15123
15124 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15125             Pedro Alves  <palves@redhat.com>
15126
15127         PR gdb/20939
15128         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15129         call memory_error, save memaddr instead.
15130         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15131         negative, cal memory_error.
15132         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15133
15134 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15135
15136         * disasm-selftests.c (memory_error_test): New function.
15137         (_initialize_disasm_selftests): Register memory_error_test.
15138
15139 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15140
15141         * Makefile.in (SFILES): Add disasm-selftests.c and
15142         selftest-arch.c.
15143         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15144         * disasm-selftests.c: New file.
15145         * selftest-arch.c: New file.
15146         * selftest-arch.h: New file.
15147
15148 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15149
15150         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15151         to bfd_arch_mep.  Don't return 0 if section is not
15152         found.  Call print_insn_mep.
15153
15154 2017-01-26  Pedro Alves  <palves@redhat.com>
15155             Yao Qi  <yao.qi@linaro.org>
15156
15157         * arm-tdep.c: Include "disasm.h".
15158         (gdb_print_insn_arm): Update code to get gdbarch.
15159         * disasm.c (dis_asm_read_memory): Change it to
15160         gdb_disassembler::dis_asm_read_memory.
15161         (dis_asm_memory_error): Likewise.
15162         (dis_asm_print_address): Likewise.
15163         (gdb_pretty_print_insn): Change it to
15164         gdb_disassembler::pretty_print_insn.
15165         (dump_insns): Add one argument gdb_disassemlber.  All
15166         callers updated.
15167         (do_mixed_source_and_assembly_deprecated): Likewise.
15168         (do_mixed_source_and_assembly): Likewise.
15169         (do_assembly_only): Likewise.
15170         (gdb_disassembler::gdb_disassembler): New.
15171         (gdb_disassembler::print_insn): New.
15172         * disasm.h (class gdb_disassembler): New.
15173         (gdb_pretty_print_insn): Remove declaration.
15174         (gdb_disassemble_info): Likewise.
15175         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15176         (gdbscm_disasm_read_memory_worker): Update.
15177         (gdbscm_disasm_read_memory): Update.
15178         (gdbscm_disasm_memory_error): Remove.
15179         (gdbscm_disasm_print_address): Remove.
15180         (gdbscm_disassembler::gdbscm_disassembler): New.
15181         (gdbscm_print_insn_from_port): Update.
15182         * mips-tdep.c: Include disasm.h.
15183         (gdb_print_insn_mips): Update code to get gdbarch.
15184         * record-btrace.c (btrace_insn_history): Update.
15185         * spu-tdep.c: Include disasm.h.
15186         (struct spu_dis_asm_data): Remove.
15187         (struct spu_dis_asm_info): New.
15188         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15189         SPU id.
15190         (gdb_print_insn_spu): Cast disassemble_info to
15191         spu_dis_asm_info.
15192
15193 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15194
15195         * disasm.c (do_ui_file_delete): Delete.
15196         (gdb_insn_length): Move code creating stream to ...
15197         * utils.c (null_stream): ... here.  New function.
15198         * utils.h (null_stream): Declare.
15199
15200 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15201
15202         * python/py-inferior.c (find_thread_object): Return directly
15203         from the loop.  Remove "found" variable.
15204
15205 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15206
15207         GDB 7.12.1 released.
15208
15209 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15210
15211         * python/py-function.c (fnpy_call): Reorder declarations to have
15212         the gdbpy_enter object declared first.
15213         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15214
15215 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15216
15217         PR python/21068
15218         * python/python-internal.h (PyMem_RawMalloc): Define for
15219         Python < 3.4.
15220         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15221         PyMem_RawMalloc instead of PyMem_Malloc.
15222
15223 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15224             Luis Machado  <lgustavo@codesourcery.com>
15225
15226         * NEWS (New commands): Mention flash-erase.
15227         (New MI commands): Mention target-flash-erase.
15228         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15229         command.
15230         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15231         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15232         * target.c (flash_erase_command): New function.
15233         (initialize_targets): Add new flash-erase command.
15234         * target.h (flash_erase_command): New declaration.
15235
15236 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15237
15238         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15239         HAVE_SYS_PROCFS_H is defined.
15240
15241 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15242
15243         * remote.c (struct cached_reg): Change data into a pointer.
15244         * (stop_reply_dtr): Free data pointers before deleting vector.
15245         (process_stop_reply): Likewise.
15246         (remote_parse_stop_reply): Allocate space for data
15247
15248 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15249
15250         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15251         MAX_REGISTER_SIZE.
15252         (amd64_pseudo_register_read_value): Likewise.
15253         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15254         (store_register_using_P): Likewise.
15255         * regcache.c (regcache_xfer_part): Likewise.
15256
15257 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15258
15259         Split real and pseudo registers.
15260         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15261         (sparc32_pseudo_regnum): New enum.
15262         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15263         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15264         (SPARC32_CP0_REGISTERS): New macro.
15265         (sparc32_pseudo_register_name): New function.
15266         (sparc32_register_name): Use sparc32_pseudo_register_name.
15267         (sparc32_pseudo_register_type): New function.
15268         (sparc32_register_type): Use sparc32_pseudo_register_type.
15269         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15270         pseudo register numbers.
15271         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15272         (SPARC64_CP0_REGISTERS): New macro.
15273         (sparc64_pseudo_register_name): New function.
15274         (sparc64_register_name): Use sparc64_pseudo_register_name.
15275         (sparc64_pseudo_register_type): New function.
15276         (sparc64_register_type): Use sparc64_pseudo_register_type.
15277         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15278         pseudo register numbers.
15279         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15280         sparc64_store_arguments): Handle pseudo register numbers.
15281
15282 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15283
15284         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15285         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15286         output.
15287         (getpkt_or_notif_sane_1): Likewise.
15288
15289 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15290
15291         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15292         of CC.  Pass "-x c++-header" instead of "-x c".
15293
15294 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15295
15296         * remote.c (remote_can_async_p): Update comment.
15297
15298 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15299
15300         * linux-nat.c (linux_nat_can_async_p): Update comment.
15301
15302 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15303
15304         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15305
15306 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15307
15308         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15309
15310 2017-01-10  Tom Tromey  <tom@tromey.com>
15311
15312         * python/py-type.c (typy_legacy_template_argument): Update.
15313         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15314         ~demangle_parse_info): Declare new members.
15315         (cp_demangled_name_to_comp): Return unique_ptr.
15316         (cp_demangled_name_parse_free)
15317         (make_cleanup_cp_demangled_name_parse_free)
15318         (cp_new_demangle_parse_info): Remove.
15319         * cp-support.c (do_demangled_name_parse_free_cleanup)
15320         (make_cleanup_cp_demangled_name_parse_free): Remove.
15321         (inspect_type, cp_canonicalize_string_full)
15322         (cp_canonicalize_string): Update.
15323         (mangled_name_to_comp): Change return type.
15324         (cp_class_name_from_physname, method_name_from_physname)
15325         (cp_func_name, cp_remove_params): Update.
15326         * cp-name-parser.y (demangle_parse_info): New constructor, from
15327         cp_new_demangle_parse_info.
15328         (~demangle_parse_info): New destructor, from
15329         cp_demangled_name_parse_free.
15330         (cp_merge_demangle_parse_infos): Update.
15331         (cp_demangled_name_to_comp): Change return type.
15332
15333 2017-01-10  Tom Tromey  <tom@tromey.com>
15334
15335         * top.c (prevent_dont_repeat): Change return type.
15336         * python/python.c (execute_gdb_command): Use std::string.
15337         Update.
15338         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15339         * command.h (prevent_dont_repeat): Change return type.
15340         * breakpoint.c (bpstat_do_actions_1): Update.
15341
15342 2017-01-10  Tom Tromey  <tom@tromey.com>
15343
15344         * value.h (scoped_value_mark::~scoped_value_mark): Call
15345         free_to_mark.
15346         (scoped_value_mark::free_to_mark): New method.
15347         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15348         scoped_value_mark.
15349
15350 2017-01-10  Tom Tromey  <tom@tromey.com>
15351
15352         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15353         (valpy_reference_value, valpy_const_value, valpy_get_address)
15354         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15355         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15356         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15357         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15358         scoped_value_mark.
15359         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15360         * value.h (scoped_value_mark): New class.
15361
15362 2017-01-10  Tom Tromey  <tom@tromey.com>
15363
15364         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15365         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15366         * psymtab.c (discard_psymtabs_upto): Remove.
15367         (make_cleanup_discard_psymtabs): Remove.
15368         (struct psymtab_state): Remove.
15369
15370 2017-01-10  Tom Tromey  <tom@tromey.com>
15371
15372         * record-full.c (record_full_save_cleanups): Remove.
15373         (record_full_save): Use gdb::unlinker.
15374         * gcore.c (do_bfd_delete_cleanup): Remove.
15375         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15376         cleanups.
15377         * dwarf2read.c (unlink_if_set): Remove.
15378         (write_psymtabs_to_index): Use gdb::unlinker.
15379         * common/gdb_unlinker.h: New file.
15380
15381 2017-01-10  Tom Tromey  <tom@tromey.com>
15382
15383         * windows-tdep.c (windows_xfer_shared_library): Update.
15384         * windows-nat.c (windows_make_so): Update.
15385         * utils.h (make_cleanup_bfd_unref): Remove.
15386         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15387         * symfile.h (symfile_bfd_open)
15388         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15389         * symfile.c (read_symbols, symbol_file_add)
15390         (separate_debug_file_exists): Update.
15391         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15392         (generic_load, reread_symbols): Update.
15393         * symfile-mem.c (symbol_file_add_from_memory): Update.
15394         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15395         (spu_symbol_file_add_from_memory): Update.
15396         * solist.h (struct target_so_ops) <bfd_open>: Return
15397         gdb_bfd_ref_ptr.
15398         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15399         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15400         gdb_bfd_ref_ptr.
15401         (solib_map_sections, reload_shared_libraries_1): Update.
15402         * solib-svr4.c (enable_break): Update.
15403         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15404         * solib-frv.c (enable_break2): Update.
15405         * solib-dsbt.c (enable_break): Update.
15406         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15407         gdb_bfd_ref_ptr.
15408         (darwin_solib_get_all_image_info_addr_at_init): Update.
15409         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15410         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15411         * record-full.c (record_full_save): Update.
15412         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15413         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15414         * minidebug.c (find_separate_debug_file_in_section): Return
15415         gdb_bfd_ref_ptr.
15416         * machoread.c (macho_add_oso_symfile): Change abfd to
15417         gdb_bfd_ref_ptr.
15418         (macho_symfile_read_all_oso): Update.
15419         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15420         (macho_symfile_read): Update.
15421         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15422         (jit_bfd_try_read_symtab): Update.
15423         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15424         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15425         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15426         gdb_bfd_ref_ptr.
15427         (gdb_bfd_ref_policy): New struct.
15428         (gdb_bfd_ref_ptr): New typedef.
15429         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15430         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15431         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15432         gdb_bfd_ref_ptr.
15433         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15434         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15435         (gcore_command): Update.
15436         * exec.c (exec_file_attach): Update.
15437         * elfread.c (elf_symfile_read): Update.
15438         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15439         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15440         (open_and_init_dwo_file): Update.
15441         (open_dwp_file): Return gdb_bfd_ref_ptr.
15442         (open_and_init_dwp_file): Update.
15443         * corelow.c (core_open): Update.
15444         * compile/compile-object-load.c (compile_object_load): Update.
15445         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15446         * coffread.c (coff_symfile_read): Update.
15447         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15448         gdb_bfd_ref_ptr.  Rename.
15449         (dump_bfd_file, restore_command): Update.
15450         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15451         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15452         (find_separate_debug_file_by_buildid): Update.
15453
15454 2017-01-10  Tom Tromey  <tom@tromey.com>
15455
15456         * common/gdb_ref_ptr.h: New file.
15457         * python/py-ref.h (struct gdbpy_ref_policy): New.
15458         (gdbpy_ref): Now a typedef.
15459
15460 2017-01-10  Tom Tromey  <tom@tromey.com>
15461
15462         * utils.h (make_cleanup_htab_delete): Don't declare.
15463         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15464         Remove.
15465         * linespec.c (decode_compound_collector): Add constructor,
15466         destructor.
15467         (lookup_prefix_sym): Remove cleanup.
15468         (symtab_collector): Add constructor, destructor.
15469         (collect_symtabs_from_filename): Remove cleanup.
15470         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15471         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15472         Use htab_up.
15473         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15474         * dwarf2read.c (dw2_expand_symtabs_matching)
15475         (dw2_map_symbol_filenames, dwarf_decode_macros)
15476         (write_psymtabs_to_index): Use htab_up.
15477         * dwarf2loc.c (func_verify_no_selftailcall)
15478         (call_site_find_chain_1, func_verify_no_selftailcall)
15479         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15480         std::vector, gdb::unique_xmalloc_ptr.
15481         (call_sitep): Remove typedef.
15482         (dwarf2_locexpr_baton_eval): Remove unused variable.
15483
15484 2017-01-10  Tom Tromey  <tom@tromey.com>
15485
15486         * python/python-internal.h (make_cleanup_py_decref)
15487         (make_cleanup_py_xdecref): Don't declare.
15488         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15489         (py_xdecref, make_cleanup_py_xdecref): Remove.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15494         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15495
15496 2017-01-10  Tom Tromey  <tom@tromey.com>
15497
15498         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15499
15500 2017-01-10  Tom Tromey  <tom@tromey.com>
15501
15502         * python/py-utils.c (unicode_to_encoded_string)
15503         (python_string_to_target_string)
15504         (python_string_to_target_python_string)
15505         (python_string_to_host_string, gdbpy_obj_to_string)
15506         (get_addr_from_python): Use gdbpy_ref.
15507
15508 2017-01-10  Tom Tromey  <tom@tromey.com>
15509
15510         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15511         gdbpy_ref.
15512
15513 2017-01-10  Tom Tromey  <tom@tromey.com>
15514
15515         * python/python.c (eval_python_command, gdbpy_decode_line)
15516         (gdbpy_run_events, gdbpy_start_type_printers)
15517         (gdbpy_apply_type_printers): Use gdbpy_ref.
15518
15519 2017-01-10  Tom Tromey  <tom@tromey.com>
15520
15521         * python/py-param.c (get_doc_string, compute_enum_values): Use
15522         gdbpy_ref.
15523
15524 2017-01-10  Tom Tromey  <tom@tromey.com>
15525
15526         * python/py-inferior.c (find_thread_object, build_inferior_list):
15527         Use gdbpy_ref.
15528
15529 2017-01-10  Tom Tromey  <tom@tromey.com>
15530
15531         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15532
15533 2017-01-10  Tom Tromey  <tom@tromey.com>
15534
15535         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15536         gdbpy_ref.
15537
15538 2017-01-10  Tom Tromey  <tom@tromey.com>
15539
15540         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15541         extra incref.
15542         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15543         Use gdbpy_ref.
15544
15545 2017-01-10  Tom Tromey  <tom@tromey.com>
15546
15547         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15548         gdbpy_ref.
15549
15550 2017-01-10  Tom Tromey  <tom@tromey.com>
15551
15552         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15553         decref results of PyArg_ParseTupleAndKeywords.
15554
15555 2017-01-10  Tom Tromey  <tom@tromey.com>
15556
15557         * python/python.c (python_run_simple_file): Use
15558         unique_xmalloc_ptr, gdbpy_ref.
15559
15560 2017-01-10  Tom Tromey  <tom@tromey.com>
15561
15562         * python/py-prettyprint.c (print_stack_unless_memory_error)
15563         (print_string_repr, print_children): Use gdbpy_ref.
15564         (dummy_python_frame): New class.
15565         (dummy_python_frame::dummy_python_frame): Rename from
15566         push_dummy_python_frame.
15567         (py_restore_tstate): Remove.
15568
15569 2017-01-10  Tom Tromey  <tom@tromey.com>
15570
15571         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15572
15573 2017-01-10  Tom Tromey  <tom@tromey.com>
15574
15575         * python/python.c (ensure_python_env, restore_python_env):
15576         Remove.
15577         * python/python-internal.h (ensure_python_env): Don't declare.
15578         * varobj.h (varobj_ensure_python_env): Don't declare.
15579         * varobj.c (varobj_ensure_python_env): Remove.
15580
15581 2017-01-10  Tom Tromey  <tom@tromey.com>
15582
15583         * varobj.c (varobj_value_get_print_value): Use
15584         gdbpy_enter_varobj.
15585
15586 2017-01-10  Tom Tromey  <tom@tromey.com>
15587
15588         * python/py-prettyprint.c (print_string_repr, print_children):
15589         Update.
15590         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15591         of "encoding".
15592         * varobj.c (varobj_value_get_print_value): Update.
15593         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15594
15595 2017-01-10  Tom Tromey  <tom@tromey.com>
15596
15597         * varobj.c (varobj_get_display_hint)
15598         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15599         (varobj_set_visualizer, free_variable): Use
15600         gdbpy_enter_varobj.
15601
15602 2017-01-10  Tom Tromey  <tom@tromey.com>
15603
15604         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15605         (do_finish_initialization): New function.  Use gdbpy_ref.
15606         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15607         do_finish_initialization.
15608
15609 2017-01-10  Tom Tromey  <tom@tromey.com>
15610
15611         * python/py-param.c (get_set_value, get_show_value): Use
15612         gdbpy_enter, gdbpy_ref.
15613
15614 2017-01-10  Tom Tromey  <tom@tromey.com>
15615
15616         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15617
15618 2017-01-10  Tom Tromey  <tom@tromey.com>
15619
15620         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15621
15622 2017-01-10  Tom Tromey  <tom@tromey.com>
15623
15624         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15625         Use gdbpy_enter_varobj.
15626
15627 2017-01-10  Tom Tromey  <tom@tromey.com>
15628
15629         * varobj.c (gdbpy_enter_varobj): New constructor.
15630         * python/python-internal.h (gdbpy_enter_varobj): New class.
15631         * python/py-varobj.c (py_varobj_get_iterator): Use
15632         gdbpy_enter_varobj.
15633
15634 2017-01-10  Tom Tromey  <tom@tromey.com>
15635
15636         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15637         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15638         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15639         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15640         unique_xmalloc_ptr.
15641         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15642
15643 2017-01-10  Tom Tromey  <tom@tromey.com>
15644
15645         * python/py-xmethods.c (invoke_match_method): Use
15646         gdbpy_ref.
15647
15648 2017-01-10  Tom Tromey  <tom@tromey.com>
15649
15650         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15651         gdbpy_enter, gdbpy_ref.
15652
15653 2017-01-10  Tom Tromey  <tom@tromey.com>
15654
15655         * python/python.c (python_interactive_command): Use gdbpy_enter.
15656
15657 2017-01-10  Tom Tromey  <tom@tromey.com>
15658
15659         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15660         gdbpy_ref.
15661
15662 2017-01-10  Tom Tromey  <tom@tromey.com>
15663
15664         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15665         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15666
15667 2017-01-10  Tom Tromey  <tom@tromey.com>
15668
15669         * utils.h (htab_deleter): New struct.
15670         (htab_up): New typedef.
15671         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15672         gdbpy_enter, gdbpy_ref, htab_up.
15673
15674 2017-01-10  Tom Tromey  <tom@tromey.com>
15675
15676         * python/py-unwind.c (pending_frame_invalidate): Remove.
15677         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15678
15679 2017-01-10  Tom Tromey  <tom@tromey.com>
15680
15681         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15682         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15683
15684 2017-01-10  Tom Tromey  <tom@tromey.com>
15685
15686         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15687
15688 2017-01-10  Tom Tromey  <tom@tromey.com>
15689
15690         * python/python.c (gdbpy_eval_from_control_command)
15691         (gdbpy_source_script, gdbpy_run_events)
15692         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15693         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15694         gdbpy_enter.
15695
15696 2017-01-10  Tom Tromey  <tom@tromey.com>
15697
15698         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15699
15700 2017-01-10  Tom Tromey  <tom@tromey.com>
15701
15702         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15703
15704 2017-01-10  Tom Tromey  <tom@tromey.com>
15705
15706         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15707         (python_on_inferior_call_pre, python_on_inferior_call_post)
15708         (python_on_memory_change, python_on_register_change)
15709         (python_inferior_exit, python_new_objfile, add_thread_object)
15710         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15711
15712 2017-01-10  Tom Tromey  <tom@tromey.com>
15713
15714         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15715         (bpfinishpy_handle_exit): Use gdbpy_enter.
15716
15717 2017-01-10  Tom Tromey  <tom@tromey.com>
15718
15719         * python/py-cmd.c (cmdpy_destroyer)
15720         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15721         gdbpy_enter.
15722
15723 2017-01-10  Tom Tromey  <tom@tromey.com>
15724
15725         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15726         gdbpy_enter.
15727         (gdbpy_breakpoint_has_cond): Likewise.
15728
15729 2017-01-10  Tom Tromey  <tom@tromey.com>
15730
15731         * python/python.c (gdbpy_enter): New constructor.
15732         (~gdbpy_enter): New destructor.
15733         (restore_python_env, ensure_python_env): Rewrite.
15734         * python/python-internal.h (gdbpy_enter): New class.
15735
15736 2017-01-10  Tom Tromey  <tom@tromey.com>
15737
15738         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15739
15740 2017-01-10  Tom Tromey  <tom@tromey.com>
15741
15742         * python/py-value.c (value_has_field, get_field_flag)
15743         (get_field_type, valpy_getitem, convert_value_from_python): Use
15744         gdbpy_ref.
15745
15746 2017-01-10  Tom Tromey  <tom@tromey.com>
15747
15748         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15749         gdbpy_ref.
15750
15751 2017-01-10  Tom Tromey  <tom@tromey.com>
15752
15753         * python/py-prettyprint.c (search_pp_list)
15754         (find_pretty_printer_from_objfiles)
15755         (find_pretty_printer_from_progspace)
15756         (find_pretty_printer_from_gdb, find_pretty_printer)
15757         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15758         gdbpy_ref.
15759
15760 2017-01-10  Tom Tromey  <tom@tromey.com>
15761
15762         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15763
15764 2017-01-10  Tom Tromey  <tom@tromey.com>
15765
15766         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15767         (ltpy_get_all_source_lines): Use gdbpy_ref.
15768
15769 2017-01-10  Tom Tromey  <tom@tromey.com>
15770
15771         * python/py-framefilter.c (extract_sym, extract_value)
15772         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15773         gdbpy_ref.
15774
15775 2017-01-10  Tom Tromey  <tom@tromey.com>
15776
15777         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15778
15779 2017-01-10  Tom Tromey  <tom@tromey.com>
15780
15781         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15782
15783 2017-01-10  Tom Tromey  <tom@tromey.com>
15784
15785         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15786         gdbpy_ref.
15787
15788 2017-01-10  Tom Tromey  <tom@tromey.com>
15789
15790         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15791
15792 2017-01-10  Tom Tromey  <tom@tromey.com>
15793
15794         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15795         (typy_range): Use gdbpy_ref.
15796
15797 2017-01-10  Tom Tromey  <tom@tromey.com>
15798
15799         * python/py-threadevent.c (create_thread_event_object): Use
15800         gdbpy_ref.
15801         * python/py-stopevent.c (create_stop_event_object): Simplify.
15802         (emit_stop_event): Use gdbpy_ref.
15803         * python/py-signalevent.c (create_signal_event_object): Use
15804         gdbpy_ref.
15805         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15806         (emit_new_objfile_event, create_clear_objfiles_event_object)
15807         (emit_clear_objfiles_event): Use gdbpy_ref.
15808         * python/py-infevents.c (create_inferior_call_event_object)
15809         (create_register_changed_event_object)
15810         (create_memory_changed_event_object, emit_inferior_call_event)
15811         (emit_memory_changed_event, emit_register_changed_event): Use
15812         gdbpy_ref.
15813         * python/py-exitedevent.c (create_exited_event_object)
15814         (emit_exited_event): Use gdbpy_ref.
15815         * python/py-event.h (evpy_emit_event): Remove
15816         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15817         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15818         * python/py-continueevent.c (emit_continue_event): Use
15819         gdbpy_ref.
15820         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15821         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15822         gdbpy_ref.
15823         * python/py-bpevent.c (create_breakpoint_event_object): Use
15824         gdbpy_ref.
15825
15826 2017-01-10  Tom Tromey  <tom@tromey.com>
15827
15828         * python/py-ref.h: New file.
15829
15830 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15831
15832         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15833         void.
15834         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15835         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15836         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15837         * ui-out.c (ui_out::redirect): Likewise.
15838         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15839         * cli/cli-logging.c (set_logging_redirect): Update call site of
15840         ui_out::redirect.
15841         (handle_redirections): Likewise.
15842         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15843         * top.c (execute_command_to_string): Likewise.
15844         * utils.c (do_ui_out_redirect_pop): Likewise.
15845
15846 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15847
15848         * stack.c (_initialize_stack): Update "frame" command help message.
15849
15850 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15851
15852         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15853
15854 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15855
15856         * x86-linux-nat.h: Include gdb_proc_service.h.
15857
15858 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15859
15860         * ser-base.h: Include serial.h.
15861
15862 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15863
15864         * ppc-linux-tdep.h: Include ppc-tdep.h.
15865
15866 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15867
15868         * nat/amd64-linux-siginfo.h: Include signal.h.
15869
15870 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15871
15872         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15873
15874 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15875
15876         * mi/mi-parse.h: Include mi-cmds.h.
15877
15878 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15879
15880         * inf-loop.c: Don't include "target.h".
15881         * inf-loop.h: Include it here.
15882
15883 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15884
15885         * dfp.h: Include "dboulest.h" and "expression.h".
15886
15887 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15888
15889         * ax-gdb.h: Include "ax.h".
15890
15891 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15892
15893         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15894         with nat/gdb_ptrace.h.
15895
15896 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15897
15898         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15899         new line.
15900         (mips64_fbsd_sigframe_init): Likewise.
15901
15902 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15903
15904         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15905         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15906
15907 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15908
15909         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15910         * NEWS: Mention new FreeBSD/mips native configuration.
15911         * config/mips/fbsd.mh: New file.
15912         * configure.host: Add mips*-*-freebsd*.
15913         * mips-fbsd-nat.c: New file.
15914
15915 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15916
15917         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15918         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15919         * NEWS: Mention new FreeBSD/mips target.
15920         * configure.tgt: Add mips*-*-freebsd*.
15921         * mips-fbsd-tdep.c: New file.
15922         * mips-fbsd-tdep.h: New file.
15923
15924 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15925
15926         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15927         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15928
15929 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15930
15931         Update copyright year range in all GDB files.
15932
15933 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15934
15935         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15936
15937 For older changes see ChangeLog-2016.
15938 \f
15939 Local Variables:
15940 mode: change-log
15941 left-margin: 8
15942 fill-column: 74
15943 version-control: never
15944 coding: utf-8
15945 End: