ravenscar: update inferior ptid with event ptid
[external/binutils.git] / gdb / ChangeLog
1 2017-11-21  Jerome Guitton  <guitton@adacore.com>
2
3         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
4         with event ptid from the lower layer before doing the
5         ravenscar-specific update.
6
7 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
8
9         * ravenscar-thread.c (is_ravenscar_task): Also verify that
10         the ptid's TID is nonzero.
11
12 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
13
14         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
15         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
16         Make non-static.  Change return type to char *.  Adjust code
17         accordingly.  Rewrite the function's documentation.
18         (read_atcb): Adjust call to get_tcb_types_info accordingly.
19         * ravenscar-thread.c (ravenscar_inferior_created): Check that
20         we have enough debugging information in the runtime to support
21         Ada task debugging before we enable the ravenscar-thread layer.
22
23 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
24
25         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
26         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
27         * ravenscar-thread.c: Add into comment.
28         (base_magic_null_ptid): Delete.
29         (base_ptid): Change documentation.
30         (ravenscar_active_task): Renames ravenscar_running_thread.
31         All callers updated throughout.
32         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
33         (ravenscar_task_is_currently_active): Likewise.
34         (get_base_thread_from_ravenscar_task): Ditto.
35         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
36         (ravenscar_runtime_initialized): Likewise.
37         (get_running_thread_id): Add new parameter "cpu".  Adjust
38         implementation to handle this new parameter.
39         (ravenscar_fetch_registers): Small adjustment to use
40         is_ravenscar_task and ravenscar_task_is_currently_active in
41         order to decide whether to use the target beneath or this
42         module's arch_ops.
43         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
44         (ravenscar_stopped_by_sw_breakpoint): Use
45         get_base_thread_from_ravenscar_task to get the underlying
46         thread, rather than using base_ptid.
47         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
48         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
49         Likewise.
50         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
51
52 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
53
54         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
55         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
56         (get_tcb_types_info): Set fieldnos.base_cpu.
57         (read_atcb): Set task_info->base_cpu.
58         (info_task): Print "Base CPU" info if set by runtime.
59
60 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
61
62         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
63         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
64         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
65         New functions.
66         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
67         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
68         to_stopped_data_address and to_core_of_thread fields of
69         ravenscar_ops.
70
71 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
72
73         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
74         (struct gdbarch_tdep): New member long_double_abi.
75         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
76         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
77         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
78         format depending on long_double_abi tdep member.
79         (ppc_floatformat_for_type): Handle __ibm128 type.
80
81 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
82
83         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
84
85 2017-11-21  Pedro Alves  <palves@redhat.com>
86
87         * dwarf2read.c (mapped_index::find_name_components_bounds)
88         <completion mode, upper bound>: Use std::lower_bound instead of
89         std::upper_bound.
90         (test_mapped_index_find_name_component_bounds): Remove incorrect
91         "t1_fund" from expected symbols.
92
93 2017-11-21  Pedro Alves  <palves@redhat.com>
94
95         * dwarf2read.c (mapped_index::name_components_casing): New field.
96         (mapped_index) <build_name_components,
97         find_name_components_bounds): Declare new methods.
98         (mapped_index::find_name_components_bounds)
99         (mapped_index::build_name_components): New methods, factored out
100         from dw2_expand_symtabs_matching_symbol.
101         (check_find_bounds_finds)
102         (test_mapped_index_find_name_component_bounds): New.
103         (run_test): Rename to ...
104         (test_dw2_expand_symtabs_matching_symbol): ... this.
105         (run_test): Reimplement.
106
107 2017-11-21  Pedro Alves  <palves@redhat.com>
108
109         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
110         (symbol_end): Use cp_ident_is_alnum.
111         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
112         * dwarf2read.c (make_sort_after_prefix_name): New function.
113         (dw2_expand_symtabs_matching_symbol): Use it.
114         (test_symbols): Add more symbols.
115         (run_test): Add tests.
116
117 2017-11-17  Tom Tromey  <tom@tromey.com>
118
119         * symtab.h (enum symbol_subclass_kind): New.
120         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
121         Remove.
122         <subclass>: New member.
123         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
124         * rust-lang.c (rust_get_trait_object_pointer): Update.
125         * dwarf2read.c (read_func_scope): Update.
126         (read_variable): Update.
127
128 2017-11-17  Tom Tromey  <tom@tromey.com>
129
130         * dwarf2read.c (read_func_scope): Update.
131         * symtab.h (struct template_symbol): Derive from symbol.
132         <base>: Remove.
133
134 2017-11-17  Tom Tromey  <tom@tromey.com>
135
136         * symtab.h (struct symbol) <is_rust_vtable>: New member.
137         (struct rust_vtable_symbol): New.
138         (find_symbol_at_address): Declare.
139         * symtab.c (find_symbol_at_address): New function.
140         * symfile.h (struct quick_symbol_functions)
141         <find_compunit_symtab_by_address>: New member.
142         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
143         function.
144         (debug_sym_quick_functions): Link to
145         debug_qf_find_compunit_symtab_by_address.
146         * rust-lang.c (rust_get_trait_object_pointer): New function.
147         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
148         rust_get_trait_object_pointer.
149         * psymtab.c (psym_relocate): Clear psymbol_map.
150         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
151         functions.
152         (psym_functions): Link to psym_find_compunit_symtab_by_address.
153         * objfiles.h (struct objfile) <psymbol_map>: New member.
154         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
155         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
156         (rust_containing_type, read_variable): New functions.
157
158 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
159
160         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
161
162 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
163
164         * common/filestuff.c: Include <algorithm>.
165         (open_fds): Change type to std::vector<int>.
166         (do_mark_open_fd): Adjust.
167         (unmark_fd_no_cloexec): Adjust.
168         (do_close): Adjust.
169
170 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
171
172         * breakpoint.c (output_thread_groups): Take an std::vector.
173         (print_one_breakpoint_location): Adjust.
174
175 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
176
177         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
178         (ada_evaluate_subexp_for_cast): New function.
179         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
180         ada_evaluate_subexp_for_cast.
181         (ada_evaluate_subexp) <nosideret>: Replace code by call to
182         eval_skip_value.
183         * eval.c (evaluate_var_value): Make non-static.
184         (evaluate_var_msym_value, eval_skip_value): Likewise.
185         * value.h (evaluate_var_value, evaluate_var_msym_value)
186         (eval_skip_value): Declare.
187
188 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
189
190         * ada-lang.c (ada_value_cast): Remove parameter "noside".
191         Update all callers.
192
193 2017-11-16  Pedro Alves  <palves@redhat.com>
194
195         * python/py-unwind.c (pyuw_sniffer): Translate
196         PyExc_KeyboardInterrupt to a GDB Quit exception.
197
198 2017-11-16  Pedro Alves  <palves@redhat.com>
199
200         * infrun.c (resume_cleanups): Delete.
201         (resume): No longer install a resume_cleanups cleanup nor call
202         QUIT.
203         (proceed): Pass the terminal to the inferior.
204         (keep_going_pass_signal): No longer install a resume_cleanups
205         cleanup.
206
207 2017-11-16  Pedro Alves  <palves@redhat.com>
208
209         * inf-loop.c (inferior_event_handler): Don't swallow the exception
210         if the prompt is blocked.
211
212 2017-11-16  Pedro Alves  <palves@redhat.com>
213
214         * breakpoint.c (insert_bp_location): Replace bp_err and
215         bp_err_message locals by a gdb_exception local.
216
217 2017-11-16  Pedro Alves  <palves@redhat.com>
218
219         * inflow.c (scoped_ignore_sigttou): New class.
220         (child_terminal_ours_1, new_tty): Use it.
221
222 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
223
224         * target-float.c (decimal_from_number): Add byte_order argument and
225         call match_endianness.  Error if unknown floating-point type.
226         (decimal_to_number): Add byte_order argument and call match_endianness.
227         (decimal_from_longest): Update call.  Do not call match_endianness.
228         (decimal_from_ulongest): Likewise.
229         (decimal_binop): Likewise.
230         (decimal_is_zero): Likewise.
231         (decimal_compare): Likewise.
232         (decimal_convert): Likewise.
233
234 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
235
236         * python/python.c (gdbpy_rbreak): New function.
237         * NEWS: Document Python rbreak feature.
238
239 2017-11-16  Yao Qi  <yao.qi@linaro.org>
240
241         * features/tic6x-c62x.xml: Remove.
242         * features/tic6x-c64x.xml: Remove.
243         * features/tic6x-c64xp.xml: Remove.
244
245 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
246
247         * symtab.h: Include <array>.
248
249 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
250
251         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
252         (bsd_kvm_proc_cmd): Likewise.
253
254 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
255
256         * tui/tui-win.c (window_name_completer): Replace VEC with
257         std::vector.
258
259 2017-11-15  Andrew Cagney  <cagney@gnu.org>
260
261         * MAINTAINERS: Remove no-longer applicable entries.
262
263 2017-11-15  Andrew Cagney  <cagney@gnu.org>
264
265         * MAINTAINERS: Move self to Past Maintainers.
266
267 2017-11-15  Yao Qi  <yao.qi@linaro.org>
268
269         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
270         * features/nios2-linux.c: Remove.
271         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
272         initialize_tdesc_nios2_linux.
273
274 2017-11-15  Yao Qi  <yao.qi@linaro.org>
275
276         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
277         M68HC11_LAST_HARD_REG + 1.
278
279 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
280
281         PR gdb/22388
282         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
283         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
284         Return TARGET_XFER_EOF if size of returned data is 0.
285
286 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
287
288         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
289         memory-map-selftests.c.
290         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
291         * memory-map.c (memory_map_start_memory): Fix computation of hi
292         address.
293         * unittests/memory-map-selftests.c: New file.
294
295 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
296
297         * ada-lang.c: Fix some typos in the general command documenting
298         how Ada expressions are being evaluated and how their result
299         is printed.
300
301 2017-11-09  Tom Tromey  <tom@tromey.com>
302
303         * psymtab.c (psymbol_hash): Do not hash string contents.
304         (psymbol_compare): Add comment.
305
306 2017-11-09  Tom Tromey  <tom@tromey.com>
307
308         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
309
310 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
311
312         * ada-exp.y (write_var_from_sym): Remove parameter
313         "orig_left_context".  Update all callers.
314
315 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
316
317         * tracepoint.h (class collection_list) <stringify>: Return
318         std::vector<std::string>.
319         (encode_actions_rsp): Change parameters to
320         std::vector<std::string> *.
321         * tracepoint.c (collection_list::stringify): Return
322         std::vector<std::string> and adjust accordingly.
323         (encode_actions_rsp): Changee parameters to
324         std::vector<std::string> and adjust accordingly.
325         * remote.c (free_actions_list),
326         free_actions_list_cleanup_wrapper): Remove.
327         (remote_download_tracepoint): Adjust to std::vector.
328
329 2017-11-08  Tom Tromey  <tom@tromey.com>
330
331         * dwarf2read.c (symbolp): Remove typedef.
332         (read_func_scope): Use std::vector.
333         (process_structure_scope): Use std::vector.
334
335 2017-11-08  Pedro Alves  <palves@redhat.com>
336
337         * ada-lang.c (ada_make_symbol_completion_list): Use
338         completion_skip_symbol.
339         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
340         (symbol_is_function_or_method(symbol*)): New.
341         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
342         completion_skip_symbol.
343         (default_collect_symbol_completion_matches_break_on): Use
344         completion_skip_symbol.  Pass down mode.
345         (collect_file_symbol_completion_matches): Pass down mode.
346         * symtab.h (symbol_is_function_or_method): New declarations.
347         (completion_skip_symbol): New template function.
348
349 2017-11-08  Pedro Alves  <palves@redhat.com>
350
351         * linespec.c (iterate_over_all_matching_symtabs): Add
352         search_domain parameter.  Pass it down to expand_symtabs_matching.
353         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
354         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
355         search_domain.
356         (add_all_symbol_names_from_pspace): Add search_domain parameter.
357         Pass it down.
358         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
359         symbols.
360         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
361         it down.
362
363 2017-11-08  Pedro Alves  <palves@redhat.com>
364
365         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
366         text_len locals and don't pass them down.
367         * symtab.c (completion_list_add_name): Remove
368         sym_text/sym_text_len parameters and adjust.
369         (completion_list_add_symbol, completion_list_add_msymbol)
370         (completion_list_objc_symbol, completion_list_add_fields)
371         (add_symtab_completions): Likewise.
372         (default_collect_symbol_completion_matches_break_on)
373         (collect_file_symbol_completion_matches): Remove sym_text_len
374         local and don't pass it down.
375         * symtab.h (completion_list_add_name): Remove
376         sym_text/sym_text_len parameters.
377
378 2017-11-08  Pedro Alves  <palves@redhat.com>
379
380         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
381         unittests/lookup_name_info-selftests.c.
382         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
383         * cp-support.c: Include "selftest.h".
384         (cp_remove_params_1): Rename from cp_remove_params.  Add
385         'require_param' parameter, and handle it.
386         (cp_remove_params): Reimplement.
387         (cp_remove_params_if_any): New.
388         (selftests::quote): New.
389         (selftests::check_remove_params): New.
390         (selftests::test_cp_remove_params): New.
391         (_initialize_cp_support): Install
392         selftests::test_cp_remove_params.
393         * cp-support.h (cp_remove_params_if_any): Declare.
394         * dwarf2read.c :Include "selftest.h".
395         (dw2_expand_symtabs_matching_symbol): Use
396         lookup_name_info::make_ignore_params.
397         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
398         (selftests::dw2_expand_symtabs_matching::string_or_null)
399         (selftests::dw2_expand_symtabs_matching::check_match)
400         (selftests::dw2_expand_symtabs_matching::test_symbols)
401         (selftests::dw2_expand_symtabs_matching::run_test): New.
402         (_initialize_dwarf2_read): Register
403         selftests::dw2_expand_symtabs_matching::run_test.
404         * psymtab.c (psym_expand_symtabs_matching): Use
405         lookup_name_info::make_ignore_params.
406         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
407         If the lookup name wants to ignore parameters, strip them.
408         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
409         code handling '('.
410         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
411         (default_collect_symbol_completion_matches_break_on): Don't try to
412         strip parameters.
413         * symtab.h (lookup_name_info::lookup_name_info): Add
414         'ignore_parameters' parameter.
415         (lookup_name_info::ignore_parameters)
416         (lookup_name_info::make_ignore_params): New methods.
417         (lookup_name_info::m_ignore_parameters): New field.
418         * unittests/lookup_name_info-selftests.c: New file.
419
420 2017-11-08  Pedro Alves  <palves@redhat.com>
421
422         * dwarf2read.c (dw2_expand_marked_cus)
423         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
424         (dw2_expand_symtabs_matching): Move further below.
425         (dw2_expand_marked_cus): Reindent.
426
427 2017-11-08  Pedro Alves  <palves@redhat.com>
428
429         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
430         (struct name_component): New.
431         (mapped_index::name_components): New field.
432         (mapped_index::symbol_name_at): New method.
433         (dwarf2_read_index): Call mapped_index ctor.
434         (dw2_map_matching_symbols): Add comment about name_components
435         table.
436         (dw2_expand_symtabs_matching): Factor part to...
437         (dw2_expand_symtabs_matching_symbol): ... this new function.
438         Build name components table, and lookup symbols in it before
439         calling the name matcher.
440         (dw2_expand_marked_cus): New, factored out from
441         dw2_expand_symtabs_matching.
442         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
443
444 2017-11-08   Pedro Alves  <palves@redhat.com>
445
446         * ada-lang.c (ada_encode): Rename to ..
447         (ada_encode_1): ... this.  Add throw_errors parameter and handle
448         it.
449         (ada_encode): Reimplement.
450         (match_name): Delete, folded into full_name.
451         (resolve_subexp): No longer pass the encoded name to
452         ada_lookup_symbol_list.
453         (should_use_wild_match): Delete.
454         (name_match_type_from_name): New.
455         (ada_lookup_simple_minsym): Use lookup_name_info and the
456         language's symbol_name_matcher_ftype.
457         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
458         (ada_add_block_renamings): Adjust to use lookup_name_info.
459         (ada_lookup_name): New.
460         (add_nonlocal_symbols, ada_add_all_symbols)
461         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
462         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
463         (ada_name_for_lookup): Delete.
464         (ada_lookup_encoded_symbol): Construct a verbatim name.
465         (wild_match): Reverse sense of return type.  Use bool.
466         (full_match): Reverse sense of return type.  Inline bits of old
467         match_name here.
468         (ada_add_block_symbols): Adjust to use lookup_name_info.
469         (symbol_completion_match): Delete, folded into...
470         (ada_lookup_name_info::matches): ... .this new method.
471         (symbol_completion_add): Delete.
472         (ada_collect_symbol_completion_matches): Add name_match_type
473         parameter.  Adjust to use lookup_name_info and
474         completion_list_add_name.
475         (get_var_value, ada_add_global_exceptions): Adjust to use
476         lookup_name_info.
477         (ada_get_symbol_name_cmp): Delete.
478         (do_wild_match, do_full_match): New functions.
479         (ada_lookup_name_info::ada_lookup_name_info): New method.
480         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
481         functions.
482         (ada_language_defn): Install ada_get_symbol_name_matcher.
483         * ada-lex.l (processId): If name starts with '<', copy it
484         verbatim.
485         * block.c (block_iter_match_step, block_iter_match_first)
486         (block_iter_match_next, block_lookup_symbol)
487         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
488         lookup_name_info.
489         * block.h (block_iter_match_first, block_iter_match_next)
490         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
491         * c-lang.c (c_language_defn, cplus_language_defn)
492         (asm_language_defn, minimal_language_defn): Adjust comments to
493         refer to la_get_symbol_name_matcher.
494         * completer.c (complete_files_symbols)
495         (collect_explicit_location_matches, symbol_completer): Pass a
496         symbol_name_match_type down.
497         * completer.h (class completion_match, completion_match_result):
498         New classes.
499         (completion_tracker::reset_completion_match_result): New method.
500         (completion_tracker::m_completion_match_result): New field.
501         * cp-support.c (make_symbol_overload_list_block): Adjust to use
502         lookup_name_info.
503         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
504         functions.
505         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
506         * d-lang.c: Adjust comments to refer to
507         la_get_symbol_name_matcher.
508         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
509         Adjust to use lookup_name_info.
510         (dict_iter_match_first, dict_iter_match_next)
511         (iter_match_first_hashed, iter_match_next_hashed)
512         (iter_match_first_linear, iter_match_next_linear): Adjust to work
513         with a lookup_name_info.
514         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
515         Likewise.
516         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
517         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
518         (gdb_index_symbol_name_matcher): New class.
519         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
520         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
521         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
522         with a symbol_name_match_type.
523         (f_language_defn): Adjust comments to refer to
524         la_get_symbol_name_matcher.
525         * go-lang.c (go_language_defn): Adjust comments to refer to
526         la_get_symbol_name_matcher.
527         * language.c (default_symbol_name_matcher)
528         (language_get_symbol_name_matcher): New functions.
529         (unknown_language_defn, auto_language_defn): Adjust comments to
530         refer to la_get_symbol_name_matcher.
531         * language.h (symbol_name_cmp_ftype): Delete.
532         (language_defn) <la_collect_symbol_completion_matches>: Add match
533         type parameter.
534         <la_get_symbol_name_cmp>: Delete field.
535         <la_get_symbol_name_matcher>: New field.
536         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
537         (default_symbol_name_matcher, language_get_symbol_name_matcher):
538         Declare.
539         * linespec.c (iterate_over_all_matching_symtabs)
540         (iterate_over_file_blocks): Adjust to use lookup_name_info.
541         (find_methods): Add language parameter, and use lookup_name_info
542         and the language's symbol_name_matcher_ftype.
543         (linespec_complete_function): Adjust.
544         (lookup_prefix_sym): Use lookup_name_info.
545         (add_all_symbol_names_from_pspace): Adjust.
546         (find_superclass_methods): Add language parameter and pass it
547         down.
548         (find_method): Pass symbol language down.
549         (find_linespec_symbols): Don't demangle or Ada encode here.
550         (search_minsyms_for_name): Add lookup_name_info parameter.
551         (add_matching_symbols_to_info): Add name_match_type parameter.
552         Use lookup_name_info.
553         * m2-lang.c (m2_language_defn): Adjust comments to refer to
554         la_get_symbol_name_matcher.
555         * minsyms.c: Include <algorithm>.
556         (add_minsym_to_demangled_hash_table): Remove table parameter and
557         add objfile parameter.  Use search_name_hash, and add language to
558         demangled languages vector.
559         (struct found_minimal_symbols): New struct.
560         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
561         New functions.
562         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
563         input names here.  Use lookup_name_info instead.  Lookup up
564         demangled names once for each language in the demangled names
565         vector.
566         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
567         demangled names once for each language in the demangled names
568         vector.
569         (build_minimal_symbol_hash_tables): Adjust.
570         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
571         lookup_name_info.
572         * objc-lang.c (objc_language_defn): Adjust comment to refer to
573         la_get_symbol_name_matcher.
574         * objfiles.h: Include <vector>.
575         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
576         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
577         la_get_symbol_name_matcher.
578         * p-lang.c (pascal_language_defn): Adjust comment to refer to
579         la_get_symbol_name_matcher.
580         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
581         (match_partial_symbol): Use symbol_name_match_type,
582         lookup_name_info and psymbol_name_matches.
583         (lookup_partial_symbol): Use lookup_name_info.
584         (map_block): Use symbol_name_match_type and lookup_name_info.
585         (psym_map_matching_symbols): Use symbol_name_match_type.
586         (psymbol_name_matches): New.
587         (recursively_search_psymtabs): Use lookup_name_info and
588         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
589         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
590         'kind' parameter to 'domain'.
591         * rust-lang.c (rust_language_defn): Adjust comment to refer to
592         la_get_symbol_name_matcher.
593         * symfile-debug.c (debug_qf_map_matching_symbols)
594         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
595         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
596         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
597         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
598         Adjust to use symbol_name_match_type.
599         <expand_symtabs_matching>: Adjust to use lookup_name_info.
600         (expand_symtabs_matching): Adjust to use lookup_name_info.
601         * symmisc.c (maintenance_expand_symtabs): Use
602         lookup_name_info::match_any ().
603         * symtab.c (symbol_matches_search_name): New.
604         (eq_symbol_entry): Adjust to use lookup_name_info and the
605         language's matcher.
606         (demangle_for_lookup_info::demangle_for_lookup_info): New.
607         (lookup_name_info::match_any): New.
608         (iterate_over_symbols, search_symbols): Use lookup_name_info.
609         (compare_symbol_name): Add language, lookup_name_info and
610         completion_match_result parameters, and use them.
611         (completion_list_add_name): Make extern.  Add language and
612         lookup_name_info parameters.  Use them.
613         (completion_list_add_symbol, completion_list_add_msymbol)
614         (completion_list_objc_symbol): Add lookup_name_info parameters and
615         adjust.  Pass down language.
616         (completion_list_add_fields): Add lookup_name_info parameters and
617         adjust.  Pass down language.
618         (add_symtab_completions): Add lookup_name_info parameters and
619         adjust.
620         (default_collect_symbol_completion_matches_break_on): Add
621         name_match_type parameter, and use it.  Use lookup_name_info.
622         (default_collect_symbol_completion_matches)
623         (collect_symbol_completion_matches): Add name_match_type
624         parameter, and pass it down.
625         (collect_symbol_completion_matches_type): Adjust.
626         (collect_file_symbol_completion_matches): Add name_match_type
627         parameter, and use lookup_name_info.
628         * symtab.h: Include <string> and "common/gdb_optional.h".
629         (enum class symbol_name_match_type): New.
630         (class ada_lookup_name_info): New.
631         (struct demangle_for_lookup_info): New.
632         (class lookup_name_info): New.
633         (symbol_name_matcher_ftype): New.
634         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
635         (symbol_matches_search_name): Declare.
636         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
637         (default_collect_symbol_completion_matches)
638         (collect_symbol_completion_matches)
639         (collect_file_symbol_completion_matches): Add name_match_type
640         parameter.
641         (iterate_over_symbols): Use lookup_name_info.
642         (completion_list_add_name): Declare.
643         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
644         (strncmp_iw_with_mode): Now extern.
645         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
646         (strncmp_iw_with_mode): Declare.
647
648 2017-11-08  Keith Seitz  <keiths@redhat.com>
649             Pedro Alves  <palves@redhat.com>
650
651         * ada-lang.c (ada_language_defn): Install
652         default_search_name_hash.
653         * buildsym.c (struct buildsym_compunit): <language>: New field.
654         (finish_block_internal): Pass language when creating dictionaries.
655         (start_buildsym_compunit, start_symtab): New language parameters.
656         Use them.
657         (restart_symtab): Pass down compilation unit's language.
658         * buildsym.h (enum language): Forward declare.
659         (start_symtab): New 'language' parameter.
660         * c-lang.c (c_language_defn, cplus_language_defn)
661         (asm_language_defn, minimal_language_defn): Install
662         default_search_name_hash.
663         * coffread.c (coff_start_symtab): Adjust.
664         * d-lang.c (d_language_defn): Install default_search_name_hash.
665         * dbxread.c (struct symloc): Add 'pst_language' field.
666         (PST_LANGUAGE): Define.
667         (start_psymtab, read_ofile_symtab): Use it.
668         (process_one_symbol): New 'language' parameter.  Pass it down.
669         * dictionary.c (struct dictionary) <language>: New field.
670         (DICT_LANGUAGE): Define.
671         (dict_create_hashed, dict_create_hashed_expandable)
672         (dict_create_linear, dict_create_linear_expandable): New parameter
673         'language'.  Set the dictionary's language.
674         (iter_match_first_hashed): Adjust to rename.
675         (insert_symbol_hashed): Assert we don't see mismatching
676         languages.  Adjust to rename.
677         (dict_hash): Rename to ...
678         (default_search_name_hash): ... this and make extern.
679         * dictionary.h (struct language_defn): Forward declare.
680         (dict_create_hashed): New parameter 'language'.
681         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
682         * f-lang.c (f_language_defn): Install default_search_name_hash.
683         * go-lang.c (go_language_defn): Install default_search_name_hash.
684         * jit.c (finalize_symtab): Pass compunit's language to dictionary
685         creation.
686         * language.c (unknown_language_defn, auto_language_defn):
687         * language.h (language_defn::la_search_name_hash): New field.
688         (default_search_name_hash): Declare.
689         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
690         * mdebugread.c (new_block): New parameter 'language'.
691         * mdebugread.c (parse_symbol): Pass symbol language to block
692         allocation.
693         (psymtab_to_symtab_1): Pass down language.
694         (new_symtab): Pass compunit's language to block allocation.
695         * objc-lang.c (objc_language_defn): Install
696         default_search_name_hash.
697         * opencl-lang.c (opencl_language_defn):
698         * p-lang.c (pascal_language_defn): Install
699         default_search_name_hash.
700         * rust-lang.c (rust_language_defn): Install
701         default_search_name_hash.
702         * stabsread.h (enum language): Forward declare.
703         (process_one_symbol): Add 'language' parameter.
704         * symtab.c (search_name_hash): New function.
705         * symtab.h (search_name_hash): Declare.
706         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
707
708 2017-11-08  Pedro Alves  <palves@redhat.com>
709
710         * cp-name-parser.y (main): Don't initialize extra_chars.
711
712 2017-11-07  Tom Tromey  <tom@tromey.com>
713
714         * event-top.h (command_handler): Constify.
715         * record-full.c (cmd_record_full_start): Update.
716         * thread.c (thread_apply_all_command): Update.
717         * printcmd.c (eval_command): Update.
718         * mi/mi-main.c (mi_execute_cli_command): Update.
719         (mi_execute_async_cli_command): Update.
720         * tui/tui-stack.c (tui_update_command): Update.
721         * cli/cli-interp.c (safe_execute_command): Constify.
722         * record.c (record_start): Update.
723         (record_start, record_stop, cmd_record_start): Update.
724         * record-btrace.c (cmd_record_btrace_bts_start): Update.
725         (cmd_record_btrace_pt_start): Update.
726         (cmd_record_btrace_start): Update.
727         (cmd_record_btrace_start): Update.
728         * reverse.c (exec_reverse_once): Update.
729         * python/python.c (execute_gdb_command): Don't copy the command.
730         * event-top.c (command_line_handler): Update.
731         (command_handler): Constify.
732         * defs.h (deprecated_call_command_hook): Constify.
733         * cli/cli-script.h (execute_user_command): Constify.
734         * cli/cli-script.c (execute_user_command): Constify.
735         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
736         (enum command_control_type): Update.
737         * main.c (catch_command_errors): Remove non-const overload.
738         (catch_command_errors_ftype): Remove.
739         * python/py-cmd.c (cmdpy_function): Constify.
740         * guile/scm-cmd.c (cmdscm_function): Constify.
741         * cli/cli-dump.c (call_dump_func): Constify.
742         * cli/cli-decode.c (do_const_cfunc): Constify.
743         (do_sfunc): Constify.
744         (cmd_func): Constify.
745         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
746         * top.h (execute_command): Constify.
747         * top.c (execute_command): Constify.
748         (execute_command_to_string): Constify.
749         (deprecated_call_command_hook): Constify.
750         * command.h (cmd_func): Constify.
751         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
752
753 2017-11-07  Tom Tromey  <tom@tromey.com>
754
755         * ada-lang.c (catch_ada_exception_command): Constify.
756         (catch_assert_command): Constify.
757         * break-catch-throw.c (catch_catch_command, catch_throw_command)
758         (catch_rethrow_command): Constify.
759         (catch_exception_command_1): Constify.
760         * breakpoint.h (add_catch_command): Constify.
761         * break-catch-syscall.c (catch_syscall_command_1): Constify.
762         (catch_syscall_split_args): Constify.
763         * break-catch-sig.c (catch_signal_command): Constify.
764         (catch_signal_split_args): Constify.
765         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
766         cmd_const_sfunc_ftype.
767         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
768         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
769         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
770         (add_setshow_string_cmd, struct cmd_list_element)
771         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
772         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
773         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
774         Constify.
775         (set_cmd_sfunc): Constify.
776         (empty_sfunc): Constify.
777         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
778         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
779         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
780         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
781         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
782         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
783         Constify.
784         (set_cmd_sfunc): Constify.
785         (cmd_sfunc_ftype): Remove.
786         * compile/compile.c (set_compile_args): Constify.
787         * infrun.c (set_disable_randomization): Constify.
788         * infcmd.c (set_args_command, set_cwd_command): Constify.
789         * breakpoint.c (set_condition_evaluation_mode): Constify.
790         (add_catch_command): Constify.
791         (catch_fork_command_1, catch_exec_command_1)
792         (catch_load_command_1, catch_unload_command_1): Constify.
793         (catch_load_or_unload): Constify.
794         * guile/scm-param.c (pascm_set_func): Constify.
795         (add_setshow_generic): Constify.
796         * python/py-param.c (get_set_value): Constify.
797         * top.h (set_verbose): Constify.
798         * tui/tui-win.c (tui_set_var_cmd): Constify.
799         * mi/mi-main.c (set_mi_async_command): Constify.
800         * cli/cli-logging.c (set_logging_overwrite)
801         (set_logging_redirect): Constify.
802         * value.c (set_max_value_size): Constify.
803         * valprint.c (set_input_radix, set_output_radix): Constify.
804         * utils.c (set_width_command, set_height_command): Constify.
805         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
806         * tracepoint.c (set_disconnected_tracing)
807         (set_circular_trace_buffer, set_trace_buffer_size)
808         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
809         * top.c (set_history_size_command, set_verbose, set_editing)
810         (set_gdb_datadir, set_history_filename): Constify.
811         * target.c (set_targetdebug, maint_set_target_async_command)
812         (maint_set_target_non_stop_command, set_target_permissions)
813         (set_write_memory_permission): Constify.
814         (open_target): Constify.
815         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
816         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
817         * symtab.c (set_symbol_cache_size_handler): Constify.
818         * symfile.c (set_ext_lang_command): Constify.
819         * symfile-debug.c (set_debug_symfile): Constify.
820         * source.c (set_directories_command): Constify.
821         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
822         * serial.c (set_parity): Constify.
823         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
824         * remote.c (set_remote_exec_file, set_remotebreak)
825         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
826         * record.c (set_record_insn_history_size)
827         (set_record_call_history_size): Constify.
828         * record-full.c (set_record_full_insn_max_num): Constify.
829         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
830         * osabi.c (set_osabi): Constify.
831         * mips-tdep.c (set_mips64_transfers_32bit_regs)
832         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
833         * maint.c (maintenance_set_profile_cmd): Constify.
834         * linux-thread-db.c (set_libthread_db_search_path): Constify.
835         * language.c (set_language_command, set_range_command)
836         (set_case_command): Constify.
837         * infrun.c (set_non_stop, set_observer_mode)
838         (set_stop_on_solib_events, set_schedlock_func)
839         (set_exec_direction_func): Constify.
840         * infcmd.c (set_inferior_tty_command): Constify.
841         * disasm.c (set_disassembler_options_sfunc): Constify.
842         * demangle.c (set_demangling_command): Constify.
843         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
844         * cris-tdep.c (set_cris_version, set_cris_mode)
845         (set_cris_dwarf2_cfi): Constify.
846         * corefile.c (set_gnutarget_command): Constify.
847         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
848         (set_target_wide_charset_sfunc): Constify.
849         * breakpoint.c (update_dprintf_commands): Constify.
850         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
851         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
852         (set_disassembly_style_sfunc): Constify.
853         * arch-utils.c (set_endian, set_architecture): Constify.
854         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
855         * agent.c (set_can_use_agent): Constify.
856
857 2017-11-07  Tom Tromey  <tom@tromey.com>
858
859         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
860         (go32_pde, go32_pte, go32_pte_for_address): Constify.
861         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
862         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
863         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
864         (parse_int_arg, show_thread_default_detach_sc_cmd)
865         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
866         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
867         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
868         (show_task_pause_cmd, set_task_detach_sc_cmd)
869         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
870         (set_noninvasive_cmd, set_thread_pause_cmd)
871         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
872         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
873         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
874         * windows-nat.c (display_selectors): Constify.
875         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
876         non-const "cfunc".
877         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
878         (cmd_cfunc_eq): Likewise.
879         (struct cmd_list_element): Likewise.
880         (do_cfunc): Remove.
881         (cli_user_command_p): Update.
882         * command.h (add_cmd): Remove non-const overload.
883         (cmd_cfunc_ftype): Remove typedef.
884         (cmd_cfunc_eq): Remove non-const overload.
885         * value.c (show_values): Constify.
886         * thread.c (thread_apply_all_command): Constify.
887         * symfile.c (load_command): Constify.
888         * source.c (directory_command): Constify.
889         * maint.c (maintenance_internal_error)
890         (maintenance_demangler_warning, maintenance_space_display)
891         (maintenance_print_architecture, maintenance_translate_address)
892         (maintenance_info_selftests, maintenance_internal_warning):
893         Constify.
894         * breakpoint.c (disable_trace_command, enable_trace_command):
895         Constify.
896         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
897         Constify.
898         (add_auto_load_safe_path): Constify.
899         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
900         * top.h (show_commands): Constify.
901         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
902         * sparc64-tdep.c (adi_examine_command): Constify.
903         (adi_assign_command): Constify.
904
905 2017-11-07  Tom Tromey  <tom@tromey.com>
906
907         * frame.h (info_locals_command, info_args_command): Constify.
908         * auto-load.h (auto_load_info_scripts): Constify.
909         * inferior.h (registers_info): Constify.
910         * copying.c: Rebuild.
911         * copying.awk: Constify generated commands.
912         * auto-load.c (auto_load_info_scripts)
913         (info_auto_load_gdb_scripts): Constify.
914         * cli/cli-decode.c (struct cmd_list_element): Take a
915         cmd_const_cfunc_ftype.
916         * command.h (add_info): Take a cmd_const_cfunc_ftype.
917         * tui/tui-win.c (tui_all_windows_info): Constify.
918         * python/py-auto-load.c (info_auto_load_python_scripts):
919         Constify.
920         * cli/cli-cmds.c (show_command): Remove non-const overload.
921         * tracepoint.c (info_tvariables_command, info_scope_command):
922         Constify.
923         (info_static_tracepoint_markers_command): Constify.
924         * thread.c (info_threads_command): Constify.
925         (print_thread_info_1): Constify.
926         * target.c (info_target_command): Constify.
927         * symtab.c (info_sources_command, info_functions_command)
928         (info_types_command): Constify.
929         (info_variables_command): Remove non-const overload.
930         * symfile.c (info_ext_lang_command): Constify.
931         * stack.c (info_frame_command, info_locals_command)
932         (info_args_command): Constify.
933         (backtrace_command): Remove non-const overload.
934         * source.c (info_source_command, info_line_command): Constify.
935         * solib.c (info_sharedlibrary_command): Constify.
936         * skip.c (info_skip_command): Constify.
937         * ser-go32.c (info_serial_command): Constify.
938         * reverse.c (info_bookmarks_command): Constify.
939         * printcmd.c (info_symbol_command, info_address_command)
940         (info_display_command): Constify.
941         * osdata.c (info_osdata_command): Constify.
942         * objc-lang.c (info_selectors_command, info_classes_command):
943         Constify.
944         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
945         * memattr.c (info_mem_command): Constify.
946         * macrocmd.c (info_macro_command, info_macros_command): Constify.
947         * linux-fork.c (info_checkpoints_command): Constify.
948         * infrun.c (info_signals_command): Constify.
949         * inflow.c (info_terminal_command): Constify.
950         * inferior.c (info_inferiors_command): Constify.
951         (print_inferior): Constify.
952         * infcmd.c (info_program_command, info_all_registers_command)
953         (info_registers_command, info_vector_command)
954         (info_float_command): Constify.
955         (registers_info): Constify.
956         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
957         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
958         Constify.
959         * f-valprint.c (info_common_command): Constify.
960         * dcache.c (info_dcache_command): Constify.
961         (dcache_info_1): Constify.
962         * darwin-nat-info.c (info_mach_tasks_command)
963         (info_mach_task_command, info_mach_ports_command)
964         (info_mach_port_command, info_mach_threads_command)
965         (info_mach_thread_command, info_mach_regions_command)
966         (info_mach_regions_recurse_command, info_mach_region_command)
967         (info_mach_exceptions_command): Constify.
968         (get_task_from_args): Constify.
969         * cp-support.c (info_vtbl_command): Constify.
970         * breakpoint.c (info_watchpoints_command)
971         (info_tracepoints_command): Constify.
972         (info_breakpoints_command): Remove non-const overload.
973         * avr-tdep.c (avr_io_reg_read_command): Constify.
974         * auxv.c (info_auxv_command): Constify.
975         * ada-tasks.c (info_tasks_command): Constify.
976         (info_task): Constify.
977         * ada-lang.c (info_exceptions_command): Constify.
978
979 2017-11-07  Tom Tromey  <tom@tromey.com>
980
981         * solib.h (no_shared_libraries): Constify.
982         * frame.h (return_command): Constify.
983         * cli/cli-cmds.h (quit_command): Constify.
984         * top.h (quit_command, execute_command): Constify.
985         * target.h (flash_erase_command): Constify.
986         * inferior.h (set_inferior_args, attach_command): Constify.
987         * tracepoint.h (start_tracing, stop_tracing): Constify.
988         * breakpoint.h (break_command, tbreak_command)
989         (hbreak_command_wrapper, thbreak_command_wrapper)
990         (rbreak_command_wrapper, watch_command_wrapper)
991         (awatch_command_wrapper, rwatch_command_wrapper)
992         (get_tracepoint_by_number): Constify.
993         * symtab.c (info_variables_command, rbreak_command)
994         (symtab_symbol_info): Constify.
995         (info_variables_command): Add non-const overload.
996         * top.c (dont_repeat_command): Constify.
997         * breakpoint.c (ignore_command, commands_command)
998         (condition_command, tbreak_command, hbreak_command)
999         (thbreak_command, clear_command, break_command)
1000         (info_breakpoints_command, watch_command, rwatch_command)
1001         (awatch_command, trace_command, ftrace_command, strace_command)
1002         (trace_pass_command, break_range_command, dprintf_command)
1003         (agent_printf_command, get_tracepoint_by_number)
1004         (watch_maybe_just_location, trace_pass_command): Constify.
1005         (info_breakpoints_command): Add non-const overload.
1006         * tracefile.c (tsave_command): Constify.
1007         * infcmd.c (attach_command, disconnect_command, signal_command)
1008         (queue_signal_command, stepi_command, nexti_command)
1009         (finish_command, next_command, step_command, until_command)
1010         (advance_command, jump_command, continue_command, run_command)
1011         (start_command, starti_command, interrupt_command)
1012         (run_command_1, set_inferior_args, step_1): Constify.
1013         * inferior.c (add_inferior_command, remove_inferior_command)
1014         (clone_inferior_command): Constify.
1015         * linux-fork.c (checkpoint_command, restart_command): Constify.
1016         * windows-nat.c (signal_event_command): Constify.
1017         * guile/guile.c (guile_repl_command, guile_command): Constify.
1018         * printcmd.c (x_command, display_command, printf_command)
1019         (output_command, set_command, call_command, print_command)
1020         (eval_command): Constify.
1021         (non_const_set_command): Remove.
1022         (_initialize_printcmd): Update.
1023         * source.c (forward_search_command, reverse_search_command):
1024         Constify.
1025         * jit.c (jit_reader_load_command, jit_reader_unload_command):
1026         Constify.
1027         * infrun.c (handle_command): Constify.
1028         * memattr.c (mem_command): Constify.
1029         * stack.c (return_command, up_command, up_silently_command)
1030         (down_command, down_silently_command, frame_command)
1031         (backtrace_command, func_command, backtrace_command_1): Constify.
1032         (backtrace_command): Add non-const overload.
1033         * remote-sim.c (simulator_command): Constify.
1034         * exec.c (set_section_command): Constify.
1035         * tracepoint.c (tdump_command, trace_variable_command)
1036         (tstatus_command, tstop_command, tstart_command)
1037         (end_actions_pseudocommand, while_stepping_pseudocommand)
1038         (collect_pseudocommand, teval_pseudocommand, actions_command)
1039         (start_tracing, stop_tracing): Constify.
1040         * value.c (init_if_undefined_command): Constify.
1041         * tui/tui-stack.c (tui_update_command): Constify.
1042         * tui/tui-win.c (tui_refresh_all_command)
1043         (tui_set_tab_width_command, tui_set_win_height_command)
1044         (tui_set_focus_command, tui_scroll_forward_command)
1045         (tui_scroll_backward_command, tui_scroll_left_command)
1046         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1047         (tui_set_win_height): Constify.
1048         * tui/tui-layout.c (tui_layout_command): Constify.
1049         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1050         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1051         (proc_untrace_sysexit_cmd): Constify.
1052         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1053         (threadset_test_cmd, threadlist_update_test_cmd)
1054         (threadalive_test): Constify.
1055         * objc-lang.c (print_object_command): Constify.
1056         * command.h (add_com): Constify.
1057         * cli/cli-dump.c (restore_command): Constify.
1058         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1059         (help_command, complete_command, shell_command, edit_command)
1060         (list_command, disassemble_command, make_command)
1061         (apropos_command, alias_command): Constify.
1062         * cli/cli-script.c (document_command, define_command)
1063         (while_command, if_command, validate_comname): Constify.
1064         * cli/cli-decode.c (struct cmd_list_element): Change type of
1065         "fun".
1066         * target.c (do_monitor_command, flash_erase_command): Constify.
1067         * regcache.c (reg_flush_command): Constify.
1068         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1069         (reverse_nexti, reverse_continue, reverse_finish)
1070         (save_bookmark_command, goto_bookmark_command)
1071         (exec_reverse_once): Constify.
1072         * python/python.c (python_interactive_command, python_command):
1073         Constify.
1074         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1075         Constify.
1076         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1077         * gcore.c (gcore_command): Constify.
1078
1079 2017-11-07  Tom Tromey  <tom@tromey.com>
1080
1081         * printcmd.c (x_command): Call set_repeat_arguments.
1082         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1083         * top.c (repeat_arguments): New global.
1084         (set_repeat_arguments): New function.
1085         (execute_command): Handle repeat_arguments.
1086         (show_commands): Calls set_repeat_arguments.
1087         * command.h (set_repeat_arguments): Declare.
1088
1089 2017-11-07  Tom Tromey  <tom@tromey.com>
1090
1091         * stack.c (backtrace_command): Use std::string.
1092         (backtrace_command_1): Make "count_exp" const.
1093
1094 2017-11-07  Tom Tromey  <tom@tromey.com>
1095
1096         * source.c (directory_switch, mod_path, add_path): Constify.
1097         * defs.h (add_path, mod_path, directory_switch): Constify.
1098         * mi/mi-cmd-env.c (env_mod_path): Constify.
1099
1100 2017-11-07  Tom Tromey  <tom@tromey.com>
1101
1102         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1103         (run_command_1, continue_command, step_1, jump_command)
1104         (signal_command, until_command, advance_command, finish_command)
1105         (attach_command): Update.
1106
1107 2017-11-07  Tom Tromey  <tom@tromey.com>
1108
1109         * command.h (set_cmd_cfunc): Don't declare.
1110         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1111
1112 2017-11-07  Tom Tromey  <tom@tromey.com>
1113
1114         * stack.c (select_frame_command): Constify.
1115         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1116         * command.h (add_com_suppress_notification): Constify.
1117
1118 2017-11-07  Tom Tromey  <tom@tromey.com>
1119
1120         * breakpoint.c (stop_command): Constify.
1121         * cli/cli-decode.c (struct cmd_list_element): Constify.
1122         * command.h (add_abbrev_prefix_cmd): Constify.
1123
1124 2017-11-07  Pedro Alves  <palves@redhat.com>
1125
1126         * breakpoint.c (extract_bp_kind): New enum.
1127         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1128         factored out from ...
1129         (extract_bp_number_and_location): ... here.
1130         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1131
1132 2017-11-07  Pedro Alves  <palves@redhat.com>
1133
1134         * breakpoint.c (extract_bp_number_and_location): Change return
1135         type to void.  Throw error instead of warning.
1136         (enable_disable_command): Adjust.
1137
1138 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1139             Pedro Alves  <palves@redhat.com>
1140
1141         * breakpoint.c (map_breakpoint_number_range): New, factored out
1142         from ...
1143         (map_breakpoint_numbers): ... here.
1144         (find_location_by_number): Change parameters from string to
1145         breakpoint number and location.
1146         (extract_bp_number_and_location): New function.
1147         (enable_disable_bp_num_loc)
1148         (enable_disable_breakpoint_location_range)
1149         (enable_disable_command): New functions, factored out ...
1150         (enable_command, disable_command): ... these functions, and
1151         adjusted to support ranges.
1152         * NEWS: Document enable/disable breakpoint location range feature.
1153
1154 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1155
1156         * MAINTAINERS (Write After Approval): Update my e-mail address.
1157
1158 2017-11-06  Pedro Alves  <palves@redhat.com>
1159
1160         * gnu-nat.c (gnu_terminal_init): Delete.
1161         (gnu_target): Don't install gnu_terminal_init.
1162         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1163         (child_terminal_init): ... this function.
1164
1165 2017-11-06  Pedro Alves  <palves@redhat.com>
1166
1167         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1168         sgtty.h.
1169         * config.in, configure: Regenerate.
1170
1171 2017-11-06  Pedro Alves  <palves@redhat.com>
1172
1173         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1174         (async_init_signals): Adjust.
1175         (handle_stop_sig): Rename to ...
1176         (handle_sigtstp): ... this.
1177         (async_stop_sig): Rename to ...
1178         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1179         SIGTSTP path.
1180         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1181         instead of STOP_SIGNAL thoughout.
1182         (handle_stop_sig): Rename to ...
1183         (handle_sigtstp): ... this.
1184         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1185
1186 2017-11-06  Pedro Alves  <palves@redhat.com>
1187
1188         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1189         longer set flags twice in row.
1190
1191 2017-11-06  Pedro Alves  <palves@redhat.com>
1192
1193         * Makefile.in (SER_HARDWIRE): Update comment.
1194         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1195         * common/gdb_termios.h: Delete file.
1196         * common/job-control.c: Include termios.h and unistd.h instead of
1197         gdb_termios.h.
1198         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1199         check.
1200         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1201         Remove sgtty code.
1202         * configure.ac: No longer check for termio.h and sgtty.h.
1203         * configure: Regenerate.
1204         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1205         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1206         Replace PROCESS_GROUP_TYPE references with pid_t references
1207         throughout.
1208         (gdb_getpgrp): Delete.
1209         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1210         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1211         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1212         gdb_getpgrp.  Use serial_set_tty_state instead aof
1213         serial_noflush_set_tty_state.  Remove sgtty code.
1214         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1215         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1216         (inferior_process_group): Now returns pid_t.
1217         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1218         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1219         * ser-event.c (serial_event_ops): Update.
1220         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1221         (dos_ops): Update.
1222         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1223         * ser-pipe.c (pipe_ops): Update.
1224         * ser-tcp.c (tcp_ops): Update.
1225         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1226         HAVE_TERMIOS checks.
1227         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1228         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1229         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1230         assume termios.
1231         (hardwire_noflush_set_tty_state): Delete.
1232         (hardwire_print_tty_state, hardwire_drain_output)
1233         (hardwire_flush_output, hardwire_flush_input)
1234         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1235         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1236         code, and assume termios.
1237         (hardwire_ops): Update.
1238         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1239         * serial.c (serial_noflush_set_tty_state): Delete.
1240         * serial.h (serial_noflush_set_tty_state): Delete.
1241         (serial_ops::noflush_set_tty_state): Delete.
1242
1243 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1244
1245         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1246         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1247         (COMMON_OBS): Remove doublest.o and dfp.o.
1248         Do not build target-float.c (instead of doublest.c)
1249         with -Wformat-nonliteral.
1250
1251         * doublest.c: Remove file.
1252         * doublest.h: Remove file.
1253         * dfp.c: Remove file.
1254         * dfp.h: Remove file.
1255
1256         * target-float.c: Do not include "doublest.h" and "dfp.h".
1257         (DOUBLEST): Move here from doublest.h.
1258         (enum float_kind): Likewise.
1259         (FLOATFORMAT_CHAR_BIT): Likewise.
1260         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1261         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1262         (floatformat_precision): Likewise.
1263         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1264         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1265         Likewise.
1266         (host_float_format, host_double_format, host_long_double_format):
1267         Likewise.
1268         (floatformat_to_string, floatformat_from_string): Likewise.
1269         (floatformat_to_doublest): Likewise.  Also, inline the original
1270         convert_floatformat_to_doublest.
1271         (floatformat_from_doublest): Likewise.  Also, inline the original
1272         convert_floatformat_from_doublest.
1273
1274         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1275         (MAX_DECIMAL_STRING): Move here from dfp.c.
1276         (match_endianness): Likewise.
1277         (set_decnumber_context, decimal_check_errors): Likewise.
1278         (decimal_from_number, decimal_to_number): Likewise.
1279         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1280         (decimal_from_longest, decimal_from_ulongest): Likewise.
1281         (decimal_to_longest): Likewise.
1282         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1283         (decimal_convert): Likewise.
1284
1285 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1286
1287         * doublest.c: Do not include "gdbtypes.h".
1288         (extract_typed_floating): Remove.
1289         (store_typed_floating): Remove.
1290         (convert_typed_floating): Remove.
1291         * doublest.h (struct type): Remove.
1292         (DOUBLEST_PRINT_FORMAT): Remove.
1293         (DOUBLEST_SCAN_FORMAT): Remove.
1294         (extract_typed_floating): Remove.
1295         (store_typed_floating): Remove.
1296         (convert_typed_floating): Remove.
1297
1298         * dfp.c (decimal_from_doublest): Remove.
1299         (decimal_to_doublest): Remove.
1300         * dfp.h: Do not include "doublest.h".
1301         (decimal_from_doublest): Remove.
1302         (decimal_to_doublest): Remove.
1303
1304         * value.c: Do not include "doublest.h" and "dfp.h".
1305         (value_as_double): Remove.
1306         (unpack_double): Remove.
1307         (value_from_double): Remove.
1308         (value_from_decfloat): Remove.
1309         * value.h: Do not include "doublest.h".
1310         (value_as_double): Remove.
1311         (unpack_double): Remove.
1312         (value_from_double): Remove.
1313         (value_from_decfloat): Remove.
1314
1315 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1316
1317         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1318         (i386_extract_return_value): Use target_float_convert.
1319         (i386_store_return_value): Likewise.
1320         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1321         (i387_value_to_register): Likewise.
1322         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1323         (ia64_register_to_value): Use target_float_convert.
1324         (ia64_value_to_register): Likewise.
1325         (ia64_extract_return_value): Likewise.
1326         (ia64_store_return_value): Likewise.
1327         (ia64_push_dummy_call): Likewise.
1328         * m68k-tdep.c: Include "target-float.h".
1329         (m68k_register_to_value): Use target_float_convert.
1330         (m68k_value_to_register): Likewise.
1331         (m68k_svr4_extract_return_value): Likewise.
1332         (m68k_svr4_store_return_value): Likewise.
1333         * ppc-sysv-tdep.c: Include "target-float.h".
1334         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1335         (do_ppc_sysv_return_value): Likewise.
1336         (ppc64_sysv_abi_push_freg): Likewise.
1337         (ppc64_sysv_abi_return_value_base): Likewise.
1338         * rs6000-aix-tdep.c: Include "target-float.h".
1339         (rs6000_push_dummy_call): Use target_float_convert.
1340         (rs6000_return_value): Likewise.
1341         * rs6000-lynx178-tdep.c: Include "target-float.h".
1342         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1343         (rs6000_lynx178_return_value): Likewise.
1344         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1345         (rs6000_register_to_value): Use target_float_convert.
1346         (rs6000_value_to_register): Likewise.
1347         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1348         (arm_extract_return_value): Use target_float_convert.
1349         (arm_store_return_value): Likewise.
1350         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1351         (sh_register_convert_to_virtual): Use target_float_convert.
1352         (sh_register_convert_to_raw): Likewise.
1353         * sh64-tdep.c: Include "target-float.h".
1354         (sh64_extract_return_value): Use target_float_convert.
1355         (sh64_register_convert_to_virtual): Likewise.
1356         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1357
1358 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1359
1360         * target-float.c (floatformat_to_host_double): New function.
1361         (floatformat_from_host_double): Likewise.
1362         (target_float_to_host_double): Likewise.
1363         (target_float_from_host_double): Likewise.
1364         * target-float.h (target_float_to_host_double): Add prototype.
1365         (target_float_from_host_double): Likewise.
1366
1367         * guile/scm-value.c: Include "target-float.h".
1368         (gdbscm_value_to_real): Use target_float_to_host_double.
1369         Handle integer source values via value_as_long.
1370         * guile/scm-math.c: Include "target-float.h".  Do not include
1371         "doublest.h", "dfp.h", and "expression.h".
1372         (vlscm_convert_typed_number): Use target_float_from_host_double.
1373         (vlscm_convert_number): Likewise.
1374
1375         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1376         (convert_value_from_python): Use target_float_from_host_double.
1377
1378 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1379
1380         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1381         (cast_from_fixed): Likewise.
1382         (ada_scaling_type): New function.
1383         (ada_delta): Return value instead of DOUBLEST.  Perform target
1384         arithmetic instead of host arithmetic.
1385         (scaling_factor): Rename to ...
1386         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1387         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1388         (ada_fixed_to_float): Remove.
1389         (ada_float_to_fixed): Remove.
1390         * ada-lang.h (ada_fixed_to_float): Remove.
1391         (ada_float_to_fixed): Remove.
1392         (ada_delta): Return value instead of DOUBLEST.
1393         (ada_scaling_factor): Add prototype.
1394
1395         * ada-typeprint.c: Include "target-float.h".
1396         (print_fixed_point_type): Perform target arithmetic instead of
1397         host arithmetic.
1398         * ada-valprint.c: Include "target-float.h".
1399         (ada_val_print_num): Perform target arithmetic instead of
1400         host arithmetic for fixed-point types.
1401
1402 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1403
1404         * target-float.c: Include <math.h>.
1405         (floatformat_binop): New function.
1406         (floatformat_compare): Likewise.
1407         (target_float_binop): Likewise.
1408         (target_float_compare): Likewise.
1409         * target-float.h: Include "expression.h".
1410         (target_float_binop): Add prototype.
1411         (target_float_compare): Likewise.
1412
1413         * valarith.c: Do not include "doublest.h" and "dfp.h".
1414         Include "common/byte-vector.h".
1415         (value_args_as_decimal): Remove, replace by ...
1416         (value_args_as_target_float): ... this function.  Handle both
1417         binary and decimal target floating-point formats.
1418         (scalar_binop): Handle both binary and decimal FP using
1419         value_args_as_target_float and target_float_binop.
1420         (value_equal): Handle both binary and decimal FP using
1421         value_args_as_target_float and target_float_compare.
1422         (value_less): Likewise.
1423         (value_pos): Handle all scalar types as simple copy.
1424         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1425         * dfp.c (decimal_binop): Throw error instead of internal_error
1426         when called with an unsupported operation code.
1427
1428 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1429
1430         * target-float.c (target_float_to_string): New function.
1431         (target_float_from_string): New function.
1432         * target-float.h (target_float_to_string): Add prototype.
1433         (target_float_from_string): Add prototype.
1434
1435         * valprint.c: Include "target-float.h".  Do not include
1436         "doublest.h" and "dfp.h".
1437         (print_floating): Use target_float_to_string.
1438         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1439         (printf_floating): Use target_float_to_string.
1440         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1441         (print_i387_value): Use target_float_to_string.
1442         * mips-tdep.c: Include "target-float.h".
1443         (mips_print_fp_register): Use target_float_to_string.
1444         * sh64-tdep.c: Include "target-float.h".
1445         (sh64_do_fp_register): Use target_float_to_string.
1446
1447         * parse.c: Include "target-float.h".  Do not include
1448         "doublest.h" and "dfp.h".
1449         (parse_float): Use target_float_from_string.
1450         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1451         (define_symbol): Use target_float_from_string.
1452         * gdbarch-selftests.c: Include "target-float.h".
1453         (register_to_value_test): Use target_float_from_string.
1454
1455 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1456
1457         * Makefile.c (SFILES): Add target-float.c.
1458         (HFILES_NO_SRCDIR): Add target-float.h.
1459         (COMMON_OBS): Add target-float.o.
1460         * target-float.h: New file.
1461         * target-float.c: New file.
1462
1463         * doublest.c (floatformat_classify): Fix detection of float_zero.
1464
1465         * gdbtypes.c (is_floating_type): New function.
1466         * gdbtypes.h (is_floating_type): Add prototype.
1467
1468         * value.c: Do not include "floatformat.h".
1469         (unpack_double): Use target_float_is_valid.
1470         (is_floating_value): New function.
1471         * value.h (is_floating_value): Add prototype-
1472
1473         * valarith.c: Include "target-float.h".
1474         (value_logical_not): Use target_float_is_zero.
1475
1476         * python/py-value.c: Include "target-float.h".
1477         (valpy_nonzero): Use target_float_is_zero.
1478
1479 2017-11-04  Tom Tromey  <tom@tromey.com>
1480
1481         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1482
1483 2017-11-04  Tom Tromey  <tom@tromey.com>
1484
1485         * breakpoint.c (set_momentary_breakpoint): Return
1486         breakpoint_up.
1487         (until_break_command): Update.
1488         (new_until_break_fsm): Change argument types to
1489         breakpoint_up.
1490         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1491         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1492         Remove.
1493         * infcmd.c (finish_forward): Update.
1494         * breakpoint.h (set_momentary_breakpoint)
1495         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1496         (make_cleanup_delete_breakpoint): Remove.
1497         (struct breakpoint_deleter): New.
1498         (breakpoint_up): New typedef.
1499         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1500         (insert_exception_resume_breakpoint): Update.
1501         (insert_exception_resume_from_probe): Update.
1502         (insert_longjmp_resume_breakpoint): Update.
1503         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1504         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1505         * infcall.c (call_function_by_hand_dummy): Update
1506
1507 2017-11-04  Tom Tromey  <tom@tromey.com>
1508
1509         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1510
1511 2017-11-04  Tom Tromey  <tom@tromey.com>
1512
1513         * linux-tdep.c (linux_core_info_proc_mappings): Use
1514         gdb::def_vector.
1515         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1516         "size" argument.
1517         (linux_corefile_thread): Update.
1518         (linux_make_corefile_notes): Remove unused variable.
1519
1520 2017-11-04  Tom Tromey  <tom@tromey.com>
1521
1522         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1523         gdb::byte_vector.
1524
1525 2017-11-04  Tom Tromey  <tom@tromey.com>
1526
1527         * objfiles.c (do_free_objfile_cleanup): Remove.
1528         * compile/compile-object-load.c (compile_object_load): Update.
1529         * objfiles.h (make_cleanup_free_objfile): Remove.
1530
1531 2017-11-04  Tom Tromey  <tom@tromey.com>
1532
1533         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1534         (adi_read_versions): Change "tags" to "gdb_byte *".
1535         (adi_print_versions): Likewise.
1536
1537 2017-11-04  Tom Tromey  <tom@tromey.com>
1538
1539         * breakpoint.c
1540         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1541         from start_rbreak_breakpoints.
1542         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1543         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1544         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1545         * symtab.c (do_end_rbreak_breakpoints): Remove.
1546         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1547
1548 2017-11-04  Tom Tromey  <tom@tromey.com>
1549
1550         * cp-namespace.c (reset_directive_searched): Remove.
1551         (cp_lookup_symbol_via_imports): Use scoped_restore.
1552         * cp-support.c (reset_directive_searched): Remove.
1553         (make_symbol_overload_list_using): Use scoped_restore.
1554         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1555         (reset_directive_searched): Remove.
1556
1557 2017-11-04  Tom Tromey  <tom@tromey.com>
1558
1559         * symfile.c (find_separate_debug_file_by_debuglink): Use
1560         unique_xmalloc_ptr.
1561
1562 2017-11-04  Tom Tromey  <tom@tromey.com>
1563
1564         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1565         type of "info".
1566         (compute_stack_depth): Likewise.
1567         (do_compile_dwarf_expr_to_c): Use std::vector.
1568
1569 2017-11-04  Tom Tromey  <tom@tromey.com>
1570
1571         * compile/compile-object-load.c (link_callbacks_einfo): Use
1572         std::string.
1573
1574 2017-11-04  Tom Tromey  <tom@tromey.com>
1575
1576         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1577         Use scoped_free_pendings.
1578         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1579         scoped_free_pendings.
1580         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1581         (xcoff_initial_scan): Likewise.
1582         * buildsym.c (reset_symtab_globals): Update comment.
1583         (scoped_free_pendings): Rename from really_free_pendings.
1584         (prepare_for_building): Update comment.
1585         (buildsym_init): Likewise.
1586         * buildsym.h (class scoped_free_pendings): New class.
1587         (really_free_pendings): Don't declare.
1588
1589 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1590
1591         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1592         output when converting a zero value to a special byteorder format.
1593
1594 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1595
1596         * frame.c (do_frame_register_read): Remove aspace.
1597         * jit.c (jit_frame_sniffer): Likwise.
1598         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1599         * regcache.c (regcache::regcache): Pass nullptr.
1600         (regcache_print): Caller updated.
1601         * regcache.h (regcache::regcache): Remove one constructor
1602         parameter aspace.
1603
1604 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1605
1606         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1607
1608 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1609
1610         * breakpoint.c (insert_single_step_breakpoints): Update.
1611         * frame.c (struct frame_info) <aspace>: Add const.
1612         (frame_save_as_regcache): Add const.
1613         (get_frame_address_space): Return const address_space *.
1614         * frame.h (get_frame_address_space): Update declaration.
1615         * infrun.c (struct step_over_info) <aspace>: Add const.
1616         (set_step_over_info): Make aspace const.
1617         (displaced_step_prepare_throw): Change variable const.
1618         (resume): Likewise.
1619         (proceed): Likewise.
1620         (adjust_pc_after_break): Likewise.
1621         (save_waitstatus): Likewise.
1622         (handle_signal_stop): Likewise.
1623         (keep_going_pass_signal): Likewise.
1624         * jit.c (jit_frame_sniffer): Add const.
1625         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1626         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1627         * record-full.c (record_full_wait_1): Likewise.
1628         * regcache.c (regcache::regcache): Change parameter to const.
1629         * regcache.h (regcache::regcache): Likewise.
1630         (regcache::aspace): Return const address_space *.
1631         (regcache) <m_aspace>: Add const.
1632
1633 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1634
1635         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1636         * frame.c (create_sentinel_frame): Likewise.
1637         * infrun.c (displaced_step_prepare_throw): Likewise.
1638         (resume): Likewise.
1639         (thread_still_needs_step_over_bp): Likewise.
1640         (proceed): Likewise.
1641         (do_target_wait): Likewise.
1642         (adjust_pc_after_break): Likewise.
1643         (handle_syscall_event): Likewise.
1644         (save_waitstatus): Likewise.
1645         (handle_inferior_event_1): Likewise.
1646         (handle_signal_stop): Likewise.
1647         (keep_going_pass_signal): Likewise.
1648         * linux-nat.c (status_callback): Likewise.
1649         (save_stop_reason): Likewise.
1650         (resume_stopped_resumed_lwps): Likewise.
1651         * record-full.c (record_full_exec_insn): Likewise.
1652         (record_full_wait_1): Likewise.
1653         * regcache.c (get_regcache_aspace): Remove.
1654         * regcache.h (get_regcache_aspace): Remove.
1655
1656 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1657
1658         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1659         (init_regcache_descr): Use gdbarch_num_regs.
1660         (regcache::regcache): Likewise.
1661         (regcache::get_register_status): Likewise.
1662         (regcache::assert_raw_regnum): Likewise.
1663         (regcache::cooked_read): Likewise.
1664         (regcache::cooked_read_value): Likewise.
1665         (regcache::cooked_write): Likewise.
1666         (regcache::dump): Likewise.
1667         (regcache::num_raw_registers): New method.
1668         * regcache.h (class regcache) <num_raw_registers>: New.
1669
1670 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1671
1672         * regcache.c (regcache::assert_regnum): New method.
1673         (regcache::invalidate): Call assert_regnum.
1674         (regcache::raw_update): Likewise.
1675         (regcache::raw_write): Likewise.
1676         (regcache::raw_read_part): Likewise.
1677         (regcache::raw_write_part): Likewise.
1678         (regcache::raw_supply): Likewise.
1679         (regcache::raw_supply_integer): Likewise.
1680         (regcache::raw_supply_zeroed): Likewise.
1681         (regcache::raw_collect): Likewise.
1682         (regcache::raw_collect_integer): Likewise.
1683         * regcache.h (regcache::assert_regnum): Declare.
1684
1685 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1686
1687         * regcache.c (regcache::dump): Remove code.
1688
1689 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1690
1691         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1692         Remove.
1693         <sizeof_cooked_register_status>: Remove.
1694         (init_regcache_descr): Update.
1695         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1696         (regcache::save): Likewise.
1697         (regcache::dump): Likewise.
1698
1699 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1700
1701         * ft32-tdep.c (ft32_fetch_instruction): New function.
1702         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1703
1704 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1705
1706         * cli/cli-script.c (execute_control_command): Rename to ...
1707         (execute_control_command_1): ... this.
1708         (execute_control_command): New function.
1709
1710 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1711
1712         * tracepoint.c (tfind_command): Remove const_cast.
1713
1714 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1715
1716         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1717
1718 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1719
1720         * common/common-utils.h (in_inclusive_range): New function.
1721         * arm-tdep.c (arm_record_extension_space): Use
1722         in_inclusive_range.
1723         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1724         * cris-tdep.c (cris_spec_reg_applicable): Use
1725         in_inclusive_range.
1726
1727 2017-10-30  Pedro Alves  <palves@redhat.com>
1728             Simon Marchi <simon.marchi@ericsson.com>
1729
1730         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1731         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1732
1733 2017-10-30  Pedro Alves  <palves@redhat.com>
1734
1735         * common/common-utils.c (string_appendf, string_vappendf): New
1736         functions.
1737         * common/common-utils.h (string_appendf, string_vappendf): New
1738         declarations.
1739         * unittests/common-utils-selftests.c (string_appendf_func)
1740         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1741         (string_vappendf_tests): New functions.
1742         (_initialize_common_utils_selftests): Register "string_appendf" and
1743         "string_vappendf tests".
1744
1745 2017-10-30  Pedro Alves  <palves@redhat.com>
1746
1747         * unittests/common-utils-selftests.c (format_func): New typedef.
1748         (string_printf_tests, string_vprintf_tests): Tests factored out
1749         and merged to ...
1750         (test_format_func): ... this new function.
1751         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1752         test_format_func.
1753
1754 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1755
1756         * darwin-nat.c: Remove include of gdb.h.
1757
1758 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1759
1760         * xtensa-xtregs.c: Fix formatting issues.
1761
1762 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1763
1764         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1765
1766 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1767
1768         PR python/21213
1769         * python/py-infthread.c (thpy_get_inferior): Increment reference
1770         of inferior before returning it.
1771
1772 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1773
1774         * unittests/common-utils-selftests.c (format): Add
1775         ATTRIBUTE_PRINTF.
1776
1777 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1778
1779         * xml-syscall.c (struct syscall_desc): Add constructor.
1780         <name>: Change type to std::string.
1781         (syscall_desc_up): New typedef.
1782         (syscall_desc_p): Remove typeder.
1783         (DEF_VEC_P(syscall_desc_p)): Remove.
1784         (struct syscall_group_desc): Add constructor.
1785         <name>: Change type to std::string.
1786         <syscalls>: Change type to std::vector.
1787         (syscall_group_desc_up): New typedef.
1788         (syscall_group_desc_p): Remove typedef.
1789         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1790         (struct syscalls_info) <syscalls>: Change type to std::vector of
1791         unique_ptr.
1792         <groups>: Likewise.
1793         <my_gdb_datadir>: Change type to std::string.
1794         (syscalls_info_up): New typedef.
1795         (allocate_syscalls_info): Remove.
1796         (syscalls_info_free_syscalls_desc): Remove.
1797         (syscalls_info_free_syscall_group_desc): Remove.
1798         (free_syscalls_info): Remove.
1799         (make_cleanup_free_syscalls_info): Remove.
1800         (syscall_group_create_syscall_group_desc): Adjust.
1801         (syscall_group_add_syscall): Adjust.
1802         (syscall_create_syscall_desc): Adjust.
1803         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1804         (init_syscalls_info): Adjust.
1805         (syscall_group_get_group_by_name): Adjust.
1806         (xml_get_syscall_number): Adjust.
1807         (xml_get_syscall_name): Adjust.
1808         (xml_list_of_syscalls): Adjust.
1809         (xml_list_syscalls_by_group): Adjust.
1810         (xml_list_of_groups): Adjust.
1811
1812 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1813
1814         * probe.h: Don't include gdb_vecs.h.
1815         (DEF_VEC_P (probe_p)): Remove.
1816         (find_probes_in_objfile): Return an std::vector.
1817         * probe.c (find_probes_in_objfile): Likewise.
1818         * breakpoint.c (breakpoint_objfile_data)
1819         <longjmp_probes>: Change type to std::vector.
1820         <exception_probes>: Likewise.
1821         (free_breakpoint_probes): Don't manually free vectors.
1822         (create_longjmp_master_breakpoint): Adjust.
1823         (create_exception_master_breakpoint): Adjust.
1824         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1825         parameter type, adjust.
1826         (svr4_create_solib_event_breakpoints): Adjust.
1827
1828 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1829
1830         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1831         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1832         with new.
1833         (free_breakpoint_probes): Rename to ...
1834         (free_breakpoint_objfile_data): ... this, and call delete on
1835         bp_objfile_data..
1836
1837 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1838
1839         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1840         (loaded_script_ptr): Remove typedef.
1841         (DEF_VEC_P (loaded_script_ptr)): Remove.
1842         (struct collect_matching_scripts_data): Add constructor.
1843         <scripts_p>: Change type to (pointer to) std::vector.
1844         (collect_matching_scripts_data): Adjust.
1845         (sort_scripts_by_name): Make suitable for std::sort.
1846         (print_scripts): Don't sort vector, adjust to std::vector.
1847         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1848
1849 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1850
1851         * symfile.c (filename_language): Make struct, not typedef.  Add
1852         constructor.
1853         <ext>: Change type to std::string.
1854         (DEF_VEC_O (filename_language)): Remove.
1855         (filename_language_table): Change type to std::vector.
1856         (add_filename_language): Adjust.
1857         (set_ext_lang_command): Adjust.
1858         (info_ext_lang_command): Adjust.
1859         (deduce_language_from_filename): Adjust.
1860         (class scoped_restore_filename_language_table): Remove.
1861         (test_filename_language): Use scoped_restore.
1862         (test_set_ext_lang_command): Use scoped_restore, adjust to
1863         std::vector change.
1864
1865 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1866
1867         * symfile.c: Include selftest.h.
1868         (class scoped_restore_filename_language_table): New.
1869         (test_filename_language): New test.
1870         (test_set_ext_lang_command): New test.
1871         (_initialize_symfile): Register tests.
1872
1873 2017-10-27  Keith Seitz  <keiths@redhat.com>
1874
1875         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1876         in the bp_location, falling back to find_pc_sect_function when
1877         needed.
1878         (add_location_to_breakpoint): Save sal->symbol.
1879         * breakpoint.h (struct bp_location) <symbol>: New field.
1880         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1881         * symtab.h (struct symtab_and_line) <symbol>: New field.
1882
1883 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1884
1885         PR gdb/13669
1886         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1887         to rewind obstack.
1888
1889 2017-10-26  Pedro Alves  <palves@redhat.com>
1890
1891         * remote.c (remote_async_terminal_ours_p): Delete.
1892         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1893         Remove references to 'remote_async_terminal_ours_p'.
1894
1895 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1896
1897         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1898
1899 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1900
1901         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1902         aspace const.
1903         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1904         Likewise.
1905         * breakpoint.c (bpstat_check_location): Remove cast.
1906         (breakpoint_hit_catch_fork): Make aspce const.
1907         (breakpoint_hit_catch_solib): Likewise.
1908         (breakpoint_hit_catch_exec): Likewise.
1909         (breakpoint_hit_ranged_breakpoint): Likewise.
1910         (breakpoint_hit_watchpoint): Likewise.
1911         (base_breakpoint_breakpoint_hit): Likewise.
1912         (bkpt_breakpoint_hit): Likewise.
1913         (dprintf_breakpoint_hit): Likewise.
1914         (tracepoint_breakpoint_hit): Likewise.
1915         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1916
1917 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1918
1919         * breakpoint.c (breakpoint_location_address_match): Change
1920         "struct address_space *" to "const address_space".
1921         (breakpoint_location_address_range_overlap): Likewise.
1922         (breakpoint_here_p): Likewise.
1923         (breakpoint_in_range_p): Likewise.
1924         (moribund_breakpoint_here_p): Likewise.
1925         (bp_location_inserted_here_p): Likewise.
1926         (software_breakpoint_inserted_here_p): Likewise.
1927         (hardware_breakpoint_inserted_here_p): Likewise.
1928         (hardware_watchpoint_inserted_in_range): Likewise.
1929         (bpstat_check_location): Likewise.
1930         (bpstat_stop_status): Likewise.
1931         (breakpoint_address_match): Likewise.
1932         (breakpoint_address_match_range): Likewise.
1933         (breakpoint_location_address_match): Likewise.
1934         (breakpoint_location_address_range_overlap): Likewise.
1935         (insert_single_step_breakpoint): Likewise.
1936         (breakpoint_has_location_inserted_here): Likewise.
1937         (single_step_breakpoint_inserted_here_p): Likewise.
1938         (pc_at_non_inline_function): Likewise.
1939         * breakpoint.h (bpstat_stop_status): Update declaration.
1940         (breakpoint_here_p): Likewise.
1941         (breakpoint_in_range_p): Likewise.
1942         (moribund_breakpoint_here_p): Likewise.
1943         (breakpoint_inserted_here_p): Likewise.
1944         (software_breakpoint_inserted_here_p): Likewise.
1945         (hardware_breakpoint_inserted_here_p): Likewise.
1946         (breakpoint_has_location_inserted_here): Likewise.
1947         (single_step_breakpoint_inserted_here_p): Likewise.
1948         (hardware_watchpoint_inserted_in_range): Likewise.
1949         (breakpoint_address_match): Likewise.
1950         (insert_single_step_breakpoint): Likewise.
1951         (pc_at_non_inline_function): Likewise.
1952         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1953         * record.c (record_check_stopped_by_breakpoint): Likewise.
1954         * record.h (record_check_stopped_by_breakpoint): Likewise.
1955         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1956
1957 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1958
1959         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1960         regcache->arch () instead get_regcache_arch.
1961         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1962         Likewise.
1963         (aarch64_fbsd_store_inferior_registers): Likewise.
1964         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1965         (store_gregs_to_thread): Likewise.
1966         (fetch_fpregs_from_thread): Likewise.
1967         (store_fpregs_to_thread): Likewise.
1968         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1969         (aarch64_store_return_value): Likewise.
1970         (aarch64_software_single_step): Likewise.
1971         * aix-thread.c (aix_thread_wait): Likewise.
1972         (supply_reg32): Likewise.
1973         (supply_sprs64): Likewise.
1974         (supply_sprs32): Likewise.
1975         (fill_gprs64): Likewise.
1976         (fill_gprs32): Likewise.
1977         (fill_sprs64): Likewise.
1978         (fill_sprs32): Likewise.
1979         (store_regs_user_thread): Likewise.
1980         (store_regs_kernel_thread): Likewise.
1981         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1982         (alphabsd_store_inferior_registers): Likewise.
1983         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1984         (alpha_store_return_value): Likewise.
1985         (alpha_deal_with_atomic_sequence): Likewise.
1986         (alpha_next_pc): Likewise.
1987         (alpha_software_single_step): Likewise.
1988         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1989         (amd64bsd_store_inferior_registers): Likewise.
1990         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1991         Likewise.
1992         (amd64_linux_store_inferior_registers): Likewise.
1993         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1994         (amd64_collect_native_gregset): Likewise.
1995         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1996         (amd64obsd_collect_uthread): Likewise.
1997         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1998         (amd64_collect_fpregset): Likewise.
1999         (amd64_supply_fxsave): Likewise.
2000         (amd64_supply_xsave): Likewise.
2001         (amd64_collect_fxsave): Likewise.
2002         (amd64_collect_xsave): Likewise.
2003         * arc-tdep.c (arc_write_pc): Likewise.
2004         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2005         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2006         (arm_fbsd_store_inferior_registers): Likewise.
2007         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2008         (store_vfp_regs): Likewise.
2009         (arm_linux_fetch_inferior_registers): Likewise.
2010         (arm_linux_store_inferior_registers): Likewise.
2011         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2012         (arm_linux_sigreturn_next_pc): Likewise.
2013         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2014         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2015         (fetch_register): Likewise.
2016         (store_register): Likewise.
2017         * arm-tdep.c (arm_is_thumb): Likewise.
2018         (displaced_in_arm_mode): Likewise.
2019         (bx_write_pc): Likewise.
2020         (arm_get_next_pcs_addr_bits_remove): Likewise.
2021         (arm_software_single_step): Likewise.
2022         (arm_extract_return_value): Likewise.
2023         (arm_store_return_value): Likewise.
2024         (arm_write_pc): Likewise.
2025         * bfin-tdep.c (bfin_extract_return_value): Likewise.
2026         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2027         (bsd_uthread_store_registers): Likewise.
2028         * core-regset.c (fetch_core_registers): Likewise.
2029         * corelow.c (get_core_registers): Likewise.
2030         * cris-tdep.c (cris_store_return_value): Likewise.
2031         (cris_extract_return_value): Likewise.
2032         (find_step_target): Likewise.
2033         (find_step_target): Likewise.
2034         (cris_software_single_step): Likewise.
2035         * ctf.c (ctf_fetch_registers): Likewise.
2036         * darwin-nat.c (cancel_breakpoint): Likewise.
2037         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2038         * frv-tdep.c (frv_extract_return_value): Likewise.
2039         * ft32-tdep.c (ft32_store_return_value): Likewise.
2040         (ft32_extract_return_value): Likewise.
2041         * go32-nat.c (fetch_register): Likewise.
2042         (go32_fetch_registers): Likewise.
2043         (go32_store_registers): Likewise.
2044         (store_register): Likewise.
2045         * h8300-tdep.c (h8300_extract_return_value): Likewise.
2046         (h8300_store_return_value): Likewise.
2047         * hppa-linux-nat.c (fetch_register): Likewise.
2048         (store_register): Likewise.
2049         (hppa_linux_fetch_inferior_registers): Likewise.
2050         (hppa_linux_store_inferior_registers): Likewise.
2051         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2052         (i386_darwin_store_inferior_registers): Likewise.
2053         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2054         (gnu_store_registers): Likewise.
2055         * i386-linux-nat.c (fetch_register): Likewise.
2056         (store_register): Likewise.
2057         (supply_gregset): Likewise.
2058         (fill_gregset): Likewise.
2059         (i386_linux_fetch_inferior_registers): Likewise.
2060         (i386_linux_store_inferior_registers): Likewise.
2061         (i386_linux_resume): Likewise.
2062         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2063         Likewise.
2064         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2065         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2066         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2067         (i386obsd_collect_uthread): Likewise.
2068         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2069         (i386_supply_gregset): Likewise.
2070         (i386_collect_gregset): Likewise.
2071         (i386_supply_fpregset): Likewise.
2072         (i386_collect_fpregset): Likewise.
2073         (i386_mpx_bd_base): Likewise.
2074         * i386-v4-nat.c (supply_fpregset): Likewise.
2075         (fill_fpregset): Likewise.
2076         * i387-tdep.c (i387_supply_fsave): Likewise.
2077         (i387_collect_fsave): Likewise.
2078         (i387_supply_fxsave): Likewise.
2079         (i387_collect_fxsave): Likewise.
2080         (i387_supply_xsave): Likewise.
2081         (i387_collect_xsave): Likewise.
2082         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2083         (ia64_linux_store_registers): Likewise.
2084         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2085         (ia64_extract_return_value): Likewise.
2086         (ia64_store_return_value): Likewise.
2087         (find_func_descr): Likewise.
2088         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2089         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2090         (inf_ptrace_store_registers): Likewise.
2091         * infrun.c (use_displaced_stepping): Likewise.
2092         (displaced_step_prepare_throw): Likewise.
2093         (resume): Likewise.
2094         (proceed): Likewise.
2095         (do_target_wait): Likewise.
2096         (adjust_pc_after_break): Likewise.
2097         (handle_inferior_event_1): Likewise.
2098         (handle_signal_stop): Likewise.
2099         (save_infcall_suspend_state): Likewise.
2100         (restore_infcall_suspend_state): Likewise.
2101         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2102         * jit.c (jit_frame_prev_register): Likewise.
2103         * linux-nat.c (save_stop_reason): Likewise.
2104         (linux_nat_wait_1): Likewise.
2105         (resume_stopped_resumed_lwps): Likewise.
2106         * linux-record.c (record_linux_sockaddr): Likewise.
2107         (record_linux_msghdr): Likewise.
2108         (record_linux_system_call): Likewise.
2109         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2110         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2111         (lm32_store_return_value): Likewise.
2112         * m32c-tdep.c (m32c_read_flg): Likewise.
2113         (m32c_pseudo_register_read): Likewise.
2114         (m32c_pseudo_register_write): Likewise.
2115         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2116         (m32r_linux_collect_gregset): Likewise.
2117         * m32r-tdep.c (m32r_store_return_value): Likewise.
2118         (m32r_extract_return_value): Likewise.
2119         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2120         (m68kbsd_collect_fpregset): Likewise.
2121         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2122         * m68k-linux-nat.c (fetch_register): Likewise.
2123         (old_fetch_inferior_registers): Likewise.
2124         (old_store_inferior_registers): Likewise.
2125         (store_regs): Likewise.
2126         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2127         (m68k_svr4_store_return_value): Likewise.
2128         * m88k-tdep.c (m88k_store_arguments): Likewise.
2129         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2130         (mi_cmd_data_write_register_values): Likewise.
2131         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2132         (mips_fbsd_store_inferior_registers): Likewise.
2133         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2134         (mips_fbsd_supply_gregs): Likewise.
2135         (mips_fbsd_collect_fpregs): Likewise.
2136         (mips_fbsd_collect_gregs): Likewise.
2137         (mips_fbsd_supply_fpregset): Likewise.
2138         (mips_fbsd_collect_fpregset): Likewise.
2139         (mips_fbsd_supply_gregset): Likewise.
2140         (mips_fbsd_collect_gregset): Likewise.
2141         * mips-linux-nat.c (supply_gregset): Likewise.
2142         (fill_gregset): Likewise.
2143         (supply_fpregset): Likewise.
2144         (fill_fpregset): Likewise.
2145         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2146         (mips_fill_gregset): Likewise.
2147         (mips_supply_fpregset): Likewise.
2148         (mips_fill_fpregset): Likewise.
2149         (mips64_supply_gregset): Likewise.
2150         (micromips_linux_sigframe_validate): Likewise.
2151         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2152         (mipsnbsd_fetch_inferior_registers): Likewise.
2153         (mipsnbsd_store_inferior_registers): Likewise.
2154         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2155         (mipsnbsd_supply_gregset): Likewise.
2156         (mipsnbsd_iterate_over_regset_sections): Likewise.
2157         (mipsnbsd_supply_reg): Likewise.
2158         (mipsnbsd_supply_fpreg): Likewise.
2159         * mips-tdep.c (mips_in_frame_stub): Likewise.
2160         (mips_dummy_id): Likewise.
2161         (is_octeon_bbit_op): Likewise.
2162         (micromips_bc1_pc): Likewise.
2163         (extended_mips16_next_pc): Likewise.
2164         (mips16_next_pc): Likewise.
2165         (deal_with_atomic_sequence): Likewise.
2166         * moxie-tdep.c (moxie_process_readu): Likewise.
2167         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2168         * nto-procfs.c (procfs_store_registers): Likewise.
2169         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2170         (ppcfbsd_store_inferior_registers): Likewise.
2171         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2172         (fetch_altivec_register): Likewise.
2173         (get_spe_registers): Likewise.
2174         (fetch_spe_register): Likewise.
2175         (fetch_altivec_registers): Likewise.
2176         (fetch_all_gp_regs): Likewise.
2177         (fetch_all_fp_regs): Likewise.
2178         (store_vsx_register): Likewise.
2179         (store_altivec_register): Likewise.
2180         (set_spe_registers): Likewise.
2181         (store_spe_register): Likewise.
2182         (store_altivec_registers): Likewise.
2183         (store_all_gp_regs): Likewise.
2184         (store_all_fp_regs): Likewise.
2185         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2186         (ppc_linux_collect_gregset): Likewise.
2187         (ppc_canonicalize_syscall): Likewise.
2188         (ppc_linux_record_signal): Likewise.
2189         (ppu2spu_prev_register): Likewise.
2190         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2191         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2192         (ppcobsd_store_registers): Likewise.
2193         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2194         Likewise.
2195         (ppc_ravenscar_generic_store_registers): Likewise.
2196         * procfs.c (procfs_fetch_registers): Likewise.
2197         (procfs_store_registers): Likewise.
2198         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2199         (ravenscar_store_registers): Likewise.
2200         (ravenscar_prepare_to_store): Likewise.
2201         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2202         * record-full.c (record_full_wait_1): Likewise.
2203         (record_full_registers_change): Likewise.
2204         (record_full_store_registers): Likewise.
2205         (record_full_core_fetch_registers): Likewise.
2206         (record_full_save): Likewise.
2207         (record_full_goto_insn): Likewise.
2208         * regcache.c (regcache_register_size): Likewise.
2209         (get_regcache_arch): Remove.
2210         (regcache_read_pc): Likewise.
2211         * regcache.h (get_regcache_arch): Remove.
2212         * remote-sim.c (gdbsim_fetch_register): Likewise.
2213         (gdbsim_store_register): Likewise.
2214         * remote.c (fetch_register_using_p): Likewise.
2215         (send_g_packet): Likewise.
2216         (remote_prepare_to_store): Likewise.
2217         (store_registers_using_G): Likewise.
2218         * reverse.c (save_bookmark_command): Likewise.
2219         (goto_bookmark_command): Likewise.
2220         * rs6000-aix-tdep.c (branch_dest): Likewise.
2221         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2222         (fetch_register): Likewise.
2223         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2224         (ppc_collect_reg): Likewise.
2225         (ppc_collect_gregset): Likewise.
2226         (ppc_collect_fpregset): Likewise.
2227         (ppc_collect_vsxregset): Likewise.
2228         (ppc_collect_vrregset): Likewise.
2229         (ppc_displaced_step_hw_singlestep): Likewise.
2230         (rs6000_pseudo_register_read): Likewise.
2231         (rs6000_pseudo_register_write): Likewise.
2232         * s390-linux-nat.c (supply_gregset): Likewise.
2233         (fill_gregset): Likewise.
2234         (s390_linux_fetch_inferior_registers): Likewise.
2235         * s390-linux-tdep.c (s390_write_pc): Likewise.
2236         (s390_software_single_step): Likewise.
2237         (s390_all_but_pc_registers_record): Likewise.
2238         (s390_linux_syscall_record): Likewise.
2239         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2240         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2241         (shnbsd_store_inferior_registers): Likewise.
2242         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2243         (sh_extract_return_value_fpu): Likewise.
2244         (sh_store_return_value_nofpu): Likewise.
2245         (sh_corefile_supply_regset): Likewise.
2246         (sh_corefile_collect_regset): Likewise.
2247         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2248         (sh64_store_return_value): Likewise.
2249         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2250         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2251         (sparc_store_inferior_registers): Likewise.
2252         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2253         (sparc_ravenscar_prepare_to_store): Likewise.
2254         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2255         (sparc_analyze_control_transfer): Likewise.
2256         (sparc_step_trap): Likewise.
2257         (sparc_software_single_step): Likewise.
2258         (sparc32_gdbarch_init): Likewise.
2259         (sparc_supply_rwindow): Likewise.
2260         (sparc_collect_rwindow): Likewise.
2261         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2262         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2263         (sparc64nbsd_collect_gregset): Likewise.
2264         (sparc64nbsd_supply_fpregset): Likewise.
2265         (sparc64nbsd_collect_fpregset): Likewise.
2266         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2267         (sparc64_supply_gregset): Likewise.
2268         (sparc64_collect_gregset): Likewise.
2269         (sparc64_supply_fpregset): Likewise.
2270         (sparc64_collect_fpregset): Likewise.
2271         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2272         * spu-tdep.c (spu_unwind_sp): Likewise.
2273         (spu2ppu_prev_register): Likewise.
2274         (spu_memory_remove_breakpoint): Likewise.
2275         * stack.c (return_command): Likewise.
2276         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2277         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2278         * tracefile.c (trace_save_ctf): Likewise.
2279         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2280         (do_windows_store_inferior_registers): Likewise.
2281         (windows_resume): Likewise.
2282         * xtensa-linux-nat.c (fill_gregset): Likewise.
2283         (supply_gregset_reg): Likewise.
2284         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2285         (xtensa_register_read_masked): Likewise.
2286         (xtensa_supply_gregset): Likewise.
2287         (xtensa_extract_return_value): Likewise.
2288         (xtensa_store_return_value): Likewise.
2289
2290 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2291
2292         * doublest.c (floatformat_from_string): New function.
2293         * doublest.h (floatformat_from_string): Add prototype.
2294
2295         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2296         (OP_FLOAT): ... this.
2297         * expression.h: Do not include "doublest.h".
2298         (union exp_element): Replace doubleconst and decfloatconst by
2299         new element floatconst.
2300         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2301         (ada_evaluate_subexp): Likewise.
2302         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2303         OP_DOUBLE and OP_DECFLOAT.
2304         * expprint.c (print_subexp_standard): Likewise.
2305         (dump_subexp_body_standard): Likewise.
2306         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2307
2308         * parse.c: Include "dfp.h".
2309         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2310         (write_exp_elt_floatcst): New function.
2311         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2312         and OP_DECFLOAT.
2313         (operator_check_standard): Likewise.
2314         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2315         Return target format buffer instead of host DOUBLEST.
2316         Use floatformat_from_string and decimal_from_string to parse
2317         either binary or decimal floating-point types.
2318         (parse_c_float): Remove.
2319         * parser-defs.h: Do not include "doublest.h".
2320         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2321         (write_exp_elt_floatcst): Add prototype.
2322         (parse_float): Update prototype.
2323         (parse_c_float): Remove.
2324
2325         * c-exp.y: Do not include "dfp.h".
2326         (typed_val_float): Use byte buffer instead of DOUBLEST.
2327         (typed_val_decfloat): Remove.
2328         (DECFLOAT): Remove.
2329         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2330         (parse_number): Update to new parse_float interface.
2331         Parse suffixes and determine type before calling parse_float.
2332         Handle decimal and binary FP types the same way.
2333
2334         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2335         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2336         (parse_number): Update to new parse_float interface.
2337         Parse suffixes and determine type before calling parse_float.
2338
2339         * f-exp.y: Replace dval by typed_val_float.
2340         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2341         (parse_number): Use parse_float instead of atof.
2342
2343         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2344         (parse_go_float): Remove.
2345         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2346         (parse_number): Call parse_float instead of parse_go_float.
2347         Parse suffixes and determine type before calling parse_float.
2348
2349         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2350         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2351         (parse_number): Update to new parse_float interface.
2352         Parse suffixes and determine type before calling parse_float.
2353
2354         * m2-exp.y: Replace dval by byte buffer val.
2355         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2356         (parse_number): Call parse_float instead of atof.
2357
2358         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2359         (lex_number): Call parse_float instead of strtod.
2360         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2361         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2362         Use write_exp_elt_floatcst.
2363         (unit_testing): Remove static variable.
2364         (rust_type): Do not check unit_testing.
2365         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2366
2367         * ada-exp.y (type_float, type_double): Remove.
2368         (typed_val_float): Use byte buffer instead of DOUBLEST.
2369         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2370         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2371
2372 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2373
2374         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2375         * arch/aarch64.h: New file.
2376
2377 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2378
2379         * dfp.h (decimal_from_string): Use const reference for argument.
2380         * dfp.c (decimal_from_string): Likewise.
2381
2382 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2383
2384         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2385         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2386         * mips-tdep.c (mips_print_fp_register): Likewise.
2387
2388 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2389
2390         * common/format.h (enum argclass): Replace decfloat_arg by
2391         dec32float_arg, dec64float_arg, and dec128float_arg.
2392         * common/format.c (parse_format_string): Update to return
2393         new decimal float argument classes.
2394
2395         * printcmd.c (printf_decfloat): Rename to ...
2396         (printf_floating): ... this.  Add argclass argument, and use it
2397         instead of parsing the format string again.  Add support for
2398         binary floating-point values, using floatformat_to_string.
2399         Convert value to the target format if it doesn't already match.
2400         (ui_printf): Call printf_floating instead of printf_decfloat,
2401         also for double_arg / long_double_arg.  Pass argclass.
2402
2403         * dfp.c (decimal_to_string): Add format string argument.
2404         * dfp.h (decimal_to_string): Likewise.
2405
2406         * doublest.c (floatformat_to_string): Add format string argument.
2407         * doublest.h (floatformat_to_string): Likewise.
2408
2409 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2410
2411         * doublest.c (floatformat_precision): New routine.
2412         (floatformat_to_string): Likewise.
2413         * doublest.c (floatformat_to_string): Add prototype.
2414
2415         * printcmd.c (print_scalar_formatted): Only call print_floating
2416         on floating-point types.
2417         * valprint.c: Do not include "floatformat.h".
2418         (generic_val_print_decfloat): Remove.
2419         (generic_val_print): Call generic_val_print_float for both
2420         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2421         (print_floating): Use floatformat_to_string.  Handle decimal float.
2422         (print_decimal_floating): Remove, merge into floatformat_to_string.
2423         * value.h (print_decimal_floating): Remove.
2424
2425         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2426
2427 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2428
2429         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2430
2431 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2432
2433         * memattr.h: Don't include vec.h.
2434         (struct mem_attrib): Initialize fields.
2435         <unknown>: New static method.
2436         (struct mem_region): Add constructors, operator<, initialize
2437         fields.
2438         * memattr.c: Include algorithm.
2439         (default_mem_attrib, unknown_mem_attrib): Remove.
2440         (user_mem_region_list): New global.
2441         (target_mem_region_list, mem_region_list): Change type to
2442         std::vector<mem_region>.
2443         (mem_use_target): Now a function.
2444         (target_mem_regions_valid): Change type to bool.
2445         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2446         (require_user_regions): Adjust.
2447         (require_target_regions): Adjust.
2448         (create_mem_region): Adjust.
2449         (lookup_mem_region): Adjust.
2450         (invalidate_target_mem_regions): Adjust.
2451         (mem_clear): Rename to...
2452         (user_mem_clear): ... this, and adjust.
2453         (mem_command): Adjust.
2454         (info_mem_command): Adjust.
2455         (mem_enable, enable_mem_command, mem_disable,
2456         disable_mem_command): Adjust.
2457         (mem_delete): Adjust.
2458         (delete_mem_command): Adjust.
2459         * memory-map.h (parse_memory_map): Return an std::vector.
2460         * memory-map.c (parse_memory_map): Likewise.
2461         (struct memory_map_parsing_data): Add constructor.
2462         <memory_map>: Point to std::vector.
2463         (memory_map_start_memory): Adjust.
2464         (memory_map_end_memory): Adjust.
2465         (memory_map_end_property): Adjust.
2466         (clear_result): Remove.
2467         * remote.c (remote_memory_map): Return an std::vector.
2468         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2469         Remove.
2470         (target_debug_print_mem_region_vector): New.
2471         * target-delegates.c: Regenerate.
2472         * target.h (mem_region_vector): New typedef.
2473         (to_memory_map): Return mem_region_vector.
2474         (target_memory_map): Return an std::vector.
2475         * target.c (target_memory_map): Return an std::vector.
2476         (flash_erase_command): Adjust.
2477
2478 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2479
2480         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2481         Change type to std::string.
2482         (memory_map_start_property): Adjust.
2483         (memory_map_end_property): Adjust.
2484
2485 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2486
2487         * infrun.h: Include common/byte-vector.h.
2488         (struct displaced_step_closure): New struct.
2489         (struct buf_displaced_step_closure): New struct.
2490         * infrun.c (displaced_step_closure::~displaced_step_closure):
2491         Provide default implementation.
2492         (displaced_step_clear): Deallocate step closure with delete.
2493         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2494         (aarch64_displaced_step_closure): ... this, extend
2495         displaced_step_closure.
2496         (aarch64_displaced_step_data) <dsc>: Change type to
2497         aarch64_displaced_step_closure.
2498         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2499         unique_ptr.
2500         (aarch64_displaced_step_fixup): Add cast for displaced step
2501         closure.
2502         * amd64-tdep.c (displaced_step_closure): Rename to ...
2503         (amd64_displaced_step_closure): ... this, extend
2504         displaced_step_closure.
2505         <insn_buf>: Change type to std::vector<gdb_byte>.
2506         <max_len>: Remove.
2507         (fixup_riprel): Change type of DSC parameter, adjust to type
2508         change of insn_buf.
2509         (fixup_displaced_copy): Change type of DSC parameter.
2510         (amd64_displaced_step_copy_insn): Instantiate
2511         amd64_displaced_step_closure.
2512         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2513         to type change of insn_buf.
2514         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2515         parameter DSC.
2516         (arm_linux_copy_svc): Likewise.
2517         (cleanup_kernel_helper_return): Likewise.
2518         (arm_catch_kernel_helper_return): Likewise.
2519         (arm_linux_displaced_step_copy_insn): Instantiate
2520         arm_displaced_step_closure.
2521         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2522         (displaced_read_reg): Change type of parameter DSC.
2523         (branch_write_pc): Likewise.
2524         (load_write_pc): Likewise.
2525         (alu_write_pc): Likewise.
2526         (displaced_write_reg): Likewise.
2527         (arm_copy_unmodified): Likewise.
2528         (thumb_copy_unmodified_32bit): Likewise.
2529         (thumb_copy_unmodified_16bit): Likewise.
2530         (cleanup_preload): Likewise.
2531         (install_preload): Likewise.
2532         (arm_copy_preload): Likewise.
2533         (thumb2_copy_preload): Likewise.
2534         (install_preload_reg): Likewise.
2535         (arm_copy_preload_reg): Likewise.
2536         (cleanup_copro_load_store): Likewise.
2537         (install_copro_load_store): Likewise.
2538         (arm_copy_copro_load_store) Likewise.
2539         (thumb2_copy_copro_load_store): Likewise.
2540         (cleanup_branch): Likewise.
2541         (install_b_bl_blx): Likewise.
2542         (arm_copy_b_bl_blx): Likewise.
2543         (thumb2_copy_b_bl_blx): Likewise.
2544         (thumb_copy_b): Likewise.
2545         (install_bx_blx_reg): Likewise.
2546         (arm_copy_bx_blx_reg): Likewise.
2547         (thumb_copy_bx_blx_reg): Likewise.
2548         (cleanup_alu_imm): Likewise.
2549         (arm_copy_alu_imm): Likewise.
2550         (thumb2_copy_alu_imm): Likewise.
2551         (cleanup_alu_reg): Likewise.
2552         (install_alu_reg): Likewise.
2553         (arm_copy_alu_reg): Likewise.
2554         (thumb_copy_alu_reg): Likewise.
2555         (cleanup_alu_shifted_reg): Likewise.
2556         (install_alu_shifted_reg): Likewise.
2557         (arm_copy_alu_shifted_reg): Likewise.
2558         (cleanup_load): Likewise.
2559         (cleanup_store): Likewise.
2560         (arm_copy_extra_ld_st): Likewise.
2561         (install_load_store): Likewise.
2562         (thumb2_copy_load_literal): Likewise.
2563         (thumb2_copy_load_reg_imm): Likewise.
2564         (arm_copy_ldr_str_ldrb_strb): Likewise.
2565         (cleanup_block_load_all): Likewise.
2566         (cleanup_block_store_pc): Likewise.
2567         (cleanup_block_load_pc): Likewise.
2568         (arm_copy_block_xfer): Likewise.
2569         (thumb2_copy_block_xfer): Likewise.
2570         (cleanup_svc): Likewise.
2571         (install_svc): Likewise.
2572         (arm_copy_svc): Likewise.
2573         (thumb_copy_svc): Likewise.
2574         (arm_copy_undef): Likewise.
2575         (thumb_32bit_copy_undef): Likewise.
2576         (arm_copy_unpred): Likewise.
2577         (arm_decode_misc_memhint_neon): Likewise.
2578         (arm_decode_unconditional): Likewise.
2579         (arm_decode_miscellaneous): Likewise.
2580         (arm_decode_dp_misc): Likewise.
2581         (arm_decode_ld_st_word_ubyte): Likewise.
2582         (arm_decode_media): Likewise.
2583         (arm_decode_b_bl_ldmstm): Likewise.
2584         (arm_decode_ext_reg_ld_st): Likewise.
2585         (thumb2_decode_dp_shift_reg): Likewise.
2586         (thumb2_decode_ext_reg_ld_st): Likewise.
2587         (arm_decode_svc_copro): Likewise.
2588         (thumb2_decode_svc_copro): Likewise.
2589         (install_pc_relative): Likewise.
2590         (thumb_copy_pc_relative_16bit): Likewise.
2591         (thumb_decode_pc_relative_16bit): Likewise.
2592         (thumb_copy_pc_relative_32bit): Likewise.
2593         (thumb_copy_16bit_ldr_literal): Likewise.
2594         (thumb_copy_cbnz_cbz): Likewise.
2595         (thumb2_copy_table_branch): Likewise.
2596         (cleanup_pop_pc_16bit_all): Likewise.
2597         (thumb_copy_pop_pc_16bit): Likewise.
2598         (thumb_process_displaced_16bit_insn): Likewise.
2599         (decode_thumb_32bit_ld_mem_hints): Likewise.
2600         (thumb_process_displaced_32bit_insn): Likewise.
2601         (thumb_process_displaced_insn): Likewise.
2602         (arm_process_displaced_insn): Likewise.
2603         (arm_displaced_init_closure): Likewise.
2604         (arm_displaced_step_fixup): Add cast for closure.
2605         * arm-tdep.h: Include infrun.h.
2606         (displaced_step_closure): Rename to ...
2607         (arm_displaced_step_closure): ... this, extend
2608         displaced_step_closure.
2609         <u::svc::copy_svc_os>: Change type of parameter DSC.
2610         <cleanup>: Likewise.
2611         (arm_process_displaced_insn): Likewise.
2612         (arm_displaced_init_closure): Likewise.
2613         (displaced_read_reg): Likewise.
2614         (displaced_write_reg): Likewise.
2615         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2616         Adjust.
2617         * i386-tdep.h: Include infrun.h.
2618         (i386_displaced_step_closure): New typedef.
2619         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2620         i386_displaced_step_closure.
2621         (i386_displaced_step_fixup): Adjust.
2622         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2623         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2624         and unique_ptr.
2625         (ppc_displaced_step_fixup): Adjust.
2626         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2627         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2628         and unique_ptr.
2629         (s390_displaced_step_fixup): Adjust.
2630
2631 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2632
2633         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2634         Remove declarations.
2635
2636 2017-10-20  Tom Tromey  <tom@tromey.com>
2637
2638         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2639         std::vector.
2640         (gdb_bfd_record_inclusion): Update.
2641         (bfdp): Remove typedef.
2642
2643 2017-10-20  Tom Tromey  <tom@tromey.com>
2644
2645         * gdb_bfd.c (gdb_bfd_ref): Use new.
2646         (struct gdb_bfd_data): Add constructor, destructor, and member
2647         initializers.
2648         (gdb_bfd_unref): Use delete.
2649
2650 2017-10-20  Tom Tromey  <tom@tromey.com>
2651
2652         * exec.c (exec_file_attach): Use new_bfd_ref.
2653         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2654         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2655         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2656         new_bfd_ref.
2657         * gdb_bfd.h (new_bfd_ref): New function.
2658
2659 2017-10-20  Pedro Alves  <palves@redhat.com>
2660
2661         * main.c (captured_command_loop): Add attribute noinline.
2662
2663 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2664
2665         * interps.c (struct interp_factory): Add constructor.
2666         (interp_factory_p): Remove typedef.
2667         (DEF_VEC_P(interp_factory_p)): Remove.
2668         (interpreter_factories): Change type to std::vector.
2669         (interp_factory_register): Adjust.
2670         (interp_lookup): Adjust.
2671         (interpreter_completer): Adjust.
2672
2673 2017-10-19  Tom Tromey  <tom@tromey.com>
2674
2675         * break-catch-syscall.c (catch_syscall_completer): Use
2676         std::string, gdb::unique_xmalloc_ptr.
2677
2678 2017-10-19  Tom Tromey  <tom@tromey.com>
2679
2680         * infcall.c (call_function_by_hand_dummy): Use std::string.
2681
2682 2017-10-19  Tom Tromey  <tom@tromey.com>
2683
2684         * mi/mi-main.c (mi_cmd_execute): Update.
2685         * top.h (prepare_execute_command): Return scoped_value_mark.
2686         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2687         Add move constructor.
2688         * top.c (prepare_execute_command): Return scoped_value_mark.
2689         (execute_command): Update.
2690
2691 2017-10-19  Pedro Alves  <palves@redhat.com>
2692
2693         * xml-support.c (xml_fetch_content_from_file): Check fread's
2694         return.
2695
2696 2017-10-19  Pedro Alves  <palves@redhat.com>
2697
2698         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2699         async.
2700         (handle_error_fd): New function.
2701         (ser_base_async): Add/delete an event loop file handler for
2702         error_fd.
2703
2704 2017-10-19  Pedro Alves  <palves@redhat.com>
2705
2706         * xml-support.c (xml_fetch_content_from_file): Don't read in
2707         chunks.  Instead use fseek to determine the file's size, and read
2708         it in one go.
2709
2710 2017-11-18  Keith Seitz  <keiths@redhat.com>
2711
2712         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2713         types.
2714         Add whitespace to front of type name.
2715
2716 2017-10-18  Keith Seitz  <keiths@redhat.com>
2717
2718         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2719         DW_AT_accessibility.
2720
2721 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2722
2723         * features/tic6x-c62x-linux.c: Remove.
2724
2725 2017-10-17  Tom Tromey  <tom@tromey.com>
2726
2727         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2728         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2729         (do_mixed_source_and_assembly): Likewise.
2730
2731 2017-10-17  Tom Tromey  <tom@tromey.com>
2732
2733         * regcache.c (regcache::xfer_part): Remove assertion.
2734
2735 2017-10-17  Pedro Alves  <palves@redhat.com>
2736
2737         * xml-support.c (xml_fetch_content_from_file): Call
2738         unique_ptr::release() instead unique_ptr::get() when passing
2739         through xrealloc.
2740
2741 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2742
2743         * regcache.c (regcache::xfer_part): Remove parameters read and
2744         write, add parameter is_raw.  All callers are updated.
2745
2746 2017-10-16  Keith Seitz  <keiths@redhat.com>
2747
2748         * c-typeprint.c (enum access_specifier): Moved here from
2749         c_type_print_base.
2750         (output_access_specifier): New function.
2751         (c_type_print_base): Consider typedefs when assessing
2752         whether access labels are needed.
2753         Use output_access_specifier as needed.
2754         Output access specifier for typedefs, if needed.
2755         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2756         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2757         fields.
2758         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2759         accessor macros.
2760
2761 2017-10-16  Tom Tromey  <tom@tromey.com>
2762
2763         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2764         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2765         * target.c (target_fileio_read_stralloc): Update.
2766         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2767         * target.h (target_fileio_read_stralloc): Return
2768         unique_xmalloc_ptr.
2769
2770 2017-10-16  Tom Tromey  <tom@tromey.com>
2771
2772         * xml-syscall.c (xml_init_syscalls_info): Update.
2773         * xml-support.c (xinclude_start_include): Update.
2774         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2775         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2776         (xml_fetch_content_from_file): Likewise.
2777         * osdata.c (get_osdata): Update.
2778         * target.h (target_read_stralloc, target_get_osdata): Return
2779         unique_xmalloc_ptr.
2780         * solib-aix.c (solib_aix_get_library_list): Update.
2781         * solib-target.c (solib_target_current_sos): Update.
2782         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2783         * xml-tdesc.c (fetch_available_features_from_target): Update.
2784         (target_fetch_description_xml): Update.
2785         (file_read_description_xml): Update.
2786         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2787         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2788         (remote_pid_to_exec_file): Update.
2789         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2790         (target_get_osdata): Likewise.
2791
2792 2017-10-16  Tom Tromey  <tom@tromey.com>
2793
2794         * remote.c (remote_register_number_and_offset): Use std::vector.
2795         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2796         (putpkt_binary): Use gdb::def_vector.
2797         (compare_sections_command): Use gdb::byte_vector.
2798
2799 2017-10-16  Tom Tromey  <tom@tromey.com>
2800
2801         * ppc-linux-nat.c (hwdebug_insert_point): Use
2802         gdb::unique_xmalloc_ptr, XDUP.
2803
2804 2017-10-16  Tom Tromey  <tom@tromey.com>
2805
2806         * probe.c (parse_probes): Use std::string.
2807         (info_probes_for_ops, enable_probes_command)
2808         (disable_probes_command): Remove cleanups.
2809
2810 2017-10-16  Tom Tromey  <tom@tromey.com>
2811
2812         * buildsym.c (block_compar): Remove.
2813         (end_symtab_get_static_block): Use std::vector.
2814
2815 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2816
2817         * memrange.h (struct mem_range): Define operator< and operator==.
2818         (mem_range_s): Remove.
2819         (DEF_VEC_O (mem_range_s)): Remove.
2820         (normalize_mem_ranges): Change parameter type to std::vector.
2821         * memrange.c (compare_mem_ranges): Remove.
2822         (normalize_mem_ranges): Change parameter type to std::vector,
2823         adjust to vector change.
2824         * exec.c (section_table_available_memory): Return vector, remove
2825         parameter.
2826         (section_table_read_available_memory): Adjust to std::vector
2827         change.
2828         * remote.c (remote_read_bytes): Adjust to std::vector
2829         change.
2830         * tracepoint.h (traceframe_available_memory): Change parameter
2831         type to std::vector.
2832         * tracepoint.c (traceframe_available_memory): Change parameter
2833         type to std::vector, adjust.
2834         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2835         std::vector change.
2836         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2837         unittests/memrange-selftests.c.
2838         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2839         * gdb/unittests/memrange-selftests.c: New file.
2840
2841 2017-10-16  Pedro Alves  <palves@redhat.com>
2842
2843         * elfread.c (probe_key_free): Rename range-for variable.
2844         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2845         (find_probe_by_pc, collect_probes): Rename range-for variable.
2846
2847 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2848
2849         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2850         * features/tic6x-c62x.c: Remove.
2851         * features/tic6x-c64x-linux.c: Remove.
2852         * features/tic6x-c64x.c: Remove.
2853         * features/tic6x-c64xp-linux.c: Remove.
2854         * features/tic6x-c64xp.c: Remove.
2855         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2856         initialize_tdesc_tic6x_*_linux functions.
2857         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2858         initialize_tdesc_tic6x_* functions.
2859
2860 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2861
2862         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2863         tic6x-c62x.
2864         * regformats/tic6x-c62x.dat: Remove.
2865         * regformats/tic6x-c64x.dat: Remove.
2866         * regformats/tic6x-c64xp.dat: Remove.
2867
2868 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2869
2870         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2871         (the !HAVE_LIBEXPAT version).
2872
2873 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2874
2875         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2876         const.
2877
2878 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2879
2880         * target.h: Include tracepoint.h.
2881         (enum trace_find_type): Move to tracepoint.h.
2882         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2883         * tracepoint.h: Don't include target.h
2884         (enum trace_find_type): Move from target.h.
2885         (parse_traceframe_info): Return a unique ptr.
2886         * tracepoint.c (current_traceframe_info): Change type to unique
2887         ptr.
2888         (free_traceframe_info): Remove.
2889         (clear_traceframe_info): Don't manually free
2890         current_traceframe_info.
2891         (free_result): Remove.
2892         (parse_traceframe_info): Return a unique ptr.
2893         (get_traceframe_info): Adjust to unique ptr.
2894         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2895         * remote.c (remote_traceframe_info): Return a unique ptr.
2896         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2897         ptr.
2898         * target-debug.h (target_debug_print_traceframe_info_up): New
2899         macro.
2900         * target-delegates.c: Regenerate.
2901
2902 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2903
2904         * memrange.h (struct mem_range): Add constructors.
2905         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2906         std::vector<mem_range>.
2907         * tracepoint.c (free_traceframe_info): Don't manually free
2908         vector.
2909         (traceframe_info_start_memory): Adjust to vector change.
2910         (traceframe_available_memory): Likewise.
2911         * tracefile-tfile.c (build_traceframe_info): Likewise.
2912         * ctf.c (ctf_traceframe_info): Likewise.
2913
2914 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2915
2916         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2917         std::vector<int>.
2918         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2919         (traceframe_info_start_tvar): Adjust to vector change.
2920         (parse_traceframe_info): Allocate with new.
2921         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2922         vector change.
2923         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2924         change.
2925         tfile_traceframe_info): Allocate with new.
2926         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2927         change.
2928
2929 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2930
2931         * tracepoint.c (traceframe_info): Rename to...
2932         (current_traceframe_info): ...this.
2933         (clear_traceframe_info): Adjust.
2934         (get_traceframe_info): Adjust.
2935
2936 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2937
2938         * nat/linux-osdata.c: Include algorithm.
2939         (compare_processes): Remove.
2940         (struct pid_pgid_entry): New struct.
2941         (linux_xfer_osdata_processgroups): Use std::vector instead of
2942         XNEWVEC.
2943
2944 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2945
2946         * objfiles.h: Don't include symfile.h.
2947         (struct partial_symbol): Remove forward-declaration.
2948         (struct objfile) <global_psymbols, static_psymbols>: Change type
2949         to std::vector<partial_symbol *>.
2950         * objfiles.c (objfile::objfile): Don't memset those fields.
2951         (objfile::~objfile): Don't free those fields.
2952         * psympriv.h (struct psymbol_allocation_list): Remove
2953         forward-declaration.
2954         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2955         to std::vector.
2956         (start_psymtab_common): Change parameters to std::vector.
2957         * psymtab.c: Include algorithm.
2958         (require_partial_symbols): Call shrink_to_fit.
2959         (find_pc_sect_psymbol): Adjust to vector change.
2960         (match_partial_symbol): Likewise.
2961         (lookup_partial_symbol): Likewise.
2962         (psym_relocate): Likewise.
2963         (dump_psymtab): Likewise.
2964         (recursively_search_psymtabs): Likewise.
2965         (compare_psymbols): Remove.
2966         (sort_pst_symbols): Adjust to vector change.
2967         (start_psymtab_common): Likewise.
2968         (end_psymtab_common): Likewise.
2969         (psymbol_bcache_full): De-constify return value.
2970         (add_psymbol_to_bcache): Likewise.
2971         (extend_psymbol_list): Remove.
2972         (append_psymbol_to_list): Adjust to vector change.
2973         (add_psymbol_to_list): Likewise.
2974         (init_psymbol_list): Likewise.
2975         (maintenance_info_psymtabs): Likewise.
2976         (maintenance_check_psymtabs): Likewise.
2977         * symfile.h (struct psymbol_allocation_list): Remove.
2978         * symfile.c (reread_symbols): Adjust to vector change.
2979         * dbxread.c (start_psymtab): Change type of parameters.
2980         (dbx_symfile_read): Adjust to vector change.
2981         (read_dbx_symtab): Likewise.
2982         (start_psymtab): Change type of parameters.
2983         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2984         (create_partial_symtab): Likewise.
2985         (add_partial_symbol): Likewise.
2986         (write_one_signatured_type): Likewise.
2987         (recursively_write_psymbols): Likewise.
2988         * mdebugread.c (parse_partial_symbols): Likewise.
2989         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2990         (scan_xcoff_symtab): Adjust to vector change.
2991         (xcoff_initial_scan): Likewise.
2992
2993 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2994
2995         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2996
2997 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2998
2999         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3000         Remove s390x-*-expedite, add s390x-expedite.
3001
3002 2017-10-13  Yao Qi  <yao.qi@linaro.org>
3003
3004         * features/s390-gs-linux64.c: Regenerated.
3005         * features/s390x-gs-linux64.c: Regenerated.
3006
3007 2017-10-13  Tom Tromey  <tom@tromey.com>
3008
3009         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3010         * solib.c (update_solib_list, reload_shared_libraries_1): Use
3011         delete.
3012         * symfile.c (symbol_file_add_with_addrs): Use new.
3013         (symbol_file_add_separate): Update comment.
3014         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3015         * jit.c (jit_object_close_impl): Use new.
3016         (jit_unregister_code): Use delete.
3017         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3018         (~objfile): Rename from free_objfile.
3019         (free_objfile_separate_debug, do_free_objfile_cleanup)
3020         (free_all_objfiles, objfile_purge_solibs): Use delete.
3021         * objfiles.h (struct objfile): Add constructor and destructor.
3022         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
3023         (allocate_objfile, free_objfile): Don't declare.
3024         (struct objstats): Add initializers.
3025
3026 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3027
3028         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3029         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3030         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3031         * gdbarch.h: Regenerate.
3032         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3033         Adjust comment.
3034         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3035         (i386_displaced_step_fixup): Adjust comment.
3036         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3037
3038 2017-10-12  Tom Tromey  <tom@tromey.com>
3039
3040         * prologue-value.h (pv_area::store_would_trash): Return bool.
3041         (pv_area::find_reg): Likewise.
3042         * prologue-value.c (pv_area::store_would_trash): Return bool.
3043         (pv_area::find_reg): Likewise.
3044
3045 2017-10-12  Tom Tromey  <tom@tromey.com>
3046
3047         * s390-linux-tdep.c (s390_store, s390_load)
3048         (s390_check_for_saved, s390_analyze_prologue): Update.
3049         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3050         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3051         * prologue-value.h (class pv_area): Move from prologue-value.c.
3052         Change names of members.  Add constructor, destructor, member
3053         functions.
3054         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3055         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3056         (pv_area_fetch, pv_area_scan): Don't declare.
3057         * prologue-value.c (struct pv_area::area_entry): Now member of
3058         pv_area.
3059         (struct pv_area): Move to prologue-value.h.
3060         (pv_area::pv_area): Rename from make_pv_area.
3061         (pv_area::~pv_area): Rename from free_pv_area.
3062         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3063         (clear_entries, find_entry, overlaps, store_would_trash, store)
3064         (fetch, find_reg, scan): Now member of pv_area.
3065         Remove "area" argument.  Update.
3066         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3067         Update.
3068         * mn10300-tdep.c (push_reg, check_for_saved)
3069         (mn10300_analyze_prologue): Update.
3070         * mep-tdep.c (is_arg_spill, check_for_saved)
3071         (mep_analyze_prologue): Update.
3072         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3073         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3074         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3075         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3076         Update.
3077         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3078         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3079
3080 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3081
3082         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3083         * linux-nat.c (linux_nat_delete_thread): New variable.
3084         (lwp_free): Invoke linux_nat_delete_thread if set.
3085         (linux_nat_set_delete_thread): New function.
3086         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3087         thread delete callback.
3088         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3089         (_initialize_arm_linux_nat): Assign thread delete callback.
3090         * s390-linux-nat.c (s390_delete_thread): New function.
3091         (_initialize_s390_nat): Assign thread delete callback.
3092         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3093         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3094         function.
3095         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3096         declaration.
3097         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3098         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3099
3100 2017-10-09  Tom Tromey  <tom@tromey.com>
3101
3102         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3103         std::string.
3104         * tui/tui-layout.c (enum tui_status): Use std::string.
3105
3106 2017-10-11  Tom Tromey  <tom@tromey.com>
3107
3108         * gdbthread.h (thread_command): Constify.
3109         * inferior.h (detach_command): Constify.
3110         * top.h (set_history, show_history): Constify.
3111         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3112         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3113         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3114         * printcmd.c (set_command): Constify.
3115         (non_const_set_command): New function.
3116         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3117         * breakpoint.c (enable_command, disable_command, delete_command)
3118         (catch_command, tcatch_command, set_breakpoint_cmd)
3119         (show_breakpoint_cmd): Constify.
3120         * macrocmd.c (macro_command): Constify.
3121         * infcmd.c (unset_command, kill_command, detach_command)
3122         (info_proc_cmd): Constify.
3123         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3124         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3125         (info_auto_load_cmd): Constify.
3126         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3127         (unset_tdesc_cmd): Constify.
3128         * ada-lang.c (set_ada_command, show_ada_command)
3129         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3130         * guile/guile.c (set_guile_command, show_guile_command)
3131         (info_guile_command): Constify.
3132         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3133         Constify.
3134         * skip.c (skip_command): Constify.
3135         * compile/compile.c (_initialize_compile): Constify.
3136         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3137         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3138         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3139         (maint_btrace_pt_show_cmd): Constify.
3140         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3141         Constify.
3142         * python/python.c (user_show_python, user_set_python): Constify.
3143         * mips-tdep.c (set_mips_command, show_mips_command)
3144         (set_mipsfpu_command): Constify.
3145         * record-btrace.c (cmd_record_btrace_start)
3146         (cmd_set_record_btrace, cmd_show_record_btrace)
3147         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3148         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3149         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3150         Constify.
3151         * symfile.c (overlay_command): Constify.
3152         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3153         * cli/cli-logging.c (set_logging_command, show_logging_command):
3154         Constify.
3155         * cli/cli-dump.c (dump_command, append_command)
3156         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3157         (tekhex_dump_command, binary_dump_command)
3158         (binary_append_command): Constify.
3159         * cli/cli-decode.c (struct cmd_list_element): Change type of
3160         "fun".
3161         * cli/cli-cmds.c (info_command, show_command, set_debug)
3162         (show_debug): Constify.
3163         (show_command): Add non-const overload.
3164         * top.c (set_history, show_history): Constify.
3165         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3166         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3167         * target.c (target_command): Constify.
3168         * sparc64-tdep.c (info_adi_command): Constify.
3169         * record-full.c (cmd_record_full_start): Constify.
3170         (set_record_full_command): Constify.  Fix typo.
3171         (show_record_full_command): Constify.
3172         * thread.c (thread_command, thread_apply_command): Constify.
3173         * memattr.c (dummy_cmd): Constify.
3174         * value.c (function_command): Constify.
3175         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3176         * probe.c (info_probes_command): Constify.
3177         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3178         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3179         (show_thread_cmd, set_thread_default_cmd)
3180         (show_thread_default_cmd): Constify.
3181         (check_empty): Constify.
3182         * tracepoint.c (tfind_command): Constify.
3183         * cp-support.c (maint_cplus_command): Constify.
3184         * windows-tdep.c (info_w32_command): Constify.
3185         * record.c (cmd_record_start, set_record_command)
3186         (show_record_command, info_record_command, cmd_record_goto):
3187         Constify.
3188         * ravenscar-thread.c (set_ravenscar_command)
3189         (show_ravenscar_command): Constify.
3190         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3191         Constify.
3192         (add_internal_problem_command): Remove casts.
3193         * arc-tdep.c (maintenance_print_arc_command): Constify.
3194         * valprint.c (set_print, show_print, set_print_raw)
3195         (show_print_raw): Constify.
3196         * maint.c (maintenance_command, maintenance_info_command)
3197         (maintenance_print_command, maintenance_set_cmd)
3198         (maintenance_show_cmd, set_per_command_cmd)
3199         (show_per_command_cmd, maintenance_check_command): Constify.
3200         * language.c (set_check, show_check): Constify.
3201         * typeprint.c (show_print_type, set_print_type): Constify.
3202         * go32-nat.c (go32_info_dos_command): Constify.
3203
3204 2017-10-11  Tom Tromey  <tom@tromey.com>
3205
3206         * breakpoint.c (prepare_re_set_context): Remove.
3207         (breakpoint_re_set_one): Update.  Don't use cleanups.
3208         (breakpoint_re_set): Use scoped_restore, std::string, and
3209         scoped_restore_current_language.
3210
3211 2017-10-11  Tom Tromey  <tom@tromey.com>
3212
3213         * breakpoint.c (commands_command_1): Use std::string.
3214         (cleanup_executing_breakpoints): Remove.
3215         (bpstat_do_actions_1): Use scoped_restore.
3216         (bpstat_check_watchpoint): Use std::string.
3217         (decode_static_tracepoint_spec): Likewise.
3218         (break_range_command): Likewise.
3219         (watch_command_1): Likewise.
3220         (compare_breakpoints): Change argument types.
3221         (clear_command): Use std::vector.
3222         (cleanup_executing_breakpoints): Remove.
3223         (update_global_location_list): Use unique_xmalloc_ptr.
3224         (strace_command): Remove unused declaration.
3225
3226 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3227
3228         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3229         * NEWS: Mention new FreeBSD/arm native configuration.
3230         * configure.host: Add arm*-*-freebsd*.
3231         * configure.nat: Likewise.
3232         * arm-fbsd-nat.c: New file.
3233
3234 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3235
3236         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3237         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3238         * NEWS: Mention new FreeBSD/arm target.
3239         * configure.tgt: Add arm*-*-freebsd*.
3240         * arm-fbsd-tdep.c: New file.
3241         * arm-fbsd-tdep.h: New file.
3242
3243 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3244
3245         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3246         `gdbarch_elfcore_write_linux_prpsinfo'.
3247         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3248         method.
3249         (elf_internal_linux_prpsinfo): Remove declaration.
3250         * gdbarch.h: Regenerate.
3251         * gdbarch.c: Regenerate.
3252
3253 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3254
3255         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3256         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3257
3258 2017-10-11  Pedro Alves  <palves@redhat.com>
3259
3260         * breakpoint.c (reattach_breakpoints): Delete.
3261         * breakpoint.h (reattach_breakpoints): Delete.
3262
3263 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3264
3265         * symfile.c (registered_sym_fns): Make struct, not typedef.
3266         (DEF_VEC_O (registered_sym_fns)): Remove.
3267         (symtab_fns): Change type to std::vector.
3268         (add_symtab_fns): Adjust.
3269         (find_sym_fns): Adjust.
3270
3271 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3272
3273         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3274         * arc-tdep.h (arc_arch_is_em): New function.
3275         (arc_arch_is_hs): Likewise.
3276
3277 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3278
3279         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3280         parentheses in the declaration.
3281         (macro_lookup_inclusion): Likewise.
3282         (macro_lookup_definition): Likewise.
3283         * p-lang.h (pascal_builtin_types): Likewise.
3284         * tui/tui-data.c (tui_win_list): Likewise.
3285         * tui/tui-data.h (tui_win_list): Likewise.
3286         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3287
3288 2017-10-11  Mark Rages  <markrages@gmail.com>
3289
3290         * target-memory.c (block_boundaries): Fix for block address not
3291         aligned on block size.
3292
3293 2017-10-10  Pedro Alves <palves@redhat.com>
3294             Tom Tromey  <tom@tromey.com>
3295
3296         * breakpoint.c (struct captured_breakpoint_query_args)
3297         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3298         (print_breakpoint): New.
3299         * breakpoint.h (print_breakpoint): Declare.
3300         * common/common-exceptions.h (enum return_reason): Remove
3301         references to catch_exceptions.
3302         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3303         Delete.
3304         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3305         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3306         * gdb.h: Delete.
3307         * gdbthread.h (thread_select): Declare.
3308         * mi/mi-cmd-break.c: Don't include gdb.h.
3309         (breakpoint_notify): Use print_breakpoint.
3310         * mi/mi-cmd-catch.c: Don't include gdb.h.
3311         * mi/mi-interp.c: Don't include gdb.h.
3312         (mi_print_breakpoint_for_event): New.
3313         (mi_breakpoint_created, mi_breakpoint_modified): Use
3314         mi_print_breakpoint_for_event.
3315         * mi/mi-main.c: Don't include gdb.h.
3316         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3317         thread_select instead of gdb_thread_select.
3318         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3319         of using gdb_list_thread_ids.
3320         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3321         FILEIO_ENOSYS here.
3322         (remote_fileio_request): Use TRY/CATCH instead of
3323         catch_exceptions.
3324         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3325         (symbol_file_add_from_memory_wrapper): Delete.
3326         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3327         * thread.c: Don't include gdb.h.
3328         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3329         (thread_alive): Use thread_select.
3330         (do_captured_thread_select): Delete, parts salvaged as ...
3331         (thread_select): ... this new function.
3332         (gdb_thread_select): Delete.
3333
3334 2017-10-10  Pedro Alves  <palves@redhat.com>
3335             Tom Tromey  <tom@tromey.com>
3336
3337         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3338         and reverse logic.
3339         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3340         No longer macros.  Instead ...
3341         (enum wp_check_result): They're now values of this new
3342         enumeration.
3343         (watchpoint_check): Change return type to wp_check_result and
3344         parameter type to bpstat.
3345         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3346         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3347         catch_errors.  Reverse logic of watchpoint_check call.
3348         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3349         pointer as parameter.
3350         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3351         * common/common-exceptions.c (throw_exception_sjlj): Update
3352         comments to avoid mentioning catch_errors.
3353         * exceptions.c (catch_errors): Delete.
3354         * exceptions.h: Update comments to avoid mentioning catch_errors.
3355         (catch_errors_ftype, catch_errors): Delete.
3356         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3357         (hook_stop_stub): Delete.
3358         (restore_selected_frame): Change return type to void, and
3359         parameter type to const frame_id &.
3360         (restore_infcall_control_state): Use TRY/CATCH instead of
3361         catch_errors.
3362         * main.c (captured_command_loop): Return void and remove
3363         parameter.  Remove references to catch_errors.
3364         (captured_main): Use TRY/CATCH instead of catch_errors.
3365         * objc-lang.c (objc_submethod_helper_data)
3366         (find_objc_msgcall_submethod_helper): Delete.
3367         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3368         catch_errors.
3369         * record-full.c (record_full_message): Return void.
3370         (record_full_message_args, record_full_message_wrapper): Delete.
3371         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3372         instead of catch_errors.
3373         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3374         parameter type to int.
3375         * solib-darwin.c (open_symbol_file_object): Ditto.
3376         * solib-dsbt.c (open_symbol_file_object): Ditto.
3377         * solib-frv.c (open_symbol_file_object): Ditto.
3378         * solib-svr4.c (open_symbol_file_object): Ditto.
3379         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3380         * solib.c (update_solib_list): Use TRY/CATCH instead of
3381         catch_errors.
3382         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3383         Change type.
3384         * symmisc.c (struct print_symbol_args): Remove.
3385         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3386         (print_symbol): Change type.
3387         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3388         and remove parameters.
3389         (catch_errors): New.
3390         (get_windows_debug_event): Adjust.
3391
3392 2017-10-09  Tom Tromey  <tom@tromey.com>
3393
3394         * mi/mi-main.c (free_splay_tree): Remove.
3395         (list_available_thread_groups): Use splay_tree_up.
3396         * common/gdb_splay_tree.h: New file.
3397
3398 2017-10-09  Tom Tromey  <tom@tromey.com>
3399
3400         * mi/mi-main.c (do_nothing): Remove.
3401         (list_available_thread_groups): Update.
3402
3403 2017-10-09  Pedro Alves  <palves@redhat.com>
3404
3405         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3406         reading registers when switching context.
3407
3408 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3409
3410         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3411         (fbsd_convert_siginfo): Likewise.
3412         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3413
3414 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3415
3416         * configure.ac (try_guile_versions): Remove guile-2.2.
3417         * configure: Regenerate.
3418
3419 2017-10-09  Tom Tromey  <tom@tromey.com>
3420
3421         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3422         (COMPILE.pre): Use $(CXX).
3423
3424 2017-10-09  Pedro Alves  <palves@redhat.com>
3425
3426         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3427         Use bool.
3428         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3429         * cp-support.h (cp_remove_params): Now returns a
3430         gdb::unique_xmalloc_ptr.
3431         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3432         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3433         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3434         returning a gdb::unique_xmalloc_ptr.
3435         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3436         * stack.c (find_frame_funname): Adjust to cp_remove_params
3437         returning a gdb::unique_xmalloc_ptr.
3438
3439 2017-10-08  Tom Tromey  <tom@tromey.com>
3440
3441         * dwarf2read.c (dwarf2_get_dwz_file): Use
3442         gdb::unique_xmalloc_ptr.
3443         (find_slot_in_mapped_hash): Likewise.
3444         (dwarf2_physname): Likewise.
3445         (create_dwo_unit_in_dwp_v1): Use std::string.
3446         (create_dwo_unit_in_dwp_v2): Likewise.
3447         (lookup_dwo_cutu): Likewise.
3448         (inherit_abstract_dies): Use std::vector.
3449         (read_array_type): Likewise.
3450         (dwarf_decode_macros): Remove unused declaration.
3451         (unsigned_int_compar): Remove.
3452         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3453         (psymtabs_addrmap_cleanup): Remove.
3454
3455 2017-10-08  Tom Tromey  <tom@tromey.com>
3456
3457         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3458         * frame.h (frame_cleanup_after_sniffer): Declare.
3459         (frame_prepare_for_sniffer): Return void.
3460         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3461         type of argument.
3462         (frame_prepare_for_sniffer): Return void.
3463
3464 2017-10-08  Tom Tromey  <tom@tromey.com>
3465
3466         * utils.h (make_cleanup_value_free): Remove.
3467         * utils.c (do_value_free, struct cleanup): Remove.
3468         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3469         Use gdb_value_up.
3470         * value.h (struct value_deleter): New.
3471         (gdb_value_up): New typedef.
3472
3473 2017-10-08  Tom Tromey  <tom@tromey.com>
3474
3475         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3476         (make_cleanup_free_search_symbols): Remove.
3477         (search_symbols): Return std::vector.
3478         (symbol_search::compare_search_syms): Now member of
3479         symbol_search.  Change arguments.
3480         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3481         (symtab_symbol_info, rbreak_command): Update.
3482         * symtab.h (struct symbol_search) <next>: Remove.
3483         Add constructors.
3484         (symbol_search::operator<): New function.
3485         (symbol_search::operator==): New function.
3486         (search_symbols): Remove std::vector.
3487         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3488         (symbol_search::compare_search_syms): Declare.
3489
3490 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3491
3492         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3493         arch/aarch64-insn.o.
3494         Remove one rule.
3495         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3496
3497 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3498
3499         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3500         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3501         arch/arm-linux.o respectively.
3502         * configure.tgt: Likewise.
3503
3504 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3505
3506         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3507         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3508
3509 2017-10-06  Pedro Alves  <palves@redhat.com>
3510
3511         * windows-nat.c: Include <algorithm>.
3512
3513 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3514
3515         * configure.tgt (i386_tobjs): New variable.
3516         (amd64_tobjs): New variable.
3517         Set $cpu_obs and $os_obs.
3518
3519 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3520
3521         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3522         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3523         (clean): Remove object files and dependency files.
3524         (distclean): Remove the directory.
3525         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3526         * configure: Re-generated.
3527         * configure.tgt: Replace amd64.o with arch/amd64.o.
3528
3529 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3530
3531         PR build/22188
3532         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3533         and SETEND.
3534
3535 2017-10-05  Pedro Alves  <palves@redhat.com>
3536
3537         * linux-nat.c (linux_child_follow_fork): When following the parent
3538         and detaching the child, consult the parent thread's architecture
3539         instead of the child's.
3540
3541 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3542
3543         * ax.h: Do not include "doublest.h".
3544         (union agent_val): Remove.
3545
3546 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3547
3548         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3549         (decimal_to_string): Return std::string object.
3550         (decimal_from_string): Accept std::string object.  Return bool.
3551         (decimal_from_integral, decimal_from_doublest): Remove.
3552         (decimal_from_longest): Add prototype.
3553         (decimal_from_ulongest): Likewise.
3554         (decimal_to_longest): Likewise.
3555         (decimal_from_doublest): Likewise.
3556         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3557         (MAX_DECIMAL_STRING): Move here.
3558         (decimal_to_string): Return std::string object.
3559         (decimal_from_string): Accept std::string object.  Return bool.
3560         (decimal_from_integral): Remove, replace by ...
3561         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3562         (decimal_to_longest): New function.
3563         (decimal_from_floating): Remove, replace by ...
3564         (decimal_from_doublest): ... this new function.
3565         (decimal_to_doublest): Update to new decimal_to_string interface.
3566
3567         * value.c (unpack_long): Use decimal_to_longest.
3568         * valops.c (value_cast): Use decimal_from_doublest instead of
3569         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3570         decimal_from_integral.
3571         * valarith.c (value_args_as_decimal): Likewise.
3572         * valprint.c (print_decimal_floating): Update to new
3573         decimal_to_string interface.
3574         * printcmd.c (printf_decfloat): Likewise.
3575         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3576
3577 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3578
3579         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3580         * gdbtypes.c: Include "floatformat.h".
3581         * value.c: Likewise.
3582         * m68k-tdep.c: Likewise.
3583
3584         * findvar.c: Do not include "floatformat.h".
3585         * amd64-darwin-tdep.c: Likewise.
3586         * arm-linux-tdep.c: Likewise.
3587         * i386-darwin-tdep.c: Likewise.
3588         * i387-tdep.c: Likewise.
3589         * m68k-linux-tdep.c: Likewise.
3590         * mep-tdep.c: Likewise.
3591         * mips-tdep.c: Likewise.
3592         * nios2-tdep.c: Likewise.
3593         * s390-linux-tdep.c: Likewise.
3594         * sparc-obsd-tdep.c: Likewise.
3595         * sparc-tdep.c: Likewise.
3596         * sparc64-tdep.c: Likewise.
3597         * spu-tdep.c: Likewise.
3598         * tic6x-tdep.c: Likewise.
3599         * tilegx-tdep.c: Likewise.
3600         * vax-tdep.c: Likewise.
3601         * xstormy16-tdep.c: Likewise.
3602         * xtensa-tdep.c: Likewise.
3603
3604         * top.c: Do not include "doublest.h".
3605         * aarch64-tdep.c: Likewise.
3606         * alpha-tdep.c: Likewise.
3607         * arm-linux-tdep.c: Likewise.
3608         * m68k-linux-tdep.c: Likewise.
3609         * tilegx-tdep.c: Likewise.
3610         * xstormy16-tdep.c: Likewise.
3611
3612 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3613
3614         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3615         (mipsn32_fbsd_sigframe): Define.
3616         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3617         for FreeBSD/mipsn32.
3618
3619 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3620
3621         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3622         AT_HWCAP.
3623
3624 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3625
3626         * MAINTAINERS (Misc): Update my email address.
3627
3628 2017-10-04  Pedro Alves  <palves@redhat.com>
3629
3630         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3631         it instead of target_gdbarch.
3632         (get_remote_state, get_remote_packet_size): Adjust
3633         get_remote_arch_state calls, passing down target_gdbarch
3634         explicitly.
3635         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3636         'gdbarch' and use it instead of target_gdbarch.
3637         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3638         passing down target_gdbarch explicitly.
3639         (struct stop_reply) <arch>: New field.
3640         (remote_parse_stop_reply): Use the stopped thread's architecture,
3641         not the current inferior's.  Save the architecture in the
3642         stop_reply.
3643         (process_stop_reply): Use the stop reply's architecture.
3644         (process_g_packet, remote_fetch_registers)
3645         (remote_prepare_to_store, store_registers_using_G)
3646         (remote_store_registers): Adjust get_remote_arch_state calls,
3647         using the regcache's architecture.
3648         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3649         passing down target_gdbarch explicitly.
3650         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3651         beneath instead of calling target_gdbarch.
3652         * target.c (default_thread_architecture): Use the specified
3653         inferior's architecture, instead of the current inferior's
3654         architecture (via target_gdbarch).
3655
3656 2017-10-04  Pedro Alves  <palves@redhat.com>
3657
3658         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3659         case.
3660         (regcache_print): Handle !target_has_registers here instead.
3661
3662 2017-10-04  Pedro Alves  <palves@redhat.com>
3663
3664         * frame.c (create_test_frame): Delete.
3665         * frame.h (create_test_frame): Delete.
3666         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3667         (class regcache_test): Delete.
3668         (test_target_has_registers, test_target_has_stack)
3669         (test_target_has_memory, test_target_prepare_to_store)
3670         (test_target_store_registers): New functions.
3671         (test_target_ops): New class.
3672         (register_to_value_test): Error out if there's already a
3673         process_stratum (or higher) target pushed.  Create a fuller mock
3674         environment, with mock target_ops, inferior, address space, thread
3675         and inferior_ptid.
3676         * progspace.c (struct address_space): Move to ...
3677         * progspace.h (struct address_space): ... here.
3678         * regcache.h (regcache::~regcache, regcache::raw_write)
3679         [GDB_SELF_TEST]: No longer virtual.
3680
3681 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3682
3683         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3684
3685 2017-10-04  Pedro Alves  <palves@redhat.com>
3686
3687         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3688         out of 'between TRY and CATCH'.
3689
3690 2017-10-04  Pedro Alves  <palves@redhat.com>
3691
3692         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3693         * common/common-exceptions.h (TRY): Open an outermost scope.
3694         Expand intro comment.
3695         (CATCH): Reindent.
3696         (END_CATCH): Close the outermost scope.
3697         * completer.c (complete_line_internal): Add missing END_CATCH.
3698
3699 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3700
3701         * NEWS (Changes since GDB 8.0): Add entry about new
3702         'set-cwd-on-gdbserver' feature.
3703         (New remote packets): Add entry for QSetWorkingDir.
3704         * common/common-inferior.h (set_inferior_cwd): New prototype.
3705         * infcmd.c (set_inferior_cwd): Remove "static".
3706         (show_cwd_command): Expand text to include remote debugging.
3707         * remote.c: Add PACKET_QSetWorkingDir.
3708         (remote_protocol_features) <QSetWorkingDir>: New entry for
3709         PACKET_QSetWorkingDir.
3710         (extended_remote_set_inferior_cwd): New function.
3711         (extended_remote_create_inferior): Call
3712         "extended_remote_set_inferior_cwd".
3713         (_initialize_remote): Call "add_packet_config_cmd" for
3714         QSetWorkingDir.
3715
3716 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3717
3718         * NEWS (New commands): Mention "set/show cwd".
3719         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3720         "cd" command's help text.
3721         * common/common-inferior.h (get_inferior_cwd): New prototype.
3722         * infcmd.c (inferior_cwd_scratch): New global variable.
3723         (set_inferior_cwd): New function.
3724         (get_inferior_cwd): Likewise.
3725         (set_cwd_command): Likewise.
3726         (show_cwd_command): Likewise.
3727         (_initialize_infcmd): Add "set/show cwd" commands.
3728         * inferior.h (class inferior) <cwd>: New field.
3729         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3730         (fork_inferior): Change inferior's cwd before its execution.
3731         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3732         to CreateProcess.
3733
3734 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3735
3736         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3737         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3738         (COMMON_OBS): Add gdb_tilde_expand.o.
3739         * common/gdb_tilde_expand.c: New file.
3740         * common/gdb_tilde_expand.h: Likewise.
3741
3742 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3743
3744         * gdbarch.sh (objfile): Remove duplicate declaration.
3745         * gdbarch.h: Regenerate.
3746
3747 2017-10-03  Tom Tromey  <tom@tromey.com>
3748
3749         * utils.c (internal_vproblem): Use string_vprintf.
3750
3751 2017-10-03  Tom Tromey  <tom@tromey.com>
3752
3753         * printcmd.c (info_symbol_command): Use std::string.
3754
3755 2017-10-03  Tom Tromey  <tom@tromey.com>
3756
3757         * top.c (gdb_safe_append_history): Use std::string.
3758
3759 2017-10-03  Tom Tromey  <tom@tromey.com>
3760
3761         * event-top.c (stdin_event_handler): Update.
3762         * main.c (captured_main_1): Update.
3763         * top.h (make_delete_ui_cleanup): Remove.
3764         (struct ui): Add constructor and destructor.
3765         (new_ui, delete_ui): Remove.
3766         * top.c (make_delete_ui_cleanup): Remove.
3767         (new_ui_command): Use std::unique_ptr.
3768         (delete_ui_cleanup): Remove.
3769         (ui::ui): Rename from new_ui.  Update.
3770         (free_ui): Remove.
3771         (ui::~ui): Rename from delete_ui.  Update.
3772
3773 2017-10-03  Tom Tromey  <tom@tromey.com>
3774
3775         * symfile.c (load_progress): Use gdb::byte_vector.
3776
3777 2017-10-03  Tom Tromey  <tom@tromey.com>
3778
3779         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3780         declaration.
3781         * printcmd.c (x_command): Remove unused declaration.
3782         * symfile.c (symbol_file_command): Remove unused declaration.
3783
3784 2017-10-03  Tom Tromey  <tom@tromey.com>
3785
3786         * utils.c (internal_vproblem): Use std::string.
3787         (defaulted_query): Likewise.
3788
3789 2017-10-03  Tom Tromey  <tom@tromey.com>
3790
3791         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3792         * top.c (execute_command_to_string): Update.
3793         * utils.c (make_cleanup_restore_page_info): Remove.
3794         (do_restore_page_info_cleanup): Remove.
3795         (set_batch_flag_and_restore_page_info):
3796         New.
3797         (make_cleanup_restore_page_info): Remove.
3798         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3799         (~set_batch_flag_and_restore_page_info): New
3800         (make_cleanup_restore_uinteger): Remove.
3801         (make_cleanup_restore_integer): Remove.
3802         (struct restore_integer_closure): Remove.
3803         (restore_integer): Remove.
3804         * utils.h (struct set_batch_flag_and_restore_page_info): New
3805         class.
3806         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3807         (make_cleanup_restore_page_info): Remove.
3808         (make_cleanup_restore_uinteger) Remove.
3809         (make_cleanup_restore_integer) Remove.
3810
3811 2017-10-03  Tom Tromey  <tom@tromey.com>
3812
3813         * record-full.h (record_full_gdb_operation_disable_set): Return
3814         scoped_restore_tmpl<int>.
3815         * infrun.c (adjust_pc_after_break): Update.
3816         (handle_signal_stop): Update.
3817         * record-full.c (record_full_gdb_operation_disable_set): Return
3818         scoped_restore_tmpl<int>.
3819         (record_full_wait_1, record_full_insert_breakpoint)
3820         (record_full_remove_breakpoint, record_full_save)
3821         (record_full_goto_insn): Update.
3822
3823 2017-10-02  Tom Tromey  <tom@tromey.com>
3824
3825         PR rust/22236:
3826         * rust-lang.c (rust_val_print_str): New function.
3827         (val_print_struct): Call it.
3828         (rust_subscript): Preserve name of slice type.
3829
3830 2017-10-02  Tom Tromey  <tom@tromey.com>
3831
3832         * rust-lang.c (rust_subscript): Handle slices in
3833         EVAL_AVOID_SIDE_EFFECTS case.
3834
3835 2017-10-02  Tom Tromey  <tom@tromey.com>
3836
3837         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3838
3839 2017-10-02  Tom Tromey  <tom@tromey.com>
3840
3841         * rust-lang.h (rust_slice_type): Add "extern".
3842
3843 2017-10-02  Tom Tromey  <tom@tromey.com>
3844             Pedro Alves  <palves@redhat.com>
3845
3846         * ada-lang.h (ada_exc_info::operator<): Make const.
3847         (ada_exc_info::operator==): Make const.
3848         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3849         Make const.
3850
3851 2017-09-29  Tom Tromey  <tom@tromey.com>
3852
3853         * target.c (read_whatever_is_readable): Change type of "result".
3854         Update.
3855         (free_memory_read_result_vector): Remove.
3856         (read_memory_robust): Change return type.  Update.
3857         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3858         bin2hex, std::string.
3859         * target.h (memory_read_result_s): Remove typedef.
3860         (free_memory_read_result_vector): Remove.
3861         (read_memory_robust): Return std::vector.
3862
3863 2017-09-29  Tom Tromey  <tom@tromey.com>
3864
3865         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3866
3867 2017-09-29  Tom Tromey  <tom@tromey.com>
3868
3869         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3870         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3871         operator< and operator==.
3872         (ada_exceptions_list): Return a std::vector.
3873         * ada-lang.c (ada_exc_info::operator<): Rename from
3874         compare_ada_exception_info.
3875         (ada_exc_info::operator==): New.
3876         (sort_remove_dups_ada_exceptions_list): Change type of
3877         "exceptions".
3878         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3879         (ada_add_global_exceptions): Likewise.
3880         (ada_exceptions_list_1): Return a std::vector.
3881         (ada_exceptions_list): Likewise.
3882
3883 2017-09-29  Tom Tromey  <tom@tromey.com>
3884
3885         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3886         'std::set *'.
3887         (print_one_inferior): Update.
3888         (free_vector_of_ints): Remove.
3889         (list_available_thread_groups): Change "ids" to std::set.
3890         (mi_cmd_list_thread_groups): Update.
3891         (struct collect_cores_data) <core>: Now a std::set.
3892         (collect_cores): Update.
3893         (unique): Remove.
3894         (print_one_inferior): Update.
3895
3896 2017-09-29  Tom Tromey  <tom@tromey.com>
3897
3898         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3899         (mi_execute_async_cli_command): Likewise.
3900         (mi_cmd_trace_frame_collected): Use field_fmt.
3901
3902 2017-09-29  Tom Tromey  <tom@tromey.com>
3903
3904         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3905         gdb::byte_vector.
3906
3907 2017-09-29  Tom Tromey  <tom@tromey.com>
3908
3909         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3910
3911 2017-09-29  Tom Tromey  <tom@tromey.com>
3912
3913         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3914
3915 2017-09-29  Tom Tromey  <tom@tromey.com>
3916
3917         * varobj.h (varobj_gen_name): Return std::string.
3918         * varobj.c (varobj_gen_name): Return std::string.
3919         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3920         (mi_cmd_var_delete): Don't copy "name".
3921
3922 2017-09-29  Tom Tromey  <tom@tromey.com>
3923
3924         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3925         (mi_cmd_break_insert_1): Update.
3926
3927 2017-09-29  Tom Tromey  <tom@tromey.com>
3928
3929         * target.h (make_scoped_defer_target_commit_resume): Update.
3930         * target.c (make_scoped_defer_target_commit_resume): Rename from
3931         make_cleanup_defer_target_commit_resume.  Return a
3932         scoped_restore.
3933         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3934
3935 2017-09-29  Tom Tromey  <tom@tromey.com>
3936
3937         * main.c (captured_main_1): Remove unused declaration.
3938         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3939
3940 2017-09-29  Tom Tromey  <tom@tromey.com>
3941
3942         * symtab.c (search_symbols): Remove unused outer cleanup.
3943         (make_source_files_completion_list): Remove unused declaration.
3944
3945 2017-09-29  Tom Tromey  <tom@tromey.com>
3946
3947         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3948
3949 2017-09-29  Tom Tromey  <tom@tromey.com>
3950
3951         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3952         gdb::byte_vector.
3953
3954 2017-09-29  Tom Tromey  <tom@tromey.com>
3955
3956         * complaints.c (vcomplaint): Use std::string.
3957
3958 2017-09-29  Tom Tromey  <tom@tromey.com>
3959
3960         * tracepoint.c (trace_variable_command): Use std::string.
3961         (encode_actions_1): Remove unused declarations.
3962         (create_tsv_from_upload): Use std::string.
3963
3964 2017-09-29  Tom Tromey  <tom@tromey.com>
3965
3966         * cp-support.c (gdb_demangle): Use std::string.
3967
3968 2017-09-29  Tom Tromey  <tom@tromey.com>
3969
3970         * stack.c (parse_frame_specification): Use std::string
3971         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3972
3973 2017-09-29  Tom Tromey  <tom@tromey.com>
3974
3975         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3976
3977 2017-09-29  Tom Tromey  <tom@tromey.com>
3978
3979         * utils.c (vfprintf_maybe_filtered): Use std::string.
3980         (vfprintf_unfiltered): Likewise.
3981
3982 2017-09-29  Tom Tromey  <tom@tromey.com>
3983
3984         * event-top.c (top_level_prompt): Return std::string.
3985         (display_gdb_prompt): Update.
3986
3987 2017-09-29  Tom Tromey  <tom@tromey.com>
3988
3989         * unittests/common-utils-selftests.c (format): New function.
3990         (string_vprintf_tests): New function.
3991         (_initialize_common_utils_selftests): Register new tests.
3992         * common/common-utils.c (string_vprintf): New function.
3993         * common/common-utils.h (string_vprintf): Declare.
3994
3995 2017-09-29  Pedro Alves  <palves@redhat.com>
3996
3997         * common/rsp-low.c (unpack_varlen_hex): Constify.
3998         * common/rsp-low.h (unpack_varlen_hex): Constify.
3999         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4000         Constify.
4001         * remote.c (remote_set_permissions, read_ptid)
4002         (remote_current_thread, remote_get_threads_with_qthreadinfo)
4003         (remote_static_tracepoint_marker_at)
4004         (remote_static_tracepoint_markers_by_strid)
4005         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4006         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4007         (parse_tracepoint_definition, parse_tsv_definition)
4008         (parse_static_tracepoint_marker_definition): Constify.
4009         * tracepoint.h (parse_static_tracepoint_marker_definition)
4010         (parse_trace_status, parse_tracepoint_status)
4011         (parse_tracepoint_definition, parse_tsv_definition): Constify.
4012
4013 2017-09-29  Pedro Alves  <palves@redhat.com>
4014
4015         * remote.c (target_buf, target_buf_size): Delete.
4016         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4017         Use the connection's packet buffer instead.
4018         All callers adjusted.
4019         (_initialize_remote): Remove references to target_buf and
4020         target_buf_size.
4021
4022 2017-09-28  Pedro Alves  <palves@redhat.com>
4023
4024         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4025         unittests/common-utils-selftests.c.
4026         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4027         (COMMON_OBS): Remove utils-selftests.o.
4028         * utils-selftests.c: Move to ...
4029         * unittests/common-utils-selftests.c: ... here and rename self
4030         test to "string_printf".
4031
4032 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4033
4034         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4035         having NULL cus or tus.
4036
4037 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4038
4039         * arm-tdep.c: (convert_from_extended): Remove.
4040         (convert_to_extended): Likewise.
4041         (arm_extract_return_value): Use convert_typed_floating.
4042         (arm_store_return_value): Likewise.
4043
4044         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4045         * sh-tdep.c: Do not include "floatformat.h".
4046         (sh_littlebyte_bigword_type): New function.
4047         (sh_register_convert_to_virtual): Use convert_typed_floating.
4048         (sh_register_convert_to_raw): Likewise.
4049         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4050         (sh64_littlebyte_bigword_type): New function.
4051         (sh64_extract_return_value): Use convert_typed_floating.
4052         (sh64_register_convert_to_virtual): Likewise.
4053         (sh64_register_convert_to_raw): Likewise.
4054
4055 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4056
4057         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4058         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4059
4060         * gdbtypes.h (union type_specific): Make field floatformat hold
4061         just a single struct floatformat, not an array.
4062         (floatformat_from_type): Move here.
4063         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4064         changed TYPE_FLOATFORMAT definition.
4065         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4066         (recursive_dump_type): Likewise.
4067         (init_float_type): Install correct floatformat for byte order.
4068         (arch_float_type): Likewise.
4069
4070 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4071
4072         * gdbtypes.c (init_type): Change incoming argument from
4073         length-in-bytes to length-in-bits.  Assert length is a
4074         multiple of TARGET_CHAR_BITS.
4075         (arch_type, arch_flags_type): Likewise.
4076         (init_integer_type): Update call to init_type.
4077         (init_character_type): Likewise.
4078         (init_boolean_type): Likewise.
4079         (init_float_type): Likewise.
4080         (init_decfloat_type): Likewise.
4081         (init_complex_type): Likewise.
4082         (init_pointer_type): Likewise.
4083         (objfile_type): Likewise.
4084         (arch_integer_type): Update call to arch_type.
4085         (arch_character_type): Likewise.
4086         (arch_boolean_type): Likewise.
4087         (arch_float_type): Likewise.
4088         (arch_decfloat_type): Likewise.
4089         (arch_complex_type): Likewise.
4090         (arch_pointer_type): Likewise.
4091         (gdbtypes_post_init): Likewise.
4092
4093         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4094         (read_base_type): Likewise.
4095         * mdebugread.c (basic_type): Likewise.
4096         * stabsread.c (dbx_init_float_type): Likewise.
4097         (rs6000_builtin_type): Likewise.
4098         (read_range_type): Likewise.  Also, fix call to init_integer_type
4099         with erroneous length argument.
4100
4101         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4102         * d-lang.c (build_d_types): Likewise.
4103         * f-lang.c (build_fortran_types): Likewise.
4104         * go-lang.c (build_go_types): Likewise.
4105         * opencl-lang.c (build_opencl_types): Likewise.
4106         * jit.c (finalize_symtab): Likewise.
4107         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4108         (build_std_type_info_type): Likewise.
4109         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4110         update call to arch_flags_type.
4111
4112         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4113         arch_type.
4114         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4115         * windows-tdep.c (windows_get_tlb_type): Likewise.
4116
4117         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4118         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4119         * m32c-tdep.c (make_types): Likewise.
4120         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4121         (rl78_psw_type): Update call to arch_flags_type.
4122         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4123         * rx-tdep.c (rx_psw_type): Likewise.
4124         (rx_fpsw_type): Likewise.
4125         * sparc-tdep.c (sparc_psr_type): Likewise.
4126         (sparc_fsr_type): Likewise.
4127         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4128         (sparc64_ccr_type): Likewise.
4129         (sparc64_fsr_type): Likewise.
4130         (sparc64_fprs_type): Likewise.
4131
4132 2017-09-27  Tom Tromey  <tom@tromey.com>
4133
4134         * findcmd.c (find_command): Constify.
4135
4136 2017-09-27  Tom Tromey  <tom@tromey.com>
4137
4138         * ada-tasks.c (task_command_1, task_command): Constify.
4139
4140 2017-09-27  Tom Tromey  <tom@tromey.com>
4141
4142         * symtab.c (maintenance_print_symbol_cache)
4143         (maintenance_flush_symbol_cache)
4144         (maintenance_print_symbol_cache_statistics): Constify.
4145
4146 2017-09-27  Tom Tromey  <tom@tromey.com>
4147
4148         * inferior.c (detach_inferior_command, kill_inferior_command)
4149         (inferior_command): Constify.
4150
4151 2017-09-27  Tom Tromey  <tom@tromey.com>
4152
4153         * regcache.c (regcache_print, maintenance_print_registers)
4154         (maintenance_print_raw_registers)
4155         (maintenance_print_cooked_registers)
4156         (maintenance_print_register_groups)
4157         (maintenance_print_remote_registers): Constify.
4158
4159 2017-09-27  Tom Tromey  <tom@tromey.com>
4160
4161         * printcmd.c (map_display_numbers, undisplay_command)
4162         (enable_disable_display_command, enable_display_command)
4163         (disable_display_command): Constify.
4164
4165 2017-09-27  Tom Tromey  <tom@tromey.com>
4166
4167         * breakpoint.h (delete_command): Don't declare.
4168         * breakpoint.c (delete_command, enable_once_command)
4169         (enable_count_command, enable_delete_command, breakpoint_1)
4170         (maintenance_info_breakpoints, stopin_command, stopat_command)
4171         (delete_command, delete_trace_command, save_breakpoints)
4172         (save_breakpoints_command, save_tracepoints_command): Constify.
4173
4174 2017-09-27  Tom Tromey  <tom@tromey.com>
4175
4176         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4177         (skip_ws, extract_identifier, macro_define_command)
4178         (macro_undef_command, macro_list_command): Constify.
4179
4180 2017-09-27  Tom Tromey  <tom@tromey.com>
4181
4182         * infcmd.c (environment_info, set_environment_command)
4183         (unset_environment_command, path_info, info_proc_cmd_1)
4184         (info_proc_cmd_mappings, info_proc_cmd_stat)
4185         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4186         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4187
4188 2017-09-27  Tom Tromey  <tom@tromey.com>
4189
4190         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4191         Constify.
4192
4193 2017-09-27  Tom Tromey  <tom@tromey.com>
4194
4195         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4196
4197 2017-09-27  Tom Tromey  <tom@tromey.com>
4198
4199         * demangle.c (demangle_command): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * progspace.c (maintenance_info_program_spaces_command):
4204         Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * compile/compile.c (check_raw_argument, compile_file_command)
4209         (compile_code_command, compile_print_command): Constify.
4210
4211 2017-09-27  Tom Tromey  <tom@tromey.com>
4212
4213         * reggroups.c (maintenance_print_reggroups): Constify.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * dwarf2read.c (save_gdb_index_command): Constify.
4218
4219 2017-09-27  Tom Tromey  <tom@tromey.com>
4220
4221         * stap-probe.c (info_probes_stap_command): Constify.
4222
4223 2017-09-27  Tom Tromey  <tom@tromey.com>
4224
4225         * fork-child.c (unset_exec_wrapper_command): Constify.
4226
4227 2017-09-27  Tom Tromey  <tom@tromey.com>
4228
4229         * btrace.c (get_uint, get_context_size, no_chunk)
4230         (maint_btrace_packet_history_cmd)
4231         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4232         (maint_info_btrace_cmd): Constify.
4233
4234 2017-09-27  Tom Tromey  <tom@tromey.com>
4235
4236         * reverse.c (delete_bookmark_command): Constify.
4237
4238 2017-09-27  Tom Tromey  <tom@tromey.com>
4239
4240         * remote.c (set_memory_packet_size)
4241         (set_memory_write_packet_size, show_memory_write_packet_size)
4242         (set_memory_read_packet_size, show_memory_read_packet_size)
4243         (compare_sections_command, packet_command, remote_put_command)
4244         (remote_get_command, remote_delete_command): Constify.
4245
4246 2017-09-27  Tom Tromey  <tom@tromey.com>
4247
4248         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4249         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4250         (set_mipsfpu_auto_command): Constify.
4251
4252 2017-09-27  Tom Tromey  <tom@tromey.com>
4253
4254         * cli/cli-cmds.h (cd_command): Constify.
4255         * cli/cli-cmds.c (cd_command): Constify.
4256
4257 2017-09-27  Tom Tromey  <tom@tromey.com>
4258
4259         * thread.c (thread_name_command, thread_find_command): Constify.
4260
4261 2017-09-27  Tom Tromey  <tom@tromey.com>
4262
4263         * probe.c (enable_probes_command, disable_probes_command):
4264         Constify.
4265
4266 2017-09-27  Tom Tromey  <tom@tromey.com>
4267
4268         * symfile.c (symbol_file_command): Constify.
4269         * gdbcore.h (deprecated_file_changed_hook): Constify.
4270         * exec.c (deprecated_file_changed_hook, exec_file_command)
4271         (file_command): Constify.
4272         * defs.h (symbol_file_command): Constify.
4273
4274 2017-09-27  Tom Tromey  <tom@tromey.com>
4275
4276         * remote-fileio.c (set_system_call_allowed)
4277         (show_system_call_allowed): Constify.
4278
4279 2017-09-27  Tom Tromey  <tom@tromey.com>
4280
4281         * tracepoint.c (delete_trace_variable_command)
4282         (tfind_end_command, tfind_start_command, tfind_pc_command)
4283         (tfind_tracepoint_command, tfind_line_command)
4284         (tfind_range_command, tfind_outside_command): Constify.
4285
4286 2017-09-27  Tom Tromey  <tom@tromey.com>
4287
4288         * ax-gdb.c (maint_agent_printf_command, agent_command)
4289         (agent_eval_command): Constify.
4290
4291 2017-09-27  Tom Tromey  <tom@tromey.com>
4292
4293         * tracepoint.c (info_scope_command): Constify.
4294         * python/python.c (gdbpy_decode_line): Constify.
4295         * python/py-breakpoint.c (bppy_init): Constify.
4296         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4297         * location.h: (new_linespec_location)
4298         (string_to_event_location_basic, string_to_event_location):
4299         Constify.
4300         * location.c (new_linespec_location)
4301         (string_to_event_location_basic, string_to_event_location):
4302         Constify.
4303         * linespec.h (decode_line_with_current_source)
4304         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4305         * linespec.c (linespec_lex_to_end)
4306         (decode_line_with_current_source)
4307         (decode_line_with_last_displayed): Constify.
4308         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4309         Constify.
4310         * cli/cli-cmds.c (edit_command, list_command): Constify.
4311         * breakpoint.h (until_break_command, watch_command_wrapper)
4312         (awatch_command_wrapper, rwatch_command_wrapper)
4313         (init_ada_exception_breakpoint): Constify.
4314         * breakpoint.c (break_command_1, dprintf_command)
4315         (break_range_command, watch_command_wrapper)
4316         (rwatch_command_wrapper, awatch_command_wrapper)
4317         (until_break_command, init_ada_exception_breakpoint)
4318         (strace_marker_create_sals_from_location, trace_command)
4319         (ftrace_command, strace_command, struct tracepoint): Constify.
4320         * ax-gdb.c (agent_command_1): Constify.
4321         * ada-lang.c (ada_exception_sal): Constify.
4322
4323 2017-09-27  Tom Tromey  <tom@tromey.com>
4324
4325         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4326         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4327         (get_context_size, no_chunk, get_insn_history_modifiers)
4328         (cmd_record_insn_history, get_call_history_modifiers)
4329         (cmd_record_call_history): Constify.
4330
4331 2017-09-27  Tom Tromey  <tom@tromey.com>
4332
4333         * source.c (show_substitute_path_command)
4334         (unset_substitute_path_command, set_substitute_path_command):
4335         Constify.
4336
4337 2017-09-27  Tom Tromey  <tom@tromey.com>
4338
4339         * typeprint.c (maintenance_print_type): Constify.
4340         * maint.c (maintenance_dump_me, maintenance_demangle)
4341         (maintenance_time_display, maintenance_info_sections)
4342         (maintenance_print_statistics, maintenance_deprecate)
4343         (maintenance_undeprecate): Constify.
4344         (maintenance_do_deprecate): Constify.  Use std::string.
4345         (maintenance_selftest): Constify.
4346         * gdbtypes.h (maintenance_print_type): Constify.
4347
4348 2017-09-27  Tom Tromey  <tom@tromey.com>
4349
4350         * hppa-tdep.c (unwind_command): Constify.
4351
4352 2017-09-27  Tom Tromey  <tom@tromey.com>
4353
4354         * target-descriptions.c (unset_tdesc_filename_cmd)
4355         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4356         Constify.
4357
4358 2017-09-27  Tom Tromey  <tom@tromey.com>
4359
4360         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4361
4362 2017-09-27  Tom Tromey  <tom@tromey.com>
4363
4364         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4365
4366 2017-09-27  Tom Tromey  <tom@tromey.com>
4367
4368         * tui/tui-regs.c (tui_reg_command): Constify.
4369
4370 2017-09-27  Tom Tromey  <tom@tromey.com>
4371
4372         * skip.c (skip_file_command, skip_function_command)
4373         (skip_enable_command, skip_disable_command, skip_delete_command):
4374         Constify.
4375
4376 2017-09-27  Tom Tromey  <tom@tromey.com>
4377
4378         * record-btrace.c (cmd_record_btrace_bts_start)
4379         (cmd_record_btrace_pt_start): Constify.
4380
4381 2017-09-27  Tom Tromey  <tom@tromey.com>
4382
4383         * symmisc.c (maintenance_print_symbols)
4384         (maintenance_print_msymbols, maintenance_print_objfiles)
4385         (maintenance_info_symtabs, maintenance_check_symtabs)
4386         (maintenance_expand_symtabs, maintenance_info_line_tables):
4387         Constify.
4388
4389 2017-09-27  Tom Tromey  <tom@tromey.com>
4390
4391         * top.c (new_ui_command): Constify.
4392
4393 2017-09-27  Tom Tromey  <tom@tromey.com>
4394
4395         * symfile.c (add_symbol_file_command)
4396         (remove_symbol_file_command, list_overlays_command)
4397         (map_overlay_command, unmap_overlay_command)
4398         (overlay_auto_command, overlay_manual_command)
4399         (overlay_off_command, overlay_load_command): Constify.
4400
4401 2017-09-27  Tom Tromey  <tom@tromey.com>
4402
4403         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4404         (info_spu_mailbox_command, info_spu_dma_command)
4405         (info_spu_proxydma_command): Constify.
4406
4407 2017-09-27  Tom Tromey  <tom@tromey.com>
4408
4409         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4410
4411 2017-09-27  Tom Tromey  <tom@tromey.com>
4412
4413         * cli/cli-script.c (user_defined_command): Constify.
4414
4415 2017-09-27  Tom Tromey  <tom@tromey.com>
4416
4417         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4418         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4419         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4420         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4421         (dump_binary_value, append_binary_memory, append_binary_value):
4422         Constify.
4423         (struct dump_context) <func>: Constify.
4424         (add_dump_command): Update.
4425
4426 2017-09-27  Tom Tromey  <tom@tromey.com>
4427
4428         * cli/cli-cmds.c (show_version, show_configuration)
4429         (source_command, show_user): Constify.
4430
4431 2017-09-27  Tom Tromey  <tom@tromey.com>
4432
4433         * target.c (maintenance_print_target_stack): Constify.
4434
4435 2017-09-27  Tom Tromey  <tom@tromey.com>
4436
4437         * interps.c (interpreter_exec_cmd): Constify.
4438
4439 2017-09-27  Tom Tromey  <tom@tromey.com>
4440
4441         * record-full.c (cmd_record_full_restore): Constify.
4442
4443 2017-09-27  Tom Tromey  <tom@tromey.com>
4444
4445         * memattr.c (enable_mem_command, disable_mem_command)
4446         (delete_mem_command): Constify.
4447
4448 2017-09-27  Tom Tromey  <tom@tromey.com>
4449
4450         * value.c (show_convenience): Constify.
4451
4452 2017-09-27  Tom Tromey  <tom@tromey.com>
4453
4454         * gdbcore.h (core_file_command): Update.
4455         * corefile.c (core_file_command): Constify.
4456
4457 2017-09-27  Tom Tromey  <tom@tromey.com>
4458
4459         * user-regs.c (maintenance_print_user_registers): Constify.
4460
4461 2017-09-27  Tom Tromey  <tom@tromey.com>
4462
4463         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4464
4465 2017-09-27  Tom Tromey  <tom@tromey.com>
4466
4467         * cp-support.c (first_component_command): Constify.
4468
4469 2017-09-27  Tom Tromey  <tom@tromey.com>
4470
4471         * psymtab.c (maintenance_print_psymbols)
4472         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4473         Constify.
4474
4475 2017-09-27  Tom Tromey  <tom@tromey.com>
4476
4477         * windows-tdep.c (display_tib): Constify.
4478
4479 2017-09-27  Tom Tromey  <tom@tromey.com>
4480
4481         * linux-fork.c (delete_checkpoint_command)
4482         (detach_checkpoint_command): Constify.
4483
4484 2017-09-27  Tom Tromey  <tom@tromey.com>
4485
4486         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4487
4488 2017-09-27  Tom Tromey  <tom@tromey.com>
4489
4490         * arc-tdep.c (dump_arc_instruction_command): Constify.
4491
4492 2017-09-27  Tom Tromey  <tom@tromey.com>
4493
4494         * valprint.c (set_radix, show_radix): Constify.
4495
4496 2017-09-27  Tom Tromey  <tom@tromey.com>
4497
4498         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4499
4500 2017-09-27  Tom Tromey  <tom@tromey.com>
4501
4502         * command.h (not_just_help_class_command): Update.
4503         * cli/cli-decode.h (not_just_help_class_command): Update.
4504         * cli/cli-decode.c (not_just_help_class_command): Constify.
4505
4506 2017-09-27  Tom Tromey  <tom@tromey.com>
4507
4508         * gdb_bfd.c (maintenance_info_bfds): Constify.
4509
4510 2017-09-27  Tom Tromey  <tom@tromey.com>
4511
4512         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4513         overloads.
4514         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4515         (do_const_cfunc): New function.
4516         (cmd_cfunc_eq): New overload.
4517         (cli_user_command_p): Check do_const_cfunc.
4518         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4519         const_cfunc.
4520         * command.h (add_cmd): Add const overload and no-function
4521         overload.
4522         (set_cmd_cfunc): Add const overload.
4523         (cmd_const_cfunc_ftype): Declare.
4524         (cmd_cfunc_eq): Add const overload.
4525         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4526         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4527         overload.
4528
4529 2017-09-27  Tom Tromey  <tom@tromey.com>
4530
4531         * macroexp.c (get_next_token_for_substitution): New function.
4532         (substitute_args): Call it.  Check for __VA_OPT__.
4533
4534 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4535             Pedro Alves <palves@redhat.com>
4536
4537         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4538         producer_is_icc_lt_14.
4539         (producer_is_icc_lt_14): New function.
4540         (check_producer): Add code for checking version of ICC.
4541         (producer_is_icc): Move to producer.c.
4542         (read_structure_type): Restrict ICC workaround to ICC<14.
4543         * producer.c: Include selftest.h.
4544         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4545         New functions.
4546         * producer.h (producer_is_icc): New declaration.
4547
4548 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4549
4550         * Makefile.in (SFILES): Add producer.c.
4551         (COMMON_OBS): Add producer.o
4552         * amd64-tdep.c (producer.h): Add new include.
4553         * dwarf2read.c (producer.h): Add new include.
4554         * producer.c: New file.
4555         * producer.h: New file.
4556         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4557         producer.c.
4558         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4559         producer.h.
4560
4561 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4562
4563         * configure.ac: Search ncursesw before ncurses.
4564         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4565         * gdb_curses.h: Include <ncursesw/ncurses.h>
4566         * config.in, configure: Regenerate.
4567
4568 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4569
4570         PR gdb/22185
4571         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4572         obsolete.
4573         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4574         Remove i386sol2 support.
4575         * configure.nat <i386sol2>: Remove.
4576         <sol2-64>: Fold into ...
4577         <sol2>: ... this.
4578         Move common settings to default section.
4579         Add sol-thread.o.
4580         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4581         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4582         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4583         <i[34567]86-*-solaris*>: Remove.
4584         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4585
4586         * configure.ac: Remove wctype in libw check.
4587         (_MSE_INT_H): Don't define on Solaris 7-9.
4588         <solaris*>: Remove libthread_db.so.1 check.
4589         * configure: Regenerate.
4590         * config.in: Regenerate.
4591
4592         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4593         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4594         (gdb_ps_size_t): Remove.
4595         Use base types in users.
4596         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4597
4598         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4599
4600 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4601
4602         PR build/22206
4603         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4604         (adi_is_addr_mapped): Likewise.
4605         (PSR_ICC): Don't redefine.
4606         (PSR_IMPL): Likewise.
4607
4608 2017-09-25  Tom Tromey  <tom@tromey.com>
4609
4610         * regcache.c (regcache::dump): Use string_printf.
4611
4612 2017-09-25  Tom Tromey  <tom@tromey.com>
4613
4614         * regcache.c (class regcache_invalidator): New.
4615         (struct register_to_invalidate): Remove.
4616         (make_cleanup_regcache_invalidate): Remove.
4617         (regcache::raw_write): Use regcache_invalidator.
4618
4619 2017-09-25  Tom Tromey  <tom@tromey.com>
4620
4621         * spu-tdep.c (spu2ppu_sniffer): Update.
4622         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4623         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4624         Remove.
4625         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4626         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4627         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4628         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4629         (frame_pop): Update.
4630
4631 2017-09-25  Tom Tromey  <tom@tromey.com>
4632
4633         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4634         * regcache.h (regcache_xfree): Don't declare.
4635         * regcache.c (regcache_xfree): Remove.
4636         (do_regcache_xfree): Use delete.
4637         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4638         * linux-fork.c (free_fork): Use delete.
4639         (fork_save_infrun_state): Likewise.
4640         * jit.c (jit_dealloc_cache): Use delete.
4641         * infrun.c (discard_infcall_suspend_state): Use delete.
4642
4643 2017-09-25  Tom Tromey  <tom@tromey.com>
4644
4645         * regcache.h (regcache_xmalloc): Don't declare.
4646         (regcache_raw_set_cached_value): Update comment.
4647         * regcache.c (regcache_xmalloc): Remove.
4648         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4649         * jit.c (jit_frame_sniffer): Use new.
4650         * frame.c (frame_save_as_regcache): Use new.
4651
4652 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4653
4654         * NEWS: Advertise support for guarded-storage registers on IBM z.
4655
4656 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4657
4658         * s390-linux-nat.c (have_regset_gs): New static variable.
4659         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4660         control block and guarded-storage broadcast control regsets.
4661         (s390_read_description): Detect whether the target has
4662         guarded-storage support, return appropriate tdesc.
4663         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4664         (features/s390x-gs-linux64.c): Likewise.
4665         (struct gdbarch_tdep) <have_gs>: New field.
4666         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4667         (s390_gsbc_regset): New variables.
4668         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4669         and s390_gsbc_regset, if applicable.
4670         (s390_core_read_description): Check whether core file was from a
4671         target with guarded-storage support; include appropriate regsets.
4672         (s390_gdbarch_init): Add registers for guarded-storage support.
4673         (_initialize_s390_tdep): Initialize new target descriptions that
4674         include registers for guarded-storage support.
4675         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4676         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4677         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4678         (S390_NUM_REGS): Adjust macro definition.
4679         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4680         (tdesc_s390x_gs_linux64): New declarations.
4681
4682 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4683
4684         * features/s390-gs-linux64.xml: New file.
4685         * features/s390-gs.xml: New file.
4686         * features/s390-gsbc.xml: New file.
4687         * features/s390x-gs-linux64.xml: New file.
4688         * features/Makefile (WHICH): Add s390-gs-linux64 and
4689         s390x-gs-linux64.
4690         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4691         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4692         * features/s390-gs-linux64.c: New generated file.
4693         * features/s390x-gs-linux64.c: New file.
4694         * regformats/s390-gs-linux64.dat: New file.
4695         * regformats/s390x-gs-linux64.dat: New file.
4696
4697 2017-09-23  Tom Tromey  <tom@tromey.com>
4698
4699         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4700
4701 2017-09-22  Tom Tromey  <tom@tromey.com>
4702
4703         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4704         type to scoped_restore_tmpl.
4705         <scoped_input_handler>: Initialize m_quit_handler directly.
4706
4707 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4708
4709         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4710         (cd_command): Likewise.  Free "current_directory" before
4711         assigning to it.
4712         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4713         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4714         * top.c (gdb_dirbuf): Remove global declaration.
4715         * top.h (gdb_dirbuf): Likewise.
4716
4717 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4718
4719         * gnulib/aclocal.m4: Regenerate.
4720         * gnulib/config.in: Regenerate.
4721         * gnulib/configure: Regenerate.
4722         * gnulib/import/Makefile.am: Regenerate.
4723         * gnulib/import/Makefile.in: Regenerate.
4724         * gnulib/import/assure.h: New file.
4725         * gnulib/import/at-func.c: Likewise
4726         * gnulib/import/chdir-long.c: New file.
4727         * gnulib/import/chdir-long.h: New file.
4728         * gnulib/import/cloexec.c: New file.
4729         * gnulib/import/cloexec.h: New file.
4730         * gnulib/import/close.c: New file.
4731         * gnulib/import/closedir.c: New file.
4732         * gnulib/import/dirent-private.h: New file.
4733         * gnulib/import/dup-safer.c: New file.
4734         * gnulib/import/dup.c: New file.
4735         * gnulib/import/dup2.c: New file.
4736         * gnulib/import/error.c: New file.
4737         * gnulib/import/error.h: New file.
4738         * gnulib/import/exitfail.c: New file.
4739         * gnulib/import/exitfail.h: New file.
4740         * gnulib/import/fchdir.c: New file.
4741         * gnulib/import/fcntl.c: New file.
4742         * gnulib/import/fcntl.in.h: New file.
4743         * gnulib/import/fd-hook.c: New file.
4744         * gnulib/import/fd-hook.h: New file.
4745         * gnulib/import/fd-safer.c: New file.
4746         * gnulib/import/fdopendir.c: New file.
4747         * gnulib/import/filename.h: New file.
4748         * gnulib/import/filenamecat-lgpl.c: New file.
4749         * gnulib/import/filenamecat.h: New file.
4750         * gnulib/import/fstat.c: New file.
4751         * gnulib/import/fstatat.c: New file.
4752         * gnulib/import/getcwd-lgpl.c: New file.
4753         * gnulib/import/getcwd.c: New file.
4754         * gnulib/import/getdtablesize.c: New file.
4755         * gnulib/import/getlogin_r.c: New file.
4756         * gnulib/import/getprogname.c: New file.
4757         * gnulib/import/getprogname.h: New file.
4758         * gnulib/import/gettext.h: New file.
4759         * gnulib/import/glob-libc.h: New file.
4760         * gnulib/import/glob.c: New file.
4761         * gnulib/import/glob.in.h: New file.
4762         * gnulib/import/intprops.h: New file.
4763         * gnulib/import/m4/chdir-long.m4: New file.
4764         * gnulib/import/m4/close.m4: New file.
4765         * gnulib/import/m4/closedir.m4: New file.
4766         * gnulib/import/m4/d-ino.m4: New file.
4767         * gnulib/import/m4/d-type.m4: New file.
4768         * gnulib/import/m4/dup.m4: New file.
4769         * gnulib/import/m4/dup2.m4: New file.
4770         * gnulib/import/m4/error.m4: New file.
4771         * gnulib/import/m4/fchdir.m4: New file.
4772         * gnulib/import/m4/fcntl.m4: New file.
4773         * gnulib/import/m4/fcntl_h.m4: New file.
4774         * gnulib/import/m4/fdopendir.m4: New file.
4775         * gnulib/import/m4/filenamecat.m4: New file.
4776         * gnulib/import/m4/fstat.m4: New file.
4777         * gnulib/import/m4/fstatat.m4: New file.
4778         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4779         * gnulib/import/m4/getcwd-path-max.m4: New file.
4780         * gnulib/import/m4/getcwd.m4: New file.
4781         * gnulib/import/m4/getdtablesize.m4: New file.
4782         * gnulib/import/m4/getlogin_r.m4: New file.
4783         * gnulib/import/m4/getprogname.m4: New file.
4784         * gnulib/import/m4/glob.m4: New file.
4785         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4786         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4787         * gnulib/import/m4/mempcpy.m4: New file.
4788         * gnulib/import/m4/memrchr.m4: New file.
4789         * gnulib/import/m4/mode_t.m4: New file.
4790         * gnulib/import/m4/msvc-inval.m4: New file.
4791         * gnulib/import/m4/msvc-nothrow.m4: New file.
4792         * gnulib/import/m4/open.m4: New file.
4793         * gnulib/import/m4/openat.m4: New file.
4794         * gnulib/import/m4/opendir.m4: New file.
4795         * gnulib/import/m4/readdir.m4: New file.
4796         * gnulib/import/m4/realloc.m4: New file.
4797         * gnulib/import/m4/rewinddir.m4: New file.
4798         * gnulib/import/m4/save-cwd.m4: New file.
4799         * gnulib/import/m4/strdup.m4: New file.
4800         * gnulib/import/m4/strerror.m4: New file.
4801         * gnulib/import/m4/unistd-safer.m4: New file.
4802         * gnulib/import/mempcpy.c: New file.
4803         * gnulib/import/memrchr.c: New file.
4804         * gnulib/import/msvc-inval.c: New file.
4805         * gnulib/import/msvc-inval.h: New file.
4806         * gnulib/import/msvc-nothrow.c: New file.
4807         * gnulib/import/msvc-nothrow.h: New file.
4808         * gnulib/import/open.c: New file.
4809         * gnulib/import/openat-die.c: New file.
4810         * gnulib/import/openat-priv.h: New file.
4811         * gnulib/import/openat-proc.c: New file.
4812         * gnulib/import/openat.c: New file.
4813         * gnulib/import/openat.h: New file.
4814         * gnulib/import/opendir.c: New file.
4815         * gnulib/import/pipe-safer.c: New file.
4816         * gnulib/import/readdir.c: New file.
4817         * gnulib/import/realloc.c: New file.
4818         * gnulib/import/rewinddir.c: New file.
4819         * gnulib/import/save-cwd.c: New file.
4820         * gnulib/import/save-cwd.h: New file.
4821         * gnulib/import/strdup.c: New file.
4822         * gnulib/import/strerror-override.c: New file.
4823         * gnulib/import/strerror-override.h: New file.
4824         * gnulib/import/strerror.c: New file.
4825         * gnulib/import/unistd--.h: New file.
4826         * gnulib/import/unistd-safer.h: New file.
4827         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4828         "getcwd" and "glob".
4829         * ser-tcp.c: Undefine "close" before redefining it.
4830
4831 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4832
4833         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4834         get rid of res_val.
4835
4836 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4837
4838         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4839         <sol2,sparc>: Likewise.
4840         <sol2-64,i386>: Likewise.
4841
4842         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4843         -Wdeprecated-declarations on *-*-solaris*.
4844         * configure: Regenerate.
4845
4846         * procfs.c: Include "nat/inferior.h".
4847         (procfs_info_proc): Fix typo.
4848
4849 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4850
4851         * remote.c (vector): Include.
4852         (struct private_thread_info): Add field, thread_handle.
4853         (free_private_thread_info): Deallocate storage associated with
4854         thread handle.
4855         (get_private_info_thread): Initialize `thread_handle' field.
4856         (struct thread_item): Add field, thread_handle.
4857         (clear_threads_listing_context): Deallocate storage associated
4858         with thread handle.
4859         (start_thread): Add support for "handle" attribute.
4860         (thread_attributes): Add "handle".
4861         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4862         field.
4863         (remote_update_thread_list): Update thread_handle.
4864         (remote_thread_handle_to_thread_info): New function.
4865         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4866
4867 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4868
4869         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4870         function.
4871         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4872         * python/python-internal.h (thread_object_type): Declare.
4873
4874 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4875
4876         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4877         (target_thread_handle_to_thread_info): Declare.
4878         * target.c (target_thread_handle_to_thread_info): New function.
4879         * target-delegates.c: Regenerate.
4880         * gdbthread.h (find_thread_by_handle): Declare.
4881         * thread.c (find_thread_by_handle): New function.
4882         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4883         function.
4884         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4885
4886 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4887
4888         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4889
4890 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4891
4892         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4893
4894 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4895
4896         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4897         to gdb_target_obs.
4898
4899 2017-09-20  Tom Tromey  <tom@tromey.com>
4900
4901         * breakpoint.c (struct counted_command_line): Remove.
4902         (breakpoint_commands): Update.
4903         (alloc_counted_command_line, incref_counted_command_line)
4904         (decref_counted_command_line, do_cleanup_counted_command_line)
4905         (make_cleanup_decref_counted_command_line): Remove.
4906         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4907         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4908         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4909         (save_breakpoints): Update.
4910         * breakpoint.h (counted_command_line): Now a typedef to
4911         shared_ptr.
4912         (struct breakpoint) <commands>: Now a counted_command_line.
4913         (struct bpstats) <command>: Likewise.
4914
4915 2017-09-20  Tom Tromey  <tom@tromey.com>
4916
4917         * breakpoint.c (struct commands_info, do_map_commands_command):
4918         Remove.
4919         (commands_command_1): Update.
4920         (iterate_over_related_breakpoints): Take a function_view.
4921         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4922         (delete_command): Update.
4923         (map_breakpoint_numbers): Take a function_view.
4924         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4925         (disable_command): Update.
4926         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4927         (enable_command): Update.
4928         (struct disp_data, do_enable_breakpoint_disp)
4929         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4930         (do_map_enable_delete_breakpoint): Remove.
4931         (enable_once_command, enable_count_command, enable_delete_command)
4932         (delete_trace_variable_command): Update.
4933
4934 2017-09-20  Tom Tromey  <tom@tromey.com>
4935
4936         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4937         (bpstat_clear): Use delete.
4938         (bpstats): New constructors.
4939         (bpstat_copy, bpstat_stop_status): Use new.
4940         (dprintf_after_condition_true): Update.
4941         * breakpoint.h (bpstats::bpstats): Add constructors.
4942         (bpstats::~bpstats): Add destructor.
4943
4944 2017-09-20  Pedro Alves  <palves@redhat.com>
4945
4946         * eval.c (make_params): Delete, refactored as ...
4947         (class fake_method): ... this new type's ctor.
4948         (fake_method::~fake_method): New.
4949         (evaluate_subexp_standard): Use 'fake_method'.
4950
4951 2017-09-20  Tom Tromey  <tom@tromey.com>
4952
4953         * windows-nat.c (get_windows_debug_event, windows_wait)
4954         (do_initial_windows_stuff, windows_attach): Update.
4955         * utils.c (vwarning, internal_vproblem): Update.
4956         (ui_unregister_input_event_handler_cleanup)
4957         (prepare_to_handle_input): Remove.
4958         (class scoped_input_handler): New.
4959         (defaulted_query, prompt_for_continue): Update.
4960         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4961         Update.
4962         * top.c (undo_terminal_modifications_before_exit): Update.
4963         * target/target.h (target_terminal_init, target_terminal_inferior)
4964         (target_terminal_ours): Don't declare.
4965         (class target_terminal): New.
4966         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4967         (target_terminal_ours_for_output)
4968         (make_cleanup_restore_target_terminal): Don't declare.
4969         (target_terminal_info): Remove.
4970         * target.c (enum terminal_state, terminal_state): Remove.
4971         (target_terminal::terminal_state): Define.
4972         (target_terminal::init): Rename from target_terminal_init.
4973         (target_terminal::inferior): Rename from
4974         target_terminal_inferior.
4975         (target_terminal::ours): Rename from target_terminal_ours.
4976         (target_terminal::ours_for_output): Rename from
4977         target_terminal_ours_for_output.
4978         (target_terminal::info): New method.
4979         (cleanup_restore_target_terminal)
4980         (make_cleanup_restore_target_terminal): Remove.
4981         * solib.c (handle_solib_event): Update.
4982         * remote.c (remote_serial_quit_handler): Update.
4983         (remote_terminal_inferior, remote_wait_as): Update.
4984         * record-full.c (record_full_wait_1): Update.
4985         * nto-procfs.c (procfs_create_inferior): Update.
4986         * nat/fork-inferior.c (startup_inferior): Update.
4987         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4988         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4989         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4990         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4991         (mi_breakpoint_created, mi_breakpoint_deleted)
4992         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4993         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4994         (mi_user_selected_context_changed, report_initial_inferior):
4995         Update.
4996         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4997         (linux_nat_terminal_inferior): Update.
4998         * infrun.c (follow_fork_inferior)
4999         (handle_vfork_child_exec_or_exit, do_target_resume)
5000         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5001         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5002         Update.
5003         * inflow.c (child_terminal_init, info_terminal_command): Update.
5004         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5005         (attach_command): Update.
5006         * infcall.c (call_thread_fsm_should_stop): Update.
5007         * gnu-nat.c (gnu_attach): Update.
5008         * extension.c (struct active_ext_lang_state)
5009         (restore_active_ext_lang): Update.
5010         * exceptions.c (print_flush): Update.
5011         * event-top.c (async_enable_stdin, default_quit_handler): Update.
5012         (struct quit_handler_cleanup_data, restore_quit_handler)
5013         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5014         Remove.
5015         * cp-support.c (gdb_demangle): Update.
5016         * breakpoint.c (update_inserted_breakpoint_locations)
5017         (insert_breakpoint_locations, handle_jit_event)
5018         (disable_breakpoints_in_unloaded_shlib): Update.
5019         * annotate.c (annotate_breakpoints_invalid)
5020         (annotate_frames_invalid): Update.
5021
5022 2017-09-20  Tom Tromey  <tom@tromey.com>
5023
5024         * main.c (catch_command_errors): Rename from
5025         catch_command_errors_const.
5026         (captured_main_1): Update.
5027
5028 2017-09-20  Pedro Alves  <palves@redhat.com>
5029
5030         * cli/cli-cmds.c (list_command): Use print_sal_location.
5031         (print_sal_location): New function.
5032         (ambiguous_line_spec): Use print_sal_location.
5033         * linespec.c (symbol_to_sal): Record the symbol in the sal.
5034         * symtab.c (find_function_start_sal): Likewise.
5035         * symtab.h (symtab_and_line::symbol): New field.
5036
5037 2017-09-20  Pedro Alves  <palves@redhat.com>
5038
5039         * linespec.c (minsym_found): Handle non-text minsyms.
5040         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5041
5042 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5043
5044         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5045         backslash.
5046
5047 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5048
5049         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5050         vmovups instead vmovaps.
5051         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5052
5053 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5054
5055         * NEWS (Changes since GDB 8.0): Add starti.
5056         * infcmd.c (enum run_break): New.
5057         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5058         case.
5059         (run_command): Use enum run_how.
5060         (start_command): Likewise.
5061         (starti_command): New function.
5062         (RUN_ARGS_HELP): New macro.
5063         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5064         commands.  Add starti command.
5065
5066 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5067
5068         * Makefile.in (monitor.o): Remove the rule.
5069
5070 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5071
5072         * annotate.h (struct annotate_arg_emitter): Use
5073         DISABLE_COPY_AND_ASSIGN.
5074         * common/refcounted-object.h (refcounted_object): Likewise.
5075         * completer.h (struct completion_result): Likewise.
5076         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5077         * filename-seen-cache.h (filename_seen_cache): Likewise.
5078         * gdbcore.h (thread_section_name): Likewise.
5079         * gdb_regex.h (compiled_regex): Likewise.
5080         * gdbthread.h (scoped_restore_current_thread): Likewise.
5081         * inferior.h (scoped_restore_current_inferior): Likewise.
5082         * jit.c (jit_reader): Likewise.
5083         * linespec.h (struct linespec_result): Likewise.
5084         * mi/mi-parse.h (struct mi_parse): Likewise.
5085         * nat/fork-inferior.c (execv_argv): Likewise.
5086         * progspace.h (scoped_restore_current_program_space): Likewise.
5087         * python/python-internal.h (class gdbpy_enter): Likewise.
5088         * regcache.h (regcache): Likewise.
5089         * target-descriptions.c (struct tdesc_reg): Likewise.
5090         (struct tdesc_type): Likewise.
5091         (struct tdesc_feature): Likewise.
5092         * ui-out.h (ui_out_emit_type): Likewise.
5093
5094 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5095
5096         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5097         label abort_expression.
5098
5099 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5100
5101         * common/buffer.c (buffer_xml_printf): Adjust.
5102         * common/xml-utils.c (xml_escape_text): Change return type to
5103         std::string, update code accordingly.
5104         * common/xml-utils.h (xml_escape_text): Change return type to
5105         std::string.
5106         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5107         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5108         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5109         Adjust.
5110
5111 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5112
5113         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5114         (SUBDIR_UNITTESTS_OBS): Add new object file.
5115         * unittests/xml-utils-selftests.c: New file.
5116
5117 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5118
5119         * common/selftest.h (selftest): New struct/interface.
5120         (register_test): Add name parameter, add new overload.
5121         (run_tests): Add filter parameter.
5122         (for_each_selftest_ftype): New typedef.
5123         (for_each_selftest): New declaration.
5124         * common/selftest.c (tests): Change type to
5125         map<string, unique_ptr<selftest>>.
5126         (simple_selftest): New struct.
5127         (register_test): New function.
5128         (register_test): Add name parameter and use it.
5129         (run_tests): Add filter parameter and use it.  Add prints.
5130         Adjust to vector -> map change.
5131         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5132         registering selftests.
5133         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5134         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5135         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5136         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5137         * findvar.c (_initialize_findvar): Likewise.
5138         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5139         * maint.c (maintenance_selftest): Update call to run_tests.
5140         (maintenance_info_selftests): New function.
5141         (_initialize_maint_cmds): Register "maintenance info selftests"
5142         command.  Update "maintenance selftest" doc.
5143         * regcache.c (_initialize_regcache): Add names when registering
5144         selftests.
5145         * rust-exp.y (_initialize_rust_exp): Likewise.
5146         * selftest-arch.c (gdbarch_selftest): New struct.
5147         (gdbarch_tests): Remove.
5148         (register_test_foreach_arch): Add name parameter.  Call
5149         register_test.
5150         (tests_with_arch): Remove, move most content to
5151         gdbarch_selftest::operator().
5152         (_initialize_selftests_foreach_arch): Remove.
5153         * selftest-arch.h (register_test_foreach_arch): Add name
5154         parameter.
5155         (run_tests_with_arch): New declaration.
5156         * utils-selftests.c (_initialize_utils_selftests): Add names
5157         when registering selftests.
5158         * utils.c (_initialize_utils): Likewise.
5159         * unittests/array-view-selftests.c
5160         (_initialize_array_view_selftests): Likewise.
5161         * unittests/environ-selftests.c (_initialize_environ_selftests):
5162         Likewise.
5163         * unittests/function-view-selftests.c
5164         (_initialize_function_view_selftests): Likewise.
5165         * unittests/offset-type-selftests.c
5166         (_initialize_offset_type_selftests): Likewise.
5167         * unittests/optional-selftests.c
5168         (_initialize_optional_selftests): Likewise.
5169         * unittests/scoped_restore-selftests.c
5170         (_initialize_scoped_restore_selftests): Likewise.
5171         * NEWS: Document "maintenance selftest" and "maint info
5172         selftests".
5173
5174 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5175
5176         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5177         scoped_restore.
5178
5179 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5180
5181         * mi/mi-main.c (mi_load_progress): Make uiout variable
5182         a unique_ptr.
5183
5184 2017-09-15  Pedro Alves  <palves@redhat.com>
5185
5186         * compile/compile-c-types.c (convert_enum, convert_int)
5187         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5188
5189 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5190
5191         * dwarf2read.c (copy_string): Remove.
5192         (parse_macro_definition): Replace copy_string with savestring.
5193
5194 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5195
5196         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5197         gdb_target_obs.
5198         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5199         Likewise.
5200         (i[34567]86-*-linux*): Likewise.
5201
5202 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5203
5204         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5205         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5206         <stack>: Change type to std::vector.
5207         <stack_len, stack_allocated>: Remove.
5208         <grow_stack>: Remove.
5209         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5210         (dwarf_expr_context::~dwarf_expr_context): Remove.
5211         (dwarf_expr_context::grow_stack): Remove.
5212         (dwarf_expr_context::push): Adjust.
5213         (dwarf_expr_context::pop): Adjust.
5214         (dwarf_expr_context::fetch): Adjust.
5215         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5216         (dwarf_expr_context::stack_empty_p): Adjust.
5217         (dwarf_expr_context::execute_stack_op): Adjust.
5218
5219 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5220
5221         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5222         return type to bool.
5223         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5224
5225 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5226
5227         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5228         Change type to bool.
5229         (dwarf_stack_value) <in_stack_memory>: Likewise.
5230         (dwarf_expr_context) <push_address>: Change parameter type to
5231         bool.
5232         <fetch_in_stack_memory>: Change return type to bool.
5233         <push>: Change parameter type to bool.
5234         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5235         to bool.
5236         (dwarf_expr_context::push_address): Likewise.
5237         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5238         to bool.
5239         (dwarf_expr_context::execute_stack_op): Adjust.
5240         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5241
5242 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5243
5244         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5245         (struct dwarf_expr_context) <n_pieces>: Remove.
5246         <pieces>: Change type to std::vector.
5247         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5248         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5249         pieces.
5250         (dwarf_expr_context::add_piece): Adjust.
5251         * dwarf2loc.c (struct piece_closure): Initialize fields.
5252         <n_pieces>: Remove.
5253         <pieces>: Change type to std::vector.
5254         (allocate_piece_closure): Adjust, change parameter to
5255         std::vector rvalue and std::move it to piece_closure.
5256         (rw_pieced_value): Adjust.
5257         (check_pieced_synthetic_pointer): Adjust.
5258         (indirect_synthetic_pointer): Adjust.
5259         (coerce_pieced_ref): Adjust.
5260         (free_pieced_value_closure):  Adjust.  Use delete to free
5261         piece_closure.
5262         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5263         to allocate_piece_closure.
5264         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5265
5266 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5267
5268         * probe.h (probe_ops_cp): Remove typedef.
5269         (DEF_VEC_P (probe_ops_cp)): Remove.
5270         (all_probe_ops): Change type to std::vector.
5271         * probe.c (info_probes_for_ops): Adjust to vector change.
5272         (probe_linespec_to_ops): Likewise.
5273         (all_probe_ops): Change type to std::vector.
5274         (_initialize_probe): Adjust to vector change.
5275         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5276         * elfread.c (elf_get_probes): Likewise.
5277         * stap-probe.c (_initialize_stap_probe): Likewise.
5278
5279 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5280
5281         * probe.h (struct bound_probe): Define constructors.
5282         * probe.c (bound_probe_s): Remove typedef.
5283         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5284         (collect_probes): Change return type to std::vector, remove
5285         cleanup.
5286         (compare_probes): Return bool, change parameter type.  Change
5287         semantic to "less than".
5288         (gen_ui_out_table_header_info): Change parameter to std::vector
5289         and update.
5290         (exists_probe_with_pops): Likewise.
5291         (info_probes_for_ops): Update to std::vector change.
5292         (enable_probes_command): Likewise.
5293         (disable_probes_command): Likewise.
5294
5295 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5296
5297         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5298         vec to std::vector.
5299         * probe.c (parse_probes_in_pspace): Update.
5300         (find_probes_in_objfile): Update.
5301         (find_probe_by_pc): Update.
5302         (collect_probes): Update.
5303         (probe_any_get_probes): Update.
5304         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5305         return type to reference to std::vector.
5306         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5307         std::vector and update.
5308         (dtrace_process_dof): Likewise.
5309         (dtrace_get_probes): Likewise.
5310         * elfread.c (elf_get_probes): Change return type to std::vector,
5311         store an std::vector in bfd_data.
5312         (probe_key_free): Update to std::vector.
5313         * stap-probe.c (handle_stap_probe): Change parameter to
5314         std::vector and update.
5315         (stap_get_probes): Likewise.
5316         * symfile-debug.c (debug_sym_get_probes): Change return type to
5317         std::vector and update.
5318
5319 2017-09-11  Tom Tromey  <tom@tromey.com>
5320
5321         * breakpoint.c (program_breakpoint_here_p): Update.
5322         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5323         from make_show_memory_breakpoints_cleanup.  Return a
5324         scoped_restore_tmpl<int>.
5325         (restore_show_memory_breakpoints): Remove.
5326         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5327         * mem-break.c (memory_validate_breakpoint): Update.
5328         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5329         (ia64_memory_remove_breakpoint): Update.
5330         (ia64_breakpoint_from_pc): Update.
5331         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5332         from make_show_memory_breakpoints_cleanup.
5333
5334 2017-09-11  Tom Tromey  <tom@tromey.com>
5335
5336         * d-namespace.c (d_lookup_symbol): Use std::string.
5337         (find_symbol_in_baseclass): Likewise.
5338
5339 2017-09-11  Tom Tromey  <tom@tromey.com>
5340
5341         * ctf.c (ctf_start): Use std::string.
5342
5343 2017-09-11  Tom Tromey  <tom@tromey.com>
5344
5345         * ada-lang.c (is_known_support_routine): Update.
5346         (ada_unhandled_exception_name_addr_from_raise): Update.
5347         * guile/scm-frame.c (gdbscm_frame_name): Update.
5348         * python/py-frame.c (frapy_name): Update.
5349         (frapy_function): Update.
5350         * stack.h (find_frame_funname): Update.
5351         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5352         (print_frame): Update.
5353
5354 2017-09-11  Tom Tromey  <tom@tromey.com>
5355
5356         * findcmd.c (put_bits): Take a gdb::byte_vector.
5357         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5358         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5359         cleanups.
5360         (find_command): Update.
5361
5362 2017-09-11  Tom Tromey  <tom@tromey.com>
5363
5364         * cli/cli-script.c (class scoped_restore_hook_in): New.
5365         (clear_hook_in_cleanup): Remove.
5366         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5367         scoped_restore_hook_in.
5368
5369 2017-09-11  Tom Tromey  <tom@tromey.com>
5370
5371         * cli/cli-script.c (restore_interp): Remove.
5372         (read_command_lines): Use scoped_restore_interp.
5373         * interps.c (scoped_restore_interp::set_temp): Rename from
5374         interp_set_temp.
5375         * interps.h (class scoped_restore_interp): New.
5376         (interp_set_temp): Remove.
5377
5378 2017-09-11  Tom Tromey  <tom@tromey.com>
5379
5380         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5381         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5382         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5383         scoped_restore.
5384         (mi_cmd_break_insert_1): Update.
5385         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5386         scoped_restore.
5387
5388 2017-09-11  Tom Tromey  <tom@tromey.com>
5389
5390         * demangle.c (demangle_command): Update.
5391         * breakpoint.c (disable_command): Update.
5392         (enable_command): Update.
5393         (find_location_by_number): Make "number" const.  Use
5394         get_number_trailer.
5395         * cli/cli-utils.c (extract_arg): Return std::string.
5396         * probe.c (parse_probe_linespec): Update.  Change types.
5397         (collect_probes): Take string arguments.
5398         (parse_probe_linespec): Likewise.
5399         (info_probes_for_ops): Update.
5400         (enable_probes_command): Update.
5401         (disable_probes_command): Update.
5402         * break-catch-sig.c (catch_signal_split_args): Update.
5403         * mi/mi-parse.c (mi_parse): Update.
5404
5405 2017-09-11  Tom Tromey  <tom@tromey.com>
5406
5407         * language.h (language_enum): Make argument const.
5408         * language.c (language_enum): Make argument const.
5409
5410 2017-09-11  Tom Tromey  <tom@tromey.com>
5411
5412         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5413         as function.
5414         (skip_to_space): Rename from skip_to_space_const.
5415         * common/common-utils.c (skip_to_space): New function.
5416         (skip_to_space): Rename from skip_to_space_const.
5417         * cli/cli-utils.h (get_number): Rename from get_number_const.
5418         (extract_arg): Rename from extract_arg_const.
5419         * cli/cli-utils.c (get_number): Rename from get_number_const.
5420         (extract_arg): Rename from extract_arg_const.
5421         (number_or_range_parser::get_number): Use ::get_number.
5422         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5423         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5424         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5425         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5426         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5427         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5428         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5429         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5430
5431 2017-09-11  Tom Tromey  <tom@tromey.com>
5432
5433         * python/python.c (do_start_initialization): Use
5434         py-event-types.def to initialize types.
5435         Define all object type structures.
5436         * python/python-internal.h: Don't declare event initialization
5437         functions.
5438         * python/py-threadevent.c (thread_event_object_type): Don't
5439         define.
5440         * python/py-stopevent.c (stop_event_object_type): Don't define.
5441         * python/py-signalevent.c (signal_event_object_type): Don't
5442         declare or define.
5443         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5444         (clear_objfiles_event_object_type): Don't declare or define.
5445         * python/py-infevents.c (inferior_call_pre_event_object_type)
5446         (inferior_call_post_event_object_type)
5447         (register_changed_event_object_type)
5448         (memory_changed_event_object_type): Don't declare or define.
5449         * python/py-inferior.c (new_thread_event_object_type)
5450         (new_inferior_event_object_type)
5451         (inferior_deleted_event_object_type): Don't declare or define.
5452         * python/py-exitedevent.c (exited_event_object_type): Don't
5453         declare or define.
5454         * python/py-evts.c (gdbpy_initialize_py_events): Use
5455         py-all-events.def.
5456         * python/py-events.h (thread_event_object_type): Don't declare.
5457         (events_object): Use py-all-events.def.
5458         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5459         py-event-types.def.
5460         * python/py-event-types.def: New file.
5461         * python/py-continueevent.c (create_continue_event_object): Don't
5462         declare or define.
5463         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5464         declare or define.
5465         * python/py-all-events.def: New file.
5466
5467 2017-09-11  Tom Tromey  <tom@tromey.com>
5468
5469         * python/py-threadevent.c (create_thread_event_object): Return
5470         gdbpy_ref.
5471         * python/py-stopevent.h (create_stop_event_object)
5472         (create_breakpoint_event_object, create_signal_event_object):
5473         Update.
5474         * python/py-stopevent.c (create_stop_event_object): Return
5475         gdbpy_ref.
5476         (emit_stop_event): Update.
5477         * python/py-signalevent.c (create_signal_event_object): Return
5478         gdbpy_ref.
5479         * python/py-infevents.c (create_inferior_call_event_object):
5480         Update.
5481         * python/py-event.h (create_event_object)
5482         (create_thread_event_object): Update.
5483         * python/py-event.c (create_event_object): Return gdbpy_ref.
5484         * python/py-continueevent.c: Return gdbpy_ref.
5485         * python/py-bpevent.c (create_breakpoint_event_object): Return
5486         gdbpy_ref.
5487
5488 2017-09-11  Tom Tromey  <tom@tromey.com>
5489
5490         PR python/15622:
5491         * NEWS: Add entry.
5492         * python/python.c (do_start_initialization): Initialize new event
5493         types.
5494         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5495         (gdbpy_initialize_inferior_deleted_event)
5496         (gdbpy_initialize_new_thread_event): Declare.
5497         * python/py-threadevent.c (create_thread_event_object): Add option
5498         "thread" parameter.
5499         * python/py-inferior.c (new_thread_event_object_type)
5500         (new_inferior_event_object_type)
5501         (inferior_deleted_event_object_type): Declare.
5502         (python_new_inferior, python_inferior_deleted): New functions.
5503         (add_thread_object): Emit new_thread event.
5504         (gdbpy_initialize_inferior): Attach new functions to corresponding
5505         observers.
5506         (new_thread, new_inferior, inferior_deleted): Define new event
5507         types.
5508         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5509         registries.
5510         * python/py-events.h (events_object) <new_inferior,
5511         inferior_deleted, new_thread>: New fields.
5512         * python/py-event.h (create_thread_event_breakpoint): Add optional
5513         "thread" parameter.
5514
5515 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5516
5517         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5518         check current_ui instead.
5519         (internal_vproblem): Likewise.
5520
5521 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5522
5523         * thread.c (print_thread_info_1): Remove unnecessary calls to
5524         uiout->is_mi_like_p.
5525
5526 2017-09-09  Tom Tromey  <tom@tromey.com>
5527
5528         * namespace.h (add_using_directive): Update.
5529         * namespace.c (add_using_directive): Change type of excludes to
5530         std::vector.
5531         * dwarf2read.c (read_import_statement): Use std::vector.
5532         (read_namespace): Update.
5533         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5534
5535 2017-09-09  Tom Tromey  <tom@tromey.com>
5536
5537         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5538
5539 2017-09-09  Tom Tromey  <tom@tromey.com>
5540
5541         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5542
5543 2017-09-09  Tom Tromey  <tom@tromey.com>
5544
5545         * stack.c (func_command): Use gdb::def_vector.
5546
5547 2017-09-09  Tom Tromey  <tom@tromey.com>
5548
5549         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5550         ui_out_emit_list, ui_out_emit_tuple.
5551         (mi_cmd_var_update): Likewise.
5552
5553 2017-09-09  Tom Tromey  <tom@tromey.com>
5554
5555         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5556         ui_out_redirect_pop.
5557         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5558         ui_out_redirect_pop.
5559         * utils.c (do_ui_out_redirect_pop)
5560         (make_cleanup_ui_out_redirect_pop): Remove.
5561         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5562         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5563         * ui-out.h (ui_out_redirect_pop): New class.
5564
5565 2017-09-09  Tom Tromey  <tom@tromey.com>
5566
5567         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5568         (list_available_thread_groups, mi_cmd_list_thread_groups)
5569         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5570         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5571         Likewise.
5572
5573 2017-09-09  Tom Tromey  <tom@tromey.com>
5574
5575         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5576         ui_out_emit_tuple.
5577
5578 2017-09-09  Tom Tromey  <tom@tromey.com>
5579
5580         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5581         * stack.c (print_frame): Use ui_out_emit_tuple.
5582         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5583         (info_spu_mailbox_command, info_spu_dma_command)
5584         (info_spu_proxydma_command): Likewise.
5585         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5586         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5587         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5588         ui_out_emit_tuple.
5589         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5590
5591 2017-09-09  Tom Tromey  <tom@tromey.com>
5592
5593         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5594         (class ui_out_emit_table): Update comment.
5595         * ui-out.c (do_cleanup_table_end)
5596         (make_cleanup_ui_out_table_begin_end): Remove.
5597         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5598         (info_spu_dma_cmdlist): Likewise.
5599         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5600         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5601         ui_out_emit_table.
5602
5603 2017-09-09  Tom Tromey  <tom@tromey.com>
5604
5605         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5606         ui_out_emit_list, gdb::optional.
5607
5608 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5609
5610         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5611         prototype.
5612         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5613         prototype.
5614         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5615         prototype.
5616         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5617         * ada-exp.y: Remove _initialize_ada_exp prototype.
5618         * ada-lang.c: Remove _initialize_ada_language prototype.
5619         * ada-tasks.c: Remove _initialize_tasks prototype.
5620         * addrmap.c: Remove _initialize_addrmap prototype.
5621         * agent.c: Remove _initialize_agent prototype.
5622         * aix-thread.c: Remove _initialize_aix_thread prototype.
5623         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5624         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5625         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5626         prototype.
5627         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5628         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5629         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5630         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5631         prototype.
5632         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5633         prototype.
5634         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5635         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5636         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5637         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5638         prototype.
5639         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5640         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5641         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5642         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5643         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5644         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5645         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5646         prototype.
5647         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5648         prototype.
5649         * annotate.c: Remove _initialize_annotate prototype.
5650         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5651         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5652         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5653         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5654         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5655         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5656         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5657         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5658         prototype.
5659         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5660         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5661         * auto-load.c: Remove _initialize_auto_load prototype.
5662         * auxv.c: Remove _initialize_auxv prototype.
5663         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5664         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5665         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5666         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5667         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5668         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5669         prototype.
5670         * break-catch-throw.c: Remove _initialize_break_catch_throw
5671         prototype.
5672         * breakpoint.c: Remove _initialize_breakpoint prototype.
5673         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5674         * btrace.c: Remove _initialize_btrace prototype.
5675         * charset.c: Remove _initialize_charset prototype.
5676         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5677         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5678         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5679         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5680         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5681         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5682         * coffread.c: Remove _initialize_coffread prototype.
5683         * compile/compile.c: Remove _initialize_compile prototype.
5684         * complaints.c: Remove _initialize_complaints prototype.
5685         * completer.c: Remove _initialize_completer prototype.
5686         * copying.awk: Remove _initialize_copying prototype.
5687         * copying.c: Regenerate.
5688         * core-regset.c: Remove _initialize_core_regset prototype.
5689         * corefile.c: Remove _initialize_core prototype.
5690         * corelow.c: Remove _initialize_corelow prototype.
5691         * cp-abi.c: Remove _initialize_cp_abi prototype.
5692         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5693         * cp-support.c: Remove _initialize_cp_support prototype.
5694         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5695         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5696         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5697         * ctf.c: Remove _initialize_ctf prototype.
5698         * d-lang.c: Remove _initialize_d_language prototype.
5699         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5700         prototype.
5701         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5702         * dbxread.c: Remove _initialize_dbxread prototype.
5703         * dcache.c: Remove _initialize_dcache prototype.
5704         * demangle.c: Remove _initialize_demangler prototype.
5705         * disasm-selftests.c: Remove _initialize_disasm_selftests
5706         prototype.
5707         * disasm.c: Remove _initialize_disasm prototype.
5708         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5709         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5710         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5711         prototype.
5712         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5713         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5714         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5715         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5716         * elfread.c: Remove _initialize_elfread prototype.
5717         * exec.c: Remove _initialize_exec prototype.
5718         * extension.c: Remove _initialize_extension prototype.
5719         * f-lang.c: Remove _initialize_f_language prototype.
5720         * f-valprint.c: Remove _initialize_f_valprint prototype.
5721         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5722         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5723         * filesystem.c: Remove _initialize_filesystem prototype.
5724         * findcmd.c: Remove _initialize_mem_search prototype.
5725         * fork-child.c: Remove _initialize_fork_child prototype.
5726         * frame-base.c: Remove _initialize_frame_base prototype.
5727         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5728         * frame.c: Remove _initialize_frame prototype.
5729         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5730         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5731         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5732         * gcore.c: Remove _initialize_gcore prototype.
5733         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5734         * gdbarch.c: Regenerate.
5735         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5736         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5737         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5738         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5739         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5740         * go-lang.c: Remove _initialize_go_language prototype.
5741         * go32-nat.c: Remove _initialize_go32_nat prototype.
5742         * guile/guile.c: Remove _initialize_guile prototype.
5743         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5744         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5745         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5746         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5747         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5748         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5749         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5750         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5751         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5752         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5753         prototype.
5754         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5755         prototype.
5756         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5757         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5758         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5759         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5760         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5761         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5762         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5763         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5764         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5765         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5766         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5767         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5768         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5769         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5770         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5771         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5772         prototype.
5773         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5774         prototype.
5775         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5776         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5777         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5778         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5779         * infcall.c: Remove _initialize_infcall prototype.
5780         * infcmd.c: Remove _initialize_infcmd prototype.
5781         * inferior.c: Remove _initialize_inferiors prototype.
5782         * inflow.c: Remove _initialize_inflow prototype.
5783         * infrun.c: Remove _initialize_infrun prototype.
5784         * interps.c: Remove _initialize_interpreter prototype.
5785         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5786         * jit.c: Remove _initialize_jit prototype.
5787         * language.c: Remove _initialize_language prototype.
5788         * linux-fork.c: Remove _initialize_linux_fork prototype.
5789         * linux-nat.c: Remove _initialize_linux_nat prototype.
5790         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5791         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5792         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5793         * m2-lang.c: Remove _initialize_m2_language prototype.
5794         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5795         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5796         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5797         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5798         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5799         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5800         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5801         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5802         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5803         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5804         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5805         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5806         * machoread.c: Remove _initialize_machoread prototype.
5807         * macrocmd.c: Remove _initialize_macrocmd prototype.
5808         * macroscope.c: Remove _initialize_macroscope prototype.
5809         * maint.c: Remove _initialize_maint_cmds prototype.
5810         * mdebugread.c: Remove _initialize_mdebugread prototype.
5811         * memattr.c: Remove _initialize_mem prototype.
5812         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5813         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5814         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5815         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5816         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5817         * microblaze-linux-tdep.c: Remove
5818         _initialize_microblaze_linux_tdep prototype.
5819         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5820         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5821         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5822         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5823         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5824         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5825         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5826         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5827         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5828         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5829         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5830         prototype.
5831         * mipsread.c: Remove _initialize_mipsread prototype.
5832         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5833         prototype.
5834         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5835         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5836         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5837         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5838         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5839         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5840         prototype.
5841         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5842         * nto-procfs.c: Remove _initialize_procfs prototype.
5843         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5844         * objc-lang.c: Remove _initialize_objc_language prototype.
5845         * objfiles.c: Remove _initialize_objfiles prototype.
5846         * observer.c: Remove observer_test_first_notification_function,
5847         observer_test_second_notification_function,
5848         observer_test_third_notification_function, and
5849         _initialize_observer prototypes.
5850         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5851         * osabi.c: Remove _initialize_gdb_osabi prototype.
5852         * osdata.c: Remove _initialize_osdata prototype.
5853         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5854         * parse.c: Remove _initialize_parse prototype.
5855         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5856         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5857         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5858         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5859         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5860         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5861         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5862         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5863         * printcmd.c: Remove _initialize_printcmd prototype.
5864         * probe.c: Remove _initialize_probe prototype.
5865         * proc-api.c: Remove _initialize_proc_api prototype.
5866         * proc-events.c: Remove _initialize_proc_events prototype.
5867         * proc-service.c: Remove _initialize_proc_service prototype.
5868         * procfs.c: Remove _initialize_procfs prototype.
5869         * psymtab.c: Remove _initialize_psymtab prototype.
5870         * python/python.c: Remove _initialize_python prototype.
5871         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5872         * record-btrace.c: Remove _initialize_record_btrace prototype.
5873         * record-full.c: Remove _initialize_record_full prototype.
5874         * record.c: Remove _initialize_record prototype.
5875         * regcache.c: Remove _initialize_regcache prototype.
5876         * reggroups.c: Remove _initialize_reggroup prototype.
5877         * remote-notif.c: Remove _initialize_notif prototype.
5878         * remote-sim.c: Remove _initialize_remote_sim prototype.
5879         * remote.c: Remove _initialize_remote prototype.
5880         * reverse.c: Remove _initialize_reverse prototype.
5881         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5882         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5883         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5884         prototype.
5885         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5886         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5887         * rust-exp.y: Remove _initialize_rust_exp prototype.
5888         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5889         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5890         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5891         * score-tdep.c: Remove _initialize_score_tdep prototype.
5892         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5893         prototype.
5894         * ser-go32.c: Remove _initialize_ser_dos prototype.
5895         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5896         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5897         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5898         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5899         * serial.c: Remove _initialize_serial prototype.
5900         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5901         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5902         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5903         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5904         * skip.c: Remove _initialize_step_skip prototype.
5905         * sol-thread.c: Remove _initialize_sol_thread prototype.
5906         * solib-aix.c: Remove _initialize_solib_aix prototype.
5907         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5908         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5909         * solib-frv.c: Remove _initialize_frv_solib prototype.
5910         * solib-spu.c: Remove _initialize_spu_solib prototype.
5911         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5912         * solib-target.c: Remove _initialize_solib_target prototype.
5913         * solib.c: Remove _initialize_solib prototype.
5914         * source.c: Remove _initialize_source prototype.
5915         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5916         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5917         prototype.
5918         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5919         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5920         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5921         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5922         prototype.
5923         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5924         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5925         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5926         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5927         prototype.
5928         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5929         prototype.
5930         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5931         prototype.
5932         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5933         prototype.
5934         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5935         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5936         prototype.
5937         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5938         prototype.
5939         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5940         prototype.
5941         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5942         prototype.
5943         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5944         prototype.
5945         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5946         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5947         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5948         * stabsread.c: Remove _initialize_stabsread prototype.
5949         * stack.c: Remove _initialize_stack prototype.
5950         * stap-probe.c: Remove _initialize_stap_probe prototype.
5951         * std-regs.c: Remove _initialize_frame_reg prototype.
5952         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5953         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5954         * symfile.c: Remove _initialize_symfile prototype.
5955         * symmisc.c: Remove _initialize_symmisc prototype.
5956         * symtab.c: Remove _initialize_symtab prototype.
5957         * target-dcache.c: Remove _initialize_target_dcache prototype.
5958         * target-descriptions.c: Remove _initialize_target_descriptions
5959         prototype.
5960         * thread.c: Remove _initialize_thread prototype.
5961         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5962         prototype.
5963         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5964         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5965         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5966         prototype.
5967         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5968         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5969         * tracefile.c: Remove _initialize_tracefile prototype.
5970         * tracepoint.c: Remove _initialize_tracepoint prototype.
5971         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5972         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5973         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5974         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5975         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5976         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5977         * tui/tui.c: Remove _initialize_tui prototype.
5978         * typeprint.c: Remove _initialize_typeprint prototype.
5979         * user-regs.c: Remove _initialize_user_regs prototype.
5980         * utils.c: Remove _initialize_utils prototype.
5981         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5982         * valarith.c: Remove _initialize_valarith prototype.
5983         * valops.c: Remove _initialize_valops prototype.
5984         * valprint.c: Remove _initialize_valprint prototype.
5985         * value.c: Remove _initialize_values prototype.
5986         * varobj.c: Remove _initialize_varobj prototype.
5987         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5988         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5989         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5990         * windows-nat.c: Remove _initialize_windows_nat,
5991         _initialize_check_for_gdb_ini, and _initialize_loadable
5992         prototypes.
5993         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5994         * xcoffread.c: Remove _initialize_xcoffread prototype.
5995         * xml-support.c: Remove _initialize_xml_support prototype.
5996         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5997         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5998         prototype.
5999         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6000         prototype.
6001         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6002
6003 2017-09-08  Keith Seitz  <keiths@redhat.com>
6004
6005         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6006         field.
6007
6008 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
6009
6010         * f-valprint.c (f_val_print): Remove check for one byte
6011         sized integers. Remove printing of character type.
6012
6013 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
6014             Christoph Weinmann  <christoph.t.weinmann@intel.com>
6015             Bernhard Heckel  <bernhard.heckel@intel.com>
6016
6017         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6018         to maintain proper indentation when printing pointers/refs.
6019
6020 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6021
6022         GDB 8.0.1 released.
6023
6024 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
6025
6026         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6027
6028 2017-09-05  Tom Tromey  <tom@tromey.com>
6029
6030         * parse.c (funcall_chain): Now a std::vector.
6031         (start_arglist, end_arglist): Simplify.
6032         (free_funcalls): Remove.
6033         (parse_exp_in_context_1): Remove cleanup.
6034
6035 2017-09-05  Tom Tromey  <tom@tromey.com>
6036
6037         * go-exp.y (go_parse): Don't create a cleanup.
6038
6039 2017-09-05  Tom Tromey  <tom@tromey.com>
6040
6041         * d-exp.y (PrimaryExpression): Use std::string.
6042         (d_parse): Don't create a cleanup.
6043
6044 2017-09-05  Tom Tromey  <tom@tromey.com>
6045
6046         * utils.c (do_clear_parser_state): Remove.
6047         (make_cleanup_clear_parser_state): Remove.
6048         * p-exp.y (pascal_parse): Use scoped_restore.
6049         * m2-exp.y (m2_parse): Use scoped_restore.
6050         * f-exp.y (f_parse): Use scoped_restore.
6051         * d-exp.y (d_parse): Use scoped_restore.
6052         * c-exp.y (c_parse): Use scoped_restore.
6053         * ada-exp.y (ada_parse): Use scoped_restore.
6054         * utils.h (make_cleanup_clear_parser_state): Remove.
6055
6056 2017-09-06  Keith Seitz  <keiths@redhat.com>
6057
6058         * dwarf2read.c (dw2_linkage_name_attr): New function.
6059         (dw2_linkage_name): New function.
6060         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6061         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6062         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6063
6064 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6065
6066         * config/djgpp/djconfig.sh: Correct shell portability issue.
6067
6068 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6069
6070         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6071
6072 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6073
6074         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6075         * NEWS: Mention new FreeBSD/mips native configuration.
6076         * configure.host: Add aarch64*-*-freebsd*.
6077         * configure.nat: Likewise.
6078         * aarch64-fbsd-nat.c: New file.
6079
6080 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6081
6082         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6083         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6084         * NEWS: Mention new FreeBSD/aarch64 target.
6085         * configure.tgt: Add aarch64*-*-freebsd*.
6086         * aarch64-fbsd-tdep.c: New file.
6087         * aarch64-fbsd-tdep.h: New file.
6088
6089 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6090
6091         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6092
6093 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6094
6095         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6096         of TLS symbols.
6097
6098 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6099
6100         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6101         call.
6102
6103 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6104
6105         * infrun.c (follow_exec): Call add_thread after
6106         target_find_description.
6107
6108 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6109
6110         * infrun.c (handle_inferior_event_1): When exec'ing, read
6111         stop_pc after follow_exec.
6112
6113 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6114
6115         * remote.c (process_g_packet): Update error message.
6116
6117 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6118
6119         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6120         targets.
6121
6122 2017-09-05  Pedro Alves  <palves@redhat.com>
6123
6124         * eval.c (eval_call, evaluate_funcall): New functions, factored
6125         out from ...
6126         (evaluate_subexp_standard): ... this.
6127
6128 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6129
6130         * amd64-tdep.c (amd64_target_description): Create target
6131         descriptions.
6132         (_initialize_amd64_tdep): Don't call functions
6133         initialize_tdesc_amd64_*.  Add self tests.
6134         * arch/amd64.c (amd64_create_target_description): Add parameter
6135         is_linux.  Call set_tdesc_osabi if is_linux is true.
6136         * arch/amd64.h (amd64_create_target_description): Update the
6137         declaration.
6138         * arch/i386.c (i386_create_target_description): Add parameter
6139         is_linux.  Call set_tdesc_osabi if is_linux is true.
6140         * arch/i386.h (i386_create_target_description): Update
6141         declaration.
6142         * configure.tgt: Add i386.o to gdb_target_obs.
6143         * features/Makefile (XMLTOC): Remove i386/*.xml.
6144         * features/i386/amd64-avx-avx512.c: Remove.
6145         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6146         * features/i386/amd64-avx-mpx.c: Remove.
6147         * features/i386/amd64-avx.c: Remove.
6148         * features/i386/amd64-mpx.c: Remove.
6149         * features/i386/amd64.c: Remove.
6150         * features/i386/i386-avx-avx512.c: Remove.
6151         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6152         * features/i386/i386-avx-mpx.c: Remove.
6153         * features/i386/i386-avx.c: Remove.
6154         * features/i386/i386-mmx.c: Remove.
6155         * features/i386/i386-mpx.c: Remove.
6156         * features/i386/i386.c: Remove.
6157         * i386-tdep.c: Don't include features/i386/i386*.c., include
6158         target-descriptions.h and arch/i386.h.
6159         (i386_target_description): Create target descriptions.
6160         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6161         functions.  Do self tests.
6162
6163 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6164
6165         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6166         * features/i386/amd64-avx-avx512-linux.c: Removed.
6167         * features/i386/amd64-avx-linux.c: Removed.
6168         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6169         * features/i386/amd64-avx-mpx-linux.c: Removed.
6170         * features/i386/amd64-linux.c: Removed.
6171         * features/i386/amd64-mpx-linux.c: Removed.
6172         * features/i386/x32-avx-avx512-linux.c: Removed.
6173         * features/i386/x32-avx-linux.c: Removed.
6174         * features/i386/x32-linux.c: Removed.
6175
6176 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6177
6178         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6179         features/i386/*.c.
6180         (amd64_linux_read_description): Call
6181         amd64_create_target_description.
6182         * arch/amd64.c: New file.
6183         * arch/amd64.h: New file.
6184         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6185         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6186
6187 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6188
6189         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6190         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6191         (amd64_linux_read_description): Create target descriptions.
6192         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6193         functions.  Add unit tests.
6194         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6195         x32-core.xml.
6196         * features/i386/64bit-avx.c: Generated.
6197         * features/i386/64bit-avx512.c: Generated.
6198         * features/i386/64bit-core.c: Generated.
6199         * features/i386/64bit-linux.c: Generated.
6200         * features/i386/64bit-mpx.c: Generated.
6201         * features/i386/64bit-pkeys.c: Generated.
6202         * features/i386/64bit-segments.c: Generated.
6203         * features/i386/64bit-sse.c: Generated.
6204         * features/i386/x32-core.c: Generated.
6205         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6206         c files for amd64-linux and x32-linux.
6207
6208 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6209
6210         * amd64-linux-tdep.c (amd64_linux_read_description): New
6211         function.
6212         (amd64_linux_core_read_description): Call
6213         amd64_linux_read_description.
6214         (amd64_linux_init_abi): Likewise.
6215         (amd64_x32_linux_init_abi): Likewise.
6216         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6217         * x86-linux-nat.c (x86_linux_read_description): Call
6218         amd64_linux_read_description.
6219
6220 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6221
6222         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6223         comments.
6224
6225 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6226
6227         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6228         * features/i386/i386-avx-avx512-linux.c: Remove.
6229         * features/i386/i386-avx-linux.c: Remove.
6230         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6231         * features/i386/i386-avx-mpx-linux.c: Remove.
6232         * features/i386/i386-linux.c: Remove.
6233         * features/i386/i386-mmx-linux.c: Remove.
6234         * features/i386/i386-mpx-linux.c: Remove.
6235
6236 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6237
6238         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6239         (SFILES): Add arch/i386.c.
6240         (HFILES_NO_SRCDIR): Add arch/i386.h.
6241         * arch/i386.c: New file.
6242         * arch/i386.h: New file.
6243         * arch/tdesc.h (allocate_target_description): Declare.
6244         (set_tdesc_architecture): Declare.
6245         (set_tdesc_osabi): Declare.
6246         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6247         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6248         include arch/i386.h.
6249         (i386_linux_read_description): Remove code and call
6250         i386_create_target_description.
6251         (set_tdesc_architecture): New function.
6252         (set_tdesc_osabi): New function.
6253         * target-descriptions.h (allocate_target_description): Remove.
6254
6255 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6256
6257         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6258         * target-descriptions.c (tdesc_create_feature): Likewise, and
6259         adjust code.
6260         * features/i386/32bit-avx.c: Re-generated.
6261         * features/i386/32bit-avx512.c: Re-generated.
6262         * features/i386/32bit-core.c: Re-generated.
6263         * features/i386/32bit-linux.c: Re-generated.
6264         * features/i386/32bit-mpx.c: Re-generated.
6265         * features/i386/32bit-pkeys.c: Re-generated.
6266         * features/i386/32bit-sse.c: Re-generated.
6267
6268 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6269
6270         * regformats/regdef.h (struct reg): Override operator == and !=.
6271
6272 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6273
6274         * arch/tdesc.h: New file.
6275         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6276         * target-descriptions.c: Update comments.
6277         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6278         declarations.
6279         * features/i386/32bit-avx.c: Re-generated.
6280         * features/i386/32bit-avx512.c: Re-generated.
6281         * features/i386/32bit-core.c: Re-generated.
6282         * features/i386/32bit-linux.c: Re-generated.
6283         * features/i386/32bit-mpx.c: Re-generated.
6284         * features/i386/32bit-pkeys.c: Re-generated.
6285         * features/i386/32bit-sse.c: Re-generated.
6286
6287 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6288
6289         * regformats/regdat.sh: Update generated code.
6290
6291 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6292
6293         * regformats/regdat.sh: Adjust code order.
6294
6295 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6296
6297         * expprint.c (dump_subexp_body_standard): Use constant format
6298         string in fprintf_filtered call.
6299
6300 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6301
6302         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6303         NetBSD/i386.
6304         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6305
6306 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6307
6308         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6309
6310 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6311
6312         * bsd-kvm.o: Define _KMEMUSER.
6313         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6314         * configure: Regenerate.
6315
6316 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6317
6318         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6319         * i386-fbsd-nat.c: Likewise.
6320
6321 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6322
6323         * unittests/array-view-selftests.c: Add include of <array>.
6324
6325 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6326
6327         * spu-tdep.c (flush_ea_cache): Add missing argument to
6328         call_function_by_hand.
6329
6330 2017-09-04  Pedro Alves  <palves@redhat.com>
6331
6332         * NEWS (Safer support for debugging with no debug info): New.
6333
6334 2017-09-04  Pedro Alves  <palves@redhat.com>
6335
6336         * c-exp.y (function_method, function_method_void): Add current
6337         instance flags to TYPE_INSTANCE.
6338         * dwarf2read.c (check_modifier): New.
6339         (compute_delayed_physnames): Assert that only C++ adds delayed
6340         physnames.  Mark fn_fields as const/volatile depending on
6341         physname.
6342         * eval.c (make_params): New type_instance_flags parameter.  Use
6343         it as the new type's instance flags.
6344         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6345         flags element and pass it to make_params.
6346         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6347         instance flags element.
6348         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6349         * gdbtypes.h: Include "enum-flags.h".
6350         (type_instance_flags): New enum-flags type.
6351         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6352         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6353         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6354         (follow_type_instance_flags): New function.
6355         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6356         * parser-defs.h (follow_type_instance_flags): Declare.
6357         * valops.c (value_struct_elt_for_reference): const/volatile must
6358         match too.
6359
6360 2017-09-04  Pedro Alves  <palves@redhat.com>
6361
6362         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6363         function/method scopes; lookup the nested name as a function local
6364         static variable.
6365
6366 2017-09-04  Pedro Alves  <palves@redhat.com>
6367
6368         (%type <voidval>): Add function_method.
6369         * c-exp.y (exp): New production for calls with no arguments.
6370         (function_method, function_method_void_or_typelist): New
6371         productions.
6372         (exp): New production for "method()::static_var".
6373         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6374         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6375         Handle OP_FUNC_STATIC_VAR.
6376         * parse.c (operator_length_standard):
6377         Handle OP_FUNC_STATIC_VAR.
6378
6379 2017-09-04  Pedro Alves  <palves@redhat.com>
6380
6381         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6382         handling.
6383         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6384         Ditto.
6385         * parse.c (operator_length_standard, operator_check_standard):
6386         Ditto.
6387         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6388
6389 2017-09-04  Pedro Alves  <palves@redhat.com>
6390
6391         * ax-gdb.c: Include "typeprint.h".
6392         (gen_expr_for_cast): New function.
6393         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6394         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6395         type is unknown.
6396         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6397         nodebug_data_symbol.
6398         * eval.c: Include "typeprint.h".
6399         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6400         Error out if symbol has unknown type.
6401         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6402         evaluate_subexp_for_cast.
6403         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6404         OP_VAR_MSYM_VALUE.
6405         (evaluate_subexp_for_cast): New function.
6406         * gdbtypes.c (init_nodebug_var_type): New function.
6407         (objfile_type): Use it to initialize types of variables with no
6408         debug info.
6409         * typeprint.c (error_unknown_type): New.
6410         * typeprint.h (error_unknown_type): New declaration.
6411         * compile/compile-c-types.c (convert_type_basic): Handle
6412         TYPE_CODE_ERROR; warn and fallback to int for variables with
6413         unknown type.
6414
6415 2017-09-04  Pedro Alves  <palves@redhat.com>
6416
6417         * eval.c (evaluate_var_value): New function, factored out from ...
6418         (evaluate_subexp_standard): ... here.
6419
6420 2017-09-04  Pedro Alves  <palves@redhat.com>
6421
6422         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6423         Remove useless assignments to 'op'.
6424
6425 2017-09-04  Pedro Alves  <palves@redhat.com>
6426
6427         * eval.c (eval_skip_value): New function.
6428         (evaluate_subexp_standard): Use it.
6429
6430 2017-09-04  Pedro Alves  <palves@redhat.com>
6431
6432         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6433         function name from symbol/minsym and pass it to
6434         error_call_unknown_return_type.
6435
6436 2017-09-04  Pedro Alves  <palves@redhat.com>
6437
6438         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6439         * ax-gdb.c (gen_msym_var_ref): New function.
6440         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6441         * eval.c (evaluate_var_msym_value): New function.
6442         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6443         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6444         to call_function_by_hand.
6445         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6446         Handle OP_VAR_MSYM_VALUE.
6447         (union exp_element) <msymbol>: New field.
6448         * minsyms.h (struct type): Forward declare.
6449         (find_minsym_type_and_address): Declare.
6450         * parse.c (write_exp_elt_msym): New function.
6451         (write_exp_msymbol): Delete, refactored as ...
6452         (find_minsym_type_and_address): ... this new function.
6453         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6454         (operator_length_standard, operator_check_standard): Handle
6455         OP_VAR_MSYM_VALUE.
6456         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6457
6458 2017-09-04  Pedro Alves  <palves@redhat.com>
6459
6460         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6461         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6462         unknown.
6463         * ada-typeprint.c (print_func_type): Handle functions with unknown
6464         return type.
6465         * c-typeprint.c (c_type_print_base): Handle functions and methods
6466         with unknown return type.
6467         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6468         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6469         * compile/compile-c-types.c: Include "objfiles.h".
6470         (convert_func): For functions with unknown return type, warn and
6471         default to int.
6472         * compile/compile-object-run.c (compile_object_run): Adjust call
6473         to call_function_by_hand_dummy.
6474         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6475         call_function_by_hand.
6476         * eval.c (evaluate_subexp_standard): Adjust calls to
6477         call_function_by_hand.  Handle functions and methods with unknown
6478         return type.  Pass expect_type to call_function_by_hand.
6479         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6480         return type.
6481         * gcore.c (call_target_sbrk): Adjust call to
6482         call_function_by_hand.
6483         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6484         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6485         an integer address type instead of nodebug.
6486         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6487         call_function_by_hand.
6488         * infcall.c (error_call_unknown_return_type): New function.
6489         (call_function_by_hand): New "default_return_type" parameter.
6490         Pass it down.
6491         (call_function_by_hand_dummy): New "default_return_type"
6492         parameter.  Use it instead of defaulting to int.  If there's no
6493         default and the return type is unknown, throw an error.  If
6494         there's a default return type, and the called function has no
6495         debug info, then assume the function is prototyped.
6496         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6497         New "default_return_type" parameter.
6498         (error_call_unknown_return_type): New declaration.
6499         * linux-fork.c (call_lseek): Cast return type of lseek.
6500         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6501         call_function_by_hand.
6502         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6503         calls to call_function_by_hand.
6504         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6505         return type.
6506         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6507         (value_nsstring, print_object_command): Adjust calls to
6508         call_function_by_hand.
6509         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6510         functions with unknown return type.
6511         (pascal_type_print_func_varspec_suffix): New function.
6512         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6513         TYPE_CODE_METHOD>: Use it.
6514         * python/py-value.c (valpy_call): Adjust call to
6515         call_function_by_hand.
6516         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6517         call_function_by_hand.
6518         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6519         call_function_by_hand.
6520         * valops.c (value_allocate_space_in_inferior): Adjust call to
6521         call_function_by_hand.
6522         * typeprint.c (type_print_unknown_return_type): New function.
6523         * typeprint.h (type_print_unknown_return_type): New declaration.
6524
6525 2017-09-04  Pedro Alves  <palves@redhat.com>
6526
6527         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6528         types with more than one parameter as prototyped.
6529
6530 2017-09-04  Pedro Alves  <palves@redhat.com>
6531
6532         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6533         (disassemble_command): Use gdb_disassembly_flags instead of bare
6534         int.
6535         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6536         (dump_insns, do_mixed_source_and_assembly_deprecated)
6537         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6538         Use gdb_disassembly_flags instead of bare int.
6539         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6540         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6541         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6542         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6543         (enum gdb_disassembly_flag): ... values of this new enumeration.
6544         (gdb_disassembly_flags): Define.
6545         (gdb_disassembly)
6546         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6547         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6548         gdb_disassembly_flags instead of bare int.
6549         * record-btrace.c (btrace_insn_history)
6550         (record_btrace_insn_history, record_btrace_insn_history_range)
6551         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6552         instead of bare int.
6553         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6554         Use gdb_disassembly_flags instead of bare int.
6555         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6556         Define.
6557         * target-delegates.c: Regenerate.
6558         * target.c (target_insn_history, target_insn_history_from)
6559         (target_insn_history_range): Use gdb_disassembly_flags instead of
6560         bare int.
6561         * target.h: Include "disasm.h".
6562         (struct target_ops) <to_insn_history, to_insn_history_from,
6563         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6564         int.
6565         (target_insn_history, target_insn_history_from)
6566         (target_insn_history_range): Use gdb_disassembly_flags instead of
6567         bare int.
6568
6569 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6570
6571         * cli/cli-script.c (build_command_line): For if/while commands,
6572         check whether args is empty.
6573
6574 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6575
6576         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6577         (enum command_control_type): Likewise.
6578         (struct command_line): Likewise.
6579         (free_command_lines): Likewise.
6580         (struct command_lines_deleter): Likewise.
6581         (command_line_up): Likewise.
6582         (read_command_lines): Likewise.
6583         (read_command_lines_1): Likewise.
6584         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6585         (enum command_control_type): Likewise.
6586         (struct command_line): Likewise.
6587         (free_command_lines): Likewise.
6588         (struct command_lines_deleter): Likewise.
6589         (command_line_up): Likewise.
6590         (read_command_lines): Likewise.
6591         (read_command_lines_1): Likewise.
6592         * breakpoint.h: Include cli/cli-script.h.
6593         * extension-priv.h: Likewise.
6594         * gdbcmd.h: Likewise.
6595
6596 2017-09-04  Pedro Alves  <palves@redhat.com>
6597
6598         * ada-lang.c (is_known_support_routine): Move sal declaration to
6599         where it is initialized.
6600         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6601         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6602         (clear_command, update_static_tracepoint): Remove init_sal
6603         references.  Move declarations closer to initializations.
6604         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6605         initializations.
6606         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6607         references.  Move sal declarations closer to initializations.
6608         * frame.c (find_frame_sal): Return a symtab_and_line via function
6609         return instead of output parameter.  Remove init_sal references.
6610         * frame.h (find_frame_sal): Return a symtab_and_line via function
6611         return instead of output parameter.
6612         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6613         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6614         instead of memset.
6615         (gdbscm_find_pc_line): Remove init_sal reference.
6616         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6617         references.  Move declarations closer to initializations.
6618         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6619         initializations.
6620         (finish_backward): Remove init_sal references.  Move declarations
6621         closer to initializations.
6622         * infrun.c (process_event_stop_test, handle_step_into_function)
6623         (insert_hp_step_resume_breakpoint_at_frame)
6624         (insert_step_resume_breakpoint_at_caller): Likewise.
6625         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6626         (symbol_to_sal): Likewise.
6627         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6628         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6629         to its initialization.
6630         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6631         init_sal references.  Move declarations closer to initializations.
6632         * source.c (get_current_source_symtab_and_line): Remove brace
6633         initialization.
6634         (set_current_source_symtab_and_line): Now takes the sal by const
6635         reference.  Remove brace initialization.
6636         (line_info): Remove init_sal reference.
6637         * source.h (set_current_source_symtab_and_line): Now takes a
6638         symtab_and_line via const reference.
6639         * stack.c (set_current_sal_from_frame): Adjust.
6640         (print_frame_info): Adjust.
6641         (get_last_displayed_sal): Return the sal via function return
6642         instead of via output parameter.  Simplify.
6643         (frame_info): Adjust.
6644         * stack.h (get_last_displayed_sal): Return the sal via function
6645         return instead of via output parameter.
6646         * symtab.c (init_sal): Delete.
6647         (find_pc_sect_line): Remove init_sal references.  Move
6648         declarations closer to initializations.
6649         (find_function_start_sal): Remove init_sal references.  Move
6650         declarations closer to initializations.
6651         * symtab.h (struct symtab_and_line): In-class initialize all
6652         fields.
6653         * tracepoint.c (set_traceframe_context)
6654         (print_one_static_tracepoint_marker): Remove init_sal references.
6655         Move declarations closer to initializations.
6656         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6657         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6658         declarations closer to initializations.
6659         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6660         init_sal references.  Adjust.
6661
6662 2017-09-04  Pedro Alves  <palves@redhat.com>
6663
6664         * ax-gdb.c (agent_command_1): Use range-for.
6665         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6666         * breakpoint.c: Include "common/array-view.h".
6667         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6668         parameter from struct symtabs_and_lines to
6669         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6670         (breakpoint_sals_to_pc): Change sals parameter from struct
6671         symtabs_and_lines to std::vector reference.
6672         (check_fast_tracepoint_sals): Change sals parameter from struct
6673         symtabs_and_lines to std::array_view.  Use range-for.
6674         (decode_static_tracepoint_spec): Return a std::vector instead of
6675         symtabs_and_lines.  Update.
6676         (create_breakpoint): Update.
6677         (break_range_command, until_break_command, clear_command): Update.
6678         (base_breakpoint_decode_location, bkpt_decode_location)
6679         (bkpt_probe_create_sals_from_location)
6680         (bkpt_probe_decode_location, tracepoint_decode_location)
6681         (tracepoint_probe_decode_location)
6682         (strace_marker_create_sals_from_location): Return a std::vector
6683         instead of symtabs_and_lines.
6684         (strace_marker_create_breakpoints_sal): Update.
6685         (strace_marker_decode_location): Return a std::vector instead of
6686         symtabs_and_lines.  Update.
6687         (update_breakpoint_locations): Change struct symtabs_and_lines
6688         parameters to gdb::array_view.  Adjust.
6689         (location_to_sals): Return a std::vector instead of
6690         symtabs_and_lines.  Update.
6691         (breakpoint_re_set_default): Use std::vector instead of struct
6692         symtabs_and_lines.
6693         (decode_location_default): Return a std::vector instead of
6694         symtabs_and_lines.  Update.
6695         * breakpoint.h: Include "common/array-view.h".
6696         (struct breakpoint_ops) <decode_location>: Now returns a
6697         std::vector instead of returning a symtabs_and_lines via output
6698         parameter.
6699         (update_breakpoint_locations): Change sals parameters to use
6700         gdb::array_view.
6701         * cli/cli-cmds.c (edit_command, list_command): Update to use
6702         std::vector and gdb::array_view.
6703         (ambiguous_line_spec): Adjust to use gdb::array_view and
6704         range-for.
6705         (compare_symtabs): Rename to ...
6706         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6707         const reference and adjust.
6708         (filter_sals): Rewrite using std::vector and standard algorithms.
6709         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6710         (jump_command): Update to use std::vector.
6711         * linespec.c (struct linespec_state) <canonical_names>: Update
6712         comment.
6713         (add_sal_to_sals_basic): Delete.
6714         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6715         (decode_line_2, create_sals_line_offset)
6716         (convert_address_location_to_sals, convert_linespec_to_sals)
6717         (convert_explicit_location_to_sals, parse_linespec)
6718         (event_location_to_sals, decode_line_full, decode_line_1)
6719         (decode_line_with_current_source)
6720         (decode_line_with_last_displayed, decode_objc)
6721         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6722         (linespec_result::~linespec_result): Adjust to use std::vector
6723         instead of symtabs_and_lines.
6724         * linespec.h (linespec_sals::sals): Now a std::vector.
6725         (struct linespec_result): Use std::vector, bool, and in-class
6726         initialization.
6727         (decode_line_1, decode_line_with_current_source)
6728         (decode_line_with_last_displayed): Return std::vector.
6729         * macrocmd.c (info_macros_command): Use std::vector.
6730         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6731         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6732         std::vector.
6733         * probe.h (parse_probes): Return a std::vector.
6734         * python/python.c (gdbpy_decode_line): Use std::vector and
6735         gdb::array_view.
6736         * source.c (select_source_symtab, line_info): Use std::vector.
6737         * stack.c (func_command): Use std::vector.
6738         * symtab.h (struct symtabs_and_lines): Delete.
6739         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6740
6741 2017-09-04  Pedro Alves  <palves@redhat.com>
6742
6743         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6744         unittests/array-view-selftests.c.
6745         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6746         * common/array-view.h: New file.
6747         * unittests/array-view-selftests.c: New file.
6748
6749 2017-09-04  Pedro Alves  <palves@redhat.com>
6750
6751         * cli/cli-cmds.c (edit_command): Pass message to
6752         ambiguous_line_spec.
6753         (list_command): Pass message to ambiguous_line_spec.  Say
6754         "first"/"last" instead of "start" and "end" to be consistent with
6755         the manual.
6756         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6757         them to print formatted message.
6758
6759 2017-09-04  Pedro Alves  <palves@redhat.com>
6760
6761         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6762         ftrace_update_insns by reference instead of pointer.
6763
6764 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6765
6766         * i386-go32-tdep.c: Include x86-xstate.h.
6767         (i386_go32_init_abi): Call i386_target_description.
6768         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6769         if xcr0 is X86_XSTATE_X87_MASK.
6770         * i386-tdep.h (tdesc_i386): Remove the declaration.
6771         (tdesc_i386_mmx): Likewise.
6772
6773 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6774
6775         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6776         X86_XSTATE_SSE_MASK instead of 0.
6777
6778 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6779
6780         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6781         i386_target_description.
6782         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6783         i386_target_description.
6784         * i386-tdep.c (i386_gdbarch_init): Likewise.
6785
6786 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6787
6788         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6789         (x86_darwin_init_abi_64): Call amd64_target_description.
6790         * amd64-dicos-tdep.c: Likewise.
6791         * amd64-fbsd-nat.c: Likewise.
6792         * amd64-fbsd-tdep.c: Likewise.
6793         * amd64-nbsd-tdep.c: Likewise.
6794         * amd64-obsd-tdep.c: Likewise.
6795         * amd64-sol2-tdep.c: Likewise.
6796         * amd64-windows-tdep.c: Likewise.
6797         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6798
6799 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6800
6801         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6802         (btrace_function) <insn>: Change type to use std::vector.
6803         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6804         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6805         ftrace_update_insns, ftrace_compute_global_level_offset,
6806         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6807         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6808         change to std::vector.
6809         (ftrace_update_insns): Adjust to change to std::vector, change
6810         type of INSN parameter.
6811         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6812         * record-btrace.c (btrace_call_history_insn_range,
6813         btrace_compute_src_line_range,
6814         record_btrace_frame_prev_register): Adjust to change to
6815         std::vector.
6816         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6817         to change to std::vector.
6818
6819 2017-09-03  Tom Tromey  <tom@tromey.com>
6820
6821         * corefile.c (reopen_exec_file): Use std::string.
6822
6823 2017-09-03  Tom Tromey  <tom@tromey.com>
6824
6825         * compile/compile.c (compile_register_name_mangled): Return
6826         std::string.
6827         * compile/compile-loc2c.c (pushf_register_address): Update.
6828         (pushf_register): Update.
6829         * compile/compile-c-types.c (convert_array): Update.
6830         * compile/compile-c-symbols.c (generate_vla_size): Update.
6831         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6832         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6833         (convert_one_symbol): Update.
6834         (generate_c_for_for_one_variable): Update.
6835         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6836         std::string.
6837         (generate_register_struct): Update.
6838         * compile/compile-internal.h (c_get_range_decl_name): Return a
6839         std::string.
6840         (compile_register_name_mangled): Return std::string.
6841
6842 2017-09-03  Tom Tromey  <tom@tromey.com>
6843
6844         * utils.c (perror_string): Return a std::string.
6845         (throw_perror_with_name, perror_warning_with_name): Update.
6846
6847 2017-09-03  Tom Tromey  <tom@tromey.com>
6848
6849         * demangle.c (demangle_command): Use std::string,
6850         unique_xmalloc_ptr.
6851
6852 2017-09-03  Tom Tromey  <tom@tromey.com>
6853
6854         * cli/cli-setshow.c (do_set_command): Use std::string.
6855
6856 2017-09-03  Tom Tromey  <tom@tromey.com>
6857
6858         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6859
6860 2017-09-03  Tom Tromey  <tom@tromey.com>
6861
6862         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6863
6864 2017-09-03  Tom Tromey  <tom@tromey.com>
6865
6866         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6867         gdb::unique_xmalloc_ptr.
6868
6869 2017-09-03  Tom Tromey  <tom@tromey.com>
6870
6871         * thread.c (print_thread_info_1): Use string_printf.
6872         (thread_apply_command, thread_apply_all_command): Use
6873         std::string.
6874
6875 2017-09-03  Tom Tromey  <tom@tromey.com>
6876
6877         * valprint.c (val_print_string): Update.
6878         * gdbcore.h (memory_error_message): Return std::string.
6879         * corefile.c (memory_error_message): Return std::string.
6880         (memory_error): Update.
6881         * breakpoint.c (insert_bp_location): Update.
6882
6883 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6884
6885         * target/waitstatus.h (target_waitstatus_to_string): Change
6886         return type to std::string.
6887         * target/waitstatus.c (target_waitstatus_to_string): Return
6888         std::string.
6889         * target.h (target_waitstatus_to_string): Remove declaration.
6890         * infrun.c (resume, clear_proceed_status_thread,
6891         print_target_wait_results, do_target_wait, save_waitstatus,
6892         stop_all_threads): Adjust.
6893         * record-btrace.c (record_btrace_wait): Adjust.
6894         * target-debug.h
6895         (target_debug_print_struct_target_waitstatus_p): Adjust.
6896
6897 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6898
6899         PR gdb/22046
6900         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6901         detection.
6902
6903 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6904
6905         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6906         for setting/unsetting environment variables on the remote target.
6907         (New remote packets): Add entries for QEnvironmentHexEncoded,
6908         QEnvironmentUnset and QEnvironmentReset.
6909         * common/environ.c (gdb_environ::operator=): Extend method to
6910         handle m_user_set_env_list and m_user_unset_env_list.
6911         (gdb_environ::clear): Likewise.
6912         (match_var_in_string): Change type of first parameter from 'char
6913         *' to 'const char *'.
6914         (gdb_environ::set): Extend method to handle
6915         m_user_set_env_list and m_user_unset_env_list.
6916         (gdb_environ::unset): Likewise.
6917         (gdb_environ::clear_user_set_env): New method.
6918         (gdb_environ::user_set_envp): Likewise.
6919         (gdb_environ::user_unset_envp): Likewise.
6920         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6921         m_user_unset_env_list on move constructor/assignment.
6922         (unset): Add new default parameter 'update_unset_list = true'.
6923         (clear_user_set_env): New method.
6924         (user_set_envp): Likewise.
6925         (user_unset_envp): Likewise.
6926         (m_user_set_env_list): New std::set.
6927         (m_user_unset_env_list): Likewise.
6928         * common/rsp-low.c (hex2str): New function.
6929         (bin2hex): New overload for bin2hex function.
6930         * common/rsp-low.c (hex2str): New prototype.
6931         (str2hex): New overload prototype.
6932         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6933         QEnvironmentUnset and QEnvironmentReset.
6934         (remote_protocol_features): Add QEnvironmentHexEncoded,
6935         QEnvironmentUnset and QEnvironmentReset packets.
6936         (send_environment_packet): New function.
6937         (extended_remote_environment_support): Likewise.
6938         (extended_remote_create_inferior): Call
6939         extended_remote_environment_support.
6940         (_initialize_remote): Add QEnvironmentHexEncoded,
6941         QEnvironmentUnset and QEnvironmentReset packet configs.
6942         * unittests/environ-selftests.c (gdb_selftest_env_var):
6943         New variable.
6944         (test_vector_initialization): New function.
6945         (test_init_from_host_environ): Likewise.
6946         (test_reinit_from_host_environ): Likewise.
6947         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6948         Likewise.
6949         (test_unset_set_empty_vector): Likewise.
6950         (test_vector_clear): Likewise.
6951         (test_std_move): Likewise.
6952         (test_move_constructor):
6953         (test_self_move): Likewise.
6954         (test_set_unset_reset): Likewise.
6955         (run_tests): Rewrite in terms of the functions above.
6956
6957 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6958
6959         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6960         (adi_available): Use a temp variable of type CORE_ADDR as argument
6961         3 when calling target_auxv_search.
6962         (adi_normalize_address): Use masks and xor operators to calculate
6963         normalized address.
6964         (adi_read_versions, adi_write_versions, adi_print_versions)
6965         (do_examine, do_assign): Use paddress.
6966
6967 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6968
6969         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6970         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6971         out of loop and add supply of FIR.
6972         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6973         add collect of FIR.
6974
6975 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6976
6977         PR gdb/21827
6978         * cli/cli-script.c (define_command): Don't convert command name
6979         to lower case.
6980
6981 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6982
6983         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6984         Update all callers accordingly. Remove all code blocks handling
6985         the case where DISPP is not NULL.
6986
6987 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6988
6989         PR symtab/22003
6990         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6991         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6992         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6993
6994 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6995
6996         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6997         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6998         (read_comp_units_from_section): New parameter abbrev_section, use
6999         read_and_check_comp_unit_head, allocate signatured_type if needed.
7000         (create_all_comp_units): Update read_comp_units_from_section caller.
7001
7002 2017-08-23  Pedro Alves  <palves@redhat.com>
7003
7004         PR remote/21852
7005         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7006         to null_ptid and switch to thread without reading the registers
7007         after adding the inferior.
7008
7009 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7010
7011         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7012         compile-gcc.
7013         * compile/compile.c (compile_gcc, show_compile_gcc): New.
7014         (compile_to_object): Implement compile_gcc.
7015         (_initialize_compile): Install "set compile-gcc".  Initialize
7016         compile_gcc.
7017
7018 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
7019
7020         * compile/compile.c (compile_to_object): Conditionally call
7021         set_verbose.  Conditionally call compile or compile_v0.
7022
7023 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
7024
7025         * sparc64-tdep.h: (adi_normalize_address): New export.
7026         * sparc-nat.h: (open_adi_tag_fd): New export.
7027         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7028         * sparc64-linux-tdep.c:
7029         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7030         (sparc64_linux_handle_segmentation_fault): New function.
7031         (sparc64_linux_init_abi): Register
7032         sparc64_linux_handle_segmentation_fault
7033         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7034         (sparc64_addr_bits_remove): New function.
7035         (sparc64_init_abi): Register sparc64_addr_bits_remove.
7036         (MAX_PROC_NAME_SIZE): New macro.
7037         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7038         (sparc64adilist): New variable.
7039         (adi_proc_list): New variable.
7040         (find_adi_info): New function.
7041         (add_adi_info): New function.
7042         (get_adi_info_proc): New function.
7043         (get_adi_info): New function.
7044         (info_adi_command): New function.
7045         (read_maps_entry): New function.
7046         (adi_available): New function.
7047         (adi_normalize_address): New function.
7048         (adi_align_address): New function.
7049         (adi_convert_byte_count): New function.
7050         (adi_tag_fd): New function.
7051         (adi_is_addr_mapped): New function.
7052         (adi_read_versions): New function.
7053         (adi_write_versions): New function.
7054         (adi_print_versions): New function.
7055         (do_examine): New function.
7056         (do_assign): New function.
7057         (adi_examine_command): New function.
7058         (adi_assign_command): New function.
7059         (_initialize_sparc64_adi_tdep): New function.
7060
7061 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7062
7063         * breakpoint.c (breakpoints_info): Rename to ...
7064         (info_breakpoints_command): ... this.
7065         (watchpoints_info): Rename to ...
7066         (info_watchpoints_command): ... this.
7067         (tracepoints_info): Rename to ...
7068         (info_tracepoints_command): ... this.
7069         (_initialize_breakpoint): Adjust.
7070         * dcache.c (dcache_info): Rename to ...
7071         (info_display_command): ... this.
7072         (_initialize_dcache): Adjust.
7073         * frame.h (args_info): Rename to ...
7074         (info_args_command): ... this.
7075         (locals_info): Rename to ...
7076         (info_locals_command): ... this.
7077         * infcmd.c (nofp_registers_info): Rename to ...
7078         (info_registers_command): ... this.
7079         (float_info): Rename to ...
7080         (info_float_command): ... this.
7081         (program_info): Rename to ...
7082         (info_program_command): ... this.
7083         (all_registers_info): Rename to ...
7084         (info_all_registers_command): ... this.
7085         (vector_info): Rename to ...
7086         (info_vector_command): ... this.
7087         (float_info): Rename to ...
7088         (info_float_command): ... this.
7089         (_initialize_infcmd): Adjust.
7090         * inferior.h (term_info): Rename to ...
7091         (info_terminal_command): ... this.
7092         * inflow.c (term_info): Rename to ...
7093         (info_terminal_command): ... this.
7094         (_initialize_inflow): Adjust.
7095         * infrun.c (signals_info): Rename to ...
7096         (info_signals_command): ... this.
7097         (_initialize_infrun): Adjust.
7098         * objc-lang.c (classes_info): Rename to ...
7099         (info_classes_command): ... this.
7100         (selectors_info): Rename to ...
7101         (info_selectors_command): ... this.
7102         (_initialize_objc_language): Adjust.
7103         * printcmd.c (sym_info): Rename to ...
7104         (info_symbol_command): ... this.
7105         (address_info): Rename to ...
7106         (info_address_command): ... this.
7107         (display_info): Rename to ...
7108         (info_display_command): ... this.
7109         (_initialize_printcmd): Adjust.
7110         * reverse.c (bookmarks_info): Rename to ...
7111         (info_breakpoints_command): ... this.
7112         (_initialize_reverse): Adjust.
7113         * ser-go32.c (dos_info): Rename to ...
7114         (info_serial_command): ... this.
7115         (_initialize_ser_dos): Adjust.
7116         * skip.c (skip_info): Rename to ...
7117         (info_skip_command): ... this.
7118         (_initialize_step_skip): Adjust.
7119         * source.c (line_info): Rename to ...
7120         (info_line_command): ... this.
7121         (source_info): Rename to ...
7122         (info_source_command)
7123         * stack.c (frame_info): Rename to ...
7124         (info_frame_command): ... this.
7125         (locals_info): Rename to ...
7126         (info_locals_command): ... this.
7127         (args_info): Rename to ...
7128         (info_args_command): ... this.
7129         (_initialize_stack): Adjust.
7130         * symtab.c (sources_info): Rename to ...
7131         (info_sources_command): ... this.
7132         (variables_info): Rename to ...
7133         (info_variables_command): ... this.
7134         (functions_info): Rename to ...
7135         (info_functions_command): ... this.
7136         (types_info): Rename to ...
7137         (info_types_command): ... this.
7138         (_initialize_symtab): Adjust.
7139         * target.c (target_info): Rename to ...
7140         (info_target_command): ... this.
7141         (initialize_targets): Adjust.
7142         * tracepoint.c (tvariables_info): Rename to ...
7143         (info_tvariables_command): ... this.
7144         (scope_info): Rename to ...
7145         (info_scope_command): ... this.
7146         (trace_dump_actions): Adjust.
7147         (_initialize_tracepoint): Adjust.
7148
7149 2017-08-22  Tom Tromey  <tom@tromey.com>
7150
7151         * breakpoint.h (install_breakpoint): Update.
7152         * breakpoint.c (add_solib_catchpoint): Update.
7153         (install_breakpoint): Change argument to a std::unique_ptr.
7154         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7155         (create_breakpoint_sal, create_breakpoint): Update.
7156         (watch_command_1, catch_exec_command_1)
7157         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7158         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7159         Return the breakpoint.
7160         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7161         (new_single_step_breakpoint): Update.
7162         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7163         std::unique_ptr.
7164         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7165         std::unique_ptr.
7166         * break-catch-sig.c (create_signal_catchpoint): Use
7167         std::unique_ptr.
7168         * ada-lang.c (create_ada_exception_catchpoint): Use
7169         std::unique_ptr.
7170
7171 2017-08-22  Tom Tromey  <tom@tromey.com>
7172
7173         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7174
7175 2017-08-22  Tom Tromey  <tom@tromey.com>
7176
7177         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7178         (lookup_partial_symbol): Update.
7179
7180 2017-08-22  Tom Tromey  <tom@tromey.com>
7181
7182         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7183         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7184         (find_and_open_source, symtab_to_fullname): Update.
7185         * psymtab.c (psymtab_to_fullname): Update.
7186
7187 2017-08-22  Tom Tromey  <tom@tromey.com>
7188
7189         * exec.c (exec_file_attach): Update.
7190         * linux-thread-db.c (try_thread_db_load): Update.
7191         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7192         * utils.c (gdb_realpath): Change return type.
7193         (gdb_realpath_keepfile): Update.
7194         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7195         (_initialize_utils): Register the new self test.
7196         * source.c (openp): Update.
7197         (find_and_open_source): Update.
7198         * nto-tdep.c (nto_find_and_open_solib): Update.
7199         * main.c (set_gdb_data_directory): Update.
7200         (captured_main_1): Update.
7201         * dwarf2read.c (dwarf2_get_dwz_file): Update
7202         (dw2_map_symbol_filenames): Update.
7203         * auto-load.c (auto_load_safe_path_vec_update): Update.
7204         (filename_is_in_auto_load_safe_path_vec): Change type of
7205         "filename_realp".
7206         (auto_load_objfile_script): Update.
7207         (file_is_auto_load_safe): Update.  Use std::string.
7208         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7209
7210 2017-08-22  Tom Tromey  <tom@tromey.com>
7211
7212         * utils.c (gdb_realpath_keepfile): Return a
7213         gdb::unique_xmalloc_ptr.
7214         * exec.c (exec_file_attach): Update.
7215         * utils.h (gdb_realpath_keepfile): Return a
7216         gdb::unique_xmalloc_ptr.
7217
7218 2017-08-22  Tom Tromey  <tom@tromey.com>
7219
7220         * compile/compile.c (compile_file_command): Use
7221         gdb::unique_xmalloc_ptr, std::string.
7222         * utils.c (gdb_abspath): Change return type.
7223         * source.c (openp): Update.
7224         * objfiles.c (allocate_objfile): Update.
7225         * main.c (set_gdb_data_directory): Update.
7226         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7227
7228 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7229
7230         * cli-cmds.c (list_commands): List actual code around more than
7231         one location.
7232
7233 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7234
7235         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7236
7237 2017-08-21  Pedro Alves  <palves@redhat.com>
7238
7239         PR gdb/19487
7240         * c-exp.y (variable production): Handle function aliases.
7241         * minsyms.c (msymbol_is_text): New function.
7242         * minsyms.h (msymbol_is_text): Declare.
7243         * symtab.c (find_function_alias_target): New function.
7244         * symtab.h (find_function_alias_target): Declare.
7245
7246 2017-08-21  Pedro Alves  <palves@redhat.com>
7247
7248         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7249         typedefs.
7250         * typeprint.c (whatis_exp): If handling "whatis", and expression
7251         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7252         typedefs here.
7253         * valops.c (value_cast): Save "to" type before resolving
7254         stubs/typedefs.  Use that type as resulting value's type.
7255
7256 2017-08-18  Tom Tromey  <tom@tromey.com>
7257             Pedro Alves  <palves@redhat.com>
7258
7259         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7260         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7261         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7262         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7263         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7264         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7265         (linux_get_siginfo_data): Add "thread" argument.  Use
7266         scoped_restore.
7267         * linux-nat.c (linux_child_follow_fork)
7268         (check_stopped_by_watchpoint): Use scoped_restore.
7269         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7270         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7271         (restore_inferior_ptid, save_inferior_ptid): Remove.
7272         * btrace.c (btrace_fetch): Use scoped_restore.
7273         * bsd-uthread.c (bsd_uthread_fetch_registers)
7274         (bsd_uthread_store_registers): Use scoped_restore.
7275         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7276         scoped_restore.
7277         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7278         (aix_thread_xfer_partial): Use scoped_restore.
7279         * inferior.h (save_inferior_ptid): Remove.
7280
7281 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7282
7283         PR tdep/21818
7284         * arm-tdep.c (gdb_print_insn_arm): Mark
7285         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7286
7287 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7288
7289         * NEWS: Mention GDBserver's new option "--selftest".
7290         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7291         * selftest.c: Move it to common/selftest.c.
7292         * selftest.h: Move it to common/selftest.h.
7293         * selftest-arch.c (reset): New function.
7294         (tests_with_arch): Call reset.
7295
7296 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7297
7298         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7299         instead of exception_fprintf and printf_filtered.
7300
7301 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7302
7303         * selftest.c (register_self_test): Rename it to
7304         selftests::register_test.
7305         (run_self_tests): selftest::run_tests.
7306         * selftest.h: Update declarations.
7307         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7308         selftests::register_test_foreach_arch.
7309         * selftest-arch.h: Update declaration.
7310         * aarch64-tdep.c: Update.
7311         * arm-tdep.c: Likewise.
7312         * disasm-selftests.c: Likewise.
7313         * dwarf2loc.c: Likewise.
7314         * dwarf2-frame.c: Likewise.
7315         * findvar.c: Likewise.
7316         * gdbarch-selftests.c: Likewise.
7317         * maint.c (maintenance_selftest): Likewise.
7318         * regcache.c: Likewise.
7319         * rust-exp.y: Likewise.
7320         * selftest-arch.c: Likewise.
7321         * unittests/environ-selftests.c: Likewise.
7322         * unittests/function-view-selftests.c: Likewise.
7323         * unittests/offset-type-selftests.c: Likewise.
7324         * unittests/optional-selftests.c: Likewise.
7325         * unittests/scoped_restore-selftests.c: Likewise.
7326         * utils-selftests.c: Likewise.
7327
7328 2017-08-17  Pedro Alves  <palves@redhat.com>
7329
7330         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7331         local.
7332
7333 2017-08-17  Pedro Alves  <palves@redhat.com>
7334
7335         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7336         field.
7337         (reset_die_in_process): Delete, replaced by ...
7338         (process_die_scope): ... this new class.  Make it responsible for
7339         freeing cu->line_header too.
7340         (process_die): Use process_die_scope.
7341         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7342         cu->line_header_die_owner.  Don't release the line header if it's
7343         owned by the CU.
7344         (setup_type_unit_groups): Make the CU/DIE own the line header.
7345         Don't release the line header here.
7346
7347 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7348
7349         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7350
7351 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7352
7353         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7354         Single-Key mode
7355
7356 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7357
7358         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7359         mode command list.
7360
7361 2017-08-15  Stafford Horne  <shorne@gmail.com>
7362
7363         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7364
7365 2017-08-15  Stafford Horne  <shorne@gmail.com>
7366
7367         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7368
7369 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7370
7371         PR gdb/21954
7372         * infcmd.c (unset_environment_command): Use the 'clear' method on
7373         the environment instead of resetting it.
7374
7375 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7376
7377         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7378         platforms.
7379
7380 2017-08-14  Tom Tromey  <tom@tromey.com>
7381
7382         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7383         (print_binary_chars): Likewise.
7384         (BITS_IN_BYTES): Remove.
7385
7386 2017-08-14  Tom Tromey  <tom@tromey.com>
7387
7388         PR gdb/21675
7389         * valprint.c (LOW_ZERO): Change value to 034.
7390         (print_octal_chars): Add static_asserts for octal constants.
7391         * printcmd.c (print_scalar_formatted): Add 'd' case.
7392
7393 2017-08-11  Tom Tromey  <tom@tromey.com>
7394
7395         * symfile.c (add_symbol_file_command): Use std::vector.
7396
7397 2017-08-14  Tom Tromey  <tom@tromey.com>
7398
7399         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7400         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7401         std::move.
7402         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7403
7404 2017-08-11  Pedro Alves  <palves@redhat.com>
7405
7406         * infrun.c (process_event_stop_test): Adjust
7407         function_name_is_marked_for_skip call.
7408         * skip.c: Include <list>.
7409         (skiplist_entry): Make it a class with private fields, and
7410         getters/setters.
7411         (skiplist_entry_chain): Delete.
7412         (skiplist_entries): New.
7413         (skiplist_entry_count): Delete.
7414         (highest_skiplist_entry_num): New.
7415         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7416         (add_skiplist_entry): Delete.
7417         (skiplist_entry::skiplist_entry): New.
7418         (skiplist_entry::add_entry): New.
7419         (skip_file_command, skip_function): Adjust.
7420         (compile_skip_regexp): Delete.
7421         (skip_command): Don't compile regexp here.  Adjust to use
7422         skiplist_entry::add_entry.
7423         (skip_info): Adjust to use range-for and getters.
7424         (skip_enable_command, skip_disable_command): Adjust to use
7425         range-for and setters.
7426         (skip_delete_command): Adjust to use std::list.
7427         (add_skiplist_entry): Delete.
7428         (skip_file_p): Delete, refactored as ...
7429         (skiplist_entry::do_skip_file_p): ... this new method.
7430         (skip_gfile_p): Delete, refactored as ...
7431         (skiplist_entry::do_gskip_file_p): ... this new method.
7432         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7433         (skiplist_entry::skip_function_p): ... this new method.
7434         (function_name_is_marked_for_skip): Now returns bool, and takes
7435         the function sal by const reference.  Adjust to use range-for and
7436         skiplist_entry methods.
7437         (_initialize_step_skip): Remove references to
7438         skiplist_entry_chain, skiplist_entry_count.
7439         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7440         takes the function sal by const reference.
7441
7442 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7443
7444         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7445         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7446         (dwarf2_frame_cache):
7447         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7448         RETURN_MASK_ALL and set *this_case to NULL.
7449         * frame-unwind.h: Update comments.
7450
7451 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7452
7453         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7454         (dwarf2_frame_state_copy_regs): Remove.
7455         (dwarf2_frame_state_free_regs): Remove.
7456         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7457         (dwarf2_restore_rule): Call method .alloc_regs instead of
7458         dwarf2_frame_state_alloc_regs.
7459         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7460         constructor.  Call std::move.
7461         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7462         (dwarf2_frame_cache): Likewise.
7463
7464         [GDB_SELF_TEST]: Include selftest.h and
7465         selftest-arch.h.
7466         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7467         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7468         execute_cfa_program_test.
7469
7470         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7471         copy ctor, assignment operator, move assignment.
7472         <alloc_regs>: New method.
7473         <swap>: New method.
7474         (struct dwarf2_frame_state): Delete dtor.
7475         (dwarf2_frame_state_alloc_regs): Remove declaration.
7476         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7477         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7478
7479 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7480
7481         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7482         (dwarf2_frame_state::dwarf2_frame_state): New.
7483         (dwarf2_frame_state::~dwarf2_frame_state): New.
7484         (dwarf2_fetch_cfa_info): Update.
7485         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7486         rather than a pointer.  Update code.
7487         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7488         dtor.
7489         <data_align, code_align, retaddr_column>: Change them to const.
7490         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7491         to bool.
7492
7493 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7494
7495         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7496         <loc.exp>: New field.
7497         * dwarf2-frame.c (execute_cfa_program): Update.
7498         (dwarf2_frame_prev_register): Update.
7499
7500 2017-08-10  Pedro Alves  <palves@redhat.com>
7501
7502         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7503
7504 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7505
7506         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7507         (fbsd_pending_children): Use std::list.
7508         (fbsd_remember_child): Likewise.
7509         (fbsd_is_child_pending): Likewise.
7510         (fbsd_pending_vfork_done): Use std::forward_list.
7511         (fbsd_add_vfork_done): Likewise.
7512         (fbsd_is_vfork_done_pending): Likewise.
7513         (fbsd_next_vfork_done): Likewise.
7514
7515 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7516
7517         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7518         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7519         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7520         for `mapfilename'.
7521         (fbsd_xfer_partial): Use gdb::byte_vector.
7522         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7523
7524 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7525
7526         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7527         "filestuff.h".
7528         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7529
7530 2017-08-09  Tom Tromey  <tom@tromey.com>
7531
7532         * skip.c (skiplist_entry): New constructor.
7533         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7534         (skiplist_entry::file_is_glob): Now bool.
7535         (skiplist_entry::file, skiplist_entry::function): Now
7536         std::string.
7537         (make_skip_entry): Return a unique_ptr.  Use new.
7538         (free_skiplist_entry, free_skiplist_entry_cleanup)
7539         (make_free_skiplist_entry_cleanup): Remove.
7540         (skip_command, skip_disable_command, add_skiplist_entry)
7541         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7542         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7543         (function_name_is_marked_for_skip): Update.
7544         (skip_delete_command): Update.  Use delete.
7545
7546 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7547
7548         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7549         (aarch64_linux_core_read_description): New function.
7550         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7551
7552 2017-08-09  Pedro Alves  <palves@redhat.com>
7553
7554         * cp-name-parser.y (cp_comp_to_string): Return a
7555         gdb::unique_xmalloc_ptr<char>.
7556         * cp-support.c (replace_typedefs_qualified_name)
7557         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7558         (cp_canonicalize_string_full): Use op= instead of explicit
7559         convertion.
7560         (cp_class_name_from_physname, method_name_from_physname)
7561         (cp_func_name, cp_remove_params): Adjust to use
7562         gdb::unique_xmalloc_ptr<char>.
7563         * cp-support.h (cp_comp_to_string): Return a
7564         gdb::unique_xmalloc_ptr<char>.
7565         * python/py-type.c (typy_lookup_type): Adjust to use
7566         gdb::unique_xmalloc_ptr<char>.
7567
7568 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7569
7570         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7571
7572 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7573             Yao Qi  <yao.qi@linaro.org>
7574
7575         * cp-support.c (cp_canonicalize_string_full): Use
7576         gdb::unique_xmalloc_ptr<char>.
7577         (cp_canonicalize_string): Likewise.
7578
7579 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7580
7581         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7582         * regformats/i386/amd64-avx-avx512.dat: Remove.
7583         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7584         * regformats/i386/amd64-avx-mpx.dat:Remove.
7585         * regformats/i386/amd64-avx.dat: Remove.
7586         * regformats/i386/amd64-mpx.dat: Remove.
7587         * regformats/i386/i386-avx-avx512.dat: Remove.
7588         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7589         * regformats/i386/i386-avx-mpx.dat: Remove.
7590         * regformats/i386/i386-mmx.dat: Remove.
7591         * regformats/i386/i386-mpx.dat: Remove.
7592
7593 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7594
7595         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7596         * amd64-tdep.c: Don't include features/i386/x32*.c.
7597         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7598         functions.
7599         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7600         and i386/x32-avx-avx512.
7601         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7602         and i386/x32.xml.
7603         * features/i386/x32-avx-avx512.c: Removed.
7604         * features/i386/x32-avx-avx512.xml: Removed.
7605         * features/i386/x32-avx.c: Removed.
7606         * features/i386/x32-avx.xml: Removed.
7607         * features/i386/x32.c: Removed.
7608         * features/i386/x32.xml: Removed.
7609         * regformats/i386/x32-avx-avx512.dat: Removed.
7610         * regformats/i386/x32-avx.dat: Removed.
7611         * regformats/i386/x32.dat: Removed.
7612
7613 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7614
7615         PR breakpoints/21886
7616         * mem-break.c (default_memory_insert_breakpoint): Use
7617         `->placed_address' rather than `->reqstd_address' for the
7618         breakpoint location.
7619
7620 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7621
7622         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7623         assertions.
7624
7625 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7626
7627         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7628         a union of `tdep_info', `tdesc_data' and `id'.
7629         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7630         rather than `info.tdep_info'.
7631         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7632         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7633         * i386-tdep.c (i386_gdbarch_init): Likewise.
7634         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7635         * mips-tdep.c (mips_gdbarch_init): Likewise.
7636         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7637         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7638         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7639         `info.tdep_info'.
7640         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7641         `info.tdep_info'.
7642         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7643         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7644         `info.tdep_info'.
7645         * spu-tdep.c (spu_gdbarch_init): Likewise.
7646         * gdbarch.h: Regenerate.
7647
7648 2017-08-07  Leszek Swirski  <leszeks@google.com>
7649
7650         PR symtab/20899
7651         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7652
7653 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7654
7655         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7656         (gdbsim_open): Rename gdb_argv args object to argv.
7657
7658 2017-08-05  Tom Tromey  <tom@tromey.com>
7659
7660         * compile/compile-object-load.c (compile_object_load): Use
7661         gdb::unique_xmalloc_ptr.
7662         * cli/cli-dump.c (scan_filename): Rename from
7663         scan_filename_with_cleanup.  Change return type.
7664         (scan_expression): Rename from scan_expression_with_cleanup.
7665         Change return type.
7666         (dump_memory_to_file, dump_value_to_file, restore_command):
7667         Use gdb::unique_xmalloc_ptr.  Update.
7668         * cli/cli-cmds.c (find_and_open_script): Use
7669         gdb::unique_xmalloc_ptr.
7670         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7671         * symmisc.c (maintenance_print_symbols)
7672         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7673         * symfile.c (symfile_bfd_open, generic_load)
7674         (add_symbol_file_command, remove_symbol_file_command): Use
7675         gdb::unique_xmalloc_ptr.
7676         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7677         * psymtab.c (maintenance_print_psymbols): Use
7678         gdb::unique_xmalloc_ptr.
7679         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7680         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7681         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7682         (reload_shared_libraries_1): Likewise.
7683
7684 2017-08-05  Tom Tromey  <tom@tromey.com>
7685
7686         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7687         (rust_op_vector, rust_set_vector): New typedefs.
7688         (current_parser): New global.
7689         (work_obstack): Change to pointer type.  Update all users.
7690         (rust_ast, pstate): Remove globals.
7691         (struct rust_parser): New.
7692         (%union) <params, field_inits>: Change type.
7693         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7694         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7695         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7696         (convert_params_to_types, convert_params_to_expression): Change
7697         type of "params".
7698         (ast_string): Change type of "fields".
7699         (rust_parse): Make a rust_parser.  Remove cleanups.
7700         (rust_lex_tests): Make and install an auto_obstack.
7701
7702 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7703
7704         * configure.srv (ipa_x32_linux_regobj): New.
7705         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7706         instead of X86_TDESC_AVX512.
7707         (initialize_low_tracepoint): Call
7708         init_registers_x32_avx_avx512_linux.
7709
7710 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7711
7712         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7713
7714 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7715
7716         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7717
7718 2017-08-03  Tom Tromey  <tom@tromey.com>
7719
7720         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7721         Remove.
7722         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7723
7724 2017-08-03  Tom Tromey  <tom@tromey.com>
7725
7726         * python/py-param.c (compute_enum_values): Use gdb_argv.
7727
7728 2017-08-03  Tom Tromey  <tom@tromey.com>
7729
7730         * utils.h (struct gdb_argv_deleter): New.
7731         (gdb_argv): New class.
7732         * utils.c (gdb_argv::reset): New method.
7733         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7734         * tracefile.c (tsave_command): Use gdb_argv.
7735         * top.c (new_ui_command): Use gdb_argv.
7736         * symmisc.c (maintenance_print_symbols)
7737         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7738         * symfile.c (symbol_file_command, generic_load)
7739         (remove_symbol_file_command): Use gdb_argv.
7740         * stack.c (backtrace_command): Use gdb_argv.
7741         * source.c (add_path, show_substitute_path_command)
7742         (unset_substitute_path_command, set_substitute_path_command):
7743         Use gdb_argv.
7744         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7745         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7746         * remote.c (extended_remote_run, remote_put_command)
7747         (remote_get_command, remote_delete_command): Use gdb_argv.
7748         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7749         (gdbsim_open): Use gdb_argv.
7750         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7751         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7752         * procfs.c (procfs_info_proc): Use gdb_argv.
7753         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7754         * infrun.c (handle_command): Use gdb_argv.
7755         * inferior.c (add_inferior_command, clone_inferior_command):
7756         Use gdb_argv.
7757         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7758         * exec.c (exec_file_command): Use gdb_argv.
7759         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7760         * compile/compile.c (build_argc_argv): Use gdb_argv.
7761
7762 2017-08-03  Tom Tromey  <tom@tromey.com>
7763
7764         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7765
7766 2017-08-03  Tom Tromey  <tom@tromey.com>
7767
7768         * python/python.c (compute_python_string): Return std::string.
7769         (gdbpy_eval_from_control_command): Update.
7770         (do_start_initialization): Use std::string.
7771         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7772         xstrprintf.
7773         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7774         xstrprintf.
7775
7776 2017-08-03  Tom Tromey  <tom@tromey.com>
7777
7778         * top.h (do_restore_instream_cleanup): Remove.
7779         * top.c (do_restore_instream_cleanup): Remove.
7780         (read_command_file): Use scoped_restore.
7781         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7782
7783 2017-08-03  Tom Tromey  <tom@tromey.com>
7784
7785         * cli/cli-script.c (execute_user_command)
7786         (execute_control_command): Use scoped_restore.
7787
7788 2017-08-03  Tom Tromey  <tom@tromey.com>
7789
7790         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7791         (execute_user_command): Remove user_call_depth; use
7792         user_args_stack's size instead.
7793
7794 2017-08-03  Tom Tromey  <tom@tromey.com>
7795
7796         * top.h (in_user_command): Remove.
7797         * top.c (in_user_command): Remove.
7798         * cli/cli-script.c (do_restore_user_call_depth)
7799         (execute_user_command): Update.
7800
7801 2017-08-03  Tom Tromey  <tom@tromey.com>
7802
7803         * valops.c (search_struct_method): Use gdb::byte_vector.
7804         * valarith.c (value_concat): Use std::vector.
7805         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7806         (simple_search_memory): Likewise.
7807         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7808         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7809         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7810         * elfread.c (elf_rel_plt_read): Use std::string.
7811         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7812         * cli/cli-dump.c (restore_section_callback): Use
7813         gdb::byte_vector.
7814
7815 2017-08-03  Tom Tromey  <tom@tromey.com>
7816
7817         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7818
7819 2017-08-03  Tom Tromey  <tom@tromey.com>
7820
7821         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7822         (tui_register_format): Use scoped_restore.
7823
7824 2017-08-03  Tom Tromey  <tom@tromey.com>
7825
7826         * reverse.c (exec_direction_default): Remove.
7827         (exec_reverse_once): Use scoped_restore.
7828         * remote.c (restore_remote_timeout): Remove.
7829         (remote_flash_erase, remote_flash_write, remote_flash_done)
7830         (readchar, remote_serial_write): Use scoped_restore.
7831         * cli/cli-script.c (struct source_cleanup_lines_args)
7832         (source_cleanup_lines): Remove.
7833         (script_from_file): Use scoped_restore.
7834         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7835         (source_command): Use scoped_restore.
7836
7837 2017-08-03  Tom Tromey  <tom@tromey.com>
7838
7839         * utils.h (make_cleanup_free_so): Remove.
7840         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7841         * solist.h (struct so_deleter): New.
7842         (so_list_up): New typedef.
7843         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7844
7845 2017-08-03  Tom Tromey  <tom@tromey.com>
7846
7847         * utils.h (make_cleanup_restore_current_language): Remove.
7848         * utils.c (do_restore_current_language)
7849         (make_cleanup_restore_current_language): Remove.
7850         * parse.c (parse_exp_in_context_1)
7851         (parse_expression_with_language): Use
7852         scoped_restore_current_language.
7853         * mi/mi-main.c (mi_cmd_execute): Use
7854         scoped_restore_current_language.
7855         * language.h (scoped_restore_current_language): New class.
7856
7857 2017-08-03  Tom Tromey  <tom@tromey.com>
7858
7859         * compile/compile.c (cleanup_unlink_file): Remove.
7860         (compile_to_object): Use gdb::unlinker.
7861         (eval_compile_command): Likewise.
7862
7863 2017-08-03  Tom Tromey  <tom@tromey.com>
7864
7865         * utils.h (make_cleanup_fclose): Remove.
7866         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7867
7868 2017-08-03  Tom Tromey  <tom@tromey.com>
7869
7870         * top.c (open_terminal_stream): Return gdb_file_up.
7871         (new_ui_command): Update.
7872
7873 2017-08-03  Tom Tromey  <tom@tromey.com>
7874
7875         * source.c (print_source_lines_base, forward_search_command)
7876         (reverse_search_command): Use gdb_file_up.
7877
7878 2017-08-03  Tom Tromey  <tom@tromey.com>
7879
7880         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7881
7882 2017-08-03  Tom Tromey  <tom@tromey.com>
7883
7884         * cli/cli-cmds.c (find_and_open_script): Change return type.
7885         Remove "streamp" and "full_path" parameters.
7886         (source_script_with_search): Update.
7887         * auto-load.c (source_script_file): Update.
7888         * cli/cli-cmds.h (find_and_open_script): Change type.
7889         (open_script): New struct.
7890
7891 2017-08-03  Tom Tromey  <tom@tromey.com>
7892
7893         * xml-support.c (xml_fetch_content_from_file): Update.
7894         * ui-file.c (stdio_file::open): Update.
7895         * tracefile-tfile.c (tfile_start): Update.
7896         * remote.c (remote_file_put, remote_file_get): Update.
7897         * nat/linux-procfs.c (linux_proc_get_int)
7898         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7899         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7900         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7901         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7902         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7903         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7904         * linux-nat.c (linux_proc_pending_signals): Update.
7905         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7906         (file_closer): Remove.
7907         * compile/compile.c (compile_to_object): Update.
7908         * common/filestuff.h (struct gdb_file_deleter): New.
7909         (gdb_file_up): New typedef.
7910         (gdb_fopen_cloexec): Change return type.
7911         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7912         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7913         (dump_binary_file, restore_binary_file): Update.
7914         * auto-load.c (auto_load_objfile_script_1): Update.
7915
7916 2017-08-03  Tom Tromey  <tom@tromey.com>
7917
7918         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7919         (info_static_tracepoint_markers_command): Likewise.
7920         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7921         * skip.c (skip_info): Use ui_out_emit_table.
7922         * progspace.c (print_program_space): Use ui_out_emit_table.
7923         * osdata.c (info_osdata): Use ui_out_emit_table.
7924         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7925         ui_out_emit_table.
7926         * linux-thread-db.c (info_auto_load_libthread_db): Use
7927         ui_out_emit_table.
7928         * inferior.c (print_inferior): Use ui_out_emit_table.
7929         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7930         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7931         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7932         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7933         * ui-out.h (class ui_out_emit_table): New.
7934
7935 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7936
7937         * mips-tdep.c (mips_fpu_type_str): New function.
7938         (mips_dump_tdep): Call it.
7939
7940 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7941
7942         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7943         `->mips_fpu_type'.
7944
7945 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7946
7947         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7948
7949 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7950
7951         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7952
7953 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7954
7955         * cli/cli-cmds.c (maintenancechecklist): New variable.
7956         * gdbcmd.h (maintenancechecklist): Declare it.
7957         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7958         Call i386_linux_read_description with different masks.
7959         * maint.c (maintenance_check_command): New function.
7960         (_initialize_maint_cmds): Call add_prefix_cmd.
7961         * target-descriptions.c (tdesc_reg): override operator != and ==.
7962         (tdesc_type): Likewise.
7963         (tdesc_feature): Likewise.
7964         (target_desc): Likewise.
7965         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7966         (maintenance_check_xml_descriptions): New function.
7967         (_initialize_target_descriptions) Add command "xml-descriptions".
7968         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7969
7970 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7971
7972         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7973         Include features/i386/32bit-*.c.
7974         (i386_linux_read_description): Generate target description if it
7975         doesn't exist.
7976         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7977         functions.
7978         * features/i386/32bit-linux.c: Re-generated.
7979         * features/i386/32bit-sse.c: Likewise.
7980         * target-descriptions.c (print_c_feature::visit): Print code to
7981         set register number if needed.
7982         (print_c_feature) <m_next_regnum>: New field.
7983
7984 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7985
7986         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7987         (FEATURE_XMLFILES): New.
7988         (FEATURE_CFILES): New.
7989         New rules.
7990         (clean-cfiles): Remove generated c files.
7991         * features/i386/32bit-avx.c: Generated.
7992         * features/i386/32bit-avx512.c: Generated.
7993         * features/i386/32bit-core.c: Generated.
7994         * features/i386/32bit-linux.c: Generated.
7995         * features/i386/32bit-mpx.c: Generated.
7996         * features/i386/32bit-pkeys.c: Generated.
7997         * features/i386/32bit-sse.c: Generated.
7998         * target-descriptions.c: Include algorithm.
7999         (tdesc_element_visitor): Add method visit_end.
8000         (print_c_tdesc): Implement visit_end.
8001         (print_c_tdesc:: m_filename_after_features): Move it to
8002         protected.
8003         (print_c_feature): New class.
8004         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8005         name starts with "i386/32bit-".
8006
8007 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8008
8009         * target-descriptions.c (tdesc_element_visitor): New class.
8010         (tdesc_element): New class.
8011         (tdesc_reg): Inherit from tdesc_element.
8012         (tdesc_reg::accept): New function.
8013         (tdesc_type): Inherit from tdesc_element.
8014         (tdesc_type::accept): New function.
8015         (tdesc_feature): Inherit from tdesc_element.
8016         (tdesc_feature::accept): New function.
8017         (target_desc): Inherit from tdesc_element.
8018         (target_desc::target_desc): New.
8019         (target_desc::~target_desc): New.
8020         (target_desc::accept): New.
8021         (allocate_target_description): Use new.
8022         (free_target_description): Use delete.
8023         (print_c_tdesc): New class.
8024         (maint_print_c_tdesc_cmd): Adjust.
8025
8026         * features/aarch64.c: Re-generated.
8027         * features/arc-arcompact.c: Re-generated.
8028         * features/arc-v2.c: Re-generated.
8029         * features/arm/arm-with-iwmmxt.c: Re-generated.
8030         * features/arm/arm-with-m.c: Re-generated.
8031         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8032         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8033         * features/arm/arm-with-neon.c: Re-generated.
8034         * features/arm/arm-with-vfpv2.c: Re-generated.
8035         * features/arm/arm-with-vfpv3.c: Re-generated.
8036         * features/i386/amd64-avx-avx512.c: Re-generated.
8037         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8038         * features/i386/amd64-avx.c: Re-generated.
8039         * features/i386/amd64-avx-linux.c: Re-generated.
8040         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8041         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8042         * features/i386/amd64-avx-mpx.c: Re-generated.
8043         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8044         * features/i386/amd64.c: Re-generated.
8045         * features/i386/amd64-linux.c: Re-generated.
8046         * features/i386/amd64-mpx.c: Re-generated.
8047         * features/i386/amd64-mpx-linux.c: Re-generated.
8048         * features/i386/i386-avx-avx512.c: Re-generated.
8049         * features/i386/i386-avx-avx512-linux.c: Re-generated.
8050         * features/i386/i386-avx.c: Re-generated.
8051         * features/i386/i386-avx-linux.c: Re-generated.
8052         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8053         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8054         * features/i386/i386-avx-mpx.c: Re-generated.
8055         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8056         * features/i386/i386.c: Re-generated.
8057         * features/i386/i386-linux.c: Re-generated.
8058         * features/i386/i386-mmx.c: Re-generated.
8059         * features/i386/i386-mmx-linux.c: Re-generated.
8060         * features/i386/i386-mpx.c: Re-generated.
8061         * features/i386/i386-mpx-linux.c: Re-generated.
8062         * features/i386/x32-avx-avx512.c: Re-generated.
8063         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8064         * features/i386/x32-avx.c: Re-generated.
8065         * features/i386/x32-avx-linux.c: Re-generated.
8066         * features/i386/x32.c: Re-generated.
8067         * features/i386/x32-linux.c: Re-generated.
8068         * features/microblaze.c: Re-generated.
8069         * features/microblaze-with-stack-protect.c: Re-generated.
8070         * features/mips64-dsp-linux.c: Re-generated.
8071         * features/mips64-linux.c: Re-generated.
8072         * features/mips-dsp-linux.c: Re-generated.
8073         * features/mips-linux.c: Re-generated.
8074         * features/nds32.c: Re-generated.
8075         * features/nios2.c: Re-generated.
8076         * features/nios2-linux.c: Re-generated.
8077         * features/rs6000/powerpc-32.c: Re-generated.
8078         * features/rs6000/powerpc-32l.c: Re-generated.
8079         * features/rs6000/powerpc-403.c: Re-generated.
8080         * features/rs6000/powerpc-403gc.c : Re-generated.
8081         * features/rs6000/powerpc-405.c: Re-generated.
8082         * features/rs6000/powerpc-505.c: Re-generated.
8083         * features/rs6000/powerpc-601.c: Re-generated.
8084         * features/rs6000/powerpc-602.c: Re-generated.
8085         * features/rs6000/powerpc-603.c: Re-generated.
8086         * features/rs6000/powerpc-604.c: Re-generated.
8087         * features/rs6000/powerpc-64.c: Re-generated.
8088         * features/rs6000/powerpc-64l.c: Re-generated.
8089         * features/rs6000/powerpc-7400.c: Re-generated.
8090         * features/rs6000/powerpc-750.c: Re-generated.
8091         * features/rs6000/powerpc-860.c: Re-generated.
8092         * features/rs6000/powerpc-altivec32.c: Re-generated.
8093         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8094         * features/rs6000/powerpc-altivec64.c: Re-generated.
8095         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8096         * features/rs6000/powerpc-cell32l.c: Re-generated.
8097         * features/rs6000/powerpc-cell64l.c: Re-generated.
8098         * features/rs6000/powerpc-e500.c: Re-generated.
8099         * features/rs6000/powerpc-e500l.c: Re-generated.
8100         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8101         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8102         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8103         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8104         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8105         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8106         * features/rs6000/powerpc-vsx32.c: Re-generated.
8107         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8108         * features/rs6000/powerpc-vsx64.c: Re-generated.
8109         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8110         * features/rs6000/rs6000.c: Re-generated.
8111         * features/s390-linux32.c: Re-generated.
8112         * features/s390-linux32v1.c: Re-generated.
8113         * features/s390-linux32v2.c: Re-generated.
8114         * features/s390-linux64.c: Re-generated.
8115         * features/s390-linux64v1.c: Re-generated.
8116         * features/s390-linux64v2.c: Re-generated.
8117         * features/s390-te-linux64.c: Re-generated.
8118         * features/s390-tevx-linux64.c: Re-generated.
8119         * features/s390-vx-linux64.c: Re-generated.
8120         * features/s390x-linux64.c: Re-generated.
8121         * features/s390x-linux64v1.c: Re-generated.
8122         * features/s390x-linux64v2.c: Re-generated.
8123         * features/s390x-te-linux64.c: Re-generated.
8124         * features/s390x-tevx-linux64.c: Re-generated.
8125         * features/s390x-vx-linux64.c: Re-generated.
8126         * features/sparc/sparc32-solaris.c: Re-generated.
8127         * features/sparc/sparc64-solaris.c: Re-generated.
8128         * features/tic6x-c62x.c: Re-generated.
8129         * features/tic6x-c62x-linux.c: Re-generated.
8130         * features/tic6x-c64x.c: Re-generated.
8131         * features/tic6x-c64x-linux.c: Re-generated.
8132         * features/tic6x-c64xp.c: Re-generated.
8133         * features/tic6x-c64xp-linux.c: Re-generated.
8134
8135 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8136
8137         * i386-linux-tdep.c (i386_linux_read_description): New function.
8138         (i386_linux_core_read_description): Call
8139         i386_linux_read_description.
8140         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8141         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8142         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8143         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8144         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8145         * x86-linux-nat.c (x86_linux_read_description): Call
8146         i386_linux_read_description.
8147
8148 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8149
8150         * NEWS: Mention it.
8151         * features/Makefile (%.c: %.xml): Pass the xml file name to
8152         command "maint print c-tdesc".
8153         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8154         name from 'arg'.
8155
8156 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8157
8158         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8159         in-class initialization.
8160         (tdesc_create_feature): Call new instead of XCNEW.
8161         (free_target_description): Ue delete.
8162
8163 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8164
8165         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8166
8167 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8168
8169         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8170         constant.
8171         (amd64_x32_init_abi): Likewise.
8172         * amd64-tdep.h (amd64_init_abi): Update declaration.
8173         (amd64_x32_init_abi): Likewise.
8174
8175 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8176
8177         PR tdep/21717
8178         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8179         condition for FPSCR.
8180         (arm_linux_store_inferior_registers): Likewise.
8181
8182 2017-07-22  Tom Tromey  <tom@tromey.com>
8183
8184         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8185         <syscalls_counts>: Now a std::vector.
8186         (get_catch_syscall_inferior_data): Use "new".
8187         (catch_syscall_inferior_data_cleanup): Use "delete".
8188         (insert_catch_syscall, remove_catch_syscall)
8189         (clear_syscall_counts): Update.
8190
8191 2017-07-22  Tom Tromey  <tom@tromey.com>
8192
8193         * break-catch-syscall.c (syscall_catchpoint)
8194         <syscalls_to_be_caught>: Now a std::vector<int>
8195         (~syscall_catchpoint): Remove.
8196         (insert_catch_syscall, remove_catch_syscall)
8197         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8198         (print_mention_catch_syscall, print_recreate_catch_syscall):
8199         Update.
8200         (create_syscall_event_catchpoint): Change type of "filter"
8201         parameter.
8202         (catch_syscall_split_args): Return a std::vector.
8203         (catch_syscall_command_1, catching_syscall_number_1): Update.
8204
8205 2017-07-22  Tom Tromey  <tom@tromey.com>
8206
8207         * break-catch-throw.c (struct exception_catchpoint)
8208         <exception_rx>: Now a std::string.
8209         (~exception_catchpoint): Remove.
8210         (print_one_detail_exception_catchpoint): Update.
8211         (handle_gnu_v3_exceptions): Change type of except_rx.
8212         (extract_exception_regexp): Return a std::string.
8213         (catch_exception_command_1): Update.
8214
8215 2017-07-22  Tom Tromey  <tom@tromey.com>
8216
8217         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8218         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8219         std::vector.
8220         <catch_all>: Now a bool.
8221         (~signal_catchpoint): Remove.
8222         (signal_catchpoint_insert_location)
8223         (signal_catchpoint_remove_location)
8224         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8225         (signal_catchpoint_print_mention)
8226         (signal_catchpoint_print_recreate)
8227         (signal_catchpoint_explains_signal): Update.
8228         (create_signal_catchpoint): Change type of "filter" and
8229         "catch_all".
8230         (catch_signal_split_args): Return a std::vector.  Change type of
8231         "catch_all".
8232         (catch_signal_command): Update.
8233
8234 2017-07-20  Pedro Alves  <palves@redhat.com>
8235
8236         * ada-lang.c (ada_language_defn): Make extern.
8237         (_initialize_ada_language): Remove add_language call.
8238         * c-lang.c (c_language_defn, cplus_language_defn)
8239         (asm_language_defn, minimal_language_defn): Make extern.
8240         (_initialize_c_language): Delete.
8241         * completer.c (compare_cstrings): Delete, moved to utils.h.
8242         * d-lang.c (d_language_defn): Make extern.
8243         (_initialize_d_language): Remove add_language calls.
8244         * defs.h (enum language): Add comment.
8245         * f-lang.c (f_language_defn): Make extern.
8246         (_initialize_f_language): Remove add_language call.
8247         * go-lang.c (go_language_defn): Make extern.
8248         (_initialize_go_language): Remove add_language call.
8249         * language.c: Include <algorithm>.
8250         (languages): Redefine as const array.
8251         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8252         (set_language_command): Handle "local".  Use for-range loop.
8253         (set_language): Remove loop.
8254         (language_enum): Rewrite.
8255         (language_def, language_str): Remove loops.
8256         (add_language): Delete.
8257         (add_set_language_command): New, based on add_languages.
8258         (skip_language_trampoline): Adjust.
8259         (local_language_defn): Delete.
8260         (language_gdbarch_post_init): Adjust.
8261         (_initialize_language): Remove add_language calls.  Call
8262         add_set_language_command.
8263         * language.h (add_language): Delete.
8264         (auto_language_defn)
8265         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8266         (asm_language_defn, c_language_defn, cplus_language_defn)
8267         (d_language_defn, f_language_defn, go_language_defn)
8268         (m2_language_defn, objc_language_defn, opencl_language_defn)
8269         (pascal_language_defn, rust_language_defn): Declare.
8270         * m2-lang.c (m2_language_defn): Make extern.
8271         (_initialize_m2_language): Remove add_language call.
8272         * objc-lang.c (objc_language_defn): Make extern.
8273         (_initialize_objc_language): Remove add_language call.
8274         * opencl-lang.c (opencl_language_defn): Make extern.
8275         (_initialize_opencl_language): Remove add_language call.
8276         * p-lang.c (pascal_language_defn): Make extern.
8277         (_initialize_pascal_language): Delete.
8278         * rust-lang.c (rust_language_defn): Make extern.
8279         (_initialize_rust_language): Delete.
8280         * utils.h (compare_cstrings): New static inline function.
8281
8282 2017-07-20  Pedro Alves  <palves@redhat.com>
8283
8284         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8285         (get_var_value): Constify parameters.
8286         (get_int_var_value): Change prototype.
8287         (to_fixed_range_type): Adjust.
8288         * ada-lang.h (get_int_var_value): Change prototype.
8289
8290 2017-07-20  Pedro Alves  <palves@redhat.com>
8291
8292         * dwarf2read.c (dw2_lookup_symbol): Use
8293         SYMBOL_MATCHES_SEARCH_NAME.
8294         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8295
8296 2017-07-20  Pedro Alves  <palves@redhat.com>
8297
8298         * block.c (block_iter_name_step, block_iter_name_first)
8299         (block_iter_name_next): Delete.
8300         (block_lookup_symbol_primary): Adjust to use
8301         dict_iter_match_first/dict_iter_match_next.
8302         * block.h (block_iter_name_first, block_iter_name_next): Delete
8303         declarations.
8304         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8305         dict_iter_match_first/dict_iter_match_next.
8306
8307 2017-07-20  Pedro Alves  <palves@redhat.com>
8308
8309         * cp-support.c (cp_find_first_component_aux): Add missing case for
8310         end of string.
8311
8312 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8313
8314         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8315         of dwo_cu's dwo_file.
8316
8317 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8318
8319         * remote.c (store_registers_using_G): Remove one line comment.
8320
8321 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8322
8323         * regcache.c (regcache_cpy): Simplify it.
8324         (regcache::cpy_no_passthrough): Remove it.
8325         * regcache.h (cpy_no_passthrough): Remove it.
8326         (regcache_dup, regcache_cpy): Update comments.
8327
8328 2017-07-18  Pedro Alves  <palves@redhat.com>
8329
8330         * remote-sim.c (sim_command_completer): Adjust to work with a
8331         completion_tracker instead of a VEC.
8332
8333 2017-07-17  Pedro Alves  <palves@redhat.com>
8334
8335         * completer.c (complete_source_filenames): New function.
8336         (complete_address_and_linespec_locations): New function.
8337         (location_completer): Use complete_address_and_linespec_locations.
8338         (completion_tracker::build_completion_result): Honor the tracker's
8339         request to suppress append.
8340         * completer.h (completion_tracker::suppress_append_ws)
8341         (completion_tracker::set_suppress_append_ws): New methods.
8342         (completion_tracker::m_suppress_append_ws): New field.
8343         (complete_source_filenames): New declaration.
8344         * linespec.c (linespec_complete_what): New.
8345         (struct ls_parser) <complete_what, completion_word,
8346         completion_quote_char, completion_quote_end, completion_tracker>:
8347         New fields.
8348         (string_find_incomplete_keyword_at_end): New.
8349         (linespec_lexer_lex_string): Record quote char.  If in completion
8350         mode, don't throw.
8351         (linespec_lexer_consume_token): Advance the completion word point.
8352         (linespec_lexer_peek_token): Save/restore completion info.
8353         (save_stream_and_consume_token): New.
8354         (set_completion_after_number): New.
8355         (linespec_parse_basic): Set what to complete next depending on
8356         token.  Handle function and label completions specially.
8357         (parse_linespec): Disable objc shortcut in completion mode.  Set
8358         what to complete next depending on token type.  Skip keyword if in
8359         completion mode.
8360         (complete_linespec_component, linespec_complete): New.
8361         * linespec.h (linespec_complete): Declare.
8362
8363 2017-07-17  Pedro Alves  <palves@redhat.com>
8364
8365         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8366         Handle 'operator<' / 'operator<<'.
8367
8368 2017-07-17  Pedro Alves  <palves@redhat.com>
8369
8370         * completer.c (collect_explicit_location_matches): Handle
8371         MATCH_LABEL.
8372         (convert_explicit_location_to_linespec): New, factored out from
8373         ...
8374         (convert_explicit_location_to_sals): ... this.
8375         (complete_label): New.
8376         (linespec_complete_label, find_label_symbols_in_block): New.
8377         (find_label_symbols): Add completion_mode parameter and adjust to
8378         call find_label_symbols_in_block.
8379         * linespec.h (linespec_complete_label): Declare.
8380
8381 2017-07-17  Pedro Alves  <palves@redhat.com>
8382
8383         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8384         complete_symbol_mode parameter.
8385         * cli/cli-cmds.c (complete_command): Get the completion result out
8386         of the handle_brkchars tracker if used a custom word point.
8387         * completer.c: Include "linespec.h".
8388         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8389         (advance_to_expression_complete_word_point): New.
8390         (completion_tracker::completes_to_completion_word): New.
8391         (complete_files_symbols): Pass down
8392         complete_symbol_mode::EXPRESSION.
8393         (explicit_options, probe_options): New.
8394         (collect_explicit_location_matches): Complete on the
8395         explictit_loc->foo instead of word.  Use
8396         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8397         keyword and options completions.
8398         (backup_text_ptr): Delete.
8399         (skip_keyword): New.
8400         (complete_explicit_location): Remove 'word' parameter.  Add
8401         language, quoted_arg_start and quoted_arg_end parameters.
8402         Rewrite, parsing left to right.
8403         (location_completer): Rewrite.
8404         (location_completer_handle_brkchars): New function.
8405         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8406         (enum complete_line_internal_reason): Adjust comments.
8407         (completion_tracker::discard_completions): New.
8408         (completer_handle_brkchars_func_for_completer): Handle
8409         location_completer.
8410         (gdb_custom_word_point_brkchars)
8411         (gdb_org_rl_basic_quote_characters): New.
8412         (gdb_completion_word_break_characters_throw)
8413         (completion_find_completion_word): Handle trackers that use a
8414         custom word point.
8415         (completion_tracker::advance_custom_word_point_by): New.
8416         (completion_tracker::build_completion_result): Don't rely on
8417         readline appending the quote char.
8418         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8419         use a custom word point.
8420         (gdb_rl_attempted_completion_function): Restore
8421         rl_basic_quote_characters.
8422         * completer.h (class completion_tracker): Extend intro comment.
8423         (completion_tracker::set_quote_char)
8424         (completion_tracker::quote_char)
8425         (completion_tracker::set_use_custom_word_point)
8426         (completion_tracker::use_custom_word_point)
8427         (completion_tracker::custom_word_point)
8428         (completion_tracker::set_custom_word_point)
8429         (completion_tracker::advance_custom_word_point_by)
8430         (completion_tracker::completes_to_completion_word)
8431         (completion_tracker::discard_completions): New methods.
8432         (completion_tracker::m_quote_char)
8433         (completion_tracker::m_use_custom_word_point)
8434         (completion_tracker::m_custom_word_point): New fields.
8435         (advance_to_expression_complete_word_point): Declare.
8436         * f-lang.c (f_collect_symbol_completion_matches): Add
8437         complete_symbol_mode parameter.
8438         * language.h (struct language_defn)
8439         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8440         parameter.
8441         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8442         (linespec_complete_function): New function.
8443         (linespec_lexer_lex_keyword): Adjust.
8444         * linespec.h (linespec_keywords, linespec_complete_function): New
8445         declarations.
8446         * location.c (find_end_quote): New function.
8447         (explicit_location_lex_one): Add explicit_completion_info
8448         parameter.  Save quoting info.  Don't throw if being called for
8449         completion.  Don't handle Ada operators here.
8450         (is_cp_operator, skip_op_false_positives, first_of)
8451         (explicit_location_lex_one_function): New function.
8452         (string_to_explicit_location): Replace 'dont_throw' parameter with
8453         an explicit_completion_info pointer parameter.  Handle it.  Don't
8454         use explicit_location_lex_one to lex function names.  Use
8455         explicit_location_lex_one_function instead.
8456         * location.h (struct explicit_completion_info): New.
8457         (string_to_explicit_location): Replace 'dont_throw' parameter with
8458         an explicit_completion_info pointer parameter.
8459         * symtab.c (default_collect_symbol_completion_matches_break_on):
8460         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8461         (default_collect_symbol_completion_matches)
8462         (collect_symbol_completion_matches): Add complete_symbol_mode
8463         parameter.
8464         (collect_symbol_completion_matches_type): Pass down
8465         complete_symbol_mode::EXPRESSION.
8466         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8467         parameter.  Handle LINESPEC mode.
8468         * symtab.h (complete_symbol_mode): New.
8469         (default_collect_symbol_completion_matches_break_on)
8470         (default_collect_symbol_completion_matches)
8471         (collect_symbol_completion_matches)
8472         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8473         parameter.
8474
8475 2017-07-17  Pedro Alves  <palves@redhat.com>
8476
8477         * utils.c (enum class strncmp_iw_mode): New.
8478         (strcmp_iw): Rename to ...
8479         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8480         parameters.  Handle them.
8481         (strncmp_iw): New.
8482         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8483         * utils.h (strncmp_iw): Declare.
8484         (strcmp_iw): Move describing comments here.
8485
8486 2017-07-17  Pedro Alves  <palves@redhat.com>
8487
8488         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8489         CP_OPERATOR_STR.
8490         * c-typeprint.c (is_type_conversion_operator): Use
8491         CP_OPERATOR_STR.
8492         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8493         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8494         CP_OPERATOR_LEN.
8495         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8496         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8497         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8498         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8499         CP_OPERATOR_STR.
8500         * location.c: Include "cp-support.h".
8501         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8502         CP_OPERATOR_STR.
8503         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8504         CP_OPERATOR_LEN.
8505
8506 2017-07-17  Pedro Alves  <palves@redhat.com>
8507
8508         * cli/cli-cmds.c (complete_command): Use a completion tracker
8509         along with completion_find_completion_word for handle_brkchars
8510         phase.
8511         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8512         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8513         (struct gdb_rl_completion_word_info): New.
8514         (gdb_rl_find_completion_word): New.
8515         (completion_find_completion_word): New.
8516         * completer.h (completion_find_completion_word): Declare.
8517
8518 2017-07-17  Pedro Alves  <palves@redhat.com>
8519
8520         * ada-lang.c (symbol_completion_match): Adjust comments.
8521         (symbol_completion_add): Replace vector parameter with
8522         completion_tracker parameter.  Use it.
8523         (ada_make_symbol_completion_list): Rename to...
8524         (ada_collect_symbol_completion_matches): ... this.  Add
8525         completion_tracker parameter and use it.
8526         (ada_language_defn): Adjust.
8527         * break-catch-syscall.c (catch_syscall_completer): Adjust
8528         prototype and work with completion_tracker instead of VEC.
8529         * breakpoint.c (condition_completer): Adjust prototype and work
8530         with completion_tracker instead of VEC.
8531         * c-lang.c (c_language_defn, cplus_language_defn)
8532         (asm_language_defn, minimal_language_defn): Adjust to renames.
8533         * cli/cli-cmds.c (complete_command): Rework using
8534         completion_tracker.  Catch exceptions when completing.
8535         * cli/cli-decode.c (integer_unlimited_completer)
8536         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8537         with completion_tracker instead of VEC.
8538         * command.h (struct completion_tracker): Forward declare.
8539         (completer_ftype, completer_handle_brkchars_ftype): Change
8540         types.
8541         (complete_on_cmdlist, complete_on_enum): Adjust.
8542         * completer.c: Include <algorithm>.
8543         (struct gdb_completer_state): New.
8544         (current_completion): New global.
8545         (readline_line_completion_function): Delete.
8546         (noop_completer, filename_completer)
8547         (filename_completer_handle_brkchars, complete_files_symbols)
8548         (linespec_location_completer): Adjust to work with a
8549         completion_tracker instead of a VEC.
8550         (string_or_empty): New.
8551         (collect_explicit_location_matches): Adjust to work with a
8552         completion_tracker instead of a VEC.
8553         (explicit_location_completer): Rename to ...
8554         (complete_explicit_location): ... this and adjust to work with a
8555         completion_tracker instead of a VEC.
8556         (location_completer): Adjust to work with a completion_tracker
8557         instead of a VEC.
8558         (add_struct_fields): Adjust to work with a completion_list instead
8559         of VEC.
8560         (expression_completer): Rename to ...
8561         (complete_expression): ... this and adjust to work with a
8562         completion_tracker instead of a VEC.  Use complete_files_symbols.
8563         (expression_completer): Reimplement on top of complete_expression.
8564         (symbol_completer): Adjust to work with a completion_tracker
8565         instead of a VEC.
8566         (enum complete_line_internal_reason): Add describing comments.
8567         (complete_line_internal_normal_command): Adjust to work with a
8568         completion_tracker instead of a VEC.
8569         (complete_line_internal): Rename to ...
8570         (complete_line_internal_1): ... this and adjust to work with a
8571         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8572         handle_brkchars phase.
8573         (new_completion_tracker): Delete.
8574         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8575         complete_line_internal_1.
8576         (free_completion_tracker): Delete.
8577         (INITIAL_COMPLETION_HTAB_SIZE): New.
8578         (completion_tracker::completion_tracker)
8579         (completion_tracker::~completion_tracker): New.
8580         (maybe_add_completion): Delete.
8581         (completion_tracker::maybe_add_completion)
8582         (completion_tracker::add_completion)
8583         (completion_tracker::add_completions): New.
8584         (throw_max_completions_reached_error): Delete.
8585         (complete_line): Adjust to work with a completion_tracker instead
8586         of a VEC.  Don't create a completion_tracker_t or check for max
8587         completions here.
8588         (command_completer, command_completer_handle_brkchars)
8589         (signal_completer, reg_or_group_completer_1)
8590         (reg_or_group_completer, default_completer_handle_brkchars):
8591         Adjust to work with a completion_tracker.
8592         (gdb_completion_word_break_characters_throw): New.
8593         (gdb_completion_word_break_characters): Reimplement.
8594         (line_completion_function): Delete.
8595         (completion_tracker::recompute_lowest_common_denominator)
8596         (expand_preserving_ws)
8597         (completion_tracker::build_completion_result)
8598         (completion_result::completion_result)
8599         (completion_result::completion_result)
8600         (completion_result::~completion_result)
8601         (completion_result::completion_result)
8602         (completion_result::release_match_list, compare_cstrings)
8603         (completion_result::sort_match_list)
8604         (completion_result::reset_match_list)
8605         (gdb_rl_attempted_completion_function_throw)
8606         (gdb_rl_attempted_completion_function): New.
8607         * completer.h (completion_list, struct completion_result)
8608         (class completion_tracker): New.
8609         (complete_line): Add completion_tracker parameter.
8610         (readline_line_completion_function): Delete.
8611         (gdb_rl_attempted_completion_function): New.
8612         (noop_completer, filename_completer, expression_completer)
8613         (location_completer, symbol_completer, command_completer)
8614         (signal_completer, reg_or_group_completer): Update prototypes.
8615         (completion_tracker_t, new_completion_tracker)
8616         (make_cleanup_free_completion_tracker): Delete.
8617         (enum maybe_add_completion_enum): Delete.
8618         (maybe_add_completion): Delete.
8619         (throw_max_completions_reached_error): Delete.
8620         * corefile.c (complete_set_gnutarget): Adjust to work with a
8621         completion_tracker instead of a VEC.
8622         * cp-abi.c (cp_abi_completer): Adjust to work with a
8623         completion_tracker instead of a VEC.
8624         * d-lang.c (d_language_defn): Adjust.
8625         * disasm.c (disassembler_options_completer): Adjust to work with a
8626         completion_tracker instead of a VEC.
8627         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8628         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8629         with a completion_tracker instead of a VEC.
8630         (f_language_defn): Adjust.
8631         * go-lang.c (go_language_defn): Adjust.
8632         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8633         Adjust to work with a completion_tracker instead of a VEC.
8634         * infrun.c (handle_completer): Likewise.
8635         * interps.c (interpreter_completer): Likewise.
8636         * interps.h (interpreter_completer): Likewise.
8637         * language.c (unknown_language_defn, auto_language_defn)
8638         (local_language_defn): Adjust.
8639         * language.h (language_defn::la_make_symbol_completion_list):
8640         Rename to ...
8641         (language_defn::la_collect_symbol_completion_matches): ... this
8642         and adjust to work with a completion_tracker instead of a VEC.
8643         * m2-lang.c (m2_language_defn): Adjust.
8644         * objc-lang.c (objc_language_defn): Adjust.
8645         * opencl-lang.c (opencl_language_defn): Adjust.
8646         * p-lang.c (pascal_language_defn): Adjust.
8647         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8648         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8649         with a completion_tracker.
8650         * rust-lang.c (rust_language_defn): Adjust.
8651         * symtab.c (free_completion_list, do_free_completion_list)
8652         (return_val, completion_tracker): Delete.
8653         (completion_list_add_name, completion_list_add_symbol)
8654         (completion_list_add_msymbol, completion_list_objc_symbol)
8655         (completion_list_add_fields, add_symtab_completions): Add
8656         completion_tracker parameter and use it.
8657         (default_make_symbol_completion_list_break_on_1): Rename to...
8658         (default_collect_symbol_completion_matches_break_on): ... this.
8659         Add completion_tracker parameter and use it instead of allocating
8660         a completion tracker here.
8661         (default_make_symbol_completion_list_break_on): Delete old
8662         implementation.
8663         (default_make_symbol_completion_list): Delete.
8664         (default_collect_symbol_completion_matches): New.
8665         (make_symbol_completion_list): Delete.
8666         (collect_symbol_completion_matches): New.
8667         (make_symbol_completion_type): Rename to ...
8668         (collect_symbol_completion_matches_type): ... this.  Add
8669         completion_tracker parameter and use it instead of VEC.
8670         (make_file_symbol_completion_list_1): Rename to...
8671         (collect_file_symbol_completion_matches): ... this.  Add
8672         completion_tracker parameter and use it instead of VEC.
8673         (make_file_symbol_completion_list): Delete.
8674         (add_filename_to_list): Use completion_list instead of a VEC.
8675         (add_partial_filename_data::list): Now a completion_list.
8676         (make_source_files_completion_list): Work with a completion_list
8677         instead of a VEC.
8678         * symtab.h: Include "completer.h".
8679         (default_make_symbol_completion_list_break_on)
8680         (default_make_symbol_completion_list, make_symbol_completion_list)
8681         (make_symbol_completion_type, make_file_symbol_completion_list)
8682         (make_source_files_completion_list): Delete.
8683         (default_collect_symbol_completion_matches_break_on)
8684         (default_collect_symbol_completion_matches)
8685         (collect_symbol_completion_matches)
8686         (collect_symbol_completion_matches_type)
8687         (collect_file_symbol_completion_matches)
8688         (make_source_files_completion_list): New.
8689         * top.c (init_main): Don't install a rl_completion_entry_function
8690         hook.  Install a rl_attempted_completion_function hook instead.
8691         * tui/tui-layout.c (layout_completer): Adjust to work with a
8692         completion_tracker.
8693         * tui/tui-regs.c (tui_reggroup_completer):
8694         * tui/tui-win.c (window_name_completer, focus_completer)
8695         (winheight_completer): Adjust to work with a completion_tracker.
8696         * value.c: Include "completer.h".
8697         (complete_internalvar): Adjust to work with a completion_tracker.
8698         * value.h (complete_internalvar): Likewise.
8699
8700 2017-07-17  Pedro Alves  <palves@redhat.com>
8701
8702         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8703         renames.
8704         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8705         comments to completer_ftype's declaration.
8706         <completer_handle_brkchars>: Change type to
8707         completer_handle_brkchars_ftype.
8708         * command.h (completer_ftype): Add describing comment and give
8709         names to parameters.
8710         (completer_ftype_void): Rename to ...
8711         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8712         (set_cmd_completer_handle_brkchars): Adjust.
8713         * completer.c (filename_completer_handle_brkchars): New function.
8714         (complete_line_internal_normal_command): New function, factored
8715         out from ...
8716         (complete_line_internal): ... here.
8717         (command_completer_handle_brkchars)
8718         (default_completer_handle_brkchars)
8719         (completer_handle_brkchars_func_for_completer): New functions.
8720         * completer.h (set_gdb_completion_word_break_characters): Delete
8721         declaration.
8722         (completer_handle_brkchars_func_for_completer): New declaration.
8723         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8724         completer_handle_brkchars_func_for_completer.
8725
8726 2017-07-17  Pedro Alves  <palves@redhat.com>
8727
8728         * completer.c (symbol_completer): New function, based on
8729         make_symbol_completion_list_fn.
8730         * completer.h (symbol_completer): New declaration.
8731         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8732         * python/py-cmd.c (completers): Adjust.
8733         * symtab.c (make_symbol_completion_list_fn): Delete.
8734         * symtab.h (make_symbol_completion_list_fn): Delete.
8735         * cli/cli-decode.c (add_cmd): Adjust.
8736
8737 2017-07-17  Pedro Alves  <palves@redhat.com>
8738
8739         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8740         * dwarf2read.c: Include "filename-seen-cache.h".
8741         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8742         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8743         * filename-seen-cache.c: New file.
8744         * filename-seen-cache.h: New file.
8745         * symtab.c: Include "filename-seen-cache.h".
8746         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8747         (create_filename_seen_cache, clear_filename_seen_cache)
8748         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8749         to filename-seen-cache.h/filename-seen-cache.c.
8750         (output_source_filename, sources_info)
8751         (maybe_add_partial_symtab_filename)
8752         (make_source_files_completion_list): Adjust to use
8753         filename_seen_cache.
8754
8755 2017-07-17  Pedro Alves  <palves@redhat.com>
8756
8757         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8758         fields.
8759         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8760         dwarf2_debug_sections*)): New.
8761         (dwarf2_per_objfile::dwarf2_per_objfile(const
8762         dwarf2_per_objfile&)): Declare as deleted.
8763         (dwarf2_per_objfile::operator=): Declare as deleted.
8764         (dwarf2_per_objfile::dwarf2_per_objfile)
8765         (dwarf2_per_objfile::~dwarf2_per_objfile)
8766         (dwarf2_per_objfile::free_cached_comp_units): New.
8767         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8768         ctor.  Call dwarf2_per_objfile's ctor manually.
8769         (dwarf2_locate_sections): Deleted/refactored as ...
8770         (dwarf2_per_objfile::locate_sections): ... this new method.
8771         (free_cached_comp_units): Defer to
8772         dwarf2_per_objfile::free_cached_comp_units.
8773         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8774
8775 2017-07-14  Tom Tromey  <tom@tromey.com>
8776
8777         PR rust/21764:
8778         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8779         parameter.
8780         <UNOP_SIZEOF>: Split into separate case.
8781         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8782
8783 2017-07-14  Tom Tromey  <tom@tromey.com>
8784
8785         PR rust/21763:
8786         * symtab.c (symbol_matches_domain): Add language_rust to special
8787         case.
8788         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8789         treat LOC_TYPEDEF symbols as variables.
8790
8791 2017-07-14  Pedro Alves  <palves@redhat.com>
8792
8793         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8794         symtabs matching all symtabs with SRCFILE as file name instead of
8795         only considering the first hit, with lookup_symtab.
8796
8797 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8798
8799         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8800         operator_name parameters.
8801         (gen_expr): Update function call.
8802
8803 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8804
8805         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8806         parameter.
8807         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8808         Likewise.
8809         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8810         parameter, use agent_expr::gdbarch instead, update function
8811         calls.
8812         (locexpr_tracepoint_var_ref): Likewise.
8813         (loclist_tracepoint_var_ref): Likewise.
8814         * ax-gdb.c (gen_trace_static_fields): Likewise.
8815         (gen_traced_pop): Likewise.
8816         (gen_frame_args_address): Likewise.
8817         (gen_frame_locals_address): Likewise.
8818         (gen_var_ref): Likewise.
8819         (gen_struct_ref_recursive): Likewise.
8820         (gen_static_field): Likewise.
8821         (gen_maybe_namespace_elt): Likewise.
8822         (gen_expr): Likewise.
8823         (gen_trace_for_var): Likewise.
8824         (gen_trace_for_expr): Likewise.
8825         (gen_trace_for_return_address): Likewise.
8826
8827 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8828
8829         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8830         parameter.
8831         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8832
8833 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8834
8835         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8836         from ax, update calls.
8837         (gen_usual_arithmetic): Likewise.
8838         (gen_integral_promotions): Likewise.
8839         (gen_bitfield_ref): Likewise.
8840         (gen_primitive_field): Likewise.
8841         (gen_struct_ref_recursive): Likewise.
8842         (gen_struct_ref): Likewise.
8843         (gen_maybe_namespace_elt): Likewise.
8844         (gen_struct_elt_for_reference): Likewise.
8845         (gen_namespace_elt): Likewise.
8846         (gen_aggregate_elt_ref): Likewise.
8847         (gen_expr): Get gdbarch from ax, update calls.
8848         (gen_expr_binop_rest): Likewise.
8849
8850 2017-07-13  Pedro Alves  <palves@redhat.com>
8851
8852         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8853         as default tdesc.
8854         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8855         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8856         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8857         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8858         tdep.
8859         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8860         Get final tdesc from the tdep.
8861         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8862         default tdesc.
8863         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8864         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8865         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8866         Use it as default tdesc.
8867         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8868         down to amd_init_abi.  No longer handle fallback tdesc here.
8869         * amd64-tdep.h (tdesc_x32): Declare.
8870         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8871         parameter.
8872         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8873         as default tdesc.
8874
8875 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8876
8877         * s390-linux-tdep.c (s390_process_record): Add support for
8878         instructions new in arch12.
8879
8880 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8881
8882         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8883         PT_GETFSBASE and PT_GETGSBASE.
8884         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8885         PT_SETGSBASE.
8886
8887 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8888
8889         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8890         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8891         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8892         those rules.
8893         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8894         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8895         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8896         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8897         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8898         * features/i386/amd64.xml: Add 64bit-segments.xml.
8899         * features/i386/amd64-avx-avx512.c: Regenerated.
8900         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8901         * features/i386/amd64-avx-mpx.c: Regenerated.
8902         * features/i386/amd64-avx.c: Regenerated.
8903         * features/i386/amd64-mpx.c: Regenerated.
8904         * features/i386/amd64.c: Regenerated.
8905         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8906         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8907         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8908         * regformats/i386/amd64-avx.dat: Regenerated.
8909         * regformats/i386/amd64-mpx.dat: Regenerated.
8910         * regformats/i386/amd64.dat: Regenerated.
8911
8912 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8913
8914         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8915         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8916
8917 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8918
8919         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8920         unsetenv.
8921         * gnulib/aclocal.m4: Regenerate.
8922         * gnulib/config.in: Regenerate.
8923         * gnulib/configure: Regenerate.
8924         * gnulib/import/Makefile.am: Regenerate.
8925         * gnulib/import/Makefile.in: Regenerate.
8926         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8927         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8928         * gnulib/import/m4/environ.m4: New file.
8929         * gnulib/import/m4/setenv.m4: New file.
8930         * gnulib/import/setenv.c: New file.
8931         * gnulib/import/unsetenv.c: New file.
8932
8933 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8934
8935         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8936         address when op is DW_OP_addr.
8937
8938 2017-07-09  Tom Tromey  <tom@tromey.com>
8939
8940         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8941         check and apply to outer type.
8942
8943 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8944
8945         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8946         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8947         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8948         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8949
8950 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8951
8952         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8953
8954 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8955
8956         * corelow.c (get_core_siginfo): Remove.
8957         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8958         instead of get_core_siginfo.
8959         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8960         * gdbarch.h: Re-generate.
8961         * gdbarch.c: Re-generate.
8962         * linux-tdep.c (linux_core_xfer_siginfo): New.
8963         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8964
8965 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8966
8967         * corelow.c (thread_section_name): Move to ...
8968         * gdbcore.h (thread_section_name): ... here.
8969
8970 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8971
8972         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8973         (struct siginfo32): New.
8974         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8975         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8976         via ptrace(PT_LWPINFO).
8977
8978 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8979
8980         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8981         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8982         (fbsd_get_siginfo_type): New.
8983         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8984         (_initialize_fbsd_tdep): New.
8985
8986 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8987
8988         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8989         a singular dwo_unit*) to support multiple CUs in the same way that
8990         multiple TUs are supported.
8991         (create_cus_hash_table): Replace create_dwo_cu with a function for
8992         parsing multiple CUs from a DWO file.
8993         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8994         create_dwo_cu.
8995         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8996         htab_find, rather than comparing the signature to a singleton CU in
8997         the dwo_file.
8998
8999 2017-07-06  Pedro Alves  <palves@redhat.com>
9000
9001         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9002
9003 2017-07-04  Pedro Alves  <palves@redhat.com>
9004
9005         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9006         * gdbtypes.h (TYPE_STATIC): Delete.
9007         (struct fn_field) <is_public, is_abstract, is_static, is_final,
9008         is_synchronized, is_native>: Delete.
9009         <dummy>: Bump.
9010         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9011         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9012         (TYPE_FN_FIELD_ABSTRACT): Delete.
9013
9014 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
9015
9016         * buffer.h (buffer_finish): Fix spelling mistakes.
9017
9018 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
9019
9020         * .dir-locals.el: Automatically switch to C-style comments in
9021         versions of Emacs that support the feature.
9022
9023 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9024             Pedro Alves  <palves@redhat.com>
9025
9026         PR cli/21688
9027         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9028         (process_next_line): New variable 'inline_cmd'.
9029         Adjust 'if' clauses for "python", "compile" and "guile" to use
9030         'command_name_equals' and check for '!inline_cmd'.
9031
9032 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
9033
9034         PR cli/21688
9035         * cli/cli-script.c (command_name_equals_not_inline): New function.
9036         (process_next_line): Adjust 'if' clauses for "python", "compile"
9037         and "guile" to use command_name_equals_not_inline.
9038
9039 2017-06-29  Pedro Alves  <palves@redhat.com>
9040
9041         * completer.c (expression_completer): Call
9042         linespec_location_completer instead of location_completer.
9043
9044 2017-06-29  Pedro Alves  <palves@redhat.com>
9045
9046         * completer.c (expression_completer): Remove code that recomputes
9047         'text' from 'word'.
9048
9049 2017-06-29  Yao Qi  <yao.qi@linaro.org>
9050
9051         * regformats/regdat.sh: Generate code with
9052         "ifndef IN_PROCESS_AGENT".
9053
9054 2017-06-28  Pedro Alves  <palves@redhat.com>
9055
9056         * command.h: Include "common/scoped_restore.h".
9057
9058 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9059
9060         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9061         instead of obstack_grow.
9062
9063 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9064
9065         PR gdb/21337
9066         * symfile.c (reread_symbols): Call objfiles_changed just before
9067         read_symbols.
9068
9069 2017-06-27  Pedro Alves  <palves@redhat.com>
9070
9071         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9072         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9073         (completion_list_add_symbol, completion_list_add_msymbol):
9074         ... these new functions.
9075         (add_symtab_completions)
9076         (default_make_symbol_completion_list_break_on_1): Adjust.
9077
9078 2017-06-27  Pedro Alves  <palves@redhat.com>
9079
9080         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9081         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9082         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9083         dtor.
9084         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9085         'storage_obstack' field an auto_obstack.  In-class initialize all
9086         non-bitfield fields.  Make minsyms_read bool.
9087         * symfile.c (read_symbols): Adjust.
9088
9089 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9090
9091         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9092         (gdbsim_store_register): Likewise.
9093
9094 2017-06-27  Pedro Alves  <palves@redhat.com>
9095
9096         * c-exp.y (name_obstack): Now an auto_obstack.
9097         (yylex): Use auto_obstack::clear.
9098         (c_parse): Use auto_obstack::clear instead of reinitializing and
9099         freeing the obstack.
9100         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9101         * d-exp.y (name_obstack): Now an auto_obstack.
9102         (yylex): Use auto_obstack::clear.
9103         (d_parse): Use auto_obstack::clear instead of reinitializing and
9104         freeing the obstack.
9105         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9106         auto_obstack.
9107         * dwarf2read.c (create_addrmap_from_index)
9108         (dwarf2_build_psymtabs_hard)
9109         (update_enumeration_type_from_children): Likewise.
9110         * gdb_obstack.h (auto_obstack): New type.
9111         * go-exp.y (name_obstack): Now an auto_obstack.
9112         (build_packaged_name): Use auto_obstack::clear.
9113         (go_parse): Use auto_obstack::clear instead of reinitializing and
9114         freeing the obstack.
9115         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9116         auto_obstack.
9117         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9118         * rust-exp.y (work_obstack): Now an auto_obstack.
9119         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9120         reinitializing and freeing the obstack.
9121         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9122         (host_char_to_target): Use auto_obstack.
9123         * utils.h (make_cleanup_obstack_free): Delete declaration.
9124         * valprint.c (generic_emit_char, generic_printstr): Use
9125         auto_obstack.
9126
9127 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9128
9129         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9130         thread.
9131         (darwin_init_thread_list): Don't update dummy thread.
9132         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9133
9134 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9135
9136         * record-full.c (netorder16): Remove.
9137
9138 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9139
9140         * common/diagnostics.h: Define macros for GCC.
9141         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9142         * common/vec.h: Include diagnostics.h.
9143         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9144         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9145         warning.
9146
9147 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9148
9149         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9150         New macro.
9151         * ada-lex.l: Ignore deprecated register warnings.
9152
9153 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9154
9155         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9156         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9157
9158 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9159
9160         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9161         its own line.
9162
9163 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9164
9165         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9166
9167 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9168
9169         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9170         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9171         (xtensa_register_read_masked): Likewise.
9172
9173 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9174
9175         * common/environ.c (gdb_environ::unset): Update comment.
9176
9177 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9178
9179         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9180         registers.
9181
9182 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9183
9184         * record-full.c (record_full_exec_insn): Use byte_vector.
9185
9186 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9187
9188         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9189         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9190
9191 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9192
9193         * remote.c (cached_reg): Move from here...
9194         * regcache.h (cached_reg): ...to here.
9195         * python/py-unwind.c (struct reg_info): Remove.
9196         (cached_frame_info): Use cached_reg_t.
9197         (pyuw_prev_register): Likewise.
9198         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9199         (pyuw_dealloc_cache): Free all registers.
9200
9201 2017-06-22  Pedro Alves  <palves@redhat.com>
9202             Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9205         warning.
9206         * common/diagnostics.h: New file.
9207
9208 2017-06-22  Pedro Alves  <palves@redhat.com>
9209
9210         * common/agent.h: Add include guards.
9211
9212 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9213
9214         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9215         talk about addressable units instead of bytes.
9216
9217 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9218
9219         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9220         of '::const_iterator'.
9221
9222 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9223
9224         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9225         'unittests/environ-selftests.c'.
9226         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9227         * charset.c (find_charset_names): Declare object 'iconv_env'.
9228         Update code to use 'iconv_env' object.  Remove call to
9229         'free_environ'.
9230         * common/environ.c: Include <utility>.
9231         (make_environ): Delete function.
9232         (free_environ): Delete function.
9233         (gdb_environ::clear): New function.
9234         (gdb_environ::operator=): New function.
9235         (gdb_environ::get): Likewise.
9236         (environ_vector): Delete function.
9237         (set_in_environ): Delete function.
9238         (gdb_environ::set): New function.
9239         (unset_in_environ): Delete function.
9240         (gdb_environ::unset): New function.
9241         (gdb_environ::envp): Likewise.
9242         * common/environ.h: Include <vector>.
9243         (struct gdb_environ): Delete; transform into...
9244         (class gdb_environ): ... this class.
9245         (free_environ): Delete prototype.
9246         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9247         environ_vector): Likewise.
9248         * infcmd.c (run_command_1): Update code to call
9249         'envp' from 'gdb_environ' class.
9250         (environment_info): Update code to call methods from 'gdb_environ'
9251         class.
9252         (unset_environment_command): Likewise.
9253         (path_info): Likewise.
9254         (path_command): Likewise.
9255         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9256         (inferior::inferior): Initialize 'environment' using the host's
9257         information.
9258         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9259         Include "environ.h".
9260         (class inferior) <environment>: Change type from 'struct
9261         gdb_environ' to 'gdb_environ'.
9262         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9263         methods from 'gdb_environ' class.
9264         * solib.c (solib_find_1): Likewise
9265         * unittests/environ-selftests.c: New file.
9266
9267 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9268
9269         * features/i386/i386-linux.xml: Exchange the order of including
9270         32bit-linux.xml and 32bit-sse.xml.
9271         * features/i386/i386-linux.c: Regenerated.
9272
9273 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9274
9275         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9276         Delete copy ctor and assignment operator.
9277         (tdesc_type): Likewise.
9278         (tdesc_feature): Likewise.
9279         (tdesc_free_reg): Remove.
9280         (tdesc_create_reg): Use new.
9281         (tdesc_free_type): Remove.
9282         (tdesc_create_vector): Use new.
9283         (tdesc_create_union): Likewise.
9284         (tdesc_create_flags): Likewise.
9285         (tdesc_create_enum): Likewise.
9286         (tdesc_free_feature): Delete.
9287         (free_target_description): Use delete.
9288
9289 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9290
9291         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9292         registers.
9293
9294 2017-06-19  Pedro Alves  <palves@redhat.com>
9295
9296         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9297         after gdb::unlinker.
9298
9299 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9300
9301         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9302         gdb_environ to access an environment variable.
9303
9304 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9305
9306         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9307         gdb_byte*.
9308
9309 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9310
9311         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9312
9313 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9314
9315         * configure: Re-generate.
9316         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9317
9318 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9319
9320         * configure: Re-generate.
9321         * warning.m4: Pass -Werror to compiler when checking for
9322         supported warning flags.
9323
9324 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9325
9326         * Makefile.in (COMPILE.pre): Add "-x c++".
9327
9328 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9329             Pedro Alves  <palves@redhat.com>
9330             Yao Qi  <yao.qi@linaro.org>
9331
9332         * defs.h (RequireLongest): New.
9333         (extract_integer): Declare function template.
9334         (extract_signed_integer): Remove the declaration, but define it
9335         static inline.
9336         (extract_unsigned_integer): Likewise.
9337         (store_integer): Declare function template.
9338         (store_signed_integer): Remove the declaration, but define it
9339         static inline.
9340         (store_unsigned_integer): Likewise.
9341         * findvar.c (extract_integer): New function template.
9342         (extract_signed_integer): Remove.
9343         (extract_unsigned_integer): Remove.
9344         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9345         instantiations.
9346         (store_integer): New function template.
9347         (store_signed_integer): Remove.
9348         (store_unsigned_integer): Remove.
9349         (store_integer): Explicit instantiations.
9350         * regcache.c (regcache_raw_read_signed): Update.
9351         (regcache::raw_read): New function.
9352         (regcache::raw_read_signed): Remove.
9353         (regcache::raw_read_unsigned): Remove.
9354         (regcache_raw_read_unsigned): Update.
9355         (regcache_raw_write_unsigned): Update.
9356         (regcache::raw_write_signed): Remove.
9357         (regcache::raw_write): New function.
9358         (regcache_cooked_read_signed): Update.
9359         (regcache::raw_write_unsigned): Remove.
9360         (regcache::cooked_read_signed): Remove.
9361         (regcache_cooked_read_unsigned): Update.
9362         (regcache::cooked_read_unsigned): Remove.
9363         (regcache_cooked_write_signed): Update.
9364         (regcache_cooked_write_unsigned): Update.
9365         * regcache.h (regcache) <raw_read_signed>: Remove.
9366         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9367         <raw_read, raw_write>: New.
9368         <cooked_read_signed, cooked_write_signed>: Remove.
9369         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9370         <cooked_read, cooked_write>: New.
9371         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9372         (sh64_pseudo_register_write): Update.
9373
9374 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9375
9376         * arc-tdep.c (arc_disassembler_options): New variable.
9377         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9378         of default_print_insn.
9379         (arc_delayed_print_insn): Set info->section when needed,
9380         use default_print_insn to retrieve a disassembler.
9381
9382 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9383
9384         PR gdb/21574
9385         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9386         to mention $SHELL and startup-with-shell.
9387
9388 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9389
9390         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9391
9392 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9393
9394         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9395         default_print_insn instead of print_insn_aarch64.
9396         * arm-tdep.c (gdb_print_insn_arm): Call
9397         default_print_insn instead of print_insn_big_arm
9398         and print_insn_little_arm.
9399         * i386-tdep.c (i386_print_insn): Call default_print_insn
9400         instead of print_insn_i386.
9401         * ia64-tdep.c (ia64_print_insn): Call
9402         default_print_insn instead of print_insn_ia64.
9403         * mips-tdep.c (gdb_print_insn_mips): Call
9404         default_print_insn instead of print_insn_big_mips
9405         and print_insn_little_mips.
9406         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9407         instead of print_insn_spu.
9408
9409 2017-06-14  Pedro Alves  <palves@redhat.com>
9410
9411         * ada-lang.c: Include "common/byte-vector.h".
9412         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9413         * charset.c (wchar_iterator::iterate): Resize the vector instead
9414         of reserving it.
9415         * common/byte-vector.h: Include "common/def-vector.h".
9416         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9417         * cli/cli-dump.c: Include "common/byte-vector.h".
9418         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9419         * common/byte-vector.h: New file.
9420         * common/def-vector.h: New file.
9421         * common/default-init-alloc.h: New file.
9422         * dwarf2loc.c: Include "common/byte-vector.h".
9423         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9424         instead of reserving it.
9425         * dwarf2read.c: Include "common/byte-vector.h".
9426         (data_buf::m_vec): Now a gdb::byte_vector.
9427         * gdb_regex.c: Include "common/def-vector.h".
9428         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9429         * mi/mi-main.c: Include "common/byte-vector.h".
9430         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9431         * printcmd.c: Include "common/byte-vector.h".
9432         (print_scalar_formatted): Use gdb::byte_vector.
9433         * valprint.c: Include "common/byte-vector.h".
9434         (maybe_negate_by_bytes, print_decimal_chars): Use
9435         gdb::byte_vector.
9436
9437 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9438
9439         * darwin-nat.c: Include "nat/fork-inferior.h".
9440
9441 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9442
9443         * configure.nat: Factor out Darwin bits that are not
9444         architecture-specific.  Add fork-inferior.o.
9445
9446 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9447
9448         * configure.nat: Factor out AIX bits that are not
9449         architecture-specific.  Add fork-inferior.o.
9450
9451 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9452
9453         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9454         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9455         wrappers that just call rw_pieced_value.
9456
9457 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9458
9459         * dwarf2loc.c (write_pieced_value): When writing the data for a
9460         memory piece, use write_memory_with_notification instead of
9461         write_memory.
9462
9463 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9464
9465         * valops.c (read_value_memory): Change embedded_offset to
9466         represent a bit offset instead of a byte offset.
9467         * value.h (read_value_memory): Adjust comment.
9468
9469 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9470
9471         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9472         dest_offset_bits and source_offset_bits.
9473         (write_pieced_value): Likewise.
9474
9475 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9476
9477         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9478         given by DW_OP_bit_piece.
9479         (write_pieced_value): Likewise.
9480
9481 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9482
9483         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9484         some other preparations to the places where sufficient information
9485         is available.
9486         (write_pieced_value): Likewise.
9487
9488 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9489
9490         * dwarf2loc.c (bits_to_bytes): New function.
9491         (read_pieced_value): Fix offset calculations for register pieces
9492         on big-endian targets.
9493         (write_pieced_value): Likewise.
9494
9495 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9496
9497         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9498         (write_pieced_value): Likewise.
9499
9500 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9501
9502         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9503         transfer the source value's least significant bits, instead of its
9504         lowest-addressed ones.  Rename type_len to max_offset.
9505         (read_pieced_value): Mirror above changes to write_pieced_value as
9506         applicable.
9507
9508 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9509
9510         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9511         truncate full bytes from dest_offset_bits before using it as an
9512         offset into the buffer.
9513
9514 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9515
9516         * dwarf2loc.c (write_pieced_value): Include transfer size in
9517         byte-wise check.
9518
9519 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9520
9521         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9522         calculation of this_size.
9523
9524 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9525
9526         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9527         when targeting a bit-field.
9528         (write_pieced_value): Likewise.
9529
9530 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9531
9532         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9533         (allocate_piece_closure): Drop addr_size parameter.
9534         (dwarf2_evaluate_loc_desc_full): Adjust call to
9535         allocate_piece_closure.
9536
9537 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9538
9539         PR gdb/21226
9540         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9541         the LSB end, independent of endianness.
9542
9543 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9544
9545         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9546         size capping.
9547
9548 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9549
9550         * mips-linux-nat.c: Move include features/mips*-linux.c to
9551         mips-linux-tdep.c.
9552         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9553         to mips-linux-tdep.c.
9554         * mips-linux-tdep.c: Include features/mips*-linux.c
9555         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9556         functions.
9557         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9558         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9559         (tdesc_mips64_dsp_linux): Declare.
9560
9561 2017-06-12  Tom Tromey  <tom@tromey.com>
9562
9563         * valprint.h (val_print_type_code_int): Remove.
9564         * valprint.c (generic_val_print_int): Always call
9565         val_print_scalar_formatted.
9566         (val_print_type_code_int): Remove.
9567         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9568         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9569         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9570         * ada-valprint.c (ada_val_print_num): Use
9571         val_print_scalar_formatted.
9572
9573 2017-06-12  Tom Tromey  <tom@tromey.com>
9574
9575         * printcmd.c (print_scalar_formatted): Unify the two switches.
9576         Don't convert scalars to LONGEST.
9577
9578 2017-06-12  Tom Tromey  <tom@tromey.com>
9579
9580         PR exp/16225:
9581         * valprint.h (print_decimal_chars): Update.
9582         * valprint.c (maybe_negate_by_bytes): New function.
9583         (print_decimal_chars): Add "is_signed" argument.
9584         * printcmd.c (print_scalar_formatted): Update.
9585
9586 2017-06-12  Tom Tromey  <tom@tromey.com>
9587
9588         PR exp/16225:
9589         * valprint.h (print_binary_chars, print_hex_chars): Update.
9590         * valprint.c (val_print_type_code_int): Update.
9591         (print_binary_chars): Add "zero_pad" argument.
9592         (emit_octal_digit): New function.
9593         (print_octal_chars): Don't zero-pad.
9594         (print_decimal_chars): Likewise.
9595         (print_hex_chars): Add "zero_pad" argument.
9596         * sh64-tdep.c (sh64_do_fp_register): Update.
9597         * regcache.c (regcache::dump): Update.
9598         * printcmd.c (print_scalar_formatted): Update.
9599         * infcmd.c (default_print_one_register_info): Update.
9600
9601 2017-06-12  Pedro Alves  <palves@redhat.com>
9602             Alan Hayward  <alan.hayward@arm.com>
9603
9604         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9605         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9606         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9607         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9608         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9609
9610 2017-06-12  Pedro Alves  <palves@redhat.com>
9611
9612         * dwarf2read.c (mapped_symtab::data): Now a vector of
9613         symtab_index_entry instead of vector of
9614         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9615         whether an element's name is NULL instead of checking whether the
9616         element itself is NULL.
9617         (find_slot): Change return type.  Adjust.
9618         (hash_expand, , add_index_entry, uniquify_cu_indices)
9619         (write_hash_table): Adjust.
9620
9621 2017-06-12  Pedro Alves  <palves@redhat.com>
9622
9623         * dwarf2read.c (recursively_count_psymbols): New function.
9624         (write_psymtabs_to_index): Call it to compute number of psyms and
9625         pass estimate size of psyms_seen to unordered_set's ctor.
9626
9627 2017-06-12  Pedro Alves  <palves@redhat.com>
9628
9629         * dwarf2read.c (write_hash_table): Check if key already exists
9630         before emplacing.
9631
9632 2017-06-12  Pedro Alves  <palves@redhat.com>
9633
9634         * dwarf2read.c (data_buf::append_space): Rename to...
9635         (data_buf::grow): ... this, and make private.  Adjust all callers.
9636         (data_buf::append_uint): New method.
9637         (add_address_entry, write_one_signatured_type)
9638         (write_psymtabs_to_index): Use it.
9639
9640 2017-06-12  Pedro Alves  <palves@redhat.com>
9641
9642         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9643         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9644         (data_buf::file_write): Call ::fwrite directly.
9645
9646 2017-06-12  Pedro Alves  <palves@redhat.com>
9647
9648         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9649         std::vector::erase.
9650
9651 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9652
9653         Code cleanup: C++ify .gdb_index producer.
9654         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9655         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9656         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9657         (create_strtab, add_string): Remove.
9658         (file_write, data_buf): New.
9659         (struct symtab_index_entry): Use std::vector for cu_indices.
9660         (struct mapped_symtab): Use std::vector for data.
9661         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9662         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9663         Remove.
9664         (find_slot): Change return type.  Update it to the new data structures.
9665         (hash_expand, add_index_entry): Update it to the new data structures.
9666         (offset_type_compare): Remove.
9667         (uniquify_cu_indices): Update it to the new data structures.
9668         (c_str_view, c_str_view_hasher, vector_hasher): New.
9669         (add_indices_to_cpool): Remove.
9670         (write_hash_table): Update it to the new data structures.
9671         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9672         (eq_psymtab_cu_index): Remove.
9673         (psym_index_map): New typedef.
9674         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9675         reference and std::unordered_map for cu_index_htab.
9676         (add_address_entry, add_address_entry_worker, write_address_map)
9677         (write_psymbols): Update it to the new data structures.
9678         (write_obstack): Remove.
9679         (struct signatured_type_index_data): Change types_list to a data_buf
9680         reference and psyms_seen to a std::unordered_set reference.
9681         (write_one_signatured_type, recursively_write_psymbols)
9682         (write_psymtabs_to_index): Update it to the new data structures.
9683
9684 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9685
9686         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9687         separate-debug-file commands.
9688         * symfile.h (separate_debug_file_debug): New global.
9689         * symfile.c (separate_debug_file_debug): New global.
9690         (separate_debug_file_exists, find_separate_debug_file): Add
9691         debug output.
9692         (_initialize_symfile): Add "set debug separate-debug-file"
9693         command.
9694         * build-id.c (build_id_to_debug_bfd,
9695         find_separate_debug_file_by_buildid): Add debug output.
9696
9697 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9698
9699         * gdbarch.sh (displaced_step_free_closure): Remove.
9700         * gdbarch.h, gdbarch.c: Re-generate.
9701         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9702         displaced_step_free_closure.
9703         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9704         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9705         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9706         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9707         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9708         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9709         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9710         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9711         * infrun.c (displaced_step_clear): Call xfree instead of
9712         gdbarch_displaced_step_free_closure.
9713
9714 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9715
9716         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9717         NULL".
9718
9719 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9720
9721         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9722         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9723         (mn10300_push_dummy_call): Likewise.
9724
9725 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9726
9727         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9728
9729 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9730
9731         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9732
9733 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9734
9735         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9736         able to start inferiors using a shell.
9737         (New remote packets): Announce new packet "QStartupWithShell".
9738         * remote.c: Add PACKET_QStartupWithShell.
9739         (extended_remote_create_inferior): Handle new
9740         PACKET_QStartupWithShell.
9741         (remote_protocol_features) <QStartupWithShell>: New entry for
9742         PACKET_QStartupWithShell.
9743         (_initialize_remote): Call "add_packet_config_cmd" for
9744         QStartupShell.
9745
9746 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9747             Pedro Alves  <palves@redhat.com>
9748
9749         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9750         and "nat/fork-inferior.h".
9751         * common/common-inferior.h: New file, with contents from
9752         "gdb/inferior.h".
9753         * commom/common-utils.c: Include "common-utils.h".
9754         (stringify_argv): New function.
9755         * common/common-utils.h (stringify_argv): New prototype.
9756         * configure.nat: Add "fork-inferior.o" as a dependency for
9757         "*linux*", "fbsd*" and "nbsd*" hosts.
9758         * corefile.c (get_exec_file): Update comment.
9759         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9760         instead of "startup_inferior".
9761         (darwin_create_inferior): Call "add_thread_silent" after
9762         "fork_inferior".
9763         * fork-child.c: Cleanup unnecessary includes.
9764         (SHELL_FILE): Move to "common/common-fork-child.c".
9765         (environ): Likewise.
9766         (exec_wrapper): Initialize.
9767         (get_exec_wrapper): New function.
9768         (breakup_args): Move to "common/common-fork-child.c"; rename to
9769         "breakup_args_for_exec".
9770         (escape_bang_in_quoted_argument): Move to
9771         "common/common-fork-child.c".
9772         (saved_ui): New variable.
9773         (prefork_hook): New function.
9774         (postfork_hook): Likewise.
9775         (postfork_child_hook): Likewise.
9776         (gdb_startup_inferior): Likewise.
9777         (fork_inferior): Move to "common/common-fork-child.c".  Update
9778         function to support gdbserver.
9779         (startup_inferior): Likewise.
9780         * gdbcore.h (get_exec_file): Remove declaration.
9781         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9782         instead of "startup_inferior".  Call "add_thread_silent" after
9783         "fork_inferior".
9784         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9785         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9786         instead of "startup_inferior".  Call "add_thread_silent" after
9787         "fork_inferior".
9788         * inferior.h: Include "common-inferior.h".
9789         (trace_start_error): Move to "common/common-utils.h".
9790         (trace_start_error_with_name): Likewise.
9791         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9792         (startup_inferior): Likewise.
9793         (gdb_startup_inferior): New prototype.
9794         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9795         * nat/fork-inferior.h: New file.
9796         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9797         instead of "startup_inferior".  Call "add_thread_silent" after
9798         "fork_inferior".
9799         * target.h (target_terminal_init): Move prototype to
9800         "target/target.h".
9801         (target_terminal_inferior): Likewise.
9802         (target_terminal_ours): Likewise.
9803         * target/target.h (target_terminal_init): New prototype, moved
9804         from "target.h".
9805         (target_terminal_inferior): Likewise.
9806         (target_terminal_ours): Likewise.
9807         * utils.c (gdb_flush_out_err): New function.
9808
9809 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9810
9811         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9812         * common/common-gdbthread.h: New file, with parts from
9813         "gdb/gdbthread.h".
9814         * gdbthread.h: Include "common-gdbthread.h".
9815         (switch_to_thread): Moved to "common/common-gdbthread.h".
9816
9817 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9818
9819         * Makefile.in (SFILES): Add "common/job-control.c".
9820         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9821         (COMMON_OBS): Add "job-control.o".
9822         * common/job-control.c: New file, with contents from
9823         "gdb/inflow.c".
9824         * common/job-control.h: New file, with contents from "terminal.h".
9825         * fork-child.c: Include "job-control.h".
9826         * inflow.c: Include "job-control.h".
9827         (gdb_setpgid): Move to "common/common-inflow.c".
9828         (_initialize_inflow): Move setting of "job_control" to
9829         "handle_job_control".
9830         * terminal.h (job_control): Moved to "common/common-terminal.h".
9831         (gdb_setpgid): Likewise.
9832         * top.c: Include "job_control.h".
9833         * utils.c: Likewise.
9834         (job_control): Moved to "job-control.c".
9835
9836 2017-06-07  Pedro Alves  <palves@redhat.com>
9837
9838         * Makefile.in (SFILES): Add gdb_regex.c.
9839         (COMMON_OBS): Add gdb_regex.o.
9840         * ada-lang.c (ada_add_standard_exceptions)
9841         (ada_add_exceptions_from_frame, name_matches_regex)
9842         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9843         parameter type to compiled_regex.  Adjust.
9844         (ada_exceptions_list): Use compiled_regex.
9845         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9846         std::unique_ptr<compiled_regex>.
9847         (exception_catchpoint::~exception_catchpoint): Remove regfree
9848         call.
9849         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9850         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9851         * breakpoint.c (solib_catchpoint::compiled): Now a
9852         std::unique_ptr<compiled_regex>.
9853         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9854         (check_status_catch_solib): Adjust to use compiled_regex.
9855         (add_solib_catchpoint): Adjust to use compiled_regex.
9856         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9857         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9858         compiled_regex reference.  Adjust to use it.
9859         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9860         declaration.  Include "gdb_regex.h".
9861         (apropos_cmd): Change regex parameter to compiled_regex reference.
9862         * gdb_regex.c: New file.
9863         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9864         declarations.
9865         (class compiled_regex): New.
9866         * linux-tdep.c: Include "common/gdb_optional.h".
9867         (struct mapping_regexes): New, factored out from
9868         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9869         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9870         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9871         * probe.c: Include "common/gdb_optional.h".
9872         (collect_probes): Use compiled_regex and gdb::optional and remove
9873         cleanups.
9874         * skip.c: Include "common/gdb_optional.h".
9875         (skiplist_entry::compiled_function_regexp): Now a
9876         gdb::optional<compiled_regex>.
9877         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9878         (free_skiplist_entry): Remove regfree call.
9879         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9880         compiled_regex and gdb::optional.
9881         * symtab.c: Include "common/gdb_optional.h".
9882         (search_symbols): Use compiled_regex and gdb::optional.
9883         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9884         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9885         to gdb_regex.c.
9886
9887 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9888
9889         * regcache.c (regcache::save): Avoid buffer use.
9890         (regcache::dump): Likewise.
9891
9892 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9893
9894         * sh-tdep.c (sh_pseudo_register_read): Remove
9895         MAX_REGISTER_SIZE.
9896         (sh_pseudo_register_write): Likewise.
9897         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9898         (sh64_pseudo_register_write): Likewise
9899
9900 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9901
9902         * aarch64-tdep.c (aarch64_store_return_value): Use
9903         V_REGISTER_SIZE.
9904         (aarch64_pseudo_read_value): Likewise.
9905         (aarch64_pseudo_write): Likewise.
9906
9907 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9908
9909         * regformats/regdef.h (set_register_cache): Remove the
9910         declaration.
9911
9912 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9913
9914         * frame.c (frame_unwind_register_signed): Use
9915         frame_unwind_register_value.
9916
9917 2017-06-06  Pedro Alves  <palves@redhat.com>
9918
9919         PR breakpoints/21553
9920         * breakpoint.c (create_breakpoints_sal_default)
9921         (init_breakpoint_sal, create_breakpoint_sal): Use
9922         gdb::unique_xmalloc_ptr for string parameters.
9923         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9924         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9925         (base_breakpoint_create_breakpoints_sal)
9926         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9927         (strace_marker_create_breakpoints_sal)
9928         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9929         string parameters.
9930         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9931         gdb::unique_xmalloc_ptr for string parameters.
9932         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9933         parameters.
9934
9935 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9936
9937         * alpha-tdep.c (alpha_register_to_value): Use
9938         get_frame_register_value.
9939         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9940
9941 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9942
9943         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9944         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9945         (ia64_value_to_register): Likewise.
9946         (ia64_extract_return_value): Likewise.
9947         (ia64_store_return_value): Likewise.
9948         (ia64_push_dummy_call): Likewise.
9949
9950 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9951
9952         GDB 8.0 released.
9953
9954 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9955
9956         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9957
9958 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9959
9960         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9961         parameter.
9962         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9963
9964 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9965
9966         * event-loop.c (poll_timers): Unallocate timer using delete
9967         instead of xfree.
9968
9969 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9970
9971         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9972         (struct breakpoint) <~breakpoint>: New.
9973         (struct watchpoint): Inherit from breakpoint.
9974         <~watchpoint>: New.
9975         <base>: Remove.
9976         (struct tracepoint): Inherit from breakpoint.
9977         <base>: Remove.
9978         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9979         (struct longjmp_breakpoint): Inherit from breakpoint.
9980         <~longjmp_breakpoint>: New.
9981         <base>: Remove.
9982         (new_breakpoint_from_type): Remove casts.
9983         (watchpoint_in_thread_scope): Remove reference to base field.
9984         (watchpoint_del_at_next_stop): Likewise.
9985         (update_watchpoint): Likewise.
9986         (watchpoint_check): Likewise.
9987         (bpstat_check_watchpoint): Likewise.
9988         (set_longjmp_breakpoint): Likewise.
9989         (struct fork_catchpoint): Inherit from breakpoint.
9990         <base>: Remove.
9991         (struct solib_catchpoint): Inherit from breakpoint.
9992         <~solib_catchpoint>: New.
9993         <base>: Remove.
9994         (dtor_catch_solib): Change to ...
9995         (solib_catchpoint::~solib_catchpoint): ... this.
9996         (breakpoint_hit_catch_solib): Remove reference to base field.
9997         (add_solib_catchpoint): Likewise.
9998         (create_fork_vfork_event_catchpoint): Likewise.
9999         (struct exec_catchpoint): Inherit from breakpoint.
10000         <~exec_catchpoint>: New.
10001         <base>: Remove.
10002         (dtor_catch_exec): Change to ...
10003         (exec_catchpoint::~exec_catchpoint): ... this.
10004         (dtor_watchpoint): Change to ...
10005         (watchpoint::~watchpoint): ... this.
10006         (watch_command_1): Remove reference to base field.
10007         (catch_exec_command_1): Likewise.
10008         (base_breakpoint_dtor): Change to ...
10009         (breakpoint::~breakpoint): ... this.
10010         (base_breakpoint_ops): Remove dtor field value.
10011         (longjmp_bkpt_dtor): Change to ...
10012         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10013         (strace_marker_create_breakpoints_sal): Remove reference to base
10014         field.
10015         (delete_breakpoint): Don't manually call breakpoint destructor.
10016         (create_tracepoint_from_upload): Remove reference to base field.
10017         (trace_pass_set_count): Likewise.
10018         (initialize_breakpoint_ops): Don't initialize
10019         momentary_breakpoint_ops, don't set dtors.
10020         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10021         <~ada_catchpoint>: New.
10022         <base>: Remove.
10023         (create_excep_cond_exprs): Remove reference to base field.
10024         (dtor_exception): Change to ...
10025         (ada_catchpoint::~ada_catchpoint): ... this.
10026         (dtor_catch_exception): Remove.
10027         (dtor_catch_exception_unhandled): Remove.
10028         (dtor_catch_assert): Remove.
10029         (create_ada_exception_catchpoint): Remove reference to base
10030         field.
10031         (initialize_ada_catchpoint_ops): Don't set dtors.
10032         * break-catch-sig.c (struct signal_catchpoint): Inherit from
10033         breakpoint.
10034         <~signal_catchpoint>: New.
10035         <base>: Remove.
10036         (signal_catchpoint_dtor): Change to ...
10037         (signal_catchpoint::~signal_catchpoint): ... this.
10038         (create_signal_catchpoint): Remove reference to base field.
10039         (initialize_signal_catchpoint_ops): Don't set dtor.
10040         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10041         from breakpoint.
10042         <~syscall_catchpoint>: New.
10043         <base>: Remove.
10044         (dtor_catch_syscall): Change to ...
10045         (syscall_catchpoint::~syscall_catchpoint): ... this.
10046         (create_syscall_event_catchpoint): Remove reference to base
10047         field.
10048         (initialize_syscall_catchpoint_ops): Don't set dtor.
10049         * break-catch-throw.c (struct exception_catchpoint): Inherit
10050         from breakpoint.
10051         <~exception_catchpoint>: New.
10052         <base>: Remove.
10053         (dtor_exception_catchpoint): Change to ...
10054         (exception_catchpoint::~exception_catchpoint): ... this.
10055         (handle_gnu_v3_exceptions): Remove reference to base field.
10056         (initialize_throw_catchpoint_ops): Don't set dtor.
10057         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10058         field.
10059         * remote.c (remote_get_tracepoint_status): Likewise.
10060         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10061         * tracefile.c (tracefile_fetch_registers): Likewise.
10062         * tracepoint.c (actions_command): Likewise.
10063         (validate_actionline): Likewise.
10064         (tfind_1): Likewise.
10065         (get_traceframe_location): Likewise.
10066         (find_matching_tracepoint_location): Likewise.
10067         (parse_tracepoint_status): Likewise.
10068         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10069
10070 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10071
10072         * breakpoint.c (struct longjmp_breakpoint): New struct.
10073         (is_tracepoint_type): Change return type to bool.
10074         (is_longjmp_type): New function.
10075         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10076         (set_raw_breakpoint_without_location): Use
10077         new_breakpoint_from_type.
10078         (set_raw_breakpoint): Likewise.
10079
10080 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10081
10082         * breakpoint.c (new_breakpoint_from_type): New function.
10083         (create_breakpoint_sal): Use new_breakpoint_from_type and
10084         unique_ptr.
10085         (create_breakpoint): Likewise.
10086
10087 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10088
10089         * memattr.c (mem_info_command): Rename to ...
10090         (info_mem_command): ... this.
10091         (mem_enable_command): Rename to ...
10092         (enable_mem_command): ... this.
10093         (mem_disable_command): Rename to ...
10094         (disable_mem_command): ... this.
10095         (mem_delete_command): Rename to ...
10096         (delete_mem_command): ... this.
10097         (_initialize_mem): Adjust function names.
10098
10099 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10100
10101         * btrace.c (handle_pt_insn_events): New.
10102         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10103         STATUS.  Split into this and ...
10104         (handle_pt_insn_event_flags): ... this.
10105
10106 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10107
10108         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10109         and struct pt_insn.resynced.
10110         * configure: Regenerated.
10111         * config.in: Regenerated.
10112
10113 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10114
10115         * btrace.c (ftrace_find_call_by_number): New function.
10116         (ftrace_new_function): Store objects, not pointers.
10117         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10118         ftrace_new_gap, ftrace_update_function,
10119         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10120         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10121         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10122         btrace_ends_with_single_insn, btrace_call_get): Account for
10123         btrace_thread_info::functions now storing objects.
10124         * btrace.h (struct btrace_thread_info): Add constructor.
10125         (struct btrace_thread_info) <functions>: Make std::vector.
10126         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10127         Initialize with default values.
10128         * record-btrace.c (record_btrace_frame_sniffer): Account for
10129         btrace_thread_info::functions now storing objects.
10130
10131 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10132
10133         * btrace.c: Remove typedef bfun_s.
10134         (ftrace_new_gap): Directly add gaps to the list of gaps.
10135         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10136         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10137         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10138         instead of gdb VEC.
10139
10140 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10141
10142         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10143         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10144         with btrace_thread_info::next_segment and
10145         btrace_thread_info::prev_segment.
10146         * btrace.h: Remove struct btrace_func_link.
10147         (struct btrace_function): Replace pair of function segment pointers
10148         with pair of indices.
10149         * python/py-record-btrace.c (btpy_call_prev_sibling,
10150         btpy_call_next_sibling): Replace references to
10151         btrace_thread_info::segment with btrace_thread_info::next_segment and
10152         btrace_thread_info::prev_segment.
10153         * record-btrace.c (record_btrace_frame_this_id): Use
10154         btrace_find_call_by_number.
10155
10156 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10157
10158         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10159         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10160         btrace_insn_next, btrace_insn_prev): Remove references to
10161         btrace_thread_info::flow.
10162         * btrace.h (struct btrace_function): Remove FLOW.
10163
10164 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10165
10166         * btrace.c (ftrace_find_call_by_number): New function.
10167         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10168         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10169         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10170         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10171         index.
10172         * btrace.h (struct btrace_function): Turn UP into an index.
10173         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10174         as an index.
10175         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10176         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10177         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10178
10179 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10180
10181         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10182         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10183         ftrace_update_function, ftrace_compute_global_level_offset,
10184         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10185         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10186         btrace_insn_end, btrace_is_empty): Remove references to
10187         btrace_thread_info::begin and btrace_thread_info::end.
10188         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10189         (struct btrace_thread_info) <functions>: Adjust comment.
10190         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10191         btrace_thread_info::begin.
10192
10193 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10194
10195         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10196         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10197         ftrace_update_function): Remove arguments that implicitly were always
10198         BTINFO->END.
10199         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10200         Don't pass BTINFO->END.
10201
10202 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10203
10204         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10205         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10206         btrace_find_insn_by_number): Replace function segment pointer with
10207         index.
10208         (btrace_insn_cmp): Simplify.
10209         * btrace.h: (struct btrace_insn_iterator) Rename index to
10210         insn_index.  Replace function segment pointer with index into function
10211         segment vector.
10212         * record-btrace.c (record_btrace_call_history): Replace function
10213         segment pointer use with index.
10214         (record_btrace_frame_sniffer): Retrieve function call segment through
10215         vector.
10216         (record_btrace_set_replay): Remove defunc't safety check.
10217
10218 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10219
10220         * btrace.c (btrace_ends_with_single_insn): New function.
10221         (btrace_call_get, btrace_call_number, btrace_call_begin,
10222         btrace_call_end, btrace_call_next, btrace_call_prev,
10223         btrace_find_call_by_number): Use index into call segment vector
10224         instead of pointer.
10225         (btrace_call_cmp): Simplify.
10226         * btrace.h (struct btrace_call_iterator): Replace function call segment
10227         pointer with index into vector.
10228         * record-btrace.c (record_btrace_call_history): Use index instead of
10229         pointer.
10230
10231 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10232
10233         * btrace.c (btrace_insn_begin, btrace_insn_end,
10234         btrace_find_insn_by_number): Add btinfo to iterator.
10235         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10236
10237 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10238
10239         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10240         and save pointers directly.
10241         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10242         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10243         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10244         changed signature of functions.
10245         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10246         (btrace_fetch): Remove code that adds btrace_function pointers to
10247         vector of btrace_functions.
10248         (btrace_clear): Simplify freeing vector of btrace_functions.
10249
10250 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10251
10252         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10253         Replace VEC_* with std::vector functions.
10254         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10255         (struct btrace_thread_info)<functions>: Change type to std::vector.
10256
10257 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10258
10259         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10260         "Removed targets and native configurations" up.  Merge duplicate
10261         "New commands" sub-sections.  Add "New options" sub-sections.
10262
10263 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10264
10265         * defs.h (copy_integer_to_size): New declaration.
10266         * findvar.c (copy_integer_to_size): New function.
10267         (do_cint_test): New selftest function.
10268         (copy_integer_to_size_test): Likewise.
10269         (_initialize_findvar): Likewise.
10270         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10271         (mips_fbsd_collect_reg): Use raw_collect_integer.
10272         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10273         (mips64_fill_gregset): Use raw_collect_integer
10274         (mips64_fill_fpregset): Use raw_supply_integer.
10275         * regcache.c (regcache::raw_supply_integer): New function.
10276         (regcache::raw_collect_integer): Likewise.
10277         * regcache.h: (regcache::raw_supply_integer): New declaration.
10278         (regcache::raw_collect_integer): Likewise.
10279
10280 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10281
10282         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10283         (COMMON_OBS): Add gdbarch-selftests.o.
10284         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10285         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10286         * gdbarch-selftests.c: New file.
10287         * regcache.h (regcache) <~regcache>: Mark it virtual if
10288         GDB_SELF_TEST.
10289         <raw_write>: Likewise.
10290
10291 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10292
10293         * regcache.c (current_regcache): Change it to
10294         regcache::current_regcache.
10295         (regcache_observer_target_changed): Update.
10296         (regcache_thread_ptid_changed): Make it a regcache static
10297         method.
10298         (regcache_thread_ptid_changed): Update.
10299         (class regcache_access): New.
10300         (current_regcache_test): Update.
10301         (_initialize_regcache): Update.
10302         * regcache.h: Include forward_list.
10303         (regcache): Declare regcache_thread_ptid_changed and declare
10304         registers_changed_ptid as friend.
10305
10306 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10307
10308         * i387-tdep.c (i387_register_to_value): Use register_size
10309         instead of TYPE_LENGTH.
10310         * m68k-tdep.c (m68k_register_to_value): Likewise.
10311
10312 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10313
10314         * i387-tdep.c (i387_convert_register_p): Return false if type
10315         code isn't TYPE_CODE_FLT.
10316
10317 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10318
10319         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10320         length is 4.
10321         (alpha_register_to_value): Remove type length check.
10322         (alpha_value_to_register): Likewise.
10323
10324 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10325
10326         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10327         TYPE_CODE_FLT.
10328
10329 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10330
10331         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10332         TYPE_CODE_FLT or not.
10333
10334 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10335
10336         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10337         * avr-tdep.c (avr_gdbarch_init): Likewise.
10338         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10339         * cris-tdep.c (cris_gdbarch_init): Likewise.
10340         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10341         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10342         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10343         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10344         * mep-tdep.c (mep_gdbarch_init): Likewise.
10345         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10346         * mips-tdep.c (mips_gdbarch_init): Likewise.
10347         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10348         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10349         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10350         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10351         * v850-tdep.c (v850_gdbarch_init): Likewise.
10352
10353 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10354
10355         * selftest-arch.c (tests_with_arch): Call registers_changed
10356         and reinit_frame_cache.
10357         * selftest.c (run_self_tests): Likewise.
10358
10359 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10360
10361         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10362         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10363
10364 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10365
10366         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10367         set_gdbarch_print_insn.
10368
10369 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10370
10371         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10372         set_gdbarch_print_insn.
10373
10374 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10375
10376         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10377         set_gdbarch_print_insn.
10378         * arc-tdep.c (arc_gdbarch_init): Likewise.
10379         * arch-utils.c: include dis-asm.h.
10380         (default_print_insn): New function.
10381         * arch-utils.h (default_print_insn): Declare.
10382         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10383         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10384         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10385         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10386         * frv-tdep.c (frv_gdbarch_init): Likewise.
10387         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10388         * gdbarch.sh (print_insn): Use default_print_insn.
10389         * gdbarch.c: Regenerated.
10390         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10391         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10392         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10393         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10394         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10395         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10396         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10397         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10398         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10399         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10400         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10401         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10402         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10403         * mt-tdep.c (mt_gdbarch_init): Likewise.
10404         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10405         * nios2-tdep.c (nios2_print_insn): Remove.
10406         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10407         * rx-tdep.c (rx_gdbarch_init): Likewise.
10408         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10409         * score-tdep.c (score_print_insn): Remove.
10410         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10411         * sh-tdep.c (sh_gdbarch_init): Likewise.
10412         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10413         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10414         * tic6x-tdep.c (tic6x_print_insn): Remove.
10415         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10416         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10417         * v850-tdep.c (v850_gdbarch_init): Likewise.
10418         * vax-tdep.c (vax_gdbarch_init): Likewise.
10419         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10420         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10421
10422 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10423
10424         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10425         (MIPS_FP0_REGNUM): Remove.
10426         (MIPS_FSR_REGNUM): Remove.
10427         (mips_fbsd_supply_fpregs): Use mips_regnum.
10428         (mips_fbsd_supply_gregs): Likewise.
10429         (mips_fbsd_collect_fpregs): Likewise.
10430         (mips_fbsd_collect_gregs): Likewise.
10431
10432 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10433
10434         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10435         (getpfpregs_supplies): New function.
10436         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10437         getfpregs_supplies.
10438         (mips_fbsd_store_inferior_registers): Likewise.
10439
10440 2017-05-22  Pedro Alves <palves@redhat.com>
10441
10442         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10443         maintainer.
10444
10445 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10446
10447         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10448         (store_register): Likewise.
10449         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10450         (get_decimal_float_return_value): Likewise.
10451         (do_ppc_sysv_return_value): Likewise.
10452         (ppc64_sysv_abi_push_integer): Likewise.
10453         (ppc64_sysv_abi_push_freg): Likewise.
10454         (ppc64_sysv_abi_return_value_base): Likewise.
10455         (ppc64_sysv_abi_return_value): Likewise.
10456         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10457         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10458         * rs6000-nat.c: Likewise.
10459         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10460         (rs6000_value_to_register): Likewise.
10461         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10462
10463 2017-05-21  Tom Tromey  <tom@tromey.com>
10464
10465         PR rust/21466:
10466         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10467         arrays as "[T]", not "[T; ]".
10468
10469 2017-05-19  Tom Tromey  <tom@tromey.com>
10470
10471         PR rust/21484:
10472         * rust-lang.c (exp_descriptor_rust): New function.
10473         (rust_language_defn): Use it.
10474         * p-lang.c (pascal_language_defn): Update.
10475         * opencl-lang.c (opencl_language_defn): Update.
10476         * objc-lang.c (objc_language_defn): Update.
10477         * m2-lang.c (m2_language_defn): Update.
10478         * language.h (struct language_defn)
10479         <la_watch_location_expression>: New member.
10480         * language.c (unknown_language_defn, auto_language_defn)
10481         (local_language_defn): Update.
10482         * go-lang.c (go_language_defn): Update.
10483         * f-lang.c (f_language_defn): Update.
10484         * d-lang.c (d_language_defn): Update.
10485         * c-lang.h (c_watch_location_expression): Declare.
10486         * c-lang.c (c_watch_location_expression): New function.
10487         (c_language_defn, cplus_language_defn, asm_language_defn)
10488         (minimal_language_defn): Use it.
10489         * breakpoint.c (watch_command_1): Call
10490         la_watch_location_expression.
10491         * ada-lang.c (ada_language_defn): Update.
10492
10493 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10494
10495         PR tui/21482
10496         * gdb_curses.h (NOMACROS): Define.
10497         (NCURSES_NOMACROS): Define.
10498
10499 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10500
10501         PR tui/21482
10502         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10503         arg to char *.
10504         * tui/tui-wingeneral.c (box_win): Likewise.
10505         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10506         (tui_show_source_line): Likewise.
10507         (tui_show_exec_info_content): Likewise.
10508
10509 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10510
10511         * sparc-tdep.c (sparc_structure_return_p)
10512         (sparc_arg_on_registers_p): New functions.
10513         (sparc32_store_arguments): Use them.
10514         * sparc64-tdep.c (sparc64_16_byte_align_p)
10515         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10516         Handle TYPE_CODE_ARRAY.
10517
10518 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10519
10520         * cli/cli-decode.c (add_alias_cmd): New function.
10521         * command.h (add_alias_cmd): Declare.
10522         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10523         instead call add_alias_cmd.
10524
10525 2017-05-17  Pedro Alves  <palves@redhat.com>
10526
10527         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10528         (nat_makefile_frag): ... this.  All references updated.
10529         * configure.ac: Likewise.
10530         * configure.nat: Likewise.  Enhance comments.
10531         * configure: Regenerate.
10532
10533 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10534
10535         * procfs.c (procfs_create_inferior): Change prototype to match
10536         definition.
10537
10538 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10539
10540         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10541         C++ compiler warning.
10542
10543 2017-05-12  Tom Tromey  <tom@tromey.com>
10544
10545         PR rust/21483:
10546         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10547         recurse, just call value_struct_elt directly.
10548
10549 2017-05-12  Tom Tromey  <tom@tromey.com>
10550
10551         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10552         OP_RUST_ARRAY>: Fix.
10553
10554 2017-05-12  Tom Tromey  <tom@tromey.com>
10555
10556         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10557
10558 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10559
10560         * regcache.c: Include <forward_list>.
10561         (struct regcache_list): Remove.
10562         (current_regcache): Update.
10563         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10564         (regcache_thread_ptid_changed): Likewise.
10565         (registers_changed_ptid): Likewise.
10566         (current_regcache_size): Likewise.
10567
10568 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10569
10570         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10571         (current_regcache_size): New function.
10572         (current_regcache_test): New function.
10573         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10574
10575 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10576
10577         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10578         (print_gp_register_row): Use get_frame_register_value.
10579
10580 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10581
10582         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10583         (mips_supply_fpregset): Likewise.
10584         (mips64_supply_gregset): Likewise.
10585
10586 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10587
10588         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10589         regcache->raw_supply_zeroed.
10590
10591 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10592
10593         * configure.nat: Rearrange 'case' statements to match
10594         host before cpu.
10595
10596 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10597
10598         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10599         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10600         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10601         "@nat_extra_makefile_frag@".
10602         (Makefile): Remove dependency on "@frags@".
10603         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10604         (data-directory/Makefile): Likewise.
10605         * config/aarch64/linux.mh: Deleted; moved contents to
10606         "gdb/configure.nat".
10607         * config/alpha/alpha-linux.mh: Likewise.
10608         * config/alpha/nbsd.mh: Likewise.
10609         * config/arm/linux.mh: Likewise.
10610         * config/arm/nbsdelf.mh: Likewise.
10611         * config/i386/cygwin.mh: Likewise.
10612         * config/i386/cygwin64.mh: Likewise.
10613         * config/i386/darwin.mh: Likewise.
10614         * config/i386/fbsd.mh: Likewise.
10615         * config/i386/fbsd64.mh: Likewise.
10616         * config/i386/go32.mh: Likewise.
10617         * config/i386/i386gnu.mh: Likewise.
10618         * config/i386/i386sol2.mh: Likewise.
10619         * config/i386/linux.mh: Likewise.
10620         * config/i386/linux64.mh: Likewise.
10621         * config/i386/mingw.mh: Likewise.
10622         * config/i386/mingw64.mh: Likewise.
10623         * config/i386/nbsd64.mh: Likewise.
10624         * config/i386/nbsdelf.mh: Likewise.
10625         * config/i386/nto.mh: Likewise.
10626         * config/i386/obsd.mh: Likewise.
10627         * config/i386/obsd64.mh: Likewise.
10628         * config/i386/sol2-64.mh: Likewise.
10629         * config/ia64/linux.mh: Likewise.
10630         * config/m32r/linux.mh: Likewise.
10631         * config/m68k/linux.mh: Likewise.
10632         * config/m68k/nbsdelf.mh: Likewise.
10633         * config/m68k/obsd.mh: Likewise.
10634         * config/m88k/obsd.mh: Likewise.
10635         * config/mips/fbsd.mh: Likewise.
10636         * config/mips/linux.mh: Likewise.
10637         * config/mips/nbsd.mh: Likewise.
10638         * config/mips/obsd64.mh: Likewise.
10639         * config/pa/linux.mh: Likewise.
10640         * config/pa/nbsd.mh: Likewise.
10641         * config/pa/obsd.mh: Likewise.
10642         * config/powerpc/aix.mh: Likewise.
10643         * config/powerpc/fbsd.mh: Likewise.
10644         * config/powerpc/linux.mh: Likewise.
10645         * config/powerpc/nbsd.mh: Likewise.
10646         * config/powerpc/obsd.mh: Likewise.
10647         * config/powerpc/ppc64-linux.mh: Likewise.
10648         * config/powerpc/spu-linux.mh: Likewise.
10649         * config/s390/linux.mh: Likewise.
10650         * config/sh/nbsd.mh: Likewise.
10651         * config/sparc/fbsd.mh: Likewise.
10652         * config/sparc/linux.mh: Likewise.
10653         * config/sparc/linux64.mh: Likewise.
10654         * config/sparc/nbsd64.mh: Likewise.
10655         * config/sparc/nbsdelf.mh: Likewise.
10656         * config/sparc/obsd64.mh: Likewise.
10657         * config/sparc/sol2.mh: Likewise.
10658         * config/tilegx/linux.mh: Likewise.
10659         * config/vax/nbsdelf.mh: Likewise.
10660         * config/vax/obsd.mh: Likewise.
10661         * config/xtensa/linux.mh: Likewise.
10662         * config/i386/i386gnu.mn: New file, with excerpts from
10663         "config/i386/i386gnu.mh".
10664         * configure: Regenerate.
10665         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10666         *.mh files under "gdb/config".
10667         * configure.nat: New file, with contents from the
10668         "gdb/config/*/*.mh" files.
10669
10670 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10671
10672         * btrace.c (btrace_clear): Free insn vector.
10673
10674 2017-05-05  Pedro Alves  <palves@redhat.com>
10675
10676         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10677         * configure: Regenerate.
10678
10679 2017-05-04  Pedro Alves  <palves@redhat.com>
10680
10681         * Makefile.in (SFILES): Add progspace-and-thread.c.
10682         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10683         (COMMON_OBS): Add progspace-and-thread.o.
10684         * breakpoint.c: Include "progspace-and-thread.h".
10685         (update_inserted_breakpoint_locations)
10686         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10687         Use scoped_restore_current_pspace_and_thread.
10688         (create_std_terminate_master_breakpoint): Use
10689         scoped_restore_current_program_space.
10690         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10691         (print_breakpoint_location): Use
10692         scoped_restore_current_program_space.
10693         (bp_loc_is_permanent): Use
10694         scoped_restore_current_pspace_and_thread.
10695         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10696         (download_tracepoint_locations): Use
10697         scoped_restore_current_pspace_and_thread.
10698         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10699         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10700         (enum step_over_calls_kind): Moved from inferior.h.
10701         (class scoped_restore_current_thread): New class.
10702         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10703         declaration.
10704         (scoped_restore_current_thread): New class.
10705         * infcmd.c: Include "common/gdb_optional.h".
10706         (continue_1, proceed_after_attach): Use
10707         scoped_restore_current_thread.
10708         (notice_new_inferior): Use scoped_restore_current_thread.
10709         * inferior.c: Include "progspace-and-thread.h".
10710         (restore_inferior, save_current_inferior): Delete.
10711         (add_inferior_command, clone_inferior_command): Use
10712         scoped_restore_current_pspace_and_thread.
10713         * inferior.h (scoped_restore_current_inferior): New class.
10714         * infrun.c: Include "progspace-and-thread.h" and
10715         "common/gdb_optional.h".
10716         (follow_fork_inferior): Use
10717         scoped_restore_current_pspace_and_thread.
10718         (scoped_restore_exited_inferior): New class.
10719         (handle_vfork_child_exec_or_exit): Use
10720         scoped_restore_exited_inferior,
10721         scoped_restore_current_pspace_and_thread,
10722         scoped_restore_current_thread and scoped_restore.
10723         (fetch_inferior_event): Use scoped_restore_current_thread.
10724         * linespec.c (decode_line_full, decode_line_1): Use
10725         scoped_restore_current_program_space.
10726         * mi/mi-main.c: Include "progspace-and-thread.h".
10727         (exec_continue): Use scoped_restore_current_thread.
10728         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10729         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10730         * proc-service.c (ps_pglobal_lookup): Use
10731         scoped_restore_current_program_space.
10732         * progspace-and-thread.c: New file.
10733         * progspace-and-thread.h: New file.
10734         * progspace.c (release_program_space, clone_program_space): Use
10735         scoped_restore_current_program_space.
10736         (restore_program_space, save_current_program_space)
10737         (save_current_space_and_thread): Delete.
10738         (switch_to_program_space_and_thread): Moved to
10739         progspace-and-thread.c.
10740         * progspace.h (save_current_program_space)
10741         (save_current_space_and_thread): Delete declarations.
10742         (scoped_restore_current_program_space): New class.
10743         * remote.c (remote_btrace_maybe_reopen): Use
10744         scoped_restore_current_thread.
10745         * symtab.c: Include "progspace-and-thread.h".
10746         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10747         * thread.c (print_thread_info_1): Use
10748         scoped_restore_current_thread.
10749         (struct current_thread_cleanup): Delete.
10750         (do_restore_current_thread_cleanup)
10751         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10752         (scoped_restore_current_thread::~scoped_restore_current_thread):
10753         ... this new dtor.
10754         (make_cleanup_restore_current_thread): Rename/convert to ...
10755         (scoped_restore_current_thread::scoped_restore_current_thread):
10756         ... this new ctor.
10757         (thread_apply_all_command): Use scoped_restore_current_thread.
10758         (thread_apply_command): Use scoped_restore_current_thread.
10759         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10760         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10761
10762 2017-05-04  Pedro Alves  <palves@redhat.com>
10763
10764         * thread.c (make_cleanup_restore_current_thread): Move
10765         find_thread_ptid call before the is_stopped call.  Assert that the
10766         thread is found.  Replace is_stopped call by checking the thread's
10767         state directly.  Remove unnecessary NULL-thread check.
10768
10769 2017-05-04  Pedro Alves  <palves@redhat.com>
10770
10771         * corelow.c (thread_section_name): New class.
10772         (get_core_register_section, get_core_siginfo): Use it.
10773
10774 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10775
10776         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10777         (get_core_register_section): Remove xfree of NULL pointer.
10778
10779 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10780
10781         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10782         * regcache.c (regcache::raw_supply_zeroed): New function.
10783         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10784
10785 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10786
10787         * gdbarch.sh: Remove commented out definition of
10788         TARGET_CHAR_BIT.
10789         * gdbarch.h: Re-generate.
10790
10791 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10792
10793         * configure: Regenerate.
10794
10795 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10796
10797         * solib-target.c (solib_target_relocate_section_addresses):
10798         Remove num_section_bases, num_bases, segment_bases variables.
10799
10800 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10801
10802         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10803
10804 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10805
10806         * solib-target.c: Include <vector>
10807         (struct lm_info_target) <~lm_info_target>: Remove.
10808         <segment_bases, section_bases>: Change type to
10809         std::vector<CORE_ADDR>.
10810         (library_list_start_segment, library_list_start_section,
10811         library_list_end_library,
10812         solib_target_relocate_section_addresses): Adjust.
10813
10814 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10815
10816         * gdbarch.sh (software_single_step): Change return type to
10817         std::vector<CORE_ADDR>.
10818         * gdbarch.c, gdbarch.h: Re-generate.
10819         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10820         Adjust.
10821         (arm_deal_with_atomic_sequence_raw): Adjust.
10822         (thumb_get_next_pcs_raw): Adjust.
10823         (arm_get_next_pcs_raw): Adjust.
10824         (arm_get_next_pcs): Adjust.
10825         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10826         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10827         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10828         (alpha_software_single_step): Adjust.
10829         * alpha-tdep.h (alpha_software_single_step): Adjust.
10830         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10831         * arm-tdep.c (arm_software_single_step): Adjust.
10832         (arm_breakpoint_kind_from_current_state): Adjust.
10833         * arm-tdep.h (arm_software_single_step): Adjust.
10834         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10835         * cris-tdep.c (cris_software_single_step): Adjust.
10836         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10837         (micromips_deal_with_atomic_sequence): Adjust.
10838         (deal_with_atomic_sequence): Adjust.
10839         (mips_software_single_step): Adjust.
10840         * mips-tdep.h (mips_software_single_step): Adjust.
10841         * moxie-tdep.c (moxie_software_single_step): Adjust.
10842         * nios2-tdep.c (nios2_software_single_step): Adjust.
10843         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10844         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10845         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10846         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10847         * sparc-tdep.c (sparc_software_single_step): Adjust.
10848         * spu-tdep.c (spu_software_single_step): Adjust.
10849         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10850
10851 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10852
10853         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10854         * gdbarch.h: Re-generate.
10855
10856 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10857
10858         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10859         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10860         * python/py-instruction.c, python/py-instruction.h: New file.
10861         * python/py-record.c: Add py-instruction.h include.
10862         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10863         gdb.RecordInstruction.
10864         * python/python-internal.h: Add gdbpy_initialize_instruction
10865         declaration.
10866         * python/python.c (do_start_initialization): Add
10867         gdbpy_initialize_instruction.
10868
10869 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10870
10871         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10872         Remove.
10873         (btrace_func_from_recpy_func): New function.
10874         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10875         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10876         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10877         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10878         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10879         Also, use new helper functions.
10880         (btpy_list_item): Use new helper functions.
10881         (recpy_bt_function_call_history): Use new type name.
10882         (btpy_call_getset): Remove.
10883         (gdbpy_initialize_btrace): Remove code to initialize
10884         gdb.BtraceFunctionCall.
10885         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10886         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10887         recpy_bt_func_prev, recpy_bt_func_next): New export.
10888         * python/py-record.c (recpy_func_type): New static object.
10889         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10890         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10891         recpy_func_next): New function.
10892         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10893         (recpy_func_getset): New static object.
10894         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10895         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10896
10897 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10898
10899         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10900         (btpy_object, btpy_insn_type, btpy_new): Remove.
10901         (btpy_list_object): Use gdb.RecordInstruction type instead of
10902         gdb.BtraceInstruction type.
10903         (btrace_insn_from_recpy_insn): New function.
10904         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10905         btpy_new.
10906         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10907         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10908         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10909         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10910         instead of btpy_object.
10911         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10912         btpy_insn_data, btpy_insn_decode): Rename to ...
10913         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10914         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10915         recpy_bt_insn_decode): This.  Also, use new helper functions.
10916         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10917         recpy_insn_type.
10918         (btpy_insn_getset): Remove.
10919         (gdbpy_initialize_btrace): Remove code to initialize
10920         gdb.BtraceInstruction.  Use recpy_element_object.
10921         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10922         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10923         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10924         * python/py-record.c (recpy_insn_type): New static object.
10925         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10926         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10927         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10928         New function.
10929         (recpy_insn_getset): New static object.
10930         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10931         * python/py-record.h (recpy_element_object): New typedef.
10932         (recpy_insn_type, recpy_insn_new): New export.
10933
10934 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10935
10936         * py-record-btrace.c (btpy_insn_new): Removed.
10937         (btpy_insn_or_gap_new): New function.
10938         (btpy_insn_error): Removed.
10939         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10940         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10941         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10942         btpy_insn_or_gap_new instead of btpy_insn_new.
10943         (btpy_insn_getset): Remove btpy_insn_error.
10944         * py-record.c (recpy_gap_type): New static object.
10945         (recpy_gap_object): New typedef.
10946         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10947         recpy_gap_reason_string): New function.
10948         (recpy_gap_getset): New static object.
10949         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10950         * py-record.h (recpy_gap_new): New export.
10951
10952 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10953
10954         * python/py-record.c (recpy_ptid): Remove.
10955         (recpy_record_getset): Remove recpy_ptid.
10956
10957 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10958
10959         * btrace.c (btrace_fetch): Set inferior_ptid.
10960         * python/py-record-btrace.c: Add "py-record.h" include.
10961         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10962         recpy_bt_end, recpy_bt_instruction_history,
10963         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10964         in gdb.Record object instead of current ptid.
10965         * python/py-record.c: Include new "py-record.h" file.
10966         (recpy_record_object): Moved to py-record.h.
10967         * python/py-record.h: New file.
10968
10969 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10970
10971         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10972         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10973         indentation.
10974
10975 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10976
10977         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10978         the past maintainers section.
10979
10980 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10981
10982         * infcmd.c (get_return_value): Use regcache ctor, and remove
10983         cleanup.
10984
10985 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10986             Pedro Alves  <palves@redhat.com>
10987
10988         * regcache.c (regcache::regcache): New tag dispatch ctor.
10989         (do_cooked_read): Moved above.
10990         (regcache_dup): Use the tag dispatch ctor..
10991         * regcache.h (regcache): Declare ctor, delete copy ctor and
10992         assignment operator, remove friend regcache_dup.
10993
10994 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10995
10996         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10997         call method save instead of regcache_cpy.
10998         * regcache.h (struct regcache): Make regcache_dup a friend.
10999
11000 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11001
11002         * regcache.c (struct regcache): Move to regcache.h
11003         (regcache::arch): New method.
11004         (regcache_get_ptid): Update.
11005         (get_regcache_arch): Call arch method.
11006         (get_regcache_aspace): Call method aspace.
11007         (register_buffer): Change it to method.
11008         (regcache_save): Change it to regcache::save.
11009         (regcache_restore): Likewise.
11010         (regcache_cpy_no_passthrough): Remove the declaration.
11011         (regcache_cpy): Call methods restore and cpy_no_passthrough.
11012         (regcache_cpy_no_passthrough): Change it to method
11013         cpy_no_passthrough.
11014         (regcache_register_status): Change it to method
11015         get_register_status.
11016         (regcache_invalidate): Change it to method invalidate.
11017         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11018         (regcache_raw_update): Change it to method raw_update.
11019         (regcache_raw_read): Likewise.
11020         (regcache_raw_read_signed): Likewise.
11021         (regcache_raw_read_unsigned): Likewise.
11022         (regcache_raw_write_signed): Likewise.
11023         (regcache_raw_write_unsigned): Likewise.
11024         (regcache_cooked_read): Likewise.
11025         (regcache_cooked_read_value): Likewise.
11026         (regcache_cooked_read_signed): Likewise.
11027         (regcache_cooked_read_unsigned): Likewise.
11028         (regcache_cooked_write_signed): Likewise.
11029         (regcache_cooked_write_unsigned): Likewise.
11030         (regcache_raw_set_cached_value): Likewise.
11031         (regcache_raw_write): Likewise.
11032         (regcache_cooked_write): Likewise.
11033         (regcache_xfer_part): Likewise.
11034         (regcache_raw_read_part): Likewise.
11035         (regcache_raw_write_part): Likewise.
11036         (regcache_cooked_read_part): Likewise.
11037         (regcache_cooked_write_part): Likewise.
11038         (regcache_raw_supply): Likewise.
11039         (regcache_raw_collect): Likewise.
11040         (regcache_transfer_regset): Likewise.
11041         (regcache_supply_regset): Likewise.
11042         (regcache_collect_regset): Likewise.
11043         (regcache_debug_print_register): Likewise.
11044         (enum regcache_dump_what): Move it to regcache.h.
11045         (regcache_dump): Change it to method dump.
11046         * regcache.h (enum regcache_dump_what): New.
11047         (class regcache): New.
11048         * target.c (target_fetch_registers): Call method
11049         debug_print_register.
11050         (target_store_registers): Likewise.
11051
11052 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11053
11054         * windows-nat.c (struct lm_info_windows): Initialize field.
11055         (windows_make_so): Allocate lm_info_windows with new.
11056         (windows_free_so): Free lm_info_windows with delete.
11057
11058 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11061         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11062         cleanup.
11063         (darwin_free_so): Free lm_info_darwin with delete.
11064
11065 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11066
11067         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11068         <l_addr_p>: Change type to bool.
11069         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11070         (svr4_free_so): Free lm_info_svr4 with delete.
11071         (svr4_copy_library_list): Replace memcpy with call to copy
11072         constructor.
11073         (library_list_start_library, svr4_default_sos): Allocate
11074         lm_info_svr4 with new.
11075
11076 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11077
11078         * solib-target.c (struct lm_info_target): Add destructor,
11079         initialize fields.
11080         <name>: Change type to std::string.
11081         (library_list_start_library): Allocate lm_info_target with new.
11082         (solib_target_free_library_list): Free lm_info_target with
11083         delete.
11084         (solib_target_current_sos): Adapt to std::string.
11085         (solib_target_free_so): Free lm_info_target with delete.
11086
11087 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11088
11089         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11090         fields.
11091         (frv_current_sos): Allocate lm_info_frv with new.
11092         (frv_relocate_main_executable): Free lm_info_frv with delete,
11093         allocate with new.
11094         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11095
11096 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11097
11098         * solib-frv.c (struct lm_info_frv): Fix indentation.
11099
11100 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11101
11102         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11103         map field.
11104         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11105         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11106         and allocate with new.
11107         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11108
11109 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11110
11111         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11112         <filename, member_name>: Change type to std::string.
11113         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11114         (library_list_start_library): Allocate lm_info_aix with new.
11115         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11116         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11117         with copy constructor.
11118
11119 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11120
11121         * solist.h (struct lm_info): Remove.
11122         (struct lm_info_base): New class.
11123         (struct so_list) <lm_info>: Change type to lm_info_base *.
11124         * nto-tdep.c (struct lm_info): Remove.
11125         (lm_addr): Adjust.
11126         * solib-aix.c (struct lm_info): Rename to ...
11127         (struct lm_info_aix): ... this.  Extend lm_info_base.
11128         (lm_info_p): Rename to ...
11129         (lm_info_aix_p): ... this, and adjust.
11130         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11131         solib_aix_parse_libraries, library_list_start_library,
11132         solib_aix_free_library_list, solib_aix_parse_libraries,
11133         solib_aix_get_library_list,
11134         solib_aix_relocate_section_addresses, solib_aix_free_so,
11135         solib_aix_get_section_offsets,
11136         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11137         Adjust.
11138         (struct solib_aix_inferior_data) <library_list>: Adjust.
11139         * solib-darwin.c (struct lm_info): Rename to ...
11140         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11141         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11142         * solib-dsbt.c (struct lm_info): Rename to ...
11143         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11144         (struct dsbt_info) <main_executable_lm_info): Adjust.
11145         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11146         dsbt_relocate_section_addresses): Adjust.
11147         * solib-frv.c (struct lm_info): Rename to ...
11148         (struct lm_info_frv): ... this.  Extend lm_info_base.
11149         (main_executable_lm_info): Adjust.
11150         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11151         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11152         find_canonical_descriptor_in_load_object,
11153         frv_fdpic_find_canonical_descriptor): Adjust.
11154         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11155         to lm_info_svr4.
11156         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11157         svr4_clear_so, svr4_copy_library_list,
11158         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11159         svr4_current_sos, svr4_fetch_objfile_link_map,
11160         solist_update_incremental): Adjust.
11161         * solib-svr4.h (struct lm_info_svr4): Move here from
11162         solib-svr4.c.
11163         * solib-target.c (struct lm_info): Rename to ...
11164         (struct lm_info_target): ... this.  Extend lm_info_base.
11165         (lm_info_p): Rename to ...
11166         (lm_info_target_p): ... this.
11167         (solib_target_parse_libraries, library_list_start_segment,
11168         library_list_start_section, library_list_start_library,
11169         library_list_end_library, solib_target_free_library_list,
11170         solib_target_current_sos, solib_target_free_so,
11171         solib_target_relocate_section_addresses): Adjust.
11172         * windows-nat.c (struct lm_info): Rename to ...
11173         (struct lm_info_windows): ... this.  Extend lm_info_base.
11174         (windows_make_so, handle_load_dll, handle_unload_dll,
11175         windows_xfer_shared_libraries): Adjust.
11176
11177 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11178
11179         * solib-darwin.c (struct darwin_so_list): Remove.
11180         (darwin_current_sos): Allocate an so_list object instead of a
11181         darwin_so_list, separately allocate an lm_info object.
11182         (darwin_free_so): Free lm_info.
11183
11184 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11185
11186         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11187         with fprintf_filtered.
11188
11189 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11190
11191         * regcache.c (regcache::regcache): New function.
11192         (regcache::~regcache): New function.
11193         (regcache_xmalloc_1): Remove.
11194         (regcache_xmalloc): Call new regcache.
11195         (regcache_xfree): Call delete regcache.
11196         (get_thread_arch_aspace_regcache): Call new regcache.
11197
11198 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11199
11200         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11201         lwp instead of ptid_get_lwp.
11202
11203 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11204
11205         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11206         lwp_info instead of getting from inferior_ptid.
11207
11208 2017-04-27  Keith Seitz  <keiths@redhat.com>
11209
11210         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11211         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11212         (CV_CONVERSION_BADNESS): Define.
11213         (rank_one_type): Remove overly restrictive rvalue reference
11214         rank checks.
11215         Add cv-qualifier checks and subranks for type equality.
11216         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11217         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11218         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11219
11220 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11221
11222         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11223         count when creating the object.
11224
11225 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11226             Ulrich Weigand  <uweigand@de.ibm.com>
11227
11228         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11229         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11230         is used in AIX.
11231         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11232         (process_xcoff_symbol): Likewise.
11233         (scan_xcoff_symtab): Likewise.
11234
11235 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11236
11237         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11238         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11239         (ia64_access_reg): Use get_frame_register_unsigned.
11240         (ia64_access_rse_reg): Likewise.
11241         (ia64_libunwind_frame_prev_register): Likewise.
11242
11243 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11244
11245         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11246         * gdbarch.c: Regenerated.
11247         * gdbarch.h: Regenerated.
11248         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11249         visibility external.
11250         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11251         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11252         (enum cfa_how_kind): Move to ...
11253         (struct dwarf2_frame_state_reg_info): Likewise.
11254         (struct dwarf2_frame_state): Likewise.
11255         * dwarf2-frame.h: ... here.
11256         (dwarf2_frame_state_alloc_regs): New declaration.
11257         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11258         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11259
11260 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11261
11262         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11263         regcache_raw_read_unsigned.
11264         (xtensa_pseudo_register_write): Likewise.
11265
11266 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11267
11268         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11269         (nds32_pseudo_register_write): Likewise.
11270
11271 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11272
11273         * regcache.c (struct regcache) <readonly_p>: Change its type
11274         to bool.
11275         (regcache_xmalloc_1): Update parameter type and callers update.
11276
11277 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11278
11279         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11280         set_gdbarch_wchar_bit.
11281         * arm-tdep.c (arm_gdbarch_init): Likewise.
11282
11283 2017-04-25  Pedro Alves  <palves@redhat.com>
11284
11285         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11286         (BothAreRelocatable, memcopy, memmove): Don't define.
11287         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11288         macros.
11289
11290 2017-04-25  Pedro Alves  <palves@redhat.com>
11291
11292         * common/common-defs.h: Include "common/poison.h".
11293         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11294         and adjust.
11295         * common/poison.h: New file.
11296         * common/traits.h: Include <type_traits>.
11297         (Not, Or, Requires): New, moved from common/function-view.h.
11298
11299 2017-04-25  Pedro Alves  <palves@redhat.com>
11300
11301         * breakpoint.h (struct breakpoint): In-class initialize all
11302         fields.  Make boolean fields "bool".
11303         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11304         memset call and initializations no longer necessary.
11305
11306 2017-04-25  Pedro Alves  <palves@redhat.com>
11307
11308         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11309         reference.
11310         (pt_btrace_insn): New function.
11311         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11312
11313 2017-04-25  Pedro Alves  <palves@redhat.com>
11314
11315         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11316         "base" field and inherit from "bp_location" instead.  Add
11317         non-default ctor.
11318         (allocate_location_exception): Use new non-default ctor.
11319         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11320         (init_bp_location): Convert to ...
11321         (bp_location::bp_location): ... this new ctor, and remove memset
11322         call.
11323         (base_breakpoint_allocate_location): Use the new non-default ctor.
11324         * breakpoint.h (bp_location): Now a class.  Declare default and
11325         non-default ctors.  In-class initialize all members.
11326         (init_bp_location): Remove declaration.
11327
11328 2017-04-25  Pedro Alves  <palves@redhat.com>
11329
11330         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11331         assignment operator.
11332
11333 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11334
11335         * doublest.c (convert_doublest_to_floatformat): Call
11336         floatformat_totalsize_bytes.
11337
11338 2017-04-22  Tom Tromey  <tom@tromey.com>
11339
11340         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11341         ui_out_emit_list.
11342         * stack.c (print_frame): Use ui_out_emit_list.
11343         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11344         ui_out_emit_list.
11345         * mi/mi-main.c (print_one_inferior)
11346         (mi_cmd_data_list_register_names)
11347         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11348         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11349         ui_out_emit_list.
11350         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11351         (mi_output_solib_attribs): Use ui_out_emit_list,
11352         ui_out_emit_tuple.
11353         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11354         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11355         (mi_cmd_stack_list_args, list_args_or_locals): Use
11356         ui_out_emit_list.
11357         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11358         * breakpoint.c (print_solib_event, output_thread_groups): Use
11359         ui_out_emit_list.
11360
11361 2017-04-22  Tom Tromey  <tom@tromey.com>
11362
11363         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11364         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11365         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11366
11367 2017-04-22  Tom Tromey  <tom@tromey.com>
11368
11369         * tracepoint.c (tvariables_info_1)
11370         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11371
11372 2017-04-22  Tom Tromey  <tom@tromey.com>
11373
11374         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11375         annotate_arg_emitter.
11376         * breakpoint.c (print_mention_watchpoint)
11377         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11378         * annotate.h (struct annotate_arg_emitter): New.
11379
11380 2017-04-22  Tom Tromey  <tom@tromey.com>
11381
11382         * record-btrace.c (record_btrace_insn_history)
11383         (record_btrace_insn_history_range, record_btrace_call_history)
11384         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11385         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11386         ui_out_emit_tuple.
11387         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11388         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11389         * skip.c (skip_info): Use ui_out_emit_tuple.
11390         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11391         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11392         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11393         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11394         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11395         ui_out_emit_tuple.
11396         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11397         (output_register, mi_cmd_data_read_memory)
11398         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11399         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11400         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11401         Use ui_out_emit_tuple.
11402         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11403         ui_out_emit_tuple.
11404         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11405         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11406         * linux-thread-db.c (info_auto_load_libthread_db): Use
11407         ui_out_emit_tuple.
11408         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11409         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11410         * disasm.c (do_mixed_source_and_assembly_deprecated)
11411         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11412         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11413         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11414         * breakpoint.c (print_one_breakpoint_location)
11415         (print_one_breakpoint): Use ui_out_emit_tuple.
11416         * auto-load.c (print_script, info_auto_load_cmd): Use
11417         ui_out_emit_tuple.
11418         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11419
11420 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11421
11422         * thread.c (print_thread_info_1): Remove dead code.
11423
11424 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11425
11426         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11427         GDB_SELF_TEST.
11428         * arm-tdep.c (selftests::arm_record_test): Likewise.
11429
11430 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11431
11432         * regcache.c (regcache_restore): Remove argument 2.  Replace
11433         argument 3 with regcache.  Get register status from
11434         src->register_status and get register contents from
11435         register_buffer (src, regnum).
11436         (regcache_cpy): Update.
11437
11438 2017-04-19  Pedro Alves  <palves@redhat.com>
11439
11440         * gdbthread.h (thread): Add missing closing parenthesis in
11441         comment.
11442
11443 2017-04-19  Pedro Alves  <palves@redhat.com>
11444
11445         * common/refcounted-object.h: New file.
11446         * gdbthread.h: Include "common/refcounted-object.h".
11447         (thread_info): Inherit from refcounted_object and add comments.
11448         (thread_info::incref, thread_info::decref)
11449         (thread_info::m_refcount): Delete.
11450         (thread_info::deletable): Use the refcounted_object::refcount()
11451         method.
11452         * inferior.c (current_inferior_): Add comment.
11453         (set_current_inferior): Increment/decrement refcounts.
11454         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11455         not-deletable instead of comparing with the current inferior.
11456         (initialize_inferiors): Increment the initial inferior's refcount.
11457         * inferior.h (struct inferior): Forward declare.
11458         Include "common/refcounted-object.h".
11459         (current_inferior, set_current_inferior): Move declaration to
11460         before struct inferior's definition, and fix comment.
11461         (inferior): Inherit from refcounted_object.  Add comments.
11462         * thread.c (switch_to_thread_no_regs): Reference the thread's
11463         inferior pointer directly instead of doing a ptid lookup.
11464         (switch_to_no_thread): New function.
11465         (switch_to_thread(thread_info *)): New function, factored out
11466         from ...
11467         (switch_to_thread(ptid_t)): ... this.
11468         (restore_current_thread): Delete.
11469         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11470         fields, and add 'inf' field.
11471         (do_restore_current_thread_cleanup): Check whether old->inf is
11472         alive instead of looking up an inferior by ptid.  Use
11473         switch_to_thread and switch_to_no_thread.
11474         (restore_current_thread_cleanup_dtor): Use old->inf directly
11475         instead of lookup up an inferior by id.  Decref the inferior.
11476         Don't restore 'removable'.
11477         (make_cleanup_restore_current_thread): Same the inferior pointer
11478         in old, instead of the inferior number.  Incref the inferior.
11479         Don't save/clear 'removable'.
11480
11481 2017-04-19  Pedro Alves  <palves@redhat.com>
11482
11483         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11484         unittests/scoped_restore-selftests.c.
11485         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11486         * common/scoped_restore.h (scoped_restore_base): Make "class".
11487         (scoped_restore_base::release): New public method.
11488         (scoped_restore_base::scoped_restore_base): New protected ctor.
11489         (scoped_restore_base::m_saved_var): New protected field.
11490         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11491         scoped_restore_base base class instead of m_saved_var directly.
11492         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11493         (scoped_restore_tmpl::scoped_restore_tmpl(const
11494         scoped_restore_tmpl<T>&)): Likewise.
11495         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11496         method.
11497         (scoped_restore_tmpl::saved_var): New method.
11498         (scoped_restore_tmpl::m_saved_var): Delete.
11499         * inferior.h (inferior::detaching): Now a bool.
11500         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11501         cleanup.
11502         * unittests/scoped_restore-selftests.c: New file.
11503
11504 2017-04-19  Pedro Alves  <palves@redhat.com>
11505
11506         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11507         Re-sort in alphabetic order.
11508
11509 2017-04-18  Pedro Alves  <palves@redhat.com>
11510
11511         * xml-support.c (obstack_xml_printf): Delete.
11512         * xml-support.h (obstack_xml_printf): Delete.
11513
11514 2017-04-18  Pedro Alves  <palves@redhat.com>
11515
11516         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11517         vdebug, verror, body_text, start_element, end_element, name,
11518         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11519         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11520         is_xinclude>: Make private and add m_ prefix.
11521         (gdb_xml_parser::body_text): New method, based on ...
11522         (gdb_xml_body_text): ... this.  Adjust.
11523         (gdb_xml_parser::vdebug): New method, based on ...
11524         (gdb_xml_debug): ... this.  Adjust.
11525         (gdb_xml_parser::verror): New method, based on ...
11526         (gdb_xml_error): ... this.  Adjust.
11527         (gdb_xml_parser::start_element): New method, based on ...
11528         (gdb_xml_start_element): ... this.  Adjust.
11529         (gdb_xml_start_element_wrapper): Defer to
11530         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11531         (gdb_xml_parser::end_element): New method, based on ...
11532         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11533         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11534         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11535         (gdb_xml_parser::use_dtd): New method, based on ...
11536         (gdb_xml_use_dtd): ... this.  Adjust.
11537         (gdb_xml_parser::parse): New method, based on ...
11538         (gdb_xml_parse): ... this.  Adjust.
11539         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11540         (xinclude_start_include): Adjust to call the parser's name method.
11541         (xml_xinclude_default, xml_xinclude_start_doctype)
11542         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11543         method.
11544         (xml_process_xincludes): Adjust to call parser methods.
11545         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11546         declarations.
11547
11548 2017-04-18  Pedro Alves  <palves@redhat.com>
11549
11550         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11551         gdb::optional<std::string>.
11552         * xml-support.c: Include <string>.
11553         (scope_level::scope_level(scope_level &&))
11554         (scope_level::~scope_level): Delete.
11555         (scope_level::body): Now a std::string.
11556         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11557         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11558         parameter.
11559         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11560         (xinclude_parsing_data::output): Now a std::string reference.
11561         (xinclude_start_include): Adjust.
11562         (xml_xinclude_default): Adjust.
11563         (xml_process_xincludes): Add 'output' parameter, and return bool.
11564         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11565         and return bool.
11566         * xml-tdesc.c: Include <unordered_map> and <string>.
11567         (tdesc_xml_cache): Delete.
11568         (tdesc_xml_cache_s): Delete.
11569         (xml_cache): Now an std::unordered_map.
11570         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11571         (target_fetch_description_xml): Change return type to
11572         gdb::optional<std::string>, and adjust.
11573         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11574         (target_fetch_description_xml): Change return type to
11575         gdb::optional<std::string>.
11576
11577 2017-04-18  Pedro Alves  <palves@redhat.com>
11578
11579         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11580         unittests/optional-selftests.c.
11581         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11582         * unittests/optional-selftests.c: New file.
11583         * unittests/optional/assignment/1.cc: New file.
11584         * unittests/optional/assignment/2.cc: New file.
11585         * unittests/optional/assignment/3.cc: New file.
11586         * unittests/optional/assignment/4.cc: New file.
11587         * unittests/optional/assignment/5.cc: New file.
11588         * unittests/optional/assignment/6.cc: New file.
11589         * unittests/optional/assignment/7.cc: New file.
11590         * unittests/optional/cons/copy.cc: New file.
11591         * unittests/optional/cons/default.cc: New file.
11592         * unittests/optional/cons/move.cc: New file.
11593         * unittests/optional/cons/value.cc: New file.
11594         * unittests/optional/in_place.cc: New file.
11595         * unittests/optional/observers/1.cc: New file.
11596         * unittests/optional/observers/2.cc: New file.
11597
11598 2017-04-18  Pedro Alves  <palves@redhat.com>
11599
11600         * common/gdb_optional.h: Include common/traits.h.
11601         (in_place_t): New type.
11602         (in_place): New constexpr variable.
11603         (optional::optional): Remove member initialization of
11604         m_instantiated.
11605         (optional::optional(in_place_t...)): New constructor.
11606         (optional::~optional): Use reset.
11607         (optional::optional(const optional&)): New.
11608         (optional::optional(const optional&&)): New.
11609         (optional::optional(T &)): New.
11610         (optional::optional(T &&)): New.
11611         (operator::operator=(const optional &)): New.
11612         (operator::operator=(optional &&)): New.
11613         (operator::operator= (const T &))
11614         (operator::operator= (T &&))
11615         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11616         (operator::reset): New.
11617         (operator::m_instantiated):: Add in-class initializer.
11618         * common/traits.h: Include <type_traits>.
11619         (struct And): New types.
11620
11621 2017-04-18  Pedro Alves  <palves@redhat.com>
11622
11623         * xml-support.c: Include <vector>.
11624         (scope_level::scope_level(const gdb_xml_element *))
11625         (scope_level::scope_level(scope_level&&)): New.
11626         (scope_level::~scope_level): New.
11627         (scope_level_s): Delete.
11628         (gdb_xml_parser::scopes): Now a std::vector.
11629         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11630         Use std::vector.
11631         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11632         scope cleanup code.
11633         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11634         of the scopes member.  Use std::vector::emplace_back.
11635
11636 2017-04-18  Pedro Alves  <palves@redhat.com>
11637
11638         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11639         a bool.
11640         (gdb_xml_end_element): Change type of first parameter.
11641         (gdb_xml_cleanup): Rename to ...
11642         (gdb_xml_parser::~gdb_xml_parser): ... this.
11643         (gdb_xml_create_parser_and_cleanup): Delete with ...
11644         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11645         to this new ctor.
11646         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11647         using gdb_xml_create_parser_and_cleanup.
11648         (xinclude_parsing_data): Add ctor/dtor.
11649         (xml_xinclude_cleanup): Delete.
11650         (xml_process_xincludes): Create a local xinclude_parsing_data
11651         instead of heap-allocating one.  Create a local gdb_xml_parser
11652         instead of heap-allocating one with
11653         gdb_xml_create_parser_and_cleanup.
11654
11655 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11656
11657         PR threads/20743
11658         * fbsd-nat.c (resume_one_thread_cb): Remove.
11659         (resume_all_threads_cb): Remove.
11660         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11661         iterate_over_threads.
11662
11663 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11664
11665         * NEWS: Create a new section for the next release branch.
11666         Rename the section of the current branch, now that it has
11667         been cut.
11668
11669 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11670
11671         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11672         * version.in: Bump version to 8.0.50.DATE-git.
11673
11674 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11675
11676         PR gdb/21385
11677         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11678         independently of the host, and fix build breakage on Cygwin.
11679
11680 2017-04-13  Pedro Alves  <palves@redhat.com>
11681
11682         * inferior.c (free_inferior): Convert to ...
11683         (inferior::~inferior): ... this dtor.
11684         (inferior::inferior): New ctor, factored out from ...
11685         (add_inferior_silent): ... here.  Allocate the inferior with a new
11686         expression.
11687         (delete_inferior): Call delete instead of free_inferior.
11688         * inferior.h (gdb_environ, continuation): Forward declare.
11689         (inferior): Now a class.  Add in-class initialization to all
11690         members.  Make boolean fields bool, except 'detaching'.
11691         (inferior::inferior): New explicit ctor.
11692         (inferior::~inferior): New.
11693
11694 2017-04-13  Pedro Alves  <palves@redhat.com>
11695
11696         * inferior.c (init_inferior_list): Delete.
11697         * inferior.h (init_inferior_list): Delete.
11698
11699 2017-04-13  Pedro Alves  <palves@redhat.com>
11700
11701         PR threads/13217
11702         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11703         (top level): Call it twice, with different thread sets.
11704
11705 2017-04-13  Pedro Alves  <palves@redhat.com>
11706
11707         * thread.c: Include <algorithm>.
11708         (thread_array_cleanup): Delete.
11709         (scoped_inc_dec_ref): New class.
11710         (live_threads_count): New function.
11711         (set_thread_refcount): Delete.
11712         (tp_array_compar_ascending): Now a bool.
11713         (tp_array_compar): Convert to a std::sort comparison function.
11714         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11715         and live_threads_count.
11716
11717 2017-04-13  Pedro Alves  <palves@redhat.com>
11718
11719         * infrun.c (follow_fork_inferior): Also switch the current
11720         inferior.
11721
11722 2017-04-13  Pedro Alves  <palves@redhat.com>
11723
11724         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11725         before calling create_internal_breakpoint.
11726
11727 2017-04-13  Pedro Alves  <palves@redhat.com>
11728
11729         * fork-child.c (execv_argv): New class.
11730         (breakup_args): Refactored as ...
11731         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11732         Copy arguments to storage and replace separators with NULL
11733         terminators in place.
11734         (escape_bang_in_quoted_argument): Adjust to return bool.
11735         (execv_argv::execv_argv): New ctor.
11736         (execv_argv::init_for_shell): New method, factored out from
11737         fork_inferior.  Don't strdup strings into the vector.
11738         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11739         Remove free_vector_argv call.
11740
11741 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11742
11743         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11744         tdep->rx_psw_type.
11745
11746 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11747
11748         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11749         * rx-tdep.c (rx_gdbarch_init): Likewise.
11750
11751 2017-04-13  Pedro Alves  <palves@redhat.com>
11752
11753         * breakpoint.h (struct breakpoint): Reindent.
11754
11755 2017-04-13  Pedro Alves  <palves@redhat.com>
11756
11757         * breakpoint.c (bp_location): Rename to ...
11758         (bp_locations): ... this.  All references updated.
11759         (bp_location_count): Rename to ...
11760         (bp_locations_count): ... this.  All references updated.
11761         (bp_location_placed_address_before_address_max): Rename to ...
11762         (bp_locations_placed_address_before_address_max): ... this.  All
11763         references updated.
11764         (bp_location_shadow_len_after_address_max): Rename to ...
11765         (bp_locations_shadow_len_after_address_max): ... this.  All
11766         references updated.
11767         (bp_location_compare_addrs): Rename to ...
11768         (bp_locations_compare_addrs): ... this.  All references updated.
11769         (bp_location_compare):Rename to ...
11770         (bp_locations_compare): ... this.  All references updated.
11771         (bp_location_target_extensions_update): Rename to ...
11772         (bp_locations_target_extensions_update): ... this.  All references
11773         updated.
11774
11775 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11776
11777         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11778         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11779         'sgtty.h'.
11780         * common/gdb_termios.h: New file, with parts of "terminal.h".
11781         * inflow.c: Include "gdb_termios.h".
11782         * ser-unix.c: Include "gdb_termios.h".
11783         * terminal.h: Move terminal-related defines to
11784         "common/gdb_termios.h".
11785
11786 2017-04-12  Tom Tromey  <tom@tromey.com>
11787
11788         * probe.c (parse_probes): Update.
11789         * location.h (delete_event_location): Don't declare.
11790         (event_location_deleter::operator()): Update.
11791         * location.c (event_location_deleter::operator()): Rename from
11792         delete_event_location.
11793         * linespec.h (linespec_result) <location>: Change type to
11794         event_location_up.
11795         * linespec.c (canonicalize_linespec, event_location_to_sals)
11796         (decode_objc): Update.
11797         (linespec_result): Don't call delete_event_location.
11798         * breakpoint.c (create_breakpoints_sal)
11799         (bkpt_probe_create_sals_from_location)
11800         (strace_marker_create_sals_from_location): Update.
11801
11802 2017-04-12  Tom Tromey  <tom@tromey.com>
11803
11804         * linespec.h (struct linespec_result): Add constructor and
11805         destructor.
11806         (init_linespec_result, destroy_linespec_result)
11807         (make_cleanup_destroy_linespec_result): Don't declare.
11808         * linespec.c (init_linespec_result): Remove.
11809         (linespec_result::~linespec_result): Rename from
11810         destroy_linespec_result.  Update.
11811         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11812         Remove.
11813         * breakpoint.c (create_breakpoint, break_range_command)
11814         (decode_location_default): Update.
11815         * ax-gdb.c (agent_command_1): Update.
11816
11817 2017-04-12  Tom Tromey  <tom@tromey.com>
11818
11819         * remote.c (remote_download_tracepoint): Update.
11820         * python/py-breakpoint.c (bppy_get_location): Update.
11821         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11822         (gdbscm_breakpoint_location): Update.
11823         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11824         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11825         Change type to event_location_up.
11826         * breakpoint.c (create_overlay_event_breakpoint)
11827         (create_longjmp_master_breakpoint)
11828         (create_std_terminate_master_breakpoint)
11829         (create_exception_master_breakpoint)
11830         (breakpoint_event_location_empty_p, print_breakpoint_location)
11831         (print_one_breakpoint_location, create_thread_event_breakpoint)
11832         (init_breakpoint_sal, create_breakpoint)
11833         (print_recreate_ranged_breakpoint, break_range_command)
11834         (init_ada_exception_breakpoint, say_where): Update.
11835         (base_breakpoint_dtor): Don't call delete_event_location.
11836         (bkpt_print_recreate, tracepoint_print_recreate)
11837         (dprintf_print_recreate, update_static_tracepoint)
11838         (breakpoint_re_set_default): Update.
11839
11840 2017-04-12  Tom Tromey  <tom@tromey.com>
11841
11842         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11843         type of "to_do".  Update.
11844         (compute_stack_depth): Use std::vector.
11845
11846 2017-04-12  Tom Tromey  <tom@tromey.com>
11847
11848         * printcmd.c (find_instruction_backward): Use std::vector.
11849
11850 2017-04-12  Tom Tromey  <tom@tromey.com>
11851
11852         * symfile.c (objfilep): Remove typedef.
11853         (reread_symbols): Use a std::vector.
11854
11855 2017-04-12  Tom Tromey  <tom@tromey.com>
11856
11857         * mi/mi-main.c (exec_direction_forward): Remove.
11858         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11859         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11860         scoped_restore.
11861         * guile/guile.c (guile_repl_command, guile_command)
11862         (gdbscm_execute_gdb_command): Use scoped_restore.
11863         * go-exp.y (go_parse): Use scoped_restore.
11864         * d-exp.y (d_parse): Use scoped_restore.
11865         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11866         * c-exp.y (c_parse): Use scoped_restore.
11867
11868 2017-04-12  Tom Tromey  <tom@tromey.com>
11869
11870         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11871         (mi_parse): Update return type.
11872         (mi_parse_free): Remove.
11873         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11874         (mi_parse::~mi_parse): Rename from mi_parse_free.
11875         (mi_parse_cleanup): Remove.
11876         (mi_parse): Return a unique_ptr.  Use new.
11877         * mi/mi-main.c (mi_execute_command): Update.
11878
11879 2017-04-12  Tom Tromey  <tom@tromey.com>
11880
11881         * location.c (explicit_location_lex_one): Return a
11882         unique_xmalloc_ptr.
11883         (string_to_explicit_location): Update.  Remove cleanups.
11884
11885 2017-04-12  Tom Tromey  <tom@tromey.com>
11886
11887         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11888         (compare_value_and_voffset): Change type.  Update.
11889         (compute_vtable_size): Change type of "offset_vec".
11890         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11891         (gnuv3_get_typeid): Remove extraneous declaration.
11892
11893 2017-04-12  Tom Tromey  <tom@tromey.com>
11894
11895         * charset.h (wchar_iterator): Fix comment.
11896
11897 2017-04-12  Tom Tromey  <tom@tromey.com>
11898
11899         * charset.c (iconv_wrapper): New class.
11900         (cleanup_iconv): Remove.
11901         (convert_between_encodings): Use it.
11902
11903 2017-04-12  Tom Tromey  <tom@tromey.com>
11904
11905         * symfile.h (increment_reading_symtab): Update type.
11906         * symfile.c (decrement_reading_symtab): Remove.
11907         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11908         * psymtab.c (psymtab_to_symtab): Update.
11909         * dwarf2read.c (dw2_instantiate_symtab): Update.
11910
11911 2017-04-12  Tom Tromey  <tom@tromey.com>
11912
11913         * jit.c (struct jit_reader): Declare separately.  Add constructor
11914         and destructor.  Change type of "handle".
11915         (loaded_jit_reader): Define separately.
11916         (jit_reader_load): Update.  New "new".
11917         (jit_reader_unload_command): Use "delete".
11918         * gdb-dlfcn.h (struct dlclose_deleter): New.
11919         (gdb_dlhandle_up): New typedef.
11920         (gdb_dlopen, gdb_dlsym): Update types.
11921         (gdb_dlclose): Remove.
11922         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11923         (gdb_dlsym): Change type of "handle".
11924         (make_cleanup_dlclose): Remove.
11925         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11926         * compile/compile-c-support.c (load_libcc): Update.
11927
11928 2017-04-12  Tom Tromey  <tom@tromey.com>
11929
11930         * symtab.h (find_pcs_for_symtab_line): Change return type.
11931         * symtab.c (find_pcs_for_symtab_line): Change return type.
11932         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11933         type of "vec".  Update.
11934         (ltpy_get_pcs_for_line): Update.
11935         * linespec.c (decode_digits_ordinary): Update.
11936
11937 2017-04-12  Tom Tromey  <tom@tromey.com>
11938
11939         * tracepoint.c (actions_command): Update.
11940         * python/python.c (python_command, python_interactive_command):
11941         Update.
11942         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11943         * guile/guile.c (guile_command): Update.
11944         * defs.h (read_command_lines, read_command_lines_1): Return
11945         command_line_up.
11946         (command_lines_deleter): New struct.
11947         (command_line_up): New typedef.
11948         * compile/compile.c (compile_code_command)
11949         (compile_print_command): Update.
11950         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11951         command_line_up.
11952         (make_cleanup_free_command_lines): Remove.
11953         * cli/cli-script.c (get_command_line, read_command_lines_1)
11954         (copy_command_lines): Return command_line_up.
11955         (while_command, if_command, read_command_lines, define_command)
11956         (document_command): Update.
11957         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11958         Remove.
11959         * breakpoint.h (breakpoint_set_commands): Change type of
11960         "commands".
11961         * breakpoint.c (breakpoint_set_commands): Change type of
11962         "commands".  Update.
11963         (do_map_commands_command, update_dprintf_command_list)
11964         (create_tracepoint_from_upload): Update.
11965
11966 2017-04-12  Tom Tromey  <tom@tromey.com>
11967
11968         * tracepoint.c (scope_info): Update.
11969         * spu-tdep.c (spu_catch_start): Update.
11970         * python/python.c (gdbpy_decode_line): Update.
11971         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11972         * python/py-breakpoint.c (bppy_init): Update.
11973         * probe.c (parse_probes): Update.
11974         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11975         * location.h (event_location_deleter): New struct.
11976         (event_location_up): New typedef.
11977         (new_linespec_location, new_address_location, new_probe_location)
11978         (new_explicit_location, copy_event_location)
11979         (string_to_event_location, string_to_event_location_basic)
11980         (string_to_explicit_location): Update return type.
11981         (make_cleanup_delete_event_location): Remove.
11982         * location.c (new_linespec_location, new_address_location)
11983         (new_probe_location, new_explicit_location, copy_event_location):
11984         Return event_location_up.
11985         (delete_event_location_cleanup)
11986         (make_cleanup_delete_event_location): Remove.
11987         (string_to_explicit_location, string_to_event_location_basic)
11988         (string_to_event_location): Return event_location_up.
11989         * linespec.c (canonicalize_linespec, event_location_to_sals)
11990         (decode_line_with_current_source)
11991         (decode_line_with_last_displayed, decode_objc): Update.
11992         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11993         * completer.c (location_completer): Update.
11994         * cli/cli-cmds.c (edit_command, list_command): Update.
11995         * breakpoint.c (create_overlay_event_breakpoint)
11996         (create_longjmp_master_breakpoint)
11997         (create_std_terminate_master_breakpoint)
11998         (create_exception_master_breakpoint)
11999         (create_thread_event_breakpoint): Update.
12000         (init_breakpoint_sal): Update.  Remove some dead code.
12001         (create_breakpoint_sal): Change type of "location".  Update.
12002         (create_breakpoints_sal, create_breakpoint, break_command_1)
12003         (dprintf_command, break_range_command, until_break_command)
12004         (init_ada_exception_breakpoint)
12005         (strace_marker_create_sals_from_location)
12006         (update_static_tracepoint, trace_command, ftrace_command)
12007         (strace_command, create_tracepoint_from_upload): Update.
12008         * break-catch-throw.c (re_set_exception_catchpoint): Update.
12009         * ax-gdb.c (agent_command_1): Update.
12010
12011 2017-04-12  Pedro Alves  <palves@redhat.com>
12012
12013         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12014         * configure.tgt: Handle i[34567]86-*-go32* and
12015         i[34567]86-*-msdosdjgpp*.
12016         * i386-tdep.c (i386_svr4_reg_to_regnum):
12017         Make extern.
12018         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12019         i386-go32-tdep.c.
12020         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12021         * i386-go32-tdep.c: New file.
12022         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12023         declarations.
12024
12025 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
12026
12027         * aix-thread.c (pd_status2str): Change return type to const char *.
12028
12029 2017-04-12  Pedro Alves  <palves@redhat.com>
12030
12031         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12032         calls to set_gdbarch_gnu_triplet_regexp.
12033
12034 2017-04-12  Pedro Alves  <palves@redhat.com>
12035
12036         PR gdb/21323
12037         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12038         New enum value.
12039         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12040         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12041         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12042         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12043         * gdbarch.h, gdbarch.c: Regenerate.
12044         * aarch64-tdep.c (aarch64_gdbarch_init): Override
12045         gdbarch_wchar_bit and gdbarch_wchar_signed.
12046         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12047         * arm-tdep.c (arm_gdbarch_init): Likewise.
12048         * avr-tdep.c (avr_gdbarch_init): Likewise.
12049         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12050         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12051         * i386-tdep.c (i386_go32_init_abi): Likewise.
12052         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12053         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12054         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12055         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12056         * sh-tdep.c (sh_gdbarch_init): Likewise.
12057         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12058         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12059         * windows-tdep.c (windows_init_abi): Likewise.
12060         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12061
12062 2017-04-12  Pedro Alves  <palves@redhat.com>
12063
12064         PR c++/21323
12065         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12066         cplus_primitive_type_char32_t>: New enum values.
12067         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12068         and cplus_primitive_type_char32_t.
12069         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12070         32, use the archtecture's built-in type for char16_t and char32_t,
12071         respectively.  Otherwise, fallback to init_integer_type as before,
12072         but make the type unsigned, and issue a complaint.
12073         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12074
12075 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12076
12077         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12078         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12079
12080 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12081
12082         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12083         'const char *'.
12084
12085 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12086
12087         * common/common-utils.c (free_vector_argv): New function.
12088         * common/common-utils.h: Include <vector>.
12089         (free_vector_argv): New prototype.
12090         * darwin-nat.c (darwin_create_inferior): Rewrite function
12091         prototype in order to constify "exec_file" and accept a
12092         "std::string" for "allargs".
12093         * fork-child.c: Include <vector>.
12094         (breakup_args): Rewrite function, using C++.
12095         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12096         and accept "std::string" for "allargs".  Update the code to
12097         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12098         and "execvp".
12099         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12100         order to constify "exec_file" and accept a "std::string" for
12101         "allargs".
12102         * go32-nat.c (go32_create_inferior): Likewise.
12103         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12104         * infcmd.c (run_command_1): Constify "exec_file".  Use
12105         "std::string" for inferior arguments.
12106         * inferior.h (fork_inferior): Update prototype.
12107         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12108         prototype in order to constify "exec_file" and accept a
12109         "std::string" for "allargs".
12110         * nto-procfs.c (procfs_create_inferior): Likewise.
12111         * procfs.c (procfs_create_inferior): Likewise.
12112         * remote-sim.c (gdbsim_create_inferior): Likewise.
12113         * remote.c (extended_remote_run): Update code to accept
12114         "std::string" as argument.
12115         (extended_remote_create_inferior): Rewrite function prototype in
12116         order to constify "exec_file" and accept a "std::string" for
12117         "allargs".
12118         * rs6000-nat.c (super_create_inferior): Likewise.
12119         (rs6000_create_inferior): Likewise.
12120         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12121         * windows-nat.c (windows_create_inferior): Likewise.
12122
12123 2017-04-11  Pedro Alves  <palves@redhat.com>
12124
12125         * thread.c: Fix whitespace throughout.
12126
12127 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12128
12129         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12130
12131 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12132
12133         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12134
12135 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12136
12137         PR gdb/21364
12138         * osdata.c (info_osdata): Check if 'type' is an empty string
12139         instead of NULL.
12140
12141 2017-04-10  Pedro Alves  <palves@redhat.com>
12142
12143         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12144         (ptid_to_global_thread_id, in_thread_list)
12145         (do_captured_list_thread_ids, set_resumed, set_running)
12146         (set_executing, set_stop_requested, finish_thread_state)
12147         (validate_registers_access, can_access_registers_ptid)
12148         (print_thread_info_1, switch_to_thread)
12149         (do_restore_current_thread_cleanup)
12150         (make_cleanup_restore_current_thread, thread_command)
12151         (thread_name_command): Use operator== instead of ptid_equal.
12152
12153 2017-04-10  Pedro Alves  <palves@redhat.com>
12154
12155         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12156         (current_thread_cleanup_chain): Delete.
12157         (restore_current_thread_cleanup_dtor)
12158         (make_cleanup_restore_current_thread): Remove references to
12159         current_thread_cleanup_chain.
12160
12161 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12162
12163         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12164         REG_UNKNOWN.
12165
12166 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12167
12168         PR gdb/19942
12169         * gdbthread.h (thread_info::deletable): New method.
12170         (thread_info::incref): New method.
12171         (thread_info::decref): New method.
12172         (thread_info::refcount): Move it to private.
12173         * infrun.c (save_stop_context): Call inc_refcount.
12174         (release_stop_context_cleanup): Likewise.
12175         * thread.c (set_thread_exited): New function.
12176         (init_thread_list): Delete "tp" only it is deletable, otherwise
12177         call set_thread_exited.
12178         (delete_thread_1): Call set_thread_exited.
12179         (current_thread_cleanup) <inferior_pid>: Remove.
12180         <thread>: New field.
12181         (restore_current_thread_ptid_changed): Removed.
12182         (do_restore_current_thread_cleanup): Adjust.
12183         (restore_current_thread_cleanup_dtor): Don't call
12184         find_thread_ptid.
12185         (set_thread_refcount): Use dec_refcount.
12186         (make_cleanup_restore_current_thread): Adjust.
12187         (thread_apply_all_command): Call inc_refcount.
12188         (_initialize_thread): Don't call
12189         observer_attach_thread_ptid_changed.
12190
12191 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12192
12193         * thread.c (delete_thread_1): Hoist code on marking thread as
12194         exited.
12195
12196 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12197
12198         * windows-nat.c (windows_detach): Initialize ptid with
12199         minus_one_ptid.
12200
12201 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12202
12203         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12204
12205 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12206
12207         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12208         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12209         (bfin_pseudo_register_write): Likewise
12210
12211 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12212
12213         * common/ptid.h (struct ptid): Change to...
12214         (class ptid_t): ... this.
12215         <ptid_t>: New constructors.
12216         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12217         matches>: New methods.
12218         <make_null, make_minus_one>: New static methods.
12219         <pid>: Rename to...
12220         <m_pid>: ...this.
12221         <lwp>: Rename to...
12222         <m_lwp>: ...this.
12223         <tid>: Rename to...
12224         <m_tid>: ...this.
12225         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12226         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12227         as references, move comment to class ptid_t.
12228         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12229         ptid_t static methods.
12230         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12231         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12232         Take ptid arguments as references, implement using ptid_t methods.
12233         * unittests/ptid-selftests.c: New file.
12234         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12235         unittests/ptid-selftests.c.
12236         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12237
12238 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12239
12240         * python/python.c (python_run_simple_file): Cast mode literal to
12241         non-const char pointer as expected by PyFile_FromString.
12242
12243 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12244
12245         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12246         minus_one_ptid and null_ptid.
12247
12248 2017-04-05  Pedro Alves  <palves@redhat.com>
12249
12250         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12251         * configure: Regenerate.
12252
12253 2017-04-05  Pedro Alves  <palves@redhat.com>
12254
12255         * ada-exp.y (yyerror): Constify.
12256         * ada-lang.c (bound_name, get_selections)
12257         (ada_variant_discrim_type)
12258         (ada_variant_discrim_name, ada_value_struct_elt)
12259         (ada_lookup_struct_elt_type, is_unchecked_variant)
12260         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12261         (catch_ada_exception_command_split)
12262         (catch_ada_assert_command_split, catch_assert_command)
12263         (ada_op_name): Constify.
12264         * ada-lang.h (ada_yyerror, get_selections)
12265         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12266         * arc-tdep.c (arc_print_frame_cache): Constify.
12267         * arm-tdep.c (arm_skip_stub): Constify.
12268         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12269         (gen_aggregate_elt_ref): Constify.
12270         * bcache.c (print_bcache_statistics): Constify.
12271         * bcache.h (print_bcache_statistics): Constify.
12272         * break-catch-throw.c (catch_exception_command_1):
12273         * breakpoint.c (struct ep_type_description::description):
12274         Constify.
12275         (add_solib_catchpoint): Constify.
12276         (catch_fork_command_1): Add cast.
12277         (add_catch_command): Constify.
12278         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12279         Constify.
12280         * bsd-uthread.c (bsd_uthread_state): Constify.
12281         * buildsym.c (patch_subfile_names): Constify.
12282         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12283         Constify.
12284         * c-exp.y (yyerror): Constify.
12285         (token::oper): Constify.
12286         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12287         * c-varobj.c (cplus_describe_child): Constify.
12288         * charset.c (find_charset_names): Add cast.
12289         (find_charset_names): Constify array and add const_cast.
12290         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12291         (edit_command): Constify.
12292         * cli/cli-decode.c (lookup_cmd): Constify.
12293         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12294         Constify.
12295         (struct dump_context): Constify.
12296         (add_dump_command, restore_command): Constify.
12297         * cli/cli-script.c (get_command_line): Constify.
12298         * cli/cli-script.h (get_command_line): Constify.
12299         * cli/cli-utils.c (check_for_argument): Constify.
12300         * cli/cli-utils.h (check_for_argument): Constify.
12301         * coff-pe-read.c (struct read_pe_section_data): Constify.
12302         * command.h (lookup_cmd): Constify.
12303         * common/print-utils.c (decimal2str): Constify.
12304         * completer.c (gdb_print_filename): Constify.
12305         * corefile.c (set_gnutarget): Constify.
12306         * cp-name-parser.y (yyerror): Constify.
12307         * cp-valprint.c (cp_print_class_member): Constify.
12308         * cris-tdep.c (cris_register_name, crisv32_register_name):
12309         Constify.
12310         * d-exp.y (yyerror): Constify.
12311         (struct token::oper): Constify.
12312         * d-lang.h (d_yyerror): Constify.
12313         * dbxread.c (struct header_file_location::name): Constify.
12314         (add_old_header_file, add_new_header_file, last_function_name)
12315         (dbx_next_symbol_text, add_bincl_to_list)
12316         (find_corresponding_bincl_psymtab, set_namestring)
12317         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12318         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12319         * defs.h (command_line_input, print_address_symbolic)
12320         (deprecated_readline_begin_hook): Constify.
12321         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12322         Constify.
12323         * event-top.c (handle_line_of_input): Constify and add cast.
12324         * exceptions.c (catch_errors): Constify.
12325         * exceptions.h (catch_errors): Constify.
12326         * expprint.c (print_subexp_standard, op_string, op_name)
12327         (op_name_standard, dump_raw_expression, dump_raw_expression):
12328         * expression.h (op_name, op_string, dump_raw_expression):
12329         Constify.
12330         * f-exp.y (yyerror): Constify.
12331         (struct token::oper): Constify.
12332         (struct f77_boolean_val::name): Constify.
12333         * f-lang.c (f_word_break_characters): Constify.
12334         * f-lang.h (f_yyerror): Constify.
12335         * fork-child.c (fork_inferior): Add cast.
12336         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12337         (new_variant): Constify.
12338         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12339         * gdbarch.c: Regenerate.
12340         * gdbcore.h (set_gnutarget): Constify.
12341         * go-exp.y (yyerror): Constify.
12342         (token::oper): Constify.
12343         * go-lang.h (go_yyerror): Constify.
12344         * go32-nat.c (go32_sysinfo): Constify.
12345         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12346         * guile/scm-cmd.c (cmdscm_function): Constify.
12347         * guile/scm-param.c (pascm_param_value): Constify.
12348         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12349         (h8300sx_register_name): Constify.
12350         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12351         Constify.
12352         * ia64-tdep.c (ia64_register_names): Constify.
12353         * infcmd.c (construct_inferior_arguments): Constify.
12354         (path_command, attach_post_wait): Constify.
12355         * language.c (show_range_command, show_case_command)
12356         (unk_lang_error): Constify.
12357         * language.h (language_defn::la_error)
12358         (language_defn::la_name_of_this): Constify.
12359         * linespec.c (decode_line_2): Constify.
12360         * linux-thread-db.c (thread_db_err_str): Constify.
12361         * lm32-tdep.c (lm32_register_name): Constify.
12362         * m2-exp.y (yyerror): Constify.
12363         * m2-lang.h (m2_yyerror): Constify.
12364         * m32r-tdep.c (m32r_register_names): Constify and make static.
12365         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12366         * m88k-tdep.c (m88k_register_name): Constify.
12367         * macroexp.c (appendmem): Constify.
12368         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12369         (upgrade_type, parse_external, parse_partial_symbols)
12370         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12371         (new_symbol): Constify.
12372         * memattr.c (mem_info_command): Constify.
12373         * mep-tdep.c (register_name_from_keyword): Constify.
12374         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12375         Constify.
12376         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12377         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12378         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12379         cast.
12380         (mi_execute_async_cli_command): Constify.
12381         * mips-tdep.c (mips_register_name): Constify.
12382         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12383         (am33_register_name, am33_2_register_name)
12384         * moxie-tdep.c (moxie_register_names): Constify.
12385         * nat/linux-osdata.c (osdata_type): Constify fields.
12386         * nto-tdep.c (nto_parse_redirection): Constify.
12387         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12388         (lookup_child_selector): Constify.
12389         (objc_methcall::name): Constify.
12390         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12391         (lookup_struct_typedef): Constify.
12392         * objfiles.c (pc_in_section): Constify.
12393         * objfiles.h (pc_in_section): Constify.
12394         * p-exp.y (struct token::oper): Constify.
12395         (yyerror): Constify.
12396         * p-lang.h (pascal_yyerror): Constify.
12397         * parser-defs.h (op_name_standard): Constify.
12398         (op_print::string): Constify.
12399         (exp_descriptor::op_name): Constify.
12400         * printcmd.c (print_address_symbolic): Constify.
12401         * psymtab.c (print_partial_symbols): Constify.
12402         * python/py-breakpoint.c (stop_func): Constify.
12403         (bppy_get_expression): Constify.
12404         * python/py-cmd.c (cmdpy_completer::name): Constify.
12405         (cmdpy_function): Constify.
12406         * python/py-event.c (evpy_add_attribute)
12407         (gdbpy_initialize_event_generic): Constify.
12408         * python/py-event.h (evpy_add_attribute)
12409         (gdbpy_initialize_event_generic): Constify.
12410         * python/py-evts.c (add_new_registry): Constify.
12411         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12412         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12413         * python/py-inferior.c (get_buffer): Add cast.
12414         * python/py-param.c (parm_constant::name): Constify.
12415         * python/py-unwind.c (fprint_frame_id): Constify.
12416         * python/python.c (gdbpy_parameter_value): Constify.
12417         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12418         * remote.c (memory_packet_config::name): Constify.
12419         (show_packet_config_cmd, remote_write_bytes)
12420         (remote_buffer_add_string):
12421         * reverse.c (exec_reverse_once): Constify.
12422         * rs6000-tdep.c (variant::name, variant::description): Constify.
12423         * rust-exp.y (rustyyerror): Constify.
12424         * rust-lang.c (rust_op_name): Constify.
12425         * rust-lang.h (rustyyerror): Constify.
12426         * serial.h (serial_ops::name): Constify.
12427         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12428         (sh_sh3e_register_name, sh_sh2e_register_name)
12429         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12430         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12431         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12432         (sh_sh4al_dsp_register_name): Constify.
12433         * sh64-tdep.c (sh64_register_name): Constify.
12434         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12435         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12436         * stabsread.c (patch_block_stabs, read_type_number)
12437         (ref_map::stabs, ref_add, process_reference)
12438         (symbol_reference_defined, define_symbol, define_symbol)
12439         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12440         (read_one_struct_field, read_struct_fields, read_baseclasses)
12441         (read_tilde_fields, read_struct_type, read_array_type)
12442         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12443         (read_huge_number, read_range_type, read_args, common_block_start)
12444         (find_name_end): Constify.
12445         * stabsread.h (common_block_start, define_symbol)
12446         (process_one_symbol, symbol_reference_defined, ref_add):
12447         * symfile.c (get_section_index, add_symbol_file_command):
12448         * symfile.h (get_section_index): Constify.
12449         * target-descriptions.c (tdesc_type::name): Constify.
12450         (tdesc_free_type): Add cast.
12451         * target.c (find_default_run_target):
12452         (add_deprecated_target_alias, find_default_run_target)
12453         (target_announce_detach): Constify.
12454         (do_option): Constify.
12455         * target.h (add_deprecated_target_alias): Constify.
12456         * thread.c (print_thread_info_1): Constify.
12457         * top.c (deprecated_readline_begin_hook, command_line_input):
12458         Constify.
12459         (init_main): Add casts.
12460         * top.h (handle_line_of_input): Constify.
12461         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12462         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12463         (tfind_command): Rename to ...
12464         (tfind_command_1): ... this and constify.
12465         (tfind_command): New function.
12466         (tfind_end_command, tfind_start_command): Adjust.
12467         (encode_source_string): Constify.
12468         * tracepoint.h (encode_source_string): Constify.
12469         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12470         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12471         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12472         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12473         * tui/tui-win.c (parse_scrolling_args): Constify.
12474         * tui/tui-windata.c (tui_erase_data_content): Constify.
12475         * tui/tui-windata.h (tui_erase_data_content): Constify.
12476         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12477         * tui/tui.c (tui_enable): Add cast.
12478         * utils.c (defaulted_query): Constify.
12479         (init_page_info): Add cast.
12480         (puts_debug, subset_compare): Constify.
12481         * utils.h (subset_compare): Constify.
12482         * varobj.c (varobj_format_string): Constify.
12483         * varobj.h (varobj_format_string): Constify.
12484         * vax-tdep.c (vax_register_name): Constify.
12485         * windows-nat.c (windows_detach): Constify.
12486         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12487         * xml-support.c (gdb_xml_end_element): Constify.
12488         * xml-tdesc.c (tdesc_start_reg): Constify.
12489         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12490         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12491         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12492
12493 2017-04-05  Pedro Alves  <palves@redhat.com>
12494
12495         * proc-api.c (struct trans): Constify.
12496         (procfs_note): Constify.
12497         * proc-events.c (struct trans, syscall_table):
12498         * proc-flags.c (struct trans): Constify.
12499         * proc-utils.h (procfs_note): Constify.
12500         * proc-why.c (struct trans): Constify.
12501         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12502         (procfs_detach): Constify.
12503         * sol-thread.c (struct string_map): Constify.
12504         (td_err_string, td_state_string): Constify.
12505
12506 2017-04-05  Pedro Alves  <palves@redhat.com>
12507
12508         * proc-api.c (procfs_filename): Don't initialize
12509         procfs_filename.
12510         (prepare_to_trace): Assume procfs_filename is non-NULL.
12511         (_initialize_proc_api): Give procfs_filename a default value here.
12512
12513 2017-04-05  Pedro Alves  <palves@redhat.com>
12514
12515         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12516         'cond_string' parameter.
12517         (extract_exception_regexp): Constify 'string' parameter.
12518         (catch_exception_command_1): Constify.
12519         * breakpoint.c (init_catchpoint)
12520         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12521         parameter.
12522         (ep_parse_optional_if_clause, catch_fork_command_1)
12523         (catch_exec_command_1): Constify.
12524         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12525         parameter.
12526         (ep_parse_optional_if_clause): Constify.
12527         * cli/cli-utils.c (remove_trailing_whitespace)
12528         (check_for_argument): Constify.
12529         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12530         non-const overload.
12531         (check_for_argument): Likewise.
12532
12533 2017-04-05  Pedro Alves  <palves@redhat.com>
12534
12535         * event-top.c (command_line_handler): Add cast to execute_command
12536         call.
12537         * record-btrace.c (cmd_record_btrace_bts_start)
12538         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12539         (cmd_record_btrace_start): Add cast to execute_command call.
12540         * record-full.c (record_full_goto_insn):
12541         * record.c (record_start, record_stop): Add cast to
12542         execute_command_to_string calls.
12543         (cmd_record_start): Add cast to execute_command calls.
12544
12545 2017-04-05  Pedro Alves  <palves@redhat.com>
12546
12547         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12548         static inline function.
12549         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12550         array and use gdb_PyArg_ParseTupleAndKeywords.
12551         * python/py-cmd.c (cmdpy_init): Likewise.
12552         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12553         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12554         (infpy_search_memory): Likewise.
12555         * python/py-objfile.c (objfpy_add_separate_debug_file)
12556         (gdbpy_lookup_objfile): Likewise.
12557         * python/py-symbol.c (gdbpy_lookup_symbol)
12558         (gdbpy_lookup_global_symbol): Likewise.
12559         * python/py-type.c (gdbpy_lookup_type): Likewise.
12560         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12561         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12562         Likewise.
12563
12564 2017-04-05  Pedro Alves  <palves@redhat.com>
12565
12566         * python/python-internal.h (gdb_PyGetSetDef): New type.
12567         * python/py-block.c (block_object_getset)
12568         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12569         * python/py-event.c (event_object_getset)
12570         (finish_breakpoint_object_getset): Likewise.
12571         * python/py-inferior.c (inferior_object_getset): Likewise.
12572         * python/py-infthread.c (thread_object_getset): Likewise.
12573         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12574         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12575         * python/py-objfile.c (objfile_getset): Likewise.
12576         * python/py-progspace.c (pspace_getset): Likewise.
12577         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12578         Likewise.
12579         * python/py-record.c (recpy_record_getset): Likewise.
12580         * python/py-symbol.c (symbol_object_getset): Likewise.
12581         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12582         Likewise.
12583         * python/py-type.c (type_object_getset, field_object_getset):
12584         Likewise.
12585         * python/py-value.c (value_object_getset): Likewise.
12586
12587 2017-04-05  Pedro Alves  <palves@redhat.com>
12588
12589         * python/python-internal.h (gdb_PyObject_CallMethod)
12590         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12591         New functions.
12592         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12593         (PySys_GetObject, PySys_SetPath): New macros.
12594
12595 2017-04-05  Pedro Alves  <palves@redhat.com>
12596
12597         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12598         info_osdata_command.
12599         * osdata.c (info_osdata_command): Rename to ...
12600         (info_osdata): ... this.  Constify 'type' parameter, and remove
12601         the 'from_tty' parameter.  Accept NULL TYPE.
12602         (info_osdata_command): New function.
12603         * osdata.h (info_osdata_command): Remove declaration.
12604         (info_osdata): New declaration.
12605
12606 2017-04-05  Pedro Alves  <palves@redhat.com>
12607
12608         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12609         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12610         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12611         parameter.
12612         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12613         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12614         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12615         parameter.
12616         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12617         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12618         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12619         (mi_cmd_file_list_exec_source_files)
12620         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12621         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12622         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12623         parameter.
12624         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12625         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12626         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12627         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12628         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12629         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12630         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12631         'command' parameter.
12632         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12633         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12634         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12635         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12636         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12637         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12638         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12639         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12640         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12641         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12642         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12643         parameter.
12644         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12645         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12646         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12647         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12648         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12649         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12650         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12651         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12652         (mi_cmd_data_list_changed_registers)
12653         (mi_cmd_data_write_register_values)
12654         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12655         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12656         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12657         (mi_cmd_list_features, mi_cmd_list_target_features)
12658         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12659         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12660         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12661         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12662         (mi_cmd_trace_frame_collected): Constify 'command'
12663         parameter.
12664         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12665         'command' parameter.
12666
12667 2017-04-05  Pedro Alves  <palves@redhat.com>
12668
12669         * ada-lang.c (ada_completer_word_break_characters): Now a const
12670         array.
12671         (ada_get_gdb_completer_word_break_characters): Constify.
12672         * completer.c (gdb_completer_command_word_break_characters)
12673         (gdb_completer_file_name_break_characters)
12674         (gdb_completer_quote_characters): Now const arrays.
12675         (get_gdb_completer_quote_characters): Constify.
12676         (set_rl_completer_word_break_characters): New function.
12677         (set_gdb_completion_word_break_characters)
12678         (complete_line_internal): Use it.
12679         * completer.h (get_gdb_completer_quote_characters): Constify.
12680         (set_rl_completer_word_break_characters): Declare.
12681         * f-lang.c (f_word_break_characters): Constify.
12682         * language.c (default_word_break_characters): Constify.
12683         * language.h (language_defn::la_word_break_characters): Constify.
12684         (default_word_break_characters): Constify.
12685         * top.c (init_main): Use set_rl_completer_word_break_characters.
12686
12687 2017-04-05  Pedro Alves  <palves@redhat.com>
12688
12689         * aix-thread.c (aix_thread_pid_to_str)
12690         (aix_thread_extra_thread_info): Constify.
12691         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12692         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12693         (bsd_uthread_pid_to_str): Constify.
12694         * corelow.c (core_pid_to_str): Constify.
12695         * darwin-nat.c (darwin_pid_to_str): Constify.
12696         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12697         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12698         Constify.
12699         * gnu-nat.c (gnu_pid_to_str): Constify.
12700         * go32-nat.c (go32_pid_to_str): Constify.
12701         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12702         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12703         * inferior.c (inferior_pid_to_str): Constify.
12704         * linux-nat.c (linux_nat_pid_to_str): Constify.
12705         * linux-tdep.c (linux_core_pid_to_str): Constify.
12706         * linux-thread-db.c (thread_db_pid_to_str)
12707         (thread_db_extra_thread_info): Constify.
12708         * nto-tdep.c (nto_extra_thread_info): Constify.
12709         * nto-tdep.h (nto_extra_thread_info): Constify.
12710         * obsd-nat.c (obsd_pid_to_str): Constify.
12711         * procfs.c (procfs_pid_to_str): Constify.
12712         * ravenscar-thread.c (ravenscar_extra_thread_info)
12713         (ravenscar_pid_to_str): Constify.
12714         * remote-sim.c (gdbsim_pid_to_str): Constify.
12715         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12716         Constify.
12717         * sol-thread.c (solaris_pid_to_str): Constify.
12718         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12719         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12720         * target.c (default_pid_to_str, target_pid_to_str)
12721         (normal_pid_to_str, default_pid_to_str): Constify.
12722         * target.h (target_ops::to_pid_to_str)
12723         (target_ops::to_extra_thread_info): Constify.
12724         (target_pid_to_str, normal_pid_to_str): Constify.
12725         * windows-nat.c (windows_pid_to_str): Constify.
12726         * gdbarch.sh (core_pid_to_str): Constify.
12727         * target-delegates.c: Regenerate.
12728         * gdbarch.h, gdbarch.c: Regenerate.
12729
12730 2017-04-05  Pedro Alves  <palves@redhat.com>
12731
12732         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12733         the memory of the temporary warning_pre_print override.
12734         * utils.c (warning_pre_print): Constify.
12735         * utils.h (warning_pre_print): Constify.
12736
12737 2017-04-05  Pedro Alves  <palves@redhat.com>
12738
12739         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12740         (shell_command): New function.
12741         (make_command): Use std::string.
12742         (init_cli_cmds): Register shell_command instead of shell_escape.
12743
12744 2017-04-05  Pedro Alves  <palves@redhat.com>
12745
12746         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12747         * tracepoint.c (default_collect): Don't initialize.
12748
12749 2017-04-05  Pedro Alves  <palves@redhat.com>
12750
12751         * macroexp.c (macro_buffer::shared): Now a bool.
12752         (init_buffer): Update.
12753         (init_shared_buffer): Constify 'addr' parameter.
12754         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12755         casts.
12756
12757 2017-04-05  Pedro Alves  <palves@redhat.com>
12758
12759         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12760         * disasm.c (set_disassembler_options): Constify local.
12761         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12762
12763 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12764
12765         PR gdb/21352
12766         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12767         option.
12768
12769 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12770
12771         * frame.c (frame_unwind_register_unsigned): Call
12772         frame_unwind_register_value.
12773
12774 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12775
12776         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12777         Use gdb_test_multiple, and don't match anchor.
12778
12779 2017-04-05  Pedro Alves  <palves@redhat.com>
12780
12781         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12782         (Write After Approval): Remove Simon Marchi.
12783
12784 2017-04-05  Pedro Alves  <palves@redhat.com>
12785
12786         * common/gdb_optional.h (optional::optional): Make constexpr and
12787         initialize m_dummy.
12788
12789 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12790
12791         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12792         (amd64fbsd_jmp_buf_reg_offset): Remove.
12793         (amd64fbsd_supply_uthread): Remove function.
12794         (amd64fbsd_collect_uthread): Remove function.
12795         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12796         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12797         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12798         (fbsd-nat.c): Update comment.
12799         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12800         (i386fbsd_jmp_buf_reg_offset): Remove.
12801         (i386fbsd_supply_uthread): Remove function.
12802         (i386fbsd_collect_uthread): Remove function.
12803         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12804
12805 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12806
12807         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12808         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12809         * NEWS: Mention that support for FreeBSD/alpha was removed.
12810         * alpha-fbsd-tdep.c: Delete file.
12811         * config/alpha/fbsd.mh: Delete file.
12812         * configure.host: Delete alpha*-*-freebsd* and
12813         alpha*-*-kfreebsd*-gnu.
12814         * configure.tgt: Delete alpha*-*-freebsd* and
12815         alpha*-*-kfreebsd*-gnu.
12816
12817 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12818
12819         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12820         amd64bsd_store_inferior_registers): Use ptid from regcache.
12821
12822 2017-04-04  Pedro Alves  <palves@redhat.com>
12823
12824         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12825         data fields, make them private and add "m_" prefixes.
12826         (lnp_state_machine::lnp_state_machine): New ctor.
12827         (record_line, check_line_address, handle_set_discriminator)
12828         (handle_set_address, handle_advance_pc, handle_special_opcode)
12829         (handle_advance_line, handle_set_file, handle_negate_stmt)
12830         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12831         (end_sequence, advance_line): New methods.
12832         (m_gdbarch, m_record_lines_p): New fields.
12833         (lnp_reader_state): Delete.
12834         (dwarf_record_line): Rename to ...
12835         (lnp_state_machine::record_line): ... adjust.
12836         (init_lnp_state_machine): Delete.
12837         (lnp_state_machine::lnp_state_machine): New.
12838         (check_line_address): Rename to ...
12839         (lnp_state_machine::check_line_address): This.
12840         (dwarf_decode_lines_1): Remove reference to "reader_state".
12841         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12842         State machine internal state manipulation moved to
12843         lnp_state_machine methods.
12844
12845 2017-04-04  Pedro Alves  <palves@redhat.com>
12846
12847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12848         unittests/offset-type-selftests.c.
12849         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12850         * common/offset-type.h: New file.
12851         * common/preprocessor.h: New file.
12852         * common/traits.h: New file.
12853         * common/valid-expr.h: New file.
12854         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12855         sect_offset and cu_offset strong typedefs throughout.
12856         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12857         typedefs throughout.
12858         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12859         sect_offset and cu_offset strong typedefs throughout.
12860         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12861         typedefs throughout.
12862         * gdbtypes.h: Include "common/offset-type.h".
12863         (cu_offset): Now an offset type (strong typedef) instead of a
12864         struct.
12865         (sect_offset): Likewise.
12866         (union call_site_parameter_u): Rename "param_offset" field to
12867         "param_cu_off".
12868         * unittests/offset-type-selftests.c: New file.
12869
12870 2017-04-04  Pedro Alves  <palves@redhat.com>
12871
12872         * common/underlying.h: New file.
12873         * dwarf2read.c: Include "common/gdb_optional.h" and
12874         "common/underlying.h".
12875         (dir_index, file_name_index): New types.
12876         (file_entry): Use them.
12877         (file_entry::include): Use to_underlying.
12878         (line_header::add_file_name): Use dir_index.
12879         (read_formatted_entries): Use gdb::optional.  Read form before
12880         writting to file_entry.
12881         (dwarf_decode_line_header): Use dir_index.
12882         (lnp_state_machine::current_file): Use to_underlying.
12883         (lnp_state_machine::file): Change type to file_name_index.
12884         (dwarf_record_line): Use to_underlying.
12885         (init_lnp_state_machine): Use file_name_index.
12886         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12887
12888 2017-04-04  Pedro Alves  <palves@redhat.com>
12889
12890         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12891         operator bool, has_value and get methods.
12892
12893 2017-04-04  Pedro Alves  <palves@redhat.com>
12894
12895         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12896         fields.
12897         (line_header): Initialize all data fields.  Change type of
12898         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12899         Change type of include_dirs to std::vector<const char *>.  Remove
12900         num_include_dirs, include_dirs_size.  Change type of file_names to
12901         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12902         (line_header::line_header): New.
12903         (line_header::add_include_dir, line_header::add_file_name): New
12904         methods.
12905         (line_header::include_dir_at): Remove NULL check.
12906         (line_header::file_name_at): Add const overload.
12907         (line_header_up): New unique_ptr typedef.
12908         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12909         std::vector.  Remove free_line_header call.
12910         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12911         free_line_header call.
12912         (free_cu_line_header): Delete.
12913         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12914         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12915         Adjust to use std::vector.
12916         (free_line_header): Delete.
12917         (free_line_header_voidp): Use delete.
12918         (add_include_dir): Replace with ...
12919         (line_header::add_include_dir): ... this method.  Use std::vector.
12920         (add_file_name): Replace with ...
12921         (line_header::add_file_name): ... this method.  Use std::vector.
12922         (add_include_dir_stub): Delete.
12923         (read_formatted_entries): Remove memset.
12924         (dwarf_decode_line_header): Return a line_header_up instead of a
12925         raw pointer.  Remove cleanup handling.  Pass lambdas to
12926         read_formatted_entries.  Adjust to use line_header methods.
12927         (dwarf_decode_lines_1): Adjust to use line_header methods.
12928         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12929         use std::vector.
12930
12931 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12932
12933         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12934         instead of struct ptid.
12935
12936 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12937
12938         * frame.c (get_frame_register_bytes): Unwind using value.
12939         (put_frame_register_bytes): Likewise.
12940
12941 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12942
12943         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12944         aggregate-like.
12945
12946 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12947
12948         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12949
12950 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12951
12952         * gdbthread.h (struct thread_info): Declare constructor and
12953         destructor.  Add some in-class member initializers.
12954         * thread.c (free_thread): Remove.
12955         (init_thread_list): Call delete instead of free_thread.
12956         (new_thread): Call thread_info constructor.
12957         (thread_info::thread_info): New function.
12958         (thread_info::~thread_info): New function.
12959         (delete_thread_1): Call delete instead of free_thread.
12960         (make_cleanup_restore_current_thread): Move tp and frame to
12961         inner block.
12962
12963 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12964
12965         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12966         (arc_skip_prologue): Likewise.
12967         (arc_make_frame_cache): Likewise.
12968         (arc_pv_get_operand): New function.
12969         (arc_is_in_prologue): Likewise.
12970         (arc_analyze_prologue): Likewise.
12971         (arc_print_frame_cache): Likewise.
12972         (MAX_PROLOGUE_LENGTH): New constant.
12973
12974 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12975
12976         * configure.tgt: Add arc-insn.o.
12977         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12978         (dump_arc_instruction_command): New function.
12979         (arc_fprintf_disasm): Likewise.
12980         (arc_disassemble_info): Likewise.
12981         (arc_insn_get_operand_value): Likewise.
12982         (arc_insn_get_operand_value_signed): Likewise.
12983         (arc_insn_get_memory_base_reg): Likewise.
12984         (arc_insn_get_memory_offset): Likewise.
12985         (arc_insn_get_branch_target): Likewise.
12986         (arc_insn_dump): Likewise.
12987         (arc_insn_get_linear_next_pc): Likewise.
12988         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12989         (arc_disassemble_info): Likewise.
12990         (arc_insn_get_branch_target): Likewise.
12991         (arc_insn_get_linear_next_pc): Likewise.
12992         * NEWS: Mention new "maint print arc arc-instruction".
12993
12994 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12995
12996         * arc-tdep (maintenance_print_arc_list): New variable.
12997         (maintenance_print_arc_command): New function.
12998
12999 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
13000
13001         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13002         Add "limm" and "reserved".
13003         (arc_cannot_fetch_register, arc_cannot_store_register): Add
13004         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13005         * arc-tdep.h (arc_regnum): Likewise.
13006
13007 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13008
13009         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13010         for THREADPTR register.
13011         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13012         register.
13013         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13014         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13015         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13016
13017 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13018
13019         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13020         registers above gdbarch_num_regs (gdbarch) as privileged in
13021         call0 ABI.
13022
13023 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13024
13025         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13026         for a single specified register or for all registers in
13027         a0_base..a0_base + C0_NREGS range.
13028         (supply_gregset_reg): Call regcache_raw_supply for a single
13029         specified register or for all registers in a0_base..a0_base +
13030         C0_NREGS range.
13031
13032 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13033
13034         * arch/xtensa.h (C0_NREGS): Add definition.
13035         * xtensa-tdep.c (C0_NREGS): Remove definition.
13036
13037 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
13038
13039         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13040         Drop xtensa_default_isa initialization.
13041         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13042
13043 2017-03-27  Pedro Alves  <palves@redhat.com>
13044
13045         * dwarf2read.c (file_entry) <dir_index>: Add comment.
13046         (file_entry::include_dir): New method.
13047         (line_header::include_dir_at, line_header::file_name_at): New
13048         methods.
13049         (setup_type_unit_groups, setup_type_unit_groups)
13050         (psymtab_include_file_name): Simplify using the new methods.
13051         (lnp_state_machine) <the_line_header>: New field.
13052         <file>: Add comment.
13053         (lnp_state_machine::current_file): New method.
13054         (dwarf_record_line): Simplify using the new methods.
13055         (init_lnp_state_machine): Initialize the "the_line_header" field.
13056         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13057         Simplify using the new methods.
13058
13059 2017-03-27  Pedro Alves  <palves@redhat.com>
13060
13061         * cp-name-parser.y (make_empty): Delete.
13062         (demangler_special, nested_name, ptr_operator, array_indicator)
13063         (direct_declarator, declarator_1): Use fill_comp instead of
13064         make_empty.
13065
13066 2017-03-27  Pedro Alves  <palves@redhat.com>
13067
13068         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13069         to ATTRIBUTE_PRINTF.
13070         * solib-target.c (library_list_start_list): Print "string" not
13071         "version".
13072         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13073         gdb_xml_error call.
13074
13075 2017-03-27  Pedro Alves  <palves@redhat.com>
13076
13077         * dwarf2read.c (struct file_and_directory): New.
13078         (dwarf2_get_dwz_file): Adjust to use std::string.
13079         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13080         (find_file_and_directory): Adjust to return a file_and_directory
13081         object.
13082         (read_file_scope): Adjust to use file_and_directory.  Remove
13083         make_cleanup/do_cleanups calls.
13084         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13085         make_cleanup/do_cleanups calls.
13086         * python/python.c (do_start_initialization): Adjust to ldirname
13087         returning a std::string.
13088         * utils.c (ldirname): Now returns a std::string.
13089         * utils.h (ldirname): Change return type to std::string.
13090         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13091         returning a std::string.
13092         * xml-tdesc.c (file_read_description_xml): Likewise.
13093
13094 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13095
13096         * regcache.c (regcache_debug_print_register): New function.
13097         * regcache.h (regcache_debug_print_register): New declaration.
13098         * target.c (debug_print_register): Remove.
13099         (target_fetch_registers): Call regcache_debug_print_register.
13100         (target_store_registers): Likewise.
13101
13102 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13103
13104         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13105         reference beyond the 'lh->include_dirs' array before accessing to
13106         it.
13107         (psymtab_include_file_name): Likewise.
13108         (dwarf_decode_lines_1): Likewise.
13109         (dwarf_decode_lines): Likewise.
13110         (file_file_name): Likewise.
13111
13112 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13113
13114         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13115         inferior_ptid.
13116         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13117         ps_lsetfpregs): Likewise.
13118         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13119         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13120         ps_lsetfpregs): Likewise.
13121         * target.c (target_fetch_registers, target_store_registers):
13122         Remove asserts.
13123
13124 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13125
13126         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13127
13128 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13129
13130         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13131         (_initialize_aarch64_tdep): Register it.
13132         (aarch64_record_load_store): Handle PRFM instruction.
13133         (aarch64_process_record_test): New function.
13134
13135 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13136
13137         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13138         indentation.
13139
13140 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13141
13142         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13143
13144 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13145
13146         python/python.c (do_start_initialization): Fix memory leak.
13147
13148 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13149
13150         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13151         using get_ptrace_pid.
13152         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13153         inferior_ptid.
13154         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13155         inferior_ptid instead of pid.
13156
13157 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13158
13159         * aarch64-tdep.c: Wrap locally used classes in anonymous
13160         namespace.
13161         * arm-tdep.c: Likewise.
13162         * linespec.c: Likewise.
13163         * ui-out.c: Likewise.
13164
13165 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13166
13167         PR gdb/19637
13168         * python/lib/gdb/printer/bound_registers.py: Import sys.
13169
13170 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13171
13172         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13173         windows_thread_info parameter and use it instead of
13174         current_thread.
13175         (windows_fetch_inferior_registers): Don't set current_thread,
13176         pass the thread to do_windows_fetch_inferior_registers.  Use
13177         ptid from regcache instead of inferior_ptid.
13178         (do_windows_store_inferior_registers): Add windows_thread_info
13179         parameter and use it instead of current_thread.
13180         (windows_store_inferior_registers): Don't set current_thread,
13181         pass the thread to do_windows_store_inferior_registers.  Use
13182         ptid from regcache instead of inferior_ptid.
13183
13184 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13185
13186         * ser-mingw.c (ser_windows_raw): Remove reference to
13187         struct serial::current_timeout.
13188
13189 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13190
13191         PR tdep/20928
13192         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13193         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13194         (sparc64_fsr_type): Fix %fsr decoding.
13195
13196 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13197
13198         * python/py-record-btrace.c (btpy_insn_data): Change return type
13199         for Python 2.
13200
13201 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13202
13203         * spu-linux-nat.c (spu_fetch_inferior_registers,
13204         spu_store_inferior_registers): Use ptid from regcache, set and
13205         restore inferior_ptid.
13206         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13207         Likewise.
13208
13209 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13210
13211         * i386-linux-nat.c (fetch_register, store_register,
13212         i386_linux_fetch_inferior_registers,
13213         i386_linux_store_inferior_registers): Use ptid from regcache.
13214         * ia64-linux-nat.c (ia64_linux_fetch_register,
13215         ia64_linux_store_register): Likewise.
13216         * inf-ptrace.c (inf_ptrace_fetch_register,
13217         inf_ptrace_store_register): Likewise.
13218         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13219         m32r_linux_store_inferior_registers): Likewise.
13220         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13221         m68kbsd_store_inferior_registers): Likewise.
13222         * m68k-linux-nat.c (fetch_register, store_register,
13223         m68k_linux_fetch_inferior_registers,
13224         m68k_linux_store_inferior_registers): Likewise.
13225         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13226         m88kbsd_store_inferior_registers): Likewise.
13227         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13228         mips_fbsd_store_inferior_registers): Likewise.
13229         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13230         mips64_linux_regsets_store_registers): Likewise.
13231         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13232         mipsnbsd_store_inferior_registers): Likewise.
13233         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13234         mips64obsd_store_inferior_registers): Likewise.
13235         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13236         Likewise.
13237         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13238         ppcfbsd_store_inferior_registers): Likewise.
13239         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13240         ppc_linux_store_inferior_registers): Likewise.
13241         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13242         ppcnbsd_store_inferior_registers): Likewise.
13243         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13244         ppcobsd_store_registers): Likewise.
13245         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13246         Likewise.
13247         * ravenscar-thread.c (ravenscar_fetch_registers,
13248         ravenscar_store_registers, ravenscar_prepare_to_store):
13249         Likewise.
13250         * record-btrace.c (record_btrace_fetch_registers,
13251         record_btrace_store_registers, record_btrace_prepare_to_store):
13252         Likewise.
13253         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13254         Lookup inferior using ptid from regcache, instead of
13255         current_inferior.
13256         * remote.c (remote_fetch_registers, remote_store_registers): Use
13257         ptid from regcache.
13258         * rs6000-nat.c (fetch_register, store_register): Likewise.
13259         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13260         s390_linux_store_inferior_registers): Likewise.
13261         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13262         shnbsd_store_inferior_registers): Likewise.
13263         * sol-thread.c (sol_thread_fetch_registers,
13264         sol_thread_store_registers): Likewise.
13265         * sparc-nat.c (sparc_fetch_inferior_registers,
13266         sparc_store_inferior_registers): Likewise.
13267         * tilegx-linux-nat.c (fetch_inferior_registers,
13268         store_inferior_registers): Likewise.
13269         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13270         vaxbsd_store_inferior_registers): Likewise.
13271         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13272         store_xtregs): Likewise.
13273
13274 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13275
13276         PR gdb/14441
13277         * NEWS: Mention support for rvalue references in GDB and python.
13278         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13279         supports both lvalue and rvalue references.
13280
13281 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13282
13283         PR gdb/14441
13284         * gdbtypes.c (rank_one_type): Implement overloading
13285         resolution rules regarding rvalue references.
13286
13287 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13288
13289         PR gdb/14441
13290         * aarch64-tdep.c (aarch64_type_align)
13291         (aarch64_extract_return_value, aarch64_store_return_value): Change
13292         lvalue reference type checks to general reference type checks.
13293         * amd64-tdep.c (amd64_classify): Likewise.
13294         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13295         Likewise.
13296         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13297         (arm_store_return_value): Likewise.
13298         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13299         * c-typeprint.c (c_print_type): Likewise.
13300         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13301         (cplus_number_of_children, cplus_describe_child): Likewise.
13302         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13303         * completer.c (expression_completer): Likewise.
13304         * cp-support.c (make_symbol_overload_list_adl_namespace):
13305         Likewise.
13306         * darwin-nat-info.c (info_mach_region_command): Likewise.
13307         * dwarf2loc.c (entry_data_value_coerce_ref)
13308         (value_of_dwarf_reg_entry): Likewise.
13309         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13310         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13311         Likewise.
13312         * findvar.c (extract_typed_address, store_typed_address):
13313         Likewise.
13314         * gdbtypes.c (rank_one_type): Likewise.
13315         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13316         * infcall.c (value_arg_coerce): Likewise.
13317         * language.c (pointer_type): Likewise.
13318         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13319         Likewise.
13320         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13321         * mn10300-tdep.c (mn10300_type_align): Likewise.
13322         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13323         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13324         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13325         Likewise.
13326         * printcmd.c (print_formatted, x_command): Likewise.
13327         * python/py-type.c (typy_get_composite, typy_template_argument):
13328         Likewise.
13329         * python/py-value.c (valpy_referenced_value)
13330         (valpy_get_dynamic_type, value_has_field): Likewise.
13331         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13332         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13333         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13334         * spu-tdep.c (spu_scalar_value_p): Likewise.
13335         * symtab.c (lookup_symbol_aux): Likewise.
13336         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13337         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13338         Likewise.
13339         * valops.c (value_cast_pointers, value_cast)
13340         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13341         (value_struct_elt, value_struct_elt_bitpos)
13342         (value_find_oload_method_list, find_overload_match)
13343         (value_rtti_indirect_type): Likewise.
13344         * valprint.c (val_print_scalar_type_p, generic_val_print):
13345         Likewise.
13346         * value.c (value_actual_type, value_as_address, unpack_long)
13347         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13348         (coerce_ref): Likewise.
13349         * varobj.c (varobj_get_value_type): Likewise.
13350
13351 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13352
13353         PR gdb/14441
13354         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13355         table of constants.
13356         * python/lib/gdb/command/explore.py: Support exploring values
13357         of rvalue reference types.
13358         * python/lib/gdb/types.py: Implement get_basic_type() for
13359         rvalue reference types.
13360         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13361         constant.
13362         * python/py-value.c (valpy_getitem): Add an rvalue reference
13363         check.
13364         (valpy_reference_value): Add new parameter "refcode".
13365         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13366         New wrappers for valpy_reference_value().
13367         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13368         (gdbpy_invoke_xmethod): Likewise.
13369
13370 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13371
13372         PR gdb/14441
13373         * dwarf2read.c (process_die, read_type_die_1): Handle the
13374         DW_TAG_rvalue_reference_type DIE.
13375         (read_tag_reference_type): Add new parameter "refcode".
13376
13377 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13378
13379         PR gdb/14441
13380         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13381         (c_type_print_modifier, c_type_print_varspec_suffix)
13382         (c_type_print_base): Support printing rvalue reference types.
13383         * c-valprint.c (c_val_print, c_value_print): Support printing
13384         rvalue reference values.
13385
13386 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13387
13388         PR gdb/14441
13389         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13390         typename.
13391         * cp-support.c (replace_typedefs): Handle
13392         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13393         * python/py-type.c (typy_lookup_type): Likewise.
13394
13395 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13396
13397         PR gdb/14441
13398         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13399         * parse.c (insert_type): Change assert statement.
13400         (follow_types): Handle rvalue reference types.
13401         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13402         constant.
13403
13404 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13405
13406         PR gdb/14441
13407         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13408         value_ref() interface.
13409         * c-valprint.c (c_value_print): Likewise.
13410         * infcall.c (value_arg_coerce): Likewise.
13411         * python/py-value.c (valpy_reference_value): Likewise.
13412         * valops.c (value_cast, value_reinterpret_cast)
13413         (value_dynamic_cast, typecmp): Likewise.
13414         (value_ref): Parameterize by kind of return value reference type.
13415         * value.h (value_ref): Add new parameter "refcode".
13416
13417 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13418
13419         PR gdb/14441
13420         * dwarf2read.c (read_tag_reference_type): Use
13421         lookup_lvalue_reference_type() instead of lookup_reference_type().
13422         * eval.c (evaluate_subexp_standard): Likewise.
13423         * f-exp.y: Likewise.
13424         * gdbtypes.c (make_reference_type, lookup_reference_type):
13425         Generalize with rvalue reference types.
13426         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13427         convenience wrappers for lookup_reference_type().
13428         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13429         reference kind parameter.
13430         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13431         wrappers for lookup_reference_type().
13432         * guile/scm-type.c (gdbscm_type_reference): Use
13433         lookup_lvalue_reference_type() instead of lookup_reference_type().
13434         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13435         * parse.c (follow_types): Likewise.
13436         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13437         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13438         Likewise.
13439         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13440         (gdbpy_invoke_xmethod): Likewise.
13441         * stabsread.c: Provide extra argument to make_reference_type()
13442         call.
13443         * valops.c (value_ref, value_rtti_indirect_type): Use
13444         lookup_lvalue_reference_type() instead of lookup_reference_type().
13445
13446 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13447
13448         PR gdb/14441
13449         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13450         (TYPE_IS_REFERENCE): New macro.
13451         (struct type): Add rvalue_reference_type field.
13452         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13453
13454 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13455
13456         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13457         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13458         New function definition.
13459         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13460         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13461         New function declaration.
13462         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13463         * mi/mi-interp.h: New file.
13464         * solib.c (info_sharedlibrary_command): Replace for loop with
13465         ALL_SO_LIBS macro
13466         * solib.h (update_solib_list): New function declaration.
13467         (so_list_head): Move macro.
13468         * solist.h (ALL_SO_LIBS): New macro.
13469
13470 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13471
13472         * infcmd.c (post_create_inferior): Remove unused argument in
13473         call to solib_add.
13474         * remote.c (remote_start_remote): Likewise.
13475         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13476         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13477         (enable_break): Likewise.
13478         * solib.c (update_solib_list): Remove unused target argument
13479         and its documentation.
13480         (solib_add): Remove unused target argument.  Remove unused
13481         argument in call to update_solib_list.
13482         (info_sharedlibrary_command): Remove unused argument in call
13483         to update_solib_list.
13484         (sharedlibrary_command): Remove unused argument in call to
13485         solib_add.
13486         (handle_solib_event): Likewise.
13487         (reload_shared_libraries): Likewise.
13488         * solib.h (solib_add): Remove unused target argument.
13489
13490 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13491
13492         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13493         (s390_displaced_step_fixup): Cover relative branches with the
13494         default fixup handling.  This fixes lack of support for some
13495         relative branch instructions.
13496
13497 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13498
13499         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13500         ptid from regcache.
13501
13502 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13503
13504         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13505         i386_darwin_store_inferior_registers): Use ptid from regcache.
13506
13507 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13508
13509         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13510         i386bsd_store_inferior_registers): Use ptid from regcache.
13511
13512 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13513
13514         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13515         hppaobsd_store_registers): Use ptid from regcache.
13516
13517 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13518
13519         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13520         hppanbsd_store_registers): Use ptid from regcache.
13521
13522 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13523
13524         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13525         from regcache.  Use get_ptrace_pid.
13526
13527 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13528
13529         * corelow.c (get_core_register_section): Use ptid from regcache,
13530         update doc.
13531
13532 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13533
13534         * bsd-uthread.c (bsd_uthread_fetch_registers,
13535         bsd_uthread_store_registers): Use ptid from regcache, set and
13536         restore inferior_ptid.
13537
13538 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13539
13540         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13541         fetch_fp_regs, store_register, store_regs, store_fp_register,
13542         store_fp_regs): Use ptid from regcache.
13543
13544 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13545
13546         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13547         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13548         store_vfp_regs): Use ptid from regcache.
13549
13550 2017-03-17  Pedro Alves  <palves@redhat.com>
13551
13552         PR remote/21188
13553         * ser-base.c (ser_base_wait_for): Add comment.
13554         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13555         version.
13556         * ser-unix.c (hardwire_raw): Remove reference to
13557         scb->current_timeout.
13558         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13559         (hardwire_ops): Install ser_base_readchar instead of
13560         hardwire_readchar.
13561         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13562         Remove fields.
13563
13564 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13565
13566         PR gdb/19637
13567         * python/lib/gdb/printer/bound_registers.py: Add support for
13568         Python 3.
13569
13570 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13571
13572         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13573         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13574         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13575         byte_offset to subobj_byte_offset.  Fix the handling of
13576         DWARF_VALUE_STACK on big-endian targets when coming via an
13577         implicit pointer.
13578         (dwarf2_evaluate_loc_desc): Adjust call to
13579         dwarf2_evaluate_loc_desc_full.
13580         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13581         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13582
13583 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13584
13585         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13586         and REVSH instructions.
13587
13588 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13589
13590         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13591         (arm_record_test): Declare.
13592         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13593         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13594         align with the manual.
13595         (thumb_record_misc): Adjust the code order to align with the
13596         manual.
13597         (thumb2_record_decode_insn_handler): Fix instruction matching.
13598         (instruction_reader_thumb): New class.
13599         (arm_record_test): New function.
13600
13601 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13602
13603         * arm-tdep.c (abstract_memory_reader): New class.
13604         (instruction_reader): New class.
13605         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13606         (decode_insn): Likewise.
13607
13608 2017-03-16  Doug Evans  <dje@google.com>
13609
13610         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13611         member.  Change type of TYPE member to SCM.  All uses updated.
13612         (lsscm_make_lazy_string_smob): Add assert.
13613         (lsscm_make_lazy_string): Flag bad length values.
13614         (lsscm_elt_type): New function.
13615         (gdbscm_lazy_string_to_value): Rewrite to use
13616         lsscm_safe_lazy_string_to_value.
13617         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13618         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13619         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13620         in incoming type.
13621         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13622         * guile/scm-type.c (tyscm_scm_to_type): New function.
13623
13624 2017-03-15  Doug Evans  <dje@google.com>
13625
13626         PR python/17728, python/18439, python/18779
13627         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13628         member.  Change type of TYPE member to PyObject *.  All uses updated.
13629         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13630         (gdbpy_create_lazy_string_object): Flag bad length values.
13631         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13632         Handle typedefs in incoming type.
13633         (stpy_lazy_string_elt_type): New function.
13634         (gdbpy_extract_lazy_string): Call it.
13635         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13636         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13637         typedefs in incoming type.
13638
13639 2017-03-16  Doug Evans  <dje@google.com>
13640
13641         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13642         * guile/scm-type.c (tyscm_scm_to_type): New function.
13643
13644 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13645
13646         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13647         "ULONGEST" for "skip".
13648
13649 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13650
13651         PR gdb/21220
13652         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13653         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13654         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13655         over ptrace peek/poke until end of buffer or error.
13656
13657 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13658
13659         * parse.c (length_of_subexp): Make static.
13660         * parser-defs.h (length_of_subexp): Remove.
13661
13662 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13663
13664         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13665         as well.
13666
13667 2017-03-14  Pedro Alves  <palves@redhat.com>
13668
13669         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13670         (main): Use std::unique_ptr.  Remove calls to
13671         cp_demangled_name_parse_free.
13672
13673 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13674
13675         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13676         alphabsd_store_inferior_registers): Use regcache->ptid instead
13677         of inferior_ptid.
13678
13679 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13680
13681         * aix-thread.c (aix_thread_fetch_registers,
13682         aix_thread_store_registers): Use regcache->ptid instead of
13683         inferior_ptid.
13684
13685 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13686
13687         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13688         store_gregs_to_thread, fetch_fpregs_from_thread,
13689         store_fpregs_to_thread): Use regcache->ptid instead of
13690         inferior_ptid.
13691
13692 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13693
13694         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13695         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13696         instead of inferior_ptid.
13697
13698 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13699
13700         * target.c (target_fetch_registers, target_store_registers): Add
13701         assert.
13702
13703 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13704
13705         * regcache.h (regcache_get_ptid): New function.
13706         * regcache.c (regcache_get_ptid): New function.
13707
13708 2017-03-13  Mark Wielaard  <mark@klomp.org>
13709
13710         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13711
13712 2017-03-10  Keith Seitz  <keiths@redhat.com>
13713
13714         PR c++/8218
13715         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13716
13717 2017-03-08  Pedro Alves  <palves@redhat.com>
13718
13719         PR gdb/18360
13720         * infrun.c (start_step_over, do_target_resume, resume)
13721         (restart_threads): Assert we're not resuming a thread that is
13722         meant to be stopped.
13723         (infrun_thread_stop_requested_callback): Delete.
13724         (infrun_thread_stop_requested): If the thread is internally
13725         stopped, queue a pending stop event and clear the thread's
13726         inline-frame state.
13727         (handle_stop_requested): New function.
13728         (handle_syscall_event, handle_inferior_event_1): Use
13729         handle_stop_requested.
13730         (handle_stop_requested): New function.
13731         (handle_signal_stop): Set the thread's stop_signal here instead of
13732         at caller.
13733         (finish_step_over): Clear step over info unconditionally.
13734         (handle_signal_stop): If the user had interrupted the event
13735         thread, consider the stop a random signal.
13736         (handle_signal_stop) <signal arrived while stepping over
13737         breakpoint>: Don't restart threads here.
13738         (stop_waiting): Don't clear step-over info here.
13739
13740 2017-03-08  Pedro Alves  <palves@redhat.com>
13741
13742         PR 21206
13743         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13744         goes to argument 2, not 1.
13745
13746 2017-03-08  Pedro Alves  <palves@redhat.com>
13747
13748         PR cli/21218
13749         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13750         display_gdb_prompt.
13751         (command_line_input): Add comment.
13752
13753 2017-03-08  Pedro Alves  <palves@redhat.com>
13754
13755         PR tui/21216
13756         * tui/tui-file.c (tui_file::write): New.
13757         * tui/tui-file.h (tui_file): Override "write".
13758         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13759         factored out from ...
13760         (tui_puts): ... here.
13761         (tui_putc): Use them.
13762         (tui_write): New function.
13763         * tui/tui-io.h (tui_write): Declare.
13764
13765 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13766
13767         * Makefile.in (SFILES): Replace "environ.c" with
13768         "common/environ.c".
13769         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13770         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13771         to...
13772         * common/environ.c: ... here.
13773         * environ.h: Moved to...
13774         * common/environ.h: ... here.
13775
13776 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13777
13778         * gdbarch.sh (pstring_ptr): New static function.
13779         (gdbarch_disassembler_options): Use it.
13780         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13781         not valid_disassembler_option->name.
13782         * gdbarch.c: Regenerate.
13783
13784 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13785
13786         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13787
13788 2017-03-07  Pedro Alves  <palves@redhat.com>
13789
13790         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13791
13792 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13793
13794         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13795         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13796         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13797         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13798
13799 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13800
13801         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13802
13803 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13804
13805         * remote.c (remote_add_target_side_commands): Use range-based
13806         for loop.
13807
13808 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13809
13810         PR gdb/21165
13811         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13812         value is lazy.
13813         * valprint.c (common_val_print): Likewise.
13814
13815 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13816
13817         * NEWS: Mention new set/show disassembler-options commands.
13818         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13819         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13820         (prospective_options): New static variable.
13821         (gdb_disassembler::gdb_disassembler): Initialize
13822         m_di.disassembler_options.
13823         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13824         (get_disassembler_options): New function.
13825         (set_disassembler_options): Likewise.
13826         (set_disassembler_options_sfunc): Likewise.
13827         (show_disassembler_options_sfunc): Likewise.
13828         (disassembler_options_completer): Likewise.
13829         (_initialize_disasm): Likewise.
13830         * disasm.h (get_disassembler_options): New prototype.
13831         (set_disassembler_options): Likewise.
13832         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13833         (gdbarch_verify_disassembler_options): Likewise.
13834         * gdbarch.c: Regenerate.
13835         * gdbarch.h: Likewise.
13836         * arm-tdep.c (num_disassembly_options): Delete.
13837         (set_disassembly_style): Likewise.
13838         (arm_disassembler_options): New static variable.
13839         (set_disassembly_style_sfunc): Convert short style name into long
13840         option name.  Call set_disassembler_options.
13841         (show_disassembly_style_sfunc): New function.
13842         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13843         set_gdbarch_verify_disassembler_options.
13844         (_initialize_arm_tdep): Delete regnames variable and update callers.
13845         (arm_disassembler_options): Initialize.
13846         (disasm_options): New variable.
13847         (num_disassembly_options): Rename from this...
13848         (num_disassembly_styles): ...to this.  Compute by scanning through
13849         disasm_options.
13850         (valid_disassembly_styles): Initialize using disasm_options.
13851         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13852         set_arm_regname_option.
13853         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13854         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13855         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13856         set_gdbarch_verify_disassembler_options.
13857         * s390-tdep.c (s390_disassembler_options): New static variable.
13858         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13859         set_gdbarch_verify_disassembler_options.
13860
13861 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13862
13863         * remote.c (remote_add_target_side_condition): Remove "struct"
13864         keyword from range-based for loop.
13865
13866 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13867
13868         * remote.c (remote_add_target_side_condition): Use range-based
13869         for loop.  Update comment.
13870
13871 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13872
13873         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13874
13875 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13876
13877         * regcache.c (regcache_raw_update): New function.
13878         (regcache_raw_read): Move code to regcache_raw_update.
13879         * regcache.h (regcache_raw_update): New declaration.
13880         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13881
13882 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13883
13884         * dwarf2read.c (create_debug_type_hash_table): Initialize
13885         header.signature and header.type_offset_in_tu.
13886
13887 2017-02-24  Pedro Alves  <palves@redhat.com>
13888
13889         * symtab.c (make_file_symbol_completion_list_1): Use
13890         add_symtab_completions.
13891
13892 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13893
13894         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13895
13896 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13897
13898         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13899         I386_MAX_REGISTER_SIZE.
13900         (i386_pseudo_register_write): Likewise.
13901         (i386_process_record): Likewise.
13902         * i387-tdep.c (i387_supply_xsave): Likewise.
13903         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13904         (store_register): Likewise.
13905
13906 2017-02-23  Pedro Alves  <palves@redhat.com>
13907
13908         * ada-lang.c: Include "common/function-view.h".
13909         (ada_iterate_over_symbols): Adjust to use function_view as
13910         callback type.
13911         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13912         (ada_make_symbol_completion_list): Use a lambda.
13913         (ada_exc_search_name_matches): Delete.
13914         (name_matches_regex): New.
13915         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13916         * compile/compile-c-support.c: Include "common/function-view.h".
13917         (print_one_macro): Change prototype to accept a ui_file pointer.
13918         (write_macro_definitions): Use a lambda.
13919         * dwarf2read.c: Include "common/function-view.h".
13920         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13921         (dw2_expand_symtabs_matching): Adjust to use function_view as
13922         callback type.
13923         * language.h: Include "common/function-view.h".
13924         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13925         function_view as callback type.
13926         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13927         * linespec.c: Include "common/function-view.h".
13928         (collect_info::add_symbol): New method.
13929         (struct symbol_and_data_callback, iterate_inline_only, struct
13930         symbol_matcher_data, iterate_name_matcher): Delete.
13931         (iterate_over_all_matching_symtabs): Adjust to use function_view
13932         as callback type and lambdas.
13933         (iterate_over_file_blocks): Adjust to use function_view as
13934         callback type.
13935         (decode_compound_collector): Now a class with private fields.
13936         (decode_compound_collector::release_symbols): New method.
13937         (collect_one_symbol): Rename to...
13938         (decode_compound_collector::operator()): ... this and adjust.
13939         (lookup_prefix_sym): decode_compound_collector construction bits
13940         move to decode_compound_collector ctor.  Pass the
13941         decode_compound_collector object directly as callback.  Remove
13942         cleanups and use decode_compound_collector::release_symbols
13943         instead.
13944         (symtab_collector): Now a class with private fields.
13945         (symtab_collector::release_symtabs): New method.
13946         (add_symtabs_to_list): Rename to...
13947         (symtab_collector::operator()): ... this and adjust.
13948         (collect_symtabs_from_filename): symtab_collector construction
13949         bits move to symtab_collector ctor.  Pass the symtab_collector
13950         object directly as callback.  Remove cleanups and use
13951         symtab_collector::release_symtabs instead.
13952         (collect_symbols): Delete.
13953         (add_matching_symbols_to_info): Use lambdas.
13954         * macrocmd.c (print_macro_callback): Delete.
13955         (info_macro_command): Use a lambda.
13956         (info_macros_command): Pass print_macro_definition as callable
13957         directly.
13958         (print_one_macro): Remove 'ignore' parameter.
13959         (macro_list_command): Adjust.
13960         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13961         (macro_for_each_data::user_data): Delete field.
13962         (foreach_macro): Adjust to call the function_view.
13963         (macro_for_each): Adjust to use function_view as callback type.
13964         (foreach_macro_in_scope): Adjust to call the function_view.
13965         (macro_for_each_in_scope): Adjust to use function_view as callback
13966         type.
13967         * macrotab.h: Include "common/function-view.h".
13968         (macro_callback_fn): Declare a prototype instead of a pointer.
13969         Remove "user_data" parameter.
13970         (macro_for_each, macro_for_each_in_scope): Adjust to use
13971         function_view as callback type.
13972         * psymtab.c (partial_map_expand_apply)
13973         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13974         Adjust to use function_view as callback type and to return bool.
13975         (psym_expand_symtabs_matching): Adjust to use function_view as
13976         callback types.
13977         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13978         to use function_view as callback type and to return bool.
13979         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13980         callback types.
13981         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13982         as callback types.
13983         * symfile.h: Include "common/function-view.h".
13984         (expand_symtabs_file_matcher_ftype)
13985         (expand_symtabs_symbol_matcher_ftype)
13986         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13987         return bool.
13988         (quick_symbol_functions::map_symtabs_matching_filename)
13989         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13990         function_view as callback type and return bool.
13991         (expand_symtabs_matching): Adjust to use function_view as callback
13992         type.
13993         (maintenance_expand_name_matcher)
13994         (maintenance_expand_file_matcher): Delete.
13995         (maintenance_expand_symtabs): Use lambdas.
13996         * symtab.c (iterate_over_some_symtabs): Adjust to use
13997         function_view as callback types and return bool.
13998         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13999         of a cleanup.
14000         (lookup_symtab_callback): Delete.
14001         (lookup_symtab): Use a lambda.
14002         (iterate_over_symbols): Adjust to use function_view as callback
14003         type.
14004         (struct search_symbols_data, search_symbols_file_matches)
14005         (search_symbols_name_matches): Delete.
14006         (search_symbols): Use a pair of lambdas.
14007         (struct add_name_data, add_macro_name, symbol_completion_matcher)
14008         (symtab_expansion_callback): Delete.
14009         (default_make_symbol_completion_list_break_on_1): Use lambdas.
14010         * symtab.h: Include "common/function-view.h".
14011         (iterate_over_some_symtabs): Adjust to use function_view as
14012         callback type and return bool.
14013         (iterate_over_symtabs): Adjust to use function_view as callback
14014         type.
14015         (symbol_found_callback_ftype): Remove 'data' parameter and return
14016         bool.
14017         (iterate_over_symbols): Adjust to use function_view as callback
14018         type.
14019
14020 2017-02-23  Pedro Alves  <palves@redhat.com>
14021
14022         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14023         (%.o) <unittests/%.c>: New pattern.
14024         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14025         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14026         * common/function-view.h: New file.
14027         * unittests/function-view-selftests.c: New file.
14028         * configure: Regenerate.
14029
14030 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
14031
14032         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14033         inferior_ptid.
14034         * go32-nat.c (go32_thread_alive): Likewise.
14035
14036 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14037
14038         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14039         delete.
14040
14041 2017-02-23  Yao Qi  <yao.qi@linaro.org>
14042
14043         * varobj.c (varobj_clear_saved_item): Use delete instead of
14044         xfree.
14045         (update_dynamic_varobj_children): Likewise.
14046
14047 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14048
14049         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14050
14051 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14052
14053         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14054         m_enum_value to 0 in default constructor.
14055
14056 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14057
14058         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14059         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14060         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14061         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14062         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14063         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14064         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14065         IS_STORE_CONDITIONAL_INSN.
14066
14067 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14068
14069         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14070
14071 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14072
14073         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14074
14075 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14076
14077         * dwarf2read.c (skip_one_die, read_attribute_value)
14078         (dwarf2_const_value_attr, dump_die_shallow)
14079         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14080         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14081
14082 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14083
14084         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14085         (dwarf_parse_macro_header): Accept DWARF version 5.
14086         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14087
14088 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14089
14090         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14091         DW_AT_GNU_*.
14092         * common/common-exceptions.h (enum errors): Likewise.
14093         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14094         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14095         (dwarf_expr_context::execute_stack_op): Likewise.
14096         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14097         Likewise.
14098         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14099         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14100         (show_entry_values_debug, call_site_to_target_addr)
14101         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14102         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14103         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14104         (value_of_dwarf_block_entry, indirect_pieced_value)
14105         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14106         (disassemble_dwarf_expression): Likewise.
14107         * dwarf2read.c (process_die, inherit_abstract_dies)
14108         (read_call_site_scope): Likewise.
14109         * gdbtypes.h (struct func_type, struct call_site_parameter)
14110         (struct call_site): Likewise.
14111         * stack.c (read_frame_arg): Likewise.
14112         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14113
14114 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14115
14116         * defs.h (read_unsigned_leb128): New declaration.
14117         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14118         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14119         (dwarf2_find_location_expression): Call also
14120         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14121         * dwarf2loc.h (dwarf2_version): New declaration.
14122         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14123         rnglists.
14124         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14125         .debug_rnglists.
14126         (struct dwop_section_names): Add loclists_dwo.
14127         (dwop_section_names): Add .debug_loclists.dwo.
14128         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14129         (struct dwarf2_per_cu_data): Add dwarf_version.
14130         (struct dwo_sections): Add loclists.
14131         (struct attr_abbrev): Add implicit_const.
14132         (read_indirect_line_string): New declaration.
14133         (read_unsigned_leb128): Delete declaration.
14134         (rcuh_kind): New definition.
14135         (read_and_check_comp_unit_head): Change parameter
14136         is_debug_types_section to section_kind.
14137         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14138         (read_comp_unit_head): Change parameter abfd to section, add parameter
14139         section_kind.  Handle DWARF-5.
14140         (error_check_comp_unit_head): Accept also DWARF version 5.
14141         (read_and_check_comp_unit_head): Change parameter
14142         is_debug_types_section to section_kind.
14143         (read_and_check_type_unit_head): Delete function.
14144         (read_abbrev_offset): Handle DWARF-5.
14145         (create_debug_type_hash_table): Add parameter section_kind.  Process
14146         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14147         comp_unit_head.
14148         (create_debug_types_hash_table): Update create_debug_type_hash_table
14149         caller.
14150         (create_all_type_units): Call create_debug_type_hash_table.
14151         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14152         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14153         caller.
14154         (skip_one_die): Handle DW_FORM_implicit_const.
14155         (dwarf2_rnglists_process): New function.
14156         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14157         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14158         (read_attribute_value): Handle DW_FORM_implicit_const,
14159         DW_FORM_line_strp.
14160         (read_attribute): Handle DW_FORM_implicit_const.
14161         (read_indirect_string_at_offset_from): New function from
14162         read_indirect_string_at_offset.
14163         (read_indirect_string_at_offset): Call
14164         read_indirect_string_at_offset_from.
14165         (read_indirect_line_string_at_offset): New function.
14166         (read_indirect_string): New function comment.
14167         (read_indirect_line_string): New function.
14168         (read_unsigned_leb128): Make it global.
14169         (dwarf2_string_attr): Handle DWARF-5.
14170         (add_include_dir_stub, read_formatted_entries): New functions.
14171         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14172         Handle DWARF-5.
14173         (per_cu_header_read_in): Update read_comp_unit_head caller.
14174         (dwarf2_version): New function.
14175         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14176         rnglists.
14177         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14178         fields.
14179
14180 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14181
14182         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14183
14184 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14185
14186         * dwarf2read.c (dwarf2_ranges_process): New function from
14187         dwarf2_ranges_read.
14188         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14189         dwarf2_ranges_process.
14190
14191 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14192
14193         * dwarf2read.c (create_debug_type_hash_table): New function from
14194         create_debug_types_hash_table.
14195         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14196         (create_all_type_units, open_and_init_dwo_file): Update
14197         create_debug_types_hash_table callers.
14198
14199 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14200
14201         PR gdb/16188
14202         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14203         refer to 'ap', not 'args'.
14204
14205 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14206             Pedro Alves  <palves@redhat.com>
14207
14208         PR gdb/16188
14209         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14210         calls succeeded.
14211         * fork-child.c (trace_start_error): New function.
14212         (trace_start_error_with_name): Likewise.
14213         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14214         * inf-ptrace.c (inf_ptrace_me): Likewise.
14215         * inferior.h (trace_start_error): New prototype.
14216         (trace_start_error_with_name): Likewise.
14217
14218 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14219
14220         PR gdb/21164
14221         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14222         NULL before using it.
14223         * symmisc.c (maintenance_print_symbols): Likewise.
14224         (maintenance_print_msymbols): Likewise.
14225
14226 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14227
14228         * NEWS: Add record Python bindings entry.
14229
14230 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14231
14232         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14233         py-record-full.o.
14234         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14235         * python/py-record-btrace.c, python/py-record-btrace.h,
14236         python/py-record-full.c, python/py-record-full.h: New file.
14237         * python/py-record.c: Add include for py-record-btrace.h and
14238         py-record-full.h.
14239         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14240         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14241         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14242         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14243         New definition.
14244         (gdbpy_initialize_btrace): New export.
14245         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14246
14247 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14248
14249         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14250         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14251         * python/py-record.c: New file.
14252         * python/python-internal.h (gdbpy_start_recording,
14253         gdbpy_current_recording, gdpy_stop_recording,
14254         gdbpy_initialize_record): New export.
14255         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14256         (python_GdbMethods): Add gdbpy_start_recording,
14257         gdbpy_current_recording and gdbpy_stop_recording.
14258
14259 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14260
14261         * record-btrace.c (record_btrace_record_method): New function.
14262         (init_record_btrace_ops): Initialize to_record_method.
14263         * record-full.c (record_full_record_method): New function.
14264         (init_record_full_ops, init_record_full_core_ops): Add
14265         record_full_record_method.
14266         * record.h (enum record_method): New enum.
14267         * target-debug.h (target_debug_print_enum_record_method: New define.
14268         * target-delegates.c: Regenerate.
14269         * target.c (target_record_method): New function.
14270         * target.h: Include record.h.
14271         (struct target_ops) <to_record_method>: New field.
14272         (target_record_method): New export.
14273
14274 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14275
14276         * record.h (record_start, record_stop): New export.
14277         * record.c (record_start, record_stop): New function.
14278
14279 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14280
14281         * btrace.c (btrace_fetch): Copy function call segments pointer
14282         into a vector.
14283         (btrace_clear): Clear the vector.
14284         (btrace_find_insn_by_number): Use binary search to find the correct
14285         function call segment.
14286         * btrace.h (brace_fun_p): New typedef.
14287         (struct btrace_thread_info) <functions>: New field.
14288
14289 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14290
14291         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14292         * btrace.c (btrace_decode_error): ... here.  New function.
14293         * btrace.h (btrace_decode_error): New export.
14294
14295 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14296
14297         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14298         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14299         btrace_find_insn_by_number): Remove special case for gaps.
14300         * btrace.h (btrace_insn_get_error): New export.
14301         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14302         * record-btrace.c (btrace_insn_history): Print number for gaps.
14303         (record_btrace_info, record_btrace_goto): Handle gaps.
14304
14305 2017-02-14  Tom Tromey  <tom@tromey.com>
14306
14307         PR python/13598:
14308         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14309         event.
14310         * python/py-evts.c (gdbpy_initialize_py_events): Add
14311         before_prompt registry.
14312         * python/py-events.h (events_object) <before_prompt>: New field.
14313
14314 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14315
14316         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14317
14318 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14319
14320         * symfile (_initialize_symfile): Add usage text to the load command's
14321         help text.
14322
14323 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14324
14325         * utils.c (defaulted_query): Don't query on secondary UIs.
14326
14327 2017-02-10  Tom Tromey  <tom@tromey.com>
14328
14329         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14330
14331 2017-02-10  Tom Tromey  <tom@tromey.com>
14332
14333         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14334         "cleanup" local.
14335         * python/py-type.c (typy_legacy_template_argument): Remove
14336         unnecessary "cleanup" local.
14337
14338 2017-02-10  Tom Tromey  <tom@tromey.com>
14339
14340         * python/python.c (do_start_initialization): New function, from
14341         _initialize_python.
14342         (_initialize_python): Call do_start_initialization.
14343         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14344         goto.
14345
14346 2017-02-10  Tom Tromey  <tom@tromey.com>
14347
14348         * python/py-prettyprint.c (pretty_print_one_value): Use
14349         gdbpy_ref.
14350
14351 2017-02-10  Tom Tromey  <tom@tromey.com>
14352
14353         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14354         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14355         gdbpy_ref.
14356         * python/py-type.c (field_new): Use gdbpy_ref.
14357         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14358         gdbpy_ref.
14359         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14360         (py_free_pspace): Likewise.
14361         (pspace_to_pspace_object): Likewise.
14362         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14363         (py_free_objfile): Likewise.
14364         (objfile_to_objfile_object): Likewise.
14365         * python/py-inferior.c (delete_thread_object): Use
14366         gdbpy_ref.
14367         (infpy_read_memory): Likewise.
14368         (py_free_inferior): Likewise.
14369         * python/py-evtregistry.c (create_eventregistry_object): Use
14370         gdbpy_ref.
14371         * python/py-event.c (create_event_object): Use gdbpy_ref.
14372
14373 2017-02-10  Tom Tromey  <tom@tromey.com>
14374
14375         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14376         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14377         used.
14378         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14379         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14380         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14381         python/py-framefilter.c, python/py-function.c,
14382         python/py-inferior.c, python/py-infevents.c,
14383         python/py-linetable.c, python/py-newobjfileevent.c,
14384         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14385         python/py-signalevent.c, python/py-stopevent.c,
14386         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14387         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14388         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14389         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14390
14391 2017-02-10  Tom Tromey  <tom@tromey.com>
14392
14393         * ui-out.h (ui_out_emit_type): New class.
14394         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14395         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14396         and ui_out_emit_tuple.
14397         (enumerate_locals): Likewise.
14398         (py_mi_print_variables, py_print_locals, py_print_args): Use
14399         ui_out_emit_list.
14400         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14401         ui_out_emit_list.
14402         * common/gdb_optional.h: New file.
14403
14404 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14405
14406         * MAINTAINERS (Write After Approval): Update my e-mail address.
14407
14408 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14409
14410         PR gdb/21122
14411         * breakpoint.c (_initialize_breakpoint): Update the help description
14412         of the 'commands' command to indicate that it takes a list argument.
14413
14414 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14415
14416         * interps.c (current_interp_set_logging): Remove "return".
14417
14418 2017-02-09  Gary Benson  <gbenson@redhat.com>
14419
14420         * symtab.c (add_symtab_completions): Prevent NULL pointer
14421         dereference.
14422
14423 2017-02-08  Pedro Alves  <palves@redhat.com>
14424
14425         * interps.c (interp::interp): Remove reference to quiet_p.
14426         (interp_set): Make static.  Remove dead "Switching to" output
14427         code.
14428         (interp_quiet_p, interp_set_quiet): Delete.
14429         (interpreter_exec_cmd): Don't set the interpreter quiet.
14430         * interps.h (interp_quiet_p): Make static.
14431         (class interp) <quiet_p>: Remove field
14432
14433 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14434
14435         * cli/cli-decode.c (find_command_name_length): Make it extern.
14436         * cli/cli-decode.h (find_command_name_length): Declare.
14437         * cli/cli-script.c (command_name_equals, line_first_arg):
14438         New functions.
14439         (process_next_line): Use cli-decode to parse command names.
14440         (build_command_line): Make args a constant pointer.
14441
14442 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14443
14444         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14445         Remove case-insensitive search.
14446
14447 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14448
14449         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14450         at the end of the line.  Avoids an ARI warning.
14451
14452 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14453
14454         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14455         rdseed instructions.
14456         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14457
14458 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14459
14460         PR tdep/20936
14461         Provide and use sparc32 and sparc64 target description XML files.
14462         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14463         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14464         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14465         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14466         * features/sparc/sparc32-solaris.xml: New file.
14467         * features/sparc/sparc64-solaris.xml: New file.
14468         * features/sparc/sparc32-solaris.c: Generated.
14469         * features/sparc/sparc64-solaris.c: Generated.
14470         * sparc-tdep.h: Account for differences in target descriptions.
14471         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14472         (sparc32_register_type): Use target provided registers.
14473         (validate_tdesc_registers): New function.
14474         (sparc32_gdbarch_init): Use tdesc_has_registers.
14475         Set pseudoregister functions.
14476         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14477         (sparc64_register_type): Use target provided registers.
14478         (sparc64_init_abi): Set pseudoregister functions.
14479
14480 2017-02-03  Tom Tromey  <tom@tromey.com>
14481
14482         PR rust/21097:
14483         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14484         with a single member.
14485
14486 2017-02-03  Pedro Alves  <palves@redhat.com>
14487
14488         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14489         (cli_interp_base::~cli_interp_base): New.
14490         (cli_interp): New struct.
14491         (as_cli_interp): Cast the interp itself to cli_interp.
14492         (cli_interpreter_pre_command_loop): Rename to ...
14493         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14494         parameter.
14495         (cli_interpreter_init): Rename to ...
14496         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14497         boolean.  Make extern.
14498         (cli_interpreter_resume): Rename to ...
14499         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14500         extern.
14501         (cli_interpreter_suspend): Rename to ...
14502         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14503         extern.
14504         (cli_interpreter_exec): Rename to ...
14505         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14506         extern.
14507         (cli_interpreter_supports_command_editing): Rename to ...
14508         (cli_interp_base::supports_command_editing): ... this.  Remove
14509         'interp' parameter.  Make extern.
14510         (cli_ui_out): Rename to ...
14511         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14512         Make extern.
14513         (cli_set_logging): Rename to ...
14514         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14515         parameter.  Make extern.
14516         (cli_interp_procs): Delete.
14517         (cli_interp_factory): Adjust to use "new".
14518         * cli/cli-interp.h: Include "interps.h".
14519         (struct cli_interp_base): New struct.
14520         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14521         (interp_new): Delete.
14522         (interp::interp, interp::~interp): New.
14523         (interp_set): Use bool, and return void.  Assume the interpreter
14524         has suspend, init and resume methods, and that the all return
14525         void.
14526         (set_top_level_interpreter): interp_set returns void.
14527         (interp_ui_out): Adapt.
14528         (current_interp_set_logging): Adapt.
14529         (interp_data): Delete.
14530         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14531         (interp_exec): Adapt.
14532         (top_level_interpreter_data): Delete.
14533         * interps.h (interp_init_ftype, interp_resume_ftype)
14534         (interp_suspend_ftype, interp_exec_ftype)
14535         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14536         (class interp): New.
14537         (interp_new): Delete.
14538         (interp_set): Now returns void.  Use bool.
14539         (interp_data, top_level_interpreter_data): Delete.
14540         * mi/mi-common.h: Include interps.h.
14541         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14542         init, resume, suspect, exec, interp_ui_out, set_logging and
14543         pre_command_loop methods.
14544         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14545         (mi_interpreter_init): Rename to ...
14546         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14547         bool, return void and make extern.  Adjust.
14548         (mi_interpreter_resume): ... Rename to ...
14549         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14550         return void and make extern.  Adjust.
14551         (mi_interpreter_suspend): ... Rename to ...
14552         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14553         return void and make extern.  Adjust.
14554         (mi_interpreter_exec): ... Rename to ...
14555         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14556         extern.  Adjust.
14557         (mi_interpreter_pre_command_loop): ... Rename to ...
14558         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14559         parameter and make extern.
14560         (mi_on_normal_stop_1): Adjust.
14561         (mi_ui_out): Rename to ...
14562         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14563         parameter and make extern.  Adjust.
14564         (mi_set_logging): Rename to ...
14565         (mi_interp::set_logging): ... this.  Remove the 'interp'
14566         parameter and make extern.  Adjust.
14567         (mi_interp_procs): Delete.
14568         (mi_interp_factory): Adjust to use 'new'.
14569         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14570         (mi_print_exception, mi_execute_command, mi_load_progress):
14571         Adjust.
14572         * tui/tui-interp.c (tui_interp): New class.
14573         (as_tui_interp): Return a tui_interp pointer.
14574         (tui_on_normal_stop, tui_on_signal_received)
14575         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14576         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14577         to use interp::interp_ui_out.
14578         (tui_init): Rename to ...
14579         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14580         bool, return void and make extern.  Adjust.
14581         (tui_resume): Rename to ...
14582         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14583         return void and make extern.  Adjust.
14584         (tui_suspend): Rename to ...
14585         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14586         return void and make extern.  Adjust.
14587         (tui_ui_out): Rename to ...
14588         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14589         parameter, and make extern.  Adjust.
14590         (tui_exec): Rename to ...
14591         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14592         make extern.
14593         (tui_interp_procs): Delete.
14594         (tui_interp_factory): Use "new".
14595
14596 2017-02-02  Tom Tromey  <tom@tromey.com>
14597
14598         * rust-exp.y (ends_raw_string, space_then_number)
14599         (rust_identifier_start_p): Return bool.
14600         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14601         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14602         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14603         (rust_chartype_p): Return bool.
14604         (val_print_struct, rust_print_struct_def, rust_print_type):
14605         Update.
14606         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14607         Return bool.
14608
14609 2017-02-02  Tom Tromey  <tom@tromey.com>
14610
14611         * rust-lang.c: Reindent.
14612
14613 2017-02-02  Tom Tromey  <tom@tromey.com>
14614
14615         * rust-lang.h (rust_crate_for_block): Update.
14616         * rust-lang.c (rust_crate_for_block): Return std::string.
14617         (rust_get_disr_info): Use std:;string, not
14618         gdb::unique_xmalloc_ptr.
14619         * rust-exp.y (crate_name): Update.
14620
14621 2017-02-02  Pedro Alves  <palves@redhat.com>
14622
14623         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14624         field out of gdb_disassembler_test and make it static.
14625
14626 2017-02-02  Pedro Alves  <palves@redhat.com>
14627
14628         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14629         mi1_interp and mi_interp fields.
14630
14631 2017-02-02  Pedro Alves  <palves@redhat.com>
14632
14633         * cli/cli-interp.c (struct saved_output_files, saved_output):
14634         Moved from cli/cli-logging.c.
14635         (cli_set_logging): New function.
14636         (cli_interp_procs): Install cli_set_logging.
14637         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14638         Declare.
14639         * cli/cli-logging.c (struct saved_output_files, saved_output):
14640         Moved to cli/cli-interp.c.
14641         (pop_output_files): Don't save outputs here.
14642         (make_logging_output): New function.
14643         (handle_redirections): Don't build tee nor save previous outputs
14644         here.
14645         * interps.c (current_interp_set_logging): Change prototype.
14646         Assume there's always a set_logging_proc method installed.
14647         * interps.h (interp_set_logging_ftype): Change prototype.
14648         (current_interp_set_logging): Change prototype and adjust comment.
14649         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14650         use make_logging_output.
14651         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14652 2017-02-02  Pedro Alves  <palves@redhat.com>
14653
14654         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14655         from ...
14656         (set_logging_overwrite): ... here.
14657         (logging_no_redirect_file): Delete.
14658         (set_logging_redirect): Don't handle redirection on the fly.
14659         Instead warn that "logging off" / "logging on" is necessary.
14660         (pop_output_files): Delete references to logging_no_redirect_file.
14661         (show_logging_command): Always speak in terms of what will happen
14662         once logging is reenabled.
14663
14664 2017-02-02  Pedro Alves  <palves@redhat.com>
14665
14666         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14667
14668 2017-02-02  Pedro Alves  <palves@redhat.com>
14669
14670         * disasm.c (gdb_pretty_print_insn): Rename to ...
14671         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14672         Remove gdbarch parameter.  Adapt to clear the object's buffers
14673         instead of allocating new buffers, and to print using the object's
14674         gdb_disassembler instead of calling gdb_print_insn.
14675         (dump_insns): Use gdb_pretty_print_disassembler.
14676         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14677         (gdb_pretty_print_disassembler): New class.
14678         * record-btrace.c (btrace_insn_history): Use
14679         gdb_pretty_print_disassembler.
14680
14681 2017-02-02  Pedro Alves  <palves@redhat.com>
14682
14683         * ada-lang.c (type_as_string): Use string_file.
14684         * ada-valprint.c (ada_print_floating): Use string_file.
14685         * ada-varobj.c (ada_varobj_scalar_image)
14686         (ada_varobj_get_value_image): Use string_file.
14687         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14688         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14689         * breakpoint.c (update_inserted_breakpoint_locations)
14690         (insert_breakpoint_locations, reattach_breakpoints)
14691         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14692         (print_it_watchpoint): Use string_file.
14693         (save_breakpoints): Use stdio_file.
14694         * c-exp.y (oper): Use string_file.
14695         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14696         tee_file.
14697         (pop_output_files): Use delete.
14698         (handle_redirections): Use stdio_file and tee_file.
14699         * cli/cli-setshow.c (do_show_command): Use string_file.
14700         * compile/compile-c-support.c (c_compute_program): Use
14701         string_file.
14702         * compile/compile-c-symbols.c (generate_vla_size): Take a
14703         'string_file &' instead of a 'ui_file *'.
14704         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14705         of a 'ui_file *'.  Use string_file.
14706         (generate_c_for_variable_locations): Take a 'string_file &'
14707         instead of a 'ui_file *'.
14708         * compile/compile-internal.h (generate_c_for_for_one_variable):
14709         Take a 'string_file &' instead of a 'ui_file *'.
14710         * compile/compile-loc2c.c (push, pushf, unary, binary)
14711         (print_label, pushf_register_address, pushf_register)
14712         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14713         'ui_file *'.  Adjust.
14714         * compile/compile.c (compile_to_object): Use string_file.
14715         * compile/compile.h (compile_dwarf_expr_to_c)
14716         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14717         'ui_file *'.
14718         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14719         (replace_typedefs_qualified_name): Use string_file and
14720         obstack_copy0.
14721         * disasm.c (gdb_pretty_print_insn): Use string_file.
14722         (gdb_disassembly): Adjust reference the null_stream global.
14723         (do_ui_file_delete): Delete.
14724         (gdb_insn_length): Use null_stream.
14725         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14726         * dwarf2loc.c (dwarf2_compile_property_to_c)
14727         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14728         'string_file &' instead of a 'ui_file *'.
14729         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14730         * dwarf2read.c (do_ui_file_peek_last): Delete.
14731         (dwarf2_compute_name): Use string_file.
14732         * event-top.c (gdb_setup_readline): Use stdio_file.
14733         * gdbarch.sh (verify_gdbarch): Use string_file.
14734         * gdbtypes.c (safe_parse_type): Use null_stream.
14735         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14736         string_file.
14737         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14738         'string_file *' instead of a 'ui_file *'.
14739         (gdbscm_arch_disassemble): Use string_file.
14740         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14741         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14742         inherits from ui_file.
14743         (ioscm_file_port_delete, ioscm_file_port_rewind)
14744         (ioscm_file_port_put): Delete.
14745         (ioscm_file_port_write): Rename to ...
14746         (ioscm_file_port::write): ... this.  Remove file_port_magic
14747         checks.
14748         (ioscm_file_port_new): Delete.
14749         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14750         ui_file_up.
14751         * guile/scm-type.c (tyscm_type_name): Use string_file.
14752         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14753         Use string_file.
14754         * infcmd.c (print_return_value_1): Use string_file.
14755         * infrun.c (print_target_wait_results): Use string_file.
14756         * language.c (add_language): Use string_file.
14757         * location.c (explicit_to_string_internal): Use string_file.
14758         * main.c (captured_main_1): Use null_file.
14759         * maint.c (maintenance_print_architecture): Use stdio_file.
14760         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14761         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14762         event_channel>: Change type to mi_console_file pointer.
14763         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14764         (mi_console_file_delete): Delete.
14765         (struct mi_console_file): Delete.
14766         (mi_console_file_magic): Delete.
14767         (mi_console_file_new): Delete.
14768         (mi_console_file::mi_console_file): New.
14769         (mi_console_file_delete): Delete.
14770         (mi_console_file_fputs): Delete.
14771         (mi_console_file::write): New.
14772         (mi_console_raw_packet): Delete.
14773         (mi_console_file::flush): New.
14774         (mi_console_file_flush): Delete.
14775         (mi_console_set_raw): Rename to ...
14776         (mi_console_file::set_raw): ... this.
14777         * mi/mi-console.h (class mi_console_file): New class.
14778         (mi_console_file_new, mi_console_set_raw): Delete.
14779         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14780         (mi_set_logging): Use delete and tee_file.  Adjust.
14781         * mi/mi-main.c (output_register): Use string_file.
14782         (mi_cmd_data_evaluate_expression): Use string_file.
14783         (mi_cmd_data_read_memory): Use string_file.
14784         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14785         * mi/mi-out.c (mi_ui_out::main_stream): New.
14786         (mi_ui_out::rewind): Use main_stream and
14787         string_file.
14788         (mi_ui_out::put): Use main_stream and string_file.
14789         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14790         Allocate a 'string_file' instead.
14791         (mi_out_new): Don't allocate a mem_fileopen stream here.
14792         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14793         (mi_ui_out::main_stream): Declare method.
14794         * printcmd.c (eval_command): Use string_file.
14795         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14796         * python/py-arch.c (archpy_disassemble): Use string_file.
14797         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14798         * python/py-frame.c (frapy_str): Use string_file.
14799         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14800         Use string_file.
14801         * python/py-type.c (typy_str): Use string_file.
14802         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14803         * python/py-value.c (valpy_str): Use string_file.
14804         * record-btrace.c (btrace_insn_history): Use string_file.
14805         * regcache.c (regcache_print): Use stdio_file.
14806         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14807         * remote.c (escape_buffer): Use string_file.
14808         * rust-lang.c (rust_get_disr_info): Use string_file.
14809         * serial.c (serial_open_ops_1): Use stdio_file.
14810         (do_serial_close): Use delete.
14811         * stack.c (print_frame_arg): Use string_file.
14812         (print_frame_args): Remove local mem_fileopen stream, not used.
14813         (print_frame): Use string_file.
14814         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14815         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14816         Take a 'string_file *' instead of a 'ui_file *'.
14817         * top.c (new_ui): Use stdio_file and stderr_file.
14818         (free_ui): Use delete.
14819         (execute_command_to_string): Use string_file.
14820         (quit_confirm): Use string_file.
14821         * tracepoint.c (collection_list::append_exp): Use string_file.
14822         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14823         * tui/tui-file.c: Don't include "ui-file.h".
14824         (enum streamtype, struct tui_stream): Delete.
14825         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14826         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14827         (tui_file::tui_file): New method.
14828         (tui_file_fputs): Delete.
14829         (tui_file_get_strbuf): Delete.
14830         (tui_file::puts): New method.
14831         (tui_file_adjust_strbuf): Delete.
14832         (tui_file_flush): Delete.
14833         (tui_file::flush): New method.
14834         * tui/tui-file.h: Tweak intro comment.
14835         Include ui-file.h.
14836         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14837         (tui_file_adjust_strbuf): Delete declarations.
14838         (class tui_file): New class.
14839         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14840         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14841         (tui_register_format): Use string_stream.
14842         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14843         (tui_get_function_from_frame): Use string_file.
14844         * typeprint.c (type_to_string): Use string_file.
14845         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14846         (null_stream): New global.
14847         (ui_file_delete): Delete.
14848         (ui_file::ui_file): New.
14849         (null_file_isatty): Delete.
14850         (ui_file::~ui_file): New.
14851         (null_file_rewind): Delete.
14852         (ui_file::printf): New.
14853         (null_file_put): Delete.
14854         (null_file_flush): Delete.
14855         (ui_file::putstr): New.
14856         (null_file_write): Delete.
14857         (ui_file::putstrn): New.
14858         (null_file_read): Delete.
14859         (ui_file::putc): New.
14860         (null_file_fputs): Delete.
14861         (null_file_write_async_safe): Delete.
14862         (ui_file::vprintf): New.
14863         (null_file_delete): Delete.
14864         (null_file::write): New.
14865         (null_file_fseek): Delete.
14866         (null_file::puts): New.
14867         (ui_file_data): Delete.
14868         (null_file::write_async_safe): New.
14869         (gdb_flush, ui_file_isatty): Adjust.
14870         (ui_file_put, ui_file_rewind): Delete.
14871         (ui_file_write): Adjust.
14872         (ui_file_write_for_put): Delete.
14873         (ui_file_write_async_safe, ui_file_read): Adjust.
14874         (ui_file_fseek): Delete.
14875         (fputs_unfiltered): Adjust.
14876         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14877         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14878         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14879         (set_ui_file_data): Delete.
14880         (string_file::~string_file, string_file::write)
14881         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14882         (do_ui_file_as_string, ui_file_as_string): Delete.
14883         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14884         (struct mem_file): Delete.
14885         (mem_file_new): Delete.
14886         (stdio_file::stdio_file): New.
14887         (mem_file_delete): Delete.
14888         (stdio_file::stdio_file): New.
14889         (mem_fileopen): Delete.
14890         (stdio_file::~stdio_file): New.
14891         (mem_file_rewind): Delete.
14892         (stdio_file::set_stream): New.
14893         (mem_file_put): Delete.
14894         (stdio_file::open): New.
14895         (mem_file_write): Delete.
14896         (stdio_file_magic, struct stdio_file): Delete.
14897         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14898         (stdio_file::flush): New.
14899         (stdio_file_read): Rename to ...
14900         (stdio_file::read): ... this.  Adjust.
14901         (stdio_file_write): Rename to ...
14902         (stdio_file::write): ... this.  Adjust.
14903         (stdio_file_write_async_safe): Rename to ...
14904         (stdio_file::write_async_safe) ... this.  Adjust.
14905         (stdio_file_fputs): Rename to ...
14906         (stdio_file::puts) ... this.  Adjust.
14907         (stdio_file_isatty): Delete.
14908         (stdio_file_fseek): Delete.
14909         (stdio_file::isatty): New.
14910         (stderr_file_write): Rename to ...
14911         (stderr_file::write) ... this.  Adjust.
14912         (stderr_file_fputs): Rename to ...
14913         (stderr_file::puts) ... this.  Adjust.
14914         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14915         (stderr_file::stderr_file): New.
14916         (tee_file_magic): Delete.
14917         (struct tee_file): Delete.
14918         (tee_file::tee_file): New.
14919         (tee_file_new): Delete.
14920         (tee_file::~tee_file): New.
14921         (tee_file_delete): Delete.
14922         (tee_file_flush): Rename to ...
14923         (tee_file::flush): ... this.  Adjust.
14924         (tee_file_write): Rename to ...
14925         (tee_file::write): ... this.  Adjust.
14926         (tee_file::write_async_safe): New.
14927         (tee_file_fputs): Rename to ...
14928         (tee_file::puts): ... this.  Adjust.
14929         (tee_file_isatty): Rename to ...
14930         (tee_file::isatty): ... this.  Adjust.
14931         * ui-file.h (struct obstack, struct ui_file): Don't
14932         forward-declare.
14933         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14934         (ui_file_write_ftype)
14935         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14936         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14937         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14938         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14939         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14940         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14941         (set_ui_file_fseek): Delete.
14942         (ui_file_data, ui_file_delete, ui_file_rewind)
14943         (struct ui_file): New.
14944         (ui_file_up): New.
14945         (class null_file): New.
14946         (null_stream): Declare.
14947         (ui_file_write_for_put, ui_file_put): Delete.
14948         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14949         Delete.
14950         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14951         (gdb_fopen, tee_file_new): Delete.
14952         (struct string_file): New.
14953         (struct stdio_file): New.
14954         (stdio_file_up): New.
14955         (struct stderr_file): New.
14956         (class tee_file): New.
14957         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14958         of a 'ui_file *'.  Adjust.
14959         * ui-out.h (class ui_out) <field_stream>: Likewise.
14960         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14961         (null_stream): Delete.
14962         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14963         Adjust.
14964         * utils.h (struct ui_file): Delete forward declaration..
14965         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14966         (error_stream): Take a 'string_file &' instead of a
14967         'ui_file *'.
14968         * varobj.c (varobj_value_get_print_value): Use string_file.
14969         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14970         * gdbarch.c: Regenerate.
14971
14972 2017-02-02  Pedro Alves  <palves@redhat.com>
14973
14974         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14975         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14976         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14977         Adjust to call gdb_print_insn instead of
14978         gdb_disassembler::print_insn.
14979         (dump_insns, do_mixed_source_and_assembly_deprecated)
14980         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14981         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14982         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14983         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14984         declaration.
14985         (gdb_pretty_print_insn): Re-add declaration.
14986         * record-btrace.c (btrace_insn_history): Don't allocate a
14987         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14988
14989 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14990
14991         * disasm.h (gdb_disassembly): Remove file_string parameter.
14992         * disasm.c (gdb_disassembly): Likewise.
14993         * cli/cli-cmds.c (print_disassembly): Adapt.
14994         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14995         * stack.c (do_gdb_disassembly): Likewise.
14996
14997 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14998
14999         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15000         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15001         targets.  And if the implicit value is longer than needed, extract
15002         the first bytes instead of the "least significant" ones.
15003
15004 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15005
15006         * btrace.c (btrace_enable): Do not call btrace_add_pc for
15007         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15008         (btrace_fetch): Assert can_access_registers_ptid.
15009         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15010         validate_registers_access.
15011
15012 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
15013
15014         * gdbthread.h (can_access_registers_ptid): New.
15015         * thread.c (can_access_registers_ptid): New.
15016
15017 2017-02-01  Pedro Alves  <palves@redhat.com>
15018
15019         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15020
15021 2017-01-31  Pedro Alves  <palves@redhat.com>
15022
15023         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15024         Fix typos.
15025
15026 2017-01-31  Pedro Alves  <palves@redhat.com>
15027
15028         * stack.c (print_frame_args): Remove local mem_fileopen stream,
15029         not used.
15030
15031 2017-01-31  Pedro Alves  <palves@redhat.com>
15032
15033         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15034
15035 2017-01-31  Pedro Alves  <palves@redhat.com>
15036
15037         * common/scoped_restore.h
15038         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15039         change the value's parameter type to T2.
15040         (make_scoped_restore): Likewise.
15041
15042 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15043             Richard Henderson  <rth@redhat.com>
15044
15045         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15046         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15047         GS_BASE for older kernels.
15048         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15049         GS_BASE for older kernels.
15050         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15051         and GS_BASE to the offset table.
15052         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15053         system register group.
15054         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15055         for older kernels.
15056         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15057         amd64 ABI.
15058         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15059         AMD64_GSBASE_REGNUM.
15060         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15061         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15062         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15063         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15064         i386/64bit-segments.xml in those rules.
15065         * features/i386/64bit-segments.xml: New file.
15066         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15067         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15068         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15069         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15070         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15071         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15072         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15073         * features/i386/amd64-avx-linux.c: Regenerated.
15074         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15075         * features/i386/amd64-avx-mpx.c: Regenerated.
15076         * features/i386/amd64-avx512-linux.c: Regenerated.
15077         * features/i386/amd64-linux.c: Regenerated.
15078         * features/i386/amd64-mpx-linux.c: Regenerated.
15079         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15080         * features/i386/i386-avx-mpx.c: Regenerated.
15081         * features/i386/x32-avx-linux.c: Regenerated.
15082         * features/i386/x32-avx512-linux.c: Regenerated.
15083         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15084         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15085         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15086         * regformats/i386/amd64-linux.dat: Regenerated.
15087         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15088         * regformats/i386/x32-avx-linux.dat: Regenerated.
15089         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15090         * regformats/i386/x32-linux.dat: Regenerated.
15091
15092 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15093
15094         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15095         Set to AMD64_NUM_REGS.
15096
15097 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15098
15099         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15100         that checks validity of a register number.
15101
15102 2017-01-27  Kees Cook  <keescook@google.com>
15103
15104         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15105         fetch_fpregs if target has fpa registers.
15106         (arm_linux_store_inferior_registers): Call store_fpregs if target
15107         has fpa registers.
15108
15109 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15110
15111         * cris-tdep.c (cris_gdbarch_init): Remove check for
15112         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15113
15114 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15115
15116         * corelow.c (get_core_register_section): Check for regset
15117         existence before checking for REGSET_VARIABLE_SIZE.
15118
15119 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15120             Pedro Alves  <palves@redhat.com>
15121
15122         PR gdb/20939
15123         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15124         call memory_error, save memaddr instead.
15125         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15126         negative, cal memory_error.
15127         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15128
15129 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15130
15131         * disasm-selftests.c (memory_error_test): New function.
15132         (_initialize_disasm_selftests): Register memory_error_test.
15133
15134 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15135
15136         * Makefile.in (SFILES): Add disasm-selftests.c and
15137         selftest-arch.c.
15138         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15139         * disasm-selftests.c: New file.
15140         * selftest-arch.c: New file.
15141         * selftest-arch.h: New file.
15142
15143 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15144
15145         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15146         to bfd_arch_mep.  Don't return 0 if section is not
15147         found.  Call print_insn_mep.
15148
15149 2017-01-26  Pedro Alves  <palves@redhat.com>
15150             Yao Qi  <yao.qi@linaro.org>
15151
15152         * arm-tdep.c: Include "disasm.h".
15153         (gdb_print_insn_arm): Update code to get gdbarch.
15154         * disasm.c (dis_asm_read_memory): Change it to
15155         gdb_disassembler::dis_asm_read_memory.
15156         (dis_asm_memory_error): Likewise.
15157         (dis_asm_print_address): Likewise.
15158         (gdb_pretty_print_insn): Change it to
15159         gdb_disassembler::pretty_print_insn.
15160         (dump_insns): Add one argument gdb_disassemlber.  All
15161         callers updated.
15162         (do_mixed_source_and_assembly_deprecated): Likewise.
15163         (do_mixed_source_and_assembly): Likewise.
15164         (do_assembly_only): Likewise.
15165         (gdb_disassembler::gdb_disassembler): New.
15166         (gdb_disassembler::print_insn): New.
15167         * disasm.h (class gdb_disassembler): New.
15168         (gdb_pretty_print_insn): Remove declaration.
15169         (gdb_disassemble_info): Likewise.
15170         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15171         (gdbscm_disasm_read_memory_worker): Update.
15172         (gdbscm_disasm_read_memory): Update.
15173         (gdbscm_disasm_memory_error): Remove.
15174         (gdbscm_disasm_print_address): Remove.
15175         (gdbscm_disassembler::gdbscm_disassembler): New.
15176         (gdbscm_print_insn_from_port): Update.
15177         * mips-tdep.c: Include disasm.h.
15178         (gdb_print_insn_mips): Update code to get gdbarch.
15179         * record-btrace.c (btrace_insn_history): Update.
15180         * spu-tdep.c: Include disasm.h.
15181         (struct spu_dis_asm_data): Remove.
15182         (struct spu_dis_asm_info): New.
15183         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15184         SPU id.
15185         (gdb_print_insn_spu): Cast disassemble_info to
15186         spu_dis_asm_info.
15187
15188 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15189
15190         * disasm.c (do_ui_file_delete): Delete.
15191         (gdb_insn_length): Move code creating stream to ...
15192         * utils.c (null_stream): ... here.  New function.
15193         * utils.h (null_stream): Declare.
15194
15195 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15196
15197         * python/py-inferior.c (find_thread_object): Return directly
15198         from the loop.  Remove "found" variable.
15199
15200 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15201
15202         GDB 7.12.1 released.
15203
15204 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15205
15206         * python/py-function.c (fnpy_call): Reorder declarations to have
15207         the gdbpy_enter object declared first.
15208         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15209
15210 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15211
15212         PR python/21068
15213         * python/python-internal.h (PyMem_RawMalloc): Define for
15214         Python < 3.4.
15215         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15216         PyMem_RawMalloc instead of PyMem_Malloc.
15217
15218 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15219             Luis Machado  <lgustavo@codesourcery.com>
15220
15221         * NEWS (New commands): Mention flash-erase.
15222         (New MI commands): Mention target-flash-erase.
15223         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15224         command.
15225         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15226         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15227         * target.c (flash_erase_command): New function.
15228         (initialize_targets): Add new flash-erase command.
15229         * target.h (flash_erase_command): New declaration.
15230
15231 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15232
15233         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15234         HAVE_SYS_PROCFS_H is defined.
15235
15236 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15237
15238         * remote.c (struct cached_reg): Change data into a pointer.
15239         * (stop_reply_dtr): Free data pointers before deleting vector.
15240         (process_stop_reply): Likewise.
15241         (remote_parse_stop_reply): Allocate space for data
15242
15243 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15244
15245         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15246         MAX_REGISTER_SIZE.
15247         (amd64_pseudo_register_read_value): Likewise.
15248         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15249         (store_register_using_P): Likewise.
15250         * regcache.c (regcache_xfer_part): Likewise.
15251
15252 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15253
15254         Split real and pseudo registers.
15255         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15256         (sparc32_pseudo_regnum): New enum.
15257         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15258         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15259         (SPARC32_CP0_REGISTERS): New macro.
15260         (sparc32_pseudo_register_name): New function.
15261         (sparc32_register_name): Use sparc32_pseudo_register_name.
15262         (sparc32_pseudo_register_type): New function.
15263         (sparc32_register_type): Use sparc32_pseudo_register_type.
15264         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15265         pseudo register numbers.
15266         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15267         (SPARC64_CP0_REGISTERS): New macro.
15268         (sparc64_pseudo_register_name): New function.
15269         (sparc64_register_name): Use sparc64_pseudo_register_name.
15270         (sparc64_pseudo_register_type): New function.
15271         (sparc64_register_type): Use sparc64_pseudo_register_type.
15272         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15273         pseudo register numbers.
15274         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15275         sparc64_store_arguments): Handle pseudo register numbers.
15276
15277 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15278
15279         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15280         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15281         output.
15282         (getpkt_or_notif_sane_1): Likewise.
15283
15284 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15285
15286         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15287         of CC.  Pass "-x c++-header" instead of "-x c".
15288
15289 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15290
15291         * remote.c (remote_can_async_p): Update comment.
15292
15293 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15294
15295         * linux-nat.c (linux_nat_can_async_p): Update comment.
15296
15297 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15298
15299         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15300
15301 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15302
15303         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15304
15305 2017-01-10  Tom Tromey  <tom@tromey.com>
15306
15307         * python/py-type.c (typy_legacy_template_argument): Update.
15308         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15309         ~demangle_parse_info): Declare new members.
15310         (cp_demangled_name_to_comp): Return unique_ptr.
15311         (cp_demangled_name_parse_free)
15312         (make_cleanup_cp_demangled_name_parse_free)
15313         (cp_new_demangle_parse_info): Remove.
15314         * cp-support.c (do_demangled_name_parse_free_cleanup)
15315         (make_cleanup_cp_demangled_name_parse_free): Remove.
15316         (inspect_type, cp_canonicalize_string_full)
15317         (cp_canonicalize_string): Update.
15318         (mangled_name_to_comp): Change return type.
15319         (cp_class_name_from_physname, method_name_from_physname)
15320         (cp_func_name, cp_remove_params): Update.
15321         * cp-name-parser.y (demangle_parse_info): New constructor, from
15322         cp_new_demangle_parse_info.
15323         (~demangle_parse_info): New destructor, from
15324         cp_demangled_name_parse_free.
15325         (cp_merge_demangle_parse_infos): Update.
15326         (cp_demangled_name_to_comp): Change return type.
15327
15328 2017-01-10  Tom Tromey  <tom@tromey.com>
15329
15330         * top.c (prevent_dont_repeat): Change return type.
15331         * python/python.c (execute_gdb_command): Use std::string.
15332         Update.
15333         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15334         * command.h (prevent_dont_repeat): Change return type.
15335         * breakpoint.c (bpstat_do_actions_1): Update.
15336
15337 2017-01-10  Tom Tromey  <tom@tromey.com>
15338
15339         * value.h (scoped_value_mark::~scoped_value_mark): Call
15340         free_to_mark.
15341         (scoped_value_mark::free_to_mark): New method.
15342         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15343         scoped_value_mark.
15344
15345 2017-01-10  Tom Tromey  <tom@tromey.com>
15346
15347         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15348         (valpy_reference_value, valpy_const_value, valpy_get_address)
15349         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15350         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15351         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15352         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15353         scoped_value_mark.
15354         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15355         * value.h (scoped_value_mark): New class.
15356
15357 2017-01-10  Tom Tromey  <tom@tromey.com>
15358
15359         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15360         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15361         * psymtab.c (discard_psymtabs_upto): Remove.
15362         (make_cleanup_discard_psymtabs): Remove.
15363         (struct psymtab_state): Remove.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * record-full.c (record_full_save_cleanups): Remove.
15368         (record_full_save): Use gdb::unlinker.
15369         * gcore.c (do_bfd_delete_cleanup): Remove.
15370         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15371         cleanups.
15372         * dwarf2read.c (unlink_if_set): Remove.
15373         (write_psymtabs_to_index): Use gdb::unlinker.
15374         * common/gdb_unlinker.h: New file.
15375
15376 2017-01-10  Tom Tromey  <tom@tromey.com>
15377
15378         * windows-tdep.c (windows_xfer_shared_library): Update.
15379         * windows-nat.c (windows_make_so): Update.
15380         * utils.h (make_cleanup_bfd_unref): Remove.
15381         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15382         * symfile.h (symfile_bfd_open)
15383         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15384         * symfile.c (read_symbols, symbol_file_add)
15385         (separate_debug_file_exists): Update.
15386         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15387         (generic_load, reread_symbols): Update.
15388         * symfile-mem.c (symbol_file_add_from_memory): Update.
15389         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15390         (spu_symbol_file_add_from_memory): Update.
15391         * solist.h (struct target_so_ops) <bfd_open>: Return
15392         gdb_bfd_ref_ptr.
15393         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15394         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15395         gdb_bfd_ref_ptr.
15396         (solib_map_sections, reload_shared_libraries_1): Update.
15397         * solib-svr4.c (enable_break): Update.
15398         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15399         * solib-frv.c (enable_break2): Update.
15400         * solib-dsbt.c (enable_break): Update.
15401         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15402         gdb_bfd_ref_ptr.
15403         (darwin_solib_get_all_image_info_addr_at_init): Update.
15404         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15405         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15406         * record-full.c (record_full_save): Update.
15407         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15408         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15409         * minidebug.c (find_separate_debug_file_in_section): Return
15410         gdb_bfd_ref_ptr.
15411         * machoread.c (macho_add_oso_symfile): Change abfd to
15412         gdb_bfd_ref_ptr.
15413         (macho_symfile_read_all_oso): Update.
15414         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15415         (macho_symfile_read): Update.
15416         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15417         (jit_bfd_try_read_symtab): Update.
15418         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15419         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15420         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15421         gdb_bfd_ref_ptr.
15422         (gdb_bfd_ref_policy): New struct.
15423         (gdb_bfd_ref_ptr): New typedef.
15424         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15425         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15426         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15427         gdb_bfd_ref_ptr.
15428         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15429         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15430         (gcore_command): Update.
15431         * exec.c (exec_file_attach): Update.
15432         * elfread.c (elf_symfile_read): Update.
15433         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15434         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15435         (open_and_init_dwo_file): Update.
15436         (open_dwp_file): Return gdb_bfd_ref_ptr.
15437         (open_and_init_dwp_file): Update.
15438         * corelow.c (core_open): Update.
15439         * compile/compile-object-load.c (compile_object_load): Update.
15440         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15441         * coffread.c (coff_symfile_read): Update.
15442         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15443         gdb_bfd_ref_ptr.  Rename.
15444         (dump_bfd_file, restore_command): Update.
15445         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15446         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15447         (find_separate_debug_file_by_buildid): Update.
15448
15449 2017-01-10  Tom Tromey  <tom@tromey.com>
15450
15451         * common/gdb_ref_ptr.h: New file.
15452         * python/py-ref.h (struct gdbpy_ref_policy): New.
15453         (gdbpy_ref): Now a typedef.
15454
15455 2017-01-10  Tom Tromey  <tom@tromey.com>
15456
15457         * utils.h (make_cleanup_htab_delete): Don't declare.
15458         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15459         Remove.
15460         * linespec.c (decode_compound_collector): Add constructor,
15461         destructor.
15462         (lookup_prefix_sym): Remove cleanup.
15463         (symtab_collector): Add constructor, destructor.
15464         (collect_symtabs_from_filename): Remove cleanup.
15465         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15466         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15467         Use htab_up.
15468         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15469         * dwarf2read.c (dw2_expand_symtabs_matching)
15470         (dw2_map_symbol_filenames, dwarf_decode_macros)
15471         (write_psymtabs_to_index): Use htab_up.
15472         * dwarf2loc.c (func_verify_no_selftailcall)
15473         (call_site_find_chain_1, func_verify_no_selftailcall)
15474         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15475         std::vector, gdb::unique_xmalloc_ptr.
15476         (call_sitep): Remove typedef.
15477         (dwarf2_locexpr_baton_eval): Remove unused variable.
15478
15479 2017-01-10  Tom Tromey  <tom@tromey.com>
15480
15481         * python/python-internal.h (make_cleanup_py_decref)
15482         (make_cleanup_py_xdecref): Don't declare.
15483         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15484         (py_xdecref, make_cleanup_py_xdecref): Remove.
15485
15486 2017-01-10  Tom Tromey  <tom@tromey.com>
15487
15488         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15489         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15494
15495 2017-01-10  Tom Tromey  <tom@tromey.com>
15496
15497         * python/py-utils.c (unicode_to_encoded_string)
15498         (python_string_to_target_string)
15499         (python_string_to_target_python_string)
15500         (python_string_to_host_string, gdbpy_obj_to_string)
15501         (get_addr_from_python): Use gdbpy_ref.
15502
15503 2017-01-10  Tom Tromey  <tom@tromey.com>
15504
15505         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15506         gdbpy_ref.
15507
15508 2017-01-10  Tom Tromey  <tom@tromey.com>
15509
15510         * python/python.c (eval_python_command, gdbpy_decode_line)
15511         (gdbpy_run_events, gdbpy_start_type_printers)
15512         (gdbpy_apply_type_printers): Use gdbpy_ref.
15513
15514 2017-01-10  Tom Tromey  <tom@tromey.com>
15515
15516         * python/py-param.c (get_doc_string, compute_enum_values): Use
15517         gdbpy_ref.
15518
15519 2017-01-10  Tom Tromey  <tom@tromey.com>
15520
15521         * python/py-inferior.c (find_thread_object, build_inferior_list):
15522         Use gdbpy_ref.
15523
15524 2017-01-10  Tom Tromey  <tom@tromey.com>
15525
15526         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15527
15528 2017-01-10  Tom Tromey  <tom@tromey.com>
15529
15530         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15531         gdbpy_ref.
15532
15533 2017-01-10  Tom Tromey  <tom@tromey.com>
15534
15535         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15536         extra incref.
15537         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15538         Use gdbpy_ref.
15539
15540 2017-01-10  Tom Tromey  <tom@tromey.com>
15541
15542         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15543         gdbpy_ref.
15544
15545 2017-01-10  Tom Tromey  <tom@tromey.com>
15546
15547         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15548         decref results of PyArg_ParseTupleAndKeywords.
15549
15550 2017-01-10  Tom Tromey  <tom@tromey.com>
15551
15552         * python/python.c (python_run_simple_file): Use
15553         unique_xmalloc_ptr, gdbpy_ref.
15554
15555 2017-01-10  Tom Tromey  <tom@tromey.com>
15556
15557         * python/py-prettyprint.c (print_stack_unless_memory_error)
15558         (print_string_repr, print_children): Use gdbpy_ref.
15559         (dummy_python_frame): New class.
15560         (dummy_python_frame::dummy_python_frame): Rename from
15561         push_dummy_python_frame.
15562         (py_restore_tstate): Remove.
15563
15564 2017-01-10  Tom Tromey  <tom@tromey.com>
15565
15566         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15567
15568 2017-01-10  Tom Tromey  <tom@tromey.com>
15569
15570         * python/python.c (ensure_python_env, restore_python_env):
15571         Remove.
15572         * python/python-internal.h (ensure_python_env): Don't declare.
15573         * varobj.h (varobj_ensure_python_env): Don't declare.
15574         * varobj.c (varobj_ensure_python_env): Remove.
15575
15576 2017-01-10  Tom Tromey  <tom@tromey.com>
15577
15578         * varobj.c (varobj_value_get_print_value): Use
15579         gdbpy_enter_varobj.
15580
15581 2017-01-10  Tom Tromey  <tom@tromey.com>
15582
15583         * python/py-prettyprint.c (print_string_repr, print_children):
15584         Update.
15585         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15586         of "encoding".
15587         * varobj.c (varobj_value_get_print_value): Update.
15588         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15589
15590 2017-01-10  Tom Tromey  <tom@tromey.com>
15591
15592         * varobj.c (varobj_get_display_hint)
15593         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15594         (varobj_set_visualizer, free_variable): Use
15595         gdbpy_enter_varobj.
15596
15597 2017-01-10  Tom Tromey  <tom@tromey.com>
15598
15599         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15600         (do_finish_initialization): New function.  Use gdbpy_ref.
15601         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15602         do_finish_initialization.
15603
15604 2017-01-10  Tom Tromey  <tom@tromey.com>
15605
15606         * python/py-param.c (get_set_value, get_show_value): Use
15607         gdbpy_enter, gdbpy_ref.
15608
15609 2017-01-10  Tom Tromey  <tom@tromey.com>
15610
15611         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15612
15613 2017-01-10  Tom Tromey  <tom@tromey.com>
15614
15615         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15616
15617 2017-01-10  Tom Tromey  <tom@tromey.com>
15618
15619         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15620         Use gdbpy_enter_varobj.
15621
15622 2017-01-10  Tom Tromey  <tom@tromey.com>
15623
15624         * varobj.c (gdbpy_enter_varobj): New constructor.
15625         * python/python-internal.h (gdbpy_enter_varobj): New class.
15626         * python/py-varobj.c (py_varobj_get_iterator): Use
15627         gdbpy_enter_varobj.
15628
15629 2017-01-10  Tom Tromey  <tom@tromey.com>
15630
15631         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15632         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15633         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15634         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15635         unique_xmalloc_ptr.
15636         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15637
15638 2017-01-10  Tom Tromey  <tom@tromey.com>
15639
15640         * python/py-xmethods.c (invoke_match_method): Use
15641         gdbpy_ref.
15642
15643 2017-01-10  Tom Tromey  <tom@tromey.com>
15644
15645         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15646         gdbpy_enter, gdbpy_ref.
15647
15648 2017-01-10  Tom Tromey  <tom@tromey.com>
15649
15650         * python/python.c (python_interactive_command): Use gdbpy_enter.
15651
15652 2017-01-10  Tom Tromey  <tom@tromey.com>
15653
15654         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15655         gdbpy_ref.
15656
15657 2017-01-10  Tom Tromey  <tom@tromey.com>
15658
15659         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15660         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15661
15662 2017-01-10  Tom Tromey  <tom@tromey.com>
15663
15664         * utils.h (htab_deleter): New struct.
15665         (htab_up): New typedef.
15666         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15667         gdbpy_enter, gdbpy_ref, htab_up.
15668
15669 2017-01-10  Tom Tromey  <tom@tromey.com>
15670
15671         * python/py-unwind.c (pending_frame_invalidate): Remove.
15672         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15673
15674 2017-01-10  Tom Tromey  <tom@tromey.com>
15675
15676         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15677         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15678
15679 2017-01-10  Tom Tromey  <tom@tromey.com>
15680
15681         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15682
15683 2017-01-10  Tom Tromey  <tom@tromey.com>
15684
15685         * python/python.c (gdbpy_eval_from_control_command)
15686         (gdbpy_source_script, gdbpy_run_events)
15687         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15688         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15689         gdbpy_enter.
15690
15691 2017-01-10  Tom Tromey  <tom@tromey.com>
15692
15693         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15694
15695 2017-01-10  Tom Tromey  <tom@tromey.com>
15696
15697         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15698
15699 2017-01-10  Tom Tromey  <tom@tromey.com>
15700
15701         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15702         (python_on_inferior_call_pre, python_on_inferior_call_post)
15703         (python_on_memory_change, python_on_register_change)
15704         (python_inferior_exit, python_new_objfile, add_thread_object)
15705         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15706
15707 2017-01-10  Tom Tromey  <tom@tromey.com>
15708
15709         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15710         (bpfinishpy_handle_exit): Use gdbpy_enter.
15711
15712 2017-01-10  Tom Tromey  <tom@tromey.com>
15713
15714         * python/py-cmd.c (cmdpy_destroyer)
15715         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15716         gdbpy_enter.
15717
15718 2017-01-10  Tom Tromey  <tom@tromey.com>
15719
15720         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15721         gdbpy_enter.
15722         (gdbpy_breakpoint_has_cond): Likewise.
15723
15724 2017-01-10  Tom Tromey  <tom@tromey.com>
15725
15726         * python/python.c (gdbpy_enter): New constructor.
15727         (~gdbpy_enter): New destructor.
15728         (restore_python_env, ensure_python_env): Rewrite.
15729         * python/python-internal.h (gdbpy_enter): New class.
15730
15731 2017-01-10  Tom Tromey  <tom@tromey.com>
15732
15733         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15734
15735 2017-01-10  Tom Tromey  <tom@tromey.com>
15736
15737         * python/py-value.c (value_has_field, get_field_flag)
15738         (get_field_type, valpy_getitem, convert_value_from_python): Use
15739         gdbpy_ref.
15740
15741 2017-01-10  Tom Tromey  <tom@tromey.com>
15742
15743         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15744         gdbpy_ref.
15745
15746 2017-01-10  Tom Tromey  <tom@tromey.com>
15747
15748         * python/py-prettyprint.c (search_pp_list)
15749         (find_pretty_printer_from_objfiles)
15750         (find_pretty_printer_from_progspace)
15751         (find_pretty_printer_from_gdb, find_pretty_printer)
15752         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15753         gdbpy_ref.
15754
15755 2017-01-10  Tom Tromey  <tom@tromey.com>
15756
15757         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15758
15759 2017-01-10  Tom Tromey  <tom@tromey.com>
15760
15761         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15762         (ltpy_get_all_source_lines): Use gdbpy_ref.
15763
15764 2017-01-10  Tom Tromey  <tom@tromey.com>
15765
15766         * python/py-framefilter.c (extract_sym, extract_value)
15767         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15768         gdbpy_ref.
15769
15770 2017-01-10  Tom Tromey  <tom@tromey.com>
15771
15772         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15773
15774 2017-01-10  Tom Tromey  <tom@tromey.com>
15775
15776         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15777
15778 2017-01-10  Tom Tromey  <tom@tromey.com>
15779
15780         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15781         gdbpy_ref.
15782
15783 2017-01-10  Tom Tromey  <tom@tromey.com>
15784
15785         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15786
15787 2017-01-10  Tom Tromey  <tom@tromey.com>
15788
15789         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15790         (typy_range): Use gdbpy_ref.
15791
15792 2017-01-10  Tom Tromey  <tom@tromey.com>
15793
15794         * python/py-threadevent.c (create_thread_event_object): Use
15795         gdbpy_ref.
15796         * python/py-stopevent.c (create_stop_event_object): Simplify.
15797         (emit_stop_event): Use gdbpy_ref.
15798         * python/py-signalevent.c (create_signal_event_object): Use
15799         gdbpy_ref.
15800         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15801         (emit_new_objfile_event, create_clear_objfiles_event_object)
15802         (emit_clear_objfiles_event): Use gdbpy_ref.
15803         * python/py-infevents.c (create_inferior_call_event_object)
15804         (create_register_changed_event_object)
15805         (create_memory_changed_event_object, emit_inferior_call_event)
15806         (emit_memory_changed_event, emit_register_changed_event): Use
15807         gdbpy_ref.
15808         * python/py-exitedevent.c (create_exited_event_object)
15809         (emit_exited_event): Use gdbpy_ref.
15810         * python/py-event.h (evpy_emit_event): Remove
15811         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15812         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15813         * python/py-continueevent.c (emit_continue_event): Use
15814         gdbpy_ref.
15815         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15816         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15817         gdbpy_ref.
15818         * python/py-bpevent.c (create_breakpoint_event_object): Use
15819         gdbpy_ref.
15820
15821 2017-01-10  Tom Tromey  <tom@tromey.com>
15822
15823         * python/py-ref.h: New file.
15824
15825 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15826
15827         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15828         void.
15829         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15830         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15831         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15832         * ui-out.c (ui_out::redirect): Likewise.
15833         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15834         * cli/cli-logging.c (set_logging_redirect): Update call site of
15835         ui_out::redirect.
15836         (handle_redirections): Likewise.
15837         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15838         * top.c (execute_command_to_string): Likewise.
15839         * utils.c (do_ui_out_redirect_pop): Likewise.
15840
15841 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15842
15843         * stack.c (_initialize_stack): Update "frame" command help message.
15844
15845 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15846
15847         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15848
15849 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15850
15851         * x86-linux-nat.h: Include gdb_proc_service.h.
15852
15853 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15854
15855         * ser-base.h: Include serial.h.
15856
15857 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15858
15859         * ppc-linux-tdep.h: Include ppc-tdep.h.
15860
15861 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15862
15863         * nat/amd64-linux-siginfo.h: Include signal.h.
15864
15865 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15866
15867         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15868
15869 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15870
15871         * mi/mi-parse.h: Include mi-cmds.h.
15872
15873 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15874
15875         * inf-loop.c: Don't include "target.h".
15876         * inf-loop.h: Include it here.
15877
15878 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15879
15880         * dfp.h: Include "dboulest.h" and "expression.h".
15881
15882 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15883
15884         * ax-gdb.h: Include "ax.h".
15885
15886 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15887
15888         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15889         with nat/gdb_ptrace.h.
15890
15891 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15892
15893         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15894         new line.
15895         (mips64_fbsd_sigframe_init): Likewise.
15896
15897 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15898
15899         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15900         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15901
15902 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15903
15904         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15905         * NEWS: Mention new FreeBSD/mips native configuration.
15906         * config/mips/fbsd.mh: New file.
15907         * configure.host: Add mips*-*-freebsd*.
15908         * mips-fbsd-nat.c: New file.
15909
15910 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15911
15912         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15913         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15914         * NEWS: Mention new FreeBSD/mips target.
15915         * configure.tgt: Add mips*-*-freebsd*.
15916         * mips-fbsd-tdep.c: New file.
15917         * mips-fbsd-tdep.h: New file.
15918
15919 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15920
15921         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15922         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15923
15924 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15925
15926         Update copyright year range in all GDB files.
15927
15928 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15929
15930         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15931
15932 For older changes see ChangeLog-2016.
15933 \f
15934 Local Variables:
15935 mode: change-log
15936 left-margin: 8
15937 fill-column: 74
15938 version-control: never
15939 coding: utf-8
15940 End: