watchpoint regression debugging with remote protocol (bare metal)
[external/binutils.git] / gdb / ChangeLog
1 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2
3         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
4         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
5         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
6         New functions.
7         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
8         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
9         to_stopped_data_address and to_core_of_thread fields of
10         ravenscar_ops.
11
12 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
13
14         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
15         (struct gdbarch_tdep): New member long_double_abi.
16         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
17         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
18         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
19         format depending on long_double_abi tdep member.
20         (ppc_floatformat_for_type): Handle __ibm128 type.
21
22 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
23
24         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
25
26 2017-11-21  Pedro Alves  <palves@redhat.com>
27
28         * dwarf2read.c (mapped_index::find_name_components_bounds)
29         <completion mode, upper bound>: Use std::lower_bound instead of
30         std::upper_bound.
31         (test_mapped_index_find_name_component_bounds): Remove incorrect
32         "t1_fund" from expected symbols.
33
34 2017-11-21  Pedro Alves  <palves@redhat.com>
35
36         * dwarf2read.c (mapped_index::name_components_casing): New field.
37         (mapped_index) <build_name_components,
38         find_name_components_bounds): Declare new methods.
39         (mapped_index::find_name_components_bounds)
40         (mapped_index::build_name_components): New methods, factored out
41         from dw2_expand_symtabs_matching_symbol.
42         (check_find_bounds_finds)
43         (test_mapped_index_find_name_component_bounds): New.
44         (run_test): Rename to ...
45         (test_dw2_expand_symtabs_matching_symbol): ... this.
46         (run_test): Reimplement.
47
48 2017-11-21  Pedro Alves  <palves@redhat.com>
49
50         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
51         (symbol_end): Use cp_ident_is_alnum.
52         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
53         * dwarf2read.c (make_sort_after_prefix_name): New function.
54         (dw2_expand_symtabs_matching_symbol): Use it.
55         (test_symbols): Add more symbols.
56         (run_test): Add tests.
57
58 2017-11-17  Tom Tromey  <tom@tromey.com>
59
60         * symtab.h (enum symbol_subclass_kind): New.
61         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
62         Remove.
63         <subclass>: New member.
64         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
65         * rust-lang.c (rust_get_trait_object_pointer): Update.
66         * dwarf2read.c (read_func_scope): Update.
67         (read_variable): Update.
68
69 2017-11-17  Tom Tromey  <tom@tromey.com>
70
71         * dwarf2read.c (read_func_scope): Update.
72         * symtab.h (struct template_symbol): Derive from symbol.
73         <base>: Remove.
74
75 2017-11-17  Tom Tromey  <tom@tromey.com>
76
77         * symtab.h (struct symbol) <is_rust_vtable>: New member.
78         (struct rust_vtable_symbol): New.
79         (find_symbol_at_address): Declare.
80         * symtab.c (find_symbol_at_address): New function.
81         * symfile.h (struct quick_symbol_functions)
82         <find_compunit_symtab_by_address>: New member.
83         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
84         function.
85         (debug_sym_quick_functions): Link to
86         debug_qf_find_compunit_symtab_by_address.
87         * rust-lang.c (rust_get_trait_object_pointer): New function.
88         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
89         rust_get_trait_object_pointer.
90         * psymtab.c (psym_relocate): Clear psymbol_map.
91         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
92         functions.
93         (psym_functions): Link to psym_find_compunit_symtab_by_address.
94         * objfiles.h (struct objfile) <psymbol_map>: New member.
95         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
96         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
97         (rust_containing_type, read_variable): New functions.
98
99 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
100
101         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
102
103 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
104
105         * common/filestuff.c: Include <algorithm>.
106         (open_fds): Change type to std::vector<int>.
107         (do_mark_open_fd): Adjust.
108         (unmark_fd_no_cloexec): Adjust.
109         (do_close): Adjust.
110
111 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
112
113         * breakpoint.c (output_thread_groups): Take an std::vector.
114         (print_one_breakpoint_location): Adjust.
115
116 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
117
118         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
119         (ada_evaluate_subexp_for_cast): New function.
120         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
121         ada_evaluate_subexp_for_cast.
122         (ada_evaluate_subexp) <nosideret>: Replace code by call to
123         eval_skip_value.
124         * eval.c (evaluate_var_value): Make non-static.
125         (evaluate_var_msym_value, eval_skip_value): Likewise.
126         * value.h (evaluate_var_value, evaluate_var_msym_value)
127         (eval_skip_value): Declare.
128
129 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
130
131         * ada-lang.c (ada_value_cast): Remove parameter "noside".
132         Update all callers.
133
134 2017-11-16  Pedro Alves  <palves@redhat.com>
135
136         * python/py-unwind.c (pyuw_sniffer): Translate
137         PyExc_KeyboardInterrupt to a GDB Quit exception.
138
139 2017-11-16  Pedro Alves  <palves@redhat.com>
140
141         * infrun.c (resume_cleanups): Delete.
142         (resume): No longer install a resume_cleanups cleanup nor call
143         QUIT.
144         (proceed): Pass the terminal to the inferior.
145         (keep_going_pass_signal): No longer install a resume_cleanups
146         cleanup.
147
148 2017-11-16  Pedro Alves  <palves@redhat.com>
149
150         * inf-loop.c (inferior_event_handler): Don't swallow the exception
151         if the prompt is blocked.
152
153 2017-11-16  Pedro Alves  <palves@redhat.com>
154
155         * breakpoint.c (insert_bp_location): Replace bp_err and
156         bp_err_message locals by a gdb_exception local.
157
158 2017-11-16  Pedro Alves  <palves@redhat.com>
159
160         * inflow.c (scoped_ignore_sigttou): New class.
161         (child_terminal_ours_1, new_tty): Use it.
162
163 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
164
165         * target-float.c (decimal_from_number): Add byte_order argument and
166         call match_endianness.  Error if unknown floating-point type.
167         (decimal_to_number): Add byte_order argument and call match_endianness.
168         (decimal_from_longest): Update call.  Do not call match_endianness.
169         (decimal_from_ulongest): Likewise.
170         (decimal_binop): Likewise.
171         (decimal_is_zero): Likewise.
172         (decimal_compare): Likewise.
173         (decimal_convert): Likewise.
174
175 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
176
177         * python/python.c (gdbpy_rbreak): New function.
178         * NEWS: Document Python rbreak feature.
179
180 2017-11-16  Yao Qi  <yao.qi@linaro.org>
181
182         * features/tic6x-c62x.xml: Remove.
183         * features/tic6x-c64x.xml: Remove.
184         * features/tic6x-c64xp.xml: Remove.
185
186 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
187
188         * symtab.h: Include <array>.
189
190 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
191
192         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
193         (bsd_kvm_proc_cmd): Likewise.
194
195 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
196
197         * tui/tui-win.c (window_name_completer): Replace VEC with
198         std::vector.
199
200 2017-11-15  Andrew Cagney  <cagney@gnu.org>
201
202         * MAINTAINERS: Remove no-longer applicable entries.
203
204 2017-11-15  Andrew Cagney  <cagney@gnu.org>
205
206         * MAINTAINERS: Move self to Past Maintainers.
207
208 2017-11-15  Yao Qi  <yao.qi@linaro.org>
209
210         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
211         * features/nios2-linux.c: Remove.
212         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
213         initialize_tdesc_nios2_linux.
214
215 2017-11-15  Yao Qi  <yao.qi@linaro.org>
216
217         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
218         M68HC11_LAST_HARD_REG + 1.
219
220 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
221
222         PR gdb/22388
223         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
224         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
225         Return TARGET_XFER_EOF if size of returned data is 0.
226
227 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
228
229         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
230         memory-map-selftests.c.
231         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
232         * memory-map.c (memory_map_start_memory): Fix computation of hi
233         address.
234         * unittests/memory-map-selftests.c: New file.
235
236 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
237
238         * ada-lang.c: Fix some typos in the general command documenting
239         how Ada expressions are being evaluated and how their result
240         is printed.
241
242 2017-11-09  Tom Tromey  <tom@tromey.com>
243
244         * psymtab.c (psymbol_hash): Do not hash string contents.
245         (psymbol_compare): Add comment.
246
247 2017-11-09  Tom Tromey  <tom@tromey.com>
248
249         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
250
251 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
252
253         * ada-exp.y (write_var_from_sym): Remove parameter
254         "orig_left_context".  Update all callers.
255
256 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
257
258         * tracepoint.h (class collection_list) <stringify>: Return
259         std::vector<std::string>.
260         (encode_actions_rsp): Change parameters to
261         std::vector<std::string> *.
262         * tracepoint.c (collection_list::stringify): Return
263         std::vector<std::string> and adjust accordingly.
264         (encode_actions_rsp): Changee parameters to
265         std::vector<std::string> and adjust accordingly.
266         * remote.c (free_actions_list),
267         free_actions_list_cleanup_wrapper): Remove.
268         (remote_download_tracepoint): Adjust to std::vector.
269
270 2017-11-08  Tom Tromey  <tom@tromey.com>
271
272         * dwarf2read.c (symbolp): Remove typedef.
273         (read_func_scope): Use std::vector.
274         (process_structure_scope): Use std::vector.
275
276 2017-11-08  Pedro Alves  <palves@redhat.com>
277
278         * ada-lang.c (ada_make_symbol_completion_list): Use
279         completion_skip_symbol.
280         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
281         (symbol_is_function_or_method(symbol*)): New.
282         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
283         completion_skip_symbol.
284         (default_collect_symbol_completion_matches_break_on): Use
285         completion_skip_symbol.  Pass down mode.
286         (collect_file_symbol_completion_matches): Pass down mode.
287         * symtab.h (symbol_is_function_or_method): New declarations.
288         (completion_skip_symbol): New template function.
289
290 2017-11-08  Pedro Alves  <palves@redhat.com>
291
292         * linespec.c (iterate_over_all_matching_symtabs): Add
293         search_domain parameter.  Pass it down to expand_symtabs_matching.
294         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
295         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
296         search_domain.
297         (add_all_symbol_names_from_pspace): Add search_domain parameter.
298         Pass it down.
299         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
300         symbols.
301         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
302         it down.
303
304 2017-11-08  Pedro Alves  <palves@redhat.com>
305
306         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
307         text_len locals and don't pass them down.
308         * symtab.c (completion_list_add_name): Remove
309         sym_text/sym_text_len parameters and adjust.
310         (completion_list_add_symbol, completion_list_add_msymbol)
311         (completion_list_objc_symbol, completion_list_add_fields)
312         (add_symtab_completions): Likewise.
313         (default_collect_symbol_completion_matches_break_on)
314         (collect_file_symbol_completion_matches): Remove sym_text_len
315         local and don't pass it down.
316         * symtab.h (completion_list_add_name): Remove
317         sym_text/sym_text_len parameters.
318
319 2017-11-08  Pedro Alves  <palves@redhat.com>
320
321         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
322         unittests/lookup_name_info-selftests.c.
323         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
324         * cp-support.c: Include "selftest.h".
325         (cp_remove_params_1): Rename from cp_remove_params.  Add
326         'require_param' parameter, and handle it.
327         (cp_remove_params): Reimplement.
328         (cp_remove_params_if_any): New.
329         (selftests::quote): New.
330         (selftests::check_remove_params): New.
331         (selftests::test_cp_remove_params): New.
332         (_initialize_cp_support): Install
333         selftests::test_cp_remove_params.
334         * cp-support.h (cp_remove_params_if_any): Declare.
335         * dwarf2read.c :Include "selftest.h".
336         (dw2_expand_symtabs_matching_symbol): Use
337         lookup_name_info::make_ignore_params.
338         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
339         (selftests::dw2_expand_symtabs_matching::string_or_null)
340         (selftests::dw2_expand_symtabs_matching::check_match)
341         (selftests::dw2_expand_symtabs_matching::test_symbols)
342         (selftests::dw2_expand_symtabs_matching::run_test): New.
343         (_initialize_dwarf2_read): Register
344         selftests::dw2_expand_symtabs_matching::run_test.
345         * psymtab.c (psym_expand_symtabs_matching): Use
346         lookup_name_info::make_ignore_params.
347         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
348         If the lookup name wants to ignore parameters, strip them.
349         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
350         code handling '('.
351         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
352         (default_collect_symbol_completion_matches_break_on): Don't try to
353         strip parameters.
354         * symtab.h (lookup_name_info::lookup_name_info): Add
355         'ignore_parameters' parameter.
356         (lookup_name_info::ignore_parameters)
357         (lookup_name_info::make_ignore_params): New methods.
358         (lookup_name_info::m_ignore_parameters): New field.
359         * unittests/lookup_name_info-selftests.c: New file.
360
361 2017-11-08  Pedro Alves  <palves@redhat.com>
362
363         * dwarf2read.c (dw2_expand_marked_cus)
364         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
365         (dw2_expand_symtabs_matching): Move further below.
366         (dw2_expand_marked_cus): Reindent.
367
368 2017-11-08  Pedro Alves  <palves@redhat.com>
369
370         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
371         (struct name_component): New.
372         (mapped_index::name_components): New field.
373         (mapped_index::symbol_name_at): New method.
374         (dwarf2_read_index): Call mapped_index ctor.
375         (dw2_map_matching_symbols): Add comment about name_components
376         table.
377         (dw2_expand_symtabs_matching): Factor part to...
378         (dw2_expand_symtabs_matching_symbol): ... this new function.
379         Build name components table, and lookup symbols in it before
380         calling the name matcher.
381         (dw2_expand_marked_cus): New, factored out from
382         dw2_expand_symtabs_matching.
383         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
384
385 2017-11-08   Pedro Alves  <palves@redhat.com>
386
387         * ada-lang.c (ada_encode): Rename to ..
388         (ada_encode_1): ... this.  Add throw_errors parameter and handle
389         it.
390         (ada_encode): Reimplement.
391         (match_name): Delete, folded into full_name.
392         (resolve_subexp): No longer pass the encoded name to
393         ada_lookup_symbol_list.
394         (should_use_wild_match): Delete.
395         (name_match_type_from_name): New.
396         (ada_lookup_simple_minsym): Use lookup_name_info and the
397         language's symbol_name_matcher_ftype.
398         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
399         (ada_add_block_renamings): Adjust to use lookup_name_info.
400         (ada_lookup_name): New.
401         (add_nonlocal_symbols, ada_add_all_symbols)
402         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
403         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
404         (ada_name_for_lookup): Delete.
405         (ada_lookup_encoded_symbol): Construct a verbatim name.
406         (wild_match): Reverse sense of return type.  Use bool.
407         (full_match): Reverse sense of return type.  Inline bits of old
408         match_name here.
409         (ada_add_block_symbols): Adjust to use lookup_name_info.
410         (symbol_completion_match): Delete, folded into...
411         (ada_lookup_name_info::matches): ... .this new method.
412         (symbol_completion_add): Delete.
413         (ada_collect_symbol_completion_matches): Add name_match_type
414         parameter.  Adjust to use lookup_name_info and
415         completion_list_add_name.
416         (get_var_value, ada_add_global_exceptions): Adjust to use
417         lookup_name_info.
418         (ada_get_symbol_name_cmp): Delete.
419         (do_wild_match, do_full_match): New functions.
420         (ada_lookup_name_info::ada_lookup_name_info): New method.
421         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
422         functions.
423         (ada_language_defn): Install ada_get_symbol_name_matcher.
424         * ada-lex.l (processId): If name starts with '<', copy it
425         verbatim.
426         * block.c (block_iter_match_step, block_iter_match_first)
427         (block_iter_match_next, block_lookup_symbol)
428         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
429         lookup_name_info.
430         * block.h (block_iter_match_first, block_iter_match_next)
431         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
432         * c-lang.c (c_language_defn, cplus_language_defn)
433         (asm_language_defn, minimal_language_defn): Adjust comments to
434         refer to la_get_symbol_name_matcher.
435         * completer.c (complete_files_symbols)
436         (collect_explicit_location_matches, symbol_completer): Pass a
437         symbol_name_match_type down.
438         * completer.h (class completion_match, completion_match_result):
439         New classes.
440         (completion_tracker::reset_completion_match_result): New method.
441         (completion_tracker::m_completion_match_result): New field.
442         * cp-support.c (make_symbol_overload_list_block): Adjust to use
443         lookup_name_info.
444         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
445         functions.
446         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
447         * d-lang.c: Adjust comments to refer to
448         la_get_symbol_name_matcher.
449         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
450         Adjust to use lookup_name_info.
451         (dict_iter_match_first, dict_iter_match_next)
452         (iter_match_first_hashed, iter_match_next_hashed)
453         (iter_match_first_linear, iter_match_next_linear): Adjust to work
454         with a lookup_name_info.
455         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
456         Likewise.
457         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
458         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
459         (gdb_index_symbol_name_matcher): New class.
460         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
461         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
462         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
463         with a symbol_name_match_type.
464         (f_language_defn): Adjust comments to refer to
465         la_get_symbol_name_matcher.
466         * go-lang.c (go_language_defn): Adjust comments to refer to
467         la_get_symbol_name_matcher.
468         * language.c (default_symbol_name_matcher)
469         (language_get_symbol_name_matcher): New functions.
470         (unknown_language_defn, auto_language_defn): Adjust comments to
471         refer to la_get_symbol_name_matcher.
472         * language.h (symbol_name_cmp_ftype): Delete.
473         (language_defn) <la_collect_symbol_completion_matches>: Add match
474         type parameter.
475         <la_get_symbol_name_cmp>: Delete field.
476         <la_get_symbol_name_matcher>: New field.
477         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
478         (default_symbol_name_matcher, language_get_symbol_name_matcher):
479         Declare.
480         * linespec.c (iterate_over_all_matching_symtabs)
481         (iterate_over_file_blocks): Adjust to use lookup_name_info.
482         (find_methods): Add language parameter, and use lookup_name_info
483         and the language's symbol_name_matcher_ftype.
484         (linespec_complete_function): Adjust.
485         (lookup_prefix_sym): Use lookup_name_info.
486         (add_all_symbol_names_from_pspace): Adjust.
487         (find_superclass_methods): Add language parameter and pass it
488         down.
489         (find_method): Pass symbol language down.
490         (find_linespec_symbols): Don't demangle or Ada encode here.
491         (search_minsyms_for_name): Add lookup_name_info parameter.
492         (add_matching_symbols_to_info): Add name_match_type parameter.
493         Use lookup_name_info.
494         * m2-lang.c (m2_language_defn): Adjust comments to refer to
495         la_get_symbol_name_matcher.
496         * minsyms.c: Include <algorithm>.
497         (add_minsym_to_demangled_hash_table): Remove table parameter and
498         add objfile parameter.  Use search_name_hash, and add language to
499         demangled languages vector.
500         (struct found_minimal_symbols): New struct.
501         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
502         New functions.
503         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
504         input names here.  Use lookup_name_info instead.  Lookup up
505         demangled names once for each language in the demangled names
506         vector.
507         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
508         demangled names once for each language in the demangled names
509         vector.
510         (build_minimal_symbol_hash_tables): Adjust.
511         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
512         lookup_name_info.
513         * objc-lang.c (objc_language_defn): Adjust comment to refer to
514         la_get_symbol_name_matcher.
515         * objfiles.h: Include <vector>.
516         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
517         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
518         la_get_symbol_name_matcher.
519         * p-lang.c (pascal_language_defn): Adjust comment to refer to
520         la_get_symbol_name_matcher.
521         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
522         (match_partial_symbol): Use symbol_name_match_type,
523         lookup_name_info and psymbol_name_matches.
524         (lookup_partial_symbol): Use lookup_name_info.
525         (map_block): Use symbol_name_match_type and lookup_name_info.
526         (psym_map_matching_symbols): Use symbol_name_match_type.
527         (psymbol_name_matches): New.
528         (recursively_search_psymtabs): Use lookup_name_info and
529         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
530         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
531         'kind' parameter to 'domain'.
532         * rust-lang.c (rust_language_defn): Adjust comment to refer to
533         la_get_symbol_name_matcher.
534         * symfile-debug.c (debug_qf_map_matching_symbols)
535         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
536         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
537         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
538         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
539         Adjust to use symbol_name_match_type.
540         <expand_symtabs_matching>: Adjust to use lookup_name_info.
541         (expand_symtabs_matching): Adjust to use lookup_name_info.
542         * symmisc.c (maintenance_expand_symtabs): Use
543         lookup_name_info::match_any ().
544         * symtab.c (symbol_matches_search_name): New.
545         (eq_symbol_entry): Adjust to use lookup_name_info and the
546         language's matcher.
547         (demangle_for_lookup_info::demangle_for_lookup_info): New.
548         (lookup_name_info::match_any): New.
549         (iterate_over_symbols, search_symbols): Use lookup_name_info.
550         (compare_symbol_name): Add language, lookup_name_info and
551         completion_match_result parameters, and use them.
552         (completion_list_add_name): Make extern.  Add language and
553         lookup_name_info parameters.  Use them.
554         (completion_list_add_symbol, completion_list_add_msymbol)
555         (completion_list_objc_symbol): Add lookup_name_info parameters and
556         adjust.  Pass down language.
557         (completion_list_add_fields): Add lookup_name_info parameters and
558         adjust.  Pass down language.
559         (add_symtab_completions): Add lookup_name_info parameters and
560         adjust.
561         (default_collect_symbol_completion_matches_break_on): Add
562         name_match_type parameter, and use it.  Use lookup_name_info.
563         (default_collect_symbol_completion_matches)
564         (collect_symbol_completion_matches): Add name_match_type
565         parameter, and pass it down.
566         (collect_symbol_completion_matches_type): Adjust.
567         (collect_file_symbol_completion_matches): Add name_match_type
568         parameter, and use lookup_name_info.
569         * symtab.h: Include <string> and "common/gdb_optional.h".
570         (enum class symbol_name_match_type): New.
571         (class ada_lookup_name_info): New.
572         (struct demangle_for_lookup_info): New.
573         (class lookup_name_info): New.
574         (symbol_name_matcher_ftype): New.
575         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
576         (symbol_matches_search_name): Declare.
577         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
578         (default_collect_symbol_completion_matches)
579         (collect_symbol_completion_matches)
580         (collect_file_symbol_completion_matches): Add name_match_type
581         parameter.
582         (iterate_over_symbols): Use lookup_name_info.
583         (completion_list_add_name): Declare.
584         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
585         (strncmp_iw_with_mode): Now extern.
586         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
587         (strncmp_iw_with_mode): Declare.
588
589 2017-11-08  Keith Seitz  <keiths@redhat.com>
590             Pedro Alves  <palves@redhat.com>
591
592         * ada-lang.c (ada_language_defn): Install
593         default_search_name_hash.
594         * buildsym.c (struct buildsym_compunit): <language>: New field.
595         (finish_block_internal): Pass language when creating dictionaries.
596         (start_buildsym_compunit, start_symtab): New language parameters.
597         Use them.
598         (restart_symtab): Pass down compilation unit's language.
599         * buildsym.h (enum language): Forward declare.
600         (start_symtab): New 'language' parameter.
601         * c-lang.c (c_language_defn, cplus_language_defn)
602         (asm_language_defn, minimal_language_defn): Install
603         default_search_name_hash.
604         * coffread.c (coff_start_symtab): Adjust.
605         * d-lang.c (d_language_defn): Install default_search_name_hash.
606         * dbxread.c (struct symloc): Add 'pst_language' field.
607         (PST_LANGUAGE): Define.
608         (start_psymtab, read_ofile_symtab): Use it.
609         (process_one_symbol): New 'language' parameter.  Pass it down.
610         * dictionary.c (struct dictionary) <language>: New field.
611         (DICT_LANGUAGE): Define.
612         (dict_create_hashed, dict_create_hashed_expandable)
613         (dict_create_linear, dict_create_linear_expandable): New parameter
614         'language'.  Set the dictionary's language.
615         (iter_match_first_hashed): Adjust to rename.
616         (insert_symbol_hashed): Assert we don't see mismatching
617         languages.  Adjust to rename.
618         (dict_hash): Rename to ...
619         (default_search_name_hash): ... this and make extern.
620         * dictionary.h (struct language_defn): Forward declare.
621         (dict_create_hashed): New parameter 'language'.
622         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
623         * f-lang.c (f_language_defn): Install default_search_name_hash.
624         * go-lang.c (go_language_defn): Install default_search_name_hash.
625         * jit.c (finalize_symtab): Pass compunit's language to dictionary
626         creation.
627         * language.c (unknown_language_defn, auto_language_defn):
628         * language.h (language_defn::la_search_name_hash): New field.
629         (default_search_name_hash): Declare.
630         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
631         * mdebugread.c (new_block): New parameter 'language'.
632         * mdebugread.c (parse_symbol): Pass symbol language to block
633         allocation.
634         (psymtab_to_symtab_1): Pass down language.
635         (new_symtab): Pass compunit's language to block allocation.
636         * objc-lang.c (objc_language_defn): Install
637         default_search_name_hash.
638         * opencl-lang.c (opencl_language_defn):
639         * p-lang.c (pascal_language_defn): Install
640         default_search_name_hash.
641         * rust-lang.c (rust_language_defn): Install
642         default_search_name_hash.
643         * stabsread.h (enum language): Forward declare.
644         (process_one_symbol): Add 'language' parameter.
645         * symtab.c (search_name_hash): New function.
646         * symtab.h (search_name_hash): Declare.
647         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
648
649 2017-11-08  Pedro Alves  <palves@redhat.com>
650
651         * cp-name-parser.y (main): Don't initialize extra_chars.
652
653 2017-11-07  Tom Tromey  <tom@tromey.com>
654
655         * event-top.h (command_handler): Constify.
656         * record-full.c (cmd_record_full_start): Update.
657         * thread.c (thread_apply_all_command): Update.
658         * printcmd.c (eval_command): Update.
659         * mi/mi-main.c (mi_execute_cli_command): Update.
660         (mi_execute_async_cli_command): Update.
661         * tui/tui-stack.c (tui_update_command): Update.
662         * cli/cli-interp.c (safe_execute_command): Constify.
663         * record.c (record_start): Update.
664         (record_start, record_stop, cmd_record_start): Update.
665         * record-btrace.c (cmd_record_btrace_bts_start): Update.
666         (cmd_record_btrace_pt_start): Update.
667         (cmd_record_btrace_start): Update.
668         (cmd_record_btrace_start): Update.
669         * reverse.c (exec_reverse_once): Update.
670         * python/python.c (execute_gdb_command): Don't copy the command.
671         * event-top.c (command_line_handler): Update.
672         (command_handler): Constify.
673         * defs.h (deprecated_call_command_hook): Constify.
674         * cli/cli-script.h (execute_user_command): Constify.
675         * cli/cli-script.c (execute_user_command): Constify.
676         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
677         (enum command_control_type): Update.
678         * main.c (catch_command_errors): Remove non-const overload.
679         (catch_command_errors_ftype): Remove.
680         * python/py-cmd.c (cmdpy_function): Constify.
681         * guile/scm-cmd.c (cmdscm_function): Constify.
682         * cli/cli-dump.c (call_dump_func): Constify.
683         * cli/cli-decode.c (do_const_cfunc): Constify.
684         (do_sfunc): Constify.
685         (cmd_func): Constify.
686         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
687         * top.h (execute_command): Constify.
688         * top.c (execute_command): Constify.
689         (execute_command_to_string): Constify.
690         (deprecated_call_command_hook): Constify.
691         * command.h (cmd_func): Constify.
692         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
693
694 2017-11-07  Tom Tromey  <tom@tromey.com>
695
696         * ada-lang.c (catch_ada_exception_command): Constify.
697         (catch_assert_command): Constify.
698         * break-catch-throw.c (catch_catch_command, catch_throw_command)
699         (catch_rethrow_command): Constify.
700         (catch_exception_command_1): Constify.
701         * breakpoint.h (add_catch_command): Constify.
702         * break-catch-syscall.c (catch_syscall_command_1): Constify.
703         (catch_syscall_split_args): Constify.
704         * break-catch-sig.c (catch_signal_command): Constify.
705         (catch_signal_split_args): Constify.
706         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
707         cmd_const_sfunc_ftype.
708         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
709         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
710         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
711         (add_setshow_string_cmd, struct cmd_list_element)
712         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
713         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
714         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
715         Constify.
716         (set_cmd_sfunc): Constify.
717         (empty_sfunc): Constify.
718         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
719         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
720         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
721         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
722         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
723         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
724         Constify.
725         (set_cmd_sfunc): Constify.
726         (cmd_sfunc_ftype): Remove.
727         * compile/compile.c (set_compile_args): Constify.
728         * infrun.c (set_disable_randomization): Constify.
729         * infcmd.c (set_args_command, set_cwd_command): Constify.
730         * breakpoint.c (set_condition_evaluation_mode): Constify.
731         (add_catch_command): Constify.
732         (catch_fork_command_1, catch_exec_command_1)
733         (catch_load_command_1, catch_unload_command_1): Constify.
734         (catch_load_or_unload): Constify.
735         * guile/scm-param.c (pascm_set_func): Constify.
736         (add_setshow_generic): Constify.
737         * python/py-param.c (get_set_value): Constify.
738         * top.h (set_verbose): Constify.
739         * tui/tui-win.c (tui_set_var_cmd): Constify.
740         * mi/mi-main.c (set_mi_async_command): Constify.
741         * cli/cli-logging.c (set_logging_overwrite)
742         (set_logging_redirect): Constify.
743         * value.c (set_max_value_size): Constify.
744         * valprint.c (set_input_radix, set_output_radix): Constify.
745         * utils.c (set_width_command, set_height_command): Constify.
746         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
747         * tracepoint.c (set_disconnected_tracing)
748         (set_circular_trace_buffer, set_trace_buffer_size)
749         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
750         * top.c (set_history_size_command, set_verbose, set_editing)
751         (set_gdb_datadir, set_history_filename): Constify.
752         * target.c (set_targetdebug, maint_set_target_async_command)
753         (maint_set_target_non_stop_command, set_target_permissions)
754         (set_write_memory_permission): Constify.
755         (open_target): Constify.
756         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
757         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
758         * symtab.c (set_symbol_cache_size_handler): Constify.
759         * symfile.c (set_ext_lang_command): Constify.
760         * symfile-debug.c (set_debug_symfile): Constify.
761         * source.c (set_directories_command): Constify.
762         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
763         * serial.c (set_parity): Constify.
764         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
765         * remote.c (set_remote_exec_file, set_remotebreak)
766         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
767         * record.c (set_record_insn_history_size)
768         (set_record_call_history_size): Constify.
769         * record-full.c (set_record_full_insn_max_num): Constify.
770         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
771         * osabi.c (set_osabi): Constify.
772         * mips-tdep.c (set_mips64_transfers_32bit_regs)
773         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
774         * maint.c (maintenance_set_profile_cmd): Constify.
775         * linux-thread-db.c (set_libthread_db_search_path): Constify.
776         * language.c (set_language_command, set_range_command)
777         (set_case_command): Constify.
778         * infrun.c (set_non_stop, set_observer_mode)
779         (set_stop_on_solib_events, set_schedlock_func)
780         (set_exec_direction_func): Constify.
781         * infcmd.c (set_inferior_tty_command): Constify.
782         * disasm.c (set_disassembler_options_sfunc): Constify.
783         * demangle.c (set_demangling_command): Constify.
784         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
785         * cris-tdep.c (set_cris_version, set_cris_mode)
786         (set_cris_dwarf2_cfi): Constify.
787         * corefile.c (set_gnutarget_command): Constify.
788         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
789         (set_target_wide_charset_sfunc): Constify.
790         * breakpoint.c (update_dprintf_commands): Constify.
791         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
792         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
793         (set_disassembly_style_sfunc): Constify.
794         * arch-utils.c (set_endian, set_architecture): Constify.
795         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
796         * agent.c (set_can_use_agent): Constify.
797
798 2017-11-07  Tom Tromey  <tom@tromey.com>
799
800         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
801         (go32_pde, go32_pte, go32_pte_for_address): Constify.
802         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
803         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
804         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
805         (parse_int_arg, show_thread_default_detach_sc_cmd)
806         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
807         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
808         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
809         (show_task_pause_cmd, set_task_detach_sc_cmd)
810         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
811         (set_noninvasive_cmd, set_thread_pause_cmd)
812         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
813         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
814         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
815         * windows-nat.c (display_selectors): Constify.
816         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
817         non-const "cfunc".
818         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
819         (cmd_cfunc_eq): Likewise.
820         (struct cmd_list_element): Likewise.
821         (do_cfunc): Remove.
822         (cli_user_command_p): Update.
823         * command.h (add_cmd): Remove non-const overload.
824         (cmd_cfunc_ftype): Remove typedef.
825         (cmd_cfunc_eq): Remove non-const overload.
826         * value.c (show_values): Constify.
827         * thread.c (thread_apply_all_command): Constify.
828         * symfile.c (load_command): Constify.
829         * source.c (directory_command): Constify.
830         * maint.c (maintenance_internal_error)
831         (maintenance_demangler_warning, maintenance_space_display)
832         (maintenance_print_architecture, maintenance_translate_address)
833         (maintenance_info_selftests, maintenance_internal_warning):
834         Constify.
835         * breakpoint.c (disable_trace_command, enable_trace_command):
836         Constify.
837         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
838         Constify.
839         (add_auto_load_safe_path): Constify.
840         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
841         * top.h (show_commands): Constify.
842         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
843         * sparc64-tdep.c (adi_examine_command): Constify.
844         (adi_assign_command): Constify.
845
846 2017-11-07  Tom Tromey  <tom@tromey.com>
847
848         * frame.h (info_locals_command, info_args_command): Constify.
849         * auto-load.h (auto_load_info_scripts): Constify.
850         * inferior.h (registers_info): Constify.
851         * copying.c: Rebuild.
852         * copying.awk: Constify generated commands.
853         * auto-load.c (auto_load_info_scripts)
854         (info_auto_load_gdb_scripts): Constify.
855         * cli/cli-decode.c (struct cmd_list_element): Take a
856         cmd_const_cfunc_ftype.
857         * command.h (add_info): Take a cmd_const_cfunc_ftype.
858         * tui/tui-win.c (tui_all_windows_info): Constify.
859         * python/py-auto-load.c (info_auto_load_python_scripts):
860         Constify.
861         * cli/cli-cmds.c (show_command): Remove non-const overload.
862         * tracepoint.c (info_tvariables_command, info_scope_command):
863         Constify.
864         (info_static_tracepoint_markers_command): Constify.
865         * thread.c (info_threads_command): Constify.
866         (print_thread_info_1): Constify.
867         * target.c (info_target_command): Constify.
868         * symtab.c (info_sources_command, info_functions_command)
869         (info_types_command): Constify.
870         (info_variables_command): Remove non-const overload.
871         * symfile.c (info_ext_lang_command): Constify.
872         * stack.c (info_frame_command, info_locals_command)
873         (info_args_command): Constify.
874         (backtrace_command): Remove non-const overload.
875         * source.c (info_source_command, info_line_command): Constify.
876         * solib.c (info_sharedlibrary_command): Constify.
877         * skip.c (info_skip_command): Constify.
878         * ser-go32.c (info_serial_command): Constify.
879         * reverse.c (info_bookmarks_command): Constify.
880         * printcmd.c (info_symbol_command, info_address_command)
881         (info_display_command): Constify.
882         * osdata.c (info_osdata_command): Constify.
883         * objc-lang.c (info_selectors_command, info_classes_command):
884         Constify.
885         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
886         * memattr.c (info_mem_command): Constify.
887         * macrocmd.c (info_macro_command, info_macros_command): Constify.
888         * linux-fork.c (info_checkpoints_command): Constify.
889         * infrun.c (info_signals_command): Constify.
890         * inflow.c (info_terminal_command): Constify.
891         * inferior.c (info_inferiors_command): Constify.
892         (print_inferior): Constify.
893         * infcmd.c (info_program_command, info_all_registers_command)
894         (info_registers_command, info_vector_command)
895         (info_float_command): Constify.
896         (registers_info): Constify.
897         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
898         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
899         Constify.
900         * f-valprint.c (info_common_command): Constify.
901         * dcache.c (info_dcache_command): Constify.
902         (dcache_info_1): Constify.
903         * darwin-nat-info.c (info_mach_tasks_command)
904         (info_mach_task_command, info_mach_ports_command)
905         (info_mach_port_command, info_mach_threads_command)
906         (info_mach_thread_command, info_mach_regions_command)
907         (info_mach_regions_recurse_command, info_mach_region_command)
908         (info_mach_exceptions_command): Constify.
909         (get_task_from_args): Constify.
910         * cp-support.c (info_vtbl_command): Constify.
911         * breakpoint.c (info_watchpoints_command)
912         (info_tracepoints_command): Constify.
913         (info_breakpoints_command): Remove non-const overload.
914         * avr-tdep.c (avr_io_reg_read_command): Constify.
915         * auxv.c (info_auxv_command): Constify.
916         * ada-tasks.c (info_tasks_command): Constify.
917         (info_task): Constify.
918         * ada-lang.c (info_exceptions_command): Constify.
919
920 2017-11-07  Tom Tromey  <tom@tromey.com>
921
922         * solib.h (no_shared_libraries): Constify.
923         * frame.h (return_command): Constify.
924         * cli/cli-cmds.h (quit_command): Constify.
925         * top.h (quit_command, execute_command): Constify.
926         * target.h (flash_erase_command): Constify.
927         * inferior.h (set_inferior_args, attach_command): Constify.
928         * tracepoint.h (start_tracing, stop_tracing): Constify.
929         * breakpoint.h (break_command, tbreak_command)
930         (hbreak_command_wrapper, thbreak_command_wrapper)
931         (rbreak_command_wrapper, watch_command_wrapper)
932         (awatch_command_wrapper, rwatch_command_wrapper)
933         (get_tracepoint_by_number): Constify.
934         * symtab.c (info_variables_command, rbreak_command)
935         (symtab_symbol_info): Constify.
936         (info_variables_command): Add non-const overload.
937         * top.c (dont_repeat_command): Constify.
938         * breakpoint.c (ignore_command, commands_command)
939         (condition_command, tbreak_command, hbreak_command)
940         (thbreak_command, clear_command, break_command)
941         (info_breakpoints_command, watch_command, rwatch_command)
942         (awatch_command, trace_command, ftrace_command, strace_command)
943         (trace_pass_command, break_range_command, dprintf_command)
944         (agent_printf_command, get_tracepoint_by_number)
945         (watch_maybe_just_location, trace_pass_command): Constify.
946         (info_breakpoints_command): Add non-const overload.
947         * tracefile.c (tsave_command): Constify.
948         * infcmd.c (attach_command, disconnect_command, signal_command)
949         (queue_signal_command, stepi_command, nexti_command)
950         (finish_command, next_command, step_command, until_command)
951         (advance_command, jump_command, continue_command, run_command)
952         (start_command, starti_command, interrupt_command)
953         (run_command_1, set_inferior_args, step_1): Constify.
954         * inferior.c (add_inferior_command, remove_inferior_command)
955         (clone_inferior_command): Constify.
956         * linux-fork.c (checkpoint_command, restart_command): Constify.
957         * windows-nat.c (signal_event_command): Constify.
958         * guile/guile.c (guile_repl_command, guile_command): Constify.
959         * printcmd.c (x_command, display_command, printf_command)
960         (output_command, set_command, call_command, print_command)
961         (eval_command): Constify.
962         (non_const_set_command): Remove.
963         (_initialize_printcmd): Update.
964         * source.c (forward_search_command, reverse_search_command):
965         Constify.
966         * jit.c (jit_reader_load_command, jit_reader_unload_command):
967         Constify.
968         * infrun.c (handle_command): Constify.
969         * memattr.c (mem_command): Constify.
970         * stack.c (return_command, up_command, up_silently_command)
971         (down_command, down_silently_command, frame_command)
972         (backtrace_command, func_command, backtrace_command_1): Constify.
973         (backtrace_command): Add non-const overload.
974         * remote-sim.c (simulator_command): Constify.
975         * exec.c (set_section_command): Constify.
976         * tracepoint.c (tdump_command, trace_variable_command)
977         (tstatus_command, tstop_command, tstart_command)
978         (end_actions_pseudocommand, while_stepping_pseudocommand)
979         (collect_pseudocommand, teval_pseudocommand, actions_command)
980         (start_tracing, stop_tracing): Constify.
981         * value.c (init_if_undefined_command): Constify.
982         * tui/tui-stack.c (tui_update_command): Constify.
983         * tui/tui-win.c (tui_refresh_all_command)
984         (tui_set_tab_width_command, tui_set_win_height_command)
985         (tui_set_focus_command, tui_scroll_forward_command)
986         (tui_scroll_backward_command, tui_scroll_left_command)
987         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
988         (tui_set_win_height): Constify.
989         * tui/tui-layout.c (tui_layout_command): Constify.
990         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
991         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
992         (proc_untrace_sysexit_cmd): Constify.
993         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
994         (threadset_test_cmd, threadlist_update_test_cmd)
995         (threadalive_test): Constify.
996         * objc-lang.c (print_object_command): Constify.
997         * command.h (add_com): Constify.
998         * cli/cli-dump.c (restore_command): Constify.
999         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1000         (help_command, complete_command, shell_command, edit_command)
1001         (list_command, disassemble_command, make_command)
1002         (apropos_command, alias_command): Constify.
1003         * cli/cli-script.c (document_command, define_command)
1004         (while_command, if_command, validate_comname): Constify.
1005         * cli/cli-decode.c (struct cmd_list_element): Change type of
1006         "fun".
1007         * target.c (do_monitor_command, flash_erase_command): Constify.
1008         * regcache.c (reg_flush_command): Constify.
1009         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1010         (reverse_nexti, reverse_continue, reverse_finish)
1011         (save_bookmark_command, goto_bookmark_command)
1012         (exec_reverse_once): Constify.
1013         * python/python.c (python_interactive_command, python_command):
1014         Constify.
1015         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1016         Constify.
1017         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1018         * gcore.c (gcore_command): Constify.
1019
1020 2017-11-07  Tom Tromey  <tom@tromey.com>
1021
1022         * printcmd.c (x_command): Call set_repeat_arguments.
1023         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1024         * top.c (repeat_arguments): New global.
1025         (set_repeat_arguments): New function.
1026         (execute_command): Handle repeat_arguments.
1027         (show_commands): Calls set_repeat_arguments.
1028         * command.h (set_repeat_arguments): Declare.
1029
1030 2017-11-07  Tom Tromey  <tom@tromey.com>
1031
1032         * stack.c (backtrace_command): Use std::string.
1033         (backtrace_command_1): Make "count_exp" const.
1034
1035 2017-11-07  Tom Tromey  <tom@tromey.com>
1036
1037         * source.c (directory_switch, mod_path, add_path): Constify.
1038         * defs.h (add_path, mod_path, directory_switch): Constify.
1039         * mi/mi-cmd-env.c (env_mod_path): Constify.
1040
1041 2017-11-07  Tom Tromey  <tom@tromey.com>
1042
1043         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1044         (run_command_1, continue_command, step_1, jump_command)
1045         (signal_command, until_command, advance_command, finish_command)
1046         (attach_command): Update.
1047
1048 2017-11-07  Tom Tromey  <tom@tromey.com>
1049
1050         * command.h (set_cmd_cfunc): Don't declare.
1051         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1052
1053 2017-11-07  Tom Tromey  <tom@tromey.com>
1054
1055         * stack.c (select_frame_command): Constify.
1056         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1057         * command.h (add_com_suppress_notification): Constify.
1058
1059 2017-11-07  Tom Tromey  <tom@tromey.com>
1060
1061         * breakpoint.c (stop_command): Constify.
1062         * cli/cli-decode.c (struct cmd_list_element): Constify.
1063         * command.h (add_abbrev_prefix_cmd): Constify.
1064
1065 2017-11-07  Pedro Alves  <palves@redhat.com>
1066
1067         * breakpoint.c (extract_bp_kind): New enum.
1068         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1069         factored out from ...
1070         (extract_bp_number_and_location): ... here.
1071         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1072
1073 2017-11-07  Pedro Alves  <palves@redhat.com>
1074
1075         * breakpoint.c (extract_bp_number_and_location): Change return
1076         type to void.  Throw error instead of warning.
1077         (enable_disable_command): Adjust.
1078
1079 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1080             Pedro Alves  <palves@redhat.com>
1081
1082         * breakpoint.c (map_breakpoint_number_range): New, factored out
1083         from ...
1084         (map_breakpoint_numbers): ... here.
1085         (find_location_by_number): Change parameters from string to
1086         breakpoint number and location.
1087         (extract_bp_number_and_location): New function.
1088         (enable_disable_bp_num_loc)
1089         (enable_disable_breakpoint_location_range)
1090         (enable_disable_command): New functions, factored out ...
1091         (enable_command, disable_command): ... these functions, and
1092         adjusted to support ranges.
1093         * NEWS: Document enable/disable breakpoint location range feature.
1094
1095 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1096
1097         * MAINTAINERS (Write After Approval): Update my e-mail address.
1098
1099 2017-11-06  Pedro Alves  <palves@redhat.com>
1100
1101         * gnu-nat.c (gnu_terminal_init): Delete.
1102         (gnu_target): Don't install gnu_terminal_init.
1103         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1104         (child_terminal_init): ... this function.
1105
1106 2017-11-06  Pedro Alves  <palves@redhat.com>
1107
1108         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1109         sgtty.h.
1110         * config.in, configure: Regenerate.
1111
1112 2017-11-06  Pedro Alves  <palves@redhat.com>
1113
1114         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1115         (async_init_signals): Adjust.
1116         (handle_stop_sig): Rename to ...
1117         (handle_sigtstp): ... this.
1118         (async_stop_sig): Rename to ...
1119         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1120         SIGTSTP path.
1121         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1122         instead of STOP_SIGNAL thoughout.
1123         (handle_stop_sig): Rename to ...
1124         (handle_sigtstp): ... this.
1125         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1126
1127 2017-11-06  Pedro Alves  <palves@redhat.com>
1128
1129         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1130         longer set flags twice in row.
1131
1132 2017-11-06  Pedro Alves  <palves@redhat.com>
1133
1134         * Makefile.in (SER_HARDWIRE): Update comment.
1135         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1136         * common/gdb_termios.h: Delete file.
1137         * common/job-control.c: Include termios.h and unistd.h instead of
1138         gdb_termios.h.
1139         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1140         check.
1141         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1142         Remove sgtty code.
1143         * configure.ac: No longer check for termio.h and sgtty.h.
1144         * configure: Regenerate.
1145         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1146         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1147         Replace PROCESS_GROUP_TYPE references with pid_t references
1148         throughout.
1149         (gdb_getpgrp): Delete.
1150         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1151         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1152         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1153         gdb_getpgrp.  Use serial_set_tty_state instead aof
1154         serial_noflush_set_tty_state.  Remove sgtty code.
1155         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1156         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1157         (inferior_process_group): Now returns pid_t.
1158         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1159         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1160         * ser-event.c (serial_event_ops): Update.
1161         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1162         (dos_ops): Update.
1163         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1164         * ser-pipe.c (pipe_ops): Update.
1165         * ser-tcp.c (tcp_ops): Update.
1166         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1167         HAVE_TERMIOS checks.
1168         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1169         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1170         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1171         assume termios.
1172         (hardwire_noflush_set_tty_state): Delete.
1173         (hardwire_print_tty_state, hardwire_drain_output)
1174         (hardwire_flush_output, hardwire_flush_input)
1175         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1176         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1177         code, and assume termios.
1178         (hardwire_ops): Update.
1179         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1180         * serial.c (serial_noflush_set_tty_state): Delete.
1181         * serial.h (serial_noflush_set_tty_state): Delete.
1182         (serial_ops::noflush_set_tty_state): Delete.
1183
1184 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1185
1186         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1187         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1188         (COMMON_OBS): Remove doublest.o and dfp.o.
1189         Do not build target-float.c (instead of doublest.c)
1190         with -Wformat-nonliteral.
1191
1192         * doublest.c: Remove file.
1193         * doublest.h: Remove file.
1194         * dfp.c: Remove file.
1195         * dfp.h: Remove file.
1196
1197         * target-float.c: Do not include "doublest.h" and "dfp.h".
1198         (DOUBLEST): Move here from doublest.h.
1199         (enum float_kind): Likewise.
1200         (FLOATFORMAT_CHAR_BIT): Likewise.
1201         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1202         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1203         (floatformat_precision): Likewise.
1204         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1205         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1206         Likewise.
1207         (host_float_format, host_double_format, host_long_double_format):
1208         Likewise.
1209         (floatformat_to_string, floatformat_from_string): Likewise.
1210         (floatformat_to_doublest): Likewise.  Also, inline the original
1211         convert_floatformat_to_doublest.
1212         (floatformat_from_doublest): Likewise.  Also, inline the original
1213         convert_floatformat_from_doublest.
1214
1215         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1216         (MAX_DECIMAL_STRING): Move here from dfp.c.
1217         (match_endianness): Likewise.
1218         (set_decnumber_context, decimal_check_errors): Likewise.
1219         (decimal_from_number, decimal_to_number): Likewise.
1220         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1221         (decimal_from_longest, decimal_from_ulongest): Likewise.
1222         (decimal_to_longest): Likewise.
1223         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1224         (decimal_convert): Likewise.
1225
1226 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1227
1228         * doublest.c: Do not include "gdbtypes.h".
1229         (extract_typed_floating): Remove.
1230         (store_typed_floating): Remove.
1231         (convert_typed_floating): Remove.
1232         * doublest.h (struct type): Remove.
1233         (DOUBLEST_PRINT_FORMAT): Remove.
1234         (DOUBLEST_SCAN_FORMAT): Remove.
1235         (extract_typed_floating): Remove.
1236         (store_typed_floating): Remove.
1237         (convert_typed_floating): Remove.
1238
1239         * dfp.c (decimal_from_doublest): Remove.
1240         (decimal_to_doublest): Remove.
1241         * dfp.h: Do not include "doublest.h".
1242         (decimal_from_doublest): Remove.
1243         (decimal_to_doublest): Remove.
1244
1245         * value.c: Do not include "doublest.h" and "dfp.h".
1246         (value_as_double): Remove.
1247         (unpack_double): Remove.
1248         (value_from_double): Remove.
1249         (value_from_decfloat): Remove.
1250         * value.h: Do not include "doublest.h".
1251         (value_as_double): Remove.
1252         (unpack_double): Remove.
1253         (value_from_double): Remove.
1254         (value_from_decfloat): Remove.
1255
1256 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1257
1258         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1259         (i386_extract_return_value): Use target_float_convert.
1260         (i386_store_return_value): Likewise.
1261         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1262         (i387_value_to_register): Likewise.
1263         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1264         (ia64_register_to_value): Use target_float_convert.
1265         (ia64_value_to_register): Likewise.
1266         (ia64_extract_return_value): Likewise.
1267         (ia64_store_return_value): Likewise.
1268         (ia64_push_dummy_call): Likewise.
1269         * m68k-tdep.c: Include "target-float.h".
1270         (m68k_register_to_value): Use target_float_convert.
1271         (m68k_value_to_register): Likewise.
1272         (m68k_svr4_extract_return_value): Likewise.
1273         (m68k_svr4_store_return_value): Likewise.
1274         * ppc-sysv-tdep.c: Include "target-float.h".
1275         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1276         (do_ppc_sysv_return_value): Likewise.
1277         (ppc64_sysv_abi_push_freg): Likewise.
1278         (ppc64_sysv_abi_return_value_base): Likewise.
1279         * rs6000-aix-tdep.c: Include "target-float.h".
1280         (rs6000_push_dummy_call): Use target_float_convert.
1281         (rs6000_return_value): Likewise.
1282         * rs6000-lynx178-tdep.c: Include "target-float.h".
1283         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1284         (rs6000_lynx178_return_value): Likewise.
1285         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1286         (rs6000_register_to_value): Use target_float_convert.
1287         (rs6000_value_to_register): Likewise.
1288         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1289         (arm_extract_return_value): Use target_float_convert.
1290         (arm_store_return_value): Likewise.
1291         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1292         (sh_register_convert_to_virtual): Use target_float_convert.
1293         (sh_register_convert_to_raw): Likewise.
1294         * sh64-tdep.c: Include "target-float.h".
1295         (sh64_extract_return_value): Use target_float_convert.
1296         (sh64_register_convert_to_virtual): Likewise.
1297         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1298
1299 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1300
1301         * target-float.c (floatformat_to_host_double): New function.
1302         (floatformat_from_host_double): Likewise.
1303         (target_float_to_host_double): Likewise.
1304         (target_float_from_host_double): Likewise.
1305         * target-float.h (target_float_to_host_double): Add prototype.
1306         (target_float_from_host_double): Likewise.
1307
1308         * guile/scm-value.c: Include "target-float.h".
1309         (gdbscm_value_to_real): Use target_float_to_host_double.
1310         Handle integer source values via value_as_long.
1311         * guile/scm-math.c: Include "target-float.h".  Do not include
1312         "doublest.h", "dfp.h", and "expression.h".
1313         (vlscm_convert_typed_number): Use target_float_from_host_double.
1314         (vlscm_convert_number): Likewise.
1315
1316         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1317         (convert_value_from_python): Use target_float_from_host_double.
1318
1319 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1320
1321         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1322         (cast_from_fixed): Likewise.
1323         (ada_scaling_type): New function.
1324         (ada_delta): Return value instead of DOUBLEST.  Perform target
1325         arithmetic instead of host arithmetic.
1326         (scaling_factor): Rename to ...
1327         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1328         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1329         (ada_fixed_to_float): Remove.
1330         (ada_float_to_fixed): Remove.
1331         * ada-lang.h (ada_fixed_to_float): Remove.
1332         (ada_float_to_fixed): Remove.
1333         (ada_delta): Return value instead of DOUBLEST.
1334         (ada_scaling_factor): Add prototype.
1335
1336         * ada-typeprint.c: Include "target-float.h".
1337         (print_fixed_point_type): Perform target arithmetic instead of
1338         host arithmetic.
1339         * ada-valprint.c: Include "target-float.h".
1340         (ada_val_print_num): Perform target arithmetic instead of
1341         host arithmetic for fixed-point types.
1342
1343 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1344
1345         * target-float.c: Include <math.h>.
1346         (floatformat_binop): New function.
1347         (floatformat_compare): Likewise.
1348         (target_float_binop): Likewise.
1349         (target_float_compare): Likewise.
1350         * target-float.h: Include "expression.h".
1351         (target_float_binop): Add prototype.
1352         (target_float_compare): Likewise.
1353
1354         * valarith.c: Do not include "doublest.h" and "dfp.h".
1355         Include "common/byte-vector.h".
1356         (value_args_as_decimal): Remove, replace by ...
1357         (value_args_as_target_float): ... this function.  Handle both
1358         binary and decimal target floating-point formats.
1359         (scalar_binop): Handle both binary and decimal FP using
1360         value_args_as_target_float and target_float_binop.
1361         (value_equal): Handle both binary and decimal FP using
1362         value_args_as_target_float and target_float_compare.
1363         (value_less): Likewise.
1364         (value_pos): Handle all scalar types as simple copy.
1365         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1366         * dfp.c (decimal_binop): Throw error instead of internal_error
1367         when called with an unsupported operation code.
1368
1369 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1370
1371         * target-float.c (target_float_to_string): New function.
1372         (target_float_from_string): New function.
1373         * target-float.h (target_float_to_string): Add prototype.
1374         (target_float_from_string): Add prototype.
1375
1376         * valprint.c: Include "target-float.h".  Do not include
1377         "doublest.h" and "dfp.h".
1378         (print_floating): Use target_float_to_string.
1379         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1380         (printf_floating): Use target_float_to_string.
1381         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1382         (print_i387_value): Use target_float_to_string.
1383         * mips-tdep.c: Include "target-float.h".
1384         (mips_print_fp_register): Use target_float_to_string.
1385         * sh64-tdep.c: Include "target-float.h".
1386         (sh64_do_fp_register): Use target_float_to_string.
1387
1388         * parse.c: Include "target-float.h".  Do not include
1389         "doublest.h" and "dfp.h".
1390         (parse_float): Use target_float_from_string.
1391         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1392         (define_symbol): Use target_float_from_string.
1393         * gdbarch-selftests.c: Include "target-float.h".
1394         (register_to_value_test): Use target_float_from_string.
1395
1396 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1397
1398         * Makefile.c (SFILES): Add target-float.c.
1399         (HFILES_NO_SRCDIR): Add target-float.h.
1400         (COMMON_OBS): Add target-float.o.
1401         * target-float.h: New file.
1402         * target-float.c: New file.
1403
1404         * doublest.c (floatformat_classify): Fix detection of float_zero.
1405
1406         * gdbtypes.c (is_floating_type): New function.
1407         * gdbtypes.h (is_floating_type): Add prototype.
1408
1409         * value.c: Do not include "floatformat.h".
1410         (unpack_double): Use target_float_is_valid.
1411         (is_floating_value): New function.
1412         * value.h (is_floating_value): Add prototype-
1413
1414         * valarith.c: Include "target-float.h".
1415         (value_logical_not): Use target_float_is_zero.
1416
1417         * python/py-value.c: Include "target-float.h".
1418         (valpy_nonzero): Use target_float_is_zero.
1419
1420 2017-11-04  Tom Tromey  <tom@tromey.com>
1421
1422         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1423
1424 2017-11-04  Tom Tromey  <tom@tromey.com>
1425
1426         * breakpoint.c (set_momentary_breakpoint): Return
1427         breakpoint_up.
1428         (until_break_command): Update.
1429         (new_until_break_fsm): Change argument types to
1430         breakpoint_up.
1431         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1432         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1433         Remove.
1434         * infcmd.c (finish_forward): Update.
1435         * breakpoint.h (set_momentary_breakpoint)
1436         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1437         (make_cleanup_delete_breakpoint): Remove.
1438         (struct breakpoint_deleter): New.
1439         (breakpoint_up): New typedef.
1440         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1441         (insert_exception_resume_breakpoint): Update.
1442         (insert_exception_resume_from_probe): Update.
1443         (insert_longjmp_resume_breakpoint): Update.
1444         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1445         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1446         * infcall.c (call_function_by_hand_dummy): Update
1447
1448 2017-11-04  Tom Tromey  <tom@tromey.com>
1449
1450         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1451
1452 2017-11-04  Tom Tromey  <tom@tromey.com>
1453
1454         * linux-tdep.c (linux_core_info_proc_mappings): Use
1455         gdb::def_vector.
1456         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1457         "size" argument.
1458         (linux_corefile_thread): Update.
1459         (linux_make_corefile_notes): Remove unused variable.
1460
1461 2017-11-04  Tom Tromey  <tom@tromey.com>
1462
1463         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1464         gdb::byte_vector.
1465
1466 2017-11-04  Tom Tromey  <tom@tromey.com>
1467
1468         * objfiles.c (do_free_objfile_cleanup): Remove.
1469         * compile/compile-object-load.c (compile_object_load): Update.
1470         * objfiles.h (make_cleanup_free_objfile): Remove.
1471
1472 2017-11-04  Tom Tromey  <tom@tromey.com>
1473
1474         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1475         (adi_read_versions): Change "tags" to "gdb_byte *".
1476         (adi_print_versions): Likewise.
1477
1478 2017-11-04  Tom Tromey  <tom@tromey.com>
1479
1480         * breakpoint.c
1481         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1482         from start_rbreak_breakpoints.
1483         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1484         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1485         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1486         * symtab.c (do_end_rbreak_breakpoints): Remove.
1487         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1488
1489 2017-11-04  Tom Tromey  <tom@tromey.com>
1490
1491         * cp-namespace.c (reset_directive_searched): Remove.
1492         (cp_lookup_symbol_via_imports): Use scoped_restore.
1493         * cp-support.c (reset_directive_searched): Remove.
1494         (make_symbol_overload_list_using): Use scoped_restore.
1495         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1496         (reset_directive_searched): Remove.
1497
1498 2017-11-04  Tom Tromey  <tom@tromey.com>
1499
1500         * symfile.c (find_separate_debug_file_by_debuglink): Use
1501         unique_xmalloc_ptr.
1502
1503 2017-11-04  Tom Tromey  <tom@tromey.com>
1504
1505         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1506         type of "info".
1507         (compute_stack_depth): Likewise.
1508         (do_compile_dwarf_expr_to_c): Use std::vector.
1509
1510 2017-11-04  Tom Tromey  <tom@tromey.com>
1511
1512         * compile/compile-object-load.c (link_callbacks_einfo): Use
1513         std::string.
1514
1515 2017-11-04  Tom Tromey  <tom@tromey.com>
1516
1517         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1518         Use scoped_free_pendings.
1519         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1520         scoped_free_pendings.
1521         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1522         (xcoff_initial_scan): Likewise.
1523         * buildsym.c (reset_symtab_globals): Update comment.
1524         (scoped_free_pendings): Rename from really_free_pendings.
1525         (prepare_for_building): Update comment.
1526         (buildsym_init): Likewise.
1527         * buildsym.h (class scoped_free_pendings): New class.
1528         (really_free_pendings): Don't declare.
1529
1530 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1531
1532         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1533         output when converting a zero value to a special byteorder format.
1534
1535 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1536
1537         * frame.c (do_frame_register_read): Remove aspace.
1538         * jit.c (jit_frame_sniffer): Likwise.
1539         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1540         * regcache.c (regcache::regcache): Pass nullptr.
1541         (regcache_print): Caller updated.
1542         * regcache.h (regcache::regcache): Remove one constructor
1543         parameter aspace.
1544
1545 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1546
1547         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1548
1549 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1550
1551         * breakpoint.c (insert_single_step_breakpoints): Update.
1552         * frame.c (struct frame_info) <aspace>: Add const.
1553         (frame_save_as_regcache): Add const.
1554         (get_frame_address_space): Return const address_space *.
1555         * frame.h (get_frame_address_space): Update declaration.
1556         * infrun.c (struct step_over_info) <aspace>: Add const.
1557         (set_step_over_info): Make aspace const.
1558         (displaced_step_prepare_throw): Change variable const.
1559         (resume): Likewise.
1560         (proceed): Likewise.
1561         (adjust_pc_after_break): Likewise.
1562         (save_waitstatus): Likewise.
1563         (handle_signal_stop): Likewise.
1564         (keep_going_pass_signal): Likewise.
1565         * jit.c (jit_frame_sniffer): Add const.
1566         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1567         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1568         * record-full.c (record_full_wait_1): Likewise.
1569         * regcache.c (regcache::regcache): Change parameter to const.
1570         * regcache.h (regcache::regcache): Likewise.
1571         (regcache::aspace): Return const address_space *.
1572         (regcache) <m_aspace>: Add const.
1573
1574 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1575
1576         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1577         * frame.c (create_sentinel_frame): Likewise.
1578         * infrun.c (displaced_step_prepare_throw): Likewise.
1579         (resume): Likewise.
1580         (thread_still_needs_step_over_bp): Likewise.
1581         (proceed): Likewise.
1582         (do_target_wait): Likewise.
1583         (adjust_pc_after_break): Likewise.
1584         (handle_syscall_event): Likewise.
1585         (save_waitstatus): Likewise.
1586         (handle_inferior_event_1): Likewise.
1587         (handle_signal_stop): Likewise.
1588         (keep_going_pass_signal): Likewise.
1589         * linux-nat.c (status_callback): Likewise.
1590         (save_stop_reason): Likewise.
1591         (resume_stopped_resumed_lwps): Likewise.
1592         * record-full.c (record_full_exec_insn): Likewise.
1593         (record_full_wait_1): Likewise.
1594         * regcache.c (get_regcache_aspace): Remove.
1595         * regcache.h (get_regcache_aspace): Remove.
1596
1597 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1598
1599         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1600         (init_regcache_descr): Use gdbarch_num_regs.
1601         (regcache::regcache): Likewise.
1602         (regcache::get_register_status): Likewise.
1603         (regcache::assert_raw_regnum): Likewise.
1604         (regcache::cooked_read): Likewise.
1605         (regcache::cooked_read_value): Likewise.
1606         (regcache::cooked_write): Likewise.
1607         (regcache::dump): Likewise.
1608         (regcache::num_raw_registers): New method.
1609         * regcache.h (class regcache) <num_raw_registers>: New.
1610
1611 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1612
1613         * regcache.c (regcache::assert_regnum): New method.
1614         (regcache::invalidate): Call assert_regnum.
1615         (regcache::raw_update): Likewise.
1616         (regcache::raw_write): Likewise.
1617         (regcache::raw_read_part): Likewise.
1618         (regcache::raw_write_part): Likewise.
1619         (regcache::raw_supply): Likewise.
1620         (regcache::raw_supply_integer): Likewise.
1621         (regcache::raw_supply_zeroed): Likewise.
1622         (regcache::raw_collect): Likewise.
1623         (regcache::raw_collect_integer): Likewise.
1624         * regcache.h (regcache::assert_regnum): Declare.
1625
1626 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1627
1628         * regcache.c (regcache::dump): Remove code.
1629
1630 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1631
1632         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1633         Remove.
1634         <sizeof_cooked_register_status>: Remove.
1635         (init_regcache_descr): Update.
1636         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1637         (regcache::save): Likewise.
1638         (regcache::dump): Likewise.
1639
1640 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1641
1642         * ft32-tdep.c (ft32_fetch_instruction): New function.
1643         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1644
1645 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1646
1647         * cli/cli-script.c (execute_control_command): Rename to ...
1648         (execute_control_command_1): ... this.
1649         (execute_control_command): New function.
1650
1651 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1652
1653         * tracepoint.c (tfind_command): Remove const_cast.
1654
1655 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1656
1657         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1658
1659 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * common/common-utils.h (in_inclusive_range): New function.
1662         * arm-tdep.c (arm_record_extension_space): Use
1663         in_inclusive_range.
1664         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1665         * cris-tdep.c (cris_spec_reg_applicable): Use
1666         in_inclusive_range.
1667
1668 2017-10-30  Pedro Alves  <palves@redhat.com>
1669             Simon Marchi <simon.marchi@ericsson.com>
1670
1671         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1672         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1673
1674 2017-10-30  Pedro Alves  <palves@redhat.com>
1675
1676         * common/common-utils.c (string_appendf, string_vappendf): New
1677         functions.
1678         * common/common-utils.h (string_appendf, string_vappendf): New
1679         declarations.
1680         * unittests/common-utils-selftests.c (string_appendf_func)
1681         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1682         (string_vappendf_tests): New functions.
1683         (_initialize_common_utils_selftests): Register "string_appendf" and
1684         "string_vappendf tests".
1685
1686 2017-10-30  Pedro Alves  <palves@redhat.com>
1687
1688         * unittests/common-utils-selftests.c (format_func): New typedef.
1689         (string_printf_tests, string_vprintf_tests): Tests factored out
1690         and merged to ...
1691         (test_format_func): ... this new function.
1692         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1693         test_format_func.
1694
1695 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1696
1697         * darwin-nat.c: Remove include of gdb.h.
1698
1699 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1700
1701         * xtensa-xtregs.c: Fix formatting issues.
1702
1703 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1704
1705         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1706
1707 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1708
1709         PR python/21213
1710         * python/py-infthread.c (thpy_get_inferior): Increment reference
1711         of inferior before returning it.
1712
1713 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1714
1715         * unittests/common-utils-selftests.c (format): Add
1716         ATTRIBUTE_PRINTF.
1717
1718 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1719
1720         * xml-syscall.c (struct syscall_desc): Add constructor.
1721         <name>: Change type to std::string.
1722         (syscall_desc_up): New typedef.
1723         (syscall_desc_p): Remove typeder.
1724         (DEF_VEC_P(syscall_desc_p)): Remove.
1725         (struct syscall_group_desc): Add constructor.
1726         <name>: Change type to std::string.
1727         <syscalls>: Change type to std::vector.
1728         (syscall_group_desc_up): New typedef.
1729         (syscall_group_desc_p): Remove typedef.
1730         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1731         (struct syscalls_info) <syscalls>: Change type to std::vector of
1732         unique_ptr.
1733         <groups>: Likewise.
1734         <my_gdb_datadir>: Change type to std::string.
1735         (syscalls_info_up): New typedef.
1736         (allocate_syscalls_info): Remove.
1737         (syscalls_info_free_syscalls_desc): Remove.
1738         (syscalls_info_free_syscall_group_desc): Remove.
1739         (free_syscalls_info): Remove.
1740         (make_cleanup_free_syscalls_info): Remove.
1741         (syscall_group_create_syscall_group_desc): Adjust.
1742         (syscall_group_add_syscall): Adjust.
1743         (syscall_create_syscall_desc): Adjust.
1744         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1745         (init_syscalls_info): Adjust.
1746         (syscall_group_get_group_by_name): Adjust.
1747         (xml_get_syscall_number): Adjust.
1748         (xml_get_syscall_name): Adjust.
1749         (xml_list_of_syscalls): Adjust.
1750         (xml_list_syscalls_by_group): Adjust.
1751         (xml_list_of_groups): Adjust.
1752
1753 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1754
1755         * probe.h: Don't include gdb_vecs.h.
1756         (DEF_VEC_P (probe_p)): Remove.
1757         (find_probes_in_objfile): Return an std::vector.
1758         * probe.c (find_probes_in_objfile): Likewise.
1759         * breakpoint.c (breakpoint_objfile_data)
1760         <longjmp_probes>: Change type to std::vector.
1761         <exception_probes>: Likewise.
1762         (free_breakpoint_probes): Don't manually free vectors.
1763         (create_longjmp_master_breakpoint): Adjust.
1764         (create_exception_master_breakpoint): Adjust.
1765         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1766         parameter type, adjust.
1767         (svr4_create_solib_event_breakpoints): Adjust.
1768
1769 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1770
1771         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1772         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1773         with new.
1774         (free_breakpoint_probes): Rename to ...
1775         (free_breakpoint_objfile_data): ... this, and call delete on
1776         bp_objfile_data..
1777
1778 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1779
1780         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1781         (loaded_script_ptr): Remove typedef.
1782         (DEF_VEC_P (loaded_script_ptr)): Remove.
1783         (struct collect_matching_scripts_data): Add constructor.
1784         <scripts_p>: Change type to (pointer to) std::vector.
1785         (collect_matching_scripts_data): Adjust.
1786         (sort_scripts_by_name): Make suitable for std::sort.
1787         (print_scripts): Don't sort vector, adjust to std::vector.
1788         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1789
1790 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1791
1792         * symfile.c (filename_language): Make struct, not typedef.  Add
1793         constructor.
1794         <ext>: Change type to std::string.
1795         (DEF_VEC_O (filename_language)): Remove.
1796         (filename_language_table): Change type to std::vector.
1797         (add_filename_language): Adjust.
1798         (set_ext_lang_command): Adjust.
1799         (info_ext_lang_command): Adjust.
1800         (deduce_language_from_filename): Adjust.
1801         (class scoped_restore_filename_language_table): Remove.
1802         (test_filename_language): Use scoped_restore.
1803         (test_set_ext_lang_command): Use scoped_restore, adjust to
1804         std::vector change.
1805
1806 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1807
1808         * symfile.c: Include selftest.h.
1809         (class scoped_restore_filename_language_table): New.
1810         (test_filename_language): New test.
1811         (test_set_ext_lang_command): New test.
1812         (_initialize_symfile): Register tests.
1813
1814 2017-10-27  Keith Seitz  <keiths@redhat.com>
1815
1816         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1817         in the bp_location, falling back to find_pc_sect_function when
1818         needed.
1819         (add_location_to_breakpoint): Save sal->symbol.
1820         * breakpoint.h (struct bp_location) <symbol>: New field.
1821         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1822         * symtab.h (struct symtab_and_line) <symbol>: New field.
1823
1824 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1825
1826         PR gdb/13669
1827         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1828         to rewind obstack.
1829
1830 2017-10-26  Pedro Alves  <palves@redhat.com>
1831
1832         * remote.c (remote_async_terminal_ours_p): Delete.
1833         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1834         Remove references to 'remote_async_terminal_ours_p'.
1835
1836 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1837
1838         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1839
1840 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1841
1842         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1843         aspace const.
1844         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1845         Likewise.
1846         * breakpoint.c (bpstat_check_location): Remove cast.
1847         (breakpoint_hit_catch_fork): Make aspce const.
1848         (breakpoint_hit_catch_solib): Likewise.
1849         (breakpoint_hit_catch_exec): Likewise.
1850         (breakpoint_hit_ranged_breakpoint): Likewise.
1851         (breakpoint_hit_watchpoint): Likewise.
1852         (base_breakpoint_breakpoint_hit): Likewise.
1853         (bkpt_breakpoint_hit): Likewise.
1854         (dprintf_breakpoint_hit): Likewise.
1855         (tracepoint_breakpoint_hit): Likewise.
1856         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1857
1858 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1859
1860         * breakpoint.c (breakpoint_location_address_match): Change
1861         "struct address_space *" to "const address_space".
1862         (breakpoint_location_address_range_overlap): Likewise.
1863         (breakpoint_here_p): Likewise.
1864         (breakpoint_in_range_p): Likewise.
1865         (moribund_breakpoint_here_p): Likewise.
1866         (bp_location_inserted_here_p): Likewise.
1867         (software_breakpoint_inserted_here_p): Likewise.
1868         (hardware_breakpoint_inserted_here_p): Likewise.
1869         (hardware_watchpoint_inserted_in_range): Likewise.
1870         (bpstat_check_location): Likewise.
1871         (bpstat_stop_status): Likewise.
1872         (breakpoint_address_match): Likewise.
1873         (breakpoint_address_match_range): Likewise.
1874         (breakpoint_location_address_match): Likewise.
1875         (breakpoint_location_address_range_overlap): Likewise.
1876         (insert_single_step_breakpoint): Likewise.
1877         (breakpoint_has_location_inserted_here): Likewise.
1878         (single_step_breakpoint_inserted_here_p): Likewise.
1879         (pc_at_non_inline_function): Likewise.
1880         * breakpoint.h (bpstat_stop_status): Update declaration.
1881         (breakpoint_here_p): Likewise.
1882         (breakpoint_in_range_p): Likewise.
1883         (moribund_breakpoint_here_p): Likewise.
1884         (breakpoint_inserted_here_p): Likewise.
1885         (software_breakpoint_inserted_here_p): Likewise.
1886         (hardware_breakpoint_inserted_here_p): Likewise.
1887         (breakpoint_has_location_inserted_here): Likewise.
1888         (single_step_breakpoint_inserted_here_p): Likewise.
1889         (hardware_watchpoint_inserted_in_range): Likewise.
1890         (breakpoint_address_match): Likewise.
1891         (insert_single_step_breakpoint): Likewise.
1892         (pc_at_non_inline_function): Likewise.
1893         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1894         * record.c (record_check_stopped_by_breakpoint): Likewise.
1895         * record.h (record_check_stopped_by_breakpoint): Likewise.
1896         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1897
1898 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1899
1900         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1901         regcache->arch () instead get_regcache_arch.
1902         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1903         Likewise.
1904         (aarch64_fbsd_store_inferior_registers): Likewise.
1905         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1906         (store_gregs_to_thread): Likewise.
1907         (fetch_fpregs_from_thread): Likewise.
1908         (store_fpregs_to_thread): Likewise.
1909         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1910         (aarch64_store_return_value): Likewise.
1911         (aarch64_software_single_step): Likewise.
1912         * aix-thread.c (aix_thread_wait): Likewise.
1913         (supply_reg32): Likewise.
1914         (supply_sprs64): Likewise.
1915         (supply_sprs32): Likewise.
1916         (fill_gprs64): Likewise.
1917         (fill_gprs32): Likewise.
1918         (fill_sprs64): Likewise.
1919         (fill_sprs32): Likewise.
1920         (store_regs_user_thread): Likewise.
1921         (store_regs_kernel_thread): Likewise.
1922         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1923         (alphabsd_store_inferior_registers): Likewise.
1924         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1925         (alpha_store_return_value): Likewise.
1926         (alpha_deal_with_atomic_sequence): Likewise.
1927         (alpha_next_pc): Likewise.
1928         (alpha_software_single_step): Likewise.
1929         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1930         (amd64bsd_store_inferior_registers): Likewise.
1931         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1932         Likewise.
1933         (amd64_linux_store_inferior_registers): Likewise.
1934         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1935         (amd64_collect_native_gregset): Likewise.
1936         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1937         (amd64obsd_collect_uthread): Likewise.
1938         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1939         (amd64_collect_fpregset): Likewise.
1940         (amd64_supply_fxsave): Likewise.
1941         (amd64_supply_xsave): Likewise.
1942         (amd64_collect_fxsave): Likewise.
1943         (amd64_collect_xsave): Likewise.
1944         * arc-tdep.c (arc_write_pc): Likewise.
1945         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1946         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1947         (arm_fbsd_store_inferior_registers): Likewise.
1948         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1949         (store_vfp_regs): Likewise.
1950         (arm_linux_fetch_inferior_registers): Likewise.
1951         (arm_linux_store_inferior_registers): Likewise.
1952         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1953         (arm_linux_sigreturn_next_pc): Likewise.
1954         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1955         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1956         (fetch_register): Likewise.
1957         (store_register): Likewise.
1958         * arm-tdep.c (arm_is_thumb): Likewise.
1959         (displaced_in_arm_mode): Likewise.
1960         (bx_write_pc): Likewise.
1961         (arm_get_next_pcs_addr_bits_remove): Likewise.
1962         (arm_software_single_step): Likewise.
1963         (arm_extract_return_value): Likewise.
1964         (arm_store_return_value): Likewise.
1965         (arm_write_pc): Likewise.
1966         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1967         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1968         (bsd_uthread_store_registers): Likewise.
1969         * core-regset.c (fetch_core_registers): Likewise.
1970         * corelow.c (get_core_registers): Likewise.
1971         * cris-tdep.c (cris_store_return_value): Likewise.
1972         (cris_extract_return_value): Likewise.
1973         (find_step_target): Likewise.
1974         (find_step_target): Likewise.
1975         (cris_software_single_step): Likewise.
1976         * ctf.c (ctf_fetch_registers): Likewise.
1977         * darwin-nat.c (cancel_breakpoint): Likewise.
1978         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1979         * frv-tdep.c (frv_extract_return_value): Likewise.
1980         * ft32-tdep.c (ft32_store_return_value): Likewise.
1981         (ft32_extract_return_value): Likewise.
1982         * go32-nat.c (fetch_register): Likewise.
1983         (go32_fetch_registers): Likewise.
1984         (go32_store_registers): Likewise.
1985         (store_register): Likewise.
1986         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1987         (h8300_store_return_value): Likewise.
1988         * hppa-linux-nat.c (fetch_register): Likewise.
1989         (store_register): Likewise.
1990         (hppa_linux_fetch_inferior_registers): Likewise.
1991         (hppa_linux_store_inferior_registers): Likewise.
1992         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1993         (i386_darwin_store_inferior_registers): Likewise.
1994         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1995         (gnu_store_registers): Likewise.
1996         * i386-linux-nat.c (fetch_register): Likewise.
1997         (store_register): Likewise.
1998         (supply_gregset): Likewise.
1999         (fill_gregset): Likewise.
2000         (i386_linux_fetch_inferior_registers): Likewise.
2001         (i386_linux_store_inferior_registers): Likewise.
2002         (i386_linux_resume): Likewise.
2003         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2004         Likewise.
2005         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2006         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2007         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2008         (i386obsd_collect_uthread): Likewise.
2009         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2010         (i386_supply_gregset): Likewise.
2011         (i386_collect_gregset): Likewise.
2012         (i386_supply_fpregset): Likewise.
2013         (i386_collect_fpregset): Likewise.
2014         (i386_mpx_bd_base): Likewise.
2015         * i386-v4-nat.c (supply_fpregset): Likewise.
2016         (fill_fpregset): Likewise.
2017         * i387-tdep.c (i387_supply_fsave): Likewise.
2018         (i387_collect_fsave): Likewise.
2019         (i387_supply_fxsave): Likewise.
2020         (i387_collect_fxsave): Likewise.
2021         (i387_supply_xsave): Likewise.
2022         (i387_collect_xsave): Likewise.
2023         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2024         (ia64_linux_store_registers): Likewise.
2025         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2026         (ia64_extract_return_value): Likewise.
2027         (ia64_store_return_value): Likewise.
2028         (find_func_descr): Likewise.
2029         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2030         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2031         (inf_ptrace_store_registers): Likewise.
2032         * infrun.c (use_displaced_stepping): Likewise.
2033         (displaced_step_prepare_throw): Likewise.
2034         (resume): Likewise.
2035         (proceed): Likewise.
2036         (do_target_wait): Likewise.
2037         (adjust_pc_after_break): Likewise.
2038         (handle_inferior_event_1): Likewise.
2039         (handle_signal_stop): Likewise.
2040         (save_infcall_suspend_state): Likewise.
2041         (restore_infcall_suspend_state): Likewise.
2042         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2043         * jit.c (jit_frame_prev_register): Likewise.
2044         * linux-nat.c (save_stop_reason): Likewise.
2045         (linux_nat_wait_1): Likewise.
2046         (resume_stopped_resumed_lwps): Likewise.
2047         * linux-record.c (record_linux_sockaddr): Likewise.
2048         (record_linux_msghdr): Likewise.
2049         (record_linux_system_call): Likewise.
2050         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2051         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2052         (lm32_store_return_value): Likewise.
2053         * m32c-tdep.c (m32c_read_flg): Likewise.
2054         (m32c_pseudo_register_read): Likewise.
2055         (m32c_pseudo_register_write): Likewise.
2056         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2057         (m32r_linux_collect_gregset): Likewise.
2058         * m32r-tdep.c (m32r_store_return_value): Likewise.
2059         (m32r_extract_return_value): Likewise.
2060         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2061         (m68kbsd_collect_fpregset): Likewise.
2062         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2063         * m68k-linux-nat.c (fetch_register): Likewise.
2064         (old_fetch_inferior_registers): Likewise.
2065         (old_store_inferior_registers): Likewise.
2066         (store_regs): Likewise.
2067         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2068         (m68k_svr4_store_return_value): Likewise.
2069         * m88k-tdep.c (m88k_store_arguments): Likewise.
2070         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2071         (mi_cmd_data_write_register_values): Likewise.
2072         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2073         (mips_fbsd_store_inferior_registers): Likewise.
2074         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2075         (mips_fbsd_supply_gregs): Likewise.
2076         (mips_fbsd_collect_fpregs): Likewise.
2077         (mips_fbsd_collect_gregs): Likewise.
2078         (mips_fbsd_supply_fpregset): Likewise.
2079         (mips_fbsd_collect_fpregset): Likewise.
2080         (mips_fbsd_supply_gregset): Likewise.
2081         (mips_fbsd_collect_gregset): Likewise.
2082         * mips-linux-nat.c (supply_gregset): Likewise.
2083         (fill_gregset): Likewise.
2084         (supply_fpregset): Likewise.
2085         (fill_fpregset): Likewise.
2086         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2087         (mips_fill_gregset): Likewise.
2088         (mips_supply_fpregset): Likewise.
2089         (mips_fill_fpregset): Likewise.
2090         (mips64_supply_gregset): Likewise.
2091         (micromips_linux_sigframe_validate): Likewise.
2092         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2093         (mipsnbsd_fetch_inferior_registers): Likewise.
2094         (mipsnbsd_store_inferior_registers): Likewise.
2095         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2096         (mipsnbsd_supply_gregset): Likewise.
2097         (mipsnbsd_iterate_over_regset_sections): Likewise.
2098         (mipsnbsd_supply_reg): Likewise.
2099         (mipsnbsd_supply_fpreg): Likewise.
2100         * mips-tdep.c (mips_in_frame_stub): Likewise.
2101         (mips_dummy_id): Likewise.
2102         (is_octeon_bbit_op): Likewise.
2103         (micromips_bc1_pc): Likewise.
2104         (extended_mips16_next_pc): Likewise.
2105         (mips16_next_pc): Likewise.
2106         (deal_with_atomic_sequence): Likewise.
2107         * moxie-tdep.c (moxie_process_readu): Likewise.
2108         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2109         * nto-procfs.c (procfs_store_registers): Likewise.
2110         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2111         (ppcfbsd_store_inferior_registers): Likewise.
2112         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2113         (fetch_altivec_register): Likewise.
2114         (get_spe_registers): Likewise.
2115         (fetch_spe_register): Likewise.
2116         (fetch_altivec_registers): Likewise.
2117         (fetch_all_gp_regs): Likewise.
2118         (fetch_all_fp_regs): Likewise.
2119         (store_vsx_register): Likewise.
2120         (store_altivec_register): Likewise.
2121         (set_spe_registers): Likewise.
2122         (store_spe_register): Likewise.
2123         (store_altivec_registers): Likewise.
2124         (store_all_gp_regs): Likewise.
2125         (store_all_fp_regs): Likewise.
2126         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2127         (ppc_linux_collect_gregset): Likewise.
2128         (ppc_canonicalize_syscall): Likewise.
2129         (ppc_linux_record_signal): Likewise.
2130         (ppu2spu_prev_register): Likewise.
2131         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2132         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2133         (ppcobsd_store_registers): Likewise.
2134         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2135         Likewise.
2136         (ppc_ravenscar_generic_store_registers): Likewise.
2137         * procfs.c (procfs_fetch_registers): Likewise.
2138         (procfs_store_registers): Likewise.
2139         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2140         (ravenscar_store_registers): Likewise.
2141         (ravenscar_prepare_to_store): Likewise.
2142         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2143         * record-full.c (record_full_wait_1): Likewise.
2144         (record_full_registers_change): Likewise.
2145         (record_full_store_registers): Likewise.
2146         (record_full_core_fetch_registers): Likewise.
2147         (record_full_save): Likewise.
2148         (record_full_goto_insn): Likewise.
2149         * regcache.c (regcache_register_size): Likewise.
2150         (get_regcache_arch): Remove.
2151         (regcache_read_pc): Likewise.
2152         * regcache.h (get_regcache_arch): Remove.
2153         * remote-sim.c (gdbsim_fetch_register): Likewise.
2154         (gdbsim_store_register): Likewise.
2155         * remote.c (fetch_register_using_p): Likewise.
2156         (send_g_packet): Likewise.
2157         (remote_prepare_to_store): Likewise.
2158         (store_registers_using_G): Likewise.
2159         * reverse.c (save_bookmark_command): Likewise.
2160         (goto_bookmark_command): Likewise.
2161         * rs6000-aix-tdep.c (branch_dest): Likewise.
2162         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2163         (fetch_register): Likewise.
2164         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2165         (ppc_collect_reg): Likewise.
2166         (ppc_collect_gregset): Likewise.
2167         (ppc_collect_fpregset): Likewise.
2168         (ppc_collect_vsxregset): Likewise.
2169         (ppc_collect_vrregset): Likewise.
2170         (ppc_displaced_step_hw_singlestep): Likewise.
2171         (rs6000_pseudo_register_read): Likewise.
2172         (rs6000_pseudo_register_write): Likewise.
2173         * s390-linux-nat.c (supply_gregset): Likewise.
2174         (fill_gregset): Likewise.
2175         (s390_linux_fetch_inferior_registers): Likewise.
2176         * s390-linux-tdep.c (s390_write_pc): Likewise.
2177         (s390_software_single_step): Likewise.
2178         (s390_all_but_pc_registers_record): Likewise.
2179         (s390_linux_syscall_record): Likewise.
2180         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2181         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2182         (shnbsd_store_inferior_registers): Likewise.
2183         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2184         (sh_extract_return_value_fpu): Likewise.
2185         (sh_store_return_value_nofpu): Likewise.
2186         (sh_corefile_supply_regset): Likewise.
2187         (sh_corefile_collect_regset): Likewise.
2188         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2189         (sh64_store_return_value): Likewise.
2190         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2191         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2192         (sparc_store_inferior_registers): Likewise.
2193         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2194         (sparc_ravenscar_prepare_to_store): Likewise.
2195         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2196         (sparc_analyze_control_transfer): Likewise.
2197         (sparc_step_trap): Likewise.
2198         (sparc_software_single_step): Likewise.
2199         (sparc32_gdbarch_init): Likewise.
2200         (sparc_supply_rwindow): Likewise.
2201         (sparc_collect_rwindow): Likewise.
2202         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2203         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2204         (sparc64nbsd_collect_gregset): Likewise.
2205         (sparc64nbsd_supply_fpregset): Likewise.
2206         (sparc64nbsd_collect_fpregset): Likewise.
2207         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2208         (sparc64_supply_gregset): Likewise.
2209         (sparc64_collect_gregset): Likewise.
2210         (sparc64_supply_fpregset): Likewise.
2211         (sparc64_collect_fpregset): Likewise.
2212         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2213         * spu-tdep.c (spu_unwind_sp): Likewise.
2214         (spu2ppu_prev_register): Likewise.
2215         (spu_memory_remove_breakpoint): Likewise.
2216         * stack.c (return_command): Likewise.
2217         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2218         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2219         * tracefile.c (trace_save_ctf): Likewise.
2220         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2221         (do_windows_store_inferior_registers): Likewise.
2222         (windows_resume): Likewise.
2223         * xtensa-linux-nat.c (fill_gregset): Likewise.
2224         (supply_gregset_reg): Likewise.
2225         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2226         (xtensa_register_read_masked): Likewise.
2227         (xtensa_supply_gregset): Likewise.
2228         (xtensa_extract_return_value): Likewise.
2229         (xtensa_store_return_value): Likewise.
2230
2231 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2232
2233         * doublest.c (floatformat_from_string): New function.
2234         * doublest.h (floatformat_from_string): Add prototype.
2235
2236         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2237         (OP_FLOAT): ... this.
2238         * expression.h: Do not include "doublest.h".
2239         (union exp_element): Replace doubleconst and decfloatconst by
2240         new element floatconst.
2241         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2242         (ada_evaluate_subexp): Likewise.
2243         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2244         OP_DOUBLE and OP_DECFLOAT.
2245         * expprint.c (print_subexp_standard): Likewise.
2246         (dump_subexp_body_standard): Likewise.
2247         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2248
2249         * parse.c: Include "dfp.h".
2250         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2251         (write_exp_elt_floatcst): New function.
2252         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2253         and OP_DECFLOAT.
2254         (operator_check_standard): Likewise.
2255         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2256         Return target format buffer instead of host DOUBLEST.
2257         Use floatformat_from_string and decimal_from_string to parse
2258         either binary or decimal floating-point types.
2259         (parse_c_float): Remove.
2260         * parser-defs.h: Do not include "doublest.h".
2261         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2262         (write_exp_elt_floatcst): Add prototype.
2263         (parse_float): Update prototype.
2264         (parse_c_float): Remove.
2265
2266         * c-exp.y: Do not include "dfp.h".
2267         (typed_val_float): Use byte buffer instead of DOUBLEST.
2268         (typed_val_decfloat): Remove.
2269         (DECFLOAT): Remove.
2270         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2271         (parse_number): Update to new parse_float interface.
2272         Parse suffixes and determine type before calling parse_float.
2273         Handle decimal and binary FP types the same way.
2274
2275         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2276         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2277         (parse_number): Update to new parse_float interface.
2278         Parse suffixes and determine type before calling parse_float.
2279
2280         * f-exp.y: Replace dval by typed_val_float.
2281         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2282         (parse_number): Use parse_float instead of atof.
2283
2284         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2285         (parse_go_float): Remove.
2286         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2287         (parse_number): Call parse_float instead of parse_go_float.
2288         Parse suffixes and determine type before calling parse_float.
2289
2290         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2291         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2292         (parse_number): Update to new parse_float interface.
2293         Parse suffixes and determine type before calling parse_float.
2294
2295         * m2-exp.y: Replace dval by byte buffer val.
2296         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2297         (parse_number): Call parse_float instead of atof.
2298
2299         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2300         (lex_number): Call parse_float instead of strtod.
2301         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2302         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2303         Use write_exp_elt_floatcst.
2304         (unit_testing): Remove static variable.
2305         (rust_type): Do not check unit_testing.
2306         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2307
2308         * ada-exp.y (type_float, type_double): Remove.
2309         (typed_val_float): Use byte buffer instead of DOUBLEST.
2310         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2311         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2312
2313 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2314
2315         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2316         * arch/aarch64.h: New file.
2317
2318 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2319
2320         * dfp.h (decimal_from_string): Use const reference for argument.
2321         * dfp.c (decimal_from_string): Likewise.
2322
2323 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2324
2325         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2326         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2327         * mips-tdep.c (mips_print_fp_register): Likewise.
2328
2329 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2330
2331         * common/format.h (enum argclass): Replace decfloat_arg by
2332         dec32float_arg, dec64float_arg, and dec128float_arg.
2333         * common/format.c (parse_format_string): Update to return
2334         new decimal float argument classes.
2335
2336         * printcmd.c (printf_decfloat): Rename to ...
2337         (printf_floating): ... this.  Add argclass argument, and use it
2338         instead of parsing the format string again.  Add support for
2339         binary floating-point values, using floatformat_to_string.
2340         Convert value to the target format if it doesn't already match.
2341         (ui_printf): Call printf_floating instead of printf_decfloat,
2342         also for double_arg / long_double_arg.  Pass argclass.
2343
2344         * dfp.c (decimal_to_string): Add format string argument.
2345         * dfp.h (decimal_to_string): Likewise.
2346
2347         * doublest.c (floatformat_to_string): Add format string argument.
2348         * doublest.h (floatformat_to_string): Likewise.
2349
2350 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2351
2352         * doublest.c (floatformat_precision): New routine.
2353         (floatformat_to_string): Likewise.
2354         * doublest.c (floatformat_to_string): Add prototype.
2355
2356         * printcmd.c (print_scalar_formatted): Only call print_floating
2357         on floating-point types.
2358         * valprint.c: Do not include "floatformat.h".
2359         (generic_val_print_decfloat): Remove.
2360         (generic_val_print): Call generic_val_print_float for both
2361         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2362         (print_floating): Use floatformat_to_string.  Handle decimal float.
2363         (print_decimal_floating): Remove, merge into floatformat_to_string.
2364         * value.h (print_decimal_floating): Remove.
2365
2366         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2367
2368 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2369
2370         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2371
2372 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2373
2374         * memattr.h: Don't include vec.h.
2375         (struct mem_attrib): Initialize fields.
2376         <unknown>: New static method.
2377         (struct mem_region): Add constructors, operator<, initialize
2378         fields.
2379         * memattr.c: Include algorithm.
2380         (default_mem_attrib, unknown_mem_attrib): Remove.
2381         (user_mem_region_list): New global.
2382         (target_mem_region_list, mem_region_list): Change type to
2383         std::vector<mem_region>.
2384         (mem_use_target): Now a function.
2385         (target_mem_regions_valid): Change type to bool.
2386         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2387         (require_user_regions): Adjust.
2388         (require_target_regions): Adjust.
2389         (create_mem_region): Adjust.
2390         (lookup_mem_region): Adjust.
2391         (invalidate_target_mem_regions): Adjust.
2392         (mem_clear): Rename to...
2393         (user_mem_clear): ... this, and adjust.
2394         (mem_command): Adjust.
2395         (info_mem_command): Adjust.
2396         (mem_enable, enable_mem_command, mem_disable,
2397         disable_mem_command): Adjust.
2398         (mem_delete): Adjust.
2399         (delete_mem_command): Adjust.
2400         * memory-map.h (parse_memory_map): Return an std::vector.
2401         * memory-map.c (parse_memory_map): Likewise.
2402         (struct memory_map_parsing_data): Add constructor.
2403         <memory_map>: Point to std::vector.
2404         (memory_map_start_memory): Adjust.
2405         (memory_map_end_memory): Adjust.
2406         (memory_map_end_property): Adjust.
2407         (clear_result): Remove.
2408         * remote.c (remote_memory_map): Return an std::vector.
2409         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2410         Remove.
2411         (target_debug_print_mem_region_vector): New.
2412         * target-delegates.c: Regenerate.
2413         * target.h (mem_region_vector): New typedef.
2414         (to_memory_map): Return mem_region_vector.
2415         (target_memory_map): Return an std::vector.
2416         * target.c (target_memory_map): Return an std::vector.
2417         (flash_erase_command): Adjust.
2418
2419 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2420
2421         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2422         Change type to std::string.
2423         (memory_map_start_property): Adjust.
2424         (memory_map_end_property): Adjust.
2425
2426 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2427
2428         * infrun.h: Include common/byte-vector.h.
2429         (struct displaced_step_closure): New struct.
2430         (struct buf_displaced_step_closure): New struct.
2431         * infrun.c (displaced_step_closure::~displaced_step_closure):
2432         Provide default implementation.
2433         (displaced_step_clear): Deallocate step closure with delete.
2434         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2435         (aarch64_displaced_step_closure): ... this, extend
2436         displaced_step_closure.
2437         (aarch64_displaced_step_data) <dsc>: Change type to
2438         aarch64_displaced_step_closure.
2439         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2440         unique_ptr.
2441         (aarch64_displaced_step_fixup): Add cast for displaced step
2442         closure.
2443         * amd64-tdep.c (displaced_step_closure): Rename to ...
2444         (amd64_displaced_step_closure): ... this, extend
2445         displaced_step_closure.
2446         <insn_buf>: Change type to std::vector<gdb_byte>.
2447         <max_len>: Remove.
2448         (fixup_riprel): Change type of DSC parameter, adjust to type
2449         change of insn_buf.
2450         (fixup_displaced_copy): Change type of DSC parameter.
2451         (amd64_displaced_step_copy_insn): Instantiate
2452         amd64_displaced_step_closure.
2453         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2454         to type change of insn_buf.
2455         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2456         parameter DSC.
2457         (arm_linux_copy_svc): Likewise.
2458         (cleanup_kernel_helper_return): Likewise.
2459         (arm_catch_kernel_helper_return): Likewise.
2460         (arm_linux_displaced_step_copy_insn): Instantiate
2461         arm_displaced_step_closure.
2462         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2463         (displaced_read_reg): Change type of parameter DSC.
2464         (branch_write_pc): Likewise.
2465         (load_write_pc): Likewise.
2466         (alu_write_pc): Likewise.
2467         (displaced_write_reg): Likewise.
2468         (arm_copy_unmodified): Likewise.
2469         (thumb_copy_unmodified_32bit): Likewise.
2470         (thumb_copy_unmodified_16bit): Likewise.
2471         (cleanup_preload): Likewise.
2472         (install_preload): Likewise.
2473         (arm_copy_preload): Likewise.
2474         (thumb2_copy_preload): Likewise.
2475         (install_preload_reg): Likewise.
2476         (arm_copy_preload_reg): Likewise.
2477         (cleanup_copro_load_store): Likewise.
2478         (install_copro_load_store): Likewise.
2479         (arm_copy_copro_load_store) Likewise.
2480         (thumb2_copy_copro_load_store): Likewise.
2481         (cleanup_branch): Likewise.
2482         (install_b_bl_blx): Likewise.
2483         (arm_copy_b_bl_blx): Likewise.
2484         (thumb2_copy_b_bl_blx): Likewise.
2485         (thumb_copy_b): Likewise.
2486         (install_bx_blx_reg): Likewise.
2487         (arm_copy_bx_blx_reg): Likewise.
2488         (thumb_copy_bx_blx_reg): Likewise.
2489         (cleanup_alu_imm): Likewise.
2490         (arm_copy_alu_imm): Likewise.
2491         (thumb2_copy_alu_imm): Likewise.
2492         (cleanup_alu_reg): Likewise.
2493         (install_alu_reg): Likewise.
2494         (arm_copy_alu_reg): Likewise.
2495         (thumb_copy_alu_reg): Likewise.
2496         (cleanup_alu_shifted_reg): Likewise.
2497         (install_alu_shifted_reg): Likewise.
2498         (arm_copy_alu_shifted_reg): Likewise.
2499         (cleanup_load): Likewise.
2500         (cleanup_store): Likewise.
2501         (arm_copy_extra_ld_st): Likewise.
2502         (install_load_store): Likewise.
2503         (thumb2_copy_load_literal): Likewise.
2504         (thumb2_copy_load_reg_imm): Likewise.
2505         (arm_copy_ldr_str_ldrb_strb): Likewise.
2506         (cleanup_block_load_all): Likewise.
2507         (cleanup_block_store_pc): Likewise.
2508         (cleanup_block_load_pc): Likewise.
2509         (arm_copy_block_xfer): Likewise.
2510         (thumb2_copy_block_xfer): Likewise.
2511         (cleanup_svc): Likewise.
2512         (install_svc): Likewise.
2513         (arm_copy_svc): Likewise.
2514         (thumb_copy_svc): Likewise.
2515         (arm_copy_undef): Likewise.
2516         (thumb_32bit_copy_undef): Likewise.
2517         (arm_copy_unpred): Likewise.
2518         (arm_decode_misc_memhint_neon): Likewise.
2519         (arm_decode_unconditional): Likewise.
2520         (arm_decode_miscellaneous): Likewise.
2521         (arm_decode_dp_misc): Likewise.
2522         (arm_decode_ld_st_word_ubyte): Likewise.
2523         (arm_decode_media): Likewise.
2524         (arm_decode_b_bl_ldmstm): Likewise.
2525         (arm_decode_ext_reg_ld_st): Likewise.
2526         (thumb2_decode_dp_shift_reg): Likewise.
2527         (thumb2_decode_ext_reg_ld_st): Likewise.
2528         (arm_decode_svc_copro): Likewise.
2529         (thumb2_decode_svc_copro): Likewise.
2530         (install_pc_relative): Likewise.
2531         (thumb_copy_pc_relative_16bit): Likewise.
2532         (thumb_decode_pc_relative_16bit): Likewise.
2533         (thumb_copy_pc_relative_32bit): Likewise.
2534         (thumb_copy_16bit_ldr_literal): Likewise.
2535         (thumb_copy_cbnz_cbz): Likewise.
2536         (thumb2_copy_table_branch): Likewise.
2537         (cleanup_pop_pc_16bit_all): Likewise.
2538         (thumb_copy_pop_pc_16bit): Likewise.
2539         (thumb_process_displaced_16bit_insn): Likewise.
2540         (decode_thumb_32bit_ld_mem_hints): Likewise.
2541         (thumb_process_displaced_32bit_insn): Likewise.
2542         (thumb_process_displaced_insn): Likewise.
2543         (arm_process_displaced_insn): Likewise.
2544         (arm_displaced_init_closure): Likewise.
2545         (arm_displaced_step_fixup): Add cast for closure.
2546         * arm-tdep.h: Include infrun.h.
2547         (displaced_step_closure): Rename to ...
2548         (arm_displaced_step_closure): ... this, extend
2549         displaced_step_closure.
2550         <u::svc::copy_svc_os>: Change type of parameter DSC.
2551         <cleanup>: Likewise.
2552         (arm_process_displaced_insn): Likewise.
2553         (arm_displaced_init_closure): Likewise.
2554         (displaced_read_reg): Likewise.
2555         (displaced_write_reg): Likewise.
2556         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2557         Adjust.
2558         * i386-tdep.h: Include infrun.h.
2559         (i386_displaced_step_closure): New typedef.
2560         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2561         i386_displaced_step_closure.
2562         (i386_displaced_step_fixup): Adjust.
2563         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2564         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2565         and unique_ptr.
2566         (ppc_displaced_step_fixup): Adjust.
2567         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2568         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2569         and unique_ptr.
2570         (s390_displaced_step_fixup): Adjust.
2571
2572 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2573
2574         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2575         Remove declarations.
2576
2577 2017-10-20  Tom Tromey  <tom@tromey.com>
2578
2579         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2580         std::vector.
2581         (gdb_bfd_record_inclusion): Update.
2582         (bfdp): Remove typedef.
2583
2584 2017-10-20  Tom Tromey  <tom@tromey.com>
2585
2586         * gdb_bfd.c (gdb_bfd_ref): Use new.
2587         (struct gdb_bfd_data): Add constructor, destructor, and member
2588         initializers.
2589         (gdb_bfd_unref): Use delete.
2590
2591 2017-10-20  Tom Tromey  <tom@tromey.com>
2592
2593         * exec.c (exec_file_attach): Use new_bfd_ref.
2594         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2595         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2596         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2597         new_bfd_ref.
2598         * gdb_bfd.h (new_bfd_ref): New function.
2599
2600 2017-10-20  Pedro Alves  <palves@redhat.com>
2601
2602         * main.c (captured_command_loop): Add attribute noinline.
2603
2604 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2605
2606         * interps.c (struct interp_factory): Add constructor.
2607         (interp_factory_p): Remove typedef.
2608         (DEF_VEC_P(interp_factory_p)): Remove.
2609         (interpreter_factories): Change type to std::vector.
2610         (interp_factory_register): Adjust.
2611         (interp_lookup): Adjust.
2612         (interpreter_completer): Adjust.
2613
2614 2017-10-19  Tom Tromey  <tom@tromey.com>
2615
2616         * break-catch-syscall.c (catch_syscall_completer): Use
2617         std::string, gdb::unique_xmalloc_ptr.
2618
2619 2017-10-19  Tom Tromey  <tom@tromey.com>
2620
2621         * infcall.c (call_function_by_hand_dummy): Use std::string.
2622
2623 2017-10-19  Tom Tromey  <tom@tromey.com>
2624
2625         * mi/mi-main.c (mi_cmd_execute): Update.
2626         * top.h (prepare_execute_command): Return scoped_value_mark.
2627         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2628         Add move constructor.
2629         * top.c (prepare_execute_command): Return scoped_value_mark.
2630         (execute_command): Update.
2631
2632 2017-10-19  Pedro Alves  <palves@redhat.com>
2633
2634         * xml-support.c (xml_fetch_content_from_file): Check fread's
2635         return.
2636
2637 2017-10-19  Pedro Alves  <palves@redhat.com>
2638
2639         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2640         async.
2641         (handle_error_fd): New function.
2642         (ser_base_async): Add/delete an event loop file handler for
2643         error_fd.
2644
2645 2017-10-19  Pedro Alves  <palves@redhat.com>
2646
2647         * xml-support.c (xml_fetch_content_from_file): Don't read in
2648         chunks.  Instead use fseek to determine the file's size, and read
2649         it in one go.
2650
2651 2017-11-18  Keith Seitz  <keiths@redhat.com>
2652
2653         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2654         types.
2655         Add whitespace to front of type name.
2656
2657 2017-10-18  Keith Seitz  <keiths@redhat.com>
2658
2659         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2660         DW_AT_accessibility.
2661
2662 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2663
2664         * features/tic6x-c62x-linux.c: Remove.
2665
2666 2017-10-17  Tom Tromey  <tom@tromey.com>
2667
2668         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2669         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2670         (do_mixed_source_and_assembly): Likewise.
2671
2672 2017-10-17  Tom Tromey  <tom@tromey.com>
2673
2674         * regcache.c (regcache::xfer_part): Remove assertion.
2675
2676 2017-10-17  Pedro Alves  <palves@redhat.com>
2677
2678         * xml-support.c (xml_fetch_content_from_file): Call
2679         unique_ptr::release() instead unique_ptr::get() when passing
2680         through xrealloc.
2681
2682 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2683
2684         * regcache.c (regcache::xfer_part): Remove parameters read and
2685         write, add parameter is_raw.  All callers are updated.
2686
2687 2017-10-16  Keith Seitz  <keiths@redhat.com>
2688
2689         * c-typeprint.c (enum access_specifier): Moved here from
2690         c_type_print_base.
2691         (output_access_specifier): New function.
2692         (c_type_print_base): Consider typedefs when assessing
2693         whether access labels are needed.
2694         Use output_access_specifier as needed.
2695         Output access specifier for typedefs, if needed.
2696         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2697         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2698         fields.
2699         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2700         accessor macros.
2701
2702 2017-10-16  Tom Tromey  <tom@tromey.com>
2703
2704         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2705         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2706         * target.c (target_fileio_read_stralloc): Update.
2707         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2708         * target.h (target_fileio_read_stralloc): Return
2709         unique_xmalloc_ptr.
2710
2711 2017-10-16  Tom Tromey  <tom@tromey.com>
2712
2713         * xml-syscall.c (xml_init_syscalls_info): Update.
2714         * xml-support.c (xinclude_start_include): Update.
2715         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2716         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2717         (xml_fetch_content_from_file): Likewise.
2718         * osdata.c (get_osdata): Update.
2719         * target.h (target_read_stralloc, target_get_osdata): Return
2720         unique_xmalloc_ptr.
2721         * solib-aix.c (solib_aix_get_library_list): Update.
2722         * solib-target.c (solib_target_current_sos): Update.
2723         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2724         * xml-tdesc.c (fetch_available_features_from_target): Update.
2725         (target_fetch_description_xml): Update.
2726         (file_read_description_xml): Update.
2727         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2728         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2729         (remote_pid_to_exec_file): Update.
2730         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2731         (target_get_osdata): Likewise.
2732
2733 2017-10-16  Tom Tromey  <tom@tromey.com>
2734
2735         * remote.c (remote_register_number_and_offset): Use std::vector.
2736         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2737         (putpkt_binary): Use gdb::def_vector.
2738         (compare_sections_command): Use gdb::byte_vector.
2739
2740 2017-10-16  Tom Tromey  <tom@tromey.com>
2741
2742         * ppc-linux-nat.c (hwdebug_insert_point): Use
2743         gdb::unique_xmalloc_ptr, XDUP.
2744
2745 2017-10-16  Tom Tromey  <tom@tromey.com>
2746
2747         * probe.c (parse_probes): Use std::string.
2748         (info_probes_for_ops, enable_probes_command)
2749         (disable_probes_command): Remove cleanups.
2750
2751 2017-10-16  Tom Tromey  <tom@tromey.com>
2752
2753         * buildsym.c (block_compar): Remove.
2754         (end_symtab_get_static_block): Use std::vector.
2755
2756 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2757
2758         * memrange.h (struct mem_range): Define operator< and operator==.
2759         (mem_range_s): Remove.
2760         (DEF_VEC_O (mem_range_s)): Remove.
2761         (normalize_mem_ranges): Change parameter type to std::vector.
2762         * memrange.c (compare_mem_ranges): Remove.
2763         (normalize_mem_ranges): Change parameter type to std::vector,
2764         adjust to vector change.
2765         * exec.c (section_table_available_memory): Return vector, remove
2766         parameter.
2767         (section_table_read_available_memory): Adjust to std::vector
2768         change.
2769         * remote.c (remote_read_bytes): Adjust to std::vector
2770         change.
2771         * tracepoint.h (traceframe_available_memory): Change parameter
2772         type to std::vector.
2773         * tracepoint.c (traceframe_available_memory): Change parameter
2774         type to std::vector, adjust.
2775         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2776         std::vector change.
2777         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2778         unittests/memrange-selftests.c.
2779         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2780         * gdb/unittests/memrange-selftests.c: New file.
2781
2782 2017-10-16  Pedro Alves  <palves@redhat.com>
2783
2784         * elfread.c (probe_key_free): Rename range-for variable.
2785         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2786         (find_probe_by_pc, collect_probes): Rename range-for variable.
2787
2788 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2789
2790         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2791         * features/tic6x-c62x.c: Remove.
2792         * features/tic6x-c64x-linux.c: Remove.
2793         * features/tic6x-c64x.c: Remove.
2794         * features/tic6x-c64xp-linux.c: Remove.
2795         * features/tic6x-c64xp.c: Remove.
2796         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2797         initialize_tdesc_tic6x_*_linux functions.
2798         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2799         initialize_tdesc_tic6x_* functions.
2800
2801 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2802
2803         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2804         tic6x-c62x.
2805         * regformats/tic6x-c62x.dat: Remove.
2806         * regformats/tic6x-c64x.dat: Remove.
2807         * regformats/tic6x-c64xp.dat: Remove.
2808
2809 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2810
2811         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2812         (the !HAVE_LIBEXPAT version).
2813
2814 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2815
2816         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2817         const.
2818
2819 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2820
2821         * target.h: Include tracepoint.h.
2822         (enum trace_find_type): Move to tracepoint.h.
2823         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2824         * tracepoint.h: Don't include target.h
2825         (enum trace_find_type): Move from target.h.
2826         (parse_traceframe_info): Return a unique ptr.
2827         * tracepoint.c (current_traceframe_info): Change type to unique
2828         ptr.
2829         (free_traceframe_info): Remove.
2830         (clear_traceframe_info): Don't manually free
2831         current_traceframe_info.
2832         (free_result): Remove.
2833         (parse_traceframe_info): Return a unique ptr.
2834         (get_traceframe_info): Adjust to unique ptr.
2835         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2836         * remote.c (remote_traceframe_info): Return a unique ptr.
2837         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2838         ptr.
2839         * target-debug.h (target_debug_print_traceframe_info_up): New
2840         macro.
2841         * target-delegates.c: Regenerate.
2842
2843 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2844
2845         * memrange.h (struct mem_range): Add constructors.
2846         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2847         std::vector<mem_range>.
2848         * tracepoint.c (free_traceframe_info): Don't manually free
2849         vector.
2850         (traceframe_info_start_memory): Adjust to vector change.
2851         (traceframe_available_memory): Likewise.
2852         * tracefile-tfile.c (build_traceframe_info): Likewise.
2853         * ctf.c (ctf_traceframe_info): Likewise.
2854
2855 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2856
2857         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2858         std::vector<int>.
2859         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2860         (traceframe_info_start_tvar): Adjust to vector change.
2861         (parse_traceframe_info): Allocate with new.
2862         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2863         vector change.
2864         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2865         change.
2866         tfile_traceframe_info): Allocate with new.
2867         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2868         change.
2869
2870 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2871
2872         * tracepoint.c (traceframe_info): Rename to...
2873         (current_traceframe_info): ...this.
2874         (clear_traceframe_info): Adjust.
2875         (get_traceframe_info): Adjust.
2876
2877 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2878
2879         * nat/linux-osdata.c: Include algorithm.
2880         (compare_processes): Remove.
2881         (struct pid_pgid_entry): New struct.
2882         (linux_xfer_osdata_processgroups): Use std::vector instead of
2883         XNEWVEC.
2884
2885 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2886
2887         * objfiles.h: Don't include symfile.h.
2888         (struct partial_symbol): Remove forward-declaration.
2889         (struct objfile) <global_psymbols, static_psymbols>: Change type
2890         to std::vector<partial_symbol *>.
2891         * objfiles.c (objfile::objfile): Don't memset those fields.
2892         (objfile::~objfile): Don't free those fields.
2893         * psympriv.h (struct psymbol_allocation_list): Remove
2894         forward-declaration.
2895         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2896         to std::vector.
2897         (start_psymtab_common): Change parameters to std::vector.
2898         * psymtab.c: Include algorithm.
2899         (require_partial_symbols): Call shrink_to_fit.
2900         (find_pc_sect_psymbol): Adjust to vector change.
2901         (match_partial_symbol): Likewise.
2902         (lookup_partial_symbol): Likewise.
2903         (psym_relocate): Likewise.
2904         (dump_psymtab): Likewise.
2905         (recursively_search_psymtabs): Likewise.
2906         (compare_psymbols): Remove.
2907         (sort_pst_symbols): Adjust to vector change.
2908         (start_psymtab_common): Likewise.
2909         (end_psymtab_common): Likewise.
2910         (psymbol_bcache_full): De-constify return value.
2911         (add_psymbol_to_bcache): Likewise.
2912         (extend_psymbol_list): Remove.
2913         (append_psymbol_to_list): Adjust to vector change.
2914         (add_psymbol_to_list): Likewise.
2915         (init_psymbol_list): Likewise.
2916         (maintenance_info_psymtabs): Likewise.
2917         (maintenance_check_psymtabs): Likewise.
2918         * symfile.h (struct psymbol_allocation_list): Remove.
2919         * symfile.c (reread_symbols): Adjust to vector change.
2920         * dbxread.c (start_psymtab): Change type of parameters.
2921         (dbx_symfile_read): Adjust to vector change.
2922         (read_dbx_symtab): Likewise.
2923         (start_psymtab): Change type of parameters.
2924         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2925         (create_partial_symtab): Likewise.
2926         (add_partial_symbol): Likewise.
2927         (write_one_signatured_type): Likewise.
2928         (recursively_write_psymbols): Likewise.
2929         * mdebugread.c (parse_partial_symbols): Likewise.
2930         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2931         (scan_xcoff_symtab): Adjust to vector change.
2932         (xcoff_initial_scan): Likewise.
2933
2934 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2935
2936         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2937
2938 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2939
2940         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2941         Remove s390x-*-expedite, add s390x-expedite.
2942
2943 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2944
2945         * features/s390-gs-linux64.c: Regenerated.
2946         * features/s390x-gs-linux64.c: Regenerated.
2947
2948 2017-10-13  Tom Tromey  <tom@tromey.com>
2949
2950         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2951         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2952         delete.
2953         * symfile.c (symbol_file_add_with_addrs): Use new.
2954         (symbol_file_add_separate): Update comment.
2955         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2956         * jit.c (jit_object_close_impl): Use new.
2957         (jit_unregister_code): Use delete.
2958         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2959         (~objfile): Rename from free_objfile.
2960         (free_objfile_separate_debug, do_free_objfile_cleanup)
2961         (free_all_objfiles, objfile_purge_solibs): Use delete.
2962         * objfiles.h (struct objfile): Add constructor and destructor.
2963         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2964         (allocate_objfile, free_objfile): Don't declare.
2965         (struct objstats): Add initializers.
2966
2967 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2968
2969         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2970         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2971         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2972         * gdbarch.h: Regenerate.
2973         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2974         Adjust comment.
2975         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2976         (i386_displaced_step_fixup): Adjust comment.
2977         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2978
2979 2017-10-12  Tom Tromey  <tom@tromey.com>
2980
2981         * prologue-value.h (pv_area::store_would_trash): Return bool.
2982         (pv_area::find_reg): Likewise.
2983         * prologue-value.c (pv_area::store_would_trash): Return bool.
2984         (pv_area::find_reg): Likewise.
2985
2986 2017-10-12  Tom Tromey  <tom@tromey.com>
2987
2988         * s390-linux-tdep.c (s390_store, s390_load)
2989         (s390_check_for_saved, s390_analyze_prologue): Update.
2990         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2991         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2992         * prologue-value.h (class pv_area): Move from prologue-value.c.
2993         Change names of members.  Add constructor, destructor, member
2994         functions.
2995         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2996         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2997         (pv_area_fetch, pv_area_scan): Don't declare.
2998         * prologue-value.c (struct pv_area::area_entry): Now member of
2999         pv_area.
3000         (struct pv_area): Move to prologue-value.h.
3001         (pv_area::pv_area): Rename from make_pv_area.
3002         (pv_area::~pv_area): Rename from free_pv_area.
3003         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3004         (clear_entries, find_entry, overlaps, store_would_trash, store)
3005         (fetch, find_reg, scan): Now member of pv_area.
3006         Remove "area" argument.  Update.
3007         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3008         Update.
3009         * mn10300-tdep.c (push_reg, check_for_saved)
3010         (mn10300_analyze_prologue): Update.
3011         * mep-tdep.c (is_arg_spill, check_for_saved)
3012         (mep_analyze_prologue): Update.
3013         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3014         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3015         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3016         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3017         Update.
3018         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3019         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3020
3021 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3022
3023         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3024         * linux-nat.c (linux_nat_delete_thread): New variable.
3025         (lwp_free): Invoke linux_nat_delete_thread if set.
3026         (linux_nat_set_delete_thread): New function.
3027         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3028         thread delete callback.
3029         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3030         (_initialize_arm_linux_nat): Assign thread delete callback.
3031         * s390-linux-nat.c (s390_delete_thread): New function.
3032         (_initialize_s390_nat): Assign thread delete callback.
3033         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3034         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3035         function.
3036         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3037         declaration.
3038         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3039         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3040
3041 2017-10-09  Tom Tromey  <tom@tromey.com>
3042
3043         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3044         std::string.
3045         * tui/tui-layout.c (enum tui_status): Use std::string.
3046
3047 2017-10-11  Tom Tromey  <tom@tromey.com>
3048
3049         * gdbthread.h (thread_command): Constify.
3050         * inferior.h (detach_command): Constify.
3051         * top.h (set_history, show_history): Constify.
3052         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3053         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3054         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3055         * printcmd.c (set_command): Constify.
3056         (non_const_set_command): New function.
3057         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3058         * breakpoint.c (enable_command, disable_command, delete_command)
3059         (catch_command, tcatch_command, set_breakpoint_cmd)
3060         (show_breakpoint_cmd): Constify.
3061         * macrocmd.c (macro_command): Constify.
3062         * infcmd.c (unset_command, kill_command, detach_command)
3063         (info_proc_cmd): Constify.
3064         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3065         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3066         (info_auto_load_cmd): Constify.
3067         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3068         (unset_tdesc_cmd): Constify.
3069         * ada-lang.c (set_ada_command, show_ada_command)
3070         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3071         * guile/guile.c (set_guile_command, show_guile_command)
3072         (info_guile_command): Constify.
3073         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3074         Constify.
3075         * skip.c (skip_command): Constify.
3076         * compile/compile.c (_initialize_compile): Constify.
3077         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3078         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3079         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3080         (maint_btrace_pt_show_cmd): Constify.
3081         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3082         Constify.
3083         * python/python.c (user_show_python, user_set_python): Constify.
3084         * mips-tdep.c (set_mips_command, show_mips_command)
3085         (set_mipsfpu_command): Constify.
3086         * record-btrace.c (cmd_record_btrace_start)
3087         (cmd_set_record_btrace, cmd_show_record_btrace)
3088         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3089         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3090         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3091         Constify.
3092         * symfile.c (overlay_command): Constify.
3093         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3094         * cli/cli-logging.c (set_logging_command, show_logging_command):
3095         Constify.
3096         * cli/cli-dump.c (dump_command, append_command)
3097         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3098         (tekhex_dump_command, binary_dump_command)
3099         (binary_append_command): Constify.
3100         * cli/cli-decode.c (struct cmd_list_element): Change type of
3101         "fun".
3102         * cli/cli-cmds.c (info_command, show_command, set_debug)
3103         (show_debug): Constify.
3104         (show_command): Add non-const overload.
3105         * top.c (set_history, show_history): Constify.
3106         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3107         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3108         * target.c (target_command): Constify.
3109         * sparc64-tdep.c (info_adi_command): Constify.
3110         * record-full.c (cmd_record_full_start): Constify.
3111         (set_record_full_command): Constify.  Fix typo.
3112         (show_record_full_command): Constify.
3113         * thread.c (thread_command, thread_apply_command): Constify.
3114         * memattr.c (dummy_cmd): Constify.
3115         * value.c (function_command): Constify.
3116         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3117         * probe.c (info_probes_command): Constify.
3118         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3119         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3120         (show_thread_cmd, set_thread_default_cmd)
3121         (show_thread_default_cmd): Constify.
3122         (check_empty): Constify.
3123         * tracepoint.c (tfind_command): Constify.
3124         * cp-support.c (maint_cplus_command): Constify.
3125         * windows-tdep.c (info_w32_command): Constify.
3126         * record.c (cmd_record_start, set_record_command)
3127         (show_record_command, info_record_command, cmd_record_goto):
3128         Constify.
3129         * ravenscar-thread.c (set_ravenscar_command)
3130         (show_ravenscar_command): Constify.
3131         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3132         Constify.
3133         (add_internal_problem_command): Remove casts.
3134         * arc-tdep.c (maintenance_print_arc_command): Constify.
3135         * valprint.c (set_print, show_print, set_print_raw)
3136         (show_print_raw): Constify.
3137         * maint.c (maintenance_command, maintenance_info_command)
3138         (maintenance_print_command, maintenance_set_cmd)
3139         (maintenance_show_cmd, set_per_command_cmd)
3140         (show_per_command_cmd, maintenance_check_command): Constify.
3141         * language.c (set_check, show_check): Constify.
3142         * typeprint.c (show_print_type, set_print_type): Constify.
3143         * go32-nat.c (go32_info_dos_command): Constify.
3144
3145 2017-10-11  Tom Tromey  <tom@tromey.com>
3146
3147         * breakpoint.c (prepare_re_set_context): Remove.
3148         (breakpoint_re_set_one): Update.  Don't use cleanups.
3149         (breakpoint_re_set): Use scoped_restore, std::string, and
3150         scoped_restore_current_language.
3151
3152 2017-10-11  Tom Tromey  <tom@tromey.com>
3153
3154         * breakpoint.c (commands_command_1): Use std::string.
3155         (cleanup_executing_breakpoints): Remove.
3156         (bpstat_do_actions_1): Use scoped_restore.
3157         (bpstat_check_watchpoint): Use std::string.
3158         (decode_static_tracepoint_spec): Likewise.
3159         (break_range_command): Likewise.
3160         (watch_command_1): Likewise.
3161         (compare_breakpoints): Change argument types.
3162         (clear_command): Use std::vector.
3163         (cleanup_executing_breakpoints): Remove.
3164         (update_global_location_list): Use unique_xmalloc_ptr.
3165         (strace_command): Remove unused declaration.
3166
3167 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3168
3169         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3170         * NEWS: Mention new FreeBSD/arm native configuration.
3171         * configure.host: Add arm*-*-freebsd*.
3172         * configure.nat: Likewise.
3173         * arm-fbsd-nat.c: New file.
3174
3175 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3176
3177         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3178         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3179         * NEWS: Mention new FreeBSD/arm target.
3180         * configure.tgt: Add arm*-*-freebsd*.
3181         * arm-fbsd-tdep.c: New file.
3182         * arm-fbsd-tdep.h: New file.
3183
3184 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3185
3186         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3187         `gdbarch_elfcore_write_linux_prpsinfo'.
3188         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3189         method.
3190         (elf_internal_linux_prpsinfo): Remove declaration.
3191         * gdbarch.h: Regenerate.
3192         * gdbarch.c: Regenerate.
3193
3194 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3195
3196         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3197         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3198
3199 2017-10-11  Pedro Alves  <palves@redhat.com>
3200
3201         * breakpoint.c (reattach_breakpoints): Delete.
3202         * breakpoint.h (reattach_breakpoints): Delete.
3203
3204 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3205
3206         * symfile.c (registered_sym_fns): Make struct, not typedef.
3207         (DEF_VEC_O (registered_sym_fns)): Remove.
3208         (symtab_fns): Change type to std::vector.
3209         (add_symtab_fns): Adjust.
3210         (find_sym_fns): Adjust.
3211
3212 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3213
3214         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3215         * arc-tdep.h (arc_arch_is_em): New function.
3216         (arc_arch_is_hs): Likewise.
3217
3218 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3219
3220         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3221         parentheses in the declaration.
3222         (macro_lookup_inclusion): Likewise.
3223         (macro_lookup_definition): Likewise.
3224         * p-lang.h (pascal_builtin_types): Likewise.
3225         * tui/tui-data.c (tui_win_list): Likewise.
3226         * tui/tui-data.h (tui_win_list): Likewise.
3227         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3228
3229 2017-10-11  Mark Rages  <markrages@gmail.com>
3230
3231         * target-memory.c (block_boundaries): Fix for block address not
3232         aligned on block size.
3233
3234 2017-10-10  Pedro Alves <palves@redhat.com>
3235             Tom Tromey  <tom@tromey.com>
3236
3237         * breakpoint.c (struct captured_breakpoint_query_args)
3238         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3239         (print_breakpoint): New.
3240         * breakpoint.h (print_breakpoint): Declare.
3241         * common/common-exceptions.h (enum return_reason): Remove
3242         references to catch_exceptions.
3243         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3244         Delete.
3245         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3246         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3247         * gdb.h: Delete.
3248         * gdbthread.h (thread_select): Declare.
3249         * mi/mi-cmd-break.c: Don't include gdb.h.
3250         (breakpoint_notify): Use print_breakpoint.
3251         * mi/mi-cmd-catch.c: Don't include gdb.h.
3252         * mi/mi-interp.c: Don't include gdb.h.
3253         (mi_print_breakpoint_for_event): New.
3254         (mi_breakpoint_created, mi_breakpoint_modified): Use
3255         mi_print_breakpoint_for_event.
3256         * mi/mi-main.c: Don't include gdb.h.
3257         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3258         thread_select instead of gdb_thread_select.
3259         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3260         of using gdb_list_thread_ids.
3261         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3262         FILEIO_ENOSYS here.
3263         (remote_fileio_request): Use TRY/CATCH instead of
3264         catch_exceptions.
3265         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3266         (symbol_file_add_from_memory_wrapper): Delete.
3267         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3268         * thread.c: Don't include gdb.h.
3269         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3270         (thread_alive): Use thread_select.
3271         (do_captured_thread_select): Delete, parts salvaged as ...
3272         (thread_select): ... this new function.
3273         (gdb_thread_select): Delete.
3274
3275 2017-10-10  Pedro Alves  <palves@redhat.com>
3276             Tom Tromey  <tom@tromey.com>
3277
3278         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3279         and reverse logic.
3280         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3281         No longer macros.  Instead ...
3282         (enum wp_check_result): They're now values of this new
3283         enumeration.
3284         (watchpoint_check): Change return type to wp_check_result and
3285         parameter type to bpstat.
3286         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3287         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3288         catch_errors.  Reverse logic of watchpoint_check call.
3289         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3290         pointer as parameter.
3291         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3292         * common/common-exceptions.c (throw_exception_sjlj): Update
3293         comments to avoid mentioning catch_errors.
3294         * exceptions.c (catch_errors): Delete.
3295         * exceptions.h: Update comments to avoid mentioning catch_errors.
3296         (catch_errors_ftype, catch_errors): Delete.
3297         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3298         (hook_stop_stub): Delete.
3299         (restore_selected_frame): Change return type to void, and
3300         parameter type to const frame_id &.
3301         (restore_infcall_control_state): Use TRY/CATCH instead of
3302         catch_errors.
3303         * main.c (captured_command_loop): Return void and remove
3304         parameter.  Remove references to catch_errors.
3305         (captured_main): Use TRY/CATCH instead of catch_errors.
3306         * objc-lang.c (objc_submethod_helper_data)
3307         (find_objc_msgcall_submethod_helper): Delete.
3308         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3309         catch_errors.
3310         * record-full.c (record_full_message): Return void.
3311         (record_full_message_args, record_full_message_wrapper): Delete.
3312         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3313         instead of catch_errors.
3314         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3315         parameter type to int.
3316         * solib-darwin.c (open_symbol_file_object): Ditto.
3317         * solib-dsbt.c (open_symbol_file_object): Ditto.
3318         * solib-frv.c (open_symbol_file_object): Ditto.
3319         * solib-svr4.c (open_symbol_file_object): Ditto.
3320         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3321         * solib.c (update_solib_list): Use TRY/CATCH instead of
3322         catch_errors.
3323         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3324         Change type.
3325         * symmisc.c (struct print_symbol_args): Remove.
3326         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3327         (print_symbol): Change type.
3328         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3329         and remove parameters.
3330         (catch_errors): New.
3331         (get_windows_debug_event): Adjust.
3332
3333 2017-10-09  Tom Tromey  <tom@tromey.com>
3334
3335         * mi/mi-main.c (free_splay_tree): Remove.
3336         (list_available_thread_groups): Use splay_tree_up.
3337         * common/gdb_splay_tree.h: New file.
3338
3339 2017-10-09  Tom Tromey  <tom@tromey.com>
3340
3341         * mi/mi-main.c (do_nothing): Remove.
3342         (list_available_thread_groups): Update.
3343
3344 2017-10-09  Pedro Alves  <palves@redhat.com>
3345
3346         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3347         reading registers when switching context.
3348
3349 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3350
3351         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3352         (fbsd_convert_siginfo): Likewise.
3353         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3354
3355 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3356
3357         * configure.ac (try_guile_versions): Remove guile-2.2.
3358         * configure: Regenerate.
3359
3360 2017-10-09  Tom Tromey  <tom@tromey.com>
3361
3362         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3363         (COMPILE.pre): Use $(CXX).
3364
3365 2017-10-09  Pedro Alves  <palves@redhat.com>
3366
3367         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3368         Use bool.
3369         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3370         * cp-support.h (cp_remove_params): Now returns a
3371         gdb::unique_xmalloc_ptr.
3372         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3373         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3374         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3375         returning a gdb::unique_xmalloc_ptr.
3376         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3377         * stack.c (find_frame_funname): Adjust to cp_remove_params
3378         returning a gdb::unique_xmalloc_ptr.
3379
3380 2017-10-08  Tom Tromey  <tom@tromey.com>
3381
3382         * dwarf2read.c (dwarf2_get_dwz_file): Use
3383         gdb::unique_xmalloc_ptr.
3384         (find_slot_in_mapped_hash): Likewise.
3385         (dwarf2_physname): Likewise.
3386         (create_dwo_unit_in_dwp_v1): Use std::string.
3387         (create_dwo_unit_in_dwp_v2): Likewise.
3388         (lookup_dwo_cutu): Likewise.
3389         (inherit_abstract_dies): Use std::vector.
3390         (read_array_type): Likewise.
3391         (dwarf_decode_macros): Remove unused declaration.
3392         (unsigned_int_compar): Remove.
3393         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3394         (psymtabs_addrmap_cleanup): Remove.
3395
3396 2017-10-08  Tom Tromey  <tom@tromey.com>
3397
3398         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3399         * frame.h (frame_cleanup_after_sniffer): Declare.
3400         (frame_prepare_for_sniffer): Return void.
3401         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3402         type of argument.
3403         (frame_prepare_for_sniffer): Return void.
3404
3405 2017-10-08  Tom Tromey  <tom@tromey.com>
3406
3407         * utils.h (make_cleanup_value_free): Remove.
3408         * utils.c (do_value_free, struct cleanup): Remove.
3409         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3410         Use gdb_value_up.
3411         * value.h (struct value_deleter): New.
3412         (gdb_value_up): New typedef.
3413
3414 2017-10-08  Tom Tromey  <tom@tromey.com>
3415
3416         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3417         (make_cleanup_free_search_symbols): Remove.
3418         (search_symbols): Return std::vector.
3419         (symbol_search::compare_search_syms): Now member of
3420         symbol_search.  Change arguments.
3421         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3422         (symtab_symbol_info, rbreak_command): Update.
3423         * symtab.h (struct symbol_search) <next>: Remove.
3424         Add constructors.
3425         (symbol_search::operator<): New function.
3426         (symbol_search::operator==): New function.
3427         (search_symbols): Remove std::vector.
3428         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3429         (symbol_search::compare_search_syms): Declare.
3430
3431 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3432
3433         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3434         arch/aarch64-insn.o.
3435         Remove one rule.
3436         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3437
3438 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3439
3440         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3441         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3442         arch/arm-linux.o respectively.
3443         * configure.tgt: Likewise.
3444
3445 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3446
3447         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3448         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3449
3450 2017-10-06  Pedro Alves  <palves@redhat.com>
3451
3452         * windows-nat.c: Include <algorithm>.
3453
3454 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3455
3456         * configure.tgt (i386_tobjs): New variable.
3457         (amd64_tobjs): New variable.
3458         Set $cpu_obs and $os_obs.
3459
3460 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3461
3462         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3463         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3464         (clean): Remove object files and dependency files.
3465         (distclean): Remove the directory.
3466         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3467         * configure: Re-generated.
3468         * configure.tgt: Replace amd64.o with arch/amd64.o.
3469
3470 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3471
3472         PR build/22188
3473         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3474         and SETEND.
3475
3476 2017-10-05  Pedro Alves  <palves@redhat.com>
3477
3478         * linux-nat.c (linux_child_follow_fork): When following the parent
3479         and detaching the child, consult the parent thread's architecture
3480         instead of the child's.
3481
3482 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3483
3484         * ax.h: Do not include "doublest.h".
3485         (union agent_val): Remove.
3486
3487 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3488
3489         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3490         (decimal_to_string): Return std::string object.
3491         (decimal_from_string): Accept std::string object.  Return bool.
3492         (decimal_from_integral, decimal_from_doublest): Remove.
3493         (decimal_from_longest): Add prototype.
3494         (decimal_from_ulongest): Likewise.
3495         (decimal_to_longest): Likewise.
3496         (decimal_from_doublest): Likewise.
3497         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3498         (MAX_DECIMAL_STRING): Move here.
3499         (decimal_to_string): Return std::string object.
3500         (decimal_from_string): Accept std::string object.  Return bool.
3501         (decimal_from_integral): Remove, replace by ...
3502         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3503         (decimal_to_longest): New function.
3504         (decimal_from_floating): Remove, replace by ...
3505         (decimal_from_doublest): ... this new function.
3506         (decimal_to_doublest): Update to new decimal_to_string interface.
3507
3508         * value.c (unpack_long): Use decimal_to_longest.
3509         * valops.c (value_cast): Use decimal_from_doublest instead of
3510         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3511         decimal_from_integral.
3512         * valarith.c (value_args_as_decimal): Likewise.
3513         * valprint.c (print_decimal_floating): Update to new
3514         decimal_to_string interface.
3515         * printcmd.c (printf_decfloat): Likewise.
3516         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3517
3518 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3519
3520         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3521         * gdbtypes.c: Include "floatformat.h".
3522         * value.c: Likewise.
3523         * m68k-tdep.c: Likewise.
3524
3525         * findvar.c: Do not include "floatformat.h".
3526         * amd64-darwin-tdep.c: Likewise.
3527         * arm-linux-tdep.c: Likewise.
3528         * i386-darwin-tdep.c: Likewise.
3529         * i387-tdep.c: Likewise.
3530         * m68k-linux-tdep.c: Likewise.
3531         * mep-tdep.c: Likewise.
3532         * mips-tdep.c: Likewise.
3533         * nios2-tdep.c: Likewise.
3534         * s390-linux-tdep.c: Likewise.
3535         * sparc-obsd-tdep.c: Likewise.
3536         * sparc-tdep.c: Likewise.
3537         * sparc64-tdep.c: Likewise.
3538         * spu-tdep.c: Likewise.
3539         * tic6x-tdep.c: Likewise.
3540         * tilegx-tdep.c: Likewise.
3541         * vax-tdep.c: Likewise.
3542         * xstormy16-tdep.c: Likewise.
3543         * xtensa-tdep.c: Likewise.
3544
3545         * top.c: Do not include "doublest.h".
3546         * aarch64-tdep.c: Likewise.
3547         * alpha-tdep.c: Likewise.
3548         * arm-linux-tdep.c: Likewise.
3549         * m68k-linux-tdep.c: Likewise.
3550         * tilegx-tdep.c: Likewise.
3551         * xstormy16-tdep.c: Likewise.
3552
3553 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3554
3555         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3556         (mipsn32_fbsd_sigframe): Define.
3557         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3558         for FreeBSD/mipsn32.
3559
3560 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3561
3562         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3563         AT_HWCAP.
3564
3565 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3566
3567         * MAINTAINERS (Misc): Update my email address.
3568
3569 2017-10-04  Pedro Alves  <palves@redhat.com>
3570
3571         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3572         it instead of target_gdbarch.
3573         (get_remote_state, get_remote_packet_size): Adjust
3574         get_remote_arch_state calls, passing down target_gdbarch
3575         explicitly.
3576         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3577         'gdbarch' and use it instead of target_gdbarch.
3578         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3579         passing down target_gdbarch explicitly.
3580         (struct stop_reply) <arch>: New field.
3581         (remote_parse_stop_reply): Use the stopped thread's architecture,
3582         not the current inferior's.  Save the architecture in the
3583         stop_reply.
3584         (process_stop_reply): Use the stop reply's architecture.
3585         (process_g_packet, remote_fetch_registers)
3586         (remote_prepare_to_store, store_registers_using_G)
3587         (remote_store_registers): Adjust get_remote_arch_state calls,
3588         using the regcache's architecture.
3589         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3590         passing down target_gdbarch explicitly.
3591         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3592         beneath instead of calling target_gdbarch.
3593         * target.c (default_thread_architecture): Use the specified
3594         inferior's architecture, instead of the current inferior's
3595         architecture (via target_gdbarch).
3596
3597 2017-10-04  Pedro Alves  <palves@redhat.com>
3598
3599         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3600         case.
3601         (regcache_print): Handle !target_has_registers here instead.
3602
3603 2017-10-04  Pedro Alves  <palves@redhat.com>
3604
3605         * frame.c (create_test_frame): Delete.
3606         * frame.h (create_test_frame): Delete.
3607         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3608         (class regcache_test): Delete.
3609         (test_target_has_registers, test_target_has_stack)
3610         (test_target_has_memory, test_target_prepare_to_store)
3611         (test_target_store_registers): New functions.
3612         (test_target_ops): New class.
3613         (register_to_value_test): Error out if there's already a
3614         process_stratum (or higher) target pushed.  Create a fuller mock
3615         environment, with mock target_ops, inferior, address space, thread
3616         and inferior_ptid.
3617         * progspace.c (struct address_space): Move to ...
3618         * progspace.h (struct address_space): ... here.
3619         * regcache.h (regcache::~regcache, regcache::raw_write)
3620         [GDB_SELF_TEST]: No longer virtual.
3621
3622 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3623
3624         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3625
3626 2017-10-04  Pedro Alves  <palves@redhat.com>
3627
3628         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3629         out of 'between TRY and CATCH'.
3630
3631 2017-10-04  Pedro Alves  <palves@redhat.com>
3632
3633         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3634         * common/common-exceptions.h (TRY): Open an outermost scope.
3635         Expand intro comment.
3636         (CATCH): Reindent.
3637         (END_CATCH): Close the outermost scope.
3638         * completer.c (complete_line_internal): Add missing END_CATCH.
3639
3640 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3641
3642         * NEWS (Changes since GDB 8.0): Add entry about new
3643         'set-cwd-on-gdbserver' feature.
3644         (New remote packets): Add entry for QSetWorkingDir.
3645         * common/common-inferior.h (set_inferior_cwd): New prototype.
3646         * infcmd.c (set_inferior_cwd): Remove "static".
3647         (show_cwd_command): Expand text to include remote debugging.
3648         * remote.c: Add PACKET_QSetWorkingDir.
3649         (remote_protocol_features) <QSetWorkingDir>: New entry for
3650         PACKET_QSetWorkingDir.
3651         (extended_remote_set_inferior_cwd): New function.
3652         (extended_remote_create_inferior): Call
3653         "extended_remote_set_inferior_cwd".
3654         (_initialize_remote): Call "add_packet_config_cmd" for
3655         QSetWorkingDir.
3656
3657 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3658
3659         * NEWS (New commands): Mention "set/show cwd".
3660         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3661         "cd" command's help text.
3662         * common/common-inferior.h (get_inferior_cwd): New prototype.
3663         * infcmd.c (inferior_cwd_scratch): New global variable.
3664         (set_inferior_cwd): New function.
3665         (get_inferior_cwd): Likewise.
3666         (set_cwd_command): Likewise.
3667         (show_cwd_command): Likewise.
3668         (_initialize_infcmd): Add "set/show cwd" commands.
3669         * inferior.h (class inferior) <cwd>: New field.
3670         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3671         (fork_inferior): Change inferior's cwd before its execution.
3672         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3673         to CreateProcess.
3674
3675 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3676
3677         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3678         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3679         (COMMON_OBS): Add gdb_tilde_expand.o.
3680         * common/gdb_tilde_expand.c: New file.
3681         * common/gdb_tilde_expand.h: Likewise.
3682
3683 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3684
3685         * gdbarch.sh (objfile): Remove duplicate declaration.
3686         * gdbarch.h: Regenerate.
3687
3688 2017-10-03  Tom Tromey  <tom@tromey.com>
3689
3690         * utils.c (internal_vproblem): Use string_vprintf.
3691
3692 2017-10-03  Tom Tromey  <tom@tromey.com>
3693
3694         * printcmd.c (info_symbol_command): Use std::string.
3695
3696 2017-10-03  Tom Tromey  <tom@tromey.com>
3697
3698         * top.c (gdb_safe_append_history): Use std::string.
3699
3700 2017-10-03  Tom Tromey  <tom@tromey.com>
3701
3702         * event-top.c (stdin_event_handler): Update.
3703         * main.c (captured_main_1): Update.
3704         * top.h (make_delete_ui_cleanup): Remove.
3705         (struct ui): Add constructor and destructor.
3706         (new_ui, delete_ui): Remove.
3707         * top.c (make_delete_ui_cleanup): Remove.
3708         (new_ui_command): Use std::unique_ptr.
3709         (delete_ui_cleanup): Remove.
3710         (ui::ui): Rename from new_ui.  Update.
3711         (free_ui): Remove.
3712         (ui::~ui): Rename from delete_ui.  Update.
3713
3714 2017-10-03  Tom Tromey  <tom@tromey.com>
3715
3716         * symfile.c (load_progress): Use gdb::byte_vector.
3717
3718 2017-10-03  Tom Tromey  <tom@tromey.com>
3719
3720         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3721         declaration.
3722         * printcmd.c (x_command): Remove unused declaration.
3723         * symfile.c (symbol_file_command): Remove unused declaration.
3724
3725 2017-10-03  Tom Tromey  <tom@tromey.com>
3726
3727         * utils.c (internal_vproblem): Use std::string.
3728         (defaulted_query): Likewise.
3729
3730 2017-10-03  Tom Tromey  <tom@tromey.com>
3731
3732         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3733         * top.c (execute_command_to_string): Update.
3734         * utils.c (make_cleanup_restore_page_info): Remove.
3735         (do_restore_page_info_cleanup): Remove.
3736         (set_batch_flag_and_restore_page_info):
3737         New.
3738         (make_cleanup_restore_page_info): Remove.
3739         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3740         (~set_batch_flag_and_restore_page_info): New
3741         (make_cleanup_restore_uinteger): Remove.
3742         (make_cleanup_restore_integer): Remove.
3743         (struct restore_integer_closure): Remove.
3744         (restore_integer): Remove.
3745         * utils.h (struct set_batch_flag_and_restore_page_info): New
3746         class.
3747         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3748         (make_cleanup_restore_page_info): Remove.
3749         (make_cleanup_restore_uinteger) Remove.
3750         (make_cleanup_restore_integer) Remove.
3751
3752 2017-10-03  Tom Tromey  <tom@tromey.com>
3753
3754         * record-full.h (record_full_gdb_operation_disable_set): Return
3755         scoped_restore_tmpl<int>.
3756         * infrun.c (adjust_pc_after_break): Update.
3757         (handle_signal_stop): Update.
3758         * record-full.c (record_full_gdb_operation_disable_set): Return
3759         scoped_restore_tmpl<int>.
3760         (record_full_wait_1, record_full_insert_breakpoint)
3761         (record_full_remove_breakpoint, record_full_save)
3762         (record_full_goto_insn): Update.
3763
3764 2017-10-02  Tom Tromey  <tom@tromey.com>
3765
3766         PR rust/22236:
3767         * rust-lang.c (rust_val_print_str): New function.
3768         (val_print_struct): Call it.
3769         (rust_subscript): Preserve name of slice type.
3770
3771 2017-10-02  Tom Tromey  <tom@tromey.com>
3772
3773         * rust-lang.c (rust_subscript): Handle slices in
3774         EVAL_AVOID_SIDE_EFFECTS case.
3775
3776 2017-10-02  Tom Tromey  <tom@tromey.com>
3777
3778         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3779
3780 2017-10-02  Tom Tromey  <tom@tromey.com>
3781
3782         * rust-lang.h (rust_slice_type): Add "extern".
3783
3784 2017-10-02  Tom Tromey  <tom@tromey.com>
3785             Pedro Alves  <palves@redhat.com>
3786
3787         * ada-lang.h (ada_exc_info::operator<): Make const.
3788         (ada_exc_info::operator==): Make const.
3789         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3790         Make const.
3791
3792 2017-09-29  Tom Tromey  <tom@tromey.com>
3793
3794         * target.c (read_whatever_is_readable): Change type of "result".
3795         Update.
3796         (free_memory_read_result_vector): Remove.
3797         (read_memory_robust): Change return type.  Update.
3798         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3799         bin2hex, std::string.
3800         * target.h (memory_read_result_s): Remove typedef.
3801         (free_memory_read_result_vector): Remove.
3802         (read_memory_robust): Return std::vector.
3803
3804 2017-09-29  Tom Tromey  <tom@tromey.com>
3805
3806         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3807
3808 2017-09-29  Tom Tromey  <tom@tromey.com>
3809
3810         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3811         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3812         operator< and operator==.
3813         (ada_exceptions_list): Return a std::vector.
3814         * ada-lang.c (ada_exc_info::operator<): Rename from
3815         compare_ada_exception_info.
3816         (ada_exc_info::operator==): New.
3817         (sort_remove_dups_ada_exceptions_list): Change type of
3818         "exceptions".
3819         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3820         (ada_add_global_exceptions): Likewise.
3821         (ada_exceptions_list_1): Return a std::vector.
3822         (ada_exceptions_list): Likewise.
3823
3824 2017-09-29  Tom Tromey  <tom@tromey.com>
3825
3826         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3827         'std::set *'.
3828         (print_one_inferior): Update.
3829         (free_vector_of_ints): Remove.
3830         (list_available_thread_groups): Change "ids" to std::set.
3831         (mi_cmd_list_thread_groups): Update.
3832         (struct collect_cores_data) <core>: Now a std::set.
3833         (collect_cores): Update.
3834         (unique): Remove.
3835         (print_one_inferior): Update.
3836
3837 2017-09-29  Tom Tromey  <tom@tromey.com>
3838
3839         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3840         (mi_execute_async_cli_command): Likewise.
3841         (mi_cmd_trace_frame_collected): Use field_fmt.
3842
3843 2017-09-29  Tom Tromey  <tom@tromey.com>
3844
3845         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3846         gdb::byte_vector.
3847
3848 2017-09-29  Tom Tromey  <tom@tromey.com>
3849
3850         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3851
3852 2017-09-29  Tom Tromey  <tom@tromey.com>
3853
3854         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3855
3856 2017-09-29  Tom Tromey  <tom@tromey.com>
3857
3858         * varobj.h (varobj_gen_name): Return std::string.
3859         * varobj.c (varobj_gen_name): Return std::string.
3860         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3861         (mi_cmd_var_delete): Don't copy "name".
3862
3863 2017-09-29  Tom Tromey  <tom@tromey.com>
3864
3865         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3866         (mi_cmd_break_insert_1): Update.
3867
3868 2017-09-29  Tom Tromey  <tom@tromey.com>
3869
3870         * target.h (make_scoped_defer_target_commit_resume): Update.
3871         * target.c (make_scoped_defer_target_commit_resume): Rename from
3872         make_cleanup_defer_target_commit_resume.  Return a
3873         scoped_restore.
3874         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3875
3876 2017-09-29  Tom Tromey  <tom@tromey.com>
3877
3878         * main.c (captured_main_1): Remove unused declaration.
3879         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3880
3881 2017-09-29  Tom Tromey  <tom@tromey.com>
3882
3883         * symtab.c (search_symbols): Remove unused outer cleanup.
3884         (make_source_files_completion_list): Remove unused declaration.
3885
3886 2017-09-29  Tom Tromey  <tom@tromey.com>
3887
3888         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3889
3890 2017-09-29  Tom Tromey  <tom@tromey.com>
3891
3892         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3893         gdb::byte_vector.
3894
3895 2017-09-29  Tom Tromey  <tom@tromey.com>
3896
3897         * complaints.c (vcomplaint): Use std::string.
3898
3899 2017-09-29  Tom Tromey  <tom@tromey.com>
3900
3901         * tracepoint.c (trace_variable_command): Use std::string.
3902         (encode_actions_1): Remove unused declarations.
3903         (create_tsv_from_upload): Use std::string.
3904
3905 2017-09-29  Tom Tromey  <tom@tromey.com>
3906
3907         * cp-support.c (gdb_demangle): Use std::string.
3908
3909 2017-09-29  Tom Tromey  <tom@tromey.com>
3910
3911         * stack.c (parse_frame_specification): Use std::string
3912         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3913
3914 2017-09-29  Tom Tromey  <tom@tromey.com>
3915
3916         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3917
3918 2017-09-29  Tom Tromey  <tom@tromey.com>
3919
3920         * utils.c (vfprintf_maybe_filtered): Use std::string.
3921         (vfprintf_unfiltered): Likewise.
3922
3923 2017-09-29  Tom Tromey  <tom@tromey.com>
3924
3925         * event-top.c (top_level_prompt): Return std::string.
3926         (display_gdb_prompt): Update.
3927
3928 2017-09-29  Tom Tromey  <tom@tromey.com>
3929
3930         * unittests/common-utils-selftests.c (format): New function.
3931         (string_vprintf_tests): New function.
3932         (_initialize_common_utils_selftests): Register new tests.
3933         * common/common-utils.c (string_vprintf): New function.
3934         * common/common-utils.h (string_vprintf): Declare.
3935
3936 2017-09-29  Pedro Alves  <palves@redhat.com>
3937
3938         * common/rsp-low.c (unpack_varlen_hex): Constify.
3939         * common/rsp-low.h (unpack_varlen_hex): Constify.
3940         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3941         Constify.
3942         * remote.c (remote_set_permissions, read_ptid)
3943         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3944         (remote_static_tracepoint_marker_at)
3945         (remote_static_tracepoint_markers_by_strid)
3946         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3947         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3948         (parse_tracepoint_definition, parse_tsv_definition)
3949         (parse_static_tracepoint_marker_definition): Constify.
3950         * tracepoint.h (parse_static_tracepoint_marker_definition)
3951         (parse_trace_status, parse_tracepoint_status)
3952         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3953
3954 2017-09-29  Pedro Alves  <palves@redhat.com>
3955
3956         * remote.c (target_buf, target_buf_size): Delete.
3957         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3958         Use the connection's packet buffer instead.
3959         All callers adjusted.
3960         (_initialize_remote): Remove references to target_buf and
3961         target_buf_size.
3962
3963 2017-09-28  Pedro Alves  <palves@redhat.com>
3964
3965         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3966         unittests/common-utils-selftests.c.
3967         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3968         (COMMON_OBS): Remove utils-selftests.o.
3969         * utils-selftests.c: Move to ...
3970         * unittests/common-utils-selftests.c: ... here and rename self
3971         test to "string_printf".
3972
3973 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3974
3975         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3976         having NULL cus or tus.
3977
3978 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3979
3980         * arm-tdep.c: (convert_from_extended): Remove.
3981         (convert_to_extended): Likewise.
3982         (arm_extract_return_value): Use convert_typed_floating.
3983         (arm_store_return_value): Likewise.
3984
3985         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3986         * sh-tdep.c: Do not include "floatformat.h".
3987         (sh_littlebyte_bigword_type): New function.
3988         (sh_register_convert_to_virtual): Use convert_typed_floating.
3989         (sh_register_convert_to_raw): Likewise.
3990         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3991         (sh64_littlebyte_bigword_type): New function.
3992         (sh64_extract_return_value): Use convert_typed_floating.
3993         (sh64_register_convert_to_virtual): Likewise.
3994         (sh64_register_convert_to_raw): Likewise.
3995
3996 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3997
3998         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3999         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4000
4001         * gdbtypes.h (union type_specific): Make field floatformat hold
4002         just a single struct floatformat, not an array.
4003         (floatformat_from_type): Move here.
4004         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4005         changed TYPE_FLOATFORMAT definition.
4006         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4007         (recursive_dump_type): Likewise.
4008         (init_float_type): Install correct floatformat for byte order.
4009         (arch_float_type): Likewise.
4010
4011 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4012
4013         * gdbtypes.c (init_type): Change incoming argument from
4014         length-in-bytes to length-in-bits.  Assert length is a
4015         multiple of TARGET_CHAR_BITS.
4016         (arch_type, arch_flags_type): Likewise.
4017         (init_integer_type): Update call to init_type.
4018         (init_character_type): Likewise.
4019         (init_boolean_type): Likewise.
4020         (init_float_type): Likewise.
4021         (init_decfloat_type): Likewise.
4022         (init_complex_type): Likewise.
4023         (init_pointer_type): Likewise.
4024         (objfile_type): Likewise.
4025         (arch_integer_type): Update call to arch_type.
4026         (arch_character_type): Likewise.
4027         (arch_boolean_type): Likewise.
4028         (arch_float_type): Likewise.
4029         (arch_decfloat_type): Likewise.
4030         (arch_complex_type): Likewise.
4031         (arch_pointer_type): Likewise.
4032         (gdbtypes_post_init): Likewise.
4033
4034         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4035         (read_base_type): Likewise.
4036         * mdebugread.c (basic_type): Likewise.
4037         * stabsread.c (dbx_init_float_type): Likewise.
4038         (rs6000_builtin_type): Likewise.
4039         (read_range_type): Likewise.  Also, fix call to init_integer_type
4040         with erroneous length argument.
4041
4042         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4043         * d-lang.c (build_d_types): Likewise.
4044         * f-lang.c (build_fortran_types): Likewise.
4045         * go-lang.c (build_go_types): Likewise.
4046         * opencl-lang.c (build_opencl_types): Likewise.
4047         * jit.c (finalize_symtab): Likewise.
4048         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4049         (build_std_type_info_type): Likewise.
4050         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4051         update call to arch_flags_type.
4052
4053         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4054         arch_type.
4055         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4056         * windows-tdep.c (windows_get_tlb_type): Likewise.
4057
4058         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4059         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4060         * m32c-tdep.c (make_types): Likewise.
4061         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4062         (rl78_psw_type): Update call to arch_flags_type.
4063         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4064         * rx-tdep.c (rx_psw_type): Likewise.
4065         (rx_fpsw_type): Likewise.
4066         * sparc-tdep.c (sparc_psr_type): Likewise.
4067         (sparc_fsr_type): Likewise.
4068         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4069         (sparc64_ccr_type): Likewise.
4070         (sparc64_fsr_type): Likewise.
4071         (sparc64_fprs_type): Likewise.
4072
4073 2017-09-27  Tom Tromey  <tom@tromey.com>
4074
4075         * findcmd.c (find_command): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * ada-tasks.c (task_command_1, task_command): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * symtab.c (maintenance_print_symbol_cache)
4084         (maintenance_flush_symbol_cache)
4085         (maintenance_print_symbol_cache_statistics): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * inferior.c (detach_inferior_command, kill_inferior_command)
4090         (inferior_command): Constify.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * regcache.c (regcache_print, maintenance_print_registers)
4095         (maintenance_print_raw_registers)
4096         (maintenance_print_cooked_registers)
4097         (maintenance_print_register_groups)
4098         (maintenance_print_remote_registers): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * printcmd.c (map_display_numbers, undisplay_command)
4103         (enable_disable_display_command, enable_display_command)
4104         (disable_display_command): Constify.
4105
4106 2017-09-27  Tom Tromey  <tom@tromey.com>
4107
4108         * breakpoint.h (delete_command): Don't declare.
4109         * breakpoint.c (delete_command, enable_once_command)
4110         (enable_count_command, enable_delete_command, breakpoint_1)
4111         (maintenance_info_breakpoints, stopin_command, stopat_command)
4112         (delete_command, delete_trace_command, save_breakpoints)
4113         (save_breakpoints_command, save_tracepoints_command): Constify.
4114
4115 2017-09-27  Tom Tromey  <tom@tromey.com>
4116
4117         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4118         (skip_ws, extract_identifier, macro_define_command)
4119         (macro_undef_command, macro_list_command): Constify.
4120
4121 2017-09-27  Tom Tromey  <tom@tromey.com>
4122
4123         * infcmd.c (environment_info, set_environment_command)
4124         (unset_environment_command, path_info, info_proc_cmd_1)
4125         (info_proc_cmd_mappings, info_proc_cmd_stat)
4126         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4127         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4128
4129 2017-09-27  Tom Tromey  <tom@tromey.com>
4130
4131         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4132         Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4137
4138 2017-09-27  Tom Tromey  <tom@tromey.com>
4139
4140         * demangle.c (demangle_command): Constify.
4141
4142 2017-09-27  Tom Tromey  <tom@tromey.com>
4143
4144         * progspace.c (maintenance_info_program_spaces_command):
4145         Constify.
4146
4147 2017-09-27  Tom Tromey  <tom@tromey.com>
4148
4149         * compile/compile.c (check_raw_argument, compile_file_command)
4150         (compile_code_command, compile_print_command): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * reggroups.c (maintenance_print_reggroups): Constify.
4155
4156 2017-09-27  Tom Tromey  <tom@tromey.com>
4157
4158         * dwarf2read.c (save_gdb_index_command): Constify.
4159
4160 2017-09-27  Tom Tromey  <tom@tromey.com>
4161
4162         * stap-probe.c (info_probes_stap_command): Constify.
4163
4164 2017-09-27  Tom Tromey  <tom@tromey.com>
4165
4166         * fork-child.c (unset_exec_wrapper_command): Constify.
4167
4168 2017-09-27  Tom Tromey  <tom@tromey.com>
4169
4170         * btrace.c (get_uint, get_context_size, no_chunk)
4171         (maint_btrace_packet_history_cmd)
4172         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4173         (maint_info_btrace_cmd): Constify.
4174
4175 2017-09-27  Tom Tromey  <tom@tromey.com>
4176
4177         * reverse.c (delete_bookmark_command): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * remote.c (set_memory_packet_size)
4182         (set_memory_write_packet_size, show_memory_write_packet_size)
4183         (set_memory_read_packet_size, show_memory_read_packet_size)
4184         (compare_sections_command, packet_command, remote_put_command)
4185         (remote_get_command, remote_delete_command): Constify.
4186
4187 2017-09-27  Tom Tromey  <tom@tromey.com>
4188
4189         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4190         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4191         (set_mipsfpu_auto_command): Constify.
4192
4193 2017-09-27  Tom Tromey  <tom@tromey.com>
4194
4195         * cli/cli-cmds.h (cd_command): Constify.
4196         * cli/cli-cmds.c (cd_command): Constify.
4197
4198 2017-09-27  Tom Tromey  <tom@tromey.com>
4199
4200         * thread.c (thread_name_command, thread_find_command): Constify.
4201
4202 2017-09-27  Tom Tromey  <tom@tromey.com>
4203
4204         * probe.c (enable_probes_command, disable_probes_command):
4205         Constify.
4206
4207 2017-09-27  Tom Tromey  <tom@tromey.com>
4208
4209         * symfile.c (symbol_file_command): Constify.
4210         * gdbcore.h (deprecated_file_changed_hook): Constify.
4211         * exec.c (deprecated_file_changed_hook, exec_file_command)
4212         (file_command): Constify.
4213         * defs.h (symbol_file_command): Constify.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * remote-fileio.c (set_system_call_allowed)
4218         (show_system_call_allowed): Constify.
4219
4220 2017-09-27  Tom Tromey  <tom@tromey.com>
4221
4222         * tracepoint.c (delete_trace_variable_command)
4223         (tfind_end_command, tfind_start_command, tfind_pc_command)
4224         (tfind_tracepoint_command, tfind_line_command)
4225         (tfind_range_command, tfind_outside_command): Constify.
4226
4227 2017-09-27  Tom Tromey  <tom@tromey.com>
4228
4229         * ax-gdb.c (maint_agent_printf_command, agent_command)
4230         (agent_eval_command): Constify.
4231
4232 2017-09-27  Tom Tromey  <tom@tromey.com>
4233
4234         * tracepoint.c (info_scope_command): Constify.
4235         * python/python.c (gdbpy_decode_line): Constify.
4236         * python/py-breakpoint.c (bppy_init): Constify.
4237         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4238         * location.h: (new_linespec_location)
4239         (string_to_event_location_basic, string_to_event_location):
4240         Constify.
4241         * location.c (new_linespec_location)
4242         (string_to_event_location_basic, string_to_event_location):
4243         Constify.
4244         * linespec.h (decode_line_with_current_source)
4245         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4246         * linespec.c (linespec_lex_to_end)
4247         (decode_line_with_current_source)
4248         (decode_line_with_last_displayed): Constify.
4249         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4250         Constify.
4251         * cli/cli-cmds.c (edit_command, list_command): Constify.
4252         * breakpoint.h (until_break_command, watch_command_wrapper)
4253         (awatch_command_wrapper, rwatch_command_wrapper)
4254         (init_ada_exception_breakpoint): Constify.
4255         * breakpoint.c (break_command_1, dprintf_command)
4256         (break_range_command, watch_command_wrapper)
4257         (rwatch_command_wrapper, awatch_command_wrapper)
4258         (until_break_command, init_ada_exception_breakpoint)
4259         (strace_marker_create_sals_from_location, trace_command)
4260         (ftrace_command, strace_command, struct tracepoint): Constify.
4261         * ax-gdb.c (agent_command_1): Constify.
4262         * ada-lang.c (ada_exception_sal): Constify.
4263
4264 2017-09-27  Tom Tromey  <tom@tromey.com>
4265
4266         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4267         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4268         (get_context_size, no_chunk, get_insn_history_modifiers)
4269         (cmd_record_insn_history, get_call_history_modifiers)
4270         (cmd_record_call_history): Constify.
4271
4272 2017-09-27  Tom Tromey  <tom@tromey.com>
4273
4274         * source.c (show_substitute_path_command)
4275         (unset_substitute_path_command, set_substitute_path_command):
4276         Constify.
4277
4278 2017-09-27  Tom Tromey  <tom@tromey.com>
4279
4280         * typeprint.c (maintenance_print_type): Constify.
4281         * maint.c (maintenance_dump_me, maintenance_demangle)
4282         (maintenance_time_display, maintenance_info_sections)
4283         (maintenance_print_statistics, maintenance_deprecate)
4284         (maintenance_undeprecate): Constify.
4285         (maintenance_do_deprecate): Constify.  Use std::string.
4286         (maintenance_selftest): Constify.
4287         * gdbtypes.h (maintenance_print_type): Constify.
4288
4289 2017-09-27  Tom Tromey  <tom@tromey.com>
4290
4291         * hppa-tdep.c (unwind_command): Constify.
4292
4293 2017-09-27  Tom Tromey  <tom@tromey.com>
4294
4295         * target-descriptions.c (unset_tdesc_filename_cmd)
4296         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4297         Constify.
4298
4299 2017-09-27  Tom Tromey  <tom@tromey.com>
4300
4301         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4302
4303 2017-09-27  Tom Tromey  <tom@tromey.com>
4304
4305         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4306
4307 2017-09-27  Tom Tromey  <tom@tromey.com>
4308
4309         * tui/tui-regs.c (tui_reg_command): Constify.
4310
4311 2017-09-27  Tom Tromey  <tom@tromey.com>
4312
4313         * skip.c (skip_file_command, skip_function_command)
4314         (skip_enable_command, skip_disable_command, skip_delete_command):
4315         Constify.
4316
4317 2017-09-27  Tom Tromey  <tom@tromey.com>
4318
4319         * record-btrace.c (cmd_record_btrace_bts_start)
4320         (cmd_record_btrace_pt_start): Constify.
4321
4322 2017-09-27  Tom Tromey  <tom@tromey.com>
4323
4324         * symmisc.c (maintenance_print_symbols)
4325         (maintenance_print_msymbols, maintenance_print_objfiles)
4326         (maintenance_info_symtabs, maintenance_check_symtabs)
4327         (maintenance_expand_symtabs, maintenance_info_line_tables):
4328         Constify.
4329
4330 2017-09-27  Tom Tromey  <tom@tromey.com>
4331
4332         * top.c (new_ui_command): Constify.
4333
4334 2017-09-27  Tom Tromey  <tom@tromey.com>
4335
4336         * symfile.c (add_symbol_file_command)
4337         (remove_symbol_file_command, list_overlays_command)
4338         (map_overlay_command, unmap_overlay_command)
4339         (overlay_auto_command, overlay_manual_command)
4340         (overlay_off_command, overlay_load_command): Constify.
4341
4342 2017-09-27  Tom Tromey  <tom@tromey.com>
4343
4344         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4345         (info_spu_mailbox_command, info_spu_dma_command)
4346         (info_spu_proxydma_command): Constify.
4347
4348 2017-09-27  Tom Tromey  <tom@tromey.com>
4349
4350         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4351
4352 2017-09-27  Tom Tromey  <tom@tromey.com>
4353
4354         * cli/cli-script.c (user_defined_command): Constify.
4355
4356 2017-09-27  Tom Tromey  <tom@tromey.com>
4357
4358         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4359         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4360         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4361         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4362         (dump_binary_value, append_binary_memory, append_binary_value):
4363         Constify.
4364         (struct dump_context) <func>: Constify.
4365         (add_dump_command): Update.
4366
4367 2017-09-27  Tom Tromey  <tom@tromey.com>
4368
4369         * cli/cli-cmds.c (show_version, show_configuration)
4370         (source_command, show_user): Constify.
4371
4372 2017-09-27  Tom Tromey  <tom@tromey.com>
4373
4374         * target.c (maintenance_print_target_stack): Constify.
4375
4376 2017-09-27  Tom Tromey  <tom@tromey.com>
4377
4378         * interps.c (interpreter_exec_cmd): Constify.
4379
4380 2017-09-27  Tom Tromey  <tom@tromey.com>
4381
4382         * record-full.c (cmd_record_full_restore): Constify.
4383
4384 2017-09-27  Tom Tromey  <tom@tromey.com>
4385
4386         * memattr.c (enable_mem_command, disable_mem_command)
4387         (delete_mem_command): Constify.
4388
4389 2017-09-27  Tom Tromey  <tom@tromey.com>
4390
4391         * value.c (show_convenience): Constify.
4392
4393 2017-09-27  Tom Tromey  <tom@tromey.com>
4394
4395         * gdbcore.h (core_file_command): Update.
4396         * corefile.c (core_file_command): Constify.
4397
4398 2017-09-27  Tom Tromey  <tom@tromey.com>
4399
4400         * user-regs.c (maintenance_print_user_registers): Constify.
4401
4402 2017-09-27  Tom Tromey  <tom@tromey.com>
4403
4404         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4405
4406 2017-09-27  Tom Tromey  <tom@tromey.com>
4407
4408         * cp-support.c (first_component_command): Constify.
4409
4410 2017-09-27  Tom Tromey  <tom@tromey.com>
4411
4412         * psymtab.c (maintenance_print_psymbols)
4413         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4414         Constify.
4415
4416 2017-09-27  Tom Tromey  <tom@tromey.com>
4417
4418         * windows-tdep.c (display_tib): Constify.
4419
4420 2017-09-27  Tom Tromey  <tom@tromey.com>
4421
4422         * linux-fork.c (delete_checkpoint_command)
4423         (detach_checkpoint_command): Constify.
4424
4425 2017-09-27  Tom Tromey  <tom@tromey.com>
4426
4427         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4428
4429 2017-09-27  Tom Tromey  <tom@tromey.com>
4430
4431         * arc-tdep.c (dump_arc_instruction_command): Constify.
4432
4433 2017-09-27  Tom Tromey  <tom@tromey.com>
4434
4435         * valprint.c (set_radix, show_radix): Constify.
4436
4437 2017-09-27  Tom Tromey  <tom@tromey.com>
4438
4439         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4440
4441 2017-09-27  Tom Tromey  <tom@tromey.com>
4442
4443         * command.h (not_just_help_class_command): Update.
4444         * cli/cli-decode.h (not_just_help_class_command): Update.
4445         * cli/cli-decode.c (not_just_help_class_command): Constify.
4446
4447 2017-09-27  Tom Tromey  <tom@tromey.com>
4448
4449         * gdb_bfd.c (maintenance_info_bfds): Constify.
4450
4451 2017-09-27  Tom Tromey  <tom@tromey.com>
4452
4453         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4454         overloads.
4455         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4456         (do_const_cfunc): New function.
4457         (cmd_cfunc_eq): New overload.
4458         (cli_user_command_p): Check do_const_cfunc.
4459         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4460         const_cfunc.
4461         * command.h (add_cmd): Add const overload and no-function
4462         overload.
4463         (set_cmd_cfunc): Add const overload.
4464         (cmd_const_cfunc_ftype): Declare.
4465         (cmd_cfunc_eq): Add const overload.
4466         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4467         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4468         overload.
4469
4470 2017-09-27  Tom Tromey  <tom@tromey.com>
4471
4472         * macroexp.c (get_next_token_for_substitution): New function.
4473         (substitute_args): Call it.  Check for __VA_OPT__.
4474
4475 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4476             Pedro Alves <palves@redhat.com>
4477
4478         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4479         producer_is_icc_lt_14.
4480         (producer_is_icc_lt_14): New function.
4481         (check_producer): Add code for checking version of ICC.
4482         (producer_is_icc): Move to producer.c.
4483         (read_structure_type): Restrict ICC workaround to ICC<14.
4484         * producer.c: Include selftest.h.
4485         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4486         New functions.
4487         * producer.h (producer_is_icc): New declaration.
4488
4489 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4490
4491         * Makefile.in (SFILES): Add producer.c.
4492         (COMMON_OBS): Add producer.o
4493         * amd64-tdep.c (producer.h): Add new include.
4494         * dwarf2read.c (producer.h): Add new include.
4495         * producer.c: New file.
4496         * producer.h: New file.
4497         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4498         producer.c.
4499         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4500         producer.h.
4501
4502 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4503
4504         * configure.ac: Search ncursesw before ncurses.
4505         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4506         * gdb_curses.h: Include <ncursesw/ncurses.h>
4507         * config.in, configure: Regenerate.
4508
4509 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4510
4511         PR gdb/22185
4512         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4513         obsolete.
4514         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4515         Remove i386sol2 support.
4516         * configure.nat <i386sol2>: Remove.
4517         <sol2-64>: Fold into ...
4518         <sol2>: ... this.
4519         Move common settings to default section.
4520         Add sol-thread.o.
4521         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4522         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4523         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4524         <i[34567]86-*-solaris*>: Remove.
4525         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4526
4527         * configure.ac: Remove wctype in libw check.
4528         (_MSE_INT_H): Don't define on Solaris 7-9.
4529         <solaris*>: Remove libthread_db.so.1 check.
4530         * configure: Regenerate.
4531         * config.in: Regenerate.
4532
4533         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4534         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4535         (gdb_ps_size_t): Remove.
4536         Use base types in users.
4537         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4538
4539         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4540
4541 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4542
4543         PR build/22206
4544         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4545         (adi_is_addr_mapped): Likewise.
4546         (PSR_ICC): Don't redefine.
4547         (PSR_IMPL): Likewise.
4548
4549 2017-09-25  Tom Tromey  <tom@tromey.com>
4550
4551         * regcache.c (regcache::dump): Use string_printf.
4552
4553 2017-09-25  Tom Tromey  <tom@tromey.com>
4554
4555         * regcache.c (class regcache_invalidator): New.
4556         (struct register_to_invalidate): Remove.
4557         (make_cleanup_regcache_invalidate): Remove.
4558         (regcache::raw_write): Use regcache_invalidator.
4559
4560 2017-09-25  Tom Tromey  <tom@tromey.com>
4561
4562         * spu-tdep.c (spu2ppu_sniffer): Update.
4563         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4564         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4565         Remove.
4566         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4567         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4568         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4569         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4570         (frame_pop): Update.
4571
4572 2017-09-25  Tom Tromey  <tom@tromey.com>
4573
4574         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4575         * regcache.h (regcache_xfree): Don't declare.
4576         * regcache.c (regcache_xfree): Remove.
4577         (do_regcache_xfree): Use delete.
4578         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4579         * linux-fork.c (free_fork): Use delete.
4580         (fork_save_infrun_state): Likewise.
4581         * jit.c (jit_dealloc_cache): Use delete.
4582         * infrun.c (discard_infcall_suspend_state): Use delete.
4583
4584 2017-09-25  Tom Tromey  <tom@tromey.com>
4585
4586         * regcache.h (regcache_xmalloc): Don't declare.
4587         (regcache_raw_set_cached_value): Update comment.
4588         * regcache.c (regcache_xmalloc): Remove.
4589         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4590         * jit.c (jit_frame_sniffer): Use new.
4591         * frame.c (frame_save_as_regcache): Use new.
4592
4593 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4594
4595         * NEWS: Advertise support for guarded-storage registers on IBM z.
4596
4597 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4598
4599         * s390-linux-nat.c (have_regset_gs): New static variable.
4600         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4601         control block and guarded-storage broadcast control regsets.
4602         (s390_read_description): Detect whether the target has
4603         guarded-storage support, return appropriate tdesc.
4604         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4605         (features/s390x-gs-linux64.c): Likewise.
4606         (struct gdbarch_tdep) <have_gs>: New field.
4607         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4608         (s390_gsbc_regset): New variables.
4609         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4610         and s390_gsbc_regset, if applicable.
4611         (s390_core_read_description): Check whether core file was from a
4612         target with guarded-storage support; include appropriate regsets.
4613         (s390_gdbarch_init): Add registers for guarded-storage support.
4614         (_initialize_s390_tdep): Initialize new target descriptions that
4615         include registers for guarded-storage support.
4616         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4617         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4618         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4619         (S390_NUM_REGS): Adjust macro definition.
4620         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4621         (tdesc_s390x_gs_linux64): New declarations.
4622
4623 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4624
4625         * features/s390-gs-linux64.xml: New file.
4626         * features/s390-gs.xml: New file.
4627         * features/s390-gsbc.xml: New file.
4628         * features/s390x-gs-linux64.xml: New file.
4629         * features/Makefile (WHICH): Add s390-gs-linux64 and
4630         s390x-gs-linux64.
4631         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4632         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4633         * features/s390-gs-linux64.c: New generated file.
4634         * features/s390x-gs-linux64.c: New file.
4635         * regformats/s390-gs-linux64.dat: New file.
4636         * regformats/s390x-gs-linux64.dat: New file.
4637
4638 2017-09-23  Tom Tromey  <tom@tromey.com>
4639
4640         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4641
4642 2017-09-22  Tom Tromey  <tom@tromey.com>
4643
4644         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4645         type to scoped_restore_tmpl.
4646         <scoped_input_handler>: Initialize m_quit_handler directly.
4647
4648 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4649
4650         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4651         (cd_command): Likewise.  Free "current_directory" before
4652         assigning to it.
4653         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4654         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4655         * top.c (gdb_dirbuf): Remove global declaration.
4656         * top.h (gdb_dirbuf): Likewise.
4657
4658 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4659
4660         * gnulib/aclocal.m4: Regenerate.
4661         * gnulib/config.in: Regenerate.
4662         * gnulib/configure: Regenerate.
4663         * gnulib/import/Makefile.am: Regenerate.
4664         * gnulib/import/Makefile.in: Regenerate.
4665         * gnulib/import/assure.h: New file.
4666         * gnulib/import/at-func.c: Likewise
4667         * gnulib/import/chdir-long.c: New file.
4668         * gnulib/import/chdir-long.h: New file.
4669         * gnulib/import/cloexec.c: New file.
4670         * gnulib/import/cloexec.h: New file.
4671         * gnulib/import/close.c: New file.
4672         * gnulib/import/closedir.c: New file.
4673         * gnulib/import/dirent-private.h: New file.
4674         * gnulib/import/dup-safer.c: New file.
4675         * gnulib/import/dup.c: New file.
4676         * gnulib/import/dup2.c: New file.
4677         * gnulib/import/error.c: New file.
4678         * gnulib/import/error.h: New file.
4679         * gnulib/import/exitfail.c: New file.
4680         * gnulib/import/exitfail.h: New file.
4681         * gnulib/import/fchdir.c: New file.
4682         * gnulib/import/fcntl.c: New file.
4683         * gnulib/import/fcntl.in.h: New file.
4684         * gnulib/import/fd-hook.c: New file.
4685         * gnulib/import/fd-hook.h: New file.
4686         * gnulib/import/fd-safer.c: New file.
4687         * gnulib/import/fdopendir.c: New file.
4688         * gnulib/import/filename.h: New file.
4689         * gnulib/import/filenamecat-lgpl.c: New file.
4690         * gnulib/import/filenamecat.h: New file.
4691         * gnulib/import/fstat.c: New file.
4692         * gnulib/import/fstatat.c: New file.
4693         * gnulib/import/getcwd-lgpl.c: New file.
4694         * gnulib/import/getcwd.c: New file.
4695         * gnulib/import/getdtablesize.c: New file.
4696         * gnulib/import/getlogin_r.c: New file.
4697         * gnulib/import/getprogname.c: New file.
4698         * gnulib/import/getprogname.h: New file.
4699         * gnulib/import/gettext.h: New file.
4700         * gnulib/import/glob-libc.h: New file.
4701         * gnulib/import/glob.c: New file.
4702         * gnulib/import/glob.in.h: New file.
4703         * gnulib/import/intprops.h: New file.
4704         * gnulib/import/m4/chdir-long.m4: New file.
4705         * gnulib/import/m4/close.m4: New file.
4706         * gnulib/import/m4/closedir.m4: New file.
4707         * gnulib/import/m4/d-ino.m4: New file.
4708         * gnulib/import/m4/d-type.m4: New file.
4709         * gnulib/import/m4/dup.m4: New file.
4710         * gnulib/import/m4/dup2.m4: New file.
4711         * gnulib/import/m4/error.m4: New file.
4712         * gnulib/import/m4/fchdir.m4: New file.
4713         * gnulib/import/m4/fcntl.m4: New file.
4714         * gnulib/import/m4/fcntl_h.m4: New file.
4715         * gnulib/import/m4/fdopendir.m4: New file.
4716         * gnulib/import/m4/filenamecat.m4: New file.
4717         * gnulib/import/m4/fstat.m4: New file.
4718         * gnulib/import/m4/fstatat.m4: New file.
4719         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4720         * gnulib/import/m4/getcwd-path-max.m4: New file.
4721         * gnulib/import/m4/getcwd.m4: New file.
4722         * gnulib/import/m4/getdtablesize.m4: New file.
4723         * gnulib/import/m4/getlogin_r.m4: New file.
4724         * gnulib/import/m4/getprogname.m4: New file.
4725         * gnulib/import/m4/glob.m4: New file.
4726         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4727         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4728         * gnulib/import/m4/mempcpy.m4: New file.
4729         * gnulib/import/m4/memrchr.m4: New file.
4730         * gnulib/import/m4/mode_t.m4: New file.
4731         * gnulib/import/m4/msvc-inval.m4: New file.
4732         * gnulib/import/m4/msvc-nothrow.m4: New file.
4733         * gnulib/import/m4/open.m4: New file.
4734         * gnulib/import/m4/openat.m4: New file.
4735         * gnulib/import/m4/opendir.m4: New file.
4736         * gnulib/import/m4/readdir.m4: New file.
4737         * gnulib/import/m4/realloc.m4: New file.
4738         * gnulib/import/m4/rewinddir.m4: New file.
4739         * gnulib/import/m4/save-cwd.m4: New file.
4740         * gnulib/import/m4/strdup.m4: New file.
4741         * gnulib/import/m4/strerror.m4: New file.
4742         * gnulib/import/m4/unistd-safer.m4: New file.
4743         * gnulib/import/mempcpy.c: New file.
4744         * gnulib/import/memrchr.c: New file.
4745         * gnulib/import/msvc-inval.c: New file.
4746         * gnulib/import/msvc-inval.h: New file.
4747         * gnulib/import/msvc-nothrow.c: New file.
4748         * gnulib/import/msvc-nothrow.h: New file.
4749         * gnulib/import/open.c: New file.
4750         * gnulib/import/openat-die.c: New file.
4751         * gnulib/import/openat-priv.h: New file.
4752         * gnulib/import/openat-proc.c: New file.
4753         * gnulib/import/openat.c: New file.
4754         * gnulib/import/openat.h: New file.
4755         * gnulib/import/opendir.c: New file.
4756         * gnulib/import/pipe-safer.c: New file.
4757         * gnulib/import/readdir.c: New file.
4758         * gnulib/import/realloc.c: New file.
4759         * gnulib/import/rewinddir.c: New file.
4760         * gnulib/import/save-cwd.c: New file.
4761         * gnulib/import/save-cwd.h: New file.
4762         * gnulib/import/strdup.c: New file.
4763         * gnulib/import/strerror-override.c: New file.
4764         * gnulib/import/strerror-override.h: New file.
4765         * gnulib/import/strerror.c: New file.
4766         * gnulib/import/unistd--.h: New file.
4767         * gnulib/import/unistd-safer.h: New file.
4768         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4769         "getcwd" and "glob".
4770         * ser-tcp.c: Undefine "close" before redefining it.
4771
4772 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4773
4774         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4775         get rid of res_val.
4776
4777 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4778
4779         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4780         <sol2,sparc>: Likewise.
4781         <sol2-64,i386>: Likewise.
4782
4783         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4784         -Wdeprecated-declarations on *-*-solaris*.
4785         * configure: Regenerate.
4786
4787         * procfs.c: Include "nat/inferior.h".
4788         (procfs_info_proc): Fix typo.
4789
4790 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4791
4792         * remote.c (vector): Include.
4793         (struct private_thread_info): Add field, thread_handle.
4794         (free_private_thread_info): Deallocate storage associated with
4795         thread handle.
4796         (get_private_info_thread): Initialize `thread_handle' field.
4797         (struct thread_item): Add field, thread_handle.
4798         (clear_threads_listing_context): Deallocate storage associated
4799         with thread handle.
4800         (start_thread): Add support for "handle" attribute.
4801         (thread_attributes): Add "handle".
4802         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4803         field.
4804         (remote_update_thread_list): Update thread_handle.
4805         (remote_thread_handle_to_thread_info): New function.
4806         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4807
4808 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4809
4810         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4811         function.
4812         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4813         * python/python-internal.h (thread_object_type): Declare.
4814
4815 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4816
4817         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4818         (target_thread_handle_to_thread_info): Declare.
4819         * target.c (target_thread_handle_to_thread_info): New function.
4820         * target-delegates.c: Regenerate.
4821         * gdbthread.h (find_thread_by_handle): Declare.
4822         * thread.c (find_thread_by_handle): New function.
4823         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4824         function.
4825         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4826
4827 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4828
4829         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4830
4831 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4832
4833         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4834
4835 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4836
4837         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4838         to gdb_target_obs.
4839
4840 2017-09-20  Tom Tromey  <tom@tromey.com>
4841
4842         * breakpoint.c (struct counted_command_line): Remove.
4843         (breakpoint_commands): Update.
4844         (alloc_counted_command_line, incref_counted_command_line)
4845         (decref_counted_command_line, do_cleanup_counted_command_line)
4846         (make_cleanup_decref_counted_command_line): Remove.
4847         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4848         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4849         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4850         (save_breakpoints): Update.
4851         * breakpoint.h (counted_command_line): Now a typedef to
4852         shared_ptr.
4853         (struct breakpoint) <commands>: Now a counted_command_line.
4854         (struct bpstats) <command>: Likewise.
4855
4856 2017-09-20  Tom Tromey  <tom@tromey.com>
4857
4858         * breakpoint.c (struct commands_info, do_map_commands_command):
4859         Remove.
4860         (commands_command_1): Update.
4861         (iterate_over_related_breakpoints): Take a function_view.
4862         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4863         (delete_command): Update.
4864         (map_breakpoint_numbers): Take a function_view.
4865         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4866         (disable_command): Update.
4867         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4868         (enable_command): Update.
4869         (struct disp_data, do_enable_breakpoint_disp)
4870         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4871         (do_map_enable_delete_breakpoint): Remove.
4872         (enable_once_command, enable_count_command, enable_delete_command)
4873         (delete_trace_variable_command): Update.
4874
4875 2017-09-20  Tom Tromey  <tom@tromey.com>
4876
4877         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4878         (bpstat_clear): Use delete.
4879         (bpstats): New constructors.
4880         (bpstat_copy, bpstat_stop_status): Use new.
4881         (dprintf_after_condition_true): Update.
4882         * breakpoint.h (bpstats::bpstats): Add constructors.
4883         (bpstats::~bpstats): Add destructor.
4884
4885 2017-09-20  Pedro Alves  <palves@redhat.com>
4886
4887         * eval.c (make_params): Delete, refactored as ...
4888         (class fake_method): ... this new type's ctor.
4889         (fake_method::~fake_method): New.
4890         (evaluate_subexp_standard): Use 'fake_method'.
4891
4892 2017-09-20  Tom Tromey  <tom@tromey.com>
4893
4894         * windows-nat.c (get_windows_debug_event, windows_wait)
4895         (do_initial_windows_stuff, windows_attach): Update.
4896         * utils.c (vwarning, internal_vproblem): Update.
4897         (ui_unregister_input_event_handler_cleanup)
4898         (prepare_to_handle_input): Remove.
4899         (class scoped_input_handler): New.
4900         (defaulted_query, prompt_for_continue): Update.
4901         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4902         Update.
4903         * top.c (undo_terminal_modifications_before_exit): Update.
4904         * target/target.h (target_terminal_init, target_terminal_inferior)
4905         (target_terminal_ours): Don't declare.
4906         (class target_terminal): New.
4907         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4908         (target_terminal_ours_for_output)
4909         (make_cleanup_restore_target_terminal): Don't declare.
4910         (target_terminal_info): Remove.
4911         * target.c (enum terminal_state, terminal_state): Remove.
4912         (target_terminal::terminal_state): Define.
4913         (target_terminal::init): Rename from target_terminal_init.
4914         (target_terminal::inferior): Rename from
4915         target_terminal_inferior.
4916         (target_terminal::ours): Rename from target_terminal_ours.
4917         (target_terminal::ours_for_output): Rename from
4918         target_terminal_ours_for_output.
4919         (target_terminal::info): New method.
4920         (cleanup_restore_target_terminal)
4921         (make_cleanup_restore_target_terminal): Remove.
4922         * solib.c (handle_solib_event): Update.
4923         * remote.c (remote_serial_quit_handler): Update.
4924         (remote_terminal_inferior, remote_wait_as): Update.
4925         * record-full.c (record_full_wait_1): Update.
4926         * nto-procfs.c (procfs_create_inferior): Update.
4927         * nat/fork-inferior.c (startup_inferior): Update.
4928         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4929         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4930         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4931         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4932         (mi_breakpoint_created, mi_breakpoint_deleted)
4933         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4934         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4935         (mi_user_selected_context_changed, report_initial_inferior):
4936         Update.
4937         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4938         (linux_nat_terminal_inferior): Update.
4939         * infrun.c (follow_fork_inferior)
4940         (handle_vfork_child_exec_or_exit, do_target_resume)
4941         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4942         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4943         Update.
4944         * inflow.c (child_terminal_init, info_terminal_command): Update.
4945         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4946         (attach_command): Update.
4947         * infcall.c (call_thread_fsm_should_stop): Update.
4948         * gnu-nat.c (gnu_attach): Update.
4949         * extension.c (struct active_ext_lang_state)
4950         (restore_active_ext_lang): Update.
4951         * exceptions.c (print_flush): Update.
4952         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4953         (struct quit_handler_cleanup_data, restore_quit_handler)
4954         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4955         Remove.
4956         * cp-support.c (gdb_demangle): Update.
4957         * breakpoint.c (update_inserted_breakpoint_locations)
4958         (insert_breakpoint_locations, handle_jit_event)
4959         (disable_breakpoints_in_unloaded_shlib): Update.
4960         * annotate.c (annotate_breakpoints_invalid)
4961         (annotate_frames_invalid): Update.
4962
4963 2017-09-20  Tom Tromey  <tom@tromey.com>
4964
4965         * main.c (catch_command_errors): Rename from
4966         catch_command_errors_const.
4967         (captured_main_1): Update.
4968
4969 2017-09-20  Pedro Alves  <palves@redhat.com>
4970
4971         * cli/cli-cmds.c (list_command): Use print_sal_location.
4972         (print_sal_location): New function.
4973         (ambiguous_line_spec): Use print_sal_location.
4974         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4975         * symtab.c (find_function_start_sal): Likewise.
4976         * symtab.h (symtab_and_line::symbol): New field.
4977
4978 2017-09-20  Pedro Alves  <palves@redhat.com>
4979
4980         * linespec.c (minsym_found): Handle non-text minsyms.
4981         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4982
4983 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4984
4985         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4986         backslash.
4987
4988 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4989
4990         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4991         vmovups instead vmovaps.
4992         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4993
4994 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4995
4996         * NEWS (Changes since GDB 8.0): Add starti.
4997         * infcmd.c (enum run_break): New.
4998         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4999         case.
5000         (run_command): Use enum run_how.
5001         (start_command): Likewise.
5002         (starti_command): New function.
5003         (RUN_ARGS_HELP): New macro.
5004         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5005         commands.  Add starti command.
5006
5007 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5008
5009         * Makefile.in (monitor.o): Remove the rule.
5010
5011 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5012
5013         * annotate.h (struct annotate_arg_emitter): Use
5014         DISABLE_COPY_AND_ASSIGN.
5015         * common/refcounted-object.h (refcounted_object): Likewise.
5016         * completer.h (struct completion_result): Likewise.
5017         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5018         * filename-seen-cache.h (filename_seen_cache): Likewise.
5019         * gdbcore.h (thread_section_name): Likewise.
5020         * gdb_regex.h (compiled_regex): Likewise.
5021         * gdbthread.h (scoped_restore_current_thread): Likewise.
5022         * inferior.h (scoped_restore_current_inferior): Likewise.
5023         * jit.c (jit_reader): Likewise.
5024         * linespec.h (struct linespec_result): Likewise.
5025         * mi/mi-parse.h (struct mi_parse): Likewise.
5026         * nat/fork-inferior.c (execv_argv): Likewise.
5027         * progspace.h (scoped_restore_current_program_space): Likewise.
5028         * python/python-internal.h (class gdbpy_enter): Likewise.
5029         * regcache.h (regcache): Likewise.
5030         * target-descriptions.c (struct tdesc_reg): Likewise.
5031         (struct tdesc_type): Likewise.
5032         (struct tdesc_feature): Likewise.
5033         * ui-out.h (ui_out_emit_type): Likewise.
5034
5035 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5036
5037         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5038         label abort_expression.
5039
5040 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5041
5042         * common/buffer.c (buffer_xml_printf): Adjust.
5043         * common/xml-utils.c (xml_escape_text): Change return type to
5044         std::string, update code accordingly.
5045         * common/xml-utils.h (xml_escape_text): Change return type to
5046         std::string.
5047         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5048         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5049         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5050         Adjust.
5051
5052 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5053
5054         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5055         (SUBDIR_UNITTESTS_OBS): Add new object file.
5056         * unittests/xml-utils-selftests.c: New file.
5057
5058 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5059
5060         * common/selftest.h (selftest): New struct/interface.
5061         (register_test): Add name parameter, add new overload.
5062         (run_tests): Add filter parameter.
5063         (for_each_selftest_ftype): New typedef.
5064         (for_each_selftest): New declaration.
5065         * common/selftest.c (tests): Change type to
5066         map<string, unique_ptr<selftest>>.
5067         (simple_selftest): New struct.
5068         (register_test): New function.
5069         (register_test): Add name parameter and use it.
5070         (run_tests): Add filter parameter and use it.  Add prints.
5071         Adjust to vector -> map change.
5072         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5073         registering selftests.
5074         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5075         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5076         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5077         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5078         * findvar.c (_initialize_findvar): Likewise.
5079         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5080         * maint.c (maintenance_selftest): Update call to run_tests.
5081         (maintenance_info_selftests): New function.
5082         (_initialize_maint_cmds): Register "maintenance info selftests"
5083         command.  Update "maintenance selftest" doc.
5084         * regcache.c (_initialize_regcache): Add names when registering
5085         selftests.
5086         * rust-exp.y (_initialize_rust_exp): Likewise.
5087         * selftest-arch.c (gdbarch_selftest): New struct.
5088         (gdbarch_tests): Remove.
5089         (register_test_foreach_arch): Add name parameter.  Call
5090         register_test.
5091         (tests_with_arch): Remove, move most content to
5092         gdbarch_selftest::operator().
5093         (_initialize_selftests_foreach_arch): Remove.
5094         * selftest-arch.h (register_test_foreach_arch): Add name
5095         parameter.
5096         (run_tests_with_arch): New declaration.
5097         * utils-selftests.c (_initialize_utils_selftests): Add names
5098         when registering selftests.
5099         * utils.c (_initialize_utils): Likewise.
5100         * unittests/array-view-selftests.c
5101         (_initialize_array_view_selftests): Likewise.
5102         * unittests/environ-selftests.c (_initialize_environ_selftests):
5103         Likewise.
5104         * unittests/function-view-selftests.c
5105         (_initialize_function_view_selftests): Likewise.
5106         * unittests/offset-type-selftests.c
5107         (_initialize_offset_type_selftests): Likewise.
5108         * unittests/optional-selftests.c
5109         (_initialize_optional_selftests): Likewise.
5110         * unittests/scoped_restore-selftests.c
5111         (_initialize_scoped_restore_selftests): Likewise.
5112         * NEWS: Document "maintenance selftest" and "maint info
5113         selftests".
5114
5115 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5116
5117         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5118         scoped_restore.
5119
5120 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5121
5122         * mi/mi-main.c (mi_load_progress): Make uiout variable
5123         a unique_ptr.
5124
5125 2017-09-15  Pedro Alves  <palves@redhat.com>
5126
5127         * compile/compile-c-types.c (convert_enum, convert_int)
5128         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5129
5130 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5131
5132         * dwarf2read.c (copy_string): Remove.
5133         (parse_macro_definition): Replace copy_string with savestring.
5134
5135 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5136
5137         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5138         gdb_target_obs.
5139         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5140         Likewise.
5141         (i[34567]86-*-linux*): Likewise.
5142
5143 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5144
5145         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5146         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5147         <stack>: Change type to std::vector.
5148         <stack_len, stack_allocated>: Remove.
5149         <grow_stack>: Remove.
5150         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5151         (dwarf_expr_context::~dwarf_expr_context): Remove.
5152         (dwarf_expr_context::grow_stack): Remove.
5153         (dwarf_expr_context::push): Adjust.
5154         (dwarf_expr_context::pop): Adjust.
5155         (dwarf_expr_context::fetch): Adjust.
5156         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5157         (dwarf_expr_context::stack_empty_p): Adjust.
5158         (dwarf_expr_context::execute_stack_op): Adjust.
5159
5160 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5161
5162         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5163         return type to bool.
5164         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5165
5166 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5167
5168         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5169         Change type to bool.
5170         (dwarf_stack_value) <in_stack_memory>: Likewise.
5171         (dwarf_expr_context) <push_address>: Change parameter type to
5172         bool.
5173         <fetch_in_stack_memory>: Change return type to bool.
5174         <push>: Change parameter type to bool.
5175         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5176         to bool.
5177         (dwarf_expr_context::push_address): Likewise.
5178         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5179         to bool.
5180         (dwarf_expr_context::execute_stack_op): Adjust.
5181         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5182
5183 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5184
5185         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5186         (struct dwarf_expr_context) <n_pieces>: Remove.
5187         <pieces>: Change type to std::vector.
5188         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5189         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5190         pieces.
5191         (dwarf_expr_context::add_piece): Adjust.
5192         * dwarf2loc.c (struct piece_closure): Initialize fields.
5193         <n_pieces>: Remove.
5194         <pieces>: Change type to std::vector.
5195         (allocate_piece_closure): Adjust, change parameter to
5196         std::vector rvalue and std::move it to piece_closure.
5197         (rw_pieced_value): Adjust.
5198         (check_pieced_synthetic_pointer): Adjust.
5199         (indirect_synthetic_pointer): Adjust.
5200         (coerce_pieced_ref): Adjust.
5201         (free_pieced_value_closure):  Adjust.  Use delete to free
5202         piece_closure.
5203         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5204         to allocate_piece_closure.
5205         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5206
5207 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5208
5209         * probe.h (probe_ops_cp): Remove typedef.
5210         (DEF_VEC_P (probe_ops_cp)): Remove.
5211         (all_probe_ops): Change type to std::vector.
5212         * probe.c (info_probes_for_ops): Adjust to vector change.
5213         (probe_linespec_to_ops): Likewise.
5214         (all_probe_ops): Change type to std::vector.
5215         (_initialize_probe): Adjust to vector change.
5216         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5217         * elfread.c (elf_get_probes): Likewise.
5218         * stap-probe.c (_initialize_stap_probe): Likewise.
5219
5220 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5221
5222         * probe.h (struct bound_probe): Define constructors.
5223         * probe.c (bound_probe_s): Remove typedef.
5224         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5225         (collect_probes): Change return type to std::vector, remove
5226         cleanup.
5227         (compare_probes): Return bool, change parameter type.  Change
5228         semantic to "less than".
5229         (gen_ui_out_table_header_info): Change parameter to std::vector
5230         and update.
5231         (exists_probe_with_pops): Likewise.
5232         (info_probes_for_ops): Update to std::vector change.
5233         (enable_probes_command): Likewise.
5234         (disable_probes_command): Likewise.
5235
5236 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5237
5238         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5239         vec to std::vector.
5240         * probe.c (parse_probes_in_pspace): Update.
5241         (find_probes_in_objfile): Update.
5242         (find_probe_by_pc): Update.
5243         (collect_probes): Update.
5244         (probe_any_get_probes): Update.
5245         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5246         return type to reference to std::vector.
5247         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5248         std::vector and update.
5249         (dtrace_process_dof): Likewise.
5250         (dtrace_get_probes): Likewise.
5251         * elfread.c (elf_get_probes): Change return type to std::vector,
5252         store an std::vector in bfd_data.
5253         (probe_key_free): Update to std::vector.
5254         * stap-probe.c (handle_stap_probe): Change parameter to
5255         std::vector and update.
5256         (stap_get_probes): Likewise.
5257         * symfile-debug.c (debug_sym_get_probes): Change return type to
5258         std::vector and update.
5259
5260 2017-09-11  Tom Tromey  <tom@tromey.com>
5261
5262         * breakpoint.c (program_breakpoint_here_p): Update.
5263         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5264         from make_show_memory_breakpoints_cleanup.  Return a
5265         scoped_restore_tmpl<int>.
5266         (restore_show_memory_breakpoints): Remove.
5267         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5268         * mem-break.c (memory_validate_breakpoint): Update.
5269         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5270         (ia64_memory_remove_breakpoint): Update.
5271         (ia64_breakpoint_from_pc): Update.
5272         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5273         from make_show_memory_breakpoints_cleanup.
5274
5275 2017-09-11  Tom Tromey  <tom@tromey.com>
5276
5277         * d-namespace.c (d_lookup_symbol): Use std::string.
5278         (find_symbol_in_baseclass): Likewise.
5279
5280 2017-09-11  Tom Tromey  <tom@tromey.com>
5281
5282         * ctf.c (ctf_start): Use std::string.
5283
5284 2017-09-11  Tom Tromey  <tom@tromey.com>
5285
5286         * ada-lang.c (is_known_support_routine): Update.
5287         (ada_unhandled_exception_name_addr_from_raise): Update.
5288         * guile/scm-frame.c (gdbscm_frame_name): Update.
5289         * python/py-frame.c (frapy_name): Update.
5290         (frapy_function): Update.
5291         * stack.h (find_frame_funname): Update.
5292         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5293         (print_frame): Update.
5294
5295 2017-09-11  Tom Tromey  <tom@tromey.com>
5296
5297         * findcmd.c (put_bits): Take a gdb::byte_vector.
5298         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5299         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5300         cleanups.
5301         (find_command): Update.
5302
5303 2017-09-11  Tom Tromey  <tom@tromey.com>
5304
5305         * cli/cli-script.c (class scoped_restore_hook_in): New.
5306         (clear_hook_in_cleanup): Remove.
5307         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5308         scoped_restore_hook_in.
5309
5310 2017-09-11  Tom Tromey  <tom@tromey.com>
5311
5312         * cli/cli-script.c (restore_interp): Remove.
5313         (read_command_lines): Use scoped_restore_interp.
5314         * interps.c (scoped_restore_interp::set_temp): Rename from
5315         interp_set_temp.
5316         * interps.h (class scoped_restore_interp): New.
5317         (interp_set_temp): Remove.
5318
5319 2017-09-11  Tom Tromey  <tom@tromey.com>
5320
5321         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5322         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5323         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5324         scoped_restore.
5325         (mi_cmd_break_insert_1): Update.
5326         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5327         scoped_restore.
5328
5329 2017-09-11  Tom Tromey  <tom@tromey.com>
5330
5331         * demangle.c (demangle_command): Update.
5332         * breakpoint.c (disable_command): Update.
5333         (enable_command): Update.
5334         (find_location_by_number): Make "number" const.  Use
5335         get_number_trailer.
5336         * cli/cli-utils.c (extract_arg): Return std::string.
5337         * probe.c (parse_probe_linespec): Update.  Change types.
5338         (collect_probes): Take string arguments.
5339         (parse_probe_linespec): Likewise.
5340         (info_probes_for_ops): Update.
5341         (enable_probes_command): Update.
5342         (disable_probes_command): Update.
5343         * break-catch-sig.c (catch_signal_split_args): Update.
5344         * mi/mi-parse.c (mi_parse): Update.
5345
5346 2017-09-11  Tom Tromey  <tom@tromey.com>
5347
5348         * language.h (language_enum): Make argument const.
5349         * language.c (language_enum): Make argument const.
5350
5351 2017-09-11  Tom Tromey  <tom@tromey.com>
5352
5353         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5354         as function.
5355         (skip_to_space): Rename from skip_to_space_const.
5356         * common/common-utils.c (skip_to_space): New function.
5357         (skip_to_space): Rename from skip_to_space_const.
5358         * cli/cli-utils.h (get_number): Rename from get_number_const.
5359         (extract_arg): Rename from extract_arg_const.
5360         * cli/cli-utils.c (get_number): Rename from get_number_const.
5361         (extract_arg): Rename from extract_arg_const.
5362         (number_or_range_parser::get_number): Use ::get_number.
5363         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5364         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5365         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5366         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5367         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5368         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5369         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5370         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5371
5372 2017-09-11  Tom Tromey  <tom@tromey.com>
5373
5374         * python/python.c (do_start_initialization): Use
5375         py-event-types.def to initialize types.
5376         Define all object type structures.
5377         * python/python-internal.h: Don't declare event initialization
5378         functions.
5379         * python/py-threadevent.c (thread_event_object_type): Don't
5380         define.
5381         * python/py-stopevent.c (stop_event_object_type): Don't define.
5382         * python/py-signalevent.c (signal_event_object_type): Don't
5383         declare or define.
5384         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5385         (clear_objfiles_event_object_type): Don't declare or define.
5386         * python/py-infevents.c (inferior_call_pre_event_object_type)
5387         (inferior_call_post_event_object_type)
5388         (register_changed_event_object_type)
5389         (memory_changed_event_object_type): Don't declare or define.
5390         * python/py-inferior.c (new_thread_event_object_type)
5391         (new_inferior_event_object_type)
5392         (inferior_deleted_event_object_type): Don't declare or define.
5393         * python/py-exitedevent.c (exited_event_object_type): Don't
5394         declare or define.
5395         * python/py-evts.c (gdbpy_initialize_py_events): Use
5396         py-all-events.def.
5397         * python/py-events.h (thread_event_object_type): Don't declare.
5398         (events_object): Use py-all-events.def.
5399         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5400         py-event-types.def.
5401         * python/py-event-types.def: New file.
5402         * python/py-continueevent.c (create_continue_event_object): Don't
5403         declare or define.
5404         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5405         declare or define.
5406         * python/py-all-events.def: New file.
5407
5408 2017-09-11  Tom Tromey  <tom@tromey.com>
5409
5410         * python/py-threadevent.c (create_thread_event_object): Return
5411         gdbpy_ref.
5412         * python/py-stopevent.h (create_stop_event_object)
5413         (create_breakpoint_event_object, create_signal_event_object):
5414         Update.
5415         * python/py-stopevent.c (create_stop_event_object): Return
5416         gdbpy_ref.
5417         (emit_stop_event): Update.
5418         * python/py-signalevent.c (create_signal_event_object): Return
5419         gdbpy_ref.
5420         * python/py-infevents.c (create_inferior_call_event_object):
5421         Update.
5422         * python/py-event.h (create_event_object)
5423         (create_thread_event_object): Update.
5424         * python/py-event.c (create_event_object): Return gdbpy_ref.
5425         * python/py-continueevent.c: Return gdbpy_ref.
5426         * python/py-bpevent.c (create_breakpoint_event_object): Return
5427         gdbpy_ref.
5428
5429 2017-09-11  Tom Tromey  <tom@tromey.com>
5430
5431         PR python/15622:
5432         * NEWS: Add entry.
5433         * python/python.c (do_start_initialization): Initialize new event
5434         types.
5435         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5436         (gdbpy_initialize_inferior_deleted_event)
5437         (gdbpy_initialize_new_thread_event): Declare.
5438         * python/py-threadevent.c (create_thread_event_object): Add option
5439         "thread" parameter.
5440         * python/py-inferior.c (new_thread_event_object_type)
5441         (new_inferior_event_object_type)
5442         (inferior_deleted_event_object_type): Declare.
5443         (python_new_inferior, python_inferior_deleted): New functions.
5444         (add_thread_object): Emit new_thread event.
5445         (gdbpy_initialize_inferior): Attach new functions to corresponding
5446         observers.
5447         (new_thread, new_inferior, inferior_deleted): Define new event
5448         types.
5449         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5450         registries.
5451         * python/py-events.h (events_object) <new_inferior,
5452         inferior_deleted, new_thread>: New fields.
5453         * python/py-event.h (create_thread_event_breakpoint): Add optional
5454         "thread" parameter.
5455
5456 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5457
5458         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5459         check current_ui instead.
5460         (internal_vproblem): Likewise.
5461
5462 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * thread.c (print_thread_info_1): Remove unnecessary calls to
5465         uiout->is_mi_like_p.
5466
5467 2017-09-09  Tom Tromey  <tom@tromey.com>
5468
5469         * namespace.h (add_using_directive): Update.
5470         * namespace.c (add_using_directive): Change type of excludes to
5471         std::vector.
5472         * dwarf2read.c (read_import_statement): Use std::vector.
5473         (read_namespace): Update.
5474         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5475
5476 2017-09-09  Tom Tromey  <tom@tromey.com>
5477
5478         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5479
5480 2017-09-09  Tom Tromey  <tom@tromey.com>
5481
5482         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5483
5484 2017-09-09  Tom Tromey  <tom@tromey.com>
5485
5486         * stack.c (func_command): Use gdb::def_vector.
5487
5488 2017-09-09  Tom Tromey  <tom@tromey.com>
5489
5490         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5491         ui_out_emit_list, ui_out_emit_tuple.
5492         (mi_cmd_var_update): Likewise.
5493
5494 2017-09-09  Tom Tromey  <tom@tromey.com>
5495
5496         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5497         ui_out_redirect_pop.
5498         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5499         ui_out_redirect_pop.
5500         * utils.c (do_ui_out_redirect_pop)
5501         (make_cleanup_ui_out_redirect_pop): Remove.
5502         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5503         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5504         * ui-out.h (ui_out_redirect_pop): New class.
5505
5506 2017-09-09  Tom Tromey  <tom@tromey.com>
5507
5508         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5509         (list_available_thread_groups, mi_cmd_list_thread_groups)
5510         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5511         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5512         Likewise.
5513
5514 2017-09-09  Tom Tromey  <tom@tromey.com>
5515
5516         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5517         ui_out_emit_tuple.
5518
5519 2017-09-09  Tom Tromey  <tom@tromey.com>
5520
5521         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5522         * stack.c (print_frame): Use ui_out_emit_tuple.
5523         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5524         (info_spu_mailbox_command, info_spu_dma_command)
5525         (info_spu_proxydma_command): Likewise.
5526         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5527         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5528         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5529         ui_out_emit_tuple.
5530         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5531
5532 2017-09-09  Tom Tromey  <tom@tromey.com>
5533
5534         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5535         (class ui_out_emit_table): Update comment.
5536         * ui-out.c (do_cleanup_table_end)
5537         (make_cleanup_ui_out_table_begin_end): Remove.
5538         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5539         (info_spu_dma_cmdlist): Likewise.
5540         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5541         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5542         ui_out_emit_table.
5543
5544 2017-09-09  Tom Tromey  <tom@tromey.com>
5545
5546         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5547         ui_out_emit_list, gdb::optional.
5548
5549 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5550
5551         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5552         prototype.
5553         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5554         prototype.
5555         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5556         prototype.
5557         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5558         * ada-exp.y: Remove _initialize_ada_exp prototype.
5559         * ada-lang.c: Remove _initialize_ada_language prototype.
5560         * ada-tasks.c: Remove _initialize_tasks prototype.
5561         * addrmap.c: Remove _initialize_addrmap prototype.
5562         * agent.c: Remove _initialize_agent prototype.
5563         * aix-thread.c: Remove _initialize_aix_thread prototype.
5564         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5565         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5566         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5567         prototype.
5568         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5569         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5570         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5571         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5572         prototype.
5573         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5574         prototype.
5575         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5576         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5577         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5578         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5579         prototype.
5580         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5581         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5582         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5583         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5584         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5585         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5586         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5587         prototype.
5588         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5589         prototype.
5590         * annotate.c: Remove _initialize_annotate prototype.
5591         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5592         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5593         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5594         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5595         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5596         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5597         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5598         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5599         prototype.
5600         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5601         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5602         * auto-load.c: Remove _initialize_auto_load prototype.
5603         * auxv.c: Remove _initialize_auxv prototype.
5604         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5605         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5606         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5607         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5608         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5609         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5610         prototype.
5611         * break-catch-throw.c: Remove _initialize_break_catch_throw
5612         prototype.
5613         * breakpoint.c: Remove _initialize_breakpoint prototype.
5614         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5615         * btrace.c: Remove _initialize_btrace prototype.
5616         * charset.c: Remove _initialize_charset prototype.
5617         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5618         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5619         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5620         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5621         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5622         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5623         * coffread.c: Remove _initialize_coffread prototype.
5624         * compile/compile.c: Remove _initialize_compile prototype.
5625         * complaints.c: Remove _initialize_complaints prototype.
5626         * completer.c: Remove _initialize_completer prototype.
5627         * copying.awk: Remove _initialize_copying prototype.
5628         * copying.c: Regenerate.
5629         * core-regset.c: Remove _initialize_core_regset prototype.
5630         * corefile.c: Remove _initialize_core prototype.
5631         * corelow.c: Remove _initialize_corelow prototype.
5632         * cp-abi.c: Remove _initialize_cp_abi prototype.
5633         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5634         * cp-support.c: Remove _initialize_cp_support prototype.
5635         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5636         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5637         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5638         * ctf.c: Remove _initialize_ctf prototype.
5639         * d-lang.c: Remove _initialize_d_language prototype.
5640         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5641         prototype.
5642         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5643         * dbxread.c: Remove _initialize_dbxread prototype.
5644         * dcache.c: Remove _initialize_dcache prototype.
5645         * demangle.c: Remove _initialize_demangler prototype.
5646         * disasm-selftests.c: Remove _initialize_disasm_selftests
5647         prototype.
5648         * disasm.c: Remove _initialize_disasm prototype.
5649         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5650         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5651         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5652         prototype.
5653         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5654         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5655         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5656         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5657         * elfread.c: Remove _initialize_elfread prototype.
5658         * exec.c: Remove _initialize_exec prototype.
5659         * extension.c: Remove _initialize_extension prototype.
5660         * f-lang.c: Remove _initialize_f_language prototype.
5661         * f-valprint.c: Remove _initialize_f_valprint prototype.
5662         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5663         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5664         * filesystem.c: Remove _initialize_filesystem prototype.
5665         * findcmd.c: Remove _initialize_mem_search prototype.
5666         * fork-child.c: Remove _initialize_fork_child prototype.
5667         * frame-base.c: Remove _initialize_frame_base prototype.
5668         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5669         * frame.c: Remove _initialize_frame prototype.
5670         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5671         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5672         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5673         * gcore.c: Remove _initialize_gcore prototype.
5674         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5675         * gdbarch.c: Regenerate.
5676         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5677         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5678         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5679         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5680         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5681         * go-lang.c: Remove _initialize_go_language prototype.
5682         * go32-nat.c: Remove _initialize_go32_nat prototype.
5683         * guile/guile.c: Remove _initialize_guile prototype.
5684         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5685         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5686         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5687         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5688         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5689         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5690         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5691         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5692         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5693         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5694         prototype.
5695         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5696         prototype.
5697         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5698         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5699         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5700         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5701         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5702         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5703         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5704         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5705         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5706         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5707         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5708         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5709         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5710         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5711         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5712         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5713         prototype.
5714         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5715         prototype.
5716         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5717         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5718         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5719         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5720         * infcall.c: Remove _initialize_infcall prototype.
5721         * infcmd.c: Remove _initialize_infcmd prototype.
5722         * inferior.c: Remove _initialize_inferiors prototype.
5723         * inflow.c: Remove _initialize_inflow prototype.
5724         * infrun.c: Remove _initialize_infrun prototype.
5725         * interps.c: Remove _initialize_interpreter prototype.
5726         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5727         * jit.c: Remove _initialize_jit prototype.
5728         * language.c: Remove _initialize_language prototype.
5729         * linux-fork.c: Remove _initialize_linux_fork prototype.
5730         * linux-nat.c: Remove _initialize_linux_nat prototype.
5731         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5732         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5733         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5734         * m2-lang.c: Remove _initialize_m2_language prototype.
5735         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5736         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5737         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5738         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5739         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5740         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5741         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5742         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5743         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5744         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5745         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5746         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5747         * machoread.c: Remove _initialize_machoread prototype.
5748         * macrocmd.c: Remove _initialize_macrocmd prototype.
5749         * macroscope.c: Remove _initialize_macroscope prototype.
5750         * maint.c: Remove _initialize_maint_cmds prototype.
5751         * mdebugread.c: Remove _initialize_mdebugread prototype.
5752         * memattr.c: Remove _initialize_mem prototype.
5753         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5754         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5755         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5756         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5757         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5758         * microblaze-linux-tdep.c: Remove
5759         _initialize_microblaze_linux_tdep prototype.
5760         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5761         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5762         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5763         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5764         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5765         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5766         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5767         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5768         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5769         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5770         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5771         prototype.
5772         * mipsread.c: Remove _initialize_mipsread prototype.
5773         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5774         prototype.
5775         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5776         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5777         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5778         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5779         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5780         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5781         prototype.
5782         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5783         * nto-procfs.c: Remove _initialize_procfs prototype.
5784         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5785         * objc-lang.c: Remove _initialize_objc_language prototype.
5786         * objfiles.c: Remove _initialize_objfiles prototype.
5787         * observer.c: Remove observer_test_first_notification_function,
5788         observer_test_second_notification_function,
5789         observer_test_third_notification_function, and
5790         _initialize_observer prototypes.
5791         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5792         * osabi.c: Remove _initialize_gdb_osabi prototype.
5793         * osdata.c: Remove _initialize_osdata prototype.
5794         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5795         * parse.c: Remove _initialize_parse prototype.
5796         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5797         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5798         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5799         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5800         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5801         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5802         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5803         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5804         * printcmd.c: Remove _initialize_printcmd prototype.
5805         * probe.c: Remove _initialize_probe prototype.
5806         * proc-api.c: Remove _initialize_proc_api prototype.
5807         * proc-events.c: Remove _initialize_proc_events prototype.
5808         * proc-service.c: Remove _initialize_proc_service prototype.
5809         * procfs.c: Remove _initialize_procfs prototype.
5810         * psymtab.c: Remove _initialize_psymtab prototype.
5811         * python/python.c: Remove _initialize_python prototype.
5812         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5813         * record-btrace.c: Remove _initialize_record_btrace prototype.
5814         * record-full.c: Remove _initialize_record_full prototype.
5815         * record.c: Remove _initialize_record prototype.
5816         * regcache.c: Remove _initialize_regcache prototype.
5817         * reggroups.c: Remove _initialize_reggroup prototype.
5818         * remote-notif.c: Remove _initialize_notif prototype.
5819         * remote-sim.c: Remove _initialize_remote_sim prototype.
5820         * remote.c: Remove _initialize_remote prototype.
5821         * reverse.c: Remove _initialize_reverse prototype.
5822         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5823         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5824         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5825         prototype.
5826         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5827         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5828         * rust-exp.y: Remove _initialize_rust_exp prototype.
5829         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5830         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5831         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5832         * score-tdep.c: Remove _initialize_score_tdep prototype.
5833         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5834         prototype.
5835         * ser-go32.c: Remove _initialize_ser_dos prototype.
5836         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5837         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5838         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5839         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5840         * serial.c: Remove _initialize_serial prototype.
5841         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5842         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5843         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5844         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5845         * skip.c: Remove _initialize_step_skip prototype.
5846         * sol-thread.c: Remove _initialize_sol_thread prototype.
5847         * solib-aix.c: Remove _initialize_solib_aix prototype.
5848         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5849         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5850         * solib-frv.c: Remove _initialize_frv_solib prototype.
5851         * solib-spu.c: Remove _initialize_spu_solib prototype.
5852         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5853         * solib-target.c: Remove _initialize_solib_target prototype.
5854         * solib.c: Remove _initialize_solib prototype.
5855         * source.c: Remove _initialize_source prototype.
5856         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5857         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5858         prototype.
5859         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5860         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5861         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5862         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5863         prototype.
5864         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5865         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5866         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5867         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5868         prototype.
5869         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5870         prototype.
5871         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5872         prototype.
5873         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5874         prototype.
5875         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5876         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5877         prototype.
5878         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5879         prototype.
5880         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5881         prototype.
5882         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5883         prototype.
5884         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5885         prototype.
5886         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5887         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5888         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5889         * stabsread.c: Remove _initialize_stabsread prototype.
5890         * stack.c: Remove _initialize_stack prototype.
5891         * stap-probe.c: Remove _initialize_stap_probe prototype.
5892         * std-regs.c: Remove _initialize_frame_reg prototype.
5893         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5894         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5895         * symfile.c: Remove _initialize_symfile prototype.
5896         * symmisc.c: Remove _initialize_symmisc prototype.
5897         * symtab.c: Remove _initialize_symtab prototype.
5898         * target-dcache.c: Remove _initialize_target_dcache prototype.
5899         * target-descriptions.c: Remove _initialize_target_descriptions
5900         prototype.
5901         * thread.c: Remove _initialize_thread prototype.
5902         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5903         prototype.
5904         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5905         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5906         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5907         prototype.
5908         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5909         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5910         * tracefile.c: Remove _initialize_tracefile prototype.
5911         * tracepoint.c: Remove _initialize_tracepoint prototype.
5912         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5913         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5914         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5915         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5916         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5917         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5918         * tui/tui.c: Remove _initialize_tui prototype.
5919         * typeprint.c: Remove _initialize_typeprint prototype.
5920         * user-regs.c: Remove _initialize_user_regs prototype.
5921         * utils.c: Remove _initialize_utils prototype.
5922         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5923         * valarith.c: Remove _initialize_valarith prototype.
5924         * valops.c: Remove _initialize_valops prototype.
5925         * valprint.c: Remove _initialize_valprint prototype.
5926         * value.c: Remove _initialize_values prototype.
5927         * varobj.c: Remove _initialize_varobj prototype.
5928         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5929         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5930         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5931         * windows-nat.c: Remove _initialize_windows_nat,
5932         _initialize_check_for_gdb_ini, and _initialize_loadable
5933         prototypes.
5934         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5935         * xcoffread.c: Remove _initialize_xcoffread prototype.
5936         * xml-support.c: Remove _initialize_xml_support prototype.
5937         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5938         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5939         prototype.
5940         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5941         prototype.
5942         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5943
5944 2017-09-08  Keith Seitz  <keiths@redhat.com>
5945
5946         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5947         field.
5948
5949 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5950
5951         * f-valprint.c (f_val_print): Remove check for one byte
5952         sized integers. Remove printing of character type.
5953
5954 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5955             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5956             Bernhard Heckel  <bernhard.heckel@intel.com>
5957
5958         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5959         to maintain proper indentation when printing pointers/refs.
5960
5961 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5962
5963         GDB 8.0.1 released.
5964
5965 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5966
5967         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5968
5969 2017-09-05  Tom Tromey  <tom@tromey.com>
5970
5971         * parse.c (funcall_chain): Now a std::vector.
5972         (start_arglist, end_arglist): Simplify.
5973         (free_funcalls): Remove.
5974         (parse_exp_in_context_1): Remove cleanup.
5975
5976 2017-09-05  Tom Tromey  <tom@tromey.com>
5977
5978         * go-exp.y (go_parse): Don't create a cleanup.
5979
5980 2017-09-05  Tom Tromey  <tom@tromey.com>
5981
5982         * d-exp.y (PrimaryExpression): Use std::string.
5983         (d_parse): Don't create a cleanup.
5984
5985 2017-09-05  Tom Tromey  <tom@tromey.com>
5986
5987         * utils.c (do_clear_parser_state): Remove.
5988         (make_cleanup_clear_parser_state): Remove.
5989         * p-exp.y (pascal_parse): Use scoped_restore.
5990         * m2-exp.y (m2_parse): Use scoped_restore.
5991         * f-exp.y (f_parse): Use scoped_restore.
5992         * d-exp.y (d_parse): Use scoped_restore.
5993         * c-exp.y (c_parse): Use scoped_restore.
5994         * ada-exp.y (ada_parse): Use scoped_restore.
5995         * utils.h (make_cleanup_clear_parser_state): Remove.
5996
5997 2017-09-06  Keith Seitz  <keiths@redhat.com>
5998
5999         * dwarf2read.c (dw2_linkage_name_attr): New function.
6000         (dw2_linkage_name): New function.
6001         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6002         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6003         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6004
6005 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6006
6007         * config/djgpp/djconfig.sh: Correct shell portability issue.
6008
6009 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6010
6011         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6012
6013 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6014
6015         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6016         * NEWS: Mention new FreeBSD/mips native configuration.
6017         * configure.host: Add aarch64*-*-freebsd*.
6018         * configure.nat: Likewise.
6019         * aarch64-fbsd-nat.c: New file.
6020
6021 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6022
6023         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6024         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6025         * NEWS: Mention new FreeBSD/aarch64 target.
6026         * configure.tgt: Add aarch64*-*-freebsd*.
6027         * aarch64-fbsd-tdep.c: New file.
6028         * aarch64-fbsd-tdep.h: New file.
6029
6030 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6031
6032         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6033
6034 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6035
6036         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6037         of TLS symbols.
6038
6039 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6040
6041         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6042         call.
6043
6044 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6045
6046         * infrun.c (follow_exec): Call add_thread after
6047         target_find_description.
6048
6049 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6050
6051         * infrun.c (handle_inferior_event_1): When exec'ing, read
6052         stop_pc after follow_exec.
6053
6054 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6055
6056         * remote.c (process_g_packet): Update error message.
6057
6058 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6059
6060         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6061         targets.
6062
6063 2017-09-05  Pedro Alves  <palves@redhat.com>
6064
6065         * eval.c (eval_call, evaluate_funcall): New functions, factored
6066         out from ...
6067         (evaluate_subexp_standard): ... this.
6068
6069 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6070
6071         * amd64-tdep.c (amd64_target_description): Create target
6072         descriptions.
6073         (_initialize_amd64_tdep): Don't call functions
6074         initialize_tdesc_amd64_*.  Add self tests.
6075         * arch/amd64.c (amd64_create_target_description): Add parameter
6076         is_linux.  Call set_tdesc_osabi if is_linux is true.
6077         * arch/amd64.h (amd64_create_target_description): Update the
6078         declaration.
6079         * arch/i386.c (i386_create_target_description): Add parameter
6080         is_linux.  Call set_tdesc_osabi if is_linux is true.
6081         * arch/i386.h (i386_create_target_description): Update
6082         declaration.
6083         * configure.tgt: Add i386.o to gdb_target_obs.
6084         * features/Makefile (XMLTOC): Remove i386/*.xml.
6085         * features/i386/amd64-avx-avx512.c: Remove.
6086         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6087         * features/i386/amd64-avx-mpx.c: Remove.
6088         * features/i386/amd64-avx.c: Remove.
6089         * features/i386/amd64-mpx.c: Remove.
6090         * features/i386/amd64.c: Remove.
6091         * features/i386/i386-avx-avx512.c: Remove.
6092         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6093         * features/i386/i386-avx-mpx.c: Remove.
6094         * features/i386/i386-avx.c: Remove.
6095         * features/i386/i386-mmx.c: Remove.
6096         * features/i386/i386-mpx.c: Remove.
6097         * features/i386/i386.c: Remove.
6098         * i386-tdep.c: Don't include features/i386/i386*.c., include
6099         target-descriptions.h and arch/i386.h.
6100         (i386_target_description): Create target descriptions.
6101         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6102         functions.  Do self tests.
6103
6104 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6105
6106         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6107         * features/i386/amd64-avx-avx512-linux.c: Removed.
6108         * features/i386/amd64-avx-linux.c: Removed.
6109         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6110         * features/i386/amd64-avx-mpx-linux.c: Removed.
6111         * features/i386/amd64-linux.c: Removed.
6112         * features/i386/amd64-mpx-linux.c: Removed.
6113         * features/i386/x32-avx-avx512-linux.c: Removed.
6114         * features/i386/x32-avx-linux.c: Removed.
6115         * features/i386/x32-linux.c: Removed.
6116
6117 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6118
6119         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6120         features/i386/*.c.
6121         (amd64_linux_read_description): Call
6122         amd64_create_target_description.
6123         * arch/amd64.c: New file.
6124         * arch/amd64.h: New file.
6125         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6126         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6127
6128 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6129
6130         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6131         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6132         (amd64_linux_read_description): Create target descriptions.
6133         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6134         functions.  Add unit tests.
6135         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6136         x32-core.xml.
6137         * features/i386/64bit-avx.c: Generated.
6138         * features/i386/64bit-avx512.c: Generated.
6139         * features/i386/64bit-core.c: Generated.
6140         * features/i386/64bit-linux.c: Generated.
6141         * features/i386/64bit-mpx.c: Generated.
6142         * features/i386/64bit-pkeys.c: Generated.
6143         * features/i386/64bit-segments.c: Generated.
6144         * features/i386/64bit-sse.c: Generated.
6145         * features/i386/x32-core.c: Generated.
6146         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6147         c files for amd64-linux and x32-linux.
6148
6149 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6150
6151         * amd64-linux-tdep.c (amd64_linux_read_description): New
6152         function.
6153         (amd64_linux_core_read_description): Call
6154         amd64_linux_read_description.
6155         (amd64_linux_init_abi): Likewise.
6156         (amd64_x32_linux_init_abi): Likewise.
6157         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6158         * x86-linux-nat.c (x86_linux_read_description): Call
6159         amd64_linux_read_description.
6160
6161 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6162
6163         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6164         comments.
6165
6166 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6167
6168         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6169         * features/i386/i386-avx-avx512-linux.c: Remove.
6170         * features/i386/i386-avx-linux.c: Remove.
6171         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6172         * features/i386/i386-avx-mpx-linux.c: Remove.
6173         * features/i386/i386-linux.c: Remove.
6174         * features/i386/i386-mmx-linux.c: Remove.
6175         * features/i386/i386-mpx-linux.c: Remove.
6176
6177 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6178
6179         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6180         (SFILES): Add arch/i386.c.
6181         (HFILES_NO_SRCDIR): Add arch/i386.h.
6182         * arch/i386.c: New file.
6183         * arch/i386.h: New file.
6184         * arch/tdesc.h (allocate_target_description): Declare.
6185         (set_tdesc_architecture): Declare.
6186         (set_tdesc_osabi): Declare.
6187         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6188         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6189         include arch/i386.h.
6190         (i386_linux_read_description): Remove code and call
6191         i386_create_target_description.
6192         (set_tdesc_architecture): New function.
6193         (set_tdesc_osabi): New function.
6194         * target-descriptions.h (allocate_target_description): Remove.
6195
6196 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6197
6198         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6199         * target-descriptions.c (tdesc_create_feature): Likewise, and
6200         adjust code.
6201         * features/i386/32bit-avx.c: Re-generated.
6202         * features/i386/32bit-avx512.c: Re-generated.
6203         * features/i386/32bit-core.c: Re-generated.
6204         * features/i386/32bit-linux.c: Re-generated.
6205         * features/i386/32bit-mpx.c: Re-generated.
6206         * features/i386/32bit-pkeys.c: Re-generated.
6207         * features/i386/32bit-sse.c: Re-generated.
6208
6209 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6210
6211         * regformats/regdef.h (struct reg): Override operator == and !=.
6212
6213 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6214
6215         * arch/tdesc.h: New file.
6216         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6217         * target-descriptions.c: Update comments.
6218         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6219         declarations.
6220         * features/i386/32bit-avx.c: Re-generated.
6221         * features/i386/32bit-avx512.c: Re-generated.
6222         * features/i386/32bit-core.c: Re-generated.
6223         * features/i386/32bit-linux.c: Re-generated.
6224         * features/i386/32bit-mpx.c: Re-generated.
6225         * features/i386/32bit-pkeys.c: Re-generated.
6226         * features/i386/32bit-sse.c: Re-generated.
6227
6228 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6229
6230         * regformats/regdat.sh: Update generated code.
6231
6232 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6233
6234         * regformats/regdat.sh: Adjust code order.
6235
6236 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6237
6238         * expprint.c (dump_subexp_body_standard): Use constant format
6239         string in fprintf_filtered call.
6240
6241 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6242
6243         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6244         NetBSD/i386.
6245         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6246
6247 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6248
6249         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6250
6251 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6252
6253         * bsd-kvm.o: Define _KMEMUSER.
6254         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6255         * configure: Regenerate.
6256
6257 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6258
6259         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6260         * i386-fbsd-nat.c: Likewise.
6261
6262 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6263
6264         * unittests/array-view-selftests.c: Add include of <array>.
6265
6266 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6267
6268         * spu-tdep.c (flush_ea_cache): Add missing argument to
6269         call_function_by_hand.
6270
6271 2017-09-04  Pedro Alves  <palves@redhat.com>
6272
6273         * NEWS (Safer support for debugging with no debug info): New.
6274
6275 2017-09-04  Pedro Alves  <palves@redhat.com>
6276
6277         * c-exp.y (function_method, function_method_void): Add current
6278         instance flags to TYPE_INSTANCE.
6279         * dwarf2read.c (check_modifier): New.
6280         (compute_delayed_physnames): Assert that only C++ adds delayed
6281         physnames.  Mark fn_fields as const/volatile depending on
6282         physname.
6283         * eval.c (make_params): New type_instance_flags parameter.  Use
6284         it as the new type's instance flags.
6285         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6286         flags element and pass it to make_params.
6287         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6288         instance flags element.
6289         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6290         * gdbtypes.h: Include "enum-flags.h".
6291         (type_instance_flags): New enum-flags type.
6292         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6293         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6294         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6295         (follow_type_instance_flags): New function.
6296         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6297         * parser-defs.h (follow_type_instance_flags): Declare.
6298         * valops.c (value_struct_elt_for_reference): const/volatile must
6299         match too.
6300
6301 2017-09-04  Pedro Alves  <palves@redhat.com>
6302
6303         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6304         function/method scopes; lookup the nested name as a function local
6305         static variable.
6306
6307 2017-09-04  Pedro Alves  <palves@redhat.com>
6308
6309         (%type <voidval>): Add function_method.
6310         * c-exp.y (exp): New production for calls with no arguments.
6311         (function_method, function_method_void_or_typelist): New
6312         productions.
6313         (exp): New production for "method()::static_var".
6314         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6315         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6316         Handle OP_FUNC_STATIC_VAR.
6317         * parse.c (operator_length_standard):
6318         Handle OP_FUNC_STATIC_VAR.
6319
6320 2017-09-04  Pedro Alves  <palves@redhat.com>
6321
6322         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6323         handling.
6324         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6325         Ditto.
6326         * parse.c (operator_length_standard, operator_check_standard):
6327         Ditto.
6328         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6329
6330 2017-09-04  Pedro Alves  <palves@redhat.com>
6331
6332         * ax-gdb.c: Include "typeprint.h".
6333         (gen_expr_for_cast): New function.
6334         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6335         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6336         type is unknown.
6337         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6338         nodebug_data_symbol.
6339         * eval.c: Include "typeprint.h".
6340         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6341         Error out if symbol has unknown type.
6342         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6343         evaluate_subexp_for_cast.
6344         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6345         OP_VAR_MSYM_VALUE.
6346         (evaluate_subexp_for_cast): New function.
6347         * gdbtypes.c (init_nodebug_var_type): New function.
6348         (objfile_type): Use it to initialize types of variables with no
6349         debug info.
6350         * typeprint.c (error_unknown_type): New.
6351         * typeprint.h (error_unknown_type): New declaration.
6352         * compile/compile-c-types.c (convert_type_basic): Handle
6353         TYPE_CODE_ERROR; warn and fallback to int for variables with
6354         unknown type.
6355
6356 2017-09-04  Pedro Alves  <palves@redhat.com>
6357
6358         * eval.c (evaluate_var_value): New function, factored out from ...
6359         (evaluate_subexp_standard): ... here.
6360
6361 2017-09-04  Pedro Alves  <palves@redhat.com>
6362
6363         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6364         Remove useless assignments to 'op'.
6365
6366 2017-09-04  Pedro Alves  <palves@redhat.com>
6367
6368         * eval.c (eval_skip_value): New function.
6369         (evaluate_subexp_standard): Use it.
6370
6371 2017-09-04  Pedro Alves  <palves@redhat.com>
6372
6373         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6374         function name from symbol/minsym and pass it to
6375         error_call_unknown_return_type.
6376
6377 2017-09-04  Pedro Alves  <palves@redhat.com>
6378
6379         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6380         * ax-gdb.c (gen_msym_var_ref): New function.
6381         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6382         * eval.c (evaluate_var_msym_value): New function.
6383         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6384         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6385         to call_function_by_hand.
6386         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6387         Handle OP_VAR_MSYM_VALUE.
6388         (union exp_element) <msymbol>: New field.
6389         * minsyms.h (struct type): Forward declare.
6390         (find_minsym_type_and_address): Declare.
6391         * parse.c (write_exp_elt_msym): New function.
6392         (write_exp_msymbol): Delete, refactored as ...
6393         (find_minsym_type_and_address): ... this new function.
6394         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6395         (operator_length_standard, operator_check_standard): Handle
6396         OP_VAR_MSYM_VALUE.
6397         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6398
6399 2017-09-04  Pedro Alves  <palves@redhat.com>
6400
6401         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6402         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6403         unknown.
6404         * ada-typeprint.c (print_func_type): Handle functions with unknown
6405         return type.
6406         * c-typeprint.c (c_type_print_base): Handle functions and methods
6407         with unknown return type.
6408         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6409         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6410         * compile/compile-c-types.c: Include "objfiles.h".
6411         (convert_func): For functions with unknown return type, warn and
6412         default to int.
6413         * compile/compile-object-run.c (compile_object_run): Adjust call
6414         to call_function_by_hand_dummy.
6415         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6416         call_function_by_hand.
6417         * eval.c (evaluate_subexp_standard): Adjust calls to
6418         call_function_by_hand.  Handle functions and methods with unknown
6419         return type.  Pass expect_type to call_function_by_hand.
6420         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6421         return type.
6422         * gcore.c (call_target_sbrk): Adjust call to
6423         call_function_by_hand.
6424         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6425         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6426         an integer address type instead of nodebug.
6427         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6428         call_function_by_hand.
6429         * infcall.c (error_call_unknown_return_type): New function.
6430         (call_function_by_hand): New "default_return_type" parameter.
6431         Pass it down.
6432         (call_function_by_hand_dummy): New "default_return_type"
6433         parameter.  Use it instead of defaulting to int.  If there's no
6434         default and the return type is unknown, throw an error.  If
6435         there's a default return type, and the called function has no
6436         debug info, then assume the function is prototyped.
6437         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6438         New "default_return_type" parameter.
6439         (error_call_unknown_return_type): New declaration.
6440         * linux-fork.c (call_lseek): Cast return type of lseek.
6441         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6442         call_function_by_hand.
6443         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6444         calls to call_function_by_hand.
6445         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6446         return type.
6447         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6448         (value_nsstring, print_object_command): Adjust calls to
6449         call_function_by_hand.
6450         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6451         functions with unknown return type.
6452         (pascal_type_print_func_varspec_suffix): New function.
6453         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6454         TYPE_CODE_METHOD>: Use it.
6455         * python/py-value.c (valpy_call): Adjust call to
6456         call_function_by_hand.
6457         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6458         call_function_by_hand.
6459         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6460         call_function_by_hand.
6461         * valops.c (value_allocate_space_in_inferior): Adjust call to
6462         call_function_by_hand.
6463         * typeprint.c (type_print_unknown_return_type): New function.
6464         * typeprint.h (type_print_unknown_return_type): New declaration.
6465
6466 2017-09-04  Pedro Alves  <palves@redhat.com>
6467
6468         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6469         types with more than one parameter as prototyped.
6470
6471 2017-09-04  Pedro Alves  <palves@redhat.com>
6472
6473         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6474         (disassemble_command): Use gdb_disassembly_flags instead of bare
6475         int.
6476         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6477         (dump_insns, do_mixed_source_and_assembly_deprecated)
6478         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6479         Use gdb_disassembly_flags instead of bare int.
6480         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6481         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6482         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6483         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6484         (enum gdb_disassembly_flag): ... values of this new enumeration.
6485         (gdb_disassembly_flags): Define.
6486         (gdb_disassembly)
6487         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6488         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6489         gdb_disassembly_flags instead of bare int.
6490         * record-btrace.c (btrace_insn_history)
6491         (record_btrace_insn_history, record_btrace_insn_history_range)
6492         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6493         instead of bare int.
6494         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6495         Use gdb_disassembly_flags instead of bare int.
6496         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6497         Define.
6498         * target-delegates.c: Regenerate.
6499         * target.c (target_insn_history, target_insn_history_from)
6500         (target_insn_history_range): Use gdb_disassembly_flags instead of
6501         bare int.
6502         * target.h: Include "disasm.h".
6503         (struct target_ops) <to_insn_history, to_insn_history_from,
6504         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6505         int.
6506         (target_insn_history, target_insn_history_from)
6507         (target_insn_history_range): Use gdb_disassembly_flags instead of
6508         bare int.
6509
6510 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6511
6512         * cli/cli-script.c (build_command_line): For if/while commands,
6513         check whether args is empty.
6514
6515 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6516
6517         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6518         (enum command_control_type): Likewise.
6519         (struct command_line): Likewise.
6520         (free_command_lines): Likewise.
6521         (struct command_lines_deleter): Likewise.
6522         (command_line_up): Likewise.
6523         (read_command_lines): Likewise.
6524         (read_command_lines_1): Likewise.
6525         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6526         (enum command_control_type): Likewise.
6527         (struct command_line): Likewise.
6528         (free_command_lines): Likewise.
6529         (struct command_lines_deleter): Likewise.
6530         (command_line_up): Likewise.
6531         (read_command_lines): Likewise.
6532         (read_command_lines_1): Likewise.
6533         * breakpoint.h: Include cli/cli-script.h.
6534         * extension-priv.h: Likewise.
6535         * gdbcmd.h: Likewise.
6536
6537 2017-09-04  Pedro Alves  <palves@redhat.com>
6538
6539         * ada-lang.c (is_known_support_routine): Move sal declaration to
6540         where it is initialized.
6541         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6542         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6543         (clear_command, update_static_tracepoint): Remove init_sal
6544         references.  Move declarations closer to initializations.
6545         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6546         initializations.
6547         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6548         references.  Move sal declarations closer to initializations.
6549         * frame.c (find_frame_sal): Return a symtab_and_line via function
6550         return instead of output parameter.  Remove init_sal references.
6551         * frame.h (find_frame_sal): Return a symtab_and_line via function
6552         return instead of output parameter.
6553         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6554         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6555         instead of memset.
6556         (gdbscm_find_pc_line): Remove init_sal reference.
6557         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6558         references.  Move declarations closer to initializations.
6559         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6560         initializations.
6561         (finish_backward): Remove init_sal references.  Move declarations
6562         closer to initializations.
6563         * infrun.c (process_event_stop_test, handle_step_into_function)
6564         (insert_hp_step_resume_breakpoint_at_frame)
6565         (insert_step_resume_breakpoint_at_caller): Likewise.
6566         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6567         (symbol_to_sal): Likewise.
6568         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6569         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6570         to its initialization.
6571         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6572         init_sal references.  Move declarations closer to initializations.
6573         * source.c (get_current_source_symtab_and_line): Remove brace
6574         initialization.
6575         (set_current_source_symtab_and_line): Now takes the sal by const
6576         reference.  Remove brace initialization.
6577         (line_info): Remove init_sal reference.
6578         * source.h (set_current_source_symtab_and_line): Now takes a
6579         symtab_and_line via const reference.
6580         * stack.c (set_current_sal_from_frame): Adjust.
6581         (print_frame_info): Adjust.
6582         (get_last_displayed_sal): Return the sal via function return
6583         instead of via output parameter.  Simplify.
6584         (frame_info): Adjust.
6585         * stack.h (get_last_displayed_sal): Return the sal via function
6586         return instead of via output parameter.
6587         * symtab.c (init_sal): Delete.
6588         (find_pc_sect_line): Remove init_sal references.  Move
6589         declarations closer to initializations.
6590         (find_function_start_sal): Remove init_sal references.  Move
6591         declarations closer to initializations.
6592         * symtab.h (struct symtab_and_line): In-class initialize all
6593         fields.
6594         * tracepoint.c (set_traceframe_context)
6595         (print_one_static_tracepoint_marker): Remove init_sal references.
6596         Move declarations closer to initializations.
6597         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6598         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6599         declarations closer to initializations.
6600         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6601         init_sal references.  Adjust.
6602
6603 2017-09-04  Pedro Alves  <palves@redhat.com>
6604
6605         * ax-gdb.c (agent_command_1): Use range-for.
6606         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6607         * breakpoint.c: Include "common/array-view.h".
6608         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6609         parameter from struct symtabs_and_lines to
6610         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6611         (breakpoint_sals_to_pc): Change sals parameter from struct
6612         symtabs_and_lines to std::vector reference.
6613         (check_fast_tracepoint_sals): Change sals parameter from struct
6614         symtabs_and_lines to std::array_view.  Use range-for.
6615         (decode_static_tracepoint_spec): Return a std::vector instead of
6616         symtabs_and_lines.  Update.
6617         (create_breakpoint): Update.
6618         (break_range_command, until_break_command, clear_command): Update.
6619         (base_breakpoint_decode_location, bkpt_decode_location)
6620         (bkpt_probe_create_sals_from_location)
6621         (bkpt_probe_decode_location, tracepoint_decode_location)
6622         (tracepoint_probe_decode_location)
6623         (strace_marker_create_sals_from_location): Return a std::vector
6624         instead of symtabs_and_lines.
6625         (strace_marker_create_breakpoints_sal): Update.
6626         (strace_marker_decode_location): Return a std::vector instead of
6627         symtabs_and_lines.  Update.
6628         (update_breakpoint_locations): Change struct symtabs_and_lines
6629         parameters to gdb::array_view.  Adjust.
6630         (location_to_sals): Return a std::vector instead of
6631         symtabs_and_lines.  Update.
6632         (breakpoint_re_set_default): Use std::vector instead of struct
6633         symtabs_and_lines.
6634         (decode_location_default): Return a std::vector instead of
6635         symtabs_and_lines.  Update.
6636         * breakpoint.h: Include "common/array-view.h".
6637         (struct breakpoint_ops) <decode_location>: Now returns a
6638         std::vector instead of returning a symtabs_and_lines via output
6639         parameter.
6640         (update_breakpoint_locations): Change sals parameters to use
6641         gdb::array_view.
6642         * cli/cli-cmds.c (edit_command, list_command): Update to use
6643         std::vector and gdb::array_view.
6644         (ambiguous_line_spec): Adjust to use gdb::array_view and
6645         range-for.
6646         (compare_symtabs): Rename to ...
6647         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6648         const reference and adjust.
6649         (filter_sals): Rewrite using std::vector and standard algorithms.
6650         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6651         (jump_command): Update to use std::vector.
6652         * linespec.c (struct linespec_state) <canonical_names>: Update
6653         comment.
6654         (add_sal_to_sals_basic): Delete.
6655         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6656         (decode_line_2, create_sals_line_offset)
6657         (convert_address_location_to_sals, convert_linespec_to_sals)
6658         (convert_explicit_location_to_sals, parse_linespec)
6659         (event_location_to_sals, decode_line_full, decode_line_1)
6660         (decode_line_with_current_source)
6661         (decode_line_with_last_displayed, decode_objc)
6662         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6663         (linespec_result::~linespec_result): Adjust to use std::vector
6664         instead of symtabs_and_lines.
6665         * linespec.h (linespec_sals::sals): Now a std::vector.
6666         (struct linespec_result): Use std::vector, bool, and in-class
6667         initialization.
6668         (decode_line_1, decode_line_with_current_source)
6669         (decode_line_with_last_displayed): Return std::vector.
6670         * macrocmd.c (info_macros_command): Use std::vector.
6671         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6672         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6673         std::vector.
6674         * probe.h (parse_probes): Return a std::vector.
6675         * python/python.c (gdbpy_decode_line): Use std::vector and
6676         gdb::array_view.
6677         * source.c (select_source_symtab, line_info): Use std::vector.
6678         * stack.c (func_command): Use std::vector.
6679         * symtab.h (struct symtabs_and_lines): Delete.
6680         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6681
6682 2017-09-04  Pedro Alves  <palves@redhat.com>
6683
6684         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6685         unittests/array-view-selftests.c.
6686         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6687         * common/array-view.h: New file.
6688         * unittests/array-view-selftests.c: New file.
6689
6690 2017-09-04  Pedro Alves  <palves@redhat.com>
6691
6692         * cli/cli-cmds.c (edit_command): Pass message to
6693         ambiguous_line_spec.
6694         (list_command): Pass message to ambiguous_line_spec.  Say
6695         "first"/"last" instead of "start" and "end" to be consistent with
6696         the manual.
6697         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6698         them to print formatted message.
6699
6700 2017-09-04  Pedro Alves  <palves@redhat.com>
6701
6702         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6703         ftrace_update_insns by reference instead of pointer.
6704
6705 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6706
6707         * i386-go32-tdep.c: Include x86-xstate.h.
6708         (i386_go32_init_abi): Call i386_target_description.
6709         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6710         if xcr0 is X86_XSTATE_X87_MASK.
6711         * i386-tdep.h (tdesc_i386): Remove the declaration.
6712         (tdesc_i386_mmx): Likewise.
6713
6714 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6715
6716         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6717         X86_XSTATE_SSE_MASK instead of 0.
6718
6719 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6720
6721         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6722         i386_target_description.
6723         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6724         i386_target_description.
6725         * i386-tdep.c (i386_gdbarch_init): Likewise.
6726
6727 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6728
6729         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6730         (x86_darwin_init_abi_64): Call amd64_target_description.
6731         * amd64-dicos-tdep.c: Likewise.
6732         * amd64-fbsd-nat.c: Likewise.
6733         * amd64-fbsd-tdep.c: Likewise.
6734         * amd64-nbsd-tdep.c: Likewise.
6735         * amd64-obsd-tdep.c: Likewise.
6736         * amd64-sol2-tdep.c: Likewise.
6737         * amd64-windows-tdep.c: Likewise.
6738         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6739
6740 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6741
6742         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6743         (btrace_function) <insn>: Change type to use std::vector.
6744         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6745         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6746         ftrace_update_insns, ftrace_compute_global_level_offset,
6747         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6748         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6749         change to std::vector.
6750         (ftrace_update_insns): Adjust to change to std::vector, change
6751         type of INSN parameter.
6752         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6753         * record-btrace.c (btrace_call_history_insn_range,
6754         btrace_compute_src_line_range,
6755         record_btrace_frame_prev_register): Adjust to change to
6756         std::vector.
6757         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6758         to change to std::vector.
6759
6760 2017-09-03  Tom Tromey  <tom@tromey.com>
6761
6762         * corefile.c (reopen_exec_file): Use std::string.
6763
6764 2017-09-03  Tom Tromey  <tom@tromey.com>
6765
6766         * compile/compile.c (compile_register_name_mangled): Return
6767         std::string.
6768         * compile/compile-loc2c.c (pushf_register_address): Update.
6769         (pushf_register): Update.
6770         * compile/compile-c-types.c (convert_array): Update.
6771         * compile/compile-c-symbols.c (generate_vla_size): Update.
6772         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6773         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6774         (convert_one_symbol): Update.
6775         (generate_c_for_for_one_variable): Update.
6776         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6777         std::string.
6778         (generate_register_struct): Update.
6779         * compile/compile-internal.h (c_get_range_decl_name): Return a
6780         std::string.
6781         (compile_register_name_mangled): Return std::string.
6782
6783 2017-09-03  Tom Tromey  <tom@tromey.com>
6784
6785         * utils.c (perror_string): Return a std::string.
6786         (throw_perror_with_name, perror_warning_with_name): Update.
6787
6788 2017-09-03  Tom Tromey  <tom@tromey.com>
6789
6790         * demangle.c (demangle_command): Use std::string,
6791         unique_xmalloc_ptr.
6792
6793 2017-09-03  Tom Tromey  <tom@tromey.com>
6794
6795         * cli/cli-setshow.c (do_set_command): Use std::string.
6796
6797 2017-09-03  Tom Tromey  <tom@tromey.com>
6798
6799         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6800
6801 2017-09-03  Tom Tromey  <tom@tromey.com>
6802
6803         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6804
6805 2017-09-03  Tom Tromey  <tom@tromey.com>
6806
6807         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6808         gdb::unique_xmalloc_ptr.
6809
6810 2017-09-03  Tom Tromey  <tom@tromey.com>
6811
6812         * thread.c (print_thread_info_1): Use string_printf.
6813         (thread_apply_command, thread_apply_all_command): Use
6814         std::string.
6815
6816 2017-09-03  Tom Tromey  <tom@tromey.com>
6817
6818         * valprint.c (val_print_string): Update.
6819         * gdbcore.h (memory_error_message): Return std::string.
6820         * corefile.c (memory_error_message): Return std::string.
6821         (memory_error): Update.
6822         * breakpoint.c (insert_bp_location): Update.
6823
6824 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6825
6826         * target/waitstatus.h (target_waitstatus_to_string): Change
6827         return type to std::string.
6828         * target/waitstatus.c (target_waitstatus_to_string): Return
6829         std::string.
6830         * target.h (target_waitstatus_to_string): Remove declaration.
6831         * infrun.c (resume, clear_proceed_status_thread,
6832         print_target_wait_results, do_target_wait, save_waitstatus,
6833         stop_all_threads): Adjust.
6834         * record-btrace.c (record_btrace_wait): Adjust.
6835         * target-debug.h
6836         (target_debug_print_struct_target_waitstatus_p): Adjust.
6837
6838 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6839
6840         PR gdb/22046
6841         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6842         detection.
6843
6844 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6845
6846         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6847         for setting/unsetting environment variables on the remote target.
6848         (New remote packets): Add entries for QEnvironmentHexEncoded,
6849         QEnvironmentUnset and QEnvironmentReset.
6850         * common/environ.c (gdb_environ::operator=): Extend method to
6851         handle m_user_set_env_list and m_user_unset_env_list.
6852         (gdb_environ::clear): Likewise.
6853         (match_var_in_string): Change type of first parameter from 'char
6854         *' to 'const char *'.
6855         (gdb_environ::set): Extend method to handle
6856         m_user_set_env_list and m_user_unset_env_list.
6857         (gdb_environ::unset): Likewise.
6858         (gdb_environ::clear_user_set_env): New method.
6859         (gdb_environ::user_set_envp): Likewise.
6860         (gdb_environ::user_unset_envp): Likewise.
6861         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6862         m_user_unset_env_list on move constructor/assignment.
6863         (unset): Add new default parameter 'update_unset_list = true'.
6864         (clear_user_set_env): New method.
6865         (user_set_envp): Likewise.
6866         (user_unset_envp): Likewise.
6867         (m_user_set_env_list): New std::set.
6868         (m_user_unset_env_list): Likewise.
6869         * common/rsp-low.c (hex2str): New function.
6870         (bin2hex): New overload for bin2hex function.
6871         * common/rsp-low.c (hex2str): New prototype.
6872         (str2hex): New overload prototype.
6873         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6874         QEnvironmentUnset and QEnvironmentReset.
6875         (remote_protocol_features): Add QEnvironmentHexEncoded,
6876         QEnvironmentUnset and QEnvironmentReset packets.
6877         (send_environment_packet): New function.
6878         (extended_remote_environment_support): Likewise.
6879         (extended_remote_create_inferior): Call
6880         extended_remote_environment_support.
6881         (_initialize_remote): Add QEnvironmentHexEncoded,
6882         QEnvironmentUnset and QEnvironmentReset packet configs.
6883         * unittests/environ-selftests.c (gdb_selftest_env_var):
6884         New variable.
6885         (test_vector_initialization): New function.
6886         (test_init_from_host_environ): Likewise.
6887         (test_reinit_from_host_environ): Likewise.
6888         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6889         Likewise.
6890         (test_unset_set_empty_vector): Likewise.
6891         (test_vector_clear): Likewise.
6892         (test_std_move): Likewise.
6893         (test_move_constructor):
6894         (test_self_move): Likewise.
6895         (test_set_unset_reset): Likewise.
6896         (run_tests): Rewrite in terms of the functions above.
6897
6898 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6899
6900         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6901         (adi_available): Use a temp variable of type CORE_ADDR as argument
6902         3 when calling target_auxv_search.
6903         (adi_normalize_address): Use masks and xor operators to calculate
6904         normalized address.
6905         (adi_read_versions, adi_write_versions, adi_print_versions)
6906         (do_examine, do_assign): Use paddress.
6907
6908 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6909
6910         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6911         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6912         out of loop and add supply of FIR.
6913         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6914         add collect of FIR.
6915
6916 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6917
6918         PR gdb/21827
6919         * cli/cli-script.c (define_command): Don't convert command name
6920         to lower case.
6921
6922 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6923
6924         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6925         Update all callers accordingly. Remove all code blocks handling
6926         the case where DISPP is not NULL.
6927
6928 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6929
6930         PR symtab/22003
6931         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6932         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6933         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6934
6935 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6936
6937         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6938         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6939         (read_comp_units_from_section): New parameter abbrev_section, use
6940         read_and_check_comp_unit_head, allocate signatured_type if needed.
6941         (create_all_comp_units): Update read_comp_units_from_section caller.
6942
6943 2017-08-23  Pedro Alves  <palves@redhat.com>
6944
6945         PR remote/21852
6946         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6947         to null_ptid and switch to thread without reading the registers
6948         after adding the inferior.
6949
6950 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6951
6952         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6953         compile-gcc.
6954         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6955         (compile_to_object): Implement compile_gcc.
6956         (_initialize_compile): Install "set compile-gcc".  Initialize
6957         compile_gcc.
6958
6959 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6960
6961         * compile/compile.c (compile_to_object): Conditionally call
6962         set_verbose.  Conditionally call compile or compile_v0.
6963
6964 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6965
6966         * sparc64-tdep.h: (adi_normalize_address): New export.
6967         * sparc-nat.h: (open_adi_tag_fd): New export.
6968         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6969         * sparc64-linux-tdep.c:
6970         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6971         (sparc64_linux_handle_segmentation_fault): New function.
6972         (sparc64_linux_init_abi): Register
6973         sparc64_linux_handle_segmentation_fault
6974         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6975         (sparc64_addr_bits_remove): New function.
6976         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6977         (MAX_PROC_NAME_SIZE): New macro.
6978         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6979         (sparc64adilist): New variable.
6980         (adi_proc_list): New variable.
6981         (find_adi_info): New function.
6982         (add_adi_info): New function.
6983         (get_adi_info_proc): New function.
6984         (get_adi_info): New function.
6985         (info_adi_command): New function.
6986         (read_maps_entry): New function.
6987         (adi_available): New function.
6988         (adi_normalize_address): New function.
6989         (adi_align_address): New function.
6990         (adi_convert_byte_count): New function.
6991         (adi_tag_fd): New function.
6992         (adi_is_addr_mapped): New function.
6993         (adi_read_versions): New function.
6994         (adi_write_versions): New function.
6995         (adi_print_versions): New function.
6996         (do_examine): New function.
6997         (do_assign): New function.
6998         (adi_examine_command): New function.
6999         (adi_assign_command): New function.
7000         (_initialize_sparc64_adi_tdep): New function.
7001
7002 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7003
7004         * breakpoint.c (breakpoints_info): Rename to ...
7005         (info_breakpoints_command): ... this.
7006         (watchpoints_info): Rename to ...
7007         (info_watchpoints_command): ... this.
7008         (tracepoints_info): Rename to ...
7009         (info_tracepoints_command): ... this.
7010         (_initialize_breakpoint): Adjust.
7011         * dcache.c (dcache_info): Rename to ...
7012         (info_display_command): ... this.
7013         (_initialize_dcache): Adjust.
7014         * frame.h (args_info): Rename to ...
7015         (info_args_command): ... this.
7016         (locals_info): Rename to ...
7017         (info_locals_command): ... this.
7018         * infcmd.c (nofp_registers_info): Rename to ...
7019         (info_registers_command): ... this.
7020         (float_info): Rename to ...
7021         (info_float_command): ... this.
7022         (program_info): Rename to ...
7023         (info_program_command): ... this.
7024         (all_registers_info): Rename to ...
7025         (info_all_registers_command): ... this.
7026         (vector_info): Rename to ...
7027         (info_vector_command): ... this.
7028         (float_info): Rename to ...
7029         (info_float_command): ... this.
7030         (_initialize_infcmd): Adjust.
7031         * inferior.h (term_info): Rename to ...
7032         (info_terminal_command): ... this.
7033         * inflow.c (term_info): Rename to ...
7034         (info_terminal_command): ... this.
7035         (_initialize_inflow): Adjust.
7036         * infrun.c (signals_info): Rename to ...
7037         (info_signals_command): ... this.
7038         (_initialize_infrun): Adjust.
7039         * objc-lang.c (classes_info): Rename to ...
7040         (info_classes_command): ... this.
7041         (selectors_info): Rename to ...
7042         (info_selectors_command): ... this.
7043         (_initialize_objc_language): Adjust.
7044         * printcmd.c (sym_info): Rename to ...
7045         (info_symbol_command): ... this.
7046         (address_info): Rename to ...
7047         (info_address_command): ... this.
7048         (display_info): Rename to ...
7049         (info_display_command): ... this.
7050         (_initialize_printcmd): Adjust.
7051         * reverse.c (bookmarks_info): Rename to ...
7052         (info_breakpoints_command): ... this.
7053         (_initialize_reverse): Adjust.
7054         * ser-go32.c (dos_info): Rename to ...
7055         (info_serial_command): ... this.
7056         (_initialize_ser_dos): Adjust.
7057         * skip.c (skip_info): Rename to ...
7058         (info_skip_command): ... this.
7059         (_initialize_step_skip): Adjust.
7060         * source.c (line_info): Rename to ...
7061         (info_line_command): ... this.
7062         (source_info): Rename to ...
7063         (info_source_command)
7064         * stack.c (frame_info): Rename to ...
7065         (info_frame_command): ... this.
7066         (locals_info): Rename to ...
7067         (info_locals_command): ... this.
7068         (args_info): Rename to ...
7069         (info_args_command): ... this.
7070         (_initialize_stack): Adjust.
7071         * symtab.c (sources_info): Rename to ...
7072         (info_sources_command): ... this.
7073         (variables_info): Rename to ...
7074         (info_variables_command): ... this.
7075         (functions_info): Rename to ...
7076         (info_functions_command): ... this.
7077         (types_info): Rename to ...
7078         (info_types_command): ... this.
7079         (_initialize_symtab): Adjust.
7080         * target.c (target_info): Rename to ...
7081         (info_target_command): ... this.
7082         (initialize_targets): Adjust.
7083         * tracepoint.c (tvariables_info): Rename to ...
7084         (info_tvariables_command): ... this.
7085         (scope_info): Rename to ...
7086         (info_scope_command): ... this.
7087         (trace_dump_actions): Adjust.
7088         (_initialize_tracepoint): Adjust.
7089
7090 2017-08-22  Tom Tromey  <tom@tromey.com>
7091
7092         * breakpoint.h (install_breakpoint): Update.
7093         * breakpoint.c (add_solib_catchpoint): Update.
7094         (install_breakpoint): Change argument to a std::unique_ptr.
7095         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7096         (create_breakpoint_sal, create_breakpoint): Update.
7097         (watch_command_1, catch_exec_command_1)
7098         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7099         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7100         Return the breakpoint.
7101         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7102         (new_single_step_breakpoint): Update.
7103         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7104         std::unique_ptr.
7105         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7106         std::unique_ptr.
7107         * break-catch-sig.c (create_signal_catchpoint): Use
7108         std::unique_ptr.
7109         * ada-lang.c (create_ada_exception_catchpoint): Use
7110         std::unique_ptr.
7111
7112 2017-08-22  Tom Tromey  <tom@tromey.com>
7113
7114         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7115
7116 2017-08-22  Tom Tromey  <tom@tromey.com>
7117
7118         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7119         (lookup_partial_symbol): Update.
7120
7121 2017-08-22  Tom Tromey  <tom@tromey.com>
7122
7123         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7124         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7125         (find_and_open_source, symtab_to_fullname): Update.
7126         * psymtab.c (psymtab_to_fullname): Update.
7127
7128 2017-08-22  Tom Tromey  <tom@tromey.com>
7129
7130         * exec.c (exec_file_attach): Update.
7131         * linux-thread-db.c (try_thread_db_load): Update.
7132         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7133         * utils.c (gdb_realpath): Change return type.
7134         (gdb_realpath_keepfile): Update.
7135         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7136         (_initialize_utils): Register the new self test.
7137         * source.c (openp): Update.
7138         (find_and_open_source): Update.
7139         * nto-tdep.c (nto_find_and_open_solib): Update.
7140         * main.c (set_gdb_data_directory): Update.
7141         (captured_main_1): Update.
7142         * dwarf2read.c (dwarf2_get_dwz_file): Update
7143         (dw2_map_symbol_filenames): Update.
7144         * auto-load.c (auto_load_safe_path_vec_update): Update.
7145         (filename_is_in_auto_load_safe_path_vec): Change type of
7146         "filename_realp".
7147         (auto_load_objfile_script): Update.
7148         (file_is_auto_load_safe): Update.  Use std::string.
7149         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7150
7151 2017-08-22  Tom Tromey  <tom@tromey.com>
7152
7153         * utils.c (gdb_realpath_keepfile): Return a
7154         gdb::unique_xmalloc_ptr.
7155         * exec.c (exec_file_attach): Update.
7156         * utils.h (gdb_realpath_keepfile): Return a
7157         gdb::unique_xmalloc_ptr.
7158
7159 2017-08-22  Tom Tromey  <tom@tromey.com>
7160
7161         * compile/compile.c (compile_file_command): Use
7162         gdb::unique_xmalloc_ptr, std::string.
7163         * utils.c (gdb_abspath): Change return type.
7164         * source.c (openp): Update.
7165         * objfiles.c (allocate_objfile): Update.
7166         * main.c (set_gdb_data_directory): Update.
7167         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7168
7169 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7170
7171         * cli-cmds.c (list_commands): List actual code around more than
7172         one location.
7173
7174 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7175
7176         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7177
7178 2017-08-21  Pedro Alves  <palves@redhat.com>
7179
7180         PR gdb/19487
7181         * c-exp.y (variable production): Handle function aliases.
7182         * minsyms.c (msymbol_is_text): New function.
7183         * minsyms.h (msymbol_is_text): Declare.
7184         * symtab.c (find_function_alias_target): New function.
7185         * symtab.h (find_function_alias_target): Declare.
7186
7187 2017-08-21  Pedro Alves  <palves@redhat.com>
7188
7189         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7190         typedefs.
7191         * typeprint.c (whatis_exp): If handling "whatis", and expression
7192         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7193         typedefs here.
7194         * valops.c (value_cast): Save "to" type before resolving
7195         stubs/typedefs.  Use that type as resulting value's type.
7196
7197 2017-08-18  Tom Tromey  <tom@tromey.com>
7198             Pedro Alves  <palves@redhat.com>
7199
7200         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7201         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7202         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7203         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7204         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7205         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7206         (linux_get_siginfo_data): Add "thread" argument.  Use
7207         scoped_restore.
7208         * linux-nat.c (linux_child_follow_fork)
7209         (check_stopped_by_watchpoint): Use scoped_restore.
7210         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7211         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7212         (restore_inferior_ptid, save_inferior_ptid): Remove.
7213         * btrace.c (btrace_fetch): Use scoped_restore.
7214         * bsd-uthread.c (bsd_uthread_fetch_registers)
7215         (bsd_uthread_store_registers): Use scoped_restore.
7216         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7217         scoped_restore.
7218         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7219         (aix_thread_xfer_partial): Use scoped_restore.
7220         * inferior.h (save_inferior_ptid): Remove.
7221
7222 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7223
7224         PR tdep/21818
7225         * arm-tdep.c (gdb_print_insn_arm): Mark
7226         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7227
7228 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7229
7230         * NEWS: Mention GDBserver's new option "--selftest".
7231         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7232         * selftest.c: Move it to common/selftest.c.
7233         * selftest.h: Move it to common/selftest.h.
7234         * selftest-arch.c (reset): New function.
7235         (tests_with_arch): Call reset.
7236
7237 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7238
7239         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7240         instead of exception_fprintf and printf_filtered.
7241
7242 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7243
7244         * selftest.c (register_self_test): Rename it to
7245         selftests::register_test.
7246         (run_self_tests): selftest::run_tests.
7247         * selftest.h: Update declarations.
7248         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7249         selftests::register_test_foreach_arch.
7250         * selftest-arch.h: Update declaration.
7251         * aarch64-tdep.c: Update.
7252         * arm-tdep.c: Likewise.
7253         * disasm-selftests.c: Likewise.
7254         * dwarf2loc.c: Likewise.
7255         * dwarf2-frame.c: Likewise.
7256         * findvar.c: Likewise.
7257         * gdbarch-selftests.c: Likewise.
7258         * maint.c (maintenance_selftest): Likewise.
7259         * regcache.c: Likewise.
7260         * rust-exp.y: Likewise.
7261         * selftest-arch.c: Likewise.
7262         * unittests/environ-selftests.c: Likewise.
7263         * unittests/function-view-selftests.c: Likewise.
7264         * unittests/offset-type-selftests.c: Likewise.
7265         * unittests/optional-selftests.c: Likewise.
7266         * unittests/scoped_restore-selftests.c: Likewise.
7267         * utils-selftests.c: Likewise.
7268
7269 2017-08-17  Pedro Alves  <palves@redhat.com>
7270
7271         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7272         local.
7273
7274 2017-08-17  Pedro Alves  <palves@redhat.com>
7275
7276         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7277         field.
7278         (reset_die_in_process): Delete, replaced by ...
7279         (process_die_scope): ... this new class.  Make it responsible for
7280         freeing cu->line_header too.
7281         (process_die): Use process_die_scope.
7282         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7283         cu->line_header_die_owner.  Don't release the line header if it's
7284         owned by the CU.
7285         (setup_type_unit_groups): Make the CU/DIE own the line header.
7286         Don't release the line header here.
7287
7288 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7289
7290         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7291
7292 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7293
7294         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7295         Single-Key mode
7296
7297 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7298
7299         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7300         mode command list.
7301
7302 2017-08-15  Stafford Horne  <shorne@gmail.com>
7303
7304         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7305
7306 2017-08-15  Stafford Horne  <shorne@gmail.com>
7307
7308         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7309
7310 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7311
7312         PR gdb/21954
7313         * infcmd.c (unset_environment_command): Use the 'clear' method on
7314         the environment instead of resetting it.
7315
7316 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7317
7318         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7319         platforms.
7320
7321 2017-08-14  Tom Tromey  <tom@tromey.com>
7322
7323         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7324         (print_binary_chars): Likewise.
7325         (BITS_IN_BYTES): Remove.
7326
7327 2017-08-14  Tom Tromey  <tom@tromey.com>
7328
7329         PR gdb/21675
7330         * valprint.c (LOW_ZERO): Change value to 034.
7331         (print_octal_chars): Add static_asserts for octal constants.
7332         * printcmd.c (print_scalar_formatted): Add 'd' case.
7333
7334 2017-08-11  Tom Tromey  <tom@tromey.com>
7335
7336         * symfile.c (add_symbol_file_command): Use std::vector.
7337
7338 2017-08-14  Tom Tromey  <tom@tromey.com>
7339
7340         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7341         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7342         std::move.
7343         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7344
7345 2017-08-11  Pedro Alves  <palves@redhat.com>
7346
7347         * infrun.c (process_event_stop_test): Adjust
7348         function_name_is_marked_for_skip call.
7349         * skip.c: Include <list>.
7350         (skiplist_entry): Make it a class with private fields, and
7351         getters/setters.
7352         (skiplist_entry_chain): Delete.
7353         (skiplist_entries): New.
7354         (skiplist_entry_count): Delete.
7355         (highest_skiplist_entry_num): New.
7356         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7357         (add_skiplist_entry): Delete.
7358         (skiplist_entry::skiplist_entry): New.
7359         (skiplist_entry::add_entry): New.
7360         (skip_file_command, skip_function): Adjust.
7361         (compile_skip_regexp): Delete.
7362         (skip_command): Don't compile regexp here.  Adjust to use
7363         skiplist_entry::add_entry.
7364         (skip_info): Adjust to use range-for and getters.
7365         (skip_enable_command, skip_disable_command): Adjust to use
7366         range-for and setters.
7367         (skip_delete_command): Adjust to use std::list.
7368         (add_skiplist_entry): Delete.
7369         (skip_file_p): Delete, refactored as ...
7370         (skiplist_entry::do_skip_file_p): ... this new method.
7371         (skip_gfile_p): Delete, refactored as ...
7372         (skiplist_entry::do_gskip_file_p): ... this new method.
7373         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7374         (skiplist_entry::skip_function_p): ... this new method.
7375         (function_name_is_marked_for_skip): Now returns bool, and takes
7376         the function sal by const reference.  Adjust to use range-for and
7377         skiplist_entry methods.
7378         (_initialize_step_skip): Remove references to
7379         skiplist_entry_chain, skiplist_entry_count.
7380         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7381         takes the function sal by const reference.
7382
7383 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7384
7385         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7386         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7387         (dwarf2_frame_cache):
7388         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7389         RETURN_MASK_ALL and set *this_case to NULL.
7390         * frame-unwind.h: Update comments.
7391
7392 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7393
7394         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7395         (dwarf2_frame_state_copy_regs): Remove.
7396         (dwarf2_frame_state_free_regs): Remove.
7397         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7398         (dwarf2_restore_rule): Call method .alloc_regs instead of
7399         dwarf2_frame_state_alloc_regs.
7400         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7401         constructor.  Call std::move.
7402         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7403         (dwarf2_frame_cache): Likewise.
7404
7405         [GDB_SELF_TEST]: Include selftest.h and
7406         selftest-arch.h.
7407         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7408         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7409         execute_cfa_program_test.
7410
7411         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7412         copy ctor, assignment operator, move assignment.
7413         <alloc_regs>: New method.
7414         <swap>: New method.
7415         (struct dwarf2_frame_state): Delete dtor.
7416         (dwarf2_frame_state_alloc_regs): Remove declaration.
7417         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7418         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7419
7420 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7421
7422         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7423         (dwarf2_frame_state::dwarf2_frame_state): New.
7424         (dwarf2_frame_state::~dwarf2_frame_state): New.
7425         (dwarf2_fetch_cfa_info): Update.
7426         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7427         rather than a pointer.  Update code.
7428         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7429         dtor.
7430         <data_align, code_align, retaddr_column>: Change them to const.
7431         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7432         to bool.
7433
7434 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7435
7436         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7437         <loc.exp>: New field.
7438         * dwarf2-frame.c (execute_cfa_program): Update.
7439         (dwarf2_frame_prev_register): Update.
7440
7441 2017-08-10  Pedro Alves  <palves@redhat.com>
7442
7443         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7444
7445 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7446
7447         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7448         (fbsd_pending_children): Use std::list.
7449         (fbsd_remember_child): Likewise.
7450         (fbsd_is_child_pending): Likewise.
7451         (fbsd_pending_vfork_done): Use std::forward_list.
7452         (fbsd_add_vfork_done): Likewise.
7453         (fbsd_is_vfork_done_pending): Likewise.
7454         (fbsd_next_vfork_done): Likewise.
7455
7456 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7457
7458         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7459         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7460         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7461         for `mapfilename'.
7462         (fbsd_xfer_partial): Use gdb::byte_vector.
7463         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7464
7465 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7466
7467         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7468         "filestuff.h".
7469         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7470
7471 2017-08-09  Tom Tromey  <tom@tromey.com>
7472
7473         * skip.c (skiplist_entry): New constructor.
7474         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7475         (skiplist_entry::file_is_glob): Now bool.
7476         (skiplist_entry::file, skiplist_entry::function): Now
7477         std::string.
7478         (make_skip_entry): Return a unique_ptr.  Use new.
7479         (free_skiplist_entry, free_skiplist_entry_cleanup)
7480         (make_free_skiplist_entry_cleanup): Remove.
7481         (skip_command, skip_disable_command, add_skiplist_entry)
7482         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7483         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7484         (function_name_is_marked_for_skip): Update.
7485         (skip_delete_command): Update.  Use delete.
7486
7487 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7488
7489         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7490         (aarch64_linux_core_read_description): New function.
7491         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7492
7493 2017-08-09  Pedro Alves  <palves@redhat.com>
7494
7495         * cp-name-parser.y (cp_comp_to_string): Return a
7496         gdb::unique_xmalloc_ptr<char>.
7497         * cp-support.c (replace_typedefs_qualified_name)
7498         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7499         (cp_canonicalize_string_full): Use op= instead of explicit
7500         convertion.
7501         (cp_class_name_from_physname, method_name_from_physname)
7502         (cp_func_name, cp_remove_params): Adjust to use
7503         gdb::unique_xmalloc_ptr<char>.
7504         * cp-support.h (cp_comp_to_string): Return a
7505         gdb::unique_xmalloc_ptr<char>.
7506         * python/py-type.c (typy_lookup_type): Adjust to use
7507         gdb::unique_xmalloc_ptr<char>.
7508
7509 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7510
7511         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7512
7513 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7514             Yao Qi  <yao.qi@linaro.org>
7515
7516         * cp-support.c (cp_canonicalize_string_full): Use
7517         gdb::unique_xmalloc_ptr<char>.
7518         (cp_canonicalize_string): Likewise.
7519
7520 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7521
7522         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7523         * regformats/i386/amd64-avx-avx512.dat: Remove.
7524         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7525         * regformats/i386/amd64-avx-mpx.dat:Remove.
7526         * regformats/i386/amd64-avx.dat: Remove.
7527         * regformats/i386/amd64-mpx.dat: Remove.
7528         * regformats/i386/i386-avx-avx512.dat: Remove.
7529         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7530         * regformats/i386/i386-avx-mpx.dat: Remove.
7531         * regformats/i386/i386-mmx.dat: Remove.
7532         * regformats/i386/i386-mpx.dat: Remove.
7533
7534 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7535
7536         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7537         * amd64-tdep.c: Don't include features/i386/x32*.c.
7538         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7539         functions.
7540         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7541         and i386/x32-avx-avx512.
7542         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7543         and i386/x32.xml.
7544         * features/i386/x32-avx-avx512.c: Removed.
7545         * features/i386/x32-avx-avx512.xml: Removed.
7546         * features/i386/x32-avx.c: Removed.
7547         * features/i386/x32-avx.xml: Removed.
7548         * features/i386/x32.c: Removed.
7549         * features/i386/x32.xml: Removed.
7550         * regformats/i386/x32-avx-avx512.dat: Removed.
7551         * regformats/i386/x32-avx.dat: Removed.
7552         * regformats/i386/x32.dat: Removed.
7553
7554 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7555
7556         PR breakpoints/21886
7557         * mem-break.c (default_memory_insert_breakpoint): Use
7558         `->placed_address' rather than `->reqstd_address' for the
7559         breakpoint location.
7560
7561 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7562
7563         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7564         assertions.
7565
7566 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7567
7568         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7569         a union of `tdep_info', `tdesc_data' and `id'.
7570         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7571         rather than `info.tdep_info'.
7572         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7573         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7574         * i386-tdep.c (i386_gdbarch_init): Likewise.
7575         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7576         * mips-tdep.c (mips_gdbarch_init): Likewise.
7577         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7578         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7579         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7580         `info.tdep_info'.
7581         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7582         `info.tdep_info'.
7583         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7584         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7585         `info.tdep_info'.
7586         * spu-tdep.c (spu_gdbarch_init): Likewise.
7587         * gdbarch.h: Regenerate.
7588
7589 2017-08-07  Leszek Swirski  <leszeks@google.com>
7590
7591         PR symtab/20899
7592         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7593
7594 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7595
7596         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7597         (gdbsim_open): Rename gdb_argv args object to argv.
7598
7599 2017-08-05  Tom Tromey  <tom@tromey.com>
7600
7601         * compile/compile-object-load.c (compile_object_load): Use
7602         gdb::unique_xmalloc_ptr.
7603         * cli/cli-dump.c (scan_filename): Rename from
7604         scan_filename_with_cleanup.  Change return type.
7605         (scan_expression): Rename from scan_expression_with_cleanup.
7606         Change return type.
7607         (dump_memory_to_file, dump_value_to_file, restore_command):
7608         Use gdb::unique_xmalloc_ptr.  Update.
7609         * cli/cli-cmds.c (find_and_open_script): Use
7610         gdb::unique_xmalloc_ptr.
7611         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7612         * symmisc.c (maintenance_print_symbols)
7613         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7614         * symfile.c (symfile_bfd_open, generic_load)
7615         (add_symbol_file_command, remove_symbol_file_command): Use
7616         gdb::unique_xmalloc_ptr.
7617         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7618         * psymtab.c (maintenance_print_psymbols): Use
7619         gdb::unique_xmalloc_ptr.
7620         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7621         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7622         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7623         (reload_shared_libraries_1): Likewise.
7624
7625 2017-08-05  Tom Tromey  <tom@tromey.com>
7626
7627         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7628         (rust_op_vector, rust_set_vector): New typedefs.
7629         (current_parser): New global.
7630         (work_obstack): Change to pointer type.  Update all users.
7631         (rust_ast, pstate): Remove globals.
7632         (struct rust_parser): New.
7633         (%union) <params, field_inits>: Change type.
7634         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7635         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7636         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7637         (convert_params_to_types, convert_params_to_expression): Change
7638         type of "params".
7639         (ast_string): Change type of "fields".
7640         (rust_parse): Make a rust_parser.  Remove cleanups.
7641         (rust_lex_tests): Make and install an auto_obstack.
7642
7643 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7644
7645         * configure.srv (ipa_x32_linux_regobj): New.
7646         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7647         instead of X86_TDESC_AVX512.
7648         (initialize_low_tracepoint): Call
7649         init_registers_x32_avx_avx512_linux.
7650
7651 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7652
7653         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7654
7655 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7656
7657         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7658
7659 2017-08-03  Tom Tromey  <tom@tromey.com>
7660
7661         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7662         Remove.
7663         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7664
7665 2017-08-03  Tom Tromey  <tom@tromey.com>
7666
7667         * python/py-param.c (compute_enum_values): Use gdb_argv.
7668
7669 2017-08-03  Tom Tromey  <tom@tromey.com>
7670
7671         * utils.h (struct gdb_argv_deleter): New.
7672         (gdb_argv): New class.
7673         * utils.c (gdb_argv::reset): New method.
7674         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7675         * tracefile.c (tsave_command): Use gdb_argv.
7676         * top.c (new_ui_command): Use gdb_argv.
7677         * symmisc.c (maintenance_print_symbols)
7678         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7679         * symfile.c (symbol_file_command, generic_load)
7680         (remove_symbol_file_command): Use gdb_argv.
7681         * stack.c (backtrace_command): Use gdb_argv.
7682         * source.c (add_path, show_substitute_path_command)
7683         (unset_substitute_path_command, set_substitute_path_command):
7684         Use gdb_argv.
7685         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7686         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7687         * remote.c (extended_remote_run, remote_put_command)
7688         (remote_get_command, remote_delete_command): Use gdb_argv.
7689         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7690         (gdbsim_open): Use gdb_argv.
7691         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7692         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7693         * procfs.c (procfs_info_proc): Use gdb_argv.
7694         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7695         * infrun.c (handle_command): Use gdb_argv.
7696         * inferior.c (add_inferior_command, clone_inferior_command):
7697         Use gdb_argv.
7698         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7699         * exec.c (exec_file_command): Use gdb_argv.
7700         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7701         * compile/compile.c (build_argc_argv): Use gdb_argv.
7702
7703 2017-08-03  Tom Tromey  <tom@tromey.com>
7704
7705         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7706
7707 2017-08-03  Tom Tromey  <tom@tromey.com>
7708
7709         * python/python.c (compute_python_string): Return std::string.
7710         (gdbpy_eval_from_control_command): Update.
7711         (do_start_initialization): Use std::string.
7712         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7713         xstrprintf.
7714         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7715         xstrprintf.
7716
7717 2017-08-03  Tom Tromey  <tom@tromey.com>
7718
7719         * top.h (do_restore_instream_cleanup): Remove.
7720         * top.c (do_restore_instream_cleanup): Remove.
7721         (read_command_file): Use scoped_restore.
7722         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7723
7724 2017-08-03  Tom Tromey  <tom@tromey.com>
7725
7726         * cli/cli-script.c (execute_user_command)
7727         (execute_control_command): Use scoped_restore.
7728
7729 2017-08-03  Tom Tromey  <tom@tromey.com>
7730
7731         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7732         (execute_user_command): Remove user_call_depth; use
7733         user_args_stack's size instead.
7734
7735 2017-08-03  Tom Tromey  <tom@tromey.com>
7736
7737         * top.h (in_user_command): Remove.
7738         * top.c (in_user_command): Remove.
7739         * cli/cli-script.c (do_restore_user_call_depth)
7740         (execute_user_command): Update.
7741
7742 2017-08-03  Tom Tromey  <tom@tromey.com>
7743
7744         * valops.c (search_struct_method): Use gdb::byte_vector.
7745         * valarith.c (value_concat): Use std::vector.
7746         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7747         (simple_search_memory): Likewise.
7748         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7749         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7750         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7751         * elfread.c (elf_rel_plt_read): Use std::string.
7752         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7753         * cli/cli-dump.c (restore_section_callback): Use
7754         gdb::byte_vector.
7755
7756 2017-08-03  Tom Tromey  <tom@tromey.com>
7757
7758         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7759
7760 2017-08-03  Tom Tromey  <tom@tromey.com>
7761
7762         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7763         (tui_register_format): Use scoped_restore.
7764
7765 2017-08-03  Tom Tromey  <tom@tromey.com>
7766
7767         * reverse.c (exec_direction_default): Remove.
7768         (exec_reverse_once): Use scoped_restore.
7769         * remote.c (restore_remote_timeout): Remove.
7770         (remote_flash_erase, remote_flash_write, remote_flash_done)
7771         (readchar, remote_serial_write): Use scoped_restore.
7772         * cli/cli-script.c (struct source_cleanup_lines_args)
7773         (source_cleanup_lines): Remove.
7774         (script_from_file): Use scoped_restore.
7775         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7776         (source_command): Use scoped_restore.
7777
7778 2017-08-03  Tom Tromey  <tom@tromey.com>
7779
7780         * utils.h (make_cleanup_free_so): Remove.
7781         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7782         * solist.h (struct so_deleter): New.
7783         (so_list_up): New typedef.
7784         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7785
7786 2017-08-03  Tom Tromey  <tom@tromey.com>
7787
7788         * utils.h (make_cleanup_restore_current_language): Remove.
7789         * utils.c (do_restore_current_language)
7790         (make_cleanup_restore_current_language): Remove.
7791         * parse.c (parse_exp_in_context_1)
7792         (parse_expression_with_language): Use
7793         scoped_restore_current_language.
7794         * mi/mi-main.c (mi_cmd_execute): Use
7795         scoped_restore_current_language.
7796         * language.h (scoped_restore_current_language): New class.
7797
7798 2017-08-03  Tom Tromey  <tom@tromey.com>
7799
7800         * compile/compile.c (cleanup_unlink_file): Remove.
7801         (compile_to_object): Use gdb::unlinker.
7802         (eval_compile_command): Likewise.
7803
7804 2017-08-03  Tom Tromey  <tom@tromey.com>
7805
7806         * utils.h (make_cleanup_fclose): Remove.
7807         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7808
7809 2017-08-03  Tom Tromey  <tom@tromey.com>
7810
7811         * top.c (open_terminal_stream): Return gdb_file_up.
7812         (new_ui_command): Update.
7813
7814 2017-08-03  Tom Tromey  <tom@tromey.com>
7815
7816         * source.c (print_source_lines_base, forward_search_command)
7817         (reverse_search_command): Use gdb_file_up.
7818
7819 2017-08-03  Tom Tromey  <tom@tromey.com>
7820
7821         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7822
7823 2017-08-03  Tom Tromey  <tom@tromey.com>
7824
7825         * cli/cli-cmds.c (find_and_open_script): Change return type.
7826         Remove "streamp" and "full_path" parameters.
7827         (source_script_with_search): Update.
7828         * auto-load.c (source_script_file): Update.
7829         * cli/cli-cmds.h (find_and_open_script): Change type.
7830         (open_script): New struct.
7831
7832 2017-08-03  Tom Tromey  <tom@tromey.com>
7833
7834         * xml-support.c (xml_fetch_content_from_file): Update.
7835         * ui-file.c (stdio_file::open): Update.
7836         * tracefile-tfile.c (tfile_start): Update.
7837         * remote.c (remote_file_put, remote_file_get): Update.
7838         * nat/linux-procfs.c (linux_proc_get_int)
7839         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7840         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7841         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7842         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7843         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7844         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7845         * linux-nat.c (linux_proc_pending_signals): Update.
7846         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7847         (file_closer): Remove.
7848         * compile/compile.c (compile_to_object): Update.
7849         * common/filestuff.h (struct gdb_file_deleter): New.
7850         (gdb_file_up): New typedef.
7851         (gdb_fopen_cloexec): Change return type.
7852         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7853         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7854         (dump_binary_file, restore_binary_file): Update.
7855         * auto-load.c (auto_load_objfile_script_1): Update.
7856
7857 2017-08-03  Tom Tromey  <tom@tromey.com>
7858
7859         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7860         (info_static_tracepoint_markers_command): Likewise.
7861         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7862         * skip.c (skip_info): Use ui_out_emit_table.
7863         * progspace.c (print_program_space): Use ui_out_emit_table.
7864         * osdata.c (info_osdata): Use ui_out_emit_table.
7865         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7866         ui_out_emit_table.
7867         * linux-thread-db.c (info_auto_load_libthread_db): Use
7868         ui_out_emit_table.
7869         * inferior.c (print_inferior): Use ui_out_emit_table.
7870         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7871         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7872         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7873         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7874         * ui-out.h (class ui_out_emit_table): New.
7875
7876 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7877
7878         * mips-tdep.c (mips_fpu_type_str): New function.
7879         (mips_dump_tdep): Call it.
7880
7881 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7882
7883         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7884         `->mips_fpu_type'.
7885
7886 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7887
7888         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7889
7890 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7891
7892         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7893
7894 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7895
7896         * cli/cli-cmds.c (maintenancechecklist): New variable.
7897         * gdbcmd.h (maintenancechecklist): Declare it.
7898         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7899         Call i386_linux_read_description with different masks.
7900         * maint.c (maintenance_check_command): New function.
7901         (_initialize_maint_cmds): Call add_prefix_cmd.
7902         * target-descriptions.c (tdesc_reg): override operator != and ==.
7903         (tdesc_type): Likewise.
7904         (tdesc_feature): Likewise.
7905         (target_desc): Likewise.
7906         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7907         (maintenance_check_xml_descriptions): New function.
7908         (_initialize_target_descriptions) Add command "xml-descriptions".
7909         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7910
7911 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7912
7913         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7914         Include features/i386/32bit-*.c.
7915         (i386_linux_read_description): Generate target description if it
7916         doesn't exist.
7917         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7918         functions.
7919         * features/i386/32bit-linux.c: Re-generated.
7920         * features/i386/32bit-sse.c: Likewise.
7921         * target-descriptions.c (print_c_feature::visit): Print code to
7922         set register number if needed.
7923         (print_c_feature) <m_next_regnum>: New field.
7924
7925 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7926
7927         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7928         (FEATURE_XMLFILES): New.
7929         (FEATURE_CFILES): New.
7930         New rules.
7931         (clean-cfiles): Remove generated c files.
7932         * features/i386/32bit-avx.c: Generated.
7933         * features/i386/32bit-avx512.c: Generated.
7934         * features/i386/32bit-core.c: Generated.
7935         * features/i386/32bit-linux.c: Generated.
7936         * features/i386/32bit-mpx.c: Generated.
7937         * features/i386/32bit-pkeys.c: Generated.
7938         * features/i386/32bit-sse.c: Generated.
7939         * target-descriptions.c: Include algorithm.
7940         (tdesc_element_visitor): Add method visit_end.
7941         (print_c_tdesc): Implement visit_end.
7942         (print_c_tdesc:: m_filename_after_features): Move it to
7943         protected.
7944         (print_c_feature): New class.
7945         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7946         name starts with "i386/32bit-".
7947
7948 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7949
7950         * target-descriptions.c (tdesc_element_visitor): New class.
7951         (tdesc_element): New class.
7952         (tdesc_reg): Inherit from tdesc_element.
7953         (tdesc_reg::accept): New function.
7954         (tdesc_type): Inherit from tdesc_element.
7955         (tdesc_type::accept): New function.
7956         (tdesc_feature): Inherit from tdesc_element.
7957         (tdesc_feature::accept): New function.
7958         (target_desc): Inherit from tdesc_element.
7959         (target_desc::target_desc): New.
7960         (target_desc::~target_desc): New.
7961         (target_desc::accept): New.
7962         (allocate_target_description): Use new.
7963         (free_target_description): Use delete.
7964         (print_c_tdesc): New class.
7965         (maint_print_c_tdesc_cmd): Adjust.
7966
7967         * features/aarch64.c: Re-generated.
7968         * features/arc-arcompact.c: Re-generated.
7969         * features/arc-v2.c: Re-generated.
7970         * features/arm/arm-with-iwmmxt.c: Re-generated.
7971         * features/arm/arm-with-m.c: Re-generated.
7972         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7973         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7974         * features/arm/arm-with-neon.c: Re-generated.
7975         * features/arm/arm-with-vfpv2.c: Re-generated.
7976         * features/arm/arm-with-vfpv3.c: Re-generated.
7977         * features/i386/amd64-avx-avx512.c: Re-generated.
7978         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7979         * features/i386/amd64-avx.c: Re-generated.
7980         * features/i386/amd64-avx-linux.c: Re-generated.
7981         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7982         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7983         * features/i386/amd64-avx-mpx.c: Re-generated.
7984         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7985         * features/i386/amd64.c: Re-generated.
7986         * features/i386/amd64-linux.c: Re-generated.
7987         * features/i386/amd64-mpx.c: Re-generated.
7988         * features/i386/amd64-mpx-linux.c: Re-generated.
7989         * features/i386/i386-avx-avx512.c: Re-generated.
7990         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7991         * features/i386/i386-avx.c: Re-generated.
7992         * features/i386/i386-avx-linux.c: Re-generated.
7993         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7994         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7995         * features/i386/i386-avx-mpx.c: Re-generated.
7996         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7997         * features/i386/i386.c: Re-generated.
7998         * features/i386/i386-linux.c: Re-generated.
7999         * features/i386/i386-mmx.c: Re-generated.
8000         * features/i386/i386-mmx-linux.c: Re-generated.
8001         * features/i386/i386-mpx.c: Re-generated.
8002         * features/i386/i386-mpx-linux.c: Re-generated.
8003         * features/i386/x32-avx-avx512.c: Re-generated.
8004         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8005         * features/i386/x32-avx.c: Re-generated.
8006         * features/i386/x32-avx-linux.c: Re-generated.
8007         * features/i386/x32.c: Re-generated.
8008         * features/i386/x32-linux.c: Re-generated.
8009         * features/microblaze.c: Re-generated.
8010         * features/microblaze-with-stack-protect.c: Re-generated.
8011         * features/mips64-dsp-linux.c: Re-generated.
8012         * features/mips64-linux.c: Re-generated.
8013         * features/mips-dsp-linux.c: Re-generated.
8014         * features/mips-linux.c: Re-generated.
8015         * features/nds32.c: Re-generated.
8016         * features/nios2.c: Re-generated.
8017         * features/nios2-linux.c: Re-generated.
8018         * features/rs6000/powerpc-32.c: Re-generated.
8019         * features/rs6000/powerpc-32l.c: Re-generated.
8020         * features/rs6000/powerpc-403.c: Re-generated.
8021         * features/rs6000/powerpc-403gc.c : Re-generated.
8022         * features/rs6000/powerpc-405.c: Re-generated.
8023         * features/rs6000/powerpc-505.c: Re-generated.
8024         * features/rs6000/powerpc-601.c: Re-generated.
8025         * features/rs6000/powerpc-602.c: Re-generated.
8026         * features/rs6000/powerpc-603.c: Re-generated.
8027         * features/rs6000/powerpc-604.c: Re-generated.
8028         * features/rs6000/powerpc-64.c: Re-generated.
8029         * features/rs6000/powerpc-64l.c: Re-generated.
8030         * features/rs6000/powerpc-7400.c: Re-generated.
8031         * features/rs6000/powerpc-750.c: Re-generated.
8032         * features/rs6000/powerpc-860.c: Re-generated.
8033         * features/rs6000/powerpc-altivec32.c: Re-generated.
8034         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8035         * features/rs6000/powerpc-altivec64.c: Re-generated.
8036         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8037         * features/rs6000/powerpc-cell32l.c: Re-generated.
8038         * features/rs6000/powerpc-cell64l.c: Re-generated.
8039         * features/rs6000/powerpc-e500.c: Re-generated.
8040         * features/rs6000/powerpc-e500l.c: Re-generated.
8041         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8042         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8043         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8044         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8045         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8046         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8047         * features/rs6000/powerpc-vsx32.c: Re-generated.
8048         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8049         * features/rs6000/powerpc-vsx64.c: Re-generated.
8050         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8051         * features/rs6000/rs6000.c: Re-generated.
8052         * features/s390-linux32.c: Re-generated.
8053         * features/s390-linux32v1.c: Re-generated.
8054         * features/s390-linux32v2.c: Re-generated.
8055         * features/s390-linux64.c: Re-generated.
8056         * features/s390-linux64v1.c: Re-generated.
8057         * features/s390-linux64v2.c: Re-generated.
8058         * features/s390-te-linux64.c: Re-generated.
8059         * features/s390-tevx-linux64.c: Re-generated.
8060         * features/s390-vx-linux64.c: Re-generated.
8061         * features/s390x-linux64.c: Re-generated.
8062         * features/s390x-linux64v1.c: Re-generated.
8063         * features/s390x-linux64v2.c: Re-generated.
8064         * features/s390x-te-linux64.c: Re-generated.
8065         * features/s390x-tevx-linux64.c: Re-generated.
8066         * features/s390x-vx-linux64.c: Re-generated.
8067         * features/sparc/sparc32-solaris.c: Re-generated.
8068         * features/sparc/sparc64-solaris.c: Re-generated.
8069         * features/tic6x-c62x.c: Re-generated.
8070         * features/tic6x-c62x-linux.c: Re-generated.
8071         * features/tic6x-c64x.c: Re-generated.
8072         * features/tic6x-c64x-linux.c: Re-generated.
8073         * features/tic6x-c64xp.c: Re-generated.
8074         * features/tic6x-c64xp-linux.c: Re-generated.
8075
8076 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8077
8078         * i386-linux-tdep.c (i386_linux_read_description): New function.
8079         (i386_linux_core_read_description): Call
8080         i386_linux_read_description.
8081         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8082         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8083         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8084         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8085         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8086         * x86-linux-nat.c (x86_linux_read_description): Call
8087         i386_linux_read_description.
8088
8089 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8090
8091         * NEWS: Mention it.
8092         * features/Makefile (%.c: %.xml): Pass the xml file name to
8093         command "maint print c-tdesc".
8094         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8095         name from 'arg'.
8096
8097 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8098
8099         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8100         in-class initialization.
8101         (tdesc_create_feature): Call new instead of XCNEW.
8102         (free_target_description): Ue delete.
8103
8104 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8105
8106         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8107
8108 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8109
8110         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8111         constant.
8112         (amd64_x32_init_abi): Likewise.
8113         * amd64-tdep.h (amd64_init_abi): Update declaration.
8114         (amd64_x32_init_abi): Likewise.
8115
8116 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8117
8118         PR tdep/21717
8119         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8120         condition for FPSCR.
8121         (arm_linux_store_inferior_registers): Likewise.
8122
8123 2017-07-22  Tom Tromey  <tom@tromey.com>
8124
8125         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8126         <syscalls_counts>: Now a std::vector.
8127         (get_catch_syscall_inferior_data): Use "new".
8128         (catch_syscall_inferior_data_cleanup): Use "delete".
8129         (insert_catch_syscall, remove_catch_syscall)
8130         (clear_syscall_counts): Update.
8131
8132 2017-07-22  Tom Tromey  <tom@tromey.com>
8133
8134         * break-catch-syscall.c (syscall_catchpoint)
8135         <syscalls_to_be_caught>: Now a std::vector<int>
8136         (~syscall_catchpoint): Remove.
8137         (insert_catch_syscall, remove_catch_syscall)
8138         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8139         (print_mention_catch_syscall, print_recreate_catch_syscall):
8140         Update.
8141         (create_syscall_event_catchpoint): Change type of "filter"
8142         parameter.
8143         (catch_syscall_split_args): Return a std::vector.
8144         (catch_syscall_command_1, catching_syscall_number_1): Update.
8145
8146 2017-07-22  Tom Tromey  <tom@tromey.com>
8147
8148         * break-catch-throw.c (struct exception_catchpoint)
8149         <exception_rx>: Now a std::string.
8150         (~exception_catchpoint): Remove.
8151         (print_one_detail_exception_catchpoint): Update.
8152         (handle_gnu_v3_exceptions): Change type of except_rx.
8153         (extract_exception_regexp): Return a std::string.
8154         (catch_exception_command_1): Update.
8155
8156 2017-07-22  Tom Tromey  <tom@tromey.com>
8157
8158         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8159         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8160         std::vector.
8161         <catch_all>: Now a bool.
8162         (~signal_catchpoint): Remove.
8163         (signal_catchpoint_insert_location)
8164         (signal_catchpoint_remove_location)
8165         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8166         (signal_catchpoint_print_mention)
8167         (signal_catchpoint_print_recreate)
8168         (signal_catchpoint_explains_signal): Update.
8169         (create_signal_catchpoint): Change type of "filter" and
8170         "catch_all".
8171         (catch_signal_split_args): Return a std::vector.  Change type of
8172         "catch_all".
8173         (catch_signal_command): Update.
8174
8175 2017-07-20  Pedro Alves  <palves@redhat.com>
8176
8177         * ada-lang.c (ada_language_defn): Make extern.
8178         (_initialize_ada_language): Remove add_language call.
8179         * c-lang.c (c_language_defn, cplus_language_defn)
8180         (asm_language_defn, minimal_language_defn): Make extern.
8181         (_initialize_c_language): Delete.
8182         * completer.c (compare_cstrings): Delete, moved to utils.h.
8183         * d-lang.c (d_language_defn): Make extern.
8184         (_initialize_d_language): Remove add_language calls.
8185         * defs.h (enum language): Add comment.
8186         * f-lang.c (f_language_defn): Make extern.
8187         (_initialize_f_language): Remove add_language call.
8188         * go-lang.c (go_language_defn): Make extern.
8189         (_initialize_go_language): Remove add_language call.
8190         * language.c: Include <algorithm>.
8191         (languages): Redefine as const array.
8192         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8193         (set_language_command): Handle "local".  Use for-range loop.
8194         (set_language): Remove loop.
8195         (language_enum): Rewrite.
8196         (language_def, language_str): Remove loops.
8197         (add_language): Delete.
8198         (add_set_language_command): New, based on add_languages.
8199         (skip_language_trampoline): Adjust.
8200         (local_language_defn): Delete.
8201         (language_gdbarch_post_init): Adjust.
8202         (_initialize_language): Remove add_language calls.  Call
8203         add_set_language_command.
8204         * language.h (add_language): Delete.
8205         (auto_language_defn)
8206         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8207         (asm_language_defn, c_language_defn, cplus_language_defn)
8208         (d_language_defn, f_language_defn, go_language_defn)
8209         (m2_language_defn, objc_language_defn, opencl_language_defn)
8210         (pascal_language_defn, rust_language_defn): Declare.
8211         * m2-lang.c (m2_language_defn): Make extern.
8212         (_initialize_m2_language): Remove add_language call.
8213         * objc-lang.c (objc_language_defn): Make extern.
8214         (_initialize_objc_language): Remove add_language call.
8215         * opencl-lang.c (opencl_language_defn): Make extern.
8216         (_initialize_opencl_language): Remove add_language call.
8217         * p-lang.c (pascal_language_defn): Make extern.
8218         (_initialize_pascal_language): Delete.
8219         * rust-lang.c (rust_language_defn): Make extern.
8220         (_initialize_rust_language): Delete.
8221         * utils.h (compare_cstrings): New static inline function.
8222
8223 2017-07-20  Pedro Alves  <palves@redhat.com>
8224
8225         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8226         (get_var_value): Constify parameters.
8227         (get_int_var_value): Change prototype.
8228         (to_fixed_range_type): Adjust.
8229         * ada-lang.h (get_int_var_value): Change prototype.
8230
8231 2017-07-20  Pedro Alves  <palves@redhat.com>
8232
8233         * dwarf2read.c (dw2_lookup_symbol): Use
8234         SYMBOL_MATCHES_SEARCH_NAME.
8235         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8236
8237 2017-07-20  Pedro Alves  <palves@redhat.com>
8238
8239         * block.c (block_iter_name_step, block_iter_name_first)
8240         (block_iter_name_next): Delete.
8241         (block_lookup_symbol_primary): Adjust to use
8242         dict_iter_match_first/dict_iter_match_next.
8243         * block.h (block_iter_name_first, block_iter_name_next): Delete
8244         declarations.
8245         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8246         dict_iter_match_first/dict_iter_match_next.
8247
8248 2017-07-20  Pedro Alves  <palves@redhat.com>
8249
8250         * cp-support.c (cp_find_first_component_aux): Add missing case for
8251         end of string.
8252
8253 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8254
8255         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8256         of dwo_cu's dwo_file.
8257
8258 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8259
8260         * remote.c (store_registers_using_G): Remove one line comment.
8261
8262 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8263
8264         * regcache.c (regcache_cpy): Simplify it.
8265         (regcache::cpy_no_passthrough): Remove it.
8266         * regcache.h (cpy_no_passthrough): Remove it.
8267         (regcache_dup, regcache_cpy): Update comments.
8268
8269 2017-07-18  Pedro Alves  <palves@redhat.com>
8270
8271         * remote-sim.c (sim_command_completer): Adjust to work with a
8272         completion_tracker instead of a VEC.
8273
8274 2017-07-17  Pedro Alves  <palves@redhat.com>
8275
8276         * completer.c (complete_source_filenames): New function.
8277         (complete_address_and_linespec_locations): New function.
8278         (location_completer): Use complete_address_and_linespec_locations.
8279         (completion_tracker::build_completion_result): Honor the tracker's
8280         request to suppress append.
8281         * completer.h (completion_tracker::suppress_append_ws)
8282         (completion_tracker::set_suppress_append_ws): New methods.
8283         (completion_tracker::m_suppress_append_ws): New field.
8284         (complete_source_filenames): New declaration.
8285         * linespec.c (linespec_complete_what): New.
8286         (struct ls_parser) <complete_what, completion_word,
8287         completion_quote_char, completion_quote_end, completion_tracker>:
8288         New fields.
8289         (string_find_incomplete_keyword_at_end): New.
8290         (linespec_lexer_lex_string): Record quote char.  If in completion
8291         mode, don't throw.
8292         (linespec_lexer_consume_token): Advance the completion word point.
8293         (linespec_lexer_peek_token): Save/restore completion info.
8294         (save_stream_and_consume_token): New.
8295         (set_completion_after_number): New.
8296         (linespec_parse_basic): Set what to complete next depending on
8297         token.  Handle function and label completions specially.
8298         (parse_linespec): Disable objc shortcut in completion mode.  Set
8299         what to complete next depending on token type.  Skip keyword if in
8300         completion mode.
8301         (complete_linespec_component, linespec_complete): New.
8302         * linespec.h (linespec_complete): Declare.
8303
8304 2017-07-17  Pedro Alves  <palves@redhat.com>
8305
8306         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8307         Handle 'operator<' / 'operator<<'.
8308
8309 2017-07-17  Pedro Alves  <palves@redhat.com>
8310
8311         * completer.c (collect_explicit_location_matches): Handle
8312         MATCH_LABEL.
8313         (convert_explicit_location_to_linespec): New, factored out from
8314         ...
8315         (convert_explicit_location_to_sals): ... this.
8316         (complete_label): New.
8317         (linespec_complete_label, find_label_symbols_in_block): New.
8318         (find_label_symbols): Add completion_mode parameter and adjust to
8319         call find_label_symbols_in_block.
8320         * linespec.h (linespec_complete_label): Declare.
8321
8322 2017-07-17  Pedro Alves  <palves@redhat.com>
8323
8324         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8325         complete_symbol_mode parameter.
8326         * cli/cli-cmds.c (complete_command): Get the completion result out
8327         of the handle_brkchars tracker if used a custom word point.
8328         * completer.c: Include "linespec.h".
8329         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8330         (advance_to_expression_complete_word_point): New.
8331         (completion_tracker::completes_to_completion_word): New.
8332         (complete_files_symbols): Pass down
8333         complete_symbol_mode::EXPRESSION.
8334         (explicit_options, probe_options): New.
8335         (collect_explicit_location_matches): Complete on the
8336         explictit_loc->foo instead of word.  Use
8337         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8338         keyword and options completions.
8339         (backup_text_ptr): Delete.
8340         (skip_keyword): New.
8341         (complete_explicit_location): Remove 'word' parameter.  Add
8342         language, quoted_arg_start and quoted_arg_end parameters.
8343         Rewrite, parsing left to right.
8344         (location_completer): Rewrite.
8345         (location_completer_handle_brkchars): New function.
8346         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8347         (enum complete_line_internal_reason): Adjust comments.
8348         (completion_tracker::discard_completions): New.
8349         (completer_handle_brkchars_func_for_completer): Handle
8350         location_completer.
8351         (gdb_custom_word_point_brkchars)
8352         (gdb_org_rl_basic_quote_characters): New.
8353         (gdb_completion_word_break_characters_throw)
8354         (completion_find_completion_word): Handle trackers that use a
8355         custom word point.
8356         (completion_tracker::advance_custom_word_point_by): New.
8357         (completion_tracker::build_completion_result): Don't rely on
8358         readline appending the quote char.
8359         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8360         use a custom word point.
8361         (gdb_rl_attempted_completion_function): Restore
8362         rl_basic_quote_characters.
8363         * completer.h (class completion_tracker): Extend intro comment.
8364         (completion_tracker::set_quote_char)
8365         (completion_tracker::quote_char)
8366         (completion_tracker::set_use_custom_word_point)
8367         (completion_tracker::use_custom_word_point)
8368         (completion_tracker::custom_word_point)
8369         (completion_tracker::set_custom_word_point)
8370         (completion_tracker::advance_custom_word_point_by)
8371         (completion_tracker::completes_to_completion_word)
8372         (completion_tracker::discard_completions): New methods.
8373         (completion_tracker::m_quote_char)
8374         (completion_tracker::m_use_custom_word_point)
8375         (completion_tracker::m_custom_word_point): New fields.
8376         (advance_to_expression_complete_word_point): Declare.
8377         * f-lang.c (f_collect_symbol_completion_matches): Add
8378         complete_symbol_mode parameter.
8379         * language.h (struct language_defn)
8380         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8381         parameter.
8382         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8383         (linespec_complete_function): New function.
8384         (linespec_lexer_lex_keyword): Adjust.
8385         * linespec.h (linespec_keywords, linespec_complete_function): New
8386         declarations.
8387         * location.c (find_end_quote): New function.
8388         (explicit_location_lex_one): Add explicit_completion_info
8389         parameter.  Save quoting info.  Don't throw if being called for
8390         completion.  Don't handle Ada operators here.
8391         (is_cp_operator, skip_op_false_positives, first_of)
8392         (explicit_location_lex_one_function): New function.
8393         (string_to_explicit_location): Replace 'dont_throw' parameter with
8394         an explicit_completion_info pointer parameter.  Handle it.  Don't
8395         use explicit_location_lex_one to lex function names.  Use
8396         explicit_location_lex_one_function instead.
8397         * location.h (struct explicit_completion_info): New.
8398         (string_to_explicit_location): Replace 'dont_throw' parameter with
8399         an explicit_completion_info pointer parameter.
8400         * symtab.c (default_collect_symbol_completion_matches_break_on):
8401         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8402         (default_collect_symbol_completion_matches)
8403         (collect_symbol_completion_matches): Add complete_symbol_mode
8404         parameter.
8405         (collect_symbol_completion_matches_type): Pass down
8406         complete_symbol_mode::EXPRESSION.
8407         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8408         parameter.  Handle LINESPEC mode.
8409         * symtab.h (complete_symbol_mode): New.
8410         (default_collect_symbol_completion_matches_break_on)
8411         (default_collect_symbol_completion_matches)
8412         (collect_symbol_completion_matches)
8413         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8414         parameter.
8415
8416 2017-07-17  Pedro Alves  <palves@redhat.com>
8417
8418         * utils.c (enum class strncmp_iw_mode): New.
8419         (strcmp_iw): Rename to ...
8420         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8421         parameters.  Handle them.
8422         (strncmp_iw): New.
8423         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8424         * utils.h (strncmp_iw): Declare.
8425         (strcmp_iw): Move describing comments here.
8426
8427 2017-07-17  Pedro Alves  <palves@redhat.com>
8428
8429         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8430         CP_OPERATOR_STR.
8431         * c-typeprint.c (is_type_conversion_operator): Use
8432         CP_OPERATOR_STR.
8433         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8434         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8435         CP_OPERATOR_LEN.
8436         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8437         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8438         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8439         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8440         CP_OPERATOR_STR.
8441         * location.c: Include "cp-support.h".
8442         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8443         CP_OPERATOR_STR.
8444         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8445         CP_OPERATOR_LEN.
8446
8447 2017-07-17  Pedro Alves  <palves@redhat.com>
8448
8449         * cli/cli-cmds.c (complete_command): Use a completion tracker
8450         along with completion_find_completion_word for handle_brkchars
8451         phase.
8452         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8453         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8454         (struct gdb_rl_completion_word_info): New.
8455         (gdb_rl_find_completion_word): New.
8456         (completion_find_completion_word): New.
8457         * completer.h (completion_find_completion_word): Declare.
8458
8459 2017-07-17  Pedro Alves  <palves@redhat.com>
8460
8461         * ada-lang.c (symbol_completion_match): Adjust comments.
8462         (symbol_completion_add): Replace vector parameter with
8463         completion_tracker parameter.  Use it.
8464         (ada_make_symbol_completion_list): Rename to...
8465         (ada_collect_symbol_completion_matches): ... this.  Add
8466         completion_tracker parameter and use it.
8467         (ada_language_defn): Adjust.
8468         * break-catch-syscall.c (catch_syscall_completer): Adjust
8469         prototype and work with completion_tracker instead of VEC.
8470         * breakpoint.c (condition_completer): Adjust prototype and work
8471         with completion_tracker instead of VEC.
8472         * c-lang.c (c_language_defn, cplus_language_defn)
8473         (asm_language_defn, minimal_language_defn): Adjust to renames.
8474         * cli/cli-cmds.c (complete_command): Rework using
8475         completion_tracker.  Catch exceptions when completing.
8476         * cli/cli-decode.c (integer_unlimited_completer)
8477         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8478         with completion_tracker instead of VEC.
8479         * command.h (struct completion_tracker): Forward declare.
8480         (completer_ftype, completer_handle_brkchars_ftype): Change
8481         types.
8482         (complete_on_cmdlist, complete_on_enum): Adjust.
8483         * completer.c: Include <algorithm>.
8484         (struct gdb_completer_state): New.
8485         (current_completion): New global.
8486         (readline_line_completion_function): Delete.
8487         (noop_completer, filename_completer)
8488         (filename_completer_handle_brkchars, complete_files_symbols)
8489         (linespec_location_completer): Adjust to work with a
8490         completion_tracker instead of a VEC.
8491         (string_or_empty): New.
8492         (collect_explicit_location_matches): Adjust to work with a
8493         completion_tracker instead of a VEC.
8494         (explicit_location_completer): Rename to ...
8495         (complete_explicit_location): ... this and adjust to work with a
8496         completion_tracker instead of a VEC.
8497         (location_completer): Adjust to work with a completion_tracker
8498         instead of a VEC.
8499         (add_struct_fields): Adjust to work with a completion_list instead
8500         of VEC.
8501         (expression_completer): Rename to ...
8502         (complete_expression): ... this and adjust to work with a
8503         completion_tracker instead of a VEC.  Use complete_files_symbols.
8504         (expression_completer): Reimplement on top of complete_expression.
8505         (symbol_completer): Adjust to work with a completion_tracker
8506         instead of a VEC.
8507         (enum complete_line_internal_reason): Add describing comments.
8508         (complete_line_internal_normal_command): Adjust to work with a
8509         completion_tracker instead of a VEC.
8510         (complete_line_internal): Rename to ...
8511         (complete_line_internal_1): ... this and adjust to work with a
8512         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8513         handle_brkchars phase.
8514         (new_completion_tracker): Delete.
8515         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8516         complete_line_internal_1.
8517         (free_completion_tracker): Delete.
8518         (INITIAL_COMPLETION_HTAB_SIZE): New.
8519         (completion_tracker::completion_tracker)
8520         (completion_tracker::~completion_tracker): New.
8521         (maybe_add_completion): Delete.
8522         (completion_tracker::maybe_add_completion)
8523         (completion_tracker::add_completion)
8524         (completion_tracker::add_completions): New.
8525         (throw_max_completions_reached_error): Delete.
8526         (complete_line): Adjust to work with a completion_tracker instead
8527         of a VEC.  Don't create a completion_tracker_t or check for max
8528         completions here.
8529         (command_completer, command_completer_handle_brkchars)
8530         (signal_completer, reg_or_group_completer_1)
8531         (reg_or_group_completer, default_completer_handle_brkchars):
8532         Adjust to work with a completion_tracker.
8533         (gdb_completion_word_break_characters_throw): New.
8534         (gdb_completion_word_break_characters): Reimplement.
8535         (line_completion_function): Delete.
8536         (completion_tracker::recompute_lowest_common_denominator)
8537         (expand_preserving_ws)
8538         (completion_tracker::build_completion_result)
8539         (completion_result::completion_result)
8540         (completion_result::completion_result)
8541         (completion_result::~completion_result)
8542         (completion_result::completion_result)
8543         (completion_result::release_match_list, compare_cstrings)
8544         (completion_result::sort_match_list)
8545         (completion_result::reset_match_list)
8546         (gdb_rl_attempted_completion_function_throw)
8547         (gdb_rl_attempted_completion_function): New.
8548         * completer.h (completion_list, struct completion_result)
8549         (class completion_tracker): New.
8550         (complete_line): Add completion_tracker parameter.
8551         (readline_line_completion_function): Delete.
8552         (gdb_rl_attempted_completion_function): New.
8553         (noop_completer, filename_completer, expression_completer)
8554         (location_completer, symbol_completer, command_completer)
8555         (signal_completer, reg_or_group_completer): Update prototypes.
8556         (completion_tracker_t, new_completion_tracker)
8557         (make_cleanup_free_completion_tracker): Delete.
8558         (enum maybe_add_completion_enum): Delete.
8559         (maybe_add_completion): Delete.
8560         (throw_max_completions_reached_error): Delete.
8561         * corefile.c (complete_set_gnutarget): Adjust to work with a
8562         completion_tracker instead of a VEC.
8563         * cp-abi.c (cp_abi_completer): Adjust to work with a
8564         completion_tracker instead of a VEC.
8565         * d-lang.c (d_language_defn): Adjust.
8566         * disasm.c (disassembler_options_completer): Adjust to work with a
8567         completion_tracker instead of a VEC.
8568         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8569         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8570         with a completion_tracker instead of a VEC.
8571         (f_language_defn): Adjust.
8572         * go-lang.c (go_language_defn): Adjust.
8573         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8574         Adjust to work with a completion_tracker instead of a VEC.
8575         * infrun.c (handle_completer): Likewise.
8576         * interps.c (interpreter_completer): Likewise.
8577         * interps.h (interpreter_completer): Likewise.
8578         * language.c (unknown_language_defn, auto_language_defn)
8579         (local_language_defn): Adjust.
8580         * language.h (language_defn::la_make_symbol_completion_list):
8581         Rename to ...
8582         (language_defn::la_collect_symbol_completion_matches): ... this
8583         and adjust to work with a completion_tracker instead of a VEC.
8584         * m2-lang.c (m2_language_defn): Adjust.
8585         * objc-lang.c (objc_language_defn): Adjust.
8586         * opencl-lang.c (opencl_language_defn): Adjust.
8587         * p-lang.c (pascal_language_defn): Adjust.
8588         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8589         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8590         with a completion_tracker.
8591         * rust-lang.c (rust_language_defn): Adjust.
8592         * symtab.c (free_completion_list, do_free_completion_list)
8593         (return_val, completion_tracker): Delete.
8594         (completion_list_add_name, completion_list_add_symbol)
8595         (completion_list_add_msymbol, completion_list_objc_symbol)
8596         (completion_list_add_fields, add_symtab_completions): Add
8597         completion_tracker parameter and use it.
8598         (default_make_symbol_completion_list_break_on_1): Rename to...
8599         (default_collect_symbol_completion_matches_break_on): ... this.
8600         Add completion_tracker parameter and use it instead of allocating
8601         a completion tracker here.
8602         (default_make_symbol_completion_list_break_on): Delete old
8603         implementation.
8604         (default_make_symbol_completion_list): Delete.
8605         (default_collect_symbol_completion_matches): New.
8606         (make_symbol_completion_list): Delete.
8607         (collect_symbol_completion_matches): New.
8608         (make_symbol_completion_type): Rename to ...
8609         (collect_symbol_completion_matches_type): ... this.  Add
8610         completion_tracker parameter and use it instead of VEC.
8611         (make_file_symbol_completion_list_1): Rename to...
8612         (collect_file_symbol_completion_matches): ... this.  Add
8613         completion_tracker parameter and use it instead of VEC.
8614         (make_file_symbol_completion_list): Delete.
8615         (add_filename_to_list): Use completion_list instead of a VEC.
8616         (add_partial_filename_data::list): Now a completion_list.
8617         (make_source_files_completion_list): Work with a completion_list
8618         instead of a VEC.
8619         * symtab.h: Include "completer.h".
8620         (default_make_symbol_completion_list_break_on)
8621         (default_make_symbol_completion_list, make_symbol_completion_list)
8622         (make_symbol_completion_type, make_file_symbol_completion_list)
8623         (make_source_files_completion_list): Delete.
8624         (default_collect_symbol_completion_matches_break_on)
8625         (default_collect_symbol_completion_matches)
8626         (collect_symbol_completion_matches)
8627         (collect_symbol_completion_matches_type)
8628         (collect_file_symbol_completion_matches)
8629         (make_source_files_completion_list): New.
8630         * top.c (init_main): Don't install a rl_completion_entry_function
8631         hook.  Install a rl_attempted_completion_function hook instead.
8632         * tui/tui-layout.c (layout_completer): Adjust to work with a
8633         completion_tracker.
8634         * tui/tui-regs.c (tui_reggroup_completer):
8635         * tui/tui-win.c (window_name_completer, focus_completer)
8636         (winheight_completer): Adjust to work with a completion_tracker.
8637         * value.c: Include "completer.h".
8638         (complete_internalvar): Adjust to work with a completion_tracker.
8639         * value.h (complete_internalvar): Likewise.
8640
8641 2017-07-17  Pedro Alves  <palves@redhat.com>
8642
8643         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8644         renames.
8645         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8646         comments to completer_ftype's declaration.
8647         <completer_handle_brkchars>: Change type to
8648         completer_handle_brkchars_ftype.
8649         * command.h (completer_ftype): Add describing comment and give
8650         names to parameters.
8651         (completer_ftype_void): Rename to ...
8652         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8653         (set_cmd_completer_handle_brkchars): Adjust.
8654         * completer.c (filename_completer_handle_brkchars): New function.
8655         (complete_line_internal_normal_command): New function, factored
8656         out from ...
8657         (complete_line_internal): ... here.
8658         (command_completer_handle_brkchars)
8659         (default_completer_handle_brkchars)
8660         (completer_handle_brkchars_func_for_completer): New functions.
8661         * completer.h (set_gdb_completion_word_break_characters): Delete
8662         declaration.
8663         (completer_handle_brkchars_func_for_completer): New declaration.
8664         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8665         completer_handle_brkchars_func_for_completer.
8666
8667 2017-07-17  Pedro Alves  <palves@redhat.com>
8668
8669         * completer.c (symbol_completer): New function, based on
8670         make_symbol_completion_list_fn.
8671         * completer.h (symbol_completer): New declaration.
8672         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8673         * python/py-cmd.c (completers): Adjust.
8674         * symtab.c (make_symbol_completion_list_fn): Delete.
8675         * symtab.h (make_symbol_completion_list_fn): Delete.
8676         * cli/cli-decode.c (add_cmd): Adjust.
8677
8678 2017-07-17  Pedro Alves  <palves@redhat.com>
8679
8680         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8681         * dwarf2read.c: Include "filename-seen-cache.h".
8682         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8683         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8684         * filename-seen-cache.c: New file.
8685         * filename-seen-cache.h: New file.
8686         * symtab.c: Include "filename-seen-cache.h".
8687         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8688         (create_filename_seen_cache, clear_filename_seen_cache)
8689         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8690         to filename-seen-cache.h/filename-seen-cache.c.
8691         (output_source_filename, sources_info)
8692         (maybe_add_partial_symtab_filename)
8693         (make_source_files_completion_list): Adjust to use
8694         filename_seen_cache.
8695
8696 2017-07-17  Pedro Alves  <palves@redhat.com>
8697
8698         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8699         fields.
8700         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8701         dwarf2_debug_sections*)): New.
8702         (dwarf2_per_objfile::dwarf2_per_objfile(const
8703         dwarf2_per_objfile&)): Declare as deleted.
8704         (dwarf2_per_objfile::operator=): Declare as deleted.
8705         (dwarf2_per_objfile::dwarf2_per_objfile)
8706         (dwarf2_per_objfile::~dwarf2_per_objfile)
8707         (dwarf2_per_objfile::free_cached_comp_units): New.
8708         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8709         ctor.  Call dwarf2_per_objfile's ctor manually.
8710         (dwarf2_locate_sections): Deleted/refactored as ...
8711         (dwarf2_per_objfile::locate_sections): ... this new method.
8712         (free_cached_comp_units): Defer to
8713         dwarf2_per_objfile::free_cached_comp_units.
8714         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8715
8716 2017-07-14  Tom Tromey  <tom@tromey.com>
8717
8718         PR rust/21764:
8719         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8720         parameter.
8721         <UNOP_SIZEOF>: Split into separate case.
8722         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8723
8724 2017-07-14  Tom Tromey  <tom@tromey.com>
8725
8726         PR rust/21763:
8727         * symtab.c (symbol_matches_domain): Add language_rust to special
8728         case.
8729         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8730         treat LOC_TYPEDEF symbols as variables.
8731
8732 2017-07-14  Pedro Alves  <palves@redhat.com>
8733
8734         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8735         symtabs matching all symtabs with SRCFILE as file name instead of
8736         only considering the first hit, with lookup_symtab.
8737
8738 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8739
8740         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8741         operator_name parameters.
8742         (gen_expr): Update function call.
8743
8744 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8745
8746         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8747         parameter.
8748         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8749         Likewise.
8750         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8751         parameter, use agent_expr::gdbarch instead, update function
8752         calls.
8753         (locexpr_tracepoint_var_ref): Likewise.
8754         (loclist_tracepoint_var_ref): Likewise.
8755         * ax-gdb.c (gen_trace_static_fields): Likewise.
8756         (gen_traced_pop): Likewise.
8757         (gen_frame_args_address): Likewise.
8758         (gen_frame_locals_address): Likewise.
8759         (gen_var_ref): Likewise.
8760         (gen_struct_ref_recursive): Likewise.
8761         (gen_static_field): Likewise.
8762         (gen_maybe_namespace_elt): Likewise.
8763         (gen_expr): Likewise.
8764         (gen_trace_for_var): Likewise.
8765         (gen_trace_for_expr): Likewise.
8766         (gen_trace_for_return_address): Likewise.
8767
8768 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8769
8770         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8771         parameter.
8772         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8773
8774 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8775
8776         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8777         from ax, update calls.
8778         (gen_usual_arithmetic): Likewise.
8779         (gen_integral_promotions): Likewise.
8780         (gen_bitfield_ref): Likewise.
8781         (gen_primitive_field): Likewise.
8782         (gen_struct_ref_recursive): Likewise.
8783         (gen_struct_ref): Likewise.
8784         (gen_maybe_namespace_elt): Likewise.
8785         (gen_struct_elt_for_reference): Likewise.
8786         (gen_namespace_elt): Likewise.
8787         (gen_aggregate_elt_ref): Likewise.
8788         (gen_expr): Get gdbarch from ax, update calls.
8789         (gen_expr_binop_rest): Likewise.
8790
8791 2017-07-13  Pedro Alves  <palves@redhat.com>
8792
8793         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8794         as default tdesc.
8795         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8796         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8797         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8798         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8799         tdep.
8800         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8801         Get final tdesc from the tdep.
8802         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8803         default tdesc.
8804         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8805         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8806         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8807         Use it as default tdesc.
8808         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8809         down to amd_init_abi.  No longer handle fallback tdesc here.
8810         * amd64-tdep.h (tdesc_x32): Declare.
8811         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8812         parameter.
8813         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8814         as default tdesc.
8815
8816 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8817
8818         * s390-linux-tdep.c (s390_process_record): Add support for
8819         instructions new in arch12.
8820
8821 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8822
8823         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8824         PT_GETFSBASE and PT_GETGSBASE.
8825         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8826         PT_SETGSBASE.
8827
8828 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8829
8830         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8831         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8832         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8833         those rules.
8834         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8835         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8836         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8837         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8838         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8839         * features/i386/amd64.xml: Add 64bit-segments.xml.
8840         * features/i386/amd64-avx-avx512.c: Regenerated.
8841         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8842         * features/i386/amd64-avx-mpx.c: Regenerated.
8843         * features/i386/amd64-avx.c: Regenerated.
8844         * features/i386/amd64-mpx.c: Regenerated.
8845         * features/i386/amd64.c: Regenerated.
8846         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8847         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8848         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8849         * regformats/i386/amd64-avx.dat: Regenerated.
8850         * regformats/i386/amd64-mpx.dat: Regenerated.
8851         * regformats/i386/amd64.dat: Regenerated.
8852
8853 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8854
8855         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8856         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8857
8858 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8859
8860         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8861         unsetenv.
8862         * gnulib/aclocal.m4: Regenerate.
8863         * gnulib/config.in: Regenerate.
8864         * gnulib/configure: Regenerate.
8865         * gnulib/import/Makefile.am: Regenerate.
8866         * gnulib/import/Makefile.in: Regenerate.
8867         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8868         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8869         * gnulib/import/m4/environ.m4: New file.
8870         * gnulib/import/m4/setenv.m4: New file.
8871         * gnulib/import/setenv.c: New file.
8872         * gnulib/import/unsetenv.c: New file.
8873
8874 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8875
8876         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8877         address when op is DW_OP_addr.
8878
8879 2017-07-09  Tom Tromey  <tom@tromey.com>
8880
8881         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8882         check and apply to outer type.
8883
8884 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8885
8886         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8887         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8888         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8889         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8890
8891 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8892
8893         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8894
8895 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8896
8897         * corelow.c (get_core_siginfo): Remove.
8898         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8899         instead of get_core_siginfo.
8900         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8901         * gdbarch.h: Re-generate.
8902         * gdbarch.c: Re-generate.
8903         * linux-tdep.c (linux_core_xfer_siginfo): New.
8904         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8905
8906 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8907
8908         * corelow.c (thread_section_name): Move to ...
8909         * gdbcore.h (thread_section_name): ... here.
8910
8911 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8912
8913         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8914         (struct siginfo32): New.
8915         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8916         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8917         via ptrace(PT_LWPINFO).
8918
8919 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8920
8921         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8922         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8923         (fbsd_get_siginfo_type): New.
8924         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8925         (_initialize_fbsd_tdep): New.
8926
8927 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8928
8929         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8930         a singular dwo_unit*) to support multiple CUs in the same way that
8931         multiple TUs are supported.
8932         (create_cus_hash_table): Replace create_dwo_cu with a function for
8933         parsing multiple CUs from a DWO file.
8934         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8935         create_dwo_cu.
8936         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8937         htab_find, rather than comparing the signature to a singleton CU in
8938         the dwo_file.
8939
8940 2017-07-06  Pedro Alves  <palves@redhat.com>
8941
8942         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8943
8944 2017-07-04  Pedro Alves  <palves@redhat.com>
8945
8946         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8947         * gdbtypes.h (TYPE_STATIC): Delete.
8948         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8949         is_synchronized, is_native>: Delete.
8950         <dummy>: Bump.
8951         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8952         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8953         (TYPE_FN_FIELD_ABSTRACT): Delete.
8954
8955 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8956
8957         * buffer.h (buffer_finish): Fix spelling mistakes.
8958
8959 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8960
8961         * .dir-locals.el: Automatically switch to C-style comments in
8962         versions of Emacs that support the feature.
8963
8964 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8965             Pedro Alves  <palves@redhat.com>
8966
8967         PR cli/21688
8968         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8969         (process_next_line): New variable 'inline_cmd'.
8970         Adjust 'if' clauses for "python", "compile" and "guile" to use
8971         'command_name_equals' and check for '!inline_cmd'.
8972
8973 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8974
8975         PR cli/21688
8976         * cli/cli-script.c (command_name_equals_not_inline): New function.
8977         (process_next_line): Adjust 'if' clauses for "python", "compile"
8978         and "guile" to use command_name_equals_not_inline.
8979
8980 2017-06-29  Pedro Alves  <palves@redhat.com>
8981
8982         * completer.c (expression_completer): Call
8983         linespec_location_completer instead of location_completer.
8984
8985 2017-06-29  Pedro Alves  <palves@redhat.com>
8986
8987         * completer.c (expression_completer): Remove code that recomputes
8988         'text' from 'word'.
8989
8990 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8991
8992         * regformats/regdat.sh: Generate code with
8993         "ifndef IN_PROCESS_AGENT".
8994
8995 2017-06-28  Pedro Alves  <palves@redhat.com>
8996
8997         * command.h: Include "common/scoped_restore.h".
8998
8999 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9000
9001         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9002         instead of obstack_grow.
9003
9004 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9005
9006         PR gdb/21337
9007         * symfile.c (reread_symbols): Call objfiles_changed just before
9008         read_symbols.
9009
9010 2017-06-27  Pedro Alves  <palves@redhat.com>
9011
9012         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9013         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9014         (completion_list_add_symbol, completion_list_add_msymbol):
9015         ... these new functions.
9016         (add_symtab_completions)
9017         (default_make_symbol_completion_list_break_on_1): Adjust.
9018
9019 2017-06-27  Pedro Alves  <palves@redhat.com>
9020
9021         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9022         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9023         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9024         dtor.
9025         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9026         'storage_obstack' field an auto_obstack.  In-class initialize all
9027         non-bitfield fields.  Make minsyms_read bool.
9028         * symfile.c (read_symbols): Adjust.
9029
9030 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9031
9032         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9033         (gdbsim_store_register): Likewise.
9034
9035 2017-06-27  Pedro Alves  <palves@redhat.com>
9036
9037         * c-exp.y (name_obstack): Now an auto_obstack.
9038         (yylex): Use auto_obstack::clear.
9039         (c_parse): Use auto_obstack::clear instead of reinitializing and
9040         freeing the obstack.
9041         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9042         * d-exp.y (name_obstack): Now an auto_obstack.
9043         (yylex): Use auto_obstack::clear.
9044         (d_parse): Use auto_obstack::clear instead of reinitializing and
9045         freeing the obstack.
9046         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9047         auto_obstack.
9048         * dwarf2read.c (create_addrmap_from_index)
9049         (dwarf2_build_psymtabs_hard)
9050         (update_enumeration_type_from_children): Likewise.
9051         * gdb_obstack.h (auto_obstack): New type.
9052         * go-exp.y (name_obstack): Now an auto_obstack.
9053         (build_packaged_name): Use auto_obstack::clear.
9054         (go_parse): Use auto_obstack::clear instead of reinitializing and
9055         freeing the obstack.
9056         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9057         auto_obstack.
9058         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9059         * rust-exp.y (work_obstack): Now an auto_obstack.
9060         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9061         reinitializing and freeing the obstack.
9062         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9063         (host_char_to_target): Use auto_obstack.
9064         * utils.h (make_cleanup_obstack_free): Delete declaration.
9065         * valprint.c (generic_emit_char, generic_printstr): Use
9066         auto_obstack.
9067
9068 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9069
9070         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9071         thread.
9072         (darwin_init_thread_list): Don't update dummy thread.
9073         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9074
9075 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * record-full.c (netorder16): Remove.
9078
9079 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9080
9081         * common/diagnostics.h: Define macros for GCC.
9082         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9083         * common/vec.h: Include diagnostics.h.
9084         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9085         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9086         warning.
9087
9088 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9089
9090         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9091         New macro.
9092         * ada-lex.l: Ignore deprecated register warnings.
9093
9094 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9095
9096         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9097         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9098
9099 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9100
9101         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9102         its own line.
9103
9104 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9105
9106         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9107
9108 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9109
9110         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9111         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9112         (xtensa_register_read_masked): Likewise.
9113
9114 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9115
9116         * common/environ.c (gdb_environ::unset): Update comment.
9117
9118 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9119
9120         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9121         registers.
9122
9123 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9124
9125         * record-full.c (record_full_exec_insn): Use byte_vector.
9126
9127 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9128
9129         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9130         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9131
9132 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9133
9134         * remote.c (cached_reg): Move from here...
9135         * regcache.h (cached_reg): ...to here.
9136         * python/py-unwind.c (struct reg_info): Remove.
9137         (cached_frame_info): Use cached_reg_t.
9138         (pyuw_prev_register): Likewise.
9139         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9140         (pyuw_dealloc_cache): Free all registers.
9141
9142 2017-06-22  Pedro Alves  <palves@redhat.com>
9143             Simon Marchi  <simon.marchi@ericsson.com>
9144
9145         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9146         warning.
9147         * common/diagnostics.h: New file.
9148
9149 2017-06-22  Pedro Alves  <palves@redhat.com>
9150
9151         * common/agent.h: Add include guards.
9152
9153 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9154
9155         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9156         talk about addressable units instead of bytes.
9157
9158 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9159
9160         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9161         of '::const_iterator'.
9162
9163 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9164
9165         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9166         'unittests/environ-selftests.c'.
9167         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9168         * charset.c (find_charset_names): Declare object 'iconv_env'.
9169         Update code to use 'iconv_env' object.  Remove call to
9170         'free_environ'.
9171         * common/environ.c: Include <utility>.
9172         (make_environ): Delete function.
9173         (free_environ): Delete function.
9174         (gdb_environ::clear): New function.
9175         (gdb_environ::operator=): New function.
9176         (gdb_environ::get): Likewise.
9177         (environ_vector): Delete function.
9178         (set_in_environ): Delete function.
9179         (gdb_environ::set): New function.
9180         (unset_in_environ): Delete function.
9181         (gdb_environ::unset): New function.
9182         (gdb_environ::envp): Likewise.
9183         * common/environ.h: Include <vector>.
9184         (struct gdb_environ): Delete; transform into...
9185         (class gdb_environ): ... this class.
9186         (free_environ): Delete prototype.
9187         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9188         environ_vector): Likewise.
9189         * infcmd.c (run_command_1): Update code to call
9190         'envp' from 'gdb_environ' class.
9191         (environment_info): Update code to call methods from 'gdb_environ'
9192         class.
9193         (unset_environment_command): Likewise.
9194         (path_info): Likewise.
9195         (path_command): Likewise.
9196         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9197         (inferior::inferior): Initialize 'environment' using the host's
9198         information.
9199         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9200         Include "environ.h".
9201         (class inferior) <environment>: Change type from 'struct
9202         gdb_environ' to 'gdb_environ'.
9203         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9204         methods from 'gdb_environ' class.
9205         * solib.c (solib_find_1): Likewise
9206         * unittests/environ-selftests.c: New file.
9207
9208 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9209
9210         * features/i386/i386-linux.xml: Exchange the order of including
9211         32bit-linux.xml and 32bit-sse.xml.
9212         * features/i386/i386-linux.c: Regenerated.
9213
9214 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9215
9216         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9217         Delete copy ctor and assignment operator.
9218         (tdesc_type): Likewise.
9219         (tdesc_feature): Likewise.
9220         (tdesc_free_reg): Remove.
9221         (tdesc_create_reg): Use new.
9222         (tdesc_free_type): Remove.
9223         (tdesc_create_vector): Use new.
9224         (tdesc_create_union): Likewise.
9225         (tdesc_create_flags): Likewise.
9226         (tdesc_create_enum): Likewise.
9227         (tdesc_free_feature): Delete.
9228         (free_target_description): Use delete.
9229
9230 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9231
9232         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9233         registers.
9234
9235 2017-06-19  Pedro Alves  <palves@redhat.com>
9236
9237         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9238         after gdb::unlinker.
9239
9240 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9241
9242         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9243         gdb_environ to access an environment variable.
9244
9245 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9246
9247         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9248         gdb_byte*.
9249
9250 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9251
9252         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9253
9254 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9255
9256         * configure: Re-generate.
9257         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9258
9259 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9260
9261         * configure: Re-generate.
9262         * warning.m4: Pass -Werror to compiler when checking for
9263         supported warning flags.
9264
9265 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9266
9267         * Makefile.in (COMPILE.pre): Add "-x c++".
9268
9269 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9270             Pedro Alves  <palves@redhat.com>
9271             Yao Qi  <yao.qi@linaro.org>
9272
9273         * defs.h (RequireLongest): New.
9274         (extract_integer): Declare function template.
9275         (extract_signed_integer): Remove the declaration, but define it
9276         static inline.
9277         (extract_unsigned_integer): Likewise.
9278         (store_integer): Declare function template.
9279         (store_signed_integer): Remove the declaration, but define it
9280         static inline.
9281         (store_unsigned_integer): Likewise.
9282         * findvar.c (extract_integer): New function template.
9283         (extract_signed_integer): Remove.
9284         (extract_unsigned_integer): Remove.
9285         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9286         instantiations.
9287         (store_integer): New function template.
9288         (store_signed_integer): Remove.
9289         (store_unsigned_integer): Remove.
9290         (store_integer): Explicit instantiations.
9291         * regcache.c (regcache_raw_read_signed): Update.
9292         (regcache::raw_read): New function.
9293         (regcache::raw_read_signed): Remove.
9294         (regcache::raw_read_unsigned): Remove.
9295         (regcache_raw_read_unsigned): Update.
9296         (regcache_raw_write_unsigned): Update.
9297         (regcache::raw_write_signed): Remove.
9298         (regcache::raw_write): New function.
9299         (regcache_cooked_read_signed): Update.
9300         (regcache::raw_write_unsigned): Remove.
9301         (regcache::cooked_read_signed): Remove.
9302         (regcache_cooked_read_unsigned): Update.
9303         (regcache::cooked_read_unsigned): Remove.
9304         (regcache_cooked_write_signed): Update.
9305         (regcache_cooked_write_unsigned): Update.
9306         * regcache.h (regcache) <raw_read_signed>: Remove.
9307         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9308         <raw_read, raw_write>: New.
9309         <cooked_read_signed, cooked_write_signed>: Remove.
9310         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9311         <cooked_read, cooked_write>: New.
9312         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9313         (sh64_pseudo_register_write): Update.
9314
9315 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9316
9317         * arc-tdep.c (arc_disassembler_options): New variable.
9318         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9319         of default_print_insn.
9320         (arc_delayed_print_insn): Set info->section when needed,
9321         use default_print_insn to retrieve a disassembler.
9322
9323 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9324
9325         PR gdb/21574
9326         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9327         to mention $SHELL and startup-with-shell.
9328
9329 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9330
9331         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9332
9333 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9334
9335         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9336         default_print_insn instead of print_insn_aarch64.
9337         * arm-tdep.c (gdb_print_insn_arm): Call
9338         default_print_insn instead of print_insn_big_arm
9339         and print_insn_little_arm.
9340         * i386-tdep.c (i386_print_insn): Call default_print_insn
9341         instead of print_insn_i386.
9342         * ia64-tdep.c (ia64_print_insn): Call
9343         default_print_insn instead of print_insn_ia64.
9344         * mips-tdep.c (gdb_print_insn_mips): Call
9345         default_print_insn instead of print_insn_big_mips
9346         and print_insn_little_mips.
9347         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9348         instead of print_insn_spu.
9349
9350 2017-06-14  Pedro Alves  <palves@redhat.com>
9351
9352         * ada-lang.c: Include "common/byte-vector.h".
9353         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9354         * charset.c (wchar_iterator::iterate): Resize the vector instead
9355         of reserving it.
9356         * common/byte-vector.h: Include "common/def-vector.h".
9357         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9358         * cli/cli-dump.c: Include "common/byte-vector.h".
9359         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9360         * common/byte-vector.h: New file.
9361         * common/def-vector.h: New file.
9362         * common/default-init-alloc.h: New file.
9363         * dwarf2loc.c: Include "common/byte-vector.h".
9364         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9365         instead of reserving it.
9366         * dwarf2read.c: Include "common/byte-vector.h".
9367         (data_buf::m_vec): Now a gdb::byte_vector.
9368         * gdb_regex.c: Include "common/def-vector.h".
9369         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9370         * mi/mi-main.c: Include "common/byte-vector.h".
9371         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9372         * printcmd.c: Include "common/byte-vector.h".
9373         (print_scalar_formatted): Use gdb::byte_vector.
9374         * valprint.c: Include "common/byte-vector.h".
9375         (maybe_negate_by_bytes, print_decimal_chars): Use
9376         gdb::byte_vector.
9377
9378 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9379
9380         * darwin-nat.c: Include "nat/fork-inferior.h".
9381
9382 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9383
9384         * configure.nat: Factor out Darwin bits that are not
9385         architecture-specific.  Add fork-inferior.o.
9386
9387 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9388
9389         * configure.nat: Factor out AIX bits that are not
9390         architecture-specific.  Add fork-inferior.o.
9391
9392 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9393
9394         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9395         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9396         wrappers that just call rw_pieced_value.
9397
9398 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9399
9400         * dwarf2loc.c (write_pieced_value): When writing the data for a
9401         memory piece, use write_memory_with_notification instead of
9402         write_memory.
9403
9404 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9405
9406         * valops.c (read_value_memory): Change embedded_offset to
9407         represent a bit offset instead of a byte offset.
9408         * value.h (read_value_memory): Adjust comment.
9409
9410 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9411
9412         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9413         dest_offset_bits and source_offset_bits.
9414         (write_pieced_value): Likewise.
9415
9416 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9417
9418         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9419         given by DW_OP_bit_piece.
9420         (write_pieced_value): Likewise.
9421
9422 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9423
9424         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9425         some other preparations to the places where sufficient information
9426         is available.
9427         (write_pieced_value): Likewise.
9428
9429 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9430
9431         * dwarf2loc.c (bits_to_bytes): New function.
9432         (read_pieced_value): Fix offset calculations for register pieces
9433         on big-endian targets.
9434         (write_pieced_value): Likewise.
9435
9436 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9437
9438         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9439         (write_pieced_value): Likewise.
9440
9441 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9442
9443         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9444         transfer the source value's least significant bits, instead of its
9445         lowest-addressed ones.  Rename type_len to max_offset.
9446         (read_pieced_value): Mirror above changes to write_pieced_value as
9447         applicable.
9448
9449 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9450
9451         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9452         truncate full bytes from dest_offset_bits before using it as an
9453         offset into the buffer.
9454
9455 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9456
9457         * dwarf2loc.c (write_pieced_value): Include transfer size in
9458         byte-wise check.
9459
9460 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9461
9462         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9463         calculation of this_size.
9464
9465 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9466
9467         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9468         when targeting a bit-field.
9469         (write_pieced_value): Likewise.
9470
9471 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9472
9473         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9474         (allocate_piece_closure): Drop addr_size parameter.
9475         (dwarf2_evaluate_loc_desc_full): Adjust call to
9476         allocate_piece_closure.
9477
9478 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9479
9480         PR gdb/21226
9481         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9482         the LSB end, independent of endianness.
9483
9484 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9485
9486         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9487         size capping.
9488
9489 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9490
9491         * mips-linux-nat.c: Move include features/mips*-linux.c to
9492         mips-linux-tdep.c.
9493         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9494         to mips-linux-tdep.c.
9495         * mips-linux-tdep.c: Include features/mips*-linux.c
9496         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9497         functions.
9498         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9499         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9500         (tdesc_mips64_dsp_linux): Declare.
9501
9502 2017-06-12  Tom Tromey  <tom@tromey.com>
9503
9504         * valprint.h (val_print_type_code_int): Remove.
9505         * valprint.c (generic_val_print_int): Always call
9506         val_print_scalar_formatted.
9507         (val_print_type_code_int): Remove.
9508         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9509         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9510         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9511         * ada-valprint.c (ada_val_print_num): Use
9512         val_print_scalar_formatted.
9513
9514 2017-06-12  Tom Tromey  <tom@tromey.com>
9515
9516         * printcmd.c (print_scalar_formatted): Unify the two switches.
9517         Don't convert scalars to LONGEST.
9518
9519 2017-06-12  Tom Tromey  <tom@tromey.com>
9520
9521         PR exp/16225:
9522         * valprint.h (print_decimal_chars): Update.
9523         * valprint.c (maybe_negate_by_bytes): New function.
9524         (print_decimal_chars): Add "is_signed" argument.
9525         * printcmd.c (print_scalar_formatted): Update.
9526
9527 2017-06-12  Tom Tromey  <tom@tromey.com>
9528
9529         PR exp/16225:
9530         * valprint.h (print_binary_chars, print_hex_chars): Update.
9531         * valprint.c (val_print_type_code_int): Update.
9532         (print_binary_chars): Add "zero_pad" argument.
9533         (emit_octal_digit): New function.
9534         (print_octal_chars): Don't zero-pad.
9535         (print_decimal_chars): Likewise.
9536         (print_hex_chars): Add "zero_pad" argument.
9537         * sh64-tdep.c (sh64_do_fp_register): Update.
9538         * regcache.c (regcache::dump): Update.
9539         * printcmd.c (print_scalar_formatted): Update.
9540         * infcmd.c (default_print_one_register_info): Update.
9541
9542 2017-06-12  Pedro Alves  <palves@redhat.com>
9543             Alan Hayward  <alan.hayward@arm.com>
9544
9545         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9546         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9547         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9548         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9549         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9550
9551 2017-06-12  Pedro Alves  <palves@redhat.com>
9552
9553         * dwarf2read.c (mapped_symtab::data): Now a vector of
9554         symtab_index_entry instead of vector of
9555         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9556         whether an element's name is NULL instead of checking whether the
9557         element itself is NULL.
9558         (find_slot): Change return type.  Adjust.
9559         (hash_expand, , add_index_entry, uniquify_cu_indices)
9560         (write_hash_table): Adjust.
9561
9562 2017-06-12  Pedro Alves  <palves@redhat.com>
9563
9564         * dwarf2read.c (recursively_count_psymbols): New function.
9565         (write_psymtabs_to_index): Call it to compute number of psyms and
9566         pass estimate size of psyms_seen to unordered_set's ctor.
9567
9568 2017-06-12  Pedro Alves  <palves@redhat.com>
9569
9570         * dwarf2read.c (write_hash_table): Check if key already exists
9571         before emplacing.
9572
9573 2017-06-12  Pedro Alves  <palves@redhat.com>
9574
9575         * dwarf2read.c (data_buf::append_space): Rename to...
9576         (data_buf::grow): ... this, and make private.  Adjust all callers.
9577         (data_buf::append_uint): New method.
9578         (add_address_entry, write_one_signatured_type)
9579         (write_psymtabs_to_index): Use it.
9580
9581 2017-06-12  Pedro Alves  <palves@redhat.com>
9582
9583         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9584         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9585         (data_buf::file_write): Call ::fwrite directly.
9586
9587 2017-06-12  Pedro Alves  <palves@redhat.com>
9588
9589         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9590         std::vector::erase.
9591
9592 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9593
9594         Code cleanup: C++ify .gdb_index producer.
9595         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9596         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9597         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9598         (create_strtab, add_string): Remove.
9599         (file_write, data_buf): New.
9600         (struct symtab_index_entry): Use std::vector for cu_indices.
9601         (struct mapped_symtab): Use std::vector for data.
9602         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9603         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9604         Remove.
9605         (find_slot): Change return type.  Update it to the new data structures.
9606         (hash_expand, add_index_entry): Update it to the new data structures.
9607         (offset_type_compare): Remove.
9608         (uniquify_cu_indices): Update it to the new data structures.
9609         (c_str_view, c_str_view_hasher, vector_hasher): New.
9610         (add_indices_to_cpool): Remove.
9611         (write_hash_table): Update it to the new data structures.
9612         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9613         (eq_psymtab_cu_index): Remove.
9614         (psym_index_map): New typedef.
9615         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9616         reference and std::unordered_map for cu_index_htab.
9617         (add_address_entry, add_address_entry_worker, write_address_map)
9618         (write_psymbols): Update it to the new data structures.
9619         (write_obstack): Remove.
9620         (struct signatured_type_index_data): Change types_list to a data_buf
9621         reference and psyms_seen to a std::unordered_set reference.
9622         (write_one_signatured_type, recursively_write_psymbols)
9623         (write_psymtabs_to_index): Update it to the new data structures.
9624
9625 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9626
9627         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9628         separate-debug-file commands.
9629         * symfile.h (separate_debug_file_debug): New global.
9630         * symfile.c (separate_debug_file_debug): New global.
9631         (separate_debug_file_exists, find_separate_debug_file): Add
9632         debug output.
9633         (_initialize_symfile): Add "set debug separate-debug-file"
9634         command.
9635         * build-id.c (build_id_to_debug_bfd,
9636         find_separate_debug_file_by_buildid): Add debug output.
9637
9638 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9639
9640         * gdbarch.sh (displaced_step_free_closure): Remove.
9641         * gdbarch.h, gdbarch.c: Re-generate.
9642         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9643         displaced_step_free_closure.
9644         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9645         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9646         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9647         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9648         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9649         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9650         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9651         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9652         * infrun.c (displaced_step_clear): Call xfree instead of
9653         gdbarch_displaced_step_free_closure.
9654
9655 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9656
9657         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9658         NULL".
9659
9660 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9661
9662         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9663         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9664         (mn10300_push_dummy_call): Likewise.
9665
9666 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9667
9668         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9669
9670 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9671
9672         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9673
9674 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9675
9676         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9677         able to start inferiors using a shell.
9678         (New remote packets): Announce new packet "QStartupWithShell".
9679         * remote.c: Add PACKET_QStartupWithShell.
9680         (extended_remote_create_inferior): Handle new
9681         PACKET_QStartupWithShell.
9682         (remote_protocol_features) <QStartupWithShell>: New entry for
9683         PACKET_QStartupWithShell.
9684         (_initialize_remote): Call "add_packet_config_cmd" for
9685         QStartupShell.
9686
9687 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9688             Pedro Alves  <palves@redhat.com>
9689
9690         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9691         and "nat/fork-inferior.h".
9692         * common/common-inferior.h: New file, with contents from
9693         "gdb/inferior.h".
9694         * commom/common-utils.c: Include "common-utils.h".
9695         (stringify_argv): New function.
9696         * common/common-utils.h (stringify_argv): New prototype.
9697         * configure.nat: Add "fork-inferior.o" as a dependency for
9698         "*linux*", "fbsd*" and "nbsd*" hosts.
9699         * corefile.c (get_exec_file): Update comment.
9700         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9701         instead of "startup_inferior".
9702         (darwin_create_inferior): Call "add_thread_silent" after
9703         "fork_inferior".
9704         * fork-child.c: Cleanup unnecessary includes.
9705         (SHELL_FILE): Move to "common/common-fork-child.c".
9706         (environ): Likewise.
9707         (exec_wrapper): Initialize.
9708         (get_exec_wrapper): New function.
9709         (breakup_args): Move to "common/common-fork-child.c"; rename to
9710         "breakup_args_for_exec".
9711         (escape_bang_in_quoted_argument): Move to
9712         "common/common-fork-child.c".
9713         (saved_ui): New variable.
9714         (prefork_hook): New function.
9715         (postfork_hook): Likewise.
9716         (postfork_child_hook): Likewise.
9717         (gdb_startup_inferior): Likewise.
9718         (fork_inferior): Move to "common/common-fork-child.c".  Update
9719         function to support gdbserver.
9720         (startup_inferior): Likewise.
9721         * gdbcore.h (get_exec_file): Remove declaration.
9722         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9723         instead of "startup_inferior".  Call "add_thread_silent" after
9724         "fork_inferior".
9725         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9726         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9727         instead of "startup_inferior".  Call "add_thread_silent" after
9728         "fork_inferior".
9729         * inferior.h: Include "common-inferior.h".
9730         (trace_start_error): Move to "common/common-utils.h".
9731         (trace_start_error_with_name): Likewise.
9732         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9733         (startup_inferior): Likewise.
9734         (gdb_startup_inferior): New prototype.
9735         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9736         * nat/fork-inferior.h: New file.
9737         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9738         instead of "startup_inferior".  Call "add_thread_silent" after
9739         "fork_inferior".
9740         * target.h (target_terminal_init): Move prototype to
9741         "target/target.h".
9742         (target_terminal_inferior): Likewise.
9743         (target_terminal_ours): Likewise.
9744         * target/target.h (target_terminal_init): New prototype, moved
9745         from "target.h".
9746         (target_terminal_inferior): Likewise.
9747         (target_terminal_ours): Likewise.
9748         * utils.c (gdb_flush_out_err): New function.
9749
9750 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9751
9752         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9753         * common/common-gdbthread.h: New file, with parts from
9754         "gdb/gdbthread.h".
9755         * gdbthread.h: Include "common-gdbthread.h".
9756         (switch_to_thread): Moved to "common/common-gdbthread.h".
9757
9758 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9759
9760         * Makefile.in (SFILES): Add "common/job-control.c".
9761         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9762         (COMMON_OBS): Add "job-control.o".
9763         * common/job-control.c: New file, with contents from
9764         "gdb/inflow.c".
9765         * common/job-control.h: New file, with contents from "terminal.h".
9766         * fork-child.c: Include "job-control.h".
9767         * inflow.c: Include "job-control.h".
9768         (gdb_setpgid): Move to "common/common-inflow.c".
9769         (_initialize_inflow): Move setting of "job_control" to
9770         "handle_job_control".
9771         * terminal.h (job_control): Moved to "common/common-terminal.h".
9772         (gdb_setpgid): Likewise.
9773         * top.c: Include "job_control.h".
9774         * utils.c: Likewise.
9775         (job_control): Moved to "job-control.c".
9776
9777 2017-06-07  Pedro Alves  <palves@redhat.com>
9778
9779         * Makefile.in (SFILES): Add gdb_regex.c.
9780         (COMMON_OBS): Add gdb_regex.o.
9781         * ada-lang.c (ada_add_standard_exceptions)
9782         (ada_add_exceptions_from_frame, name_matches_regex)
9783         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9784         parameter type to compiled_regex.  Adjust.
9785         (ada_exceptions_list): Use compiled_regex.
9786         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9787         std::unique_ptr<compiled_regex>.
9788         (exception_catchpoint::~exception_catchpoint): Remove regfree
9789         call.
9790         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9791         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9792         * breakpoint.c (solib_catchpoint::compiled): Now a
9793         std::unique_ptr<compiled_regex>.
9794         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9795         (check_status_catch_solib): Adjust to use compiled_regex.
9796         (add_solib_catchpoint): Adjust to use compiled_regex.
9797         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9798         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9799         compiled_regex reference.  Adjust to use it.
9800         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9801         declaration.  Include "gdb_regex.h".
9802         (apropos_cmd): Change regex parameter to compiled_regex reference.
9803         * gdb_regex.c: New file.
9804         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9805         declarations.
9806         (class compiled_regex): New.
9807         * linux-tdep.c: Include "common/gdb_optional.h".
9808         (struct mapping_regexes): New, factored out from
9809         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9810         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9811         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9812         * probe.c: Include "common/gdb_optional.h".
9813         (collect_probes): Use compiled_regex and gdb::optional and remove
9814         cleanups.
9815         * skip.c: Include "common/gdb_optional.h".
9816         (skiplist_entry::compiled_function_regexp): Now a
9817         gdb::optional<compiled_regex>.
9818         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9819         (free_skiplist_entry): Remove regfree call.
9820         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9821         compiled_regex and gdb::optional.
9822         * symtab.c: Include "common/gdb_optional.h".
9823         (search_symbols): Use compiled_regex and gdb::optional.
9824         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9825         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9826         to gdb_regex.c.
9827
9828 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9829
9830         * regcache.c (regcache::save): Avoid buffer use.
9831         (regcache::dump): Likewise.
9832
9833 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9834
9835         * sh-tdep.c (sh_pseudo_register_read): Remove
9836         MAX_REGISTER_SIZE.
9837         (sh_pseudo_register_write): Likewise.
9838         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9839         (sh64_pseudo_register_write): Likewise
9840
9841 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9842
9843         * aarch64-tdep.c (aarch64_store_return_value): Use
9844         V_REGISTER_SIZE.
9845         (aarch64_pseudo_read_value): Likewise.
9846         (aarch64_pseudo_write): Likewise.
9847
9848 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9849
9850         * regformats/regdef.h (set_register_cache): Remove the
9851         declaration.
9852
9853 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9854
9855         * frame.c (frame_unwind_register_signed): Use
9856         frame_unwind_register_value.
9857
9858 2017-06-06  Pedro Alves  <palves@redhat.com>
9859
9860         PR breakpoints/21553
9861         * breakpoint.c (create_breakpoints_sal_default)
9862         (init_breakpoint_sal, create_breakpoint_sal): Use
9863         gdb::unique_xmalloc_ptr for string parameters.
9864         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9865         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9866         (base_breakpoint_create_breakpoints_sal)
9867         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9868         (strace_marker_create_breakpoints_sal)
9869         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9870         string parameters.
9871         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9872         gdb::unique_xmalloc_ptr for string parameters.
9873         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9874         parameters.
9875
9876 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9877
9878         * alpha-tdep.c (alpha_register_to_value): Use
9879         get_frame_register_value.
9880         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9881
9882 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9883
9884         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9885         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9886         (ia64_value_to_register): Likewise.
9887         (ia64_extract_return_value): Likewise.
9888         (ia64_store_return_value): Likewise.
9889         (ia64_push_dummy_call): Likewise.
9890
9891 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9892
9893         GDB 8.0 released.
9894
9895 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9896
9897         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9898
9899 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9900
9901         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9902         parameter.
9903         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9904
9905 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9906
9907         * event-loop.c (poll_timers): Unallocate timer using delete
9908         instead of xfree.
9909
9910 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9911
9912         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9913         (struct breakpoint) <~breakpoint>: New.
9914         (struct watchpoint): Inherit from breakpoint.
9915         <~watchpoint>: New.
9916         <base>: Remove.
9917         (struct tracepoint): Inherit from breakpoint.
9918         <base>: Remove.
9919         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9920         (struct longjmp_breakpoint): Inherit from breakpoint.
9921         <~longjmp_breakpoint>: New.
9922         <base>: Remove.
9923         (new_breakpoint_from_type): Remove casts.
9924         (watchpoint_in_thread_scope): Remove reference to base field.
9925         (watchpoint_del_at_next_stop): Likewise.
9926         (update_watchpoint): Likewise.
9927         (watchpoint_check): Likewise.
9928         (bpstat_check_watchpoint): Likewise.
9929         (set_longjmp_breakpoint): Likewise.
9930         (struct fork_catchpoint): Inherit from breakpoint.
9931         <base>: Remove.
9932         (struct solib_catchpoint): Inherit from breakpoint.
9933         <~solib_catchpoint>: New.
9934         <base>: Remove.
9935         (dtor_catch_solib): Change to ...
9936         (solib_catchpoint::~solib_catchpoint): ... this.
9937         (breakpoint_hit_catch_solib): Remove reference to base field.
9938         (add_solib_catchpoint): Likewise.
9939         (create_fork_vfork_event_catchpoint): Likewise.
9940         (struct exec_catchpoint): Inherit from breakpoint.
9941         <~exec_catchpoint>: New.
9942         <base>: Remove.
9943         (dtor_catch_exec): Change to ...
9944         (exec_catchpoint::~exec_catchpoint): ... this.
9945         (dtor_watchpoint): Change to ...
9946         (watchpoint::~watchpoint): ... this.
9947         (watch_command_1): Remove reference to base field.
9948         (catch_exec_command_1): Likewise.
9949         (base_breakpoint_dtor): Change to ...
9950         (breakpoint::~breakpoint): ... this.
9951         (base_breakpoint_ops): Remove dtor field value.
9952         (longjmp_bkpt_dtor): Change to ...
9953         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9954         (strace_marker_create_breakpoints_sal): Remove reference to base
9955         field.
9956         (delete_breakpoint): Don't manually call breakpoint destructor.
9957         (create_tracepoint_from_upload): Remove reference to base field.
9958         (trace_pass_set_count): Likewise.
9959         (initialize_breakpoint_ops): Don't initialize
9960         momentary_breakpoint_ops, don't set dtors.
9961         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9962         <~ada_catchpoint>: New.
9963         <base>: Remove.
9964         (create_excep_cond_exprs): Remove reference to base field.
9965         (dtor_exception): Change to ...
9966         (ada_catchpoint::~ada_catchpoint): ... this.
9967         (dtor_catch_exception): Remove.
9968         (dtor_catch_exception_unhandled): Remove.
9969         (dtor_catch_assert): Remove.
9970         (create_ada_exception_catchpoint): Remove reference to base
9971         field.
9972         (initialize_ada_catchpoint_ops): Don't set dtors.
9973         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9974         breakpoint.
9975         <~signal_catchpoint>: New.
9976         <base>: Remove.
9977         (signal_catchpoint_dtor): Change to ...
9978         (signal_catchpoint::~signal_catchpoint): ... this.
9979         (create_signal_catchpoint): Remove reference to base field.
9980         (initialize_signal_catchpoint_ops): Don't set dtor.
9981         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9982         from breakpoint.
9983         <~syscall_catchpoint>: New.
9984         <base>: Remove.
9985         (dtor_catch_syscall): Change to ...
9986         (syscall_catchpoint::~syscall_catchpoint): ... this.
9987         (create_syscall_event_catchpoint): Remove reference to base
9988         field.
9989         (initialize_syscall_catchpoint_ops): Don't set dtor.
9990         * break-catch-throw.c (struct exception_catchpoint): Inherit
9991         from breakpoint.
9992         <~exception_catchpoint>: New.
9993         <base>: Remove.
9994         (dtor_exception_catchpoint): Change to ...
9995         (exception_catchpoint::~exception_catchpoint): ... this.
9996         (handle_gnu_v3_exceptions): Remove reference to base field.
9997         (initialize_throw_catchpoint_ops): Don't set dtor.
9998         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9999         field.
10000         * remote.c (remote_get_tracepoint_status): Likewise.
10001         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10002         * tracefile.c (tracefile_fetch_registers): Likewise.
10003         * tracepoint.c (actions_command): Likewise.
10004         (validate_actionline): Likewise.
10005         (tfind_1): Likewise.
10006         (get_traceframe_location): Likewise.
10007         (find_matching_tracepoint_location): Likewise.
10008         (parse_tracepoint_status): Likewise.
10009         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10010
10011 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10012
10013         * breakpoint.c (struct longjmp_breakpoint): New struct.
10014         (is_tracepoint_type): Change return type to bool.
10015         (is_longjmp_type): New function.
10016         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10017         (set_raw_breakpoint_without_location): Use
10018         new_breakpoint_from_type.
10019         (set_raw_breakpoint): Likewise.
10020
10021 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10022
10023         * breakpoint.c (new_breakpoint_from_type): New function.
10024         (create_breakpoint_sal): Use new_breakpoint_from_type and
10025         unique_ptr.
10026         (create_breakpoint): Likewise.
10027
10028 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10029
10030         * memattr.c (mem_info_command): Rename to ...
10031         (info_mem_command): ... this.
10032         (mem_enable_command): Rename to ...
10033         (enable_mem_command): ... this.
10034         (mem_disable_command): Rename to ...
10035         (disable_mem_command): ... this.
10036         (mem_delete_command): Rename to ...
10037         (delete_mem_command): ... this.
10038         (_initialize_mem): Adjust function names.
10039
10040 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10041
10042         * btrace.c (handle_pt_insn_events): New.
10043         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10044         STATUS.  Split into this and ...
10045         (handle_pt_insn_event_flags): ... this.
10046
10047 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10048
10049         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10050         and struct pt_insn.resynced.
10051         * configure: Regenerated.
10052         * config.in: Regenerated.
10053
10054 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10055
10056         * btrace.c (ftrace_find_call_by_number): New function.
10057         (ftrace_new_function): Store objects, not pointers.
10058         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10059         ftrace_new_gap, ftrace_update_function,
10060         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10061         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10062         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10063         btrace_ends_with_single_insn, btrace_call_get): Account for
10064         btrace_thread_info::functions now storing objects.
10065         * btrace.h (struct btrace_thread_info): Add constructor.
10066         (struct btrace_thread_info) <functions>: Make std::vector.
10067         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10068         Initialize with default values.
10069         * record-btrace.c (record_btrace_frame_sniffer): Account for
10070         btrace_thread_info::functions now storing objects.
10071
10072 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10073
10074         * btrace.c: Remove typedef bfun_s.
10075         (ftrace_new_gap): Directly add gaps to the list of gaps.
10076         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10077         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10078         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10079         instead of gdb VEC.
10080
10081 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10082
10083         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10084         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10085         with btrace_thread_info::next_segment and
10086         btrace_thread_info::prev_segment.
10087         * btrace.h: Remove struct btrace_func_link.
10088         (struct btrace_function): Replace pair of function segment pointers
10089         with pair of indices.
10090         * python/py-record-btrace.c (btpy_call_prev_sibling,
10091         btpy_call_next_sibling): Replace references to
10092         btrace_thread_info::segment with btrace_thread_info::next_segment and
10093         btrace_thread_info::prev_segment.
10094         * record-btrace.c (record_btrace_frame_this_id): Use
10095         btrace_find_call_by_number.
10096
10097 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10098
10099         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10100         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10101         btrace_insn_next, btrace_insn_prev): Remove references to
10102         btrace_thread_info::flow.
10103         * btrace.h (struct btrace_function): Remove FLOW.
10104
10105 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10106
10107         * btrace.c (ftrace_find_call_by_number): New function.
10108         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10109         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10110         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10111         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10112         index.
10113         * btrace.h (struct btrace_function): Turn UP into an index.
10114         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10115         as an index.
10116         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10117         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10118         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10119
10120 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10121
10122         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10123         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10124         ftrace_update_function, ftrace_compute_global_level_offset,
10125         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10126         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10127         btrace_insn_end, btrace_is_empty): Remove references to
10128         btrace_thread_info::begin and btrace_thread_info::end.
10129         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10130         (struct btrace_thread_info) <functions>: Adjust comment.
10131         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10132         btrace_thread_info::begin.
10133
10134 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10135
10136         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10137         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10138         ftrace_update_function): Remove arguments that implicitly were always
10139         BTINFO->END.
10140         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10141         Don't pass BTINFO->END.
10142
10143 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10144
10145         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10146         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10147         btrace_find_insn_by_number): Replace function segment pointer with
10148         index.
10149         (btrace_insn_cmp): Simplify.
10150         * btrace.h: (struct btrace_insn_iterator) Rename index to
10151         insn_index.  Replace function segment pointer with index into function
10152         segment vector.
10153         * record-btrace.c (record_btrace_call_history): Replace function
10154         segment pointer use with index.
10155         (record_btrace_frame_sniffer): Retrieve function call segment through
10156         vector.
10157         (record_btrace_set_replay): Remove defunc't safety check.
10158
10159 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10160
10161         * btrace.c (btrace_ends_with_single_insn): New function.
10162         (btrace_call_get, btrace_call_number, btrace_call_begin,
10163         btrace_call_end, btrace_call_next, btrace_call_prev,
10164         btrace_find_call_by_number): Use index into call segment vector
10165         instead of pointer.
10166         (btrace_call_cmp): Simplify.
10167         * btrace.h (struct btrace_call_iterator): Replace function call segment
10168         pointer with index into vector.
10169         * record-btrace.c (record_btrace_call_history): Use index instead of
10170         pointer.
10171
10172 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10173
10174         * btrace.c (btrace_insn_begin, btrace_insn_end,
10175         btrace_find_insn_by_number): Add btinfo to iterator.
10176         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10177
10178 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10179
10180         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10181         and save pointers directly.
10182         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10183         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10184         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10185         changed signature of functions.
10186         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10187         (btrace_fetch): Remove code that adds btrace_function pointers to
10188         vector of btrace_functions.
10189         (btrace_clear): Simplify freeing vector of btrace_functions.
10190
10191 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10192
10193         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10194         Replace VEC_* with std::vector functions.
10195         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10196         (struct btrace_thread_info)<functions>: Change type to std::vector.
10197
10198 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10199
10200         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10201         "Removed targets and native configurations" up.  Merge duplicate
10202         "New commands" sub-sections.  Add "New options" sub-sections.
10203
10204 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10205
10206         * defs.h (copy_integer_to_size): New declaration.
10207         * findvar.c (copy_integer_to_size): New function.
10208         (do_cint_test): New selftest function.
10209         (copy_integer_to_size_test): Likewise.
10210         (_initialize_findvar): Likewise.
10211         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10212         (mips_fbsd_collect_reg): Use raw_collect_integer.
10213         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10214         (mips64_fill_gregset): Use raw_collect_integer
10215         (mips64_fill_fpregset): Use raw_supply_integer.
10216         * regcache.c (regcache::raw_supply_integer): New function.
10217         (regcache::raw_collect_integer): Likewise.
10218         * regcache.h: (regcache::raw_supply_integer): New declaration.
10219         (regcache::raw_collect_integer): Likewise.
10220
10221 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10222
10223         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10224         (COMMON_OBS): Add gdbarch-selftests.o.
10225         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10226         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10227         * gdbarch-selftests.c: New file.
10228         * regcache.h (regcache) <~regcache>: Mark it virtual if
10229         GDB_SELF_TEST.
10230         <raw_write>: Likewise.
10231
10232 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10233
10234         * regcache.c (current_regcache): Change it to
10235         regcache::current_regcache.
10236         (regcache_observer_target_changed): Update.
10237         (regcache_thread_ptid_changed): Make it a regcache static
10238         method.
10239         (regcache_thread_ptid_changed): Update.
10240         (class regcache_access): New.
10241         (current_regcache_test): Update.
10242         (_initialize_regcache): Update.
10243         * regcache.h: Include forward_list.
10244         (regcache): Declare regcache_thread_ptid_changed and declare
10245         registers_changed_ptid as friend.
10246
10247 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10248
10249         * i387-tdep.c (i387_register_to_value): Use register_size
10250         instead of TYPE_LENGTH.
10251         * m68k-tdep.c (m68k_register_to_value): Likewise.
10252
10253 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10254
10255         * i387-tdep.c (i387_convert_register_p): Return false if type
10256         code isn't TYPE_CODE_FLT.
10257
10258 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10259
10260         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10261         length is 4.
10262         (alpha_register_to_value): Remove type length check.
10263         (alpha_value_to_register): Likewise.
10264
10265 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10266
10267         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10268         TYPE_CODE_FLT.
10269
10270 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10271
10272         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10273         TYPE_CODE_FLT or not.
10274
10275 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10276
10277         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10278         * avr-tdep.c (avr_gdbarch_init): Likewise.
10279         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10280         * cris-tdep.c (cris_gdbarch_init): Likewise.
10281         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10282         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10283         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10284         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10285         * mep-tdep.c (mep_gdbarch_init): Likewise.
10286         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10287         * mips-tdep.c (mips_gdbarch_init): Likewise.
10288         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10289         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10290         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10291         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10292         * v850-tdep.c (v850_gdbarch_init): Likewise.
10293
10294 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10295
10296         * selftest-arch.c (tests_with_arch): Call registers_changed
10297         and reinit_frame_cache.
10298         * selftest.c (run_self_tests): Likewise.
10299
10300 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10301
10302         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10303         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10304
10305 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10306
10307         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10308         set_gdbarch_print_insn.
10309
10310 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10311
10312         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10313         set_gdbarch_print_insn.
10314
10315 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10316
10317         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10318         set_gdbarch_print_insn.
10319         * arc-tdep.c (arc_gdbarch_init): Likewise.
10320         * arch-utils.c: include dis-asm.h.
10321         (default_print_insn): New function.
10322         * arch-utils.h (default_print_insn): Declare.
10323         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10324         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10325         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10326         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10327         * frv-tdep.c (frv_gdbarch_init): Likewise.
10328         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10329         * gdbarch.sh (print_insn): Use default_print_insn.
10330         * gdbarch.c: Regenerated.
10331         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10332         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10333         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10334         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10335         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10336         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10337         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10338         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10339         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10340         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10341         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10342         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10343         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10344         * mt-tdep.c (mt_gdbarch_init): Likewise.
10345         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10346         * nios2-tdep.c (nios2_print_insn): Remove.
10347         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10348         * rx-tdep.c (rx_gdbarch_init): Likewise.
10349         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10350         * score-tdep.c (score_print_insn): Remove.
10351         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10352         * sh-tdep.c (sh_gdbarch_init): Likewise.
10353         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10354         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10355         * tic6x-tdep.c (tic6x_print_insn): Remove.
10356         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10357         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10358         * v850-tdep.c (v850_gdbarch_init): Likewise.
10359         * vax-tdep.c (vax_gdbarch_init): Likewise.
10360         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10361         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10362
10363 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10364
10365         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10366         (MIPS_FP0_REGNUM): Remove.
10367         (MIPS_FSR_REGNUM): Remove.
10368         (mips_fbsd_supply_fpregs): Use mips_regnum.
10369         (mips_fbsd_supply_gregs): Likewise.
10370         (mips_fbsd_collect_fpregs): Likewise.
10371         (mips_fbsd_collect_gregs): Likewise.
10372
10373 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10374
10375         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10376         (getpfpregs_supplies): New function.
10377         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10378         getfpregs_supplies.
10379         (mips_fbsd_store_inferior_registers): Likewise.
10380
10381 2017-05-22  Pedro Alves <palves@redhat.com>
10382
10383         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10384         maintainer.
10385
10386 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10387
10388         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10389         (store_register): Likewise.
10390         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10391         (get_decimal_float_return_value): Likewise.
10392         (do_ppc_sysv_return_value): Likewise.
10393         (ppc64_sysv_abi_push_integer): Likewise.
10394         (ppc64_sysv_abi_push_freg): Likewise.
10395         (ppc64_sysv_abi_return_value_base): Likewise.
10396         (ppc64_sysv_abi_return_value): Likewise.
10397         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10398         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10399         * rs6000-nat.c: Likewise.
10400         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10401         (rs6000_value_to_register): Likewise.
10402         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10403
10404 2017-05-21  Tom Tromey  <tom@tromey.com>
10405
10406         PR rust/21466:
10407         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10408         arrays as "[T]", not "[T; ]".
10409
10410 2017-05-19  Tom Tromey  <tom@tromey.com>
10411
10412         PR rust/21484:
10413         * rust-lang.c (exp_descriptor_rust): New function.
10414         (rust_language_defn): Use it.
10415         * p-lang.c (pascal_language_defn): Update.
10416         * opencl-lang.c (opencl_language_defn): Update.
10417         * objc-lang.c (objc_language_defn): Update.
10418         * m2-lang.c (m2_language_defn): Update.
10419         * language.h (struct language_defn)
10420         <la_watch_location_expression>: New member.
10421         * language.c (unknown_language_defn, auto_language_defn)
10422         (local_language_defn): Update.
10423         * go-lang.c (go_language_defn): Update.
10424         * f-lang.c (f_language_defn): Update.
10425         * d-lang.c (d_language_defn): Update.
10426         * c-lang.h (c_watch_location_expression): Declare.
10427         * c-lang.c (c_watch_location_expression): New function.
10428         (c_language_defn, cplus_language_defn, asm_language_defn)
10429         (minimal_language_defn): Use it.
10430         * breakpoint.c (watch_command_1): Call
10431         la_watch_location_expression.
10432         * ada-lang.c (ada_language_defn): Update.
10433
10434 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10435
10436         PR tui/21482
10437         * gdb_curses.h (NOMACROS): Define.
10438         (NCURSES_NOMACROS): Define.
10439
10440 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10441
10442         PR tui/21482
10443         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10444         arg to char *.
10445         * tui/tui-wingeneral.c (box_win): Likewise.
10446         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10447         (tui_show_source_line): Likewise.
10448         (tui_show_exec_info_content): Likewise.
10449
10450 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10451
10452         * sparc-tdep.c (sparc_structure_return_p)
10453         (sparc_arg_on_registers_p): New functions.
10454         (sparc32_store_arguments): Use them.
10455         * sparc64-tdep.c (sparc64_16_byte_align_p)
10456         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10457         Handle TYPE_CODE_ARRAY.
10458
10459 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10460
10461         * cli/cli-decode.c (add_alias_cmd): New function.
10462         * command.h (add_alias_cmd): Declare.
10463         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10464         instead call add_alias_cmd.
10465
10466 2017-05-17  Pedro Alves  <palves@redhat.com>
10467
10468         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10469         (nat_makefile_frag): ... this.  All references updated.
10470         * configure.ac: Likewise.
10471         * configure.nat: Likewise.  Enhance comments.
10472         * configure: Regenerate.
10473
10474 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10475
10476         * procfs.c (procfs_create_inferior): Change prototype to match
10477         definition.
10478
10479 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10480
10481         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10482         C++ compiler warning.
10483
10484 2017-05-12  Tom Tromey  <tom@tromey.com>
10485
10486         PR rust/21483:
10487         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10488         recurse, just call value_struct_elt directly.
10489
10490 2017-05-12  Tom Tromey  <tom@tromey.com>
10491
10492         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10493         OP_RUST_ARRAY>: Fix.
10494
10495 2017-05-12  Tom Tromey  <tom@tromey.com>
10496
10497         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10498
10499 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10500
10501         * regcache.c: Include <forward_list>.
10502         (struct regcache_list): Remove.
10503         (current_regcache): Update.
10504         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10505         (regcache_thread_ptid_changed): Likewise.
10506         (registers_changed_ptid): Likewise.
10507         (current_regcache_size): Likewise.
10508
10509 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10510
10511         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10512         (current_regcache_size): New function.
10513         (current_regcache_test): New function.
10514         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10515
10516 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10517
10518         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10519         (print_gp_register_row): Use get_frame_register_value.
10520
10521 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10522
10523         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10524         (mips_supply_fpregset): Likewise.
10525         (mips64_supply_gregset): Likewise.
10526
10527 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10528
10529         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10530         regcache->raw_supply_zeroed.
10531
10532 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10533
10534         * configure.nat: Rearrange 'case' statements to match
10535         host before cpu.
10536
10537 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10538
10539         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10540         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10541         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10542         "@nat_extra_makefile_frag@".
10543         (Makefile): Remove dependency on "@frags@".
10544         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10545         (data-directory/Makefile): Likewise.
10546         * config/aarch64/linux.mh: Deleted; moved contents to
10547         "gdb/configure.nat".
10548         * config/alpha/alpha-linux.mh: Likewise.
10549         * config/alpha/nbsd.mh: Likewise.
10550         * config/arm/linux.mh: Likewise.
10551         * config/arm/nbsdelf.mh: Likewise.
10552         * config/i386/cygwin.mh: Likewise.
10553         * config/i386/cygwin64.mh: Likewise.
10554         * config/i386/darwin.mh: Likewise.
10555         * config/i386/fbsd.mh: Likewise.
10556         * config/i386/fbsd64.mh: Likewise.
10557         * config/i386/go32.mh: Likewise.
10558         * config/i386/i386gnu.mh: Likewise.
10559         * config/i386/i386sol2.mh: Likewise.
10560         * config/i386/linux.mh: Likewise.
10561         * config/i386/linux64.mh: Likewise.
10562         * config/i386/mingw.mh: Likewise.
10563         * config/i386/mingw64.mh: Likewise.
10564         * config/i386/nbsd64.mh: Likewise.
10565         * config/i386/nbsdelf.mh: Likewise.
10566         * config/i386/nto.mh: Likewise.
10567         * config/i386/obsd.mh: Likewise.
10568         * config/i386/obsd64.mh: Likewise.
10569         * config/i386/sol2-64.mh: Likewise.
10570         * config/ia64/linux.mh: Likewise.
10571         * config/m32r/linux.mh: Likewise.
10572         * config/m68k/linux.mh: Likewise.
10573         * config/m68k/nbsdelf.mh: Likewise.
10574         * config/m68k/obsd.mh: Likewise.
10575         * config/m88k/obsd.mh: Likewise.
10576         * config/mips/fbsd.mh: Likewise.
10577         * config/mips/linux.mh: Likewise.
10578         * config/mips/nbsd.mh: Likewise.
10579         * config/mips/obsd64.mh: Likewise.
10580         * config/pa/linux.mh: Likewise.
10581         * config/pa/nbsd.mh: Likewise.
10582         * config/pa/obsd.mh: Likewise.
10583         * config/powerpc/aix.mh: Likewise.
10584         * config/powerpc/fbsd.mh: Likewise.
10585         * config/powerpc/linux.mh: Likewise.
10586         * config/powerpc/nbsd.mh: Likewise.
10587         * config/powerpc/obsd.mh: Likewise.
10588         * config/powerpc/ppc64-linux.mh: Likewise.
10589         * config/powerpc/spu-linux.mh: Likewise.
10590         * config/s390/linux.mh: Likewise.
10591         * config/sh/nbsd.mh: Likewise.
10592         * config/sparc/fbsd.mh: Likewise.
10593         * config/sparc/linux.mh: Likewise.
10594         * config/sparc/linux64.mh: Likewise.
10595         * config/sparc/nbsd64.mh: Likewise.
10596         * config/sparc/nbsdelf.mh: Likewise.
10597         * config/sparc/obsd64.mh: Likewise.
10598         * config/sparc/sol2.mh: Likewise.
10599         * config/tilegx/linux.mh: Likewise.
10600         * config/vax/nbsdelf.mh: Likewise.
10601         * config/vax/obsd.mh: Likewise.
10602         * config/xtensa/linux.mh: Likewise.
10603         * config/i386/i386gnu.mn: New file, with excerpts from
10604         "config/i386/i386gnu.mh".
10605         * configure: Regenerate.
10606         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10607         *.mh files under "gdb/config".
10608         * configure.nat: New file, with contents from the
10609         "gdb/config/*/*.mh" files.
10610
10611 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10612
10613         * btrace.c (btrace_clear): Free insn vector.
10614
10615 2017-05-05  Pedro Alves  <palves@redhat.com>
10616
10617         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10618         * configure: Regenerate.
10619
10620 2017-05-04  Pedro Alves  <palves@redhat.com>
10621
10622         * Makefile.in (SFILES): Add progspace-and-thread.c.
10623         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10624         (COMMON_OBS): Add progspace-and-thread.o.
10625         * breakpoint.c: Include "progspace-and-thread.h".
10626         (update_inserted_breakpoint_locations)
10627         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10628         Use scoped_restore_current_pspace_and_thread.
10629         (create_std_terminate_master_breakpoint): Use
10630         scoped_restore_current_program_space.
10631         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10632         (print_breakpoint_location): Use
10633         scoped_restore_current_program_space.
10634         (bp_loc_is_permanent): Use
10635         scoped_restore_current_pspace_and_thread.
10636         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10637         (download_tracepoint_locations): Use
10638         scoped_restore_current_pspace_and_thread.
10639         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10640         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10641         (enum step_over_calls_kind): Moved from inferior.h.
10642         (class scoped_restore_current_thread): New class.
10643         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10644         declaration.
10645         (scoped_restore_current_thread): New class.
10646         * infcmd.c: Include "common/gdb_optional.h".
10647         (continue_1, proceed_after_attach): Use
10648         scoped_restore_current_thread.
10649         (notice_new_inferior): Use scoped_restore_current_thread.
10650         * inferior.c: Include "progspace-and-thread.h".
10651         (restore_inferior, save_current_inferior): Delete.
10652         (add_inferior_command, clone_inferior_command): Use
10653         scoped_restore_current_pspace_and_thread.
10654         * inferior.h (scoped_restore_current_inferior): New class.
10655         * infrun.c: Include "progspace-and-thread.h" and
10656         "common/gdb_optional.h".
10657         (follow_fork_inferior): Use
10658         scoped_restore_current_pspace_and_thread.
10659         (scoped_restore_exited_inferior): New class.
10660         (handle_vfork_child_exec_or_exit): Use
10661         scoped_restore_exited_inferior,
10662         scoped_restore_current_pspace_and_thread,
10663         scoped_restore_current_thread and scoped_restore.
10664         (fetch_inferior_event): Use scoped_restore_current_thread.
10665         * linespec.c (decode_line_full, decode_line_1): Use
10666         scoped_restore_current_program_space.
10667         * mi/mi-main.c: Include "progspace-and-thread.h".
10668         (exec_continue): Use scoped_restore_current_thread.
10669         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10670         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10671         * proc-service.c (ps_pglobal_lookup): Use
10672         scoped_restore_current_program_space.
10673         * progspace-and-thread.c: New file.
10674         * progspace-and-thread.h: New file.
10675         * progspace.c (release_program_space, clone_program_space): Use
10676         scoped_restore_current_program_space.
10677         (restore_program_space, save_current_program_space)
10678         (save_current_space_and_thread): Delete.
10679         (switch_to_program_space_and_thread): Moved to
10680         progspace-and-thread.c.
10681         * progspace.h (save_current_program_space)
10682         (save_current_space_and_thread): Delete declarations.
10683         (scoped_restore_current_program_space): New class.
10684         * remote.c (remote_btrace_maybe_reopen): Use
10685         scoped_restore_current_thread.
10686         * symtab.c: Include "progspace-and-thread.h".
10687         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10688         * thread.c (print_thread_info_1): Use
10689         scoped_restore_current_thread.
10690         (struct current_thread_cleanup): Delete.
10691         (do_restore_current_thread_cleanup)
10692         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10693         (scoped_restore_current_thread::~scoped_restore_current_thread):
10694         ... this new dtor.
10695         (make_cleanup_restore_current_thread): Rename/convert to ...
10696         (scoped_restore_current_thread::scoped_restore_current_thread):
10697         ... this new ctor.
10698         (thread_apply_all_command): Use scoped_restore_current_thread.
10699         (thread_apply_command): Use scoped_restore_current_thread.
10700         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10701         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10702
10703 2017-05-04  Pedro Alves  <palves@redhat.com>
10704
10705         * thread.c (make_cleanup_restore_current_thread): Move
10706         find_thread_ptid call before the is_stopped call.  Assert that the
10707         thread is found.  Replace is_stopped call by checking the thread's
10708         state directly.  Remove unnecessary NULL-thread check.
10709
10710 2017-05-04  Pedro Alves  <palves@redhat.com>
10711
10712         * corelow.c (thread_section_name): New class.
10713         (get_core_register_section, get_core_siginfo): Use it.
10714
10715 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10716
10717         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10718         (get_core_register_section): Remove xfree of NULL pointer.
10719
10720 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10721
10722         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10723         * regcache.c (regcache::raw_supply_zeroed): New function.
10724         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10725
10726 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10727
10728         * gdbarch.sh: Remove commented out definition of
10729         TARGET_CHAR_BIT.
10730         * gdbarch.h: Re-generate.
10731
10732 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10733
10734         * configure: Regenerate.
10735
10736 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10737
10738         * solib-target.c (solib_target_relocate_section_addresses):
10739         Remove num_section_bases, num_bases, segment_bases variables.
10740
10741 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10742
10743         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10744
10745 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10746
10747         * solib-target.c: Include <vector>
10748         (struct lm_info_target) <~lm_info_target>: Remove.
10749         <segment_bases, section_bases>: Change type to
10750         std::vector<CORE_ADDR>.
10751         (library_list_start_segment, library_list_start_section,
10752         library_list_end_library,
10753         solib_target_relocate_section_addresses): Adjust.
10754
10755 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10756
10757         * gdbarch.sh (software_single_step): Change return type to
10758         std::vector<CORE_ADDR>.
10759         * gdbarch.c, gdbarch.h: Re-generate.
10760         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10761         Adjust.
10762         (arm_deal_with_atomic_sequence_raw): Adjust.
10763         (thumb_get_next_pcs_raw): Adjust.
10764         (arm_get_next_pcs_raw): Adjust.
10765         (arm_get_next_pcs): Adjust.
10766         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10767         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10768         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10769         (alpha_software_single_step): Adjust.
10770         * alpha-tdep.h (alpha_software_single_step): Adjust.
10771         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10772         * arm-tdep.c (arm_software_single_step): Adjust.
10773         (arm_breakpoint_kind_from_current_state): Adjust.
10774         * arm-tdep.h (arm_software_single_step): Adjust.
10775         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10776         * cris-tdep.c (cris_software_single_step): Adjust.
10777         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10778         (micromips_deal_with_atomic_sequence): Adjust.
10779         (deal_with_atomic_sequence): Adjust.
10780         (mips_software_single_step): Adjust.
10781         * mips-tdep.h (mips_software_single_step): Adjust.
10782         * moxie-tdep.c (moxie_software_single_step): Adjust.
10783         * nios2-tdep.c (nios2_software_single_step): Adjust.
10784         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10785         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10786         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10787         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10788         * sparc-tdep.c (sparc_software_single_step): Adjust.
10789         * spu-tdep.c (spu_software_single_step): Adjust.
10790         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10791
10792 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10793
10794         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10795         * gdbarch.h: Re-generate.
10796
10797 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10798
10799         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10800         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10801         * python/py-instruction.c, python/py-instruction.h: New file.
10802         * python/py-record.c: Add py-instruction.h include.
10803         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10804         gdb.RecordInstruction.
10805         * python/python-internal.h: Add gdbpy_initialize_instruction
10806         declaration.
10807         * python/python.c (do_start_initialization): Add
10808         gdbpy_initialize_instruction.
10809
10810 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10811
10812         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10813         Remove.
10814         (btrace_func_from_recpy_func): New function.
10815         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10816         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10817         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10818         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10819         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10820         Also, use new helper functions.
10821         (btpy_list_item): Use new helper functions.
10822         (recpy_bt_function_call_history): Use new type name.
10823         (btpy_call_getset): Remove.
10824         (gdbpy_initialize_btrace): Remove code to initialize
10825         gdb.BtraceFunctionCall.
10826         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10827         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10828         recpy_bt_func_prev, recpy_bt_func_next): New export.
10829         * python/py-record.c (recpy_func_type): New static object.
10830         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10831         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10832         recpy_func_next): New function.
10833         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10834         (recpy_func_getset): New static object.
10835         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10836         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10837
10838 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10839
10840         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10841         (btpy_object, btpy_insn_type, btpy_new): Remove.
10842         (btpy_list_object): Use gdb.RecordInstruction type instead of
10843         gdb.BtraceInstruction type.
10844         (btrace_insn_from_recpy_insn): New function.
10845         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10846         btpy_new.
10847         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10848         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10849         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10850         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10851         instead of btpy_object.
10852         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10853         btpy_insn_data, btpy_insn_decode): Rename to ...
10854         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10855         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10856         recpy_bt_insn_decode): This.  Also, use new helper functions.
10857         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10858         recpy_insn_type.
10859         (btpy_insn_getset): Remove.
10860         (gdbpy_initialize_btrace): Remove code to initialize
10861         gdb.BtraceInstruction.  Use recpy_element_object.
10862         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10863         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10864         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10865         * python/py-record.c (recpy_insn_type): New static object.
10866         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10867         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10868         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10869         New function.
10870         (recpy_insn_getset): New static object.
10871         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10872         * python/py-record.h (recpy_element_object): New typedef.
10873         (recpy_insn_type, recpy_insn_new): New export.
10874
10875 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10876
10877         * py-record-btrace.c (btpy_insn_new): Removed.
10878         (btpy_insn_or_gap_new): New function.
10879         (btpy_insn_error): Removed.
10880         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10881         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10882         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10883         btpy_insn_or_gap_new instead of btpy_insn_new.
10884         (btpy_insn_getset): Remove btpy_insn_error.
10885         * py-record.c (recpy_gap_type): New static object.
10886         (recpy_gap_object): New typedef.
10887         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10888         recpy_gap_reason_string): New function.
10889         (recpy_gap_getset): New static object.
10890         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10891         * py-record.h (recpy_gap_new): New export.
10892
10893 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10894
10895         * python/py-record.c (recpy_ptid): Remove.
10896         (recpy_record_getset): Remove recpy_ptid.
10897
10898 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10899
10900         * btrace.c (btrace_fetch): Set inferior_ptid.
10901         * python/py-record-btrace.c: Add "py-record.h" include.
10902         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10903         recpy_bt_end, recpy_bt_instruction_history,
10904         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10905         in gdb.Record object instead of current ptid.
10906         * python/py-record.c: Include new "py-record.h" file.
10907         (recpy_record_object): Moved to py-record.h.
10908         * python/py-record.h: New file.
10909
10910 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10911
10912         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10913         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10914         indentation.
10915
10916 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10917
10918         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10919         the past maintainers section.
10920
10921 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10922
10923         * infcmd.c (get_return_value): Use regcache ctor, and remove
10924         cleanup.
10925
10926 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10927             Pedro Alves  <palves@redhat.com>
10928
10929         * regcache.c (regcache::regcache): New tag dispatch ctor.
10930         (do_cooked_read): Moved above.
10931         (regcache_dup): Use the tag dispatch ctor..
10932         * regcache.h (regcache): Declare ctor, delete copy ctor and
10933         assignment operator, remove friend regcache_dup.
10934
10935 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10936
10937         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10938         call method save instead of regcache_cpy.
10939         * regcache.h (struct regcache): Make regcache_dup a friend.
10940
10941 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10942
10943         * regcache.c (struct regcache): Move to regcache.h
10944         (regcache::arch): New method.
10945         (regcache_get_ptid): Update.
10946         (get_regcache_arch): Call arch method.
10947         (get_regcache_aspace): Call method aspace.
10948         (register_buffer): Change it to method.
10949         (regcache_save): Change it to regcache::save.
10950         (regcache_restore): Likewise.
10951         (regcache_cpy_no_passthrough): Remove the declaration.
10952         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10953         (regcache_cpy_no_passthrough): Change it to method
10954         cpy_no_passthrough.
10955         (regcache_register_status): Change it to method
10956         get_register_status.
10957         (regcache_invalidate): Change it to method invalidate.
10958         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10959         (regcache_raw_update): Change it to method raw_update.
10960         (regcache_raw_read): Likewise.
10961         (regcache_raw_read_signed): Likewise.
10962         (regcache_raw_read_unsigned): Likewise.
10963         (regcache_raw_write_signed): Likewise.
10964         (regcache_raw_write_unsigned): Likewise.
10965         (regcache_cooked_read): Likewise.
10966         (regcache_cooked_read_value): Likewise.
10967         (regcache_cooked_read_signed): Likewise.
10968         (regcache_cooked_read_unsigned): Likewise.
10969         (regcache_cooked_write_signed): Likewise.
10970         (regcache_cooked_write_unsigned): Likewise.
10971         (regcache_raw_set_cached_value): Likewise.
10972         (regcache_raw_write): Likewise.
10973         (regcache_cooked_write): Likewise.
10974         (regcache_xfer_part): Likewise.
10975         (regcache_raw_read_part): Likewise.
10976         (regcache_raw_write_part): Likewise.
10977         (regcache_cooked_read_part): Likewise.
10978         (regcache_cooked_write_part): Likewise.
10979         (regcache_raw_supply): Likewise.
10980         (regcache_raw_collect): Likewise.
10981         (regcache_transfer_regset): Likewise.
10982         (regcache_supply_regset): Likewise.
10983         (regcache_collect_regset): Likewise.
10984         (regcache_debug_print_register): Likewise.
10985         (enum regcache_dump_what): Move it to regcache.h.
10986         (regcache_dump): Change it to method dump.
10987         * regcache.h (enum regcache_dump_what): New.
10988         (class regcache): New.
10989         * target.c (target_fetch_registers): Call method
10990         debug_print_register.
10991         (target_store_registers): Likewise.
10992
10993 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10994
10995         * windows-nat.c (struct lm_info_windows): Initialize field.
10996         (windows_make_so): Allocate lm_info_windows with new.
10997         (windows_free_so): Free lm_info_windows with delete.
10998
10999 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11000
11001         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11002         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11003         cleanup.
11004         (darwin_free_so): Free lm_info_darwin with delete.
11005
11006 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11007
11008         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11009         <l_addr_p>: Change type to bool.
11010         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11011         (svr4_free_so): Free lm_info_svr4 with delete.
11012         (svr4_copy_library_list): Replace memcpy with call to copy
11013         constructor.
11014         (library_list_start_library, svr4_default_sos): Allocate
11015         lm_info_svr4 with new.
11016
11017 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11018
11019         * solib-target.c (struct lm_info_target): Add destructor,
11020         initialize fields.
11021         <name>: Change type to std::string.
11022         (library_list_start_library): Allocate lm_info_target with new.
11023         (solib_target_free_library_list): Free lm_info_target with
11024         delete.
11025         (solib_target_current_sos): Adapt to std::string.
11026         (solib_target_free_so): Free lm_info_target with delete.
11027
11028 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11029
11030         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11031         fields.
11032         (frv_current_sos): Allocate lm_info_frv with new.
11033         (frv_relocate_main_executable): Free lm_info_frv with delete,
11034         allocate with new.
11035         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11036
11037 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11038
11039         * solib-frv.c (struct lm_info_frv): Fix indentation.
11040
11041 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11042
11043         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11044         map field.
11045         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11046         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11047         and allocate with new.
11048         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11049
11050 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11051
11052         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11053         <filename, member_name>: Change type to std::string.
11054         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11055         (library_list_start_library): Allocate lm_info_aix with new.
11056         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11057         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11058         with copy constructor.
11059
11060 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11061
11062         * solist.h (struct lm_info): Remove.
11063         (struct lm_info_base): New class.
11064         (struct so_list) <lm_info>: Change type to lm_info_base *.
11065         * nto-tdep.c (struct lm_info): Remove.
11066         (lm_addr): Adjust.
11067         * solib-aix.c (struct lm_info): Rename to ...
11068         (struct lm_info_aix): ... this.  Extend lm_info_base.
11069         (lm_info_p): Rename to ...
11070         (lm_info_aix_p): ... this, and adjust.
11071         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11072         solib_aix_parse_libraries, library_list_start_library,
11073         solib_aix_free_library_list, solib_aix_parse_libraries,
11074         solib_aix_get_library_list,
11075         solib_aix_relocate_section_addresses, solib_aix_free_so,
11076         solib_aix_get_section_offsets,
11077         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11078         Adjust.
11079         (struct solib_aix_inferior_data) <library_list>: Adjust.
11080         * solib-darwin.c (struct lm_info): Rename to ...
11081         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11082         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11083         * solib-dsbt.c (struct lm_info): Rename to ...
11084         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11085         (struct dsbt_info) <main_executable_lm_info): Adjust.
11086         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11087         dsbt_relocate_section_addresses): Adjust.
11088         * solib-frv.c (struct lm_info): Rename to ...
11089         (struct lm_info_frv): ... this.  Extend lm_info_base.
11090         (main_executable_lm_info): Adjust.
11091         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11092         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11093         find_canonical_descriptor_in_load_object,
11094         frv_fdpic_find_canonical_descriptor): Adjust.
11095         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11096         to lm_info_svr4.
11097         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11098         svr4_clear_so, svr4_copy_library_list,
11099         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11100         svr4_current_sos, svr4_fetch_objfile_link_map,
11101         solist_update_incremental): Adjust.
11102         * solib-svr4.h (struct lm_info_svr4): Move here from
11103         solib-svr4.c.
11104         * solib-target.c (struct lm_info): Rename to ...
11105         (struct lm_info_target): ... this.  Extend lm_info_base.
11106         (lm_info_p): Rename to ...
11107         (lm_info_target_p): ... this.
11108         (solib_target_parse_libraries, library_list_start_segment,
11109         library_list_start_section, library_list_start_library,
11110         library_list_end_library, solib_target_free_library_list,
11111         solib_target_current_sos, solib_target_free_so,
11112         solib_target_relocate_section_addresses): Adjust.
11113         * windows-nat.c (struct lm_info): Rename to ...
11114         (struct lm_info_windows): ... this.  Extend lm_info_base.
11115         (windows_make_so, handle_load_dll, handle_unload_dll,
11116         windows_xfer_shared_libraries): Adjust.
11117
11118 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11119
11120         * solib-darwin.c (struct darwin_so_list): Remove.
11121         (darwin_current_sos): Allocate an so_list object instead of a
11122         darwin_so_list, separately allocate an lm_info object.
11123         (darwin_free_so): Free lm_info.
11124
11125 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11126
11127         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11128         with fprintf_filtered.
11129
11130 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11131
11132         * regcache.c (regcache::regcache): New function.
11133         (regcache::~regcache): New function.
11134         (regcache_xmalloc_1): Remove.
11135         (regcache_xmalloc): Call new regcache.
11136         (regcache_xfree): Call delete regcache.
11137         (get_thread_arch_aspace_regcache): Call new regcache.
11138
11139 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11140
11141         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11142         lwp instead of ptid_get_lwp.
11143
11144 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11145
11146         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11147         lwp_info instead of getting from inferior_ptid.
11148
11149 2017-04-27  Keith Seitz  <keiths@redhat.com>
11150
11151         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11152         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11153         (CV_CONVERSION_BADNESS): Define.
11154         (rank_one_type): Remove overly restrictive rvalue reference
11155         rank checks.
11156         Add cv-qualifier checks and subranks for type equality.
11157         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11158         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11159         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11160
11161 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11162
11163         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11164         count when creating the object.
11165
11166 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11167             Ulrich Weigand  <uweigand@de.ibm.com>
11168
11169         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11170         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11171         is used in AIX.
11172         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11173         (process_xcoff_symbol): Likewise.
11174         (scan_xcoff_symtab): Likewise.
11175
11176 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11177
11178         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11179         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11180         (ia64_access_reg): Use get_frame_register_unsigned.
11181         (ia64_access_rse_reg): Likewise.
11182         (ia64_libunwind_frame_prev_register): Likewise.
11183
11184 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11185
11186         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11187         * gdbarch.c: Regenerated.
11188         * gdbarch.h: Regenerated.
11189         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11190         visibility external.
11191         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11192         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11193         (enum cfa_how_kind): Move to ...
11194         (struct dwarf2_frame_state_reg_info): Likewise.
11195         (struct dwarf2_frame_state): Likewise.
11196         * dwarf2-frame.h: ... here.
11197         (dwarf2_frame_state_alloc_regs): New declaration.
11198         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11199         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11200
11201 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11202
11203         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11204         regcache_raw_read_unsigned.
11205         (xtensa_pseudo_register_write): Likewise.
11206
11207 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11208
11209         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11210         (nds32_pseudo_register_write): Likewise.
11211
11212 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11213
11214         * regcache.c (struct regcache) <readonly_p>: Change its type
11215         to bool.
11216         (regcache_xmalloc_1): Update parameter type and callers update.
11217
11218 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11219
11220         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11221         set_gdbarch_wchar_bit.
11222         * arm-tdep.c (arm_gdbarch_init): Likewise.
11223
11224 2017-04-25  Pedro Alves  <palves@redhat.com>
11225
11226         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11227         (BothAreRelocatable, memcopy, memmove): Don't define.
11228         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11229         macros.
11230
11231 2017-04-25  Pedro Alves  <palves@redhat.com>
11232
11233         * common/common-defs.h: Include "common/poison.h".
11234         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11235         and adjust.
11236         * common/poison.h: New file.
11237         * common/traits.h: Include <type_traits>.
11238         (Not, Or, Requires): New, moved from common/function-view.h.
11239
11240 2017-04-25  Pedro Alves  <palves@redhat.com>
11241
11242         * breakpoint.h (struct breakpoint): In-class initialize all
11243         fields.  Make boolean fields "bool".
11244         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11245         memset call and initializations no longer necessary.
11246
11247 2017-04-25  Pedro Alves  <palves@redhat.com>
11248
11249         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11250         reference.
11251         (pt_btrace_insn): New function.
11252         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11253
11254 2017-04-25  Pedro Alves  <palves@redhat.com>
11255
11256         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11257         "base" field and inherit from "bp_location" instead.  Add
11258         non-default ctor.
11259         (allocate_location_exception): Use new non-default ctor.
11260         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11261         (init_bp_location): Convert to ...
11262         (bp_location::bp_location): ... this new ctor, and remove memset
11263         call.
11264         (base_breakpoint_allocate_location): Use the new non-default ctor.
11265         * breakpoint.h (bp_location): Now a class.  Declare default and
11266         non-default ctors.  In-class initialize all members.
11267         (init_bp_location): Remove declaration.
11268
11269 2017-04-25  Pedro Alves  <palves@redhat.com>
11270
11271         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11272         assignment operator.
11273
11274 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11275
11276         * doublest.c (convert_doublest_to_floatformat): Call
11277         floatformat_totalsize_bytes.
11278
11279 2017-04-22  Tom Tromey  <tom@tromey.com>
11280
11281         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11282         ui_out_emit_list.
11283         * stack.c (print_frame): Use ui_out_emit_list.
11284         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11285         ui_out_emit_list.
11286         * mi/mi-main.c (print_one_inferior)
11287         (mi_cmd_data_list_register_names)
11288         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11289         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11290         ui_out_emit_list.
11291         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11292         (mi_output_solib_attribs): Use ui_out_emit_list,
11293         ui_out_emit_tuple.
11294         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11295         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11296         (mi_cmd_stack_list_args, list_args_or_locals): Use
11297         ui_out_emit_list.
11298         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11299         * breakpoint.c (print_solib_event, output_thread_groups): Use
11300         ui_out_emit_list.
11301
11302 2017-04-22  Tom Tromey  <tom@tromey.com>
11303
11304         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11305         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11306         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11307
11308 2017-04-22  Tom Tromey  <tom@tromey.com>
11309
11310         * tracepoint.c (tvariables_info_1)
11311         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11312
11313 2017-04-22  Tom Tromey  <tom@tromey.com>
11314
11315         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11316         annotate_arg_emitter.
11317         * breakpoint.c (print_mention_watchpoint)
11318         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11319         * annotate.h (struct annotate_arg_emitter): New.
11320
11321 2017-04-22  Tom Tromey  <tom@tromey.com>
11322
11323         * record-btrace.c (record_btrace_insn_history)
11324         (record_btrace_insn_history_range, record_btrace_call_history)
11325         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11326         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11327         ui_out_emit_tuple.
11328         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11329         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11330         * skip.c (skip_info): Use ui_out_emit_tuple.
11331         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11332         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11333         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11334         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11335         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11336         ui_out_emit_tuple.
11337         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11338         (output_register, mi_cmd_data_read_memory)
11339         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11340         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11341         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11342         Use ui_out_emit_tuple.
11343         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11344         ui_out_emit_tuple.
11345         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11346         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11347         * linux-thread-db.c (info_auto_load_libthread_db): Use
11348         ui_out_emit_tuple.
11349         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11350         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11351         * disasm.c (do_mixed_source_and_assembly_deprecated)
11352         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11353         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11354         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11355         * breakpoint.c (print_one_breakpoint_location)
11356         (print_one_breakpoint): Use ui_out_emit_tuple.
11357         * auto-load.c (print_script, info_auto_load_cmd): Use
11358         ui_out_emit_tuple.
11359         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11360
11361 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11362
11363         * thread.c (print_thread_info_1): Remove dead code.
11364
11365 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11366
11367         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11368         GDB_SELF_TEST.
11369         * arm-tdep.c (selftests::arm_record_test): Likewise.
11370
11371 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11372
11373         * regcache.c (regcache_restore): Remove argument 2.  Replace
11374         argument 3 with regcache.  Get register status from
11375         src->register_status and get register contents from
11376         register_buffer (src, regnum).
11377         (regcache_cpy): Update.
11378
11379 2017-04-19  Pedro Alves  <palves@redhat.com>
11380
11381         * gdbthread.h (thread): Add missing closing parenthesis in
11382         comment.
11383
11384 2017-04-19  Pedro Alves  <palves@redhat.com>
11385
11386         * common/refcounted-object.h: New file.
11387         * gdbthread.h: Include "common/refcounted-object.h".
11388         (thread_info): Inherit from refcounted_object and add comments.
11389         (thread_info::incref, thread_info::decref)
11390         (thread_info::m_refcount): Delete.
11391         (thread_info::deletable): Use the refcounted_object::refcount()
11392         method.
11393         * inferior.c (current_inferior_): Add comment.
11394         (set_current_inferior): Increment/decrement refcounts.
11395         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11396         not-deletable instead of comparing with the current inferior.
11397         (initialize_inferiors): Increment the initial inferior's refcount.
11398         * inferior.h (struct inferior): Forward declare.
11399         Include "common/refcounted-object.h".
11400         (current_inferior, set_current_inferior): Move declaration to
11401         before struct inferior's definition, and fix comment.
11402         (inferior): Inherit from refcounted_object.  Add comments.
11403         * thread.c (switch_to_thread_no_regs): Reference the thread's
11404         inferior pointer directly instead of doing a ptid lookup.
11405         (switch_to_no_thread): New function.
11406         (switch_to_thread(thread_info *)): New function, factored out
11407         from ...
11408         (switch_to_thread(ptid_t)): ... this.
11409         (restore_current_thread): Delete.
11410         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11411         fields, and add 'inf' field.
11412         (do_restore_current_thread_cleanup): Check whether old->inf is
11413         alive instead of looking up an inferior by ptid.  Use
11414         switch_to_thread and switch_to_no_thread.
11415         (restore_current_thread_cleanup_dtor): Use old->inf directly
11416         instead of lookup up an inferior by id.  Decref the inferior.
11417         Don't restore 'removable'.
11418         (make_cleanup_restore_current_thread): Same the inferior pointer
11419         in old, instead of the inferior number.  Incref the inferior.
11420         Don't save/clear 'removable'.
11421
11422 2017-04-19  Pedro Alves  <palves@redhat.com>
11423
11424         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11425         unittests/scoped_restore-selftests.c.
11426         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11427         * common/scoped_restore.h (scoped_restore_base): Make "class".
11428         (scoped_restore_base::release): New public method.
11429         (scoped_restore_base::scoped_restore_base): New protected ctor.
11430         (scoped_restore_base::m_saved_var): New protected field.
11431         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11432         scoped_restore_base base class instead of m_saved_var directly.
11433         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11434         (scoped_restore_tmpl::scoped_restore_tmpl(const
11435         scoped_restore_tmpl<T>&)): Likewise.
11436         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11437         method.
11438         (scoped_restore_tmpl::saved_var): New method.
11439         (scoped_restore_tmpl::m_saved_var): Delete.
11440         * inferior.h (inferior::detaching): Now a bool.
11441         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11442         cleanup.
11443         * unittests/scoped_restore-selftests.c: New file.
11444
11445 2017-04-19  Pedro Alves  <palves@redhat.com>
11446
11447         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11448         Re-sort in alphabetic order.
11449
11450 2017-04-18  Pedro Alves  <palves@redhat.com>
11451
11452         * xml-support.c (obstack_xml_printf): Delete.
11453         * xml-support.h (obstack_xml_printf): Delete.
11454
11455 2017-04-18  Pedro Alves  <palves@redhat.com>
11456
11457         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11458         vdebug, verror, body_text, start_element, end_element, name,
11459         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11460         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11461         is_xinclude>: Make private and add m_ prefix.
11462         (gdb_xml_parser::body_text): New method, based on ...
11463         (gdb_xml_body_text): ... this.  Adjust.
11464         (gdb_xml_parser::vdebug): New method, based on ...
11465         (gdb_xml_debug): ... this.  Adjust.
11466         (gdb_xml_parser::verror): New method, based on ...
11467         (gdb_xml_error): ... this.  Adjust.
11468         (gdb_xml_parser::start_element): New method, based on ...
11469         (gdb_xml_start_element): ... this.  Adjust.
11470         (gdb_xml_start_element_wrapper): Defer to
11471         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11472         (gdb_xml_parser::end_element): New method, based on ...
11473         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11474         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11475         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11476         (gdb_xml_parser::use_dtd): New method, based on ...
11477         (gdb_xml_use_dtd): ... this.  Adjust.
11478         (gdb_xml_parser::parse): New method, based on ...
11479         (gdb_xml_parse): ... this.  Adjust.
11480         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11481         (xinclude_start_include): Adjust to call the parser's name method.
11482         (xml_xinclude_default, xml_xinclude_start_doctype)
11483         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11484         method.
11485         (xml_process_xincludes): Adjust to call parser methods.
11486         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11487         declarations.
11488
11489 2017-04-18  Pedro Alves  <palves@redhat.com>
11490
11491         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11492         gdb::optional<std::string>.
11493         * xml-support.c: Include <string>.
11494         (scope_level::scope_level(scope_level &&))
11495         (scope_level::~scope_level): Delete.
11496         (scope_level::body): Now a std::string.
11497         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11498         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11499         parameter.
11500         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11501         (xinclude_parsing_data::output): Now a std::string reference.
11502         (xinclude_start_include): Adjust.
11503         (xml_xinclude_default): Adjust.
11504         (xml_process_xincludes): Add 'output' parameter, and return bool.
11505         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11506         and return bool.
11507         * xml-tdesc.c: Include <unordered_map> and <string>.
11508         (tdesc_xml_cache): Delete.
11509         (tdesc_xml_cache_s): Delete.
11510         (xml_cache): Now an std::unordered_map.
11511         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11512         (target_fetch_description_xml): Change return type to
11513         gdb::optional<std::string>, and adjust.
11514         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11515         (target_fetch_description_xml): Change return type to
11516         gdb::optional<std::string>.
11517
11518 2017-04-18  Pedro Alves  <palves@redhat.com>
11519
11520         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11521         unittests/optional-selftests.c.
11522         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11523         * unittests/optional-selftests.c: New file.
11524         * unittests/optional/assignment/1.cc: New file.
11525         * unittests/optional/assignment/2.cc: New file.
11526         * unittests/optional/assignment/3.cc: New file.
11527         * unittests/optional/assignment/4.cc: New file.
11528         * unittests/optional/assignment/5.cc: New file.
11529         * unittests/optional/assignment/6.cc: New file.
11530         * unittests/optional/assignment/7.cc: New file.
11531         * unittests/optional/cons/copy.cc: New file.
11532         * unittests/optional/cons/default.cc: New file.
11533         * unittests/optional/cons/move.cc: New file.
11534         * unittests/optional/cons/value.cc: New file.
11535         * unittests/optional/in_place.cc: New file.
11536         * unittests/optional/observers/1.cc: New file.
11537         * unittests/optional/observers/2.cc: New file.
11538
11539 2017-04-18  Pedro Alves  <palves@redhat.com>
11540
11541         * common/gdb_optional.h: Include common/traits.h.
11542         (in_place_t): New type.
11543         (in_place): New constexpr variable.
11544         (optional::optional): Remove member initialization of
11545         m_instantiated.
11546         (optional::optional(in_place_t...)): New constructor.
11547         (optional::~optional): Use reset.
11548         (optional::optional(const optional&)): New.
11549         (optional::optional(const optional&&)): New.
11550         (optional::optional(T &)): New.
11551         (optional::optional(T &&)): New.
11552         (operator::operator=(const optional &)): New.
11553         (operator::operator=(optional &&)): New.
11554         (operator::operator= (const T &))
11555         (operator::operator= (T &&))
11556         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11557         (operator::reset): New.
11558         (operator::m_instantiated):: Add in-class initializer.
11559         * common/traits.h: Include <type_traits>.
11560         (struct And): New types.
11561
11562 2017-04-18  Pedro Alves  <palves@redhat.com>
11563
11564         * xml-support.c: Include <vector>.
11565         (scope_level::scope_level(const gdb_xml_element *))
11566         (scope_level::scope_level(scope_level&&)): New.
11567         (scope_level::~scope_level): New.
11568         (scope_level_s): Delete.
11569         (gdb_xml_parser::scopes): Now a std::vector.
11570         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11571         Use std::vector.
11572         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11573         scope cleanup code.
11574         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11575         of the scopes member.  Use std::vector::emplace_back.
11576
11577 2017-04-18  Pedro Alves  <palves@redhat.com>
11578
11579         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11580         a bool.
11581         (gdb_xml_end_element): Change type of first parameter.
11582         (gdb_xml_cleanup): Rename to ...
11583         (gdb_xml_parser::~gdb_xml_parser): ... this.
11584         (gdb_xml_create_parser_and_cleanup): Delete with ...
11585         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11586         to this new ctor.
11587         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11588         using gdb_xml_create_parser_and_cleanup.
11589         (xinclude_parsing_data): Add ctor/dtor.
11590         (xml_xinclude_cleanup): Delete.
11591         (xml_process_xincludes): Create a local xinclude_parsing_data
11592         instead of heap-allocating one.  Create a local gdb_xml_parser
11593         instead of heap-allocating one with
11594         gdb_xml_create_parser_and_cleanup.
11595
11596 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11597
11598         PR threads/20743
11599         * fbsd-nat.c (resume_one_thread_cb): Remove.
11600         (resume_all_threads_cb): Remove.
11601         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11602         iterate_over_threads.
11603
11604 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11605
11606         * NEWS: Create a new section for the next release branch.
11607         Rename the section of the current branch, now that it has
11608         been cut.
11609
11610 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11611
11612         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11613         * version.in: Bump version to 8.0.50.DATE-git.
11614
11615 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11616
11617         PR gdb/21385
11618         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11619         independently of the host, and fix build breakage on Cygwin.
11620
11621 2017-04-13  Pedro Alves  <palves@redhat.com>
11622
11623         * inferior.c (free_inferior): Convert to ...
11624         (inferior::~inferior): ... this dtor.
11625         (inferior::inferior): New ctor, factored out from ...
11626         (add_inferior_silent): ... here.  Allocate the inferior with a new
11627         expression.
11628         (delete_inferior): Call delete instead of free_inferior.
11629         * inferior.h (gdb_environ, continuation): Forward declare.
11630         (inferior): Now a class.  Add in-class initialization to all
11631         members.  Make boolean fields bool, except 'detaching'.
11632         (inferior::inferior): New explicit ctor.
11633         (inferior::~inferior): New.
11634
11635 2017-04-13  Pedro Alves  <palves@redhat.com>
11636
11637         * inferior.c (init_inferior_list): Delete.
11638         * inferior.h (init_inferior_list): Delete.
11639
11640 2017-04-13  Pedro Alves  <palves@redhat.com>
11641
11642         PR threads/13217
11643         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11644         (top level): Call it twice, with different thread sets.
11645
11646 2017-04-13  Pedro Alves  <palves@redhat.com>
11647
11648         * thread.c: Include <algorithm>.
11649         (thread_array_cleanup): Delete.
11650         (scoped_inc_dec_ref): New class.
11651         (live_threads_count): New function.
11652         (set_thread_refcount): Delete.
11653         (tp_array_compar_ascending): Now a bool.
11654         (tp_array_compar): Convert to a std::sort comparison function.
11655         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11656         and live_threads_count.
11657
11658 2017-04-13  Pedro Alves  <palves@redhat.com>
11659
11660         * infrun.c (follow_fork_inferior): Also switch the current
11661         inferior.
11662
11663 2017-04-13  Pedro Alves  <palves@redhat.com>
11664
11665         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11666         before calling create_internal_breakpoint.
11667
11668 2017-04-13  Pedro Alves  <palves@redhat.com>
11669
11670         * fork-child.c (execv_argv): New class.
11671         (breakup_args): Refactored as ...
11672         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11673         Copy arguments to storage and replace separators with NULL
11674         terminators in place.
11675         (escape_bang_in_quoted_argument): Adjust to return bool.
11676         (execv_argv::execv_argv): New ctor.
11677         (execv_argv::init_for_shell): New method, factored out from
11678         fork_inferior.  Don't strdup strings into the vector.
11679         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11680         Remove free_vector_argv call.
11681
11682 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11683
11684         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11685         tdep->rx_psw_type.
11686
11687 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11688
11689         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11690         * rx-tdep.c (rx_gdbarch_init): Likewise.
11691
11692 2017-04-13  Pedro Alves  <palves@redhat.com>
11693
11694         * breakpoint.h (struct breakpoint): Reindent.
11695
11696 2017-04-13  Pedro Alves  <palves@redhat.com>
11697
11698         * breakpoint.c (bp_location): Rename to ...
11699         (bp_locations): ... this.  All references updated.
11700         (bp_location_count): Rename to ...
11701         (bp_locations_count): ... this.  All references updated.
11702         (bp_location_placed_address_before_address_max): Rename to ...
11703         (bp_locations_placed_address_before_address_max): ... this.  All
11704         references updated.
11705         (bp_location_shadow_len_after_address_max): Rename to ...
11706         (bp_locations_shadow_len_after_address_max): ... this.  All
11707         references updated.
11708         (bp_location_compare_addrs): Rename to ...
11709         (bp_locations_compare_addrs): ... this.  All references updated.
11710         (bp_location_compare):Rename to ...
11711         (bp_locations_compare): ... this.  All references updated.
11712         (bp_location_target_extensions_update): Rename to ...
11713         (bp_locations_target_extensions_update): ... this.  All references
11714         updated.
11715
11716 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11717
11718         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11719         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11720         'sgtty.h'.
11721         * common/gdb_termios.h: New file, with parts of "terminal.h".
11722         * inflow.c: Include "gdb_termios.h".
11723         * ser-unix.c: Include "gdb_termios.h".
11724         * terminal.h: Move terminal-related defines to
11725         "common/gdb_termios.h".
11726
11727 2017-04-12  Tom Tromey  <tom@tromey.com>
11728
11729         * probe.c (parse_probes): Update.
11730         * location.h (delete_event_location): Don't declare.
11731         (event_location_deleter::operator()): Update.
11732         * location.c (event_location_deleter::operator()): Rename from
11733         delete_event_location.
11734         * linespec.h (linespec_result) <location>: Change type to
11735         event_location_up.
11736         * linespec.c (canonicalize_linespec, event_location_to_sals)
11737         (decode_objc): Update.
11738         (linespec_result): Don't call delete_event_location.
11739         * breakpoint.c (create_breakpoints_sal)
11740         (bkpt_probe_create_sals_from_location)
11741         (strace_marker_create_sals_from_location): Update.
11742
11743 2017-04-12  Tom Tromey  <tom@tromey.com>
11744
11745         * linespec.h (struct linespec_result): Add constructor and
11746         destructor.
11747         (init_linespec_result, destroy_linespec_result)
11748         (make_cleanup_destroy_linespec_result): Don't declare.
11749         * linespec.c (init_linespec_result): Remove.
11750         (linespec_result::~linespec_result): Rename from
11751         destroy_linespec_result.  Update.
11752         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11753         Remove.
11754         * breakpoint.c (create_breakpoint, break_range_command)
11755         (decode_location_default): Update.
11756         * ax-gdb.c (agent_command_1): Update.
11757
11758 2017-04-12  Tom Tromey  <tom@tromey.com>
11759
11760         * remote.c (remote_download_tracepoint): Update.
11761         * python/py-breakpoint.c (bppy_get_location): Update.
11762         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11763         (gdbscm_breakpoint_location): Update.
11764         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11765         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11766         Change type to event_location_up.
11767         * breakpoint.c (create_overlay_event_breakpoint)
11768         (create_longjmp_master_breakpoint)
11769         (create_std_terminate_master_breakpoint)
11770         (create_exception_master_breakpoint)
11771         (breakpoint_event_location_empty_p, print_breakpoint_location)
11772         (print_one_breakpoint_location, create_thread_event_breakpoint)
11773         (init_breakpoint_sal, create_breakpoint)
11774         (print_recreate_ranged_breakpoint, break_range_command)
11775         (init_ada_exception_breakpoint, say_where): Update.
11776         (base_breakpoint_dtor): Don't call delete_event_location.
11777         (bkpt_print_recreate, tracepoint_print_recreate)
11778         (dprintf_print_recreate, update_static_tracepoint)
11779         (breakpoint_re_set_default): Update.
11780
11781 2017-04-12  Tom Tromey  <tom@tromey.com>
11782
11783         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11784         type of "to_do".  Update.
11785         (compute_stack_depth): Use std::vector.
11786
11787 2017-04-12  Tom Tromey  <tom@tromey.com>
11788
11789         * printcmd.c (find_instruction_backward): Use std::vector.
11790
11791 2017-04-12  Tom Tromey  <tom@tromey.com>
11792
11793         * symfile.c (objfilep): Remove typedef.
11794         (reread_symbols): Use a std::vector.
11795
11796 2017-04-12  Tom Tromey  <tom@tromey.com>
11797
11798         * mi/mi-main.c (exec_direction_forward): Remove.
11799         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11800         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11801         scoped_restore.
11802         * guile/guile.c (guile_repl_command, guile_command)
11803         (gdbscm_execute_gdb_command): Use scoped_restore.
11804         * go-exp.y (go_parse): Use scoped_restore.
11805         * d-exp.y (d_parse): Use scoped_restore.
11806         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11807         * c-exp.y (c_parse): Use scoped_restore.
11808
11809 2017-04-12  Tom Tromey  <tom@tromey.com>
11810
11811         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11812         (mi_parse): Update return type.
11813         (mi_parse_free): Remove.
11814         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11815         (mi_parse::~mi_parse): Rename from mi_parse_free.
11816         (mi_parse_cleanup): Remove.
11817         (mi_parse): Return a unique_ptr.  Use new.
11818         * mi/mi-main.c (mi_execute_command): Update.
11819
11820 2017-04-12  Tom Tromey  <tom@tromey.com>
11821
11822         * location.c (explicit_location_lex_one): Return a
11823         unique_xmalloc_ptr.
11824         (string_to_explicit_location): Update.  Remove cleanups.
11825
11826 2017-04-12  Tom Tromey  <tom@tromey.com>
11827
11828         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11829         (compare_value_and_voffset): Change type.  Update.
11830         (compute_vtable_size): Change type of "offset_vec".
11831         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11832         (gnuv3_get_typeid): Remove extraneous declaration.
11833
11834 2017-04-12  Tom Tromey  <tom@tromey.com>
11835
11836         * charset.h (wchar_iterator): Fix comment.
11837
11838 2017-04-12  Tom Tromey  <tom@tromey.com>
11839
11840         * charset.c (iconv_wrapper): New class.
11841         (cleanup_iconv): Remove.
11842         (convert_between_encodings): Use it.
11843
11844 2017-04-12  Tom Tromey  <tom@tromey.com>
11845
11846         * symfile.h (increment_reading_symtab): Update type.
11847         * symfile.c (decrement_reading_symtab): Remove.
11848         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11849         * psymtab.c (psymtab_to_symtab): Update.
11850         * dwarf2read.c (dw2_instantiate_symtab): Update.
11851
11852 2017-04-12  Tom Tromey  <tom@tromey.com>
11853
11854         * jit.c (struct jit_reader): Declare separately.  Add constructor
11855         and destructor.  Change type of "handle".
11856         (loaded_jit_reader): Define separately.
11857         (jit_reader_load): Update.  New "new".
11858         (jit_reader_unload_command): Use "delete".
11859         * gdb-dlfcn.h (struct dlclose_deleter): New.
11860         (gdb_dlhandle_up): New typedef.
11861         (gdb_dlopen, gdb_dlsym): Update types.
11862         (gdb_dlclose): Remove.
11863         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11864         (gdb_dlsym): Change type of "handle".
11865         (make_cleanup_dlclose): Remove.
11866         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11867         * compile/compile-c-support.c (load_libcc): Update.
11868
11869 2017-04-12  Tom Tromey  <tom@tromey.com>
11870
11871         * symtab.h (find_pcs_for_symtab_line): Change return type.
11872         * symtab.c (find_pcs_for_symtab_line): Change return type.
11873         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11874         type of "vec".  Update.
11875         (ltpy_get_pcs_for_line): Update.
11876         * linespec.c (decode_digits_ordinary): Update.
11877
11878 2017-04-12  Tom Tromey  <tom@tromey.com>
11879
11880         * tracepoint.c (actions_command): Update.
11881         * python/python.c (python_command, python_interactive_command):
11882         Update.
11883         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11884         * guile/guile.c (guile_command): Update.
11885         * defs.h (read_command_lines, read_command_lines_1): Return
11886         command_line_up.
11887         (command_lines_deleter): New struct.
11888         (command_line_up): New typedef.
11889         * compile/compile.c (compile_code_command)
11890         (compile_print_command): Update.
11891         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11892         command_line_up.
11893         (make_cleanup_free_command_lines): Remove.
11894         * cli/cli-script.c (get_command_line, read_command_lines_1)
11895         (copy_command_lines): Return command_line_up.
11896         (while_command, if_command, read_command_lines, define_command)
11897         (document_command): Update.
11898         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11899         Remove.
11900         * breakpoint.h (breakpoint_set_commands): Change type of
11901         "commands".
11902         * breakpoint.c (breakpoint_set_commands): Change type of
11903         "commands".  Update.
11904         (do_map_commands_command, update_dprintf_command_list)
11905         (create_tracepoint_from_upload): Update.
11906
11907 2017-04-12  Tom Tromey  <tom@tromey.com>
11908
11909         * tracepoint.c (scope_info): Update.
11910         * spu-tdep.c (spu_catch_start): Update.
11911         * python/python.c (gdbpy_decode_line): Update.
11912         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11913         * python/py-breakpoint.c (bppy_init): Update.
11914         * probe.c (parse_probes): Update.
11915         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11916         * location.h (event_location_deleter): New struct.
11917         (event_location_up): New typedef.
11918         (new_linespec_location, new_address_location, new_probe_location)
11919         (new_explicit_location, copy_event_location)
11920         (string_to_event_location, string_to_event_location_basic)
11921         (string_to_explicit_location): Update return type.
11922         (make_cleanup_delete_event_location): Remove.
11923         * location.c (new_linespec_location, new_address_location)
11924         (new_probe_location, new_explicit_location, copy_event_location):
11925         Return event_location_up.
11926         (delete_event_location_cleanup)
11927         (make_cleanup_delete_event_location): Remove.
11928         (string_to_explicit_location, string_to_event_location_basic)
11929         (string_to_event_location): Return event_location_up.
11930         * linespec.c (canonicalize_linespec, event_location_to_sals)
11931         (decode_line_with_current_source)
11932         (decode_line_with_last_displayed, decode_objc): Update.
11933         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11934         * completer.c (location_completer): Update.
11935         * cli/cli-cmds.c (edit_command, list_command): Update.
11936         * breakpoint.c (create_overlay_event_breakpoint)
11937         (create_longjmp_master_breakpoint)
11938         (create_std_terminate_master_breakpoint)
11939         (create_exception_master_breakpoint)
11940         (create_thread_event_breakpoint): Update.
11941         (init_breakpoint_sal): Update.  Remove some dead code.
11942         (create_breakpoint_sal): Change type of "location".  Update.
11943         (create_breakpoints_sal, create_breakpoint, break_command_1)
11944         (dprintf_command, break_range_command, until_break_command)
11945         (init_ada_exception_breakpoint)
11946         (strace_marker_create_sals_from_location)
11947         (update_static_tracepoint, trace_command, ftrace_command)
11948         (strace_command, create_tracepoint_from_upload): Update.
11949         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11950         * ax-gdb.c (agent_command_1): Update.
11951
11952 2017-04-12  Pedro Alves  <palves@redhat.com>
11953
11954         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11955         * configure.tgt: Handle i[34567]86-*-go32* and
11956         i[34567]86-*-msdosdjgpp*.
11957         * i386-tdep.c (i386_svr4_reg_to_regnum):
11958         Make extern.
11959         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11960         i386-go32-tdep.c.
11961         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11962         * i386-go32-tdep.c: New file.
11963         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11964         declarations.
11965
11966 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11967
11968         * aix-thread.c (pd_status2str): Change return type to const char *.
11969
11970 2017-04-12  Pedro Alves  <palves@redhat.com>
11971
11972         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11973         calls to set_gdbarch_gnu_triplet_regexp.
11974
11975 2017-04-12  Pedro Alves  <palves@redhat.com>
11976
11977         PR gdb/21323
11978         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11979         New enum value.
11980         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11981         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11982         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11983         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11984         * gdbarch.h, gdbarch.c: Regenerate.
11985         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11986         gdbarch_wchar_bit and gdbarch_wchar_signed.
11987         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11988         * arm-tdep.c (arm_gdbarch_init): Likewise.
11989         * avr-tdep.c (avr_gdbarch_init): Likewise.
11990         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11991         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11992         * i386-tdep.c (i386_go32_init_abi): Likewise.
11993         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11994         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11995         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11996         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11997         * sh-tdep.c (sh_gdbarch_init): Likewise.
11998         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11999         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12000         * windows-tdep.c (windows_init_abi): Likewise.
12001         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12002
12003 2017-04-12  Pedro Alves  <palves@redhat.com>
12004
12005         PR c++/21323
12006         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12007         cplus_primitive_type_char32_t>: New enum values.
12008         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12009         and cplus_primitive_type_char32_t.
12010         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12011         32, use the archtecture's built-in type for char16_t and char32_t,
12012         respectively.  Otherwise, fallback to init_integer_type as before,
12013         but make the type unsigned, and issue a complaint.
12014         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12015
12016 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12017
12018         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12019         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12020
12021 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12022
12023         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12024         'const char *'.
12025
12026 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12027
12028         * common/common-utils.c (free_vector_argv): New function.
12029         * common/common-utils.h: Include <vector>.
12030         (free_vector_argv): New prototype.
12031         * darwin-nat.c (darwin_create_inferior): Rewrite function
12032         prototype in order to constify "exec_file" and accept a
12033         "std::string" for "allargs".
12034         * fork-child.c: Include <vector>.
12035         (breakup_args): Rewrite function, using C++.
12036         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12037         and accept "std::string" for "allargs".  Update the code to
12038         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12039         and "execvp".
12040         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12041         order to constify "exec_file" and accept a "std::string" for
12042         "allargs".
12043         * go32-nat.c (go32_create_inferior): Likewise.
12044         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12045         * infcmd.c (run_command_1): Constify "exec_file".  Use
12046         "std::string" for inferior arguments.
12047         * inferior.h (fork_inferior): Update prototype.
12048         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12049         prototype in order to constify "exec_file" and accept a
12050         "std::string" for "allargs".
12051         * nto-procfs.c (procfs_create_inferior): Likewise.
12052         * procfs.c (procfs_create_inferior): Likewise.
12053         * remote-sim.c (gdbsim_create_inferior): Likewise.
12054         * remote.c (extended_remote_run): Update code to accept
12055         "std::string" as argument.
12056         (extended_remote_create_inferior): Rewrite function prototype in
12057         order to constify "exec_file" and accept a "std::string" for
12058         "allargs".
12059         * rs6000-nat.c (super_create_inferior): Likewise.
12060         (rs6000_create_inferior): Likewise.
12061         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12062         * windows-nat.c (windows_create_inferior): Likewise.
12063
12064 2017-04-11  Pedro Alves  <palves@redhat.com>
12065
12066         * thread.c: Fix whitespace throughout.
12067
12068 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12069
12070         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12071
12072 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12073
12074         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12075
12076 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12077
12078         PR gdb/21364
12079         * osdata.c (info_osdata): Check if 'type' is an empty string
12080         instead of NULL.
12081
12082 2017-04-10  Pedro Alves  <palves@redhat.com>
12083
12084         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12085         (ptid_to_global_thread_id, in_thread_list)
12086         (do_captured_list_thread_ids, set_resumed, set_running)
12087         (set_executing, set_stop_requested, finish_thread_state)
12088         (validate_registers_access, can_access_registers_ptid)
12089         (print_thread_info_1, switch_to_thread)
12090         (do_restore_current_thread_cleanup)
12091         (make_cleanup_restore_current_thread, thread_command)
12092         (thread_name_command): Use operator== instead of ptid_equal.
12093
12094 2017-04-10  Pedro Alves  <palves@redhat.com>
12095
12096         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12097         (current_thread_cleanup_chain): Delete.
12098         (restore_current_thread_cleanup_dtor)
12099         (make_cleanup_restore_current_thread): Remove references to
12100         current_thread_cleanup_chain.
12101
12102 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12103
12104         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12105         REG_UNKNOWN.
12106
12107 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12108
12109         PR gdb/19942
12110         * gdbthread.h (thread_info::deletable): New method.
12111         (thread_info::incref): New method.
12112         (thread_info::decref): New method.
12113         (thread_info::refcount): Move it to private.
12114         * infrun.c (save_stop_context): Call inc_refcount.
12115         (release_stop_context_cleanup): Likewise.
12116         * thread.c (set_thread_exited): New function.
12117         (init_thread_list): Delete "tp" only it is deletable, otherwise
12118         call set_thread_exited.
12119         (delete_thread_1): Call set_thread_exited.
12120         (current_thread_cleanup) <inferior_pid>: Remove.
12121         <thread>: New field.
12122         (restore_current_thread_ptid_changed): Removed.
12123         (do_restore_current_thread_cleanup): Adjust.
12124         (restore_current_thread_cleanup_dtor): Don't call
12125         find_thread_ptid.
12126         (set_thread_refcount): Use dec_refcount.
12127         (make_cleanup_restore_current_thread): Adjust.
12128         (thread_apply_all_command): Call inc_refcount.
12129         (_initialize_thread): Don't call
12130         observer_attach_thread_ptid_changed.
12131
12132 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12133
12134         * thread.c (delete_thread_1): Hoist code on marking thread as
12135         exited.
12136
12137 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12138
12139         * windows-nat.c (windows_detach): Initialize ptid with
12140         minus_one_ptid.
12141
12142 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12143
12144         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12145
12146 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12147
12148         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12149         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12150         (bfin_pseudo_register_write): Likewise
12151
12152 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12153
12154         * common/ptid.h (struct ptid): Change to...
12155         (class ptid_t): ... this.
12156         <ptid_t>: New constructors.
12157         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12158         matches>: New methods.
12159         <make_null, make_minus_one>: New static methods.
12160         <pid>: Rename to...
12161         <m_pid>: ...this.
12162         <lwp>: Rename to...
12163         <m_lwp>: ...this.
12164         <tid>: Rename to...
12165         <m_tid>: ...this.
12166         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12167         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12168         as references, move comment to class ptid_t.
12169         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12170         ptid_t static methods.
12171         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12172         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12173         Take ptid arguments as references, implement using ptid_t methods.
12174         * unittests/ptid-selftests.c: New file.
12175         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12176         unittests/ptid-selftests.c.
12177         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12178
12179 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12180
12181         * python/python.c (python_run_simple_file): Cast mode literal to
12182         non-const char pointer as expected by PyFile_FromString.
12183
12184 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12185
12186         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12187         minus_one_ptid and null_ptid.
12188
12189 2017-04-05  Pedro Alves  <palves@redhat.com>
12190
12191         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12192         * configure: Regenerate.
12193
12194 2017-04-05  Pedro Alves  <palves@redhat.com>
12195
12196         * ada-exp.y (yyerror): Constify.
12197         * ada-lang.c (bound_name, get_selections)
12198         (ada_variant_discrim_type)
12199         (ada_variant_discrim_name, ada_value_struct_elt)
12200         (ada_lookup_struct_elt_type, is_unchecked_variant)
12201         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12202         (catch_ada_exception_command_split)
12203         (catch_ada_assert_command_split, catch_assert_command)
12204         (ada_op_name): Constify.
12205         * ada-lang.h (ada_yyerror, get_selections)
12206         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12207         * arc-tdep.c (arc_print_frame_cache): Constify.
12208         * arm-tdep.c (arm_skip_stub): Constify.
12209         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12210         (gen_aggregate_elt_ref): Constify.
12211         * bcache.c (print_bcache_statistics): Constify.
12212         * bcache.h (print_bcache_statistics): Constify.
12213         * break-catch-throw.c (catch_exception_command_1):
12214         * breakpoint.c (struct ep_type_description::description):
12215         Constify.
12216         (add_solib_catchpoint): Constify.
12217         (catch_fork_command_1): Add cast.
12218         (add_catch_command): Constify.
12219         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12220         Constify.
12221         * bsd-uthread.c (bsd_uthread_state): Constify.
12222         * buildsym.c (patch_subfile_names): Constify.
12223         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12224         Constify.
12225         * c-exp.y (yyerror): Constify.
12226         (token::oper): Constify.
12227         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12228         * c-varobj.c (cplus_describe_child): Constify.
12229         * charset.c (find_charset_names): Add cast.
12230         (find_charset_names): Constify array and add const_cast.
12231         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12232         (edit_command): Constify.
12233         * cli/cli-decode.c (lookup_cmd): Constify.
12234         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12235         Constify.
12236         (struct dump_context): Constify.
12237         (add_dump_command, restore_command): Constify.
12238         * cli/cli-script.c (get_command_line): Constify.
12239         * cli/cli-script.h (get_command_line): Constify.
12240         * cli/cli-utils.c (check_for_argument): Constify.
12241         * cli/cli-utils.h (check_for_argument): Constify.
12242         * coff-pe-read.c (struct read_pe_section_data): Constify.
12243         * command.h (lookup_cmd): Constify.
12244         * common/print-utils.c (decimal2str): Constify.
12245         * completer.c (gdb_print_filename): Constify.
12246         * corefile.c (set_gnutarget): Constify.
12247         * cp-name-parser.y (yyerror): Constify.
12248         * cp-valprint.c (cp_print_class_member): Constify.
12249         * cris-tdep.c (cris_register_name, crisv32_register_name):
12250         Constify.
12251         * d-exp.y (yyerror): Constify.
12252         (struct token::oper): Constify.
12253         * d-lang.h (d_yyerror): Constify.
12254         * dbxread.c (struct header_file_location::name): Constify.
12255         (add_old_header_file, add_new_header_file, last_function_name)
12256         (dbx_next_symbol_text, add_bincl_to_list)
12257         (find_corresponding_bincl_psymtab, set_namestring)
12258         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12259         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12260         * defs.h (command_line_input, print_address_symbolic)
12261         (deprecated_readline_begin_hook): Constify.
12262         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12263         Constify.
12264         * event-top.c (handle_line_of_input): Constify and add cast.
12265         * exceptions.c (catch_errors): Constify.
12266         * exceptions.h (catch_errors): Constify.
12267         * expprint.c (print_subexp_standard, op_string, op_name)
12268         (op_name_standard, dump_raw_expression, dump_raw_expression):
12269         * expression.h (op_name, op_string, dump_raw_expression):
12270         Constify.
12271         * f-exp.y (yyerror): Constify.
12272         (struct token::oper): Constify.
12273         (struct f77_boolean_val::name): Constify.
12274         * f-lang.c (f_word_break_characters): Constify.
12275         * f-lang.h (f_yyerror): Constify.
12276         * fork-child.c (fork_inferior): Add cast.
12277         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12278         (new_variant): Constify.
12279         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12280         * gdbarch.c: Regenerate.
12281         * gdbcore.h (set_gnutarget): Constify.
12282         * go-exp.y (yyerror): Constify.
12283         (token::oper): Constify.
12284         * go-lang.h (go_yyerror): Constify.
12285         * go32-nat.c (go32_sysinfo): Constify.
12286         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12287         * guile/scm-cmd.c (cmdscm_function): Constify.
12288         * guile/scm-param.c (pascm_param_value): Constify.
12289         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12290         (h8300sx_register_name): Constify.
12291         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12292         Constify.
12293         * ia64-tdep.c (ia64_register_names): Constify.
12294         * infcmd.c (construct_inferior_arguments): Constify.
12295         (path_command, attach_post_wait): Constify.
12296         * language.c (show_range_command, show_case_command)
12297         (unk_lang_error): Constify.
12298         * language.h (language_defn::la_error)
12299         (language_defn::la_name_of_this): Constify.
12300         * linespec.c (decode_line_2): Constify.
12301         * linux-thread-db.c (thread_db_err_str): Constify.
12302         * lm32-tdep.c (lm32_register_name): Constify.
12303         * m2-exp.y (yyerror): Constify.
12304         * m2-lang.h (m2_yyerror): Constify.
12305         * m32r-tdep.c (m32r_register_names): Constify and make static.
12306         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12307         * m88k-tdep.c (m88k_register_name): Constify.
12308         * macroexp.c (appendmem): Constify.
12309         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12310         (upgrade_type, parse_external, parse_partial_symbols)
12311         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12312         (new_symbol): Constify.
12313         * memattr.c (mem_info_command): Constify.
12314         * mep-tdep.c (register_name_from_keyword): Constify.
12315         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12316         Constify.
12317         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12318         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12319         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12320         cast.
12321         (mi_execute_async_cli_command): Constify.
12322         * mips-tdep.c (mips_register_name): Constify.
12323         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12324         (am33_register_name, am33_2_register_name)
12325         * moxie-tdep.c (moxie_register_names): Constify.
12326         * nat/linux-osdata.c (osdata_type): Constify fields.
12327         * nto-tdep.c (nto_parse_redirection): Constify.
12328         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12329         (lookup_child_selector): Constify.
12330         (objc_methcall::name): Constify.
12331         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12332         (lookup_struct_typedef): Constify.
12333         * objfiles.c (pc_in_section): Constify.
12334         * objfiles.h (pc_in_section): Constify.
12335         * p-exp.y (struct token::oper): Constify.
12336         (yyerror): Constify.
12337         * p-lang.h (pascal_yyerror): Constify.
12338         * parser-defs.h (op_name_standard): Constify.
12339         (op_print::string): Constify.
12340         (exp_descriptor::op_name): Constify.
12341         * printcmd.c (print_address_symbolic): Constify.
12342         * psymtab.c (print_partial_symbols): Constify.
12343         * python/py-breakpoint.c (stop_func): Constify.
12344         (bppy_get_expression): Constify.
12345         * python/py-cmd.c (cmdpy_completer::name): Constify.
12346         (cmdpy_function): Constify.
12347         * python/py-event.c (evpy_add_attribute)
12348         (gdbpy_initialize_event_generic): Constify.
12349         * python/py-event.h (evpy_add_attribute)
12350         (gdbpy_initialize_event_generic): Constify.
12351         * python/py-evts.c (add_new_registry): Constify.
12352         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12353         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12354         * python/py-inferior.c (get_buffer): Add cast.
12355         * python/py-param.c (parm_constant::name): Constify.
12356         * python/py-unwind.c (fprint_frame_id): Constify.
12357         * python/python.c (gdbpy_parameter_value): Constify.
12358         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12359         * remote.c (memory_packet_config::name): Constify.
12360         (show_packet_config_cmd, remote_write_bytes)
12361         (remote_buffer_add_string):
12362         * reverse.c (exec_reverse_once): Constify.
12363         * rs6000-tdep.c (variant::name, variant::description): Constify.
12364         * rust-exp.y (rustyyerror): Constify.
12365         * rust-lang.c (rust_op_name): Constify.
12366         * rust-lang.h (rustyyerror): Constify.
12367         * serial.h (serial_ops::name): Constify.
12368         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12369         (sh_sh3e_register_name, sh_sh2e_register_name)
12370         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12371         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12372         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12373         (sh_sh4al_dsp_register_name): Constify.
12374         * sh64-tdep.c (sh64_register_name): Constify.
12375         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12376         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12377         * stabsread.c (patch_block_stabs, read_type_number)
12378         (ref_map::stabs, ref_add, process_reference)
12379         (symbol_reference_defined, define_symbol, define_symbol)
12380         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12381         (read_one_struct_field, read_struct_fields, read_baseclasses)
12382         (read_tilde_fields, read_struct_type, read_array_type)
12383         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12384         (read_huge_number, read_range_type, read_args, common_block_start)
12385         (find_name_end): Constify.
12386         * stabsread.h (common_block_start, define_symbol)
12387         (process_one_symbol, symbol_reference_defined, ref_add):
12388         * symfile.c (get_section_index, add_symbol_file_command):
12389         * symfile.h (get_section_index): Constify.
12390         * target-descriptions.c (tdesc_type::name): Constify.
12391         (tdesc_free_type): Add cast.
12392         * target.c (find_default_run_target):
12393         (add_deprecated_target_alias, find_default_run_target)
12394         (target_announce_detach): Constify.
12395         (do_option): Constify.
12396         * target.h (add_deprecated_target_alias): Constify.
12397         * thread.c (print_thread_info_1): Constify.
12398         * top.c (deprecated_readline_begin_hook, command_line_input):
12399         Constify.
12400         (init_main): Add casts.
12401         * top.h (handle_line_of_input): Constify.
12402         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12403         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12404         (tfind_command): Rename to ...
12405         (tfind_command_1): ... this and constify.
12406         (tfind_command): New function.
12407         (tfind_end_command, tfind_start_command): Adjust.
12408         (encode_source_string): Constify.
12409         * tracepoint.h (encode_source_string): Constify.
12410         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12411         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12412         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12413         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12414         * tui/tui-win.c (parse_scrolling_args): Constify.
12415         * tui/tui-windata.c (tui_erase_data_content): Constify.
12416         * tui/tui-windata.h (tui_erase_data_content): Constify.
12417         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12418         * tui/tui.c (tui_enable): Add cast.
12419         * utils.c (defaulted_query): Constify.
12420         (init_page_info): Add cast.
12421         (puts_debug, subset_compare): Constify.
12422         * utils.h (subset_compare): Constify.
12423         * varobj.c (varobj_format_string): Constify.
12424         * varobj.h (varobj_format_string): Constify.
12425         * vax-tdep.c (vax_register_name): Constify.
12426         * windows-nat.c (windows_detach): Constify.
12427         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12428         * xml-support.c (gdb_xml_end_element): Constify.
12429         * xml-tdesc.c (tdesc_start_reg): Constify.
12430         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12431         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12432         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12433
12434 2017-04-05  Pedro Alves  <palves@redhat.com>
12435
12436         * proc-api.c (struct trans): Constify.
12437         (procfs_note): Constify.
12438         * proc-events.c (struct trans, syscall_table):
12439         * proc-flags.c (struct trans): Constify.
12440         * proc-utils.h (procfs_note): Constify.
12441         * proc-why.c (struct trans): Constify.
12442         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12443         (procfs_detach): Constify.
12444         * sol-thread.c (struct string_map): Constify.
12445         (td_err_string, td_state_string): Constify.
12446
12447 2017-04-05  Pedro Alves  <palves@redhat.com>
12448
12449         * proc-api.c (procfs_filename): Don't initialize
12450         procfs_filename.
12451         (prepare_to_trace): Assume procfs_filename is non-NULL.
12452         (_initialize_proc_api): Give procfs_filename a default value here.
12453
12454 2017-04-05  Pedro Alves  <palves@redhat.com>
12455
12456         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12457         'cond_string' parameter.
12458         (extract_exception_regexp): Constify 'string' parameter.
12459         (catch_exception_command_1): Constify.
12460         * breakpoint.c (init_catchpoint)
12461         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12462         parameter.
12463         (ep_parse_optional_if_clause, catch_fork_command_1)
12464         (catch_exec_command_1): Constify.
12465         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12466         parameter.
12467         (ep_parse_optional_if_clause): Constify.
12468         * cli/cli-utils.c (remove_trailing_whitespace)
12469         (check_for_argument): Constify.
12470         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12471         non-const overload.
12472         (check_for_argument): Likewise.
12473
12474 2017-04-05  Pedro Alves  <palves@redhat.com>
12475
12476         * event-top.c (command_line_handler): Add cast to execute_command
12477         call.
12478         * record-btrace.c (cmd_record_btrace_bts_start)
12479         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12480         (cmd_record_btrace_start): Add cast to execute_command call.
12481         * record-full.c (record_full_goto_insn):
12482         * record.c (record_start, record_stop): Add cast to
12483         execute_command_to_string calls.
12484         (cmd_record_start): Add cast to execute_command calls.
12485
12486 2017-04-05  Pedro Alves  <palves@redhat.com>
12487
12488         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12489         static inline function.
12490         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12491         array and use gdb_PyArg_ParseTupleAndKeywords.
12492         * python/py-cmd.c (cmdpy_init): Likewise.
12493         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12494         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12495         (infpy_search_memory): Likewise.
12496         * python/py-objfile.c (objfpy_add_separate_debug_file)
12497         (gdbpy_lookup_objfile): Likewise.
12498         * python/py-symbol.c (gdbpy_lookup_symbol)
12499         (gdbpy_lookup_global_symbol): Likewise.
12500         * python/py-type.c (gdbpy_lookup_type): Likewise.
12501         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12502         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12503         Likewise.
12504
12505 2017-04-05  Pedro Alves  <palves@redhat.com>
12506
12507         * python/python-internal.h (gdb_PyGetSetDef): New type.
12508         * python/py-block.c (block_object_getset)
12509         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12510         * python/py-event.c (event_object_getset)
12511         (finish_breakpoint_object_getset): Likewise.
12512         * python/py-inferior.c (inferior_object_getset): Likewise.
12513         * python/py-infthread.c (thread_object_getset): Likewise.
12514         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12515         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12516         * python/py-objfile.c (objfile_getset): Likewise.
12517         * python/py-progspace.c (pspace_getset): Likewise.
12518         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12519         Likewise.
12520         * python/py-record.c (recpy_record_getset): Likewise.
12521         * python/py-symbol.c (symbol_object_getset): Likewise.
12522         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12523         Likewise.
12524         * python/py-type.c (type_object_getset, field_object_getset):
12525         Likewise.
12526         * python/py-value.c (value_object_getset): Likewise.
12527
12528 2017-04-05  Pedro Alves  <palves@redhat.com>
12529
12530         * python/python-internal.h (gdb_PyObject_CallMethod)
12531         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12532         New functions.
12533         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12534         (PySys_GetObject, PySys_SetPath): New macros.
12535
12536 2017-04-05  Pedro Alves  <palves@redhat.com>
12537
12538         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12539         info_osdata_command.
12540         * osdata.c (info_osdata_command): Rename to ...
12541         (info_osdata): ... this.  Constify 'type' parameter, and remove
12542         the 'from_tty' parameter.  Accept NULL TYPE.
12543         (info_osdata_command): New function.
12544         * osdata.h (info_osdata_command): Remove declaration.
12545         (info_osdata): New declaration.
12546
12547 2017-04-05  Pedro Alves  <palves@redhat.com>
12548
12549         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12550         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12551         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12552         parameter.
12553         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12554         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12555         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12556         parameter.
12557         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12558         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12559         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12560         (mi_cmd_file_list_exec_source_files)
12561         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12562         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12563         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12564         parameter.
12565         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12566         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12567         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12568         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12569         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12570         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12571         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12572         'command' parameter.
12573         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12574         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12575         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12576         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12577         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12578         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12579         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12580         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12581         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12582         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12583         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12584         parameter.
12585         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12586         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12587         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12588         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12589         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12590         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12591         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12592         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12593         (mi_cmd_data_list_changed_registers)
12594         (mi_cmd_data_write_register_values)
12595         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12596         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12597         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12598         (mi_cmd_list_features, mi_cmd_list_target_features)
12599         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12600         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12601         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12602         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12603         (mi_cmd_trace_frame_collected): Constify 'command'
12604         parameter.
12605         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12606         'command' parameter.
12607
12608 2017-04-05  Pedro Alves  <palves@redhat.com>
12609
12610         * ada-lang.c (ada_completer_word_break_characters): Now a const
12611         array.
12612         (ada_get_gdb_completer_word_break_characters): Constify.
12613         * completer.c (gdb_completer_command_word_break_characters)
12614         (gdb_completer_file_name_break_characters)
12615         (gdb_completer_quote_characters): Now const arrays.
12616         (get_gdb_completer_quote_characters): Constify.
12617         (set_rl_completer_word_break_characters): New function.
12618         (set_gdb_completion_word_break_characters)
12619         (complete_line_internal): Use it.
12620         * completer.h (get_gdb_completer_quote_characters): Constify.
12621         (set_rl_completer_word_break_characters): Declare.
12622         * f-lang.c (f_word_break_characters): Constify.
12623         * language.c (default_word_break_characters): Constify.
12624         * language.h (language_defn::la_word_break_characters): Constify.
12625         (default_word_break_characters): Constify.
12626         * top.c (init_main): Use set_rl_completer_word_break_characters.
12627
12628 2017-04-05  Pedro Alves  <palves@redhat.com>
12629
12630         * aix-thread.c (aix_thread_pid_to_str)
12631         (aix_thread_extra_thread_info): Constify.
12632         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12633         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12634         (bsd_uthread_pid_to_str): Constify.
12635         * corelow.c (core_pid_to_str): Constify.
12636         * darwin-nat.c (darwin_pid_to_str): Constify.
12637         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12638         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12639         Constify.
12640         * gnu-nat.c (gnu_pid_to_str): Constify.
12641         * go32-nat.c (go32_pid_to_str): Constify.
12642         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12643         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12644         * inferior.c (inferior_pid_to_str): Constify.
12645         * linux-nat.c (linux_nat_pid_to_str): Constify.
12646         * linux-tdep.c (linux_core_pid_to_str): Constify.
12647         * linux-thread-db.c (thread_db_pid_to_str)
12648         (thread_db_extra_thread_info): Constify.
12649         * nto-tdep.c (nto_extra_thread_info): Constify.
12650         * nto-tdep.h (nto_extra_thread_info): Constify.
12651         * obsd-nat.c (obsd_pid_to_str): Constify.
12652         * procfs.c (procfs_pid_to_str): Constify.
12653         * ravenscar-thread.c (ravenscar_extra_thread_info)
12654         (ravenscar_pid_to_str): Constify.
12655         * remote-sim.c (gdbsim_pid_to_str): Constify.
12656         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12657         Constify.
12658         * sol-thread.c (solaris_pid_to_str): Constify.
12659         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12660         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12661         * target.c (default_pid_to_str, target_pid_to_str)
12662         (normal_pid_to_str, default_pid_to_str): Constify.
12663         * target.h (target_ops::to_pid_to_str)
12664         (target_ops::to_extra_thread_info): Constify.
12665         (target_pid_to_str, normal_pid_to_str): Constify.
12666         * windows-nat.c (windows_pid_to_str): Constify.
12667         * gdbarch.sh (core_pid_to_str): Constify.
12668         * target-delegates.c: Regenerate.
12669         * gdbarch.h, gdbarch.c: Regenerate.
12670
12671 2017-04-05  Pedro Alves  <palves@redhat.com>
12672
12673         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12674         the memory of the temporary warning_pre_print override.
12675         * utils.c (warning_pre_print): Constify.
12676         * utils.h (warning_pre_print): Constify.
12677
12678 2017-04-05  Pedro Alves  <palves@redhat.com>
12679
12680         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12681         (shell_command): New function.
12682         (make_command): Use std::string.
12683         (init_cli_cmds): Register shell_command instead of shell_escape.
12684
12685 2017-04-05  Pedro Alves  <palves@redhat.com>
12686
12687         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12688         * tracepoint.c (default_collect): Don't initialize.
12689
12690 2017-04-05  Pedro Alves  <palves@redhat.com>
12691
12692         * macroexp.c (macro_buffer::shared): Now a bool.
12693         (init_buffer): Update.
12694         (init_shared_buffer): Constify 'addr' parameter.
12695         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12696         casts.
12697
12698 2017-04-05  Pedro Alves  <palves@redhat.com>
12699
12700         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12701         * disasm.c (set_disassembler_options): Constify local.
12702         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12703
12704 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12705
12706         PR gdb/21352
12707         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12708         option.
12709
12710 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12711
12712         * frame.c (frame_unwind_register_unsigned): Call
12713         frame_unwind_register_value.
12714
12715 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12716
12717         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12718         Use gdb_test_multiple, and don't match anchor.
12719
12720 2017-04-05  Pedro Alves  <palves@redhat.com>
12721
12722         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12723         (Write After Approval): Remove Simon Marchi.
12724
12725 2017-04-05  Pedro Alves  <palves@redhat.com>
12726
12727         * common/gdb_optional.h (optional::optional): Make constexpr and
12728         initialize m_dummy.
12729
12730 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12731
12732         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12733         (amd64fbsd_jmp_buf_reg_offset): Remove.
12734         (amd64fbsd_supply_uthread): Remove function.
12735         (amd64fbsd_collect_uthread): Remove function.
12736         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12737         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12738         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12739         (fbsd-nat.c): Update comment.
12740         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12741         (i386fbsd_jmp_buf_reg_offset): Remove.
12742         (i386fbsd_supply_uthread): Remove function.
12743         (i386fbsd_collect_uthread): Remove function.
12744         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12745
12746 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12747
12748         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12749         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12750         * NEWS: Mention that support for FreeBSD/alpha was removed.
12751         * alpha-fbsd-tdep.c: Delete file.
12752         * config/alpha/fbsd.mh: Delete file.
12753         * configure.host: Delete alpha*-*-freebsd* and
12754         alpha*-*-kfreebsd*-gnu.
12755         * configure.tgt: Delete alpha*-*-freebsd* and
12756         alpha*-*-kfreebsd*-gnu.
12757
12758 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12759
12760         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12761         amd64bsd_store_inferior_registers): Use ptid from regcache.
12762
12763 2017-04-04  Pedro Alves  <palves@redhat.com>
12764
12765         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12766         data fields, make them private and add "m_" prefixes.
12767         (lnp_state_machine::lnp_state_machine): New ctor.
12768         (record_line, check_line_address, handle_set_discriminator)
12769         (handle_set_address, handle_advance_pc, handle_special_opcode)
12770         (handle_advance_line, handle_set_file, handle_negate_stmt)
12771         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12772         (end_sequence, advance_line): New methods.
12773         (m_gdbarch, m_record_lines_p): New fields.
12774         (lnp_reader_state): Delete.
12775         (dwarf_record_line): Rename to ...
12776         (lnp_state_machine::record_line): ... adjust.
12777         (init_lnp_state_machine): Delete.
12778         (lnp_state_machine::lnp_state_machine): New.
12779         (check_line_address): Rename to ...
12780         (lnp_state_machine::check_line_address): This.
12781         (dwarf_decode_lines_1): Remove reference to "reader_state".
12782         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12783         State machine internal state manipulation moved to
12784         lnp_state_machine methods.
12785
12786 2017-04-04  Pedro Alves  <palves@redhat.com>
12787
12788         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12789         unittests/offset-type-selftests.c.
12790         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12791         * common/offset-type.h: New file.
12792         * common/preprocessor.h: New file.
12793         * common/traits.h: New file.
12794         * common/valid-expr.h: New file.
12795         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12796         sect_offset and cu_offset strong typedefs throughout.
12797         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12798         typedefs throughout.
12799         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12800         sect_offset and cu_offset strong typedefs throughout.
12801         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12802         typedefs throughout.
12803         * gdbtypes.h: Include "common/offset-type.h".
12804         (cu_offset): Now an offset type (strong typedef) instead of a
12805         struct.
12806         (sect_offset): Likewise.
12807         (union call_site_parameter_u): Rename "param_offset" field to
12808         "param_cu_off".
12809         * unittests/offset-type-selftests.c: New file.
12810
12811 2017-04-04  Pedro Alves  <palves@redhat.com>
12812
12813         * common/underlying.h: New file.
12814         * dwarf2read.c: Include "common/gdb_optional.h" and
12815         "common/underlying.h".
12816         (dir_index, file_name_index): New types.
12817         (file_entry): Use them.
12818         (file_entry::include): Use to_underlying.
12819         (line_header::add_file_name): Use dir_index.
12820         (read_formatted_entries): Use gdb::optional.  Read form before
12821         writting to file_entry.
12822         (dwarf_decode_line_header): Use dir_index.
12823         (lnp_state_machine::current_file): Use to_underlying.
12824         (lnp_state_machine::file): Change type to file_name_index.
12825         (dwarf_record_line): Use to_underlying.
12826         (init_lnp_state_machine): Use file_name_index.
12827         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12828
12829 2017-04-04  Pedro Alves  <palves@redhat.com>
12830
12831         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12832         operator bool, has_value and get methods.
12833
12834 2017-04-04  Pedro Alves  <palves@redhat.com>
12835
12836         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12837         fields.
12838         (line_header): Initialize all data fields.  Change type of
12839         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12840         Change type of include_dirs to std::vector<const char *>.  Remove
12841         num_include_dirs, include_dirs_size.  Change type of file_names to
12842         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12843         (line_header::line_header): New.
12844         (line_header::add_include_dir, line_header::add_file_name): New
12845         methods.
12846         (line_header::include_dir_at): Remove NULL check.
12847         (line_header::file_name_at): Add const overload.
12848         (line_header_up): New unique_ptr typedef.
12849         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12850         std::vector.  Remove free_line_header call.
12851         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12852         free_line_header call.
12853         (free_cu_line_header): Delete.
12854         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12855         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12856         Adjust to use std::vector.
12857         (free_line_header): Delete.
12858         (free_line_header_voidp): Use delete.
12859         (add_include_dir): Replace with ...
12860         (line_header::add_include_dir): ... this method.  Use std::vector.
12861         (add_file_name): Replace with ...
12862         (line_header::add_file_name): ... this method.  Use std::vector.
12863         (add_include_dir_stub): Delete.
12864         (read_formatted_entries): Remove memset.
12865         (dwarf_decode_line_header): Return a line_header_up instead of a
12866         raw pointer.  Remove cleanup handling.  Pass lambdas to
12867         read_formatted_entries.  Adjust to use line_header methods.
12868         (dwarf_decode_lines_1): Adjust to use line_header methods.
12869         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12870         use std::vector.
12871
12872 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12873
12874         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12875         instead of struct ptid.
12876
12877 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12878
12879         * frame.c (get_frame_register_bytes): Unwind using value.
12880         (put_frame_register_bytes): Likewise.
12881
12882 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12883
12884         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12885         aggregate-like.
12886
12887 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12888
12889         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12890
12891 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12892
12893         * gdbthread.h (struct thread_info): Declare constructor and
12894         destructor.  Add some in-class member initializers.
12895         * thread.c (free_thread): Remove.
12896         (init_thread_list): Call delete instead of free_thread.
12897         (new_thread): Call thread_info constructor.
12898         (thread_info::thread_info): New function.
12899         (thread_info::~thread_info): New function.
12900         (delete_thread_1): Call delete instead of free_thread.
12901         (make_cleanup_restore_current_thread): Move tp and frame to
12902         inner block.
12903
12904 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12905
12906         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12907         (arc_skip_prologue): Likewise.
12908         (arc_make_frame_cache): Likewise.
12909         (arc_pv_get_operand): New function.
12910         (arc_is_in_prologue): Likewise.
12911         (arc_analyze_prologue): Likewise.
12912         (arc_print_frame_cache): Likewise.
12913         (MAX_PROLOGUE_LENGTH): New constant.
12914
12915 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12916
12917         * configure.tgt: Add arc-insn.o.
12918         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12919         (dump_arc_instruction_command): New function.
12920         (arc_fprintf_disasm): Likewise.
12921         (arc_disassemble_info): Likewise.
12922         (arc_insn_get_operand_value): Likewise.
12923         (arc_insn_get_operand_value_signed): Likewise.
12924         (arc_insn_get_memory_base_reg): Likewise.
12925         (arc_insn_get_memory_offset): Likewise.
12926         (arc_insn_get_branch_target): Likewise.
12927         (arc_insn_dump): Likewise.
12928         (arc_insn_get_linear_next_pc): Likewise.
12929         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12930         (arc_disassemble_info): Likewise.
12931         (arc_insn_get_branch_target): Likewise.
12932         (arc_insn_get_linear_next_pc): Likewise.
12933         * NEWS: Mention new "maint print arc arc-instruction".
12934
12935 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12936
12937         * arc-tdep (maintenance_print_arc_list): New variable.
12938         (maintenance_print_arc_command): New function.
12939
12940 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12941
12942         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12943         Add "limm" and "reserved".
12944         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12945         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12946         * arc-tdep.h (arc_regnum): Likewise.
12947
12948 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12949
12950         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12951         for THREADPTR register.
12952         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12953         register.
12954         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12955         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12956         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12957
12958 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12959
12960         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12961         registers above gdbarch_num_regs (gdbarch) as privileged in
12962         call0 ABI.
12963
12964 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12965
12966         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12967         for a single specified register or for all registers in
12968         a0_base..a0_base + C0_NREGS range.
12969         (supply_gregset_reg): Call regcache_raw_supply for a single
12970         specified register or for all registers in a0_base..a0_base +
12971         C0_NREGS range.
12972
12973 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12974
12975         * arch/xtensa.h (C0_NREGS): Add definition.
12976         * xtensa-tdep.c (C0_NREGS): Remove definition.
12977
12978 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12979
12980         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12981         Drop xtensa_default_isa initialization.
12982         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12983
12984 2017-03-27  Pedro Alves  <palves@redhat.com>
12985
12986         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12987         (file_entry::include_dir): New method.
12988         (line_header::include_dir_at, line_header::file_name_at): New
12989         methods.
12990         (setup_type_unit_groups, setup_type_unit_groups)
12991         (psymtab_include_file_name): Simplify using the new methods.
12992         (lnp_state_machine) <the_line_header>: New field.
12993         <file>: Add comment.
12994         (lnp_state_machine::current_file): New method.
12995         (dwarf_record_line): Simplify using the new methods.
12996         (init_lnp_state_machine): Initialize the "the_line_header" field.
12997         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12998         Simplify using the new methods.
12999
13000 2017-03-27  Pedro Alves  <palves@redhat.com>
13001
13002         * cp-name-parser.y (make_empty): Delete.
13003         (demangler_special, nested_name, ptr_operator, array_indicator)
13004         (direct_declarator, declarator_1): Use fill_comp instead of
13005         make_empty.
13006
13007 2017-03-27  Pedro Alves  <palves@redhat.com>
13008
13009         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13010         to ATTRIBUTE_PRINTF.
13011         * solib-target.c (library_list_start_list): Print "string" not
13012         "version".
13013         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13014         gdb_xml_error call.
13015
13016 2017-03-27  Pedro Alves  <palves@redhat.com>
13017
13018         * dwarf2read.c (struct file_and_directory): New.
13019         (dwarf2_get_dwz_file): Adjust to use std::string.
13020         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13021         (find_file_and_directory): Adjust to return a file_and_directory
13022         object.
13023         (read_file_scope): Adjust to use file_and_directory.  Remove
13024         make_cleanup/do_cleanups calls.
13025         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13026         make_cleanup/do_cleanups calls.
13027         * python/python.c (do_start_initialization): Adjust to ldirname
13028         returning a std::string.
13029         * utils.c (ldirname): Now returns a std::string.
13030         * utils.h (ldirname): Change return type to std::string.
13031         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13032         returning a std::string.
13033         * xml-tdesc.c (file_read_description_xml): Likewise.
13034
13035 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13036
13037         * regcache.c (regcache_debug_print_register): New function.
13038         * regcache.h (regcache_debug_print_register): New declaration.
13039         * target.c (debug_print_register): Remove.
13040         (target_fetch_registers): Call regcache_debug_print_register.
13041         (target_store_registers): Likewise.
13042
13043 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13044
13045         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13046         reference beyond the 'lh->include_dirs' array before accessing to
13047         it.
13048         (psymtab_include_file_name): Likewise.
13049         (dwarf_decode_lines_1): Likewise.
13050         (dwarf_decode_lines): Likewise.
13051         (file_file_name): Likewise.
13052
13053 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13054
13055         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13056         inferior_ptid.
13057         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13058         ps_lsetfpregs): Likewise.
13059         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13060         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13061         ps_lsetfpregs): Likewise.
13062         * target.c (target_fetch_registers, target_store_registers):
13063         Remove asserts.
13064
13065 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13066
13067         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13068
13069 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13070
13071         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13072         (_initialize_aarch64_tdep): Register it.
13073         (aarch64_record_load_store): Handle PRFM instruction.
13074         (aarch64_process_record_test): New function.
13075
13076 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13077
13078         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13079         indentation.
13080
13081 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13082
13083         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13084
13085 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13086
13087         python/python.c (do_start_initialization): Fix memory leak.
13088
13089 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13090
13091         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13092         using get_ptrace_pid.
13093         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13094         inferior_ptid.
13095         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13096         inferior_ptid instead of pid.
13097
13098 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13099
13100         * aarch64-tdep.c: Wrap locally used classes in anonymous
13101         namespace.
13102         * arm-tdep.c: Likewise.
13103         * linespec.c: Likewise.
13104         * ui-out.c: Likewise.
13105
13106 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13107
13108         PR gdb/19637
13109         * python/lib/gdb/printer/bound_registers.py: Import sys.
13110
13111 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13112
13113         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13114         windows_thread_info parameter and use it instead of
13115         current_thread.
13116         (windows_fetch_inferior_registers): Don't set current_thread,
13117         pass the thread to do_windows_fetch_inferior_registers.  Use
13118         ptid from regcache instead of inferior_ptid.
13119         (do_windows_store_inferior_registers): Add windows_thread_info
13120         parameter and use it instead of current_thread.
13121         (windows_store_inferior_registers): Don't set current_thread,
13122         pass the thread to do_windows_store_inferior_registers.  Use
13123         ptid from regcache instead of inferior_ptid.
13124
13125 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13126
13127         * ser-mingw.c (ser_windows_raw): Remove reference to
13128         struct serial::current_timeout.
13129
13130 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13131
13132         PR tdep/20928
13133         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13134         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13135         (sparc64_fsr_type): Fix %fsr decoding.
13136
13137 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13138
13139         * python/py-record-btrace.c (btpy_insn_data): Change return type
13140         for Python 2.
13141
13142 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13143
13144         * spu-linux-nat.c (spu_fetch_inferior_registers,
13145         spu_store_inferior_registers): Use ptid from regcache, set and
13146         restore inferior_ptid.
13147         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13148         Likewise.
13149
13150 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13151
13152         * i386-linux-nat.c (fetch_register, store_register,
13153         i386_linux_fetch_inferior_registers,
13154         i386_linux_store_inferior_registers): Use ptid from regcache.
13155         * ia64-linux-nat.c (ia64_linux_fetch_register,
13156         ia64_linux_store_register): Likewise.
13157         * inf-ptrace.c (inf_ptrace_fetch_register,
13158         inf_ptrace_store_register): Likewise.
13159         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13160         m32r_linux_store_inferior_registers): Likewise.
13161         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13162         m68kbsd_store_inferior_registers): Likewise.
13163         * m68k-linux-nat.c (fetch_register, store_register,
13164         m68k_linux_fetch_inferior_registers,
13165         m68k_linux_store_inferior_registers): Likewise.
13166         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13167         m88kbsd_store_inferior_registers): Likewise.
13168         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13169         mips_fbsd_store_inferior_registers): Likewise.
13170         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13171         mips64_linux_regsets_store_registers): Likewise.
13172         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13173         mipsnbsd_store_inferior_registers): Likewise.
13174         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13175         mips64obsd_store_inferior_registers): Likewise.
13176         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13177         Likewise.
13178         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13179         ppcfbsd_store_inferior_registers): Likewise.
13180         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13181         ppc_linux_store_inferior_registers): Likewise.
13182         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13183         ppcnbsd_store_inferior_registers): Likewise.
13184         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13185         ppcobsd_store_registers): Likewise.
13186         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13187         Likewise.
13188         * ravenscar-thread.c (ravenscar_fetch_registers,
13189         ravenscar_store_registers, ravenscar_prepare_to_store):
13190         Likewise.
13191         * record-btrace.c (record_btrace_fetch_registers,
13192         record_btrace_store_registers, record_btrace_prepare_to_store):
13193         Likewise.
13194         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13195         Lookup inferior using ptid from regcache, instead of
13196         current_inferior.
13197         * remote.c (remote_fetch_registers, remote_store_registers): Use
13198         ptid from regcache.
13199         * rs6000-nat.c (fetch_register, store_register): Likewise.
13200         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13201         s390_linux_store_inferior_registers): Likewise.
13202         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13203         shnbsd_store_inferior_registers): Likewise.
13204         * sol-thread.c (sol_thread_fetch_registers,
13205         sol_thread_store_registers): Likewise.
13206         * sparc-nat.c (sparc_fetch_inferior_registers,
13207         sparc_store_inferior_registers): Likewise.
13208         * tilegx-linux-nat.c (fetch_inferior_registers,
13209         store_inferior_registers): Likewise.
13210         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13211         vaxbsd_store_inferior_registers): Likewise.
13212         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13213         store_xtregs): Likewise.
13214
13215 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13216
13217         PR gdb/14441
13218         * NEWS: Mention support for rvalue references in GDB and python.
13219         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13220         supports both lvalue and rvalue references.
13221
13222 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13223
13224         PR gdb/14441
13225         * gdbtypes.c (rank_one_type): Implement overloading
13226         resolution rules regarding rvalue references.
13227
13228 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13229
13230         PR gdb/14441
13231         * aarch64-tdep.c (aarch64_type_align)
13232         (aarch64_extract_return_value, aarch64_store_return_value): Change
13233         lvalue reference type checks to general reference type checks.
13234         * amd64-tdep.c (amd64_classify): Likewise.
13235         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13236         Likewise.
13237         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13238         (arm_store_return_value): Likewise.
13239         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13240         * c-typeprint.c (c_print_type): Likewise.
13241         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13242         (cplus_number_of_children, cplus_describe_child): Likewise.
13243         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13244         * completer.c (expression_completer): Likewise.
13245         * cp-support.c (make_symbol_overload_list_adl_namespace):
13246         Likewise.
13247         * darwin-nat-info.c (info_mach_region_command): Likewise.
13248         * dwarf2loc.c (entry_data_value_coerce_ref)
13249         (value_of_dwarf_reg_entry): Likewise.
13250         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13251         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13252         Likewise.
13253         * findvar.c (extract_typed_address, store_typed_address):
13254         Likewise.
13255         * gdbtypes.c (rank_one_type): Likewise.
13256         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13257         * infcall.c (value_arg_coerce): Likewise.
13258         * language.c (pointer_type): Likewise.
13259         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13260         Likewise.
13261         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13262         * mn10300-tdep.c (mn10300_type_align): Likewise.
13263         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13264         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13265         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13266         Likewise.
13267         * printcmd.c (print_formatted, x_command): Likewise.
13268         * python/py-type.c (typy_get_composite, typy_template_argument):
13269         Likewise.
13270         * python/py-value.c (valpy_referenced_value)
13271         (valpy_get_dynamic_type, value_has_field): Likewise.
13272         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13273         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13274         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13275         * spu-tdep.c (spu_scalar_value_p): Likewise.
13276         * symtab.c (lookup_symbol_aux): Likewise.
13277         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13278         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13279         Likewise.
13280         * valops.c (value_cast_pointers, value_cast)
13281         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13282         (value_struct_elt, value_struct_elt_bitpos)
13283         (value_find_oload_method_list, find_overload_match)
13284         (value_rtti_indirect_type): Likewise.
13285         * valprint.c (val_print_scalar_type_p, generic_val_print):
13286         Likewise.
13287         * value.c (value_actual_type, value_as_address, unpack_long)
13288         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13289         (coerce_ref): Likewise.
13290         * varobj.c (varobj_get_value_type): Likewise.
13291
13292 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13293
13294         PR gdb/14441
13295         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13296         table of constants.
13297         * python/lib/gdb/command/explore.py: Support exploring values
13298         of rvalue reference types.
13299         * python/lib/gdb/types.py: Implement get_basic_type() for
13300         rvalue reference types.
13301         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13302         constant.
13303         * python/py-value.c (valpy_getitem): Add an rvalue reference
13304         check.
13305         (valpy_reference_value): Add new parameter "refcode".
13306         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13307         New wrappers for valpy_reference_value().
13308         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13309         (gdbpy_invoke_xmethod): Likewise.
13310
13311 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13312
13313         PR gdb/14441
13314         * dwarf2read.c (process_die, read_type_die_1): Handle the
13315         DW_TAG_rvalue_reference_type DIE.
13316         (read_tag_reference_type): Add new parameter "refcode".
13317
13318 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13319
13320         PR gdb/14441
13321         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13322         (c_type_print_modifier, c_type_print_varspec_suffix)
13323         (c_type_print_base): Support printing rvalue reference types.
13324         * c-valprint.c (c_val_print, c_value_print): Support printing
13325         rvalue reference values.
13326
13327 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13328
13329         PR gdb/14441
13330         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13331         typename.
13332         * cp-support.c (replace_typedefs): Handle
13333         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13334         * python/py-type.c (typy_lookup_type): Likewise.
13335
13336 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13337
13338         PR gdb/14441
13339         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13340         * parse.c (insert_type): Change assert statement.
13341         (follow_types): Handle rvalue reference types.
13342         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13343         constant.
13344
13345 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13346
13347         PR gdb/14441
13348         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13349         value_ref() interface.
13350         * c-valprint.c (c_value_print): Likewise.
13351         * infcall.c (value_arg_coerce): Likewise.
13352         * python/py-value.c (valpy_reference_value): Likewise.
13353         * valops.c (value_cast, value_reinterpret_cast)
13354         (value_dynamic_cast, typecmp): Likewise.
13355         (value_ref): Parameterize by kind of return value reference type.
13356         * value.h (value_ref): Add new parameter "refcode".
13357
13358 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13359
13360         PR gdb/14441
13361         * dwarf2read.c (read_tag_reference_type): Use
13362         lookup_lvalue_reference_type() instead of lookup_reference_type().
13363         * eval.c (evaluate_subexp_standard): Likewise.
13364         * f-exp.y: Likewise.
13365         * gdbtypes.c (make_reference_type, lookup_reference_type):
13366         Generalize with rvalue reference types.
13367         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13368         convenience wrappers for lookup_reference_type().
13369         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13370         reference kind parameter.
13371         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13372         wrappers for lookup_reference_type().
13373         * guile/scm-type.c (gdbscm_type_reference): Use
13374         lookup_lvalue_reference_type() instead of lookup_reference_type().
13375         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13376         * parse.c (follow_types): Likewise.
13377         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13378         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13379         Likewise.
13380         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13381         (gdbpy_invoke_xmethod): Likewise.
13382         * stabsread.c: Provide extra argument to make_reference_type()
13383         call.
13384         * valops.c (value_ref, value_rtti_indirect_type): Use
13385         lookup_lvalue_reference_type() instead of lookup_reference_type().
13386
13387 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13388
13389         PR gdb/14441
13390         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13391         (TYPE_IS_REFERENCE): New macro.
13392         (struct type): Add rvalue_reference_type field.
13393         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13394
13395 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13396
13397         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13398         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13399         New function definition.
13400         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13401         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13402         New function declaration.
13403         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13404         * mi/mi-interp.h: New file.
13405         * solib.c (info_sharedlibrary_command): Replace for loop with
13406         ALL_SO_LIBS macro
13407         * solib.h (update_solib_list): New function declaration.
13408         (so_list_head): Move macro.
13409         * solist.h (ALL_SO_LIBS): New macro.
13410
13411 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13412
13413         * infcmd.c (post_create_inferior): Remove unused argument in
13414         call to solib_add.
13415         * remote.c (remote_start_remote): Likewise.
13416         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13417         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13418         (enable_break): Likewise.
13419         * solib.c (update_solib_list): Remove unused target argument
13420         and its documentation.
13421         (solib_add): Remove unused target argument.  Remove unused
13422         argument in call to update_solib_list.
13423         (info_sharedlibrary_command): Remove unused argument in call
13424         to update_solib_list.
13425         (sharedlibrary_command): Remove unused argument in call to
13426         solib_add.
13427         (handle_solib_event): Likewise.
13428         (reload_shared_libraries): Likewise.
13429         * solib.h (solib_add): Remove unused target argument.
13430
13431 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13432
13433         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13434         (s390_displaced_step_fixup): Cover relative branches with the
13435         default fixup handling.  This fixes lack of support for some
13436         relative branch instructions.
13437
13438 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13439
13440         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13441         ptid from regcache.
13442
13443 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13444
13445         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13446         i386_darwin_store_inferior_registers): Use ptid from regcache.
13447
13448 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13449
13450         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13451         i386bsd_store_inferior_registers): Use ptid from regcache.
13452
13453 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13454
13455         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13456         hppaobsd_store_registers): Use ptid from regcache.
13457
13458 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13459
13460         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13461         hppanbsd_store_registers): Use ptid from regcache.
13462
13463 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13464
13465         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13466         from regcache.  Use get_ptrace_pid.
13467
13468 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13469
13470         * corelow.c (get_core_register_section): Use ptid from regcache,
13471         update doc.
13472
13473 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13474
13475         * bsd-uthread.c (bsd_uthread_fetch_registers,
13476         bsd_uthread_store_registers): Use ptid from regcache, set and
13477         restore inferior_ptid.
13478
13479 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13480
13481         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13482         fetch_fp_regs, store_register, store_regs, store_fp_register,
13483         store_fp_regs): Use ptid from regcache.
13484
13485 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13486
13487         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13488         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13489         store_vfp_regs): Use ptid from regcache.
13490
13491 2017-03-17  Pedro Alves  <palves@redhat.com>
13492
13493         PR remote/21188
13494         * ser-base.c (ser_base_wait_for): Add comment.
13495         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13496         version.
13497         * ser-unix.c (hardwire_raw): Remove reference to
13498         scb->current_timeout.
13499         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13500         (hardwire_ops): Install ser_base_readchar instead of
13501         hardwire_readchar.
13502         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13503         Remove fields.
13504
13505 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13506
13507         PR gdb/19637
13508         * python/lib/gdb/printer/bound_registers.py: Add support for
13509         Python 3.
13510
13511 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13512
13513         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13514         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13515         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13516         byte_offset to subobj_byte_offset.  Fix the handling of
13517         DWARF_VALUE_STACK on big-endian targets when coming via an
13518         implicit pointer.
13519         (dwarf2_evaluate_loc_desc): Adjust call to
13520         dwarf2_evaluate_loc_desc_full.
13521         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13522         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13523
13524 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13525
13526         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13527         and REVSH instructions.
13528
13529 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13530
13531         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13532         (arm_record_test): Declare.
13533         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13534         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13535         align with the manual.
13536         (thumb_record_misc): Adjust the code order to align with the
13537         manual.
13538         (thumb2_record_decode_insn_handler): Fix instruction matching.
13539         (instruction_reader_thumb): New class.
13540         (arm_record_test): New function.
13541
13542 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13543
13544         * arm-tdep.c (abstract_memory_reader): New class.
13545         (instruction_reader): New class.
13546         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13547         (decode_insn): Likewise.
13548
13549 2017-03-16  Doug Evans  <dje@google.com>
13550
13551         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13552         member.  Change type of TYPE member to SCM.  All uses updated.
13553         (lsscm_make_lazy_string_smob): Add assert.
13554         (lsscm_make_lazy_string): Flag bad length values.
13555         (lsscm_elt_type): New function.
13556         (gdbscm_lazy_string_to_value): Rewrite to use
13557         lsscm_safe_lazy_string_to_value.
13558         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13559         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13560         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13561         in incoming type.
13562         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13563         * guile/scm-type.c (tyscm_scm_to_type): New function.
13564
13565 2017-03-15  Doug Evans  <dje@google.com>
13566
13567         PR python/17728, python/18439, python/18779
13568         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13569         member.  Change type of TYPE member to PyObject *.  All uses updated.
13570         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13571         (gdbpy_create_lazy_string_object): Flag bad length values.
13572         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13573         Handle typedefs in incoming type.
13574         (stpy_lazy_string_elt_type): New function.
13575         (gdbpy_extract_lazy_string): Call it.
13576         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13577         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13578         typedefs in incoming type.
13579
13580 2017-03-16  Doug Evans  <dje@google.com>
13581
13582         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13583         * guile/scm-type.c (tyscm_scm_to_type): New function.
13584
13585 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13586
13587         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13588         "ULONGEST" for "skip".
13589
13590 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13591
13592         PR gdb/21220
13593         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13594         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13595         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13596         over ptrace peek/poke until end of buffer or error.
13597
13598 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13599
13600         * parse.c (length_of_subexp): Make static.
13601         * parser-defs.h (length_of_subexp): Remove.
13602
13603 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13604
13605         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13606         as well.
13607
13608 2017-03-14  Pedro Alves  <palves@redhat.com>
13609
13610         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13611         (main): Use std::unique_ptr.  Remove calls to
13612         cp_demangled_name_parse_free.
13613
13614 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13615
13616         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13617         alphabsd_store_inferior_registers): Use regcache->ptid instead
13618         of inferior_ptid.
13619
13620 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13621
13622         * aix-thread.c (aix_thread_fetch_registers,
13623         aix_thread_store_registers): Use regcache->ptid instead of
13624         inferior_ptid.
13625
13626 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13627
13628         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13629         store_gregs_to_thread, fetch_fpregs_from_thread,
13630         store_fpregs_to_thread): Use regcache->ptid instead of
13631         inferior_ptid.
13632
13633 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13634
13635         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13636         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13637         instead of inferior_ptid.
13638
13639 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13640
13641         * target.c (target_fetch_registers, target_store_registers): Add
13642         assert.
13643
13644 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13645
13646         * regcache.h (regcache_get_ptid): New function.
13647         * regcache.c (regcache_get_ptid): New function.
13648
13649 2017-03-13  Mark Wielaard  <mark@klomp.org>
13650
13651         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13652
13653 2017-03-10  Keith Seitz  <keiths@redhat.com>
13654
13655         PR c++/8218
13656         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13657
13658 2017-03-08  Pedro Alves  <palves@redhat.com>
13659
13660         PR gdb/18360
13661         * infrun.c (start_step_over, do_target_resume, resume)
13662         (restart_threads): Assert we're not resuming a thread that is
13663         meant to be stopped.
13664         (infrun_thread_stop_requested_callback): Delete.
13665         (infrun_thread_stop_requested): If the thread is internally
13666         stopped, queue a pending stop event and clear the thread's
13667         inline-frame state.
13668         (handle_stop_requested): New function.
13669         (handle_syscall_event, handle_inferior_event_1): Use
13670         handle_stop_requested.
13671         (handle_stop_requested): New function.
13672         (handle_signal_stop): Set the thread's stop_signal here instead of
13673         at caller.
13674         (finish_step_over): Clear step over info unconditionally.
13675         (handle_signal_stop): If the user had interrupted the event
13676         thread, consider the stop a random signal.
13677         (handle_signal_stop) <signal arrived while stepping over
13678         breakpoint>: Don't restart threads here.
13679         (stop_waiting): Don't clear step-over info here.
13680
13681 2017-03-08  Pedro Alves  <palves@redhat.com>
13682
13683         PR 21206
13684         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13685         goes to argument 2, not 1.
13686
13687 2017-03-08  Pedro Alves  <palves@redhat.com>
13688
13689         PR cli/21218
13690         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13691         display_gdb_prompt.
13692         (command_line_input): Add comment.
13693
13694 2017-03-08  Pedro Alves  <palves@redhat.com>
13695
13696         PR tui/21216
13697         * tui/tui-file.c (tui_file::write): New.
13698         * tui/tui-file.h (tui_file): Override "write".
13699         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13700         factored out from ...
13701         (tui_puts): ... here.
13702         (tui_putc): Use them.
13703         (tui_write): New function.
13704         * tui/tui-io.h (tui_write): Declare.
13705
13706 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13707
13708         * Makefile.in (SFILES): Replace "environ.c" with
13709         "common/environ.c".
13710         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13711         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13712         to...
13713         * common/environ.c: ... here.
13714         * environ.h: Moved to...
13715         * common/environ.h: ... here.
13716
13717 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13718
13719         * gdbarch.sh (pstring_ptr): New static function.
13720         (gdbarch_disassembler_options): Use it.
13721         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13722         not valid_disassembler_option->name.
13723         * gdbarch.c: Regenerate.
13724
13725 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13726
13727         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13728
13729 2017-03-07  Pedro Alves  <palves@redhat.com>
13730
13731         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13732
13733 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13734
13735         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13736         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13737         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13738         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13739
13740 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13741
13742         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13743
13744 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13745
13746         * remote.c (remote_add_target_side_commands): Use range-based
13747         for loop.
13748
13749 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13750
13751         PR gdb/21165
13752         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13753         value is lazy.
13754         * valprint.c (common_val_print): Likewise.
13755
13756 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13757
13758         * NEWS: Mention new set/show disassembler-options commands.
13759         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13760         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13761         (prospective_options): New static variable.
13762         (gdb_disassembler::gdb_disassembler): Initialize
13763         m_di.disassembler_options.
13764         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13765         (get_disassembler_options): New function.
13766         (set_disassembler_options): Likewise.
13767         (set_disassembler_options_sfunc): Likewise.
13768         (show_disassembler_options_sfunc): Likewise.
13769         (disassembler_options_completer): Likewise.
13770         (_initialize_disasm): Likewise.
13771         * disasm.h (get_disassembler_options): New prototype.
13772         (set_disassembler_options): Likewise.
13773         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13774         (gdbarch_verify_disassembler_options): Likewise.
13775         * gdbarch.c: Regenerate.
13776         * gdbarch.h: Likewise.
13777         * arm-tdep.c (num_disassembly_options): Delete.
13778         (set_disassembly_style): Likewise.
13779         (arm_disassembler_options): New static variable.
13780         (set_disassembly_style_sfunc): Convert short style name into long
13781         option name.  Call set_disassembler_options.
13782         (show_disassembly_style_sfunc): New function.
13783         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13784         set_gdbarch_verify_disassembler_options.
13785         (_initialize_arm_tdep): Delete regnames variable and update callers.
13786         (arm_disassembler_options): Initialize.
13787         (disasm_options): New variable.
13788         (num_disassembly_options): Rename from this...
13789         (num_disassembly_styles): ...to this.  Compute by scanning through
13790         disasm_options.
13791         (valid_disassembly_styles): Initialize using disasm_options.
13792         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13793         set_arm_regname_option.
13794         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13795         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13796         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13797         set_gdbarch_verify_disassembler_options.
13798         * s390-tdep.c (s390_disassembler_options): New static variable.
13799         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13800         set_gdbarch_verify_disassembler_options.
13801
13802 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13803
13804         * remote.c (remote_add_target_side_condition): Remove "struct"
13805         keyword from range-based for loop.
13806
13807 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13808
13809         * remote.c (remote_add_target_side_condition): Use range-based
13810         for loop.  Update comment.
13811
13812 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13813
13814         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13815
13816 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13817
13818         * regcache.c (regcache_raw_update): New function.
13819         (regcache_raw_read): Move code to regcache_raw_update.
13820         * regcache.h (regcache_raw_update): New declaration.
13821         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13822
13823 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13824
13825         * dwarf2read.c (create_debug_type_hash_table): Initialize
13826         header.signature and header.type_offset_in_tu.
13827
13828 2017-02-24  Pedro Alves  <palves@redhat.com>
13829
13830         * symtab.c (make_file_symbol_completion_list_1): Use
13831         add_symtab_completions.
13832
13833 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13834
13835         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13836
13837 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13838
13839         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13840         I386_MAX_REGISTER_SIZE.
13841         (i386_pseudo_register_write): Likewise.
13842         (i386_process_record): Likewise.
13843         * i387-tdep.c (i387_supply_xsave): Likewise.
13844         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13845         (store_register): Likewise.
13846
13847 2017-02-23  Pedro Alves  <palves@redhat.com>
13848
13849         * ada-lang.c: Include "common/function-view.h".
13850         (ada_iterate_over_symbols): Adjust to use function_view as
13851         callback type.
13852         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13853         (ada_make_symbol_completion_list): Use a lambda.
13854         (ada_exc_search_name_matches): Delete.
13855         (name_matches_regex): New.
13856         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13857         * compile/compile-c-support.c: Include "common/function-view.h".
13858         (print_one_macro): Change prototype to accept a ui_file pointer.
13859         (write_macro_definitions): Use a lambda.
13860         * dwarf2read.c: Include "common/function-view.h".
13861         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13862         (dw2_expand_symtabs_matching): Adjust to use function_view as
13863         callback type.
13864         * language.h: Include "common/function-view.h".
13865         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13866         function_view as callback type.
13867         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13868         * linespec.c: Include "common/function-view.h".
13869         (collect_info::add_symbol): New method.
13870         (struct symbol_and_data_callback, iterate_inline_only, struct
13871         symbol_matcher_data, iterate_name_matcher): Delete.
13872         (iterate_over_all_matching_symtabs): Adjust to use function_view
13873         as callback type and lambdas.
13874         (iterate_over_file_blocks): Adjust to use function_view as
13875         callback type.
13876         (decode_compound_collector): Now a class with private fields.
13877         (decode_compound_collector::release_symbols): New method.
13878         (collect_one_symbol): Rename to...
13879         (decode_compound_collector::operator()): ... this and adjust.
13880         (lookup_prefix_sym): decode_compound_collector construction bits
13881         move to decode_compound_collector ctor.  Pass the
13882         decode_compound_collector object directly as callback.  Remove
13883         cleanups and use decode_compound_collector::release_symbols
13884         instead.
13885         (symtab_collector): Now a class with private fields.
13886         (symtab_collector::release_symtabs): New method.
13887         (add_symtabs_to_list): Rename to...
13888         (symtab_collector::operator()): ... this and adjust.
13889         (collect_symtabs_from_filename): symtab_collector construction
13890         bits move to symtab_collector ctor.  Pass the symtab_collector
13891         object directly as callback.  Remove cleanups and use
13892         symtab_collector::release_symtabs instead.
13893         (collect_symbols): Delete.
13894         (add_matching_symbols_to_info): Use lambdas.
13895         * macrocmd.c (print_macro_callback): Delete.
13896         (info_macro_command): Use a lambda.
13897         (info_macros_command): Pass print_macro_definition as callable
13898         directly.
13899         (print_one_macro): Remove 'ignore' parameter.
13900         (macro_list_command): Adjust.
13901         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13902         (macro_for_each_data::user_data): Delete field.
13903         (foreach_macro): Adjust to call the function_view.
13904         (macro_for_each): Adjust to use function_view as callback type.
13905         (foreach_macro_in_scope): Adjust to call the function_view.
13906         (macro_for_each_in_scope): Adjust to use function_view as callback
13907         type.
13908         * macrotab.h: Include "common/function-view.h".
13909         (macro_callback_fn): Declare a prototype instead of a pointer.
13910         Remove "user_data" parameter.
13911         (macro_for_each, macro_for_each_in_scope): Adjust to use
13912         function_view as callback type.
13913         * psymtab.c (partial_map_expand_apply)
13914         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13915         Adjust to use function_view as callback type and to return bool.
13916         (psym_expand_symtabs_matching): Adjust to use function_view as
13917         callback types.
13918         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13919         to use function_view as callback type and to return bool.
13920         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13921         callback types.
13922         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13923         as callback types.
13924         * symfile.h: Include "common/function-view.h".
13925         (expand_symtabs_file_matcher_ftype)
13926         (expand_symtabs_symbol_matcher_ftype)
13927         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13928         return bool.
13929         (quick_symbol_functions::map_symtabs_matching_filename)
13930         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13931         function_view as callback type and return bool.
13932         (expand_symtabs_matching): Adjust to use function_view as callback
13933         type.
13934         (maintenance_expand_name_matcher)
13935         (maintenance_expand_file_matcher): Delete.
13936         (maintenance_expand_symtabs): Use lambdas.
13937         * symtab.c (iterate_over_some_symtabs): Adjust to use
13938         function_view as callback types and return bool.
13939         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13940         of a cleanup.
13941         (lookup_symtab_callback): Delete.
13942         (lookup_symtab): Use a lambda.
13943         (iterate_over_symbols): Adjust to use function_view as callback
13944         type.
13945         (struct search_symbols_data, search_symbols_file_matches)
13946         (search_symbols_name_matches): Delete.
13947         (search_symbols): Use a pair of lambdas.
13948         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13949         (symtab_expansion_callback): Delete.
13950         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13951         * symtab.h: Include "common/function-view.h".
13952         (iterate_over_some_symtabs): Adjust to use function_view as
13953         callback type and return bool.
13954         (iterate_over_symtabs): Adjust to use function_view as callback
13955         type.
13956         (symbol_found_callback_ftype): Remove 'data' parameter and return
13957         bool.
13958         (iterate_over_symbols): Adjust to use function_view as callback
13959         type.
13960
13961 2017-02-23  Pedro Alves  <palves@redhat.com>
13962
13963         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13964         (%.o) <unittests/%.c>: New pattern.
13965         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13966         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13967         * common/function-view.h: New file.
13968         * unittests/function-view-selftests.c: New file.
13969         * configure: Regenerate.
13970
13971 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13972
13973         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13974         inferior_ptid.
13975         * go32-nat.c (go32_thread_alive): Likewise.
13976
13977 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13978
13979         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13980         delete.
13981
13982 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13983
13984         * varobj.c (varobj_clear_saved_item): Use delete instead of
13985         xfree.
13986         (update_dynamic_varobj_children): Likewise.
13987
13988 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13989
13990         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13991
13992 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13993
13994         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13995         m_enum_value to 0 in default constructor.
13996
13997 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13998
13999         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14000         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14001         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14002         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14003         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14004         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14005         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14006         IS_STORE_CONDITIONAL_INSN.
14007
14008 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14009
14010         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14011
14012 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14013
14014         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14015
14016 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14017
14018         * dwarf2read.c (skip_one_die, read_attribute_value)
14019         (dwarf2_const_value_attr, dump_die_shallow)
14020         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14021         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14022
14023 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14024
14025         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14026         (dwarf_parse_macro_header): Accept DWARF version 5.
14027         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14028
14029 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14030
14031         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14032         DW_AT_GNU_*.
14033         * common/common-exceptions.h (enum errors): Likewise.
14034         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14035         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14036         (dwarf_expr_context::execute_stack_op): Likewise.
14037         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14038         Likewise.
14039         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14040         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14041         (show_entry_values_debug, call_site_to_target_addr)
14042         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14043         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14044         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14045         (value_of_dwarf_block_entry, indirect_pieced_value)
14046         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14047         (disassemble_dwarf_expression): Likewise.
14048         * dwarf2read.c (process_die, inherit_abstract_dies)
14049         (read_call_site_scope): Likewise.
14050         * gdbtypes.h (struct func_type, struct call_site_parameter)
14051         (struct call_site): Likewise.
14052         * stack.c (read_frame_arg): Likewise.
14053         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14054
14055 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14056
14057         * defs.h (read_unsigned_leb128): New declaration.
14058         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14059         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14060         (dwarf2_find_location_expression): Call also
14061         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14062         * dwarf2loc.h (dwarf2_version): New declaration.
14063         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14064         rnglists.
14065         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14066         .debug_rnglists.
14067         (struct dwop_section_names): Add loclists_dwo.
14068         (dwop_section_names): Add .debug_loclists.dwo.
14069         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14070         (struct dwarf2_per_cu_data): Add dwarf_version.
14071         (struct dwo_sections): Add loclists.
14072         (struct attr_abbrev): Add implicit_const.
14073         (read_indirect_line_string): New declaration.
14074         (read_unsigned_leb128): Delete declaration.
14075         (rcuh_kind): New definition.
14076         (read_and_check_comp_unit_head): Change parameter
14077         is_debug_types_section to section_kind.
14078         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14079         (read_comp_unit_head): Change parameter abfd to section, add parameter
14080         section_kind.  Handle DWARF-5.
14081         (error_check_comp_unit_head): Accept also DWARF version 5.
14082         (read_and_check_comp_unit_head): Change parameter
14083         is_debug_types_section to section_kind.
14084         (read_and_check_type_unit_head): Delete function.
14085         (read_abbrev_offset): Handle DWARF-5.
14086         (create_debug_type_hash_table): Add parameter section_kind.  Process
14087         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14088         comp_unit_head.
14089         (create_debug_types_hash_table): Update create_debug_type_hash_table
14090         caller.
14091         (create_all_type_units): Call create_debug_type_hash_table.
14092         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14093         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14094         caller.
14095         (skip_one_die): Handle DW_FORM_implicit_const.
14096         (dwarf2_rnglists_process): New function.
14097         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14098         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14099         (read_attribute_value): Handle DW_FORM_implicit_const,
14100         DW_FORM_line_strp.
14101         (read_attribute): Handle DW_FORM_implicit_const.
14102         (read_indirect_string_at_offset_from): New function from
14103         read_indirect_string_at_offset.
14104         (read_indirect_string_at_offset): Call
14105         read_indirect_string_at_offset_from.
14106         (read_indirect_line_string_at_offset): New function.
14107         (read_indirect_string): New function comment.
14108         (read_indirect_line_string): New function.
14109         (read_unsigned_leb128): Make it global.
14110         (dwarf2_string_attr): Handle DWARF-5.
14111         (add_include_dir_stub, read_formatted_entries): New functions.
14112         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14113         Handle DWARF-5.
14114         (per_cu_header_read_in): Update read_comp_unit_head caller.
14115         (dwarf2_version): New function.
14116         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14117         rnglists.
14118         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14119         fields.
14120
14121 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14122
14123         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14124
14125 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14126
14127         * dwarf2read.c (dwarf2_ranges_process): New function from
14128         dwarf2_ranges_read.
14129         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14130         dwarf2_ranges_process.
14131
14132 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14133
14134         * dwarf2read.c (create_debug_type_hash_table): New function from
14135         create_debug_types_hash_table.
14136         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14137         (create_all_type_units, open_and_init_dwo_file): Update
14138         create_debug_types_hash_table callers.
14139
14140 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14141
14142         PR gdb/16188
14143         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14144         refer to 'ap', not 'args'.
14145
14146 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14147             Pedro Alves  <palves@redhat.com>
14148
14149         PR gdb/16188
14150         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14151         calls succeeded.
14152         * fork-child.c (trace_start_error): New function.
14153         (trace_start_error_with_name): Likewise.
14154         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14155         * inf-ptrace.c (inf_ptrace_me): Likewise.
14156         * inferior.h (trace_start_error): New prototype.
14157         (trace_start_error_with_name): Likewise.
14158
14159 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14160
14161         PR gdb/21164
14162         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14163         NULL before using it.
14164         * symmisc.c (maintenance_print_symbols): Likewise.
14165         (maintenance_print_msymbols): Likewise.
14166
14167 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14168
14169         * NEWS: Add record Python bindings entry.
14170
14171 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14172
14173         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14174         py-record-full.o.
14175         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14176         * python/py-record-btrace.c, python/py-record-btrace.h,
14177         python/py-record-full.c, python/py-record-full.h: New file.
14178         * python/py-record.c: Add include for py-record-btrace.h and
14179         py-record-full.h.
14180         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14181         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14182         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14183         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14184         New definition.
14185         (gdbpy_initialize_btrace): New export.
14186         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14187
14188 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14189
14190         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14191         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14192         * python/py-record.c: New file.
14193         * python/python-internal.h (gdbpy_start_recording,
14194         gdbpy_current_recording, gdpy_stop_recording,
14195         gdbpy_initialize_record): New export.
14196         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14197         (python_GdbMethods): Add gdbpy_start_recording,
14198         gdbpy_current_recording and gdbpy_stop_recording.
14199
14200 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14201
14202         * record-btrace.c (record_btrace_record_method): New function.
14203         (init_record_btrace_ops): Initialize to_record_method.
14204         * record-full.c (record_full_record_method): New function.
14205         (init_record_full_ops, init_record_full_core_ops): Add
14206         record_full_record_method.
14207         * record.h (enum record_method): New enum.
14208         * target-debug.h (target_debug_print_enum_record_method: New define.
14209         * target-delegates.c: Regenerate.
14210         * target.c (target_record_method): New function.
14211         * target.h: Include record.h.
14212         (struct target_ops) <to_record_method>: New field.
14213         (target_record_method): New export.
14214
14215 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14216
14217         * record.h (record_start, record_stop): New export.
14218         * record.c (record_start, record_stop): New function.
14219
14220 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14221
14222         * btrace.c (btrace_fetch): Copy function call segments pointer
14223         into a vector.
14224         (btrace_clear): Clear the vector.
14225         (btrace_find_insn_by_number): Use binary search to find the correct
14226         function call segment.
14227         * btrace.h (brace_fun_p): New typedef.
14228         (struct btrace_thread_info) <functions>: New field.
14229
14230 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14231
14232         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14233         * btrace.c (btrace_decode_error): ... here.  New function.
14234         * btrace.h (btrace_decode_error): New export.
14235
14236 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14237
14238         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14239         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14240         btrace_find_insn_by_number): Remove special case for gaps.
14241         * btrace.h (btrace_insn_get_error): New export.
14242         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14243         * record-btrace.c (btrace_insn_history): Print number for gaps.
14244         (record_btrace_info, record_btrace_goto): Handle gaps.
14245
14246 2017-02-14  Tom Tromey  <tom@tromey.com>
14247
14248         PR python/13598:
14249         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14250         event.
14251         * python/py-evts.c (gdbpy_initialize_py_events): Add
14252         before_prompt registry.
14253         * python/py-events.h (events_object) <before_prompt>: New field.
14254
14255 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14256
14257         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14258
14259 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14260
14261         * symfile (_initialize_symfile): Add usage text to the load command's
14262         help text.
14263
14264 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14265
14266         * utils.c (defaulted_query): Don't query on secondary UIs.
14267
14268 2017-02-10  Tom Tromey  <tom@tromey.com>
14269
14270         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14271
14272 2017-02-10  Tom Tromey  <tom@tromey.com>
14273
14274         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14275         "cleanup" local.
14276         * python/py-type.c (typy_legacy_template_argument): Remove
14277         unnecessary "cleanup" local.
14278
14279 2017-02-10  Tom Tromey  <tom@tromey.com>
14280
14281         * python/python.c (do_start_initialization): New function, from
14282         _initialize_python.
14283         (_initialize_python): Call do_start_initialization.
14284         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14285         goto.
14286
14287 2017-02-10  Tom Tromey  <tom@tromey.com>
14288
14289         * python/py-prettyprint.c (pretty_print_one_value): Use
14290         gdbpy_ref.
14291
14292 2017-02-10  Tom Tromey  <tom@tromey.com>
14293
14294         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14295         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14296         gdbpy_ref.
14297         * python/py-type.c (field_new): Use gdbpy_ref.
14298         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14299         gdbpy_ref.
14300         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14301         (py_free_pspace): Likewise.
14302         (pspace_to_pspace_object): Likewise.
14303         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14304         (py_free_objfile): Likewise.
14305         (objfile_to_objfile_object): Likewise.
14306         * python/py-inferior.c (delete_thread_object): Use
14307         gdbpy_ref.
14308         (infpy_read_memory): Likewise.
14309         (py_free_inferior): Likewise.
14310         * python/py-evtregistry.c (create_eventregistry_object): Use
14311         gdbpy_ref.
14312         * python/py-event.c (create_event_object): Use gdbpy_ref.
14313
14314 2017-02-10  Tom Tromey  <tom@tromey.com>
14315
14316         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14317         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14318         used.
14319         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14320         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14321         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14322         python/py-framefilter.c, python/py-function.c,
14323         python/py-inferior.c, python/py-infevents.c,
14324         python/py-linetable.c, python/py-newobjfileevent.c,
14325         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14326         python/py-signalevent.c, python/py-stopevent.c,
14327         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14328         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14329         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14330         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14331
14332 2017-02-10  Tom Tromey  <tom@tromey.com>
14333
14334         * ui-out.h (ui_out_emit_type): New class.
14335         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14336         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14337         and ui_out_emit_tuple.
14338         (enumerate_locals): Likewise.
14339         (py_mi_print_variables, py_print_locals, py_print_args): Use
14340         ui_out_emit_list.
14341         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14342         ui_out_emit_list.
14343         * common/gdb_optional.h: New file.
14344
14345 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14346
14347         * MAINTAINERS (Write After Approval): Update my e-mail address.
14348
14349 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14350
14351         PR gdb/21122
14352         * breakpoint.c (_initialize_breakpoint): Update the help description
14353         of the 'commands' command to indicate that it takes a list argument.
14354
14355 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14356
14357         * interps.c (current_interp_set_logging): Remove "return".
14358
14359 2017-02-09  Gary Benson  <gbenson@redhat.com>
14360
14361         * symtab.c (add_symtab_completions): Prevent NULL pointer
14362         dereference.
14363
14364 2017-02-08  Pedro Alves  <palves@redhat.com>
14365
14366         * interps.c (interp::interp): Remove reference to quiet_p.
14367         (interp_set): Make static.  Remove dead "Switching to" output
14368         code.
14369         (interp_quiet_p, interp_set_quiet): Delete.
14370         (interpreter_exec_cmd): Don't set the interpreter quiet.
14371         * interps.h (interp_quiet_p): Make static.
14372         (class interp) <quiet_p>: Remove field
14373
14374 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14375
14376         * cli/cli-decode.c (find_command_name_length): Make it extern.
14377         * cli/cli-decode.h (find_command_name_length): Declare.
14378         * cli/cli-script.c (command_name_equals, line_first_arg):
14379         New functions.
14380         (process_next_line): Use cli-decode to parse command names.
14381         (build_command_line): Make args a constant pointer.
14382
14383 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14384
14385         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14386         Remove case-insensitive search.
14387
14388 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14389
14390         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14391         at the end of the line.  Avoids an ARI warning.
14392
14393 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14394
14395         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14396         rdseed instructions.
14397         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14398
14399 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14400
14401         PR tdep/20936
14402         Provide and use sparc32 and sparc64 target description XML files.
14403         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14404         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14405         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14406         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14407         * features/sparc/sparc32-solaris.xml: New file.
14408         * features/sparc/sparc64-solaris.xml: New file.
14409         * features/sparc/sparc32-solaris.c: Generated.
14410         * features/sparc/sparc64-solaris.c: Generated.
14411         * sparc-tdep.h: Account for differences in target descriptions.
14412         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14413         (sparc32_register_type): Use target provided registers.
14414         (validate_tdesc_registers): New function.
14415         (sparc32_gdbarch_init): Use tdesc_has_registers.
14416         Set pseudoregister functions.
14417         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14418         (sparc64_register_type): Use target provided registers.
14419         (sparc64_init_abi): Set pseudoregister functions.
14420
14421 2017-02-03  Tom Tromey  <tom@tromey.com>
14422
14423         PR rust/21097:
14424         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14425         with a single member.
14426
14427 2017-02-03  Pedro Alves  <palves@redhat.com>
14428
14429         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14430         (cli_interp_base::~cli_interp_base): New.
14431         (cli_interp): New struct.
14432         (as_cli_interp): Cast the interp itself to cli_interp.
14433         (cli_interpreter_pre_command_loop): Rename to ...
14434         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14435         parameter.
14436         (cli_interpreter_init): Rename to ...
14437         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14438         boolean.  Make extern.
14439         (cli_interpreter_resume): Rename to ...
14440         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14441         extern.
14442         (cli_interpreter_suspend): Rename to ...
14443         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14444         extern.
14445         (cli_interpreter_exec): Rename to ...
14446         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14447         extern.
14448         (cli_interpreter_supports_command_editing): Rename to ...
14449         (cli_interp_base::supports_command_editing): ... this.  Remove
14450         'interp' parameter.  Make extern.
14451         (cli_ui_out): Rename to ...
14452         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14453         Make extern.
14454         (cli_set_logging): Rename to ...
14455         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14456         parameter.  Make extern.
14457         (cli_interp_procs): Delete.
14458         (cli_interp_factory): Adjust to use "new".
14459         * cli/cli-interp.h: Include "interps.h".
14460         (struct cli_interp_base): New struct.
14461         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14462         (interp_new): Delete.
14463         (interp::interp, interp::~interp): New.
14464         (interp_set): Use bool, and return void.  Assume the interpreter
14465         has suspend, init and resume methods, and that the all return
14466         void.
14467         (set_top_level_interpreter): interp_set returns void.
14468         (interp_ui_out): Adapt.
14469         (current_interp_set_logging): Adapt.
14470         (interp_data): Delete.
14471         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14472         (interp_exec): Adapt.
14473         (top_level_interpreter_data): Delete.
14474         * interps.h (interp_init_ftype, interp_resume_ftype)
14475         (interp_suspend_ftype, interp_exec_ftype)
14476         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14477         (class interp): New.
14478         (interp_new): Delete.
14479         (interp_set): Now returns void.  Use bool.
14480         (interp_data, top_level_interpreter_data): Delete.
14481         * mi/mi-common.h: Include interps.h.
14482         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14483         init, resume, suspect, exec, interp_ui_out, set_logging and
14484         pre_command_loop methods.
14485         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14486         (mi_interpreter_init): Rename to ...
14487         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14488         bool, return void and make extern.  Adjust.
14489         (mi_interpreter_resume): ... Rename to ...
14490         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14491         return void and make extern.  Adjust.
14492         (mi_interpreter_suspend): ... Rename to ...
14493         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14494         return void and make extern.  Adjust.
14495         (mi_interpreter_exec): ... Rename to ...
14496         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14497         extern.  Adjust.
14498         (mi_interpreter_pre_command_loop): ... Rename to ...
14499         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14500         parameter and make extern.
14501         (mi_on_normal_stop_1): Adjust.
14502         (mi_ui_out): Rename to ...
14503         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14504         parameter and make extern.  Adjust.
14505         (mi_set_logging): Rename to ...
14506         (mi_interp::set_logging): ... this.  Remove the 'interp'
14507         parameter and make extern.  Adjust.
14508         (mi_interp_procs): Delete.
14509         (mi_interp_factory): Adjust to use 'new'.
14510         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14511         (mi_print_exception, mi_execute_command, mi_load_progress):
14512         Adjust.
14513         * tui/tui-interp.c (tui_interp): New class.
14514         (as_tui_interp): Return a tui_interp pointer.
14515         (tui_on_normal_stop, tui_on_signal_received)
14516         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14517         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14518         to use interp::interp_ui_out.
14519         (tui_init): Rename to ...
14520         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14521         bool, return void and make extern.  Adjust.
14522         (tui_resume): Rename to ...
14523         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14524         return void and make extern.  Adjust.
14525         (tui_suspend): Rename to ...
14526         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14527         return void and make extern.  Adjust.
14528         (tui_ui_out): Rename to ...
14529         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14530         parameter, and make extern.  Adjust.
14531         (tui_exec): Rename to ...
14532         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14533         make extern.
14534         (tui_interp_procs): Delete.
14535         (tui_interp_factory): Use "new".
14536
14537 2017-02-02  Tom Tromey  <tom@tromey.com>
14538
14539         * rust-exp.y (ends_raw_string, space_then_number)
14540         (rust_identifier_start_p): Return bool.
14541         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14542         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14543         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14544         (rust_chartype_p): Return bool.
14545         (val_print_struct, rust_print_struct_def, rust_print_type):
14546         Update.
14547         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14548         Return bool.
14549
14550 2017-02-02  Tom Tromey  <tom@tromey.com>
14551
14552         * rust-lang.c: Reindent.
14553
14554 2017-02-02  Tom Tromey  <tom@tromey.com>
14555
14556         * rust-lang.h (rust_crate_for_block): Update.
14557         * rust-lang.c (rust_crate_for_block): Return std::string.
14558         (rust_get_disr_info): Use std:;string, not
14559         gdb::unique_xmalloc_ptr.
14560         * rust-exp.y (crate_name): Update.
14561
14562 2017-02-02  Pedro Alves  <palves@redhat.com>
14563
14564         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14565         field out of gdb_disassembler_test and make it static.
14566
14567 2017-02-02  Pedro Alves  <palves@redhat.com>
14568
14569         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14570         mi1_interp and mi_interp fields.
14571
14572 2017-02-02  Pedro Alves  <palves@redhat.com>
14573
14574         * cli/cli-interp.c (struct saved_output_files, saved_output):
14575         Moved from cli/cli-logging.c.
14576         (cli_set_logging): New function.
14577         (cli_interp_procs): Install cli_set_logging.
14578         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14579         Declare.
14580         * cli/cli-logging.c (struct saved_output_files, saved_output):
14581         Moved to cli/cli-interp.c.
14582         (pop_output_files): Don't save outputs here.
14583         (make_logging_output): New function.
14584         (handle_redirections): Don't build tee nor save previous outputs
14585         here.
14586         * interps.c (current_interp_set_logging): Change prototype.
14587         Assume there's always a set_logging_proc method installed.
14588         * interps.h (interp_set_logging_ftype): Change prototype.
14589         (current_interp_set_logging): Change prototype and adjust comment.
14590         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14591         use make_logging_output.
14592         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14593 2017-02-02  Pedro Alves  <palves@redhat.com>
14594
14595         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14596         from ...
14597         (set_logging_overwrite): ... here.
14598         (logging_no_redirect_file): Delete.
14599         (set_logging_redirect): Don't handle redirection on the fly.
14600         Instead warn that "logging off" / "logging on" is necessary.
14601         (pop_output_files): Delete references to logging_no_redirect_file.
14602         (show_logging_command): Always speak in terms of what will happen
14603         once logging is reenabled.
14604
14605 2017-02-02  Pedro Alves  <palves@redhat.com>
14606
14607         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14608
14609 2017-02-02  Pedro Alves  <palves@redhat.com>
14610
14611         * disasm.c (gdb_pretty_print_insn): Rename to ...
14612         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14613         Remove gdbarch parameter.  Adapt to clear the object's buffers
14614         instead of allocating new buffers, and to print using the object's
14615         gdb_disassembler instead of calling gdb_print_insn.
14616         (dump_insns): Use gdb_pretty_print_disassembler.
14617         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14618         (gdb_pretty_print_disassembler): New class.
14619         * record-btrace.c (btrace_insn_history): Use
14620         gdb_pretty_print_disassembler.
14621
14622 2017-02-02  Pedro Alves  <palves@redhat.com>
14623
14624         * ada-lang.c (type_as_string): Use string_file.
14625         * ada-valprint.c (ada_print_floating): Use string_file.
14626         * ada-varobj.c (ada_varobj_scalar_image)
14627         (ada_varobj_get_value_image): Use string_file.
14628         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14629         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14630         * breakpoint.c (update_inserted_breakpoint_locations)
14631         (insert_breakpoint_locations, reattach_breakpoints)
14632         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14633         (print_it_watchpoint): Use string_file.
14634         (save_breakpoints): Use stdio_file.
14635         * c-exp.y (oper): Use string_file.
14636         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14637         tee_file.
14638         (pop_output_files): Use delete.
14639         (handle_redirections): Use stdio_file and tee_file.
14640         * cli/cli-setshow.c (do_show_command): Use string_file.
14641         * compile/compile-c-support.c (c_compute_program): Use
14642         string_file.
14643         * compile/compile-c-symbols.c (generate_vla_size): Take a
14644         'string_file &' instead of a 'ui_file *'.
14645         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14646         of a 'ui_file *'.  Use string_file.
14647         (generate_c_for_variable_locations): Take a 'string_file &'
14648         instead of a 'ui_file *'.
14649         * compile/compile-internal.h (generate_c_for_for_one_variable):
14650         Take a 'string_file &' instead of a 'ui_file *'.
14651         * compile/compile-loc2c.c (push, pushf, unary, binary)
14652         (print_label, pushf_register_address, pushf_register)
14653         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14654         'ui_file *'.  Adjust.
14655         * compile/compile.c (compile_to_object): Use string_file.
14656         * compile/compile.h (compile_dwarf_expr_to_c)
14657         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14658         'ui_file *'.
14659         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14660         (replace_typedefs_qualified_name): Use string_file and
14661         obstack_copy0.
14662         * disasm.c (gdb_pretty_print_insn): Use string_file.
14663         (gdb_disassembly): Adjust reference the null_stream global.
14664         (do_ui_file_delete): Delete.
14665         (gdb_insn_length): Use null_stream.
14666         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14667         * dwarf2loc.c (dwarf2_compile_property_to_c)
14668         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14669         'string_file &' instead of a 'ui_file *'.
14670         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14671         * dwarf2read.c (do_ui_file_peek_last): Delete.
14672         (dwarf2_compute_name): Use string_file.
14673         * event-top.c (gdb_setup_readline): Use stdio_file.
14674         * gdbarch.sh (verify_gdbarch): Use string_file.
14675         * gdbtypes.c (safe_parse_type): Use null_stream.
14676         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14677         string_file.
14678         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14679         'string_file *' instead of a 'ui_file *'.
14680         (gdbscm_arch_disassemble): Use string_file.
14681         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14682         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14683         inherits from ui_file.
14684         (ioscm_file_port_delete, ioscm_file_port_rewind)
14685         (ioscm_file_port_put): Delete.
14686         (ioscm_file_port_write): Rename to ...
14687         (ioscm_file_port::write): ... this.  Remove file_port_magic
14688         checks.
14689         (ioscm_file_port_new): Delete.
14690         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14691         ui_file_up.
14692         * guile/scm-type.c (tyscm_type_name): Use string_file.
14693         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14694         Use string_file.
14695         * infcmd.c (print_return_value_1): Use string_file.
14696         * infrun.c (print_target_wait_results): Use string_file.
14697         * language.c (add_language): Use string_file.
14698         * location.c (explicit_to_string_internal): Use string_file.
14699         * main.c (captured_main_1): Use null_file.
14700         * maint.c (maintenance_print_architecture): Use stdio_file.
14701         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14702         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14703         event_channel>: Change type to mi_console_file pointer.
14704         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14705         (mi_console_file_delete): Delete.
14706         (struct mi_console_file): Delete.
14707         (mi_console_file_magic): Delete.
14708         (mi_console_file_new): Delete.
14709         (mi_console_file::mi_console_file): New.
14710         (mi_console_file_delete): Delete.
14711         (mi_console_file_fputs): Delete.
14712         (mi_console_file::write): New.
14713         (mi_console_raw_packet): Delete.
14714         (mi_console_file::flush): New.
14715         (mi_console_file_flush): Delete.
14716         (mi_console_set_raw): Rename to ...
14717         (mi_console_file::set_raw): ... this.
14718         * mi/mi-console.h (class mi_console_file): New class.
14719         (mi_console_file_new, mi_console_set_raw): Delete.
14720         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14721         (mi_set_logging): Use delete and tee_file.  Adjust.
14722         * mi/mi-main.c (output_register): Use string_file.
14723         (mi_cmd_data_evaluate_expression): Use string_file.
14724         (mi_cmd_data_read_memory): Use string_file.
14725         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14726         * mi/mi-out.c (mi_ui_out::main_stream): New.
14727         (mi_ui_out::rewind): Use main_stream and
14728         string_file.
14729         (mi_ui_out::put): Use main_stream and string_file.
14730         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14731         Allocate a 'string_file' instead.
14732         (mi_out_new): Don't allocate a mem_fileopen stream here.
14733         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14734         (mi_ui_out::main_stream): Declare method.
14735         * printcmd.c (eval_command): Use string_file.
14736         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14737         * python/py-arch.c (archpy_disassemble): Use string_file.
14738         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14739         * python/py-frame.c (frapy_str): Use string_file.
14740         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14741         Use string_file.
14742         * python/py-type.c (typy_str): Use string_file.
14743         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14744         * python/py-value.c (valpy_str): Use string_file.
14745         * record-btrace.c (btrace_insn_history): Use string_file.
14746         * regcache.c (regcache_print): Use stdio_file.
14747         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14748         * remote.c (escape_buffer): Use string_file.
14749         * rust-lang.c (rust_get_disr_info): Use string_file.
14750         * serial.c (serial_open_ops_1): Use stdio_file.
14751         (do_serial_close): Use delete.
14752         * stack.c (print_frame_arg): Use string_file.
14753         (print_frame_args): Remove local mem_fileopen stream, not used.
14754         (print_frame): Use string_file.
14755         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14756         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14757         Take a 'string_file *' instead of a 'ui_file *'.
14758         * top.c (new_ui): Use stdio_file and stderr_file.
14759         (free_ui): Use delete.
14760         (execute_command_to_string): Use string_file.
14761         (quit_confirm): Use string_file.
14762         * tracepoint.c (collection_list::append_exp): Use string_file.
14763         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14764         * tui/tui-file.c: Don't include "ui-file.h".
14765         (enum streamtype, struct tui_stream): Delete.
14766         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14767         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14768         (tui_file::tui_file): New method.
14769         (tui_file_fputs): Delete.
14770         (tui_file_get_strbuf): Delete.
14771         (tui_file::puts): New method.
14772         (tui_file_adjust_strbuf): Delete.
14773         (tui_file_flush): Delete.
14774         (tui_file::flush): New method.
14775         * tui/tui-file.h: Tweak intro comment.
14776         Include ui-file.h.
14777         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14778         (tui_file_adjust_strbuf): Delete declarations.
14779         (class tui_file): New class.
14780         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14781         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14782         (tui_register_format): Use string_stream.
14783         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14784         (tui_get_function_from_frame): Use string_file.
14785         * typeprint.c (type_to_string): Use string_file.
14786         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14787         (null_stream): New global.
14788         (ui_file_delete): Delete.
14789         (ui_file::ui_file): New.
14790         (null_file_isatty): Delete.
14791         (ui_file::~ui_file): New.
14792         (null_file_rewind): Delete.
14793         (ui_file::printf): New.
14794         (null_file_put): Delete.
14795         (null_file_flush): Delete.
14796         (ui_file::putstr): New.
14797         (null_file_write): Delete.
14798         (ui_file::putstrn): New.
14799         (null_file_read): Delete.
14800         (ui_file::putc): New.
14801         (null_file_fputs): Delete.
14802         (null_file_write_async_safe): Delete.
14803         (ui_file::vprintf): New.
14804         (null_file_delete): Delete.
14805         (null_file::write): New.
14806         (null_file_fseek): Delete.
14807         (null_file::puts): New.
14808         (ui_file_data): Delete.
14809         (null_file::write_async_safe): New.
14810         (gdb_flush, ui_file_isatty): Adjust.
14811         (ui_file_put, ui_file_rewind): Delete.
14812         (ui_file_write): Adjust.
14813         (ui_file_write_for_put): Delete.
14814         (ui_file_write_async_safe, ui_file_read): Adjust.
14815         (ui_file_fseek): Delete.
14816         (fputs_unfiltered): Adjust.
14817         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14818         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14819         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14820         (set_ui_file_data): Delete.
14821         (string_file::~string_file, string_file::write)
14822         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14823         (do_ui_file_as_string, ui_file_as_string): Delete.
14824         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14825         (struct mem_file): Delete.
14826         (mem_file_new): Delete.
14827         (stdio_file::stdio_file): New.
14828         (mem_file_delete): Delete.
14829         (stdio_file::stdio_file): New.
14830         (mem_fileopen): Delete.
14831         (stdio_file::~stdio_file): New.
14832         (mem_file_rewind): Delete.
14833         (stdio_file::set_stream): New.
14834         (mem_file_put): Delete.
14835         (stdio_file::open): New.
14836         (mem_file_write): Delete.
14837         (stdio_file_magic, struct stdio_file): Delete.
14838         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14839         (stdio_file::flush): New.
14840         (stdio_file_read): Rename to ...
14841         (stdio_file::read): ... this.  Adjust.
14842         (stdio_file_write): Rename to ...
14843         (stdio_file::write): ... this.  Adjust.
14844         (stdio_file_write_async_safe): Rename to ...
14845         (stdio_file::write_async_safe) ... this.  Adjust.
14846         (stdio_file_fputs): Rename to ...
14847         (stdio_file::puts) ... this.  Adjust.
14848         (stdio_file_isatty): Delete.
14849         (stdio_file_fseek): Delete.
14850         (stdio_file::isatty): New.
14851         (stderr_file_write): Rename to ...
14852         (stderr_file::write) ... this.  Adjust.
14853         (stderr_file_fputs): Rename to ...
14854         (stderr_file::puts) ... this.  Adjust.
14855         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14856         (stderr_file::stderr_file): New.
14857         (tee_file_magic): Delete.
14858         (struct tee_file): Delete.
14859         (tee_file::tee_file): New.
14860         (tee_file_new): Delete.
14861         (tee_file::~tee_file): New.
14862         (tee_file_delete): Delete.
14863         (tee_file_flush): Rename to ...
14864         (tee_file::flush): ... this.  Adjust.
14865         (tee_file_write): Rename to ...
14866         (tee_file::write): ... this.  Adjust.
14867         (tee_file::write_async_safe): New.
14868         (tee_file_fputs): Rename to ...
14869         (tee_file::puts): ... this.  Adjust.
14870         (tee_file_isatty): Rename to ...
14871         (tee_file::isatty): ... this.  Adjust.
14872         * ui-file.h (struct obstack, struct ui_file): Don't
14873         forward-declare.
14874         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14875         (ui_file_write_ftype)
14876         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14877         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14878         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14879         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14880         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14881         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14882         (set_ui_file_fseek): Delete.
14883         (ui_file_data, ui_file_delete, ui_file_rewind)
14884         (struct ui_file): New.
14885         (ui_file_up): New.
14886         (class null_file): New.
14887         (null_stream): Declare.
14888         (ui_file_write_for_put, ui_file_put): Delete.
14889         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14890         Delete.
14891         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14892         (gdb_fopen, tee_file_new): Delete.
14893         (struct string_file): New.
14894         (struct stdio_file): New.
14895         (stdio_file_up): New.
14896         (struct stderr_file): New.
14897         (class tee_file): New.
14898         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14899         of a 'ui_file *'.  Adjust.
14900         * ui-out.h (class ui_out) <field_stream>: Likewise.
14901         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14902         (null_stream): Delete.
14903         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14904         Adjust.
14905         * utils.h (struct ui_file): Delete forward declaration..
14906         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14907         (error_stream): Take a 'string_file &' instead of a
14908         'ui_file *'.
14909         * varobj.c (varobj_value_get_print_value): Use string_file.
14910         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14911         * gdbarch.c: Regenerate.
14912
14913 2017-02-02  Pedro Alves  <palves@redhat.com>
14914
14915         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14916         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14917         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14918         Adjust to call gdb_print_insn instead of
14919         gdb_disassembler::print_insn.
14920         (dump_insns, do_mixed_source_and_assembly_deprecated)
14921         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14922         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14923         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14924         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14925         declaration.
14926         (gdb_pretty_print_insn): Re-add declaration.
14927         * record-btrace.c (btrace_insn_history): Don't allocate a
14928         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14929
14930 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14931
14932         * disasm.h (gdb_disassembly): Remove file_string parameter.
14933         * disasm.c (gdb_disassembly): Likewise.
14934         * cli/cli-cmds.c (print_disassembly): Adapt.
14935         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14936         * stack.c (do_gdb_disassembly): Likewise.
14937
14938 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14939
14940         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14941         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14942         targets.  And if the implicit value is longer than needed, extract
14943         the first bytes instead of the "least significant" ones.
14944
14945 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14946
14947         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14948         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14949         (btrace_fetch): Assert can_access_registers_ptid.
14950         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14951         validate_registers_access.
14952
14953 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14954
14955         * gdbthread.h (can_access_registers_ptid): New.
14956         * thread.c (can_access_registers_ptid): New.
14957
14958 2017-02-01  Pedro Alves  <palves@redhat.com>
14959
14960         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14961
14962 2017-01-31  Pedro Alves  <palves@redhat.com>
14963
14964         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14965         Fix typos.
14966
14967 2017-01-31  Pedro Alves  <palves@redhat.com>
14968
14969         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14970         not used.
14971
14972 2017-01-31  Pedro Alves  <palves@redhat.com>
14973
14974         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14975
14976 2017-01-31  Pedro Alves  <palves@redhat.com>
14977
14978         * common/scoped_restore.h
14979         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14980         change the value's parameter type to T2.
14981         (make_scoped_restore): Likewise.
14982
14983 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14984             Richard Henderson  <rth@redhat.com>
14985
14986         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14987         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14988         GS_BASE for older kernels.
14989         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14990         GS_BASE for older kernels.
14991         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14992         and GS_BASE to the offset table.
14993         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14994         system register group.
14995         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14996         for older kernels.
14997         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14998         amd64 ABI.
14999         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15000         AMD64_GSBASE_REGNUM.
15001         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15002         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15003         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15004         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15005         i386/64bit-segments.xml in those rules.
15006         * features/i386/64bit-segments.xml: New file.
15007         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15008         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15009         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15010         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15011         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15012         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15013         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15014         * features/i386/amd64-avx-linux.c: Regenerated.
15015         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15016         * features/i386/amd64-avx-mpx.c: Regenerated.
15017         * features/i386/amd64-avx512-linux.c: Regenerated.
15018         * features/i386/amd64-linux.c: Regenerated.
15019         * features/i386/amd64-mpx-linux.c: Regenerated.
15020         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15021         * features/i386/i386-avx-mpx.c: Regenerated.
15022         * features/i386/x32-avx-linux.c: Regenerated.
15023         * features/i386/x32-avx512-linux.c: Regenerated.
15024         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15025         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15026         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15027         * regformats/i386/amd64-linux.dat: Regenerated.
15028         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15029         * regformats/i386/x32-avx-linux.dat: Regenerated.
15030         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15031         * regformats/i386/x32-linux.dat: Regenerated.
15032
15033 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15034
15035         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15036         Set to AMD64_NUM_REGS.
15037
15038 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15039
15040         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15041         that checks validity of a register number.
15042
15043 2017-01-27  Kees Cook  <keescook@google.com>
15044
15045         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15046         fetch_fpregs if target has fpa registers.
15047         (arm_linux_store_inferior_registers): Call store_fpregs if target
15048         has fpa registers.
15049
15050 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15051
15052         * cris-tdep.c (cris_gdbarch_init): Remove check for
15053         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15054
15055 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15056
15057         * corelow.c (get_core_register_section): Check for regset
15058         existence before checking for REGSET_VARIABLE_SIZE.
15059
15060 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15061             Pedro Alves  <palves@redhat.com>
15062
15063         PR gdb/20939
15064         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15065         call memory_error, save memaddr instead.
15066         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15067         negative, cal memory_error.
15068         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15069
15070 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15071
15072         * disasm-selftests.c (memory_error_test): New function.
15073         (_initialize_disasm_selftests): Register memory_error_test.
15074
15075 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15076
15077         * Makefile.in (SFILES): Add disasm-selftests.c and
15078         selftest-arch.c.
15079         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15080         * disasm-selftests.c: New file.
15081         * selftest-arch.c: New file.
15082         * selftest-arch.h: New file.
15083
15084 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15085
15086         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15087         to bfd_arch_mep.  Don't return 0 if section is not
15088         found.  Call print_insn_mep.
15089
15090 2017-01-26  Pedro Alves  <palves@redhat.com>
15091             Yao Qi  <yao.qi@linaro.org>
15092
15093         * arm-tdep.c: Include "disasm.h".
15094         (gdb_print_insn_arm): Update code to get gdbarch.
15095         * disasm.c (dis_asm_read_memory): Change it to
15096         gdb_disassembler::dis_asm_read_memory.
15097         (dis_asm_memory_error): Likewise.
15098         (dis_asm_print_address): Likewise.
15099         (gdb_pretty_print_insn): Change it to
15100         gdb_disassembler::pretty_print_insn.
15101         (dump_insns): Add one argument gdb_disassemlber.  All
15102         callers updated.
15103         (do_mixed_source_and_assembly_deprecated): Likewise.
15104         (do_mixed_source_and_assembly): Likewise.
15105         (do_assembly_only): Likewise.
15106         (gdb_disassembler::gdb_disassembler): New.
15107         (gdb_disassembler::print_insn): New.
15108         * disasm.h (class gdb_disassembler): New.
15109         (gdb_pretty_print_insn): Remove declaration.
15110         (gdb_disassemble_info): Likewise.
15111         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15112         (gdbscm_disasm_read_memory_worker): Update.
15113         (gdbscm_disasm_read_memory): Update.
15114         (gdbscm_disasm_memory_error): Remove.
15115         (gdbscm_disasm_print_address): Remove.
15116         (gdbscm_disassembler::gdbscm_disassembler): New.
15117         (gdbscm_print_insn_from_port): Update.
15118         * mips-tdep.c: Include disasm.h.
15119         (gdb_print_insn_mips): Update code to get gdbarch.
15120         * record-btrace.c (btrace_insn_history): Update.
15121         * spu-tdep.c: Include disasm.h.
15122         (struct spu_dis_asm_data): Remove.
15123         (struct spu_dis_asm_info): New.
15124         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15125         SPU id.
15126         (gdb_print_insn_spu): Cast disassemble_info to
15127         spu_dis_asm_info.
15128
15129 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15130
15131         * disasm.c (do_ui_file_delete): Delete.
15132         (gdb_insn_length): Move code creating stream to ...
15133         * utils.c (null_stream): ... here.  New function.
15134         * utils.h (null_stream): Declare.
15135
15136 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15137
15138         * python/py-inferior.c (find_thread_object): Return directly
15139         from the loop.  Remove "found" variable.
15140
15141 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15142
15143         GDB 7.12.1 released.
15144
15145 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15146
15147         * python/py-function.c (fnpy_call): Reorder declarations to have
15148         the gdbpy_enter object declared first.
15149         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15150
15151 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15152
15153         PR python/21068
15154         * python/python-internal.h (PyMem_RawMalloc): Define for
15155         Python < 3.4.
15156         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15157         PyMem_RawMalloc instead of PyMem_Malloc.
15158
15159 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15160             Luis Machado  <lgustavo@codesourcery.com>
15161
15162         * NEWS (New commands): Mention flash-erase.
15163         (New MI commands): Mention target-flash-erase.
15164         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15165         command.
15166         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15167         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15168         * target.c (flash_erase_command): New function.
15169         (initialize_targets): Add new flash-erase command.
15170         * target.h (flash_erase_command): New declaration.
15171
15172 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15173
15174         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15175         HAVE_SYS_PROCFS_H is defined.
15176
15177 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15178
15179         * remote.c (struct cached_reg): Change data into a pointer.
15180         * (stop_reply_dtr): Free data pointers before deleting vector.
15181         (process_stop_reply): Likewise.
15182         (remote_parse_stop_reply): Allocate space for data
15183
15184 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15185
15186         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15187         MAX_REGISTER_SIZE.
15188         (amd64_pseudo_register_read_value): Likewise.
15189         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15190         (store_register_using_P): Likewise.
15191         * regcache.c (regcache_xfer_part): Likewise.
15192
15193 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15194
15195         Split real and pseudo registers.
15196         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15197         (sparc32_pseudo_regnum): New enum.
15198         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15199         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15200         (SPARC32_CP0_REGISTERS): New macro.
15201         (sparc32_pseudo_register_name): New function.
15202         (sparc32_register_name): Use sparc32_pseudo_register_name.
15203         (sparc32_pseudo_register_type): New function.
15204         (sparc32_register_type): Use sparc32_pseudo_register_type.
15205         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15206         pseudo register numbers.
15207         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15208         (SPARC64_CP0_REGISTERS): New macro.
15209         (sparc64_pseudo_register_name): New function.
15210         (sparc64_register_name): Use sparc64_pseudo_register_name.
15211         (sparc64_pseudo_register_type): New function.
15212         (sparc64_register_type): Use sparc64_pseudo_register_type.
15213         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15214         pseudo register numbers.
15215         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15216         sparc64_store_arguments): Handle pseudo register numbers.
15217
15218 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15219
15220         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15221         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15222         output.
15223         (getpkt_or_notif_sane_1): Likewise.
15224
15225 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15226
15227         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15228         of CC.  Pass "-x c++-header" instead of "-x c".
15229
15230 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15231
15232         * remote.c (remote_can_async_p): Update comment.
15233
15234 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15235
15236         * linux-nat.c (linux_nat_can_async_p): Update comment.
15237
15238 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15239
15240         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15241
15242 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15243
15244         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15245
15246 2017-01-10  Tom Tromey  <tom@tromey.com>
15247
15248         * python/py-type.c (typy_legacy_template_argument): Update.
15249         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15250         ~demangle_parse_info): Declare new members.
15251         (cp_demangled_name_to_comp): Return unique_ptr.
15252         (cp_demangled_name_parse_free)
15253         (make_cleanup_cp_demangled_name_parse_free)
15254         (cp_new_demangle_parse_info): Remove.
15255         * cp-support.c (do_demangled_name_parse_free_cleanup)
15256         (make_cleanup_cp_demangled_name_parse_free): Remove.
15257         (inspect_type, cp_canonicalize_string_full)
15258         (cp_canonicalize_string): Update.
15259         (mangled_name_to_comp): Change return type.
15260         (cp_class_name_from_physname, method_name_from_physname)
15261         (cp_func_name, cp_remove_params): Update.
15262         * cp-name-parser.y (demangle_parse_info): New constructor, from
15263         cp_new_demangle_parse_info.
15264         (~demangle_parse_info): New destructor, from
15265         cp_demangled_name_parse_free.
15266         (cp_merge_demangle_parse_infos): Update.
15267         (cp_demangled_name_to_comp): Change return type.
15268
15269 2017-01-10  Tom Tromey  <tom@tromey.com>
15270
15271         * top.c (prevent_dont_repeat): Change return type.
15272         * python/python.c (execute_gdb_command): Use std::string.
15273         Update.
15274         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15275         * command.h (prevent_dont_repeat): Change return type.
15276         * breakpoint.c (bpstat_do_actions_1): Update.
15277
15278 2017-01-10  Tom Tromey  <tom@tromey.com>
15279
15280         * value.h (scoped_value_mark::~scoped_value_mark): Call
15281         free_to_mark.
15282         (scoped_value_mark::free_to_mark): New method.
15283         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15284         scoped_value_mark.
15285
15286 2017-01-10  Tom Tromey  <tom@tromey.com>
15287
15288         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15289         (valpy_reference_value, valpy_const_value, valpy_get_address)
15290         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15291         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15292         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15293         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15294         scoped_value_mark.
15295         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15296         * value.h (scoped_value_mark): New class.
15297
15298 2017-01-10  Tom Tromey  <tom@tromey.com>
15299
15300         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15301         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15302         * psymtab.c (discard_psymtabs_upto): Remove.
15303         (make_cleanup_discard_psymtabs): Remove.
15304         (struct psymtab_state): Remove.
15305
15306 2017-01-10  Tom Tromey  <tom@tromey.com>
15307
15308         * record-full.c (record_full_save_cleanups): Remove.
15309         (record_full_save): Use gdb::unlinker.
15310         * gcore.c (do_bfd_delete_cleanup): Remove.
15311         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15312         cleanups.
15313         * dwarf2read.c (unlink_if_set): Remove.
15314         (write_psymtabs_to_index): Use gdb::unlinker.
15315         * common/gdb_unlinker.h: New file.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * windows-tdep.c (windows_xfer_shared_library): Update.
15320         * windows-nat.c (windows_make_so): Update.
15321         * utils.h (make_cleanup_bfd_unref): Remove.
15322         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15323         * symfile.h (symfile_bfd_open)
15324         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15325         * symfile.c (read_symbols, symbol_file_add)
15326         (separate_debug_file_exists): Update.
15327         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15328         (generic_load, reread_symbols): Update.
15329         * symfile-mem.c (symbol_file_add_from_memory): Update.
15330         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15331         (spu_symbol_file_add_from_memory): Update.
15332         * solist.h (struct target_so_ops) <bfd_open>: Return
15333         gdb_bfd_ref_ptr.
15334         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15335         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15336         gdb_bfd_ref_ptr.
15337         (solib_map_sections, reload_shared_libraries_1): Update.
15338         * solib-svr4.c (enable_break): Update.
15339         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15340         * solib-frv.c (enable_break2): Update.
15341         * solib-dsbt.c (enable_break): Update.
15342         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15343         gdb_bfd_ref_ptr.
15344         (darwin_solib_get_all_image_info_addr_at_init): Update.
15345         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15346         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15347         * record-full.c (record_full_save): Update.
15348         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15349         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15350         * minidebug.c (find_separate_debug_file_in_section): Return
15351         gdb_bfd_ref_ptr.
15352         * machoread.c (macho_add_oso_symfile): Change abfd to
15353         gdb_bfd_ref_ptr.
15354         (macho_symfile_read_all_oso): Update.
15355         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15356         (macho_symfile_read): Update.
15357         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15358         (jit_bfd_try_read_symtab): Update.
15359         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15360         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15361         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15362         gdb_bfd_ref_ptr.
15363         (gdb_bfd_ref_policy): New struct.
15364         (gdb_bfd_ref_ptr): New typedef.
15365         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15366         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15367         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15368         gdb_bfd_ref_ptr.
15369         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15370         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15371         (gcore_command): Update.
15372         * exec.c (exec_file_attach): Update.
15373         * elfread.c (elf_symfile_read): Update.
15374         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15375         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15376         (open_and_init_dwo_file): Update.
15377         (open_dwp_file): Return gdb_bfd_ref_ptr.
15378         (open_and_init_dwp_file): Update.
15379         * corelow.c (core_open): Update.
15380         * compile/compile-object-load.c (compile_object_load): Update.
15381         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15382         * coffread.c (coff_symfile_read): Update.
15383         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15384         gdb_bfd_ref_ptr.  Rename.
15385         (dump_bfd_file, restore_command): Update.
15386         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15387         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15388         (find_separate_debug_file_by_buildid): Update.
15389
15390 2017-01-10  Tom Tromey  <tom@tromey.com>
15391
15392         * common/gdb_ref_ptr.h: New file.
15393         * python/py-ref.h (struct gdbpy_ref_policy): New.
15394         (gdbpy_ref): Now a typedef.
15395
15396 2017-01-10  Tom Tromey  <tom@tromey.com>
15397
15398         * utils.h (make_cleanup_htab_delete): Don't declare.
15399         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15400         Remove.
15401         * linespec.c (decode_compound_collector): Add constructor,
15402         destructor.
15403         (lookup_prefix_sym): Remove cleanup.
15404         (symtab_collector): Add constructor, destructor.
15405         (collect_symtabs_from_filename): Remove cleanup.
15406         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15407         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15408         Use htab_up.
15409         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15410         * dwarf2read.c (dw2_expand_symtabs_matching)
15411         (dw2_map_symbol_filenames, dwarf_decode_macros)
15412         (write_psymtabs_to_index): Use htab_up.
15413         * dwarf2loc.c (func_verify_no_selftailcall)
15414         (call_site_find_chain_1, func_verify_no_selftailcall)
15415         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15416         std::vector, gdb::unique_xmalloc_ptr.
15417         (call_sitep): Remove typedef.
15418         (dwarf2_locexpr_baton_eval): Remove unused variable.
15419
15420 2017-01-10  Tom Tromey  <tom@tromey.com>
15421
15422         * python/python-internal.h (make_cleanup_py_decref)
15423         (make_cleanup_py_xdecref): Don't declare.
15424         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15425         (py_xdecref, make_cleanup_py_xdecref): Remove.
15426
15427 2017-01-10  Tom Tromey  <tom@tromey.com>
15428
15429         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15430         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15431
15432 2017-01-10  Tom Tromey  <tom@tromey.com>
15433
15434         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15435
15436 2017-01-10  Tom Tromey  <tom@tromey.com>
15437
15438         * python/py-utils.c (unicode_to_encoded_string)
15439         (python_string_to_target_string)
15440         (python_string_to_target_python_string)
15441         (python_string_to_host_string, gdbpy_obj_to_string)
15442         (get_addr_from_python): Use gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15447         gdbpy_ref.
15448
15449 2017-01-10  Tom Tromey  <tom@tromey.com>
15450
15451         * python/python.c (eval_python_command, gdbpy_decode_line)
15452         (gdbpy_run_events, gdbpy_start_type_printers)
15453         (gdbpy_apply_type_printers): Use gdbpy_ref.
15454
15455 2017-01-10  Tom Tromey  <tom@tromey.com>
15456
15457         * python/py-param.c (get_doc_string, compute_enum_values): Use
15458         gdbpy_ref.
15459
15460 2017-01-10  Tom Tromey  <tom@tromey.com>
15461
15462         * python/py-inferior.c (find_thread_object, build_inferior_list):
15463         Use gdbpy_ref.
15464
15465 2017-01-10  Tom Tromey  <tom@tromey.com>
15466
15467         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15472         gdbpy_ref.
15473
15474 2017-01-10  Tom Tromey  <tom@tromey.com>
15475
15476         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15477         extra incref.
15478         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15479         Use gdbpy_ref.
15480
15481 2017-01-10  Tom Tromey  <tom@tromey.com>
15482
15483         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15484         gdbpy_ref.
15485
15486 2017-01-10  Tom Tromey  <tom@tromey.com>
15487
15488         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15489         decref results of PyArg_ParseTupleAndKeywords.
15490
15491 2017-01-10  Tom Tromey  <tom@tromey.com>
15492
15493         * python/python.c (python_run_simple_file): Use
15494         unique_xmalloc_ptr, gdbpy_ref.
15495
15496 2017-01-10  Tom Tromey  <tom@tromey.com>
15497
15498         * python/py-prettyprint.c (print_stack_unless_memory_error)
15499         (print_string_repr, print_children): Use gdbpy_ref.
15500         (dummy_python_frame): New class.
15501         (dummy_python_frame::dummy_python_frame): Rename from
15502         push_dummy_python_frame.
15503         (py_restore_tstate): Remove.
15504
15505 2017-01-10  Tom Tromey  <tom@tromey.com>
15506
15507         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15508
15509 2017-01-10  Tom Tromey  <tom@tromey.com>
15510
15511         * python/python.c (ensure_python_env, restore_python_env):
15512         Remove.
15513         * python/python-internal.h (ensure_python_env): Don't declare.
15514         * varobj.h (varobj_ensure_python_env): Don't declare.
15515         * varobj.c (varobj_ensure_python_env): Remove.
15516
15517 2017-01-10  Tom Tromey  <tom@tromey.com>
15518
15519         * varobj.c (varobj_value_get_print_value): Use
15520         gdbpy_enter_varobj.
15521
15522 2017-01-10  Tom Tromey  <tom@tromey.com>
15523
15524         * python/py-prettyprint.c (print_string_repr, print_children):
15525         Update.
15526         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15527         of "encoding".
15528         * varobj.c (varobj_value_get_print_value): Update.
15529         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15530
15531 2017-01-10  Tom Tromey  <tom@tromey.com>
15532
15533         * varobj.c (varobj_get_display_hint)
15534         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15535         (varobj_set_visualizer, free_variable): Use
15536         gdbpy_enter_varobj.
15537
15538 2017-01-10  Tom Tromey  <tom@tromey.com>
15539
15540         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15541         (do_finish_initialization): New function.  Use gdbpy_ref.
15542         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15543         do_finish_initialization.
15544
15545 2017-01-10  Tom Tromey  <tom@tromey.com>
15546
15547         * python/py-param.c (get_set_value, get_show_value): Use
15548         gdbpy_enter, gdbpy_ref.
15549
15550 2017-01-10  Tom Tromey  <tom@tromey.com>
15551
15552         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15553
15554 2017-01-10  Tom Tromey  <tom@tromey.com>
15555
15556         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15557
15558 2017-01-10  Tom Tromey  <tom@tromey.com>
15559
15560         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15561         Use gdbpy_enter_varobj.
15562
15563 2017-01-10  Tom Tromey  <tom@tromey.com>
15564
15565         * varobj.c (gdbpy_enter_varobj): New constructor.
15566         * python/python-internal.h (gdbpy_enter_varobj): New class.
15567         * python/py-varobj.c (py_varobj_get_iterator): Use
15568         gdbpy_enter_varobj.
15569
15570 2017-01-10  Tom Tromey  <tom@tromey.com>
15571
15572         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15573         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15574         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15575         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15576         unique_xmalloc_ptr.
15577         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15578
15579 2017-01-10  Tom Tromey  <tom@tromey.com>
15580
15581         * python/py-xmethods.c (invoke_match_method): Use
15582         gdbpy_ref.
15583
15584 2017-01-10  Tom Tromey  <tom@tromey.com>
15585
15586         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15587         gdbpy_enter, gdbpy_ref.
15588
15589 2017-01-10  Tom Tromey  <tom@tromey.com>
15590
15591         * python/python.c (python_interactive_command): Use gdbpy_enter.
15592
15593 2017-01-10  Tom Tromey  <tom@tromey.com>
15594
15595         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15596         gdbpy_ref.
15597
15598 2017-01-10  Tom Tromey  <tom@tromey.com>
15599
15600         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15601         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15602
15603 2017-01-10  Tom Tromey  <tom@tromey.com>
15604
15605         * utils.h (htab_deleter): New struct.
15606         (htab_up): New typedef.
15607         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15608         gdbpy_enter, gdbpy_ref, htab_up.
15609
15610 2017-01-10  Tom Tromey  <tom@tromey.com>
15611
15612         * python/py-unwind.c (pending_frame_invalidate): Remove.
15613         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15614
15615 2017-01-10  Tom Tromey  <tom@tromey.com>
15616
15617         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15618         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15619
15620 2017-01-10  Tom Tromey  <tom@tromey.com>
15621
15622         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15623
15624 2017-01-10  Tom Tromey  <tom@tromey.com>
15625
15626         * python/python.c (gdbpy_eval_from_control_command)
15627         (gdbpy_source_script, gdbpy_run_events)
15628         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15629         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15630         gdbpy_enter.
15631
15632 2017-01-10  Tom Tromey  <tom@tromey.com>
15633
15634         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15635
15636 2017-01-10  Tom Tromey  <tom@tromey.com>
15637
15638         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15639
15640 2017-01-10  Tom Tromey  <tom@tromey.com>
15641
15642         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15643         (python_on_inferior_call_pre, python_on_inferior_call_post)
15644         (python_on_memory_change, python_on_register_change)
15645         (python_inferior_exit, python_new_objfile, add_thread_object)
15646         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15647
15648 2017-01-10  Tom Tromey  <tom@tromey.com>
15649
15650         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15651         (bpfinishpy_handle_exit): Use gdbpy_enter.
15652
15653 2017-01-10  Tom Tromey  <tom@tromey.com>
15654
15655         * python/py-cmd.c (cmdpy_destroyer)
15656         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15657         gdbpy_enter.
15658
15659 2017-01-10  Tom Tromey  <tom@tromey.com>
15660
15661         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15662         gdbpy_enter.
15663         (gdbpy_breakpoint_has_cond): Likewise.
15664
15665 2017-01-10  Tom Tromey  <tom@tromey.com>
15666
15667         * python/python.c (gdbpy_enter): New constructor.
15668         (~gdbpy_enter): New destructor.
15669         (restore_python_env, ensure_python_env): Rewrite.
15670         * python/python-internal.h (gdbpy_enter): New class.
15671
15672 2017-01-10  Tom Tromey  <tom@tromey.com>
15673
15674         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15675
15676 2017-01-10  Tom Tromey  <tom@tromey.com>
15677
15678         * python/py-value.c (value_has_field, get_field_flag)
15679         (get_field_type, valpy_getitem, convert_value_from_python): Use
15680         gdbpy_ref.
15681
15682 2017-01-10  Tom Tromey  <tom@tromey.com>
15683
15684         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15685         gdbpy_ref.
15686
15687 2017-01-10  Tom Tromey  <tom@tromey.com>
15688
15689         * python/py-prettyprint.c (search_pp_list)
15690         (find_pretty_printer_from_objfiles)
15691         (find_pretty_printer_from_progspace)
15692         (find_pretty_printer_from_gdb, find_pretty_printer)
15693         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15694         gdbpy_ref.
15695
15696 2017-01-10  Tom Tromey  <tom@tromey.com>
15697
15698         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15699
15700 2017-01-10  Tom Tromey  <tom@tromey.com>
15701
15702         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15703         (ltpy_get_all_source_lines): Use gdbpy_ref.
15704
15705 2017-01-10  Tom Tromey  <tom@tromey.com>
15706
15707         * python/py-framefilter.c (extract_sym, extract_value)
15708         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15709         gdbpy_ref.
15710
15711 2017-01-10  Tom Tromey  <tom@tromey.com>
15712
15713         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15714
15715 2017-01-10  Tom Tromey  <tom@tromey.com>
15716
15717         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15718
15719 2017-01-10  Tom Tromey  <tom@tromey.com>
15720
15721         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15722         gdbpy_ref.
15723
15724 2017-01-10  Tom Tromey  <tom@tromey.com>
15725
15726         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15727
15728 2017-01-10  Tom Tromey  <tom@tromey.com>
15729
15730         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15731         (typy_range): Use gdbpy_ref.
15732
15733 2017-01-10  Tom Tromey  <tom@tromey.com>
15734
15735         * python/py-threadevent.c (create_thread_event_object): Use
15736         gdbpy_ref.
15737         * python/py-stopevent.c (create_stop_event_object): Simplify.
15738         (emit_stop_event): Use gdbpy_ref.
15739         * python/py-signalevent.c (create_signal_event_object): Use
15740         gdbpy_ref.
15741         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15742         (emit_new_objfile_event, create_clear_objfiles_event_object)
15743         (emit_clear_objfiles_event): Use gdbpy_ref.
15744         * python/py-infevents.c (create_inferior_call_event_object)
15745         (create_register_changed_event_object)
15746         (create_memory_changed_event_object, emit_inferior_call_event)
15747         (emit_memory_changed_event, emit_register_changed_event): Use
15748         gdbpy_ref.
15749         * python/py-exitedevent.c (create_exited_event_object)
15750         (emit_exited_event): Use gdbpy_ref.
15751         * python/py-event.h (evpy_emit_event): Remove
15752         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15753         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15754         * python/py-continueevent.c (emit_continue_event): Use
15755         gdbpy_ref.
15756         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15757         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15758         gdbpy_ref.
15759         * python/py-bpevent.c (create_breakpoint_event_object): Use
15760         gdbpy_ref.
15761
15762 2017-01-10  Tom Tromey  <tom@tromey.com>
15763
15764         * python/py-ref.h: New file.
15765
15766 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15767
15768         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15769         void.
15770         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15771         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15772         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15773         * ui-out.c (ui_out::redirect): Likewise.
15774         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15775         * cli/cli-logging.c (set_logging_redirect): Update call site of
15776         ui_out::redirect.
15777         (handle_redirections): Likewise.
15778         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15779         * top.c (execute_command_to_string): Likewise.
15780         * utils.c (do_ui_out_redirect_pop): Likewise.
15781
15782 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15783
15784         * stack.c (_initialize_stack): Update "frame" command help message.
15785
15786 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15787
15788         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15789
15790 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15791
15792         * x86-linux-nat.h: Include gdb_proc_service.h.
15793
15794 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15795
15796         * ser-base.h: Include serial.h.
15797
15798 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15799
15800         * ppc-linux-tdep.h: Include ppc-tdep.h.
15801
15802 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15803
15804         * nat/amd64-linux-siginfo.h: Include signal.h.
15805
15806 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15807
15808         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15809
15810 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15811
15812         * mi/mi-parse.h: Include mi-cmds.h.
15813
15814 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15815
15816         * inf-loop.c: Don't include "target.h".
15817         * inf-loop.h: Include it here.
15818
15819 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15820
15821         * dfp.h: Include "dboulest.h" and "expression.h".
15822
15823 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15824
15825         * ax-gdb.h: Include "ax.h".
15826
15827 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15828
15829         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15830         with nat/gdb_ptrace.h.
15831
15832 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15833
15834         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15835         new line.
15836         (mips64_fbsd_sigframe_init): Likewise.
15837
15838 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15839
15840         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15841         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15842
15843 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15844
15845         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15846         * NEWS: Mention new FreeBSD/mips native configuration.
15847         * config/mips/fbsd.mh: New file.
15848         * configure.host: Add mips*-*-freebsd*.
15849         * mips-fbsd-nat.c: New file.
15850
15851 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15852
15853         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15854         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15855         * NEWS: Mention new FreeBSD/mips target.
15856         * configure.tgt: Add mips*-*-freebsd*.
15857         * mips-fbsd-tdep.c: New file.
15858         * mips-fbsd-tdep.h: New file.
15859
15860 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15861
15862         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15863         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15864
15865 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15866
15867         Update copyright year range in all GDB files.
15868
15869 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15870
15871         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15872
15873 For older changes see ChangeLog-2016.
15874 \f
15875 Local Variables:
15876 mode: change-log
15877 left-margin: 8
15878 fill-column: 74
15879 version-control: never
15880 coding: utf-8
15881 End: